agent-embassy 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/CONTRIBUTING.md +25 -7
- package/README.md +20 -12
- package/README.zh-CN.md +14 -13
- package/SECURITY.md +55 -41
- package/dist/src/gateway/claude-helper-supervisor.js +0 -1
- package/dist/src/gateway/claude-helper-supervisor.js.map +1 -1
- package/dist/src/gateway/claude-runtime.d.ts +0 -2
- package/dist/src/gateway/claude-runtime.js +6 -17
- package/dist/src/gateway/claude-runtime.js.map +1 -1
- package/dist/src/gateway/cli-copy.d.ts +1 -1
- package/dist/src/gateway/cli-copy.en.d.ts +3 -1
- package/dist/src/gateway/cli-copy.en.js +5 -3
- package/dist/src/gateway/cli-copy.en.js.map +1 -1
- package/dist/src/gateway/cli-copy.js +2 -0
- package/dist/src/gateway/cli-copy.js.map +1 -1
- package/dist/src/gateway/cli-copy.zh-CN.d.ts +3 -1
- package/dist/src/gateway/cli-copy.zh-CN.js +5 -3
- package/dist/src/gateway/cli-copy.zh-CN.js.map +1 -1
- package/dist/src/gateway/cli.d.ts +2 -5
- package/dist/src/gateway/cli.js +30 -67
- package/dist/src/gateway/cli.js.map +1 -1
- package/dist/src/gateway/codex-app-server.d.ts +1 -7
- package/dist/src/gateway/codex-app-server.js +5 -52
- package/dist/src/gateway/codex-app-server.js.map +1 -1
- package/dist/src/gateway/codex-local-transport.d.ts +4 -10
- package/dist/src/gateway/codex-local-transport.js +13 -16
- package/dist/src/gateway/codex-local-transport.js.map +1 -1
- package/dist/src/gateway/compatibility.d.ts +0 -27
- package/dist/src/gateway/compatibility.js +1 -101
- package/dist/src/gateway/compatibility.js.map +1 -1
- package/dist/src/gateway/config.d.ts +0 -3
- package/dist/src/gateway/config.js +0 -10
- package/dist/src/gateway/config.js.map +1 -1
- package/dist/src/gateway/control.d.ts +1 -20
- package/dist/src/gateway/control.js +2 -33
- package/dist/src/gateway/control.js.map +1 -1
- package/dist/src/gateway/dashboard-copy.d.ts +1 -1
- package/dist/src/gateway/dashboard-copy.en.d.ts +6 -7
- package/dist/src/gateway/dashboard-copy.en.js +15 -16
- package/dist/src/gateway/dashboard-copy.en.js.map +1 -1
- package/dist/src/gateway/dashboard-copy.js +6 -7
- package/dist/src/gateway/dashboard-copy.js.map +1 -1
- package/dist/src/gateway/dashboard-copy.zh-CN.d.ts +6 -7
- package/dist/src/gateway/dashboard-copy.zh-CN.js +15 -16
- package/dist/src/gateway/dashboard-copy.zh-CN.js.map +1 -1
- package/dist/src/gateway/dashboard-model.d.ts +3 -7
- package/dist/src/gateway/dashboard-model.js +41 -16
- package/dist/src/gateway/dashboard-model.js.map +1 -1
- package/dist/src/gateway/dashboard.js +5 -7
- package/dist/src/gateway/dashboard.js.map +1 -1
- package/dist/src/gateway/live-dashboard-app/app.js +17 -45
- package/dist/src/gateway/live-dashboard-command.d.ts +5 -1
- package/dist/src/gateway/live-dashboard-command.js +8 -6
- package/dist/src/gateway/live-dashboard-command.js.map +1 -1
- package/dist/src/gateway/live-dashboard-http.d.ts +0 -4
- package/dist/src/gateway/live-dashboard-http.js +19 -93
- package/dist/src/gateway/live-dashboard-http.js.map +1 -1
- package/dist/src/gateway/live-dashboard-protocol.d.ts +1 -5
- package/dist/src/gateway/live-dashboard-protocol.js +0 -42
- package/dist/src/gateway/live-dashboard-protocol.js.map +1 -1
- package/dist/src/gateway/live-dashboard-server.d.ts +2 -2
- package/dist/src/gateway/live-dashboard-server.js +18 -4
- package/dist/src/gateway/live-dashboard-server.js.map +1 -1
- package/dist/src/gateway/live-dashboard.d.ts +3 -6
- package/dist/src/gateway/live-dashboard.js +6 -42
- package/dist/src/gateway/live-dashboard.js.map +1 -1
- package/dist/src/gateway/provenance-envelope.js +1 -1
- package/dist/src/gateway/provenance-envelope.js.map +1 -1
- package/dist/src/gateway/providers.d.ts +1 -21
- package/dist/src/gateway/providers.js +15 -261
- package/dist/src/gateway/providers.js.map +1 -1
- package/dist/src/gateway/server.js +0 -3
- package/dist/src/gateway/server.js.map +1 -1
- package/dist/src/gateway/service.d.ts +3 -15
- package/dist/src/gateway/service.js +76 -257
- package/dist/src/gateway/service.js.map +1 -1
- package/dist/src/gateway/store.js +76 -18
- package/dist/src/gateway/store.js.map +1 -1
- package/dist/src/gateway/types.d.ts +0 -4
- package/dist/src/gateway/types.js.map +1 -1
- package/docs/GATEWAY-ARCHITECTURE.md +75 -63
- package/package.json +1 -1
- package/skills/embassy-peer/SKILL.md +25 -10
- package/dist/src/gateway/claude-compatibility-scratch.d.ts +0 -18
- package/dist/src/gateway/claude-compatibility-scratch.js +0 -158
- package/dist/src/gateway/claude-compatibility-scratch.js.map +0 -1
- package/dist/src/gateway/live-dashboard-bootstrap.d.ts +0 -36
- package/dist/src/gateway/live-dashboard-bootstrap.js +0 -176
- package/dist/src/gateway/live-dashboard-bootstrap.js.map +0 -1
- package/docs/DESIGN.md +0 -134
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,30 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [1.3.0] - 2026-08-10
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- The live dashboard flags mail that was written but may not have been seen: a `delivered` Codex-to-Claude write older than two minutes whose recipient session is currently unobserved raises a warning pointing at that session's own window. The oldest unconsumed write owns the notice.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- `embassy dashboard --live` now uses the stable direct URL `http://127.0.0.1:41961/` by default, with a per-invocation `--port <n>` override accepting 1024–65535. Multiple windows and browsers can use the same companion (up to four concurrent live views); a port collision fails explicitly, points to `--port`, and never falls back.
|
|
18
|
+
- Claude-bound bodies are written to the recipient's native mailbox immediately after routing and pre-write checks, instead of waiting for an observed-idle gate that a busy Claude session could hold indefinitely. The receipt says exactly that: `delivered` toward Claude means the mailbox write completed, not that a model read or consumed the body.
|
|
19
|
+
- A Claude route that stops appearing in discovery is no longer auto-invalidated; only an actual discovery collision invalidates a selected route. Queued mail stays addressed to its session, and a write to a dead session socket fails fast with its exact safe code.
|
|
20
|
+
|
|
21
|
+
- A v1.2 state file loads cleanly: legacy `hopCount` fields are tolerated and stripped during migration.
|
|
22
|
+
|
|
23
|
+
### Removed
|
|
24
|
+
|
|
25
|
+
- Conversation hop accounting and `EMBASSY_MAX_HOPS`; caller identity, conversation membership, route policy, deadlines, rate limits, and bounded queues remain the delivery safeguards.
|
|
26
|
+
- The live dashboard's one-use fragment token, cookie/session exchange, random instance path, and bootstrap file.
|
|
27
|
+
- The operator compatibility workflow: `EMBASSY_COMPAT_POLICY`, tiered same-major admission, persisted certification evidence, `compat-check`, `compat-certify`, `--with-turn`, and the related LaunchAgent recipes. Compatibility is now automatic and exact-pinned at provider startup, with a fresh monitor-only check for each replacement Codex endpoint generation before writes can activate.
|
|
28
|
+
|
|
29
|
+
### Security
|
|
30
|
+
|
|
31
|
+
- The live dashboard now states its simpler trust boundary directly: it has no local-process or UID authentication and assumes a trusted single-user machine. Exact Host checks remain on every request; exact Origin plus `X-Embassy-Request` remain mandatory on every POST; `OPTIONS` and CORS remain disabled. These request guards constrain browser origins, not local software that can reach or spoof loopback.
|
|
32
|
+
|
|
9
33
|
## [1.2.0] - 2026-08-10
|
|
10
34
|
|
|
11
35
|
Deliverability over everything: a message you send arrives, or tells you loudly why it could not.
|
package/CONTRIBUTING.md
CHANGED
|
@@ -92,13 +92,17 @@ native. Do not route around a hold or refusal or fabricate a successful receipt.
|
|
|
92
92
|
`embassy serve` may use one private same-user control UDS and publish two inert,
|
|
93
93
|
metadata-only static dashboard files. It must not listen on TCP or HTTP. The
|
|
94
94
|
only reviewed exception is the separately invoked foreground
|
|
95
|
-
`embassy dashboard --live` companion, which binds
|
|
96
|
-
port
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
95
|
+
`embassy dashboard --live` companion, which binds exact IPv4 loopback on stable
|
|
96
|
+
port `41961` by default or the validated per-invocation `--port <n>`. It has no
|
|
97
|
+
local-process or UID authentication and therefore assumes a trusted
|
|
98
|
+
single-user machine; exact Host on every request and exact Origin plus
|
|
99
|
+
`X-Embassy-Request` on every POST constrain browser origins, not local
|
|
100
|
+
software. Preserve the direct root URL, multi-window/browser access, collision
|
|
101
|
+
failure with no fallback port, no CORS/`OPTIONS`, and only the reviewed pair,
|
|
102
|
+
unpair, refresh-discovery, and stale-registration-removal mutations—never a
|
|
103
|
+
provider or generic control method. Do not add a wildcard/remote listener,
|
|
104
|
+
external assets, service workers, telemetry, or additional mutation endpoints.
|
|
105
|
+
Keep the public v1 launcher foreground, macOS-only, and local-host-only.
|
|
102
106
|
|
|
103
107
|
## Live validation
|
|
104
108
|
|
|
@@ -120,3 +124,17 @@ macOS caps socket paths at ~104 bytes — keep `TMPDIR` short (CI pins
|
|
|
120
124
|
`TMPDIR=/tmp`; do the same locally if the transport tests hang). On Linux,
|
|
121
125
|
the darwin-only lease and peer-generation tests skip explicitly (the host
|
|
122
126
|
lease spawns macOS's `/usr/bin/lockf`); macOS runs the full suite.
|
|
127
|
+
|
|
128
|
+
## Design honesty rules
|
|
129
|
+
|
|
130
|
+
These outlive any visual era and bind every surface — dashboards, CLI copy,
|
|
131
|
+
site, docs, in both languages:
|
|
132
|
+
|
|
133
|
+
- Progress is never green. Only a terminal success state may look like one.
|
|
134
|
+
- `delivered` means the write completed; `released` is not read; nothing may
|
|
135
|
+
imply a model consumed, understood, or acted on a message.
|
|
136
|
+
- Refusals are not failures: a fail-closed refusal renders as policy, not as
|
|
137
|
+
breakage.
|
|
138
|
+
- The brand accent is never a state color, and state colors are never
|
|
139
|
+
decoration.
|
|
140
|
+
- Every alert pairs its state with the exact next command, copyable.
|
package/README.md
CHANGED
|
@@ -34,6 +34,8 @@ Embassy is built for one person, one macOS account, and agents you already trust
|
|
|
34
34
|
|
|
35
35
|
The first command starts the managed daemon if it is not already running (`restart` and `stop` also exist); the second launches the ChatGPT desktop app pointed at it. `CODEX_APP_SERVER_USE_LOCAL_DAEMON` is not documented by OpenAI; it is observed to work with this Desktop build and may change. Run the daemon command from a normal terminal, never from inside an agent session: Codex tasks inherit the daemon's environment, so a daemon started inside a Claude Code session leaks that session's identity into every task and registration fails closed with `CALLER_IDENTITY_CONFLICT` — fix it from a normal terminal with `codex app-server daemon restart`. The Claude session you select as a destination needs [`crossSessionInbound`](docs/CONFIGURATION.md) enabled — that is Claude Code's own setting, configured in Claude Code, not in Embassy.
|
|
36
36
|
|
|
37
|
+
Provider compatibility needs no separate operator step. `embassy serve` automatically validates the release's exact Claude and Codex version pins and fails closed on unknown versions or required protocol shapes.
|
|
38
|
+
|
|
37
39
|
> **Known limitation:** Embassy can reach Codex tasks only while Desktop uses the managed standalone App Server. In that mode, tasks currently cannot connect to Desktop's built-in in-app browser (`@Browser` loads but does not attach). Switching Desktop back to its default private App Server restores the built-in browser immediately — but makes those tasks unreachable by Embassy. No other capability regressions have been identified, though this was not an exhaustive parity test.
|
|
38
40
|
|
|
39
41
|
### 1. Start Embassy
|
|
@@ -63,7 +65,7 @@ embassy register-codex --alias codex-reviewer@this-mac
|
|
|
63
65
|
|
|
64
66
|
You should see `"accepted":true`. The `codex-` prefix is required for Claude discovery. To retire the task later, run `unregister-codex`.
|
|
65
67
|
|
|
66
|
-
|
|
68
|
+
Managed App Server generation changes and `embassy serve` restarts both use exact-task reactivation. Each replacement starts monitor-only; only a fresh initialize plus `thread/loaded/list` result that finds the byte-identical task exactly once may re-anchor the alias, and writes stay fenced until that exact generation is activated. A normal broker restart therefore needs no manual registration. An incompatible endpoint or a missing or duplicate exact task leaves the route stale with `REOBSERVATION_REQUIRED`; once that task is observable, rerun `embassy register-codex --alias codex-reviewer@this-mac` from the exact task without unregistering first. Embassy never retargets by alias or replays an ambiguously written body.
|
|
67
69
|
|
|
68
70
|
### 3. Select a Claude destination
|
|
69
71
|
|
|
@@ -110,7 +112,7 @@ alias and begins with an `<embassy-reply-hint>` containing the full conversation
|
|
|
110
112
|
token, the recipient's exact alias, and the corresponding `embassy reply`
|
|
111
113
|
command. Use only that delivered full token and alias; never guess one from a
|
|
112
114
|
suffix or substitute the sender's alias. The CLI still rechecks the caller,
|
|
113
|
-
conversation membership, current route policy,
|
|
115
|
+
conversation membership, and current route policy, so the hint is
|
|
114
116
|
not a permission bypass.
|
|
115
117
|
|
|
116
118
|
The frame is a clear provenance marker, not a cryptographic signature or a
|
|
@@ -118,15 +120,20 @@ claim that the body is trustworthy. Embassy neutralizes nested occurrences of
|
|
|
118
120
|
its two reserved framing tags in the untrusted body before provider delivery;
|
|
119
121
|
arbitrary same-user code and all message text remain untrusted input.
|
|
120
122
|
|
|
121
|
-
`EMBASSY_MAX_HOPS` bounds each conversation against runaway reply loops. The initial send is hop 0 and each routed reply increments the count; the default `16` means a normal conversation never notices it. An attempt past the bound is rejected and recorded as `HOP_LIMIT_EXCEEDED`. Do not retry an exhausted conversation token; start a fresh conversation. The accepted range and other bounds are documented in [Configuration](docs/CONFIGURATION.md).
|
|
122
|
-
|
|
123
123
|
### See it live
|
|
124
124
|
|
|
125
|
-
`embassy dashboard --live` opens a five-tab streaming view in the browser
|
|
125
|
+
`embassy dashboard --live` opens a five-tab streaming view in the browser
|
|
126
|
+
(overview, deliveries, routes, activity, diagnostics) at
|
|
127
|
+
`http://127.0.0.1:41961/` by default. To choose another stable port for that
|
|
128
|
+
invocation, run `embassy dashboard --live --port <n>` with an integer from 1024
|
|
129
|
+
through 65535. Multiple windows and browsers can use the same URL while the
|
|
130
|
+
foreground companion runs. If the port is occupied, startup fails explicitly,
|
|
131
|
+
points to `--port`, and never falls back to another port. See
|
|
132
|
+
[Dashboard](docs/DASHBOARD.md) for details.
|
|
126
133
|
|
|
127
134
|
The live dashboard can also remove an orphaned Codex registration after an explicit confirmation, but only when the broker proves that the registration is stale and its owning endpoint generation is dead. A current, merely offline, or ambiguous generation is never removable through this recovery action.
|
|
128
135
|
|
|
129
|
-
The broker also publishes mode-0600 static snapshots as `gateway-dashboard.html` and `gateway-dashboard.zh-CN.html`.
|
|
136
|
+
The broker also publishes mode-0600 static snapshots as `gateway-dashboard.html` and `gateway-dashboard.zh-CN.html`. The live dashboard has no login, token, cookie, or per-browser session: it assumes a trusted single-user machine, and local software that can reach or spoof loopback can read it and invoke its bounded actions. The server still requires the exact Host header on every request and the exact Origin plus `X-Embassy-Request` on every POST; it sends no CORS headers and does not accept `OPTIONS`.
|
|
130
137
|
|
|
131
138
|
## How it works
|
|
132
139
|
|
|
@@ -137,7 +144,7 @@ The broker also publishes mode-0600 static snapshots as `gateway-dashboard.html`
|
|
|
137
144
|
│ │
|
|
138
145
|
▼ ▼
|
|
139
146
|
┌──────────────────── Embassy ─────────────────────────────┐
|
|
140
|
-
│ explicit routes │
|
|
147
|
+
│ explicit routes │ Codex busy queue │ receipts │ dashboard │
|
|
141
148
|
└───────────────────────────────────────────────────────────┘
|
|
142
149
|
```
|
|
143
150
|
|
|
@@ -145,7 +152,7 @@ Embassy publishes each registered Codex task into Claude Code's live-session reg
|
|
|
145
152
|
|
|
146
153
|
A pair is one explicit permission edge between one Claude session and one Codex task — and pairs are many-to-many: one Claude session may hold edges to several Codex tasks, and one Codex task to several Claude sessions (bounded at 128 pairs by default). Every edge is created explicitly, with `pair` or the one-task `select-claude` shorthand; nothing is ever implied. Without an edge, a sender settles terminally as `SENDER_NOT_PAIRED`. `embassy serve --inbound open` is the explicit opt-out that restores any-session inbound.
|
|
147
154
|
|
|
148
|
-
|
|
155
|
+
Delivery timing is directional. Once routing and pre-write checks pass, every Claude-bound body is written immediately to Claude's native mailbox regardless of its observed busy or idle state. `transport_written` records that mailbox write and is the Claude-bound terminal `delivered` boundary; it does not mean Claude read or consumed the body. Codex-bound ordinary bodies instead queue while the task is busy and start a turn when it goes idle. In the Claude-to-Codex direction only, a body with an exact leading `STEER:` prefix may enter the active turn at the App Server's next tool-call boundary; if that boundary is unavailable, the message returns to the normal queue.
|
|
149
156
|
|
|
150
157
|
Immediately before the provider write, Embassy gives every routed body one
|
|
151
158
|
broker-owned cross-session marker containing the verified sender alias and a
|
|
@@ -153,7 +160,7 @@ recipient reply hint. The full conversation token travels only in the
|
|
|
153
160
|
initiator's accepted result and the recipient's transient message payload; it
|
|
154
161
|
never enters the dashboard, public snapshot, journal, receipt, or log.
|
|
155
162
|
|
|
156
|
-
Every settled message produces a receipt. `delivered` means terminal provider
|
|
163
|
+
Every settled message produces a receipt. `delivered` means the direction's terminal provider boundary was observed — toward Codex, the App Server accepted the turn; toward Claude, the native mailbox write completed. Neither means the model read or acted on it. `unconfirmed` and `ambiguous` mean the required evidence is missing; they are terminal states and never auto-retried. See [Delivery](docs/DELIVERY.md) for the full semantics.
|
|
157
164
|
|
|
158
165
|
## The vocabulary
|
|
159
166
|
|
|
@@ -184,7 +191,7 @@ Codex tasks can then be prompted with `$embassy-peer`; Claude Code discovers it
|
|
|
184
191
|
| `serve` | operator | Start the foreground broker and dashboard |
|
|
185
192
|
| `health` / `status` | operator | Check liveness and inspect the sanitized snapshot |
|
|
186
193
|
| `refresh-dashboard` | operator | Regenerate both static dashboard files |
|
|
187
|
-
| `dashboard --live [--lang en\|zh-CN]` | operator | Start the live dashboard companion with bounded route-consent actions; requires a running `embassy serve` |
|
|
194
|
+
| `dashboard --live [--lang en\|zh-CN] [--port <n>]` | operator | Start the live dashboard companion with bounded route-consent actions; requires a running `embassy serve` |
|
|
188
195
|
| `delivery-status` | either provider | Read one delivery tracker with `embassy delivery-status --token dlv_<token>` |
|
|
189
196
|
| `wait-delivery` | either provider | Wait for that tracker to settle, up to the delivery deadline |
|
|
190
197
|
| `register-codex` / `unregister-codex` | Codex task | Advertise or retire that exact task; for example, `embassy register-codex --alias codex-successor@this-mac --succeeds codex-reviewer@this-mac` hands the registration to a different task |
|
|
@@ -196,8 +203,9 @@ Codex tasks can then be prompted with `$embassy-peer`; Claude Code discovers it
|
|
|
196
203
|
|
|
197
204
|
## Safety in one minute
|
|
198
205
|
|
|
199
|
-
- **Local
|
|
206
|
+
- **Local broker, stable loopback dashboard.** `embassy serve` listens on private Unix-domain sockets and makes no provider API call. The opt-in `embassy dashboard --live` companion is a separate process and the only listener Embassy can create, bound to exact `127.0.0.1` on stable port `41961` by default (or the per-invocation `--port <n>`). It is deliberately unauthenticated local HTTP for a trusted single-user machine; Host, Origin, and sentinel checks constrain browser-origin requests but do not authenticate local processes or OS users.
|
|
200
207
|
- **Same-UID containment, not authentication.** Caller identity is inherited from the local process environment. Route ownership and generation checks reduce mistakes, but are not a defense against code already running as your OS user.
|
|
208
|
+
- **Compatibility is automatic and exact-pinned.** Broker/provider startup validates only the release's reviewed versions and protocol shapes. Every replacement App Server endpoint generation gets a fresh monitor-only check before route re-anchoring; unknown versions and malformed generations stay write-disabled.
|
|
201
209
|
- **Native permissions stay native.** Embassy sends no Codex approval or sandbox overrides and answers no approval request. `crossSessionInbound` remains Claude's own control; Embassy cannot override it.
|
|
202
210
|
- **Provenance is marked, not authenticated.** Routed bodies carry one broker-owned cross-session marker with the verified sender alias; it distinguishes the transport path for the receiving model but cannot make untrusted text safe or authenticate against code already running as your OS user.
|
|
203
211
|
- **Bodies stored, bounded, and yours.** Message bodies persist in the broker's private mode-0600 state under bounded retention so the ledger can show you the mail itself; queued mail survives a broker restart and re-sends exactly once. Raw provider frames stay memory-only. The static dashboard files remain metadata-only; the live dashboard shows retained bodies.
|
|
@@ -206,7 +214,7 @@ See [SECURITY.md](SECURITY.md) for the full boundary and vulnerability-reporting
|
|
|
206
214
|
|
|
207
215
|
## What Embassy is not
|
|
208
216
|
|
|
209
|
-
- **Not an orchestrator.** It does not spawn agents or manage their work.
|
|
217
|
+
- **Not an orchestrator.** It does not spawn agents or manage their work. Codex-bound ordinary messages start one turn apiece as the task becomes idle; Claude-bound messages enter Claude's mailbox without waiting for idle.
|
|
210
218
|
- **Not a hosted service.** Personal, same-machine, same-OS-account software.
|
|
211
219
|
- **Not a permission bypass — but it is a new path.** Neither agent gains a tool it did not already have, and Embassy grants, relaxes, and answers nothing. It does, however, connect two products that previously could not exchange text at all. That path is the product; treat it with the respect you would give any new input channel.
|
|
212
220
|
- **Not official.** Not affiliated with or endorsed by Anthropic or OpenAI.
|
package/README.zh-CN.md
CHANGED
|
@@ -34,6 +34,8 @@ Embassy 专为单人、单一 macOS 账户以及你已信任以该用户身份
|
|
|
34
34
|
|
|
35
35
|
第一条命令在托管守护进程未运行时启动它(也提供 `restart` 与 `stop` 子命令);第二条以指向该守护进程的方式启动 ChatGPT 桌面应用。`CODEX_APP_SERVER_USE_LOCAL_DAEMON` 未见于 OpenAI 文档;它经验证适用于当前 Desktop 构建,未来可能变化。请在普通终端中运行守护进程命令,切勿在代理会话内运行:Codex 任务会继承守护进程的环境,因此在 Claude Code 会话内启动的守护进程会把该会话的身份泄漏到每个任务中,注册将以 `CALLER_IDENTITY_CONFLICT` 关闭失败——请在普通终端执行 `codex app-server daemon restart` 修复。你选择作为目的地的 Claude 会话需要启用 [`crossSessionInbound`](docs/CONFIGURATION.zh-CN.md)——这是 Claude Code 自身的设置,在 Claude Code 中配置,而非在 Embassy 中。
|
|
36
36
|
|
|
37
|
+
提供方兼容性无需操作员执行额外步骤。`embassy serve` 会自动验证本发布版精确固定的 Claude 与 Codex 版本,并在遇到未知版本或必需协议结构时关闭失败。
|
|
38
|
+
|
|
37
39
|
> **已知限制:** 仅当 Desktop 使用托管独立 App Server 时,Embassy 才能访问 Codex 任务。在该模式下,任务目前无法连接 Desktop 内置的应用内浏览器(`@Browser` 可加载但无法附着)。将 Desktop 切换回其默认的私有 App Server 会立即恢复内置浏览器——但会使这些任务对 Embassy 不可达。目前未发现其他能力回退,但这并非穷尽的能力对比测试。
|
|
38
40
|
|
|
39
41
|
### 1. 启动 Embassy
|
|
@@ -63,7 +65,7 @@ embassy register-codex --alias codex-reviewer@this-mac
|
|
|
63
65
|
|
|
64
66
|
你应看到 `"accepted":true`。`codex-` 前缀是 Claude 发现所必需的。之后若要注销该任务,运行 `unregister-codex`。
|
|
65
67
|
|
|
66
|
-
|
|
68
|
+
托管 App Server 端点代际变更与 `embassy serve` 重启都会使用精确任务重新激活。每个替代端点都从仅监控状态开始;只有重新初始化并通过 `thread/loaded/list` 恰好一次找到字节级一致的原任务时,才能重新锚定别名,而且在激活这个精确代际前写入始终保持封锁。因此,正常的代理重启不需要手动重新注册。端点不兼容,或精确任务缺失、重复,都会使路由以 `REOBSERVATION_REQUIRED` 保持陈旧;该任务恢复可观察后,请从精确任务内再次运行 `embassy register-codex --alias codex-reviewer@this-mac`,且不要先注销。Embassy 绝不会按别名改投其他任务,也不会重放写入结果不明确的正文。
|
|
67
69
|
|
|
68
70
|
### 3. 选择 Claude 目的地
|
|
69
71
|
|
|
@@ -102,17 +104,15 @@ Please expand on the migration risk.
|
|
|
102
104
|
MSG
|
|
103
105
|
```
|
|
104
106
|
|
|
105
|
-
Embassy 会在实际写入提供方之前,为双向路由消息添加一个由代理控制的 `<cross-session-message>` 来源封装。封装标出已经验证的发送方别名,其首个 `<embassy-reply-hint>` 元素包含完整对话令牌、接收方自己的精确别名和可直接使用的 `embassy reply` 命令。朝向 Codex 时,外层标记本身还带有 `conversation="conv_..."`;朝向 Claude 时,为符合 Claude Code
|
|
106
|
-
|
|
107
|
-
`EMBASSY_MAX_HOPS` 限制每个对话的跳数,用于阻止失控的回复循环。初始发送为第 0 跳,此后每次路由回复都会递增;默认值 `16` 意味着正常对话不会触及它。超过上限的尝试会被拒绝,并记录为 `HOP_LIMIT_EXCEEDED`。不要重试已耗尽的对话令牌;请开始新对话。可接受范围及其他边界详见[配置](docs/CONFIGURATION.zh-CN.md)。
|
|
107
|
+
Embassy 会在实际写入提供方之前,为双向路由消息添加一个由代理控制的 `<cross-session-message>` 来源封装。封装标出已经验证的发送方别名,其首个 `<embassy-reply-hint>` 元素包含完整对话令牌、接收方自己的精确别名和可直接使用的 `embassy reply` 命令。朝向 Codex 时,外层标记本身还带有 `conversation="conv_..."`;朝向 Claude 时,为符合 Claude Code 的规范解析格式,完整令牌和回复提示位于封装正文中,而不作为外层属性。请使用收到的完整令牌,切勿猜测或重构它。令牌本身不授予路由权限:每次回复仍会重新检查调用方身份、对话参与关系和实时路由。
|
|
108
108
|
|
|
109
109
|
### 实时查看
|
|
110
110
|
|
|
111
|
-
`embassy dashboard --live`
|
|
111
|
+
`embassy dashboard --live` 在浏览器中打开一个五选项卡流式视图(总览、投递、路由、活动、诊断),默认地址为 `http://127.0.0.1:41961/`。如需为本次启动选择另一个稳定端口,请运行 `embassy dashboard --live --port <n>`,其中整数范围为 1024 到 65535。当前台组件运行时,多个窗口和浏览器可以使用同一个 URL;若端口已被占用,启动会明确失败并提示使用 `--port`,不会回退到其他端口。详见[仪表盘](docs/DASHBOARD.zh-CN.md)。
|
|
112
112
|
|
|
113
113
|
实时仪表盘也可以在明确确认后移除孤立的 Codex 注册,但仅限代理已经证明该注册陈旧且其所属端点代际已失效的情况。当前、仅离线或代际状态不明确的注册绝不能通过此恢复操作移除。
|
|
114
114
|
|
|
115
|
-
代理还会以 mode 0600 发布静态快照 `gateway-dashboard.html` 与 `gateway-dashboard.zh-CN.html
|
|
115
|
+
代理还会以 mode 0600 发布静态快照 `gateway-dashboard.html` 与 `gateway-dashboard.zh-CN.html`。实时仪表盘没有登录、令牌、Cookie 或逐浏览器会话:它假定这是一台可信的单用户机器;能够访问或伪造 loopback 的本地软件可以读取仪表盘并调用其有限操作。服务器仍会对每个请求要求精确的 Host 头,并对每个 POST 要求精确的 Origin 与 `X-Embassy-Request`;它不发送 CORS 头,也不接受 `OPTIONS`。
|
|
116
116
|
|
|
117
117
|
## 工作原理
|
|
118
118
|
|
|
@@ -123,7 +123,7 @@ Embassy 会在实际写入提供方之前,为双向路由消息添加一个由
|
|
|
123
123
|
│ │
|
|
124
124
|
▼ ▼
|
|
125
125
|
┌──────────────────── Embassy ─────────────────────────────┐
|
|
126
|
-
│ 显式路由 │ 忙碌排队 │ 回执 │ 仪表盘
|
|
126
|
+
│ 显式路由 │ Codex 忙碌排队 │ 回执 │ 仪表盘 │
|
|
127
127
|
└───────────────────────────────────────────────────────────┘
|
|
128
128
|
```
|
|
129
129
|
|
|
@@ -131,11 +131,11 @@ Embassy 将每个已注册的 Codex 任务以各自的 `codex-*` 对等方身份
|
|
|
131
131
|
|
|
132
132
|
配对是一个 Claude 会话与一个 Codex 任务之间的单一显式权限边,而配对关系是多对多的:一个 Claude 会话可以与多个 Codex 任务建立边,一个 Codex 任务也可以与多个 Claude 会话建立边(默认上限 128 个配对)。每条边都通过 `pair` 或单任务简写 `select-claude` 显式创建;一切都不会被隐式推断。没有边时,发送方以 `SENDER_NOT_PAIRED` 终局结算。`embassy serve --inbound open` 是显式的退出选项,可恢复任意会话入站。
|
|
133
133
|
|
|
134
|
-
|
|
134
|
+
投递时机因方向而异。通过路由与写前检查后,所有朝向 Claude 的正文都会立即写入 Claude 的原生邮箱,无论观测到 Claude 正繁忙还是空闲。`transport_written` 记录这次邮箱写入,并且就是朝向 Claude 的终局 `delivered` 边界;它不表示 Claude 已读取或消费正文。朝向 Codex 的普通正文则在任务忙碌时排队,并在任务空闲后启动轮次。仅在 Claude→Codex 方向,正文以精确 `STEER:` 开头的消息可以在 App Server 的下一个工具调用边界进入当前轮次;若该边界不可用,消息会回到普通队列。
|
|
135
135
|
|
|
136
136
|
每条被路由的消息在接收方看到时都位于 Embassy 生成的跨会话来源封装中,其中包含已验证的发送方别名、完整 `conv_` 令牌和面向该接收方的回复提示。来源封装是模型可见的结构性提示,并非密码学身份认证;消息正文始终应被视为不可信输入。
|
|
137
137
|
|
|
138
|
-
每条已结算的消息都会产生回执。`delivered`
|
|
138
|
+
每条已结算的消息都会产生回执。`delivered` 表示观测到了该方向的终端提供方边界——朝向 Codex,意味着 App Server 接受了该轮次;朝向 Claude,意味着原生邮箱写入完成。两者都不意味着模型已读取或执行。`unconfirmed` 和 `ambiguous` 表示所需证据缺失;它们是终态,从不自动重试。完整语义详见[投递](docs/DELIVERY.zh-CN.md)。
|
|
139
139
|
|
|
140
140
|
## 核心术语
|
|
141
141
|
|
|
@@ -166,7 +166,7 @@ cp -R "$(npm root -g)/agent-embassy/skills/embassy-peer" ~/.claude/skills/
|
|
|
166
166
|
| `serve` | 操作员 | 启动前台代理和仪表盘 |
|
|
167
167
|
| `health` / `status` | 操作员 | 检查存活状态并查看脱敏快照 |
|
|
168
168
|
| `refresh-dashboard` | 操作员 | 重新生成两个静态仪表盘文件 |
|
|
169
|
-
| `dashboard --live [--lang en\|zh-CN]` | 操作员 | 启动带有限路由同意操作的实时仪表盘组件;需要 `embassy serve` 正在运行 |
|
|
169
|
+
| `dashboard --live [--lang en\|zh-CN] [--port <n>]` | 操作员 | 启动带有限路由同意操作的实时仪表盘组件;需要 `embassy serve` 正在运行 |
|
|
170
170
|
| `delivery-status` | 任一提供方 | 使用 `embassy delivery-status --token dlv_<token>` 读取单条投递跟踪器 |
|
|
171
171
|
| `wait-delivery` | 任一提供方 | 等待该跟踪器结算,直至投递截止时间 |
|
|
172
172
|
| `register-codex` / `unregister-codex` | Codex 任务 | 通告或注销该任务;例如,`embassy register-codex --alias codex-successor@this-mac --succeeds codex-reviewer@this-mac` 会将注册转交给另一个任务 |
|
|
@@ -174,12 +174,13 @@ cp -R "$(npm root -g)/agent-embassy/skills/embassy-peer" ~/.claude/skills/
|
|
|
174
174
|
| `select-claude` / `unselect-claude` | 操作员 | `pair`/`unpair` 的单任务简写:仅在 Codex 端无歧义(继承标识或唯一已注册任务)时解析,否则以关闭状态失败 |
|
|
175
175
|
| `send-to-claude` | 已注册的 Codex 任务 | 向已配对的 Claude 会话发送一条有界消息 |
|
|
176
176
|
| `send-to-codex` | Claude 会话 | 使用继承的原生回复标识发送一条有界消息 |
|
|
177
|
-
| `reply` | 对话令牌持有方 |
|
|
177
|
+
| `reply` | 对话令牌持有方 | 使用初始发送时返回或随入站来源提示收到的完整令牌继续一个活跃对话;调用方、对话参与关系和路由会重新检查 |
|
|
178
178
|
|
|
179
179
|
## 一分钟了解安全性
|
|
180
180
|
|
|
181
|
-
-
|
|
181
|
+
- **本地代理,稳定的 loopback 仪表盘。** `embassy serve` 仅监听私有 Unix 域套接字,不发起任何提供商 API 调用。可选启用的 `embassy dashboard --live` 组件是一个独立进程,也是 Embassy 能创建的唯一监听器;它精确绑定 `127.0.0.1`,默认使用稳定端口 `41961`(也可为本次启动传入 `--port <n>`)。它是在可信单用户机器上有意不设身份认证的本地 HTTP;Host、Origin 与哨兵检查约束浏览器来源的请求,但不认证本地进程或 OS 用户。
|
|
182
182
|
- **同 UID 隔离,而非身份认证。** 调用者身份继承自本地进程环境。路由所有权和生成号检查能减少误操作,但不是对已以你的 OS 用户身份运行的代码的防御。
|
|
183
|
+
- **兼容性检查自动执行并精确固定版本。** 代理/提供方启动只验证本发布版已审查的版本和协议结构。每个替代 App Server 端点代际都必须先通过新的仅监控检查才能重新锚定路由;未知版本与结构异常的代际保持禁止写入。
|
|
183
184
|
- **来源标记是提示,不是签名。** Embassy 在提供方写入边界生成跨会话来源封装,让接收模型能够区分代理路由消息及其已验证发送方别名;这不是密码学证明,也不会把不可信正文变成可信指令。
|
|
184
185
|
- **原生权限保持原生。** Embassy 不发送任何 Codex 审批或沙盒覆盖,也不应答任何审批请求。`crossSessionInbound` 仍是 Claude 自身的控制机制;Embassy 无法覆盖它。
|
|
185
186
|
- **消息体有界保存,属于你。** 消息体以有界保留策略持久化在 broker 的私有 mode-0600 状态中,让台账能够展示邮件本身;排队中的邮件在 broker 重启后幸存并恰好重发一次。原始提供方帧仍仅存于内存。静态仪表盘文件保持仅元数据;实时仪表盘展示保留的正文。
|
|
@@ -188,7 +189,7 @@ cp -R "$(npm root -g)/agent-embassy/skills/embassy-peer" ~/.claude/skills/
|
|
|
188
189
|
|
|
189
190
|
## Embassy 不是什么
|
|
190
191
|
|
|
191
|
-
- **不是编排器。**
|
|
192
|
+
- **不是编排器。** 它不生成代理,也不管理它们的工作。朝向 Codex 的普通消息会在任务空闲时逐条启动轮次;朝向 Claude 的消息无需等待空闲,直接进入 Claude 的邮箱。
|
|
192
193
|
- **不是托管服务。** 面向个人的、同机同账户软件。
|
|
193
194
|
- **不是权限绕过——但它是一条新路径。** 两个代理都不会获得它原本没有的工具,Embassy 也不授予、放宽或应答任何权限。然而,它确实连接了两个此前无法交换文本的产品。这条路径就是产品本身;请以对待任何新输入通道应有的审慎来看待它。
|
|
194
195
|
- **不是官方产品。** 与 Anthropic 或 OpenAI 没有任何关联或背书关系。
|
package/SECURITY.md
CHANGED
|
@@ -72,11 +72,17 @@ against other processes running as the same OS user.
|
|
|
72
72
|
path; with an approval-requiring policy, the turn may wait for the user.
|
|
73
73
|
- Claude's native `crossSessionInbound` setting controls messages entering a
|
|
74
74
|
Claude session. Embassy cannot override an accept, hold, or refuse decision.
|
|
75
|
+
- Delivery scheduling is asymmetric. After routing and pre-write validation,
|
|
76
|
+
Claude-bound bodies are written immediately to Claude's native mailbox
|
|
77
|
+
regardless of an observed busy or idle state; `transport_written` proves the
|
|
78
|
+
mailbox write and settles that direction as `delivered`, not read or
|
|
79
|
+
consumed. Codex-bound ordinary bodies remain idle-gated, and only the exact
|
|
80
|
+
`STEER:` path below can use the active turn's next tool-call boundary.
|
|
75
81
|
- A CLI initiator receives the full conversation token in the accepted control
|
|
76
82
|
result, and every routed recipient receives it in the broker-owned first
|
|
77
83
|
`embassy-reply-hint`. The token is a transient participant-scoped locator,
|
|
78
84
|
not sufficient authority: `reply` rechecks inherited caller identity,
|
|
79
|
-
conversation membership, current routing policy
|
|
85
|
+
conversation membership, and current routing policy.
|
|
80
86
|
|
|
81
87
|
Every routed message is untrusted input capable of steering the receiving
|
|
82
88
|
agent. Registration and routing control reachability; the provenance marker
|
|
@@ -101,8 +107,12 @@ broker.
|
|
|
101
107
|
only listeners are private Unix-domain sockets. The opt-in
|
|
102
108
|
`embassy dashboard --live` companion is a separate process with its own
|
|
103
109
|
loopback HTTP listener — see "Live companion boundary" below.
|
|
104
|
-
- Provider protocols are version-pinned.
|
|
105
|
-
|
|
110
|
+
- Provider protocols are exact-version-pinned. Provider startup automatically
|
|
111
|
+
validates the release's reviewed Claude launcher/runtime, Claude peer-version
|
|
112
|
+
inventory and protocol, and Codex App Server version. Unknown versions or
|
|
113
|
+
required schemas fail closed. Every replacement Codex endpoint generation
|
|
114
|
+
starts monitor-only and remains write-fenced until its fresh initialize and
|
|
115
|
+
exact-task listing checks pass and the controller activates it.
|
|
106
116
|
- Embassy publishes at most one visibly prefixed, process-owned `codex-*`
|
|
107
117
|
record in Claude's registry. It creates one callback socket and removes only
|
|
108
118
|
exact-owned artifacts whose generation still matches during graceful
|
|
@@ -121,7 +131,7 @@ broker.
|
|
|
121
131
|
solely for `thread/resume.excludeTurns: true`. It adds no general
|
|
122
132
|
experimental method or authority. Missing, malformed, or nonempty returned
|
|
123
133
|
turns fail closed and are never retained.
|
|
124
|
-
- Queues, frames, bodies, callbacks, deadlines,
|
|
134
|
+
- Queues, frames, bodies, callbacks, deadlines, deduplication,
|
|
125
135
|
rate limits, and transient conversations are bounded. Ambiguous writes are
|
|
126
136
|
never retried automatically.
|
|
127
137
|
- Raw-body classification and accounting happen before framing. In the
|
|
@@ -149,12 +159,9 @@ kernel lock.
|
|
|
149
159
|
|
|
150
160
|
Embassy's provider-facing access is intentionally enumerable:
|
|
151
161
|
|
|
152
|
-
- read and execute the configured Claude launcher only for bounded
|
|
153
|
-
|
|
162
|
+
- read and execute the configured Claude launcher only for bounded automatic
|
|
163
|
+
exact-version validation;
|
|
154
164
|
- read the live Claude session registry and connect validated peer sockets;
|
|
155
|
-
- for an explicit `compat-certify`, start one bounded no-stdin Claude print
|
|
156
|
-
session in a scrubbed environment, route one marked diagnostic frame only to
|
|
157
|
-
that scratch session, and terminate it after the receipt deadline;
|
|
158
165
|
- create and later remove its one callback socket and one registry record;
|
|
159
166
|
- resolve the managed Codex installation and attach to the already-running
|
|
160
167
|
local App Server; and
|
|
@@ -200,32 +207,39 @@ user can read them.
|
|
|
200
207
|
|
|
201
208
|
### Live companion boundary
|
|
202
209
|
|
|
203
|
-
`embassy dashboard --live` binds
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
210
|
+
`embassy dashboard --live` binds exact `127.0.0.1` on one stable port: `41961`
|
|
211
|
+
by default, or the integer from the per-invocation `--port <n>` option (1024
|
|
212
|
+
through 65535). It is a separate foreground process from `embassy serve` and
|
|
213
|
+
serves the direct root URL `http://127.0.0.1:<port>/`. Multiple windows and
|
|
214
|
+
browsers may use that URL while the companion runs. If the port is occupied,
|
|
215
|
+
startup fails with `LIVE_DASHBOARD_PORT_IN_USE`, points to `--port`, and never
|
|
216
|
+
falls back to another port.
|
|
217
|
+
|
|
218
|
+
The live companion has no login, capability token, URL fragment, cookie,
|
|
219
|
+
browser session, random instance path, or bootstrap file. Its intended posture
|
|
220
|
+
is one operator and software already trusted under that operator's macOS UID.
|
|
221
|
+
The HTTP listener deliberately does not authenticate processes or OS users,
|
|
222
|
+
so this is a trusted single-user-machine assumption, not a same-UID
|
|
223
|
+
enforcement mechanism: any local software that can reach or spoof loopback can
|
|
224
|
+
read retained message bodies from the live view and invoke its bounded actions.
|
|
225
|
+
|
|
226
|
+
The exact Host header is checked on every request. Navigation GETs may omit
|
|
227
|
+
Origin; every POST requires the exact Origin plus
|
|
228
|
+
`X-Embassy-Request: 1`. `OPTIONS` is rejected and no CORS headers are sent.
|
|
229
|
+
Those checks block ambient cross-origin browser requests but do not authenticate
|
|
230
|
+
local software. There are no generic control or provider routes, telemetry, or
|
|
231
|
+
external assets. The sole mutation route accepts only exact pair, unpair,
|
|
232
|
+
refresh-discovery, and broker-guarded stale-Codex-registration-removal JSON
|
|
212
233
|
bodies, capped at 1 KiB and six confirmed actions per minute. The browser
|
|
213
|
-
cannot
|
|
214
|
-
invoke arbitrary broker/provider methods.
|
|
215
|
-
running as your OS user — including root and browser extensions with local
|
|
216
|
-
filesystem access — can read what the browser can read.
|
|
234
|
+
cannot create a registration, live-unregister a task, send, reply, approve,
|
|
235
|
+
interrupt, change settings, or invoke arbitrary broker/provider methods.
|
|
217
236
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
which a remote origin, a cross-site request, or a process running as a
|
|
225
|
-
different OS user can read the authenticated stream or bypass the token-to-cookie
|
|
226
|
-
exchange. Same-UID local reads are within the documented containment model and
|
|
227
|
-
are not treated as vulnerabilities unless they bypass an explicit control such
|
|
228
|
-
as accessing a session without presenting the cookie.
|
|
237
|
+
Reports involving the live companion are in scope if they demonstrate a
|
|
238
|
+
non-loopback bind, a bypass of the documented Host/Origin/sentinel action
|
|
239
|
+
guards from a browser origin, or authority beyond the four allowlisted
|
|
240
|
+
actions. Access by local software or another local UID is within the documented
|
|
241
|
+
trusted-machine model and is not itself treated as an authentication bypass,
|
|
242
|
+
because this surface intentionally has no such authentication boundary.
|
|
229
243
|
|
|
230
244
|
|
|
231
245
|
## Validation boundary
|
|
@@ -233,14 +247,14 @@ as accessing a session without presenting the cookie.
|
|
|
233
247
|
Routine tests use temporary directories, fake peers, and fake App Server
|
|
234
248
|
transports. They do not inspect live provider state or contact a model.
|
|
235
249
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
250
|
+
Compatibility admission is automatic and exact-pinned. Broker/provider startup
|
|
251
|
+
owns the bounded read-only validation of the configured installations, exact
|
|
252
|
+
versions, protocol constants, and required schemas; an unknown same-major build
|
|
253
|
+
is not admitted. These checks do not route a user message or start a model
|
|
254
|
+
turn. A replacement Codex endpoint generation receives its own fresh
|
|
255
|
+
monitor-only initialize and exact-task listing check, while the write gate
|
|
256
|
+
stays closed until controller activation. Runtime record, frame, response,
|
|
257
|
+
identity, generation, and deadline checks remain mandatory after admission.
|
|
244
258
|
|
|
245
259
|
Passive live discovery, a live provider connection, a native message, and an
|
|
246
260
|
App Server turn are distinct authorization gates. Each requires an explicit
|
|
@@ -163,7 +163,6 @@ export class ClaudeNativeHelperSupervisor {
|
|
|
163
163
|
}
|
|
164
164
|
if (input.authorization === "selected_route") {
|
|
165
165
|
if (input.selectedAlias === undefined ||
|
|
166
|
-
input.selectedAlias !== input.targetAlias ||
|
|
167
166
|
input.stateRoot === undefined) {
|
|
168
167
|
return { state: "failed", safeErrorCode: "CLAUDE_ROUTE_UNAVAILABLE" };
|
|
169
168
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-helper-supervisor.js","sourceRoot":"","sources":["../../../src/gateway/claude-helper-supervisor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,EACL,wBAAwB,GAGzB,MAAM,2BAA2B,CAAC;AAmDnC,MAAM,wBAAwB,GAAG,IAAI,GAAG,CAAC;IACvC,UAAU;IACV,aAAa;IACb,QAAQ;IACR,SAAS;IACT,WAAW;IACX,WAAW;IACX,QAAQ;IACR,WAAW;CACZ,CAAC,CAAC;AACH,MAAM,YAAY,GAChB,+DAA+D,CAAC;AAClE,MAAM,eAAe,GAAG,6BAA6B,CAAC;AACtD,MAAM,kBAAkB,GAAG,EAAE,GAAG,IAAI,CAAC;AAErC,SAAS,KAAK,CAAC,IAAY,EAAE,WAAW,GAAG,KAAK;IAC9C,OAAO,IAAI,WAAW,CACpB,IAAI,EACJ,sFAAsF,EACtF,WAAW,CACZ,CAAC;AACJ,CAAC;AAED,SAAS,EAAE,CAAC,MAAgC;IAC1C,IAAI,CAAC,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,MAAM,CAAC,EAAE,KAAK,IAAI,EAAE,CAAC;QAC5C,MAAM,KAAK,CAAC,uCAAuC,CAAC,CAAC;IACvD,CAAC;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AAE,CAAC;YAC3C,MAAM,KAAK,CAAC,2CAA2C,CAAC,CAAC;QAC3D,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,eAAe,CAAC,aAAqB;QACnC,MAAM,KAAK,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QACrD,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YAChD,MAAM,KAAK,CAAC,6BAA6B,CAAC,CAAC;QAC7C,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,WAAW;QACT,IAAI,IAAI,CAAC,OAAO;YAAE,MAAM,KAAK,CAAC,wCAAwC,CAAC,CAAC;IAC1E,CAAC;CACF"}
|
|
1
|
+
{"version":3,"file":"claude-helper-supervisor.js","sourceRoot":"","sources":["../../../src/gateway/claude-helper-supervisor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,EACL,wBAAwB,GAGzB,MAAM,2BAA2B,CAAC;AAmDnC,MAAM,wBAAwB,GAAG,IAAI,GAAG,CAAC;IACvC,UAAU;IACV,aAAa;IACb,QAAQ;IACR,SAAS;IACT,WAAW;IACX,WAAW;IACX,QAAQ;IACR,WAAW;CACZ,CAAC,CAAC;AACH,MAAM,YAAY,GAChB,+DAA+D,CAAC;AAClE,MAAM,eAAe,GAAG,6BAA6B,CAAC;AACtD,MAAM,kBAAkB,GAAG,EAAE,GAAG,IAAI,CAAC;AAErC,SAAS,KAAK,CAAC,IAAY,EAAE,WAAW,GAAG,KAAK;IAC9C,OAAO,IAAI,WAAW,CACpB,IAAI,EACJ,sFAAsF,EACtF,WAAW,CACZ,CAAC;AACJ,CAAC;AAED,SAAS,EAAE,CAAC,MAAgC;IAC1C,IAAI,CAAC,CAAC,IAAI,IAAI,MAAM,CAAC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C;QACzD,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YAC3C,MAAM,KAAK,CAAC,2CAA2C,CAAC,CAAC;QAC3D,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,eAAe,CAAC,aAAqB;QACnC,MAAM,KAAK,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QACrD,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YAChD,MAAM,KAAK,CAAC,6BAA6B,CAAC,CAAC;QAC7C,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,WAAW;QACT,IAAI,IAAI,CAAC,OAAO;YAAE,MAAM,KAAK,CAAC,wCAAwC,CAAC,CAAC;IAC1E,CAAC;CACF"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { type CompatibilityPolicy } from "./compatibility.js";
|
|
2
1
|
export type ClaudePeerRuntimeOptions = {
|
|
3
2
|
/** Trusted operator configuration; there is no PATH-based lookup. */
|
|
4
3
|
claudeExecutable: string;
|
|
5
4
|
versionTimeoutMs?: number;
|
|
6
|
-
compatibilityPolicy?: CompatibilityPolicy;
|
|
7
5
|
};
|
|
8
6
|
export type AttestedClaudePeerRuntime = {
|
|
9
7
|
claudeExecutable: string;
|