Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
181 commits
Select commit Hold shift + click to select a range
ecf826c
docs(acp): add MCP-over-ACP browser-control implementation blueprint …
brettchien Jul 19, 2026
21cfbb5
docs(adr): resolve MCP-over-ACP browser-control design (D1-D4) + flow…
brettchien Jul 19, 2026
b14552a
feat(gateway/acp): server-initiated request direction (T1.2/1.3)
brettchien Jul 19, 2026
4d6055d
refactor(gateway/acp): construct trivial responses from generated typ…
brettchien Jul 19, 2026
54ac761
feat(gateway/acp): MCP-over-ACP tunnel frame API (T4.1)
brettchien Jul 19, 2026
f6c9294
feat(core): scaffold MCP proxy server deps + static browser toolset (…
brettchien Jul 19, 2026
b8a01cb
feat(core): MCP proxy ServerHandler + loopback server (T5.1b)
brettchien Jul 19, 2026
cc9dbf7
feat(core): bearer gate on the MCP proxy server (T5.2 part 1)
brettchien Jul 19, 2026
63d6566
docs(adr): correct runtime diagram — mcp/message flattens, no inner id
brettchien Jul 19, 2026
d91814e
feat(gateway/acp): parse + record client-declared type:acp mcpServers…
brettchien Jul 19, 2026
9661191
docs: MCP-over-ACP tunnel contract for the extension (T4.3)
brettchien Jul 19, 2026
767c9ee
feat(gateway/acp): TunnelHandle — per-connection MCP tunnel handle (T…
brettchien Jul 19, 2026
daa23da
feat(gateway/acp): tunnel registry + establish_and_register_tunnel (T…
brettchien Jul 19, 2026
eedf6ce
feat(gateway): thread AcpTunnelRegistry through AppState (T5.3)
brettchien Jul 19, 2026
b88a176
feat(gateway/acp): open MCP tunnels on session/new + cleanup (T5.3)
brettchien Jul 19, 2026
4af5ad9
feat(core): BrowserTunnel trait + ProxyHandler forwards tool calls (T…
brettchien Jul 19, 2026
c908496
feat(core): start_session_server — per-session server + .cursor/mcp.j…
brettchien Jul 19, 2026
6cbd03f
feat(core): start per-session MCP proxy on agent spawn (T5.2/D5-a)
brettchien Jul 19, 2026
e582383
feat(root): wire the browser tunnel bridge end-to-end (T5.3, D6-a')
brettchien Jul 19, 2026
c9896ce
docs(adr): record the as-built OpenAB side (D5-a + D6-a', end-to-end)
brettchien Jul 19, 2026
059da24
test(e2e): MCP-over-ACP tunnel producer section in acp-ws-smoke (T7)
brettchien Jul 19, 2026
6d5d1ce
test(e2e): complete the MCP-over-ACP tunnel suite (fan-out + filtering)
brettchien Jul 19, 2026
ddc9620
fix(acp-mcp): address Mira review nits — constant-time bearer + strin…
brettchien Jul 19, 2026
6476dae
fix(acp-mcp): establish the browser tunnel on session/resume, not jus…
brettchien Jul 19, 2026
dde1b34
chore(acp-mcp): log browser tunnel open/register for live-session obs…
brettchien Jul 19, 2026
06165f0
fix(acp-mcp): raise ACP frame cap 1→8 MiB for browser-tool results
brettchien Jul 19, 2026
1f5b0c9
fix(acp-mcp): one browser tunnel per session — fix fan-out overwrite/…
brettchien Jul 19, 2026
bbc9e13
fix(acp-mcp): 0600 mcp.json + strip stale bearer on evict (M-B2)
brettchien Jul 19, 2026
b9bdd08
chore(acp-mcp): lock subtle dependency
brettchien Jul 19, 2026
a6d9654
feat(mcp-proxy): write openab-browser into kiro-cli config too, not j…
brettchien Jul 20, 2026
dc0009a
docs: browser MCP agent setup — per-variant mcp.json how-to (Phase 2 #8)
brettchien Jul 20, 2026
c2bd77d
feat(mcp-proxy): per-pod browser-bridge socket server (Option C, P1)
brettchien Jul 20, 2026
73a777e
feat(cli): openab browser-bridge subcommand — stdio MCP relay to the …
brettchien Jul 20, 2026
8b18c48
feat(acp): inject OPENAB_BROWSER_CHANNEL into the agent env (Option C…
brettchien Jul 20, 2026
2509bde
feat(mcp-proxy): static write-once browser-bridge config (Option C, P4)
brettchien Jul 20, 2026
822fdf9
feat: OPENAB_BROWSER_MODE proxy|bridge toggle wiring (Option C, P5)
brettchien Jul 20, 2026
1d51376
fix(browser-bridge): resolve channel via process-ancestry, not env (O…
brettchien Jul 20, 2026
c83e399
feat(mcp-proxy): revert bridge config to pure {command,args} (Option …
brettchien Jul 20, 2026
3696d13
fix(acp): add acp_mcp_servers to test-only AcpSession initializers
brettchien Jul 24, 2026
0ed644d
docs(acp): split into reverse-MCP mechanism ADR + browser-control ADR…
brettchien Jul 24, 2026
144c232
docs(adr): correct D4 list_changed overclaim in browser ADR
brettchien Jul 24, 2026
1c35aaa
refactor(acp): compound-key (channel_id,server_id) tunnel registry + …
brettchien Jul 24, 2026
c000534
Merge main (post #1448/#1449/#1453): keep browser tunnel wiring along…
chaodu-agent Jul 25, 2026
487a05a
chore: regenerate Cargo.lock for merged deps
chaodu-agent Jul 25, 2026
c2a7c6a
fix(mcp-proxy): register browser server in kiro per-agent configs (--…
chaodu-agent Jul 25, 2026
a492eb5
Merge remote-tracking branch 'origin/main' into pr1447rw
chaodu-agent Jul 25, 2026
bf37d25
feat(mcp): browser capabilities through the session-aware facade (Fac…
chaodu-agent Jul 25, 2026
74e23f0
fix: facade_serving is acp-only — derive it, don't flag it (default-f…
chaodu-agent Jul 25, 2026
32cc50f
docs(adr): §6 builds on the OAB MCP Facade — one AcpTunnelSource, sta…
brettchien Jul 26, 2026
9e53486
Merge main: OAB MCP adapter ADR (#1446) + gmail-native doc fix (#1455)
brettchien Jul 26, 2026
ee0998c
docs(adr): align §6 with the merged facade series + record the mcpSer…
brettchien Jul 26, 2026
3cb8bde
docs(adr): tighten §6.4 trust gate — deny-all tool_filter + pinned br…
brettchien Jul 26, 2026
0cc6dd5
docs(adr): §6.1/§6.2 — declared id vs name, and last-attach-wins on s…
brettchien Jul 26, 2026
5dc45de
feat(acp): record declared server name, establish all declared tunnel…
brettchien Jul 26, 2026
ba94efe
feat(acp): route client-declared servers by name and gate their tool …
brettchien Jul 26, 2026
2d334ae
docs(adr): §6.3 — policy entries seed the catalog; cache narrows, nev…
brettchien Jul 26, 2026
eb732f1
feat(mcp): operator config surface for the client-declared server all…
brettchien Jul 26, 2026
1e7ea11
feat(acp): discovery cache — fetch each declared server's real tools/…
brettchien Jul 26, 2026
9ab286a
test(acp): two client-declared servers in one session
brettchien Jul 26, 2026
270a2ff
refactor(mcp): rename the client-declared browser surface to katashiro.*
brettchien Jul 26, 2026
81d775c
docs(adr): follow the katashiro.* rename through both ADRs
brettchien Jul 26, 2026
17ecc47
docs: lead the browser-MCP setup guide with facade mode, demote proxy…
brettchien Jul 26, 2026
969684a
docs(adr): fold the browser ADR into the reverse-MCP ADR as its worke…
brettchien Jul 26, 2026
1c1919c
docs(mcp): note that mcp.audit must be named in RUST_LOG or auditing …
brettchien Jul 26, 2026
19f9831
docs: warn that a leftover mode entry silently bypasses the facade
brettchien Jul 26, 2026
b6fdeb4
ci: run the acp-mcp core and acp root tests
brettchien Jul 28, 2026
08a6053
fix(acp): do not open tunnels after a rejected session/resume
brettchien Jul 28, 2026
a3068b3
fix(acp): do not mint a facade session token when its config write fails
brettchien Jul 28, 2026
16df6de
fix(mcp): retire the direct browser transport when facade mode sets up
brettchien Jul 28, 2026
28cad68
fix(acp): keep the 8 MiB frame allowance to tunnel results only
brettchien Jul 28, 2026
63fb63a
fix(mcp): authenticate the bridge connection, not the frame
brettchien Jul 28, 2026
1970bae
fix(mcp): revoke facade session tokens by token, not by channel
brettchien Jul 28, 2026
3aa8f6a
fix(acp): disconnect tunnels replaced by last-attach-wins
brettchien Jul 28, 2026
d9a2679
fix(mcp): bound bridge frame reads
brettchien Jul 28, 2026
34b5f2a
ci: quote the acp-mcp test filter so the workflow file parses
brettchien Jul 28, 2026
e308e75
fix(mcp): only delete a direct browser entry we can prove we wrote
brettchien Jul 28, 2026
399d892
fix(acp): bound client-declared MCP server fan-out per session
brettchien Jul 28, 2026
580988c
ci: select the pool facade tests, not just compile them
brettchien Jul 28, 2026
55eab82
fix(mcp): stop a second mint from invalidating a live session token
brettchien Jul 28, 2026
bb27e96
docs(mcp): correct SessionTokens docs to match coexisting-token seman…
brettchien Jul 28, 2026
6ea4b44
feat(acp)!: remove the stdio bridge transport
brettchien Jul 28, 2026
feded44
fix(acp): warn when OPENAB_BROWSER_MODE names the removed bridge
brettchien Jul 28, 2026
01dff01
feat(acp)!: remove the per-session proxy and require [mcp]
brettchien Jul 28, 2026
8e7009d
fix(acp): report browser control at startup, and drop the proxy's lef…
brettchien Jul 28, 2026
e0c4a92
docs(acp): retire the descriptions the removed transports left behind
brettchien Jul 28, 2026
93c8e15
docs(adr): correct the descriptions the removed transports left in th…
brettchien Jul 28, 2026
87206fd
docs(adr): remove the last four present-tense claims about the old tr…
brettchien Jul 28, 2026
f2b4dbd
docs(adr): correct nine claims found by two independent semantic reads
brettchien Jul 28, 2026
a91437c
docs(adr): resolve the two claims that were ambiguous between past an…
brettchien Jul 28, 2026
bdd70c3
docs(adr): fix the discovery order, the status line and the last `bro…
brettchien Jul 28, 2026
0f58183
docs(adr): correct nine more claims, and record two gaps instead of h…
brettchien Jul 28, 2026
deb2577
test(acp): drive the real /acp WebSocket end to end
brettchien Jul 29, 2026
197bb4d
fix(acp): scope registry teardown to the connection that owns the entry
brettchien Jul 29, 2026
8045a1b
refactor(acp): give reset_session and hung eviction one implementation
brettchien Jul 29, 2026
468c141
fix(acp): resume stores what it accepted, and retires what it withdrew
brettchien Jul 29, 2026
147c094
fix(acp): give tunnel establishes their own task budget
brettchien Jul 29, 2026
bfeebb8
fix(acp): make the facade config writer safe on a user's mcp.json
brettchien Jul 29, 2026
9249a5a
fix(acp): stop logging a resume credential at info
brettchien Jul 29, 2026
91563f2
fix(acp): complete the inner MCP lifecycle before using a tunnel
brettchien Jul 29, 2026
8b8f550
fix(acp): restore the deadlock warning to the function it belongs to
brettchien Jul 29, 2026
1e70a93
fix(acp): test that a refused handshake blocks registration, and tell…
brettchien Jul 29, 2026
3182b82
fix(acp): disconnect the connection a failed handshake leaves open
brettchien Jul 29, 2026
d98e554
fix(acp): warn when handshake cleanup fails, and stop duplicating the…
brettchien Jul 29, 2026
5306541
chore(acp): drop six dead_code allows that had stopped being true
brettchien Jul 29, 2026
87fac9c
chore(acp): drop the last six dead_code allows, and the doc claims th…
brettchien Jul 29, 2026
7915db2
chore(acp): drop the seventh dead_code allow, which was stale like th…
brettchien Jul 29, 2026
c1f4dac
fix(acp): reject an inner MCP server that answers a protocol version …
brettchien Jul 29, 2026
bbb5394
fix(acp): order last-attach-wins by a generation stamp, not by who re…
brettchien Jul 29, 2026
130a1f7
fix(acp): derive withdrawn declarations from the registry, and delete…
brettchien Jul 29, 2026
09e5c4d
fix(acp): order same-server_id re-attach too, and stop discarding the…
brettchien Jul 29, 2026
111966b
feat(acp)!: make the tunnel timeout operator-configurable, and cancel…
brettchien Jul 29, 2026
b5f317b
fix(acp): give each atomic write its own temp file, fsync the directo…
brettchien Jul 29, 2026
01607bd
fix(acp): an omitted mcpServers withdraws nothing, and pin the withdr…
brettchien Jul 29, 2026
0b4e4ed
fix(acp): put the tunnel timeout strictly beneath the idle timeout it…
brettchien Jul 29, 2026
45e5ab1
fix(acp): authorise the resume sweep by connection age, not by when t…
brettchien Jul 29, 2026
17e16ec
fix(acp): order every tunnel comparison by connection age, and close …
brettchien Jul 29, 2026
c633e87
refactor(acp): delete the eviction filter's rank comparison, and cove…
brettchien Jul 29, 2026
d15018e
test(acp): pin the attach tiebreak and the timeout ceiling, neither o…
brettchien Jul 29, 2026
6a1004a
refactor(acp): resolve a declared name where the invariant lives, and…
brettchien Jul 30, 2026
39b42f8
refactor(acp): resolve in one pass, and give discovery the same colla…
brettchien Jul 30, 2026
74315a6
refactor(acp)!: remove the enumerating servers(), leaving one way to …
brettchien Jul 30, 2026
24db1d1
docs(acp): point the registry's public doors at resolve_by_name
brettchien Jul 30, 2026
4396cbe
docs(acp): integrate the registry doc instead of appending to it, and…
brettchien Jul 30, 2026
67bb5d7
fix(acp): gate the root timeout test on the acp feature so the crate …
brettchien Jul 30, 2026
2a6c074
ci(acp): fail the filtered test steps when the filter selects nothing
brettchien Jul 30, 2026
c0d424a
fix(acp)!: stop logging the resume credential in cleartext
brettchien Jul 30, 2026
43ecb66
fix(acp)!: redact both encodings of the session credential, and follo…
brettchien Jul 30, 2026
19b2ae2
fix(acp): one session, one redaction tag; redact ids in returned errors
brettchien Jul 30, 2026
330e40c
test(acp): correct what the replacement test covers, and exercise the…
brettchien Jul 30, 2026
25dc1c8
test(acp): replace a tautological premise and an error-swallowing ass…
brettchien Jul 30, 2026
6adc470
fix(mcp): make `[mcp]` reject unknown keys instead of widening the to…
brettchien Jul 30, 2026
53bce9c
test(acp): cover the eviction branch, which had no test and is not de…
brettchien Jul 30, 2026
543249b
test(acp): bound the wait in the eviction test, and state what it doe…
brettchien Jul 30, 2026
b6a2f2c
fix(acp): negotiate the inner MCP revision against a set, not by equa…
brettchien Jul 30, 2026
fcfb424
docs(acp): the revision set depends on transport and framing, not jus…
brettchien Jul 30, 2026
30e0475
feat(mcp)!: author one file we own instead of editing the operator's …
brettchien Jul 30, 2026
7c68506
docs(mcp): stop claiming a --mcp-config spawn flag that does not exist
brettchien Jul 30, 2026
38bef5d
test(acp): cover both frame ceilings, in the gate rather than only in…
brettchien Jul 30, 2026
53dee2b
fix(mcp): the startup line said "enabled" when the operator still has…
brettchien Jul 30, 2026
e22c9ef
docs(mcp): the setup guide promised a cleanup openab no longer performs
brettchien Jul 30, 2026
88ab8ce
fix(acp): redact the credential in five more returned errors, found b…
brettchien Jul 30, 2026
a0c0b90
Merge origin/main into feat/acp-mcp-browser (unblocks CI)
brettchien Jul 30, 2026
bc3e63a
feat(mcp)!: katashiro is an example client, not a default — no built-…
brettchien Jul 30, 2026
29503a2
docs(mcp): browser_tools no longer has the consumer its own doc claims
brettchien Jul 30, 2026
a42ad59
refactor(mcp)!: remove the last specification of the retired static-a…
brettchien Jul 31, 2026
8c791b3
fix(acp): advertise mcpCapabilities — silence already claimed http an…
brettchien Jul 31, 2026
54223ae
docs(mcp): the operator already controls --mcp-config; say so instead…
brettchien Jul 31, 2026
a2a3c5f
docs(adr): §7.3 described the current round-trip through a component …
brettchien Jul 31, 2026
606b3b3
docs(adr): the §6.1 diagram declared the provider name and wrote a fi…
brettchien Jul 31, 2026
aedb25d
docs(mcp): the "deleted for you" promise appeared twice; e22c9ef8 fix…
brettchien Jul 31, 2026
f14d1c7
refactor(mcp)!: drop the OPENAB_BROWSER_MODE notice — the variable ne…
brettchien Jul 31, 2026
9183808
refactor(mcp)!: name the machinery after what it is, not after its fi…
brettchien Jul 31, 2026
dba7391
docs: record that 91838086 also carried the R13 replacement findings
brettchien Jul 31, 2026
eb9f55a
ci: the rename left ci.yml filtering on a module that no longer exists
brettchien Jul 31, 2026
538c0df
docs: close the deleted-seed fact — nothing is advertised before a se…
brettchien Jul 31, 2026
ad0b6b3
docs: close the removed-transports fact — there is no core MCP proxy …
brettchien Jul 31, 2026
728e4d1
docs: close the deleted-catalog fact, and the deleted enumerator with it
brettchien Jul 31, 2026
4a32fd9
docs: --mcp-config is settled, not an open question
brettchien Jul 31, 2026
ca2bcbe
docs: quote the startup line the code actually emits
brettchien Jul 31, 2026
d9b7201
docs: the per-session bearer shipped, so narrow the trust-model claim
brettchien Jul 31, 2026
88daa52
docs: use the post-rename names for the tunnel type and its two files
brettchien Jul 31, 2026
9c0f635
docs: §6.1 resolves same-name collisions by rank, not plain last-atta…
brettchien Jul 31, 2026
7cd583c
docs: no component here is an MCP proxy
brettchien Jul 31, 2026
f41408b
docs: openab touches no user's mcp.json, so stop calling this the cod…
brettchien Jul 31, 2026
1d27e0e
docs: report_facade_status is not the OPENAB_BROWSER_MODE migration n…
brettchien Jul 31, 2026
320dca2
docs: the operator's wiring points the agent at the facade, not the f…
brettchien Jul 31, 2026
fe35856
feat(acp)!: remove the [[mcp.acp_servers]] allowlist; admit on transp…
brettchien Jul 31, 2026
c26732b
docs: sweep the allowlist out of the ADR and guides (D-29)
brettchien Jul 31, 2026
ff0a8c3
docs(adr): §6.4 states the keyless-loopback default plainly (D-30)
brettchien Jul 31, 2026
e3e06b6
fix(acp)!: redact both ids in the force-evict-hung warning (F6)
brettchien Jul 31, 2026
84cde81
fix(acp)!: revoke the facade token synchronously on hung eviction (F3)
brettchien Jul 31, 2026
fc8584f
fix(acp)!: turn/generation-scope the reply sink across connections (F4)
brettchien Jul 31, 2026
f4e4c11
fix(acp)!: route tool calls by what was discovered, not the name's sh…
brettchien Jul 31, 2026
fd45f92
fix(acp): cfg-gate the facade_tokens field to the acp-mcp feature (F3)
brettchien Jul 31, 2026
a7f3600
fix(acp): prefer the prefix's namesake server on tool-name collision …
brettchien Aug 1, 2026
3d74995
docs: F2 is gateway-initiated only; server-initiated MCP is a spec-al…
brettchien Aug 1, 2026
7153004
feat(acp)!: namespace the ACP capability under a reverse-DNS _meta ke…
brettchien Aug 1, 2026
c9d5890
docs(acp): name the _meta convention apart from the typed extensions …
brettchien Aug 1, 2026
1d1fa2b
fix(acp)!: one catalog for advertised names and routes; refresh a rec…
brettchien Aug 1, 2026
1ebe108
fix(log): hash the uuid, not the prefixed id, in every redactor (R5 F4)
brettchien Aug 1, 2026
97e8eee
docs: the tunnel timeout default is 170s; 180s is the ceiling (R5 F3)
brettchien Aug 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
target/
.git/
data/
*.tgz
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,41 @@ jobs:
# `-p openab-gateway` to avoid the workspace hooks::tests parallel flake.
- name: cargo test (acp gateway)
run: cargo test -p openab-gateway --features acp
# Same default-features gap on the core side: `mcp_proxy` is the only `acp-mcp`-gated module,
# so its tunnel-trait, tools-cache and bridge-dispatch tests never compile above either.
# Filtered to `acp_mcp::` for the same reason the gateway step is scoped to one package —
# it keeps the flaky hooks::tests out of this job.
- name: cargo test (acp-mcp core)
# `cargo test` exits 0 when a filter selects NOTHING, so "selected nothing" and "everything
# passed" are indistinguishable — that is precisely how a compiled-but-never-selected test
# shipped here before. Count the selection first and fail on zero.
#
# The filter lives in a variable inside a block scalar: written inline after `run:`, its
# trailing `::` reads as a YAML mapping indicator and makes the whole file unparseable.
run: |
set -euo pipefail
FILTER='acp_mcp::'
n=$(cargo test -p openab-core --features acp-mcp "$FILTER" -- --list | grep -c ': test$' || true)
echo "filter '$FILTER' selected $n test(s)"
[ "$n" -gt 0 ] || { echo "::error::filter '$FILTER' selected ZERO tests — stale or mistyped"; exit 1; }
cargo test -p openab-core --features acp-mcp "$FILTER"
# The pool's facade-session tests are `acp-mcp`-gated too but live outside `acp_mcp::`, so
# the filter above compiled them and then selected them away. Naming the module runs them
# while still leaving the flaky hooks::tests out.
- name: cargo test (acp-mcp pool)
# Same zero-match guard as above, and the same reason for the block scalar.
run: |
set -euo pipefail
FILTER='acp::pool::'
n=$(cargo test -p openab-core --features acp-mcp "$FILTER" -- --list | grep -c ': test$' || true)
echo "filter '$FILTER' selected $n test(s)"
[ "$n" -gt 0 ] || { echo "::error::filter '$FILTER' selected ZERO tests — stale or mistyped"; exit 1; }
cargo test -p openab-core --features acp-mcp "$FILTER"
# And the root package's own tests — the ACP-tunnel capability source (acp_tunnel_source.rs) and
# are `acp`-gated, so `--workspace` above skips
# them too. This is where the source's routing and trust-gate coverage lives.
- name: cargo test (acp root)
run: cargo test --features acp
- name: cargo build (unified)
run: cargo build --features unified

Expand Down
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ feishu = ["dep:openab-gateway", "dep:axum", "openab-gateway/feishu"]
googlechat = ["dep:openab-gateway", "dep:axum", "openab-gateway/googlechat"]
wecom = ["dep:openab-gateway", "dep:axum", "openab-gateway/wecom"]
teams = ["dep:openab-gateway", "dep:axum", "openab-gateway/teams"]
acp = ["dep:openab-gateway", "dep:axum", "openab-gateway/acp"]
acp = ["dep:openab-gateway", "dep:axum", "openab-gateway/acp", "openab-core/acp-mcp"]
lineworks = ["dep:openab-gateway", "dep:axum", "openab-gateway/lineworks"]

[dev-dependencies]
Expand Down
8 changes: 8 additions & 0 deletions crates/openab-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ aws-credential-types = { version = "1", optional = true }
urlencoding = { version = "2", optional = true }
hex = { version = "0.4", optional = true }
http = { version = "1", optional = true }
# Browser tool definitions for the facade's capability source. Only `rmcp::model` is used now —
# the loopback MCP server that needed the server + streamable-http transport features (and its own
# axum listener) was removed with the per-session proxy.
rmcp = { version = "1.7", default-features = false, optional = true }
tokio-util = { version = "0.7", optional = true }

[target.'cfg(unix)'.dependencies]
libc = "0.2"
Expand All @@ -65,3 +70,6 @@ config-s3 = ["dep:aws-sdk-s3", "dep:aws-config"]
pre-seed = ["dep:aws-sdk-s3", "dep:aws-config", "dep:zip", "dep:hex", "dep:flate2", "dep:tar"]
filestore = ["dep:aws-sdk-s3", "dep:aws-config"]
agentcore = ["dep:aws-config", "dep:aws-sigv4", "dep:aws-credential-types", "dep:urlencoding", "dep:hex", "dep:http", "dep:rustls", "dep:tokio-rustls", "dep:webpki-roots"]
# Core-side wiring for MCP-over-ACP browser control (enabled by the root `acp`): the browser tool
# definitions and the agent's facade MCP config. Core hosts no MCP server of its own any more.
acp-mcp = ["dep:rmcp", "dep:tokio-util"]
16 changes: 16 additions & 0 deletions crates/openab-core/src/acp/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,14 @@ pub struct AcpConnection {
pub session_reset: bool,
_reader_handle: JoinHandle<()>,
_stderr_handle: Option<JoinHandle<()>>,
/// Revokes this session's facade token when the connection is dropped, on any evict path.
/// Held only for its `Drop` side effect (never read).
///
/// It used to cancel a per-session MCP proxy server; that server is gone and the guard now
/// carries the minted token instead.
#[cfg(feature = "acp-mcp")]
#[allow(dead_code)]
facade_token_guard: Option<tokio_util::sync::DropGuard>,
}

/// Build the final set of env vars for the agent subprocess.
Expand Down Expand Up @@ -485,9 +493,17 @@ impl AcpConnection {
session_reset: false,
_reader_handle: reader_handle,
_stderr_handle: stderr_handle,
#[cfg(feature = "acp-mcp")]
facade_token_guard: None,
})
}

/// Attach the guard that revokes this session's facade token when the connection drops.
#[cfg(feature = "acp-mcp")]
pub fn set_facade_token_guard(&mut self, guard: Option<tokio_util::sync::DropGuard>) {
self.facade_token_guard = guard;
}

fn next_id(&self) -> u64 {
self.next_id.fetch_add(1, Ordering::Relaxed)
}
Expand Down
Loading
Loading