agent-embassy 1.6.1 → 1.7.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 +20 -0
- package/README.md +9 -9
- package/README.zh-CN.md +9 -9
- package/SECURITY.md +34 -77
- package/dist/src/gateway/acp-client.d.ts +117 -0
- package/dist/src/gateway/acp-client.js +382 -0
- package/dist/src/gateway/acp-client.js.map +1 -0
- package/dist/src/gateway/acp-provider.d.ts +65 -0
- package/dist/src/gateway/acp-provider.js +163 -0
- package/dist/src/gateway/acp-provider.js.map +1 -0
- package/dist/src/gateway/claude-helper-protocol.d.ts +3 -1
- package/dist/src/gateway/claude-helper-protocol.js +15 -5
- package/dist/src/gateway/claude-helper-protocol.js.map +1 -1
- package/dist/src/gateway/claude-helper-supervisor.d.ts +3 -1
- package/dist/src/gateway/claude-helper-supervisor.js +16 -2
- package/dist/src/gateway/claude-helper-supervisor.js.map +1 -1
- package/dist/src/gateway/claude-helper.js +4 -3
- package/dist/src/gateway/claude-helper.js.map +1 -1
- package/dist/src/gateway/claude-peer.d.ts +1 -1
- package/dist/src/gateway/claude-peer.js +11 -13
- package/dist/src/gateway/claude-peer.js.map +1 -1
- package/dist/src/gateway/claude-runtime.d.ts +0 -20
- package/dist/src/gateway/claude-runtime.js +6 -127
- package/dist/src/gateway/claude-runtime.js.map +1 -1
- package/dist/src/gateway/cli-copy.en.d.ts +1 -1
- package/dist/src/gateway/cli-copy.en.js +2 -2
- package/dist/src/gateway/cli-copy.zh-CN.d.ts +1 -1
- package/dist/src/gateway/cli-copy.zh-CN.js +2 -2
- package/dist/src/gateway/cli.d.ts +1 -1
- package/dist/src/gateway/cli.js +26 -5
- package/dist/src/gateway/cli.js.map +1 -1
- package/dist/src/gateway/codex-app-server.d.ts +5 -74
- package/dist/src/gateway/codex-app-server.js +9 -599
- package/dist/src/gateway/codex-app-server.js.map +1 -1
- package/dist/src/gateway/codex-local-transport.d.ts +8 -26
- package/dist/src/gateway/codex-local-transport.js +26 -76
- package/dist/src/gateway/codex-local-transport.js.map +1 -1
- package/dist/src/gateway/compatibility.d.ts +6 -66
- package/dist/src/gateway/compatibility.js +14 -296
- package/dist/src/gateway/compatibility.js.map +1 -1
- package/dist/src/gateway/config.d.ts +9 -0
- package/dist/src/gateway/config.js +6 -2
- package/dist/src/gateway/config.js.map +1 -1
- package/dist/src/gateway/control.d.ts +16 -1
- package/dist/src/gateway/control.js +89 -57
- 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 +14 -44
- package/dist/src/gateway/dashboard-copy.en.js +37 -67
- package/dist/src/gateway/dashboard-copy.en.js.map +1 -1
- package/dist/src/gateway/dashboard-copy.js +14 -44
- package/dist/src/gateway/dashboard-copy.js.map +1 -1
- package/dist/src/gateway/dashboard-copy.zh-CN.d.ts +14 -44
- package/dist/src/gateway/dashboard-copy.zh-CN.js +37 -67
- package/dist/src/gateway/dashboard-copy.zh-CN.js.map +1 -1
- package/dist/src/gateway/dashboard-model.d.ts +38 -76
- package/dist/src/gateway/dashboard-model.js +158 -256
- package/dist/src/gateway/dashboard-model.js.map +1 -1
- package/dist/src/gateway/dashboard.d.ts +0 -3
- package/dist/src/gateway/dashboard.js +75 -76
- package/dist/src/gateway/dashboard.js.map +1 -1
- package/dist/src/gateway/deepseek-detect.d.ts +7 -6
- package/dist/src/gateway/deepseek-detect.js +31 -115
- package/dist/src/gateway/deepseek-detect.js.map +1 -1
- package/dist/src/gateway/live-dashboard-app/app.js +166 -621
- package/dist/src/gateway/live-dashboard-command.js +2 -4
- package/dist/src/gateway/live-dashboard-command.js.map +1 -1
- package/dist/src/gateway/live-dashboard-http.d.ts +1 -2
- package/dist/src/gateway/live-dashboard-http.js +14 -15
- package/dist/src/gateway/live-dashboard-http.js.map +1 -1
- package/dist/src/gateway/progress-watch-machine.d.ts +1 -4
- package/dist/src/gateway/progress-watch-machine.js.map +1 -1
- package/dist/src/gateway/provenance-envelope.d.ts +3 -2
- package/dist/src/gateway/provenance-envelope.js +44 -11
- package/dist/src/gateway/provenance-envelope.js.map +1 -1
- package/dist/src/gateway/providers.d.ts +12 -85
- package/dist/src/gateway/providers.js +72 -835
- package/dist/src/gateway/providers.js.map +1 -1
- package/dist/src/gateway/server.d.ts +8 -9
- package/dist/src/gateway/server.js +51 -99
- package/dist/src/gateway/server.js.map +1 -1
- package/dist/src/gateway/service.d.ts +22 -49
- package/dist/src/gateway/service.js +196 -437
- package/dist/src/gateway/service.js.map +1 -1
- package/dist/src/gateway/store.d.ts +20 -29
- package/dist/src/gateway/store.js +281 -827
- package/dist/src/gateway/store.js.map +1 -1
- package/dist/src/gateway/types.d.ts +55 -55
- package/dist/src/gateway/types.js +49 -91
- package/dist/src/gateway/types.js.map +1 -1
- package/docs/CONFIGURATION.md +11 -10
- package/docs/CONFIGURATION.zh-CN.md +10 -9
- package/docs/DASHBOARD.md +4 -38
- package/docs/DASHBOARD.zh-CN.md +4 -2
- package/docs/GATEWAY-ARCHITECTURE.md +61 -119
- package/package.json +1 -1
- package/skills/embassy-peer/SKILL.md +6 -6
package/docs/CONFIGURATION.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Configuration and
|
|
1
|
+
# Configuration and provider contracts
|
|
2
2
|
|
|
3
3
|
Embassy is configured through environment variables read when each command
|
|
4
|
-
starts. This document collects every variable,
|
|
5
|
-
|
|
4
|
+
starts. This document collects every variable, provider transport contracts,
|
|
5
|
+
managed-launch resolution rules, and
|
|
6
6
|
the addressing model. There is no configuration file; all values are env vars
|
|
7
7
|
or CLI flags.
|
|
8
8
|
|
|
@@ -14,6 +14,7 @@ or CLI flags.
|
|
|
14
14
|
| --- | --- | --- |
|
|
15
15
|
| `EMBASSY_STATE_DIR` | `$XDG_STATE_HOME/agent-embassy`, or `$HOME/.local/state/agent-embassy` when `XDG_STATE_HOME` is unset | Private state, control socket, and dashboard; an override must be absolute and does not relocate the fixed host-wide lease |
|
|
16
16
|
| `EMBASSY_CLAUDE_BIN` | `$HOME/.local/bin/claude`, resolved to its current verified version target | Absolute Claude Code launcher path; `PATH` is not searched |
|
|
17
|
+
| `DSH_HOME` | `$HOME/.dsh` | DeepSeek Harness checkout root; when its owned directory and `package.json` are present, Embassy launches `pnpm --dir <home> run demo:acp` lazily on first dispatch |
|
|
17
18
|
| `EMBASSY_STEERING_ENABLED` | `1` | Global Claude-to-Codex `STEER:` kill switch; set exactly `0` to treat every Claude-to-Codex body as an ordinary Codex-bound queued message; Claude-bound mailbox timing is unchanged |
|
|
18
19
|
| `EMBASSY_DELIVERY_NOTICES` | `merged` | Claude sender notice policy: `merged` keeps stalls and folds terminal diagnostics into native status; `verbose` emits both; `quiet` emits no gateway user-frame notices |
|
|
19
20
|
| `EMBASSY_TRACKING_ENABLED` | `1` | Global progress-watch kill switch; set exactly `0` to reject `--track`, `--idle-minutes`, and `TRACK:` open attempts and to settle stored watches on restart. With no active watch, `DONE:` is inert and `untrack` is not specially rejected—it returns `NOT_FOUND`. Any value other than `1` or `0` is a configuration error |
|
|
@@ -79,19 +80,19 @@ the send reaches the Claude end. If registration and selection both succeeded
|
|
|
79
80
|
but your first `send-to-claude` does not arrive, check `crossSessionInbound` on
|
|
80
81
|
the destination session before suspecting the route.
|
|
81
82
|
|
|
82
|
-
##
|
|
83
|
+
## Provider and runtime contract
|
|
83
84
|
|
|
84
|
-
Embassy
|
|
85
|
+
Embassy routes four providers: Claude over peer protocol 1, Codex over the managed App Server, and DeepSeek plus Grok Build over ACP v1. The release-owned [support matrix](../support/provider-support-matrix.json) records the exact artifacts, protocols, capabilities, stop fidelity, limitations, and test date exercised offline. Runtime never imports that file. A build or version fact can qualify the release's “tested with” claim, but it never grants or withholds routing authority.
|
|
85
86
|
|
|
86
|
-
|
|
87
|
+
Runtime is best effort: an explicit consent edge plus the exact owned route/session identity authorizes an attempt. The current connector, route generation, strict consumed wire fields, and correlated operation determine the result. Interface drift or a missing optional provider becomes provider-local degraded/offline health, route staleness, and an exact safe code; it does not create a compatibility tier or block unrelated providers.
|
|
87
88
|
|
|
88
|
-
Only unsafe OS evidence for Embassy-owned or executed artifacts and Embassy callback, control, or state paths—such as an unsafe lease or state, swapped binary, ownership/path/symlink mismatch, or invalid generation—refuses broker startup. The Claude-owned external sessions registry root is read-side identity evidence: an unsafe UID or mode
|
|
89
|
+
Only unsafe OS evidence for Embassy-owned or executed artifacts and Embassy callback, control, or state paths—such as an unsafe lease or state, swapped binary, ownership/path/symlink mismatch, or invalid generation—refuses broker startup. The Claude-owned external sessions registry root is read-side identity evidence: an unsafe UID or mode degrades only Claude with a loud observation while the broker and other providers remain available. Claude still requires native `peerProtocol: 1` per session record: a record that declares any other value is rejected in isolation and included in bounded rejection evidence without stopping the broker or hiding other usable sessions.
|
|
89
90
|
|
|
90
|
-
|
|
91
|
+
Runtime parsing remains strict on every known registry field, frame, and response; unknown top-level Claude registry fields are ignored because Embassy never consumes them. The Claude connector row in public status carries optional bounded `registry` observations: `entriesScanned`, `parseableRecords`, monotonic `parseableRecordSeenSinceBoot`, bounded per-safe-code `rejected`, and `rejectedCodesOmitted`. Both dashboards render the same evidence loudly: if Claude is running but no record with parseable required fields has been observed since broker start, its registry layout may have changed.
|
|
91
92
|
|
|
92
|
-
|
|
93
|
+
For every replacement Codex App Server generation, Embassy negotiates a fresh connection and re-anchors a retained route only when `thread/loaded/list` finds its exact private task identity once. A failed negotiation, missing or duplicate task, or unclean transition leaves the route stale rather than retargeting it.
|
|
93
94
|
|
|
94
|
-
The managed Codex installation is resolved by exact verified path; a `codex` elsewhere on `PATH` is neither used nor modified. Claude is resolved from `EMBASSY_CLAUDE_BIN` or the official per-user launcher, never by searching `PATH`.
|
|
95
|
+
The managed Codex installation is resolved by exact verified path; a `codex` elsewhere on `PATH` is neither used nor modified. Claude is resolved from `EMBASSY_CLAUDE_BIN` or the official per-user launcher, never by searching `PATH`. DeepSeek uses only the attested checkout root above. Grok Build uses the release-pinned ACP launch. Version strings, when present, are bounded diagnostic metadata only.
|
|
95
96
|
|
|
96
97
|
## Addressing
|
|
97
98
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 配置与提供方契约
|
|
2
2
|
|
|
3
|
-
Embassy
|
|
3
|
+
Embassy 通过各命令启动时读取的环境变量进行配置。本文档汇集所有变量、提供方传输契约、托管启动解析规则与寻址模型。没有配置文件;所有值均为环境变量或 CLI 标志。
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -10,6 +10,7 @@ Embassy 通过各命令启动时读取的环境变量进行配置。本文档汇
|
|
|
10
10
|
| --- | --- | --- |
|
|
11
11
|
| `EMBASSY_STATE_DIR` | `$XDG_STATE_HOME/agent-embassy`,当 `XDG_STATE_HOME` 未设置时为 `$HOME/.local/state/agent-embassy` | 私有状态、控制套接字和仪表盘;覆盖值必须为绝对路径,且不会迁移固定的主机级租约 |
|
|
12
12
|
| `EMBASSY_CLAUDE_BIN` | `$HOME/.local/bin/claude`,解析到当前已验证的版本目标 | Claude Code 启动器的绝对路径;不搜索 `PATH` |
|
|
13
|
+
| `DSH_HOME` | `$HOME/.dsh` | DeepSeek Harness checkout 根目录;当自有目录与 `package.json` 存在时,Embassy 会在首次投递时惰性运行 `pnpm --dir <home> run demo:acp` |
|
|
13
14
|
| `EMBASSY_STEERING_ENABLED` | `1` | 全局 Claude→Codex `STEER:` 停用开关;精确设为 `0` 后,所有 Claude→Codex 正文都按朝向 Codex 的普通排队消息处理;朝向 Claude 的邮箱写入时机不受影响 |
|
|
14
15
|
| `EMBASSY_DELIVERY_NOTICES` | `merged` | Claude 发送方通知策略:`merged` 保留停滞通知并把终局诊断合并到原生状态;`verbose` 同时发送两者;`quiet` 不发送任何网关用户帧通知 |
|
|
15
16
|
| `EMBASSY_TRACKING_ENABLED` | `1` | 全局进度监视停用开关;精确设为 `0` 后,`--track`、`--idle-minutes` 与 `TRACK:` 开启请求会被拒绝,已有监视会在重启时结算。没有活跃监视时,`DONE:` 不产生作用;`untrack` 不会因开关而被特别拒绝,而是返回 `NOT_FOUND`。取值只能是 `1` 或 `0`,其他值均为配置错误 |
|
|
@@ -49,19 +50,19 @@ Embassy 通过各命令启动时读取的环境变量进行配置。本文档汇
|
|
|
49
50
|
|
|
50
51
|
这是你唯一必须主动开启的前置条件,也是最常见的首次运行故障——因为它**失败得很晚**。快速开始的第 3 步(`select-claude`)无论该设置是否启用都会打印 `"accepted":true`:选择只创建 Embassy 自己的权限边,从不查询 Claude 的原生入站策略。拒绝要到第 4 步、消息抵达 Claude 端时才出现。如果注册与选择都成功,但你的第一条 `send-to-claude` 没有送达,请先检查目的地会话上的 `crossSessionInbound`,再去怀疑路由。
|
|
51
52
|
|
|
52
|
-
##
|
|
53
|
+
## 提供方与运行时契约
|
|
53
54
|
|
|
54
|
-
Embassy
|
|
55
|
+
Embassy 路由四种提供方:Claude 使用对等协议 1,Codex 使用托管 App Server,DeepSeek 与 Grok Build 使用 ACP v1。发布版自有的[支持矩阵](../support/provider-support-matrix.json)记录离线测试的精确构件、协议、能力、停止保真度、限制与测试日期;运行时从不导入它。构建或版本事实可以限定发布版“已测试”的说法,但绝不授予或撤销路由权限。
|
|
55
56
|
|
|
56
|
-
|
|
57
|
+
运行时采用尽力而为模式:显式同意边加上精确自有路由/会话身份会授权一次尝试。当前连接器、路由代际、被消费协议字段的严格结构与相关操作决定结果。接口变化或可选提供方缺失会显示为提供方局部的降级/离线健康度、路由陈旧状态与精确安全代码;它不会产生兼容性等级,也不会阻止其他提供方。
|
|
57
58
|
|
|
58
|
-
只有 Embassy 自有或执行的构件及其回调、控制或状态路径出现不安全 OS 证据——例如不安全的租约或状态、被替换的二进制、所有权/路径/符号链接不匹配,或无效的代际——才会拒绝代理启动。Claude 自有的外部会话注册表根目录属于读取侧身份依据:UID
|
|
59
|
+
只有 Embassy 自有或执行的构件及其回调、控制或状态路径出现不安全 OS 证据——例如不安全的租约或状态、被替换的二进制、所有权/路径/符号链接不匹配,或无效的代际——才会拒绝代理启动。Claude 自有的外部会话注册表根目录属于读取侧身份依据:UID 或模式不安全时,只会让 Claude 降级并醒目显示,代理与其他提供方继续运行。Claude 每条会话记录仍必须使用原生 `peerProtocol: 1`;声明其他值的记录会单独被拒绝并纳入有界拒绝证据,不会阻止代理启动或隐藏其他可用会话。
|
|
59
60
|
|
|
60
|
-
|
|
61
|
+
运行时仍会严格解析每个已知注册表字段、帧和响应;未知的 Claude 注册表顶层字段会被忽略,因为 Embassy 从不使用它们。公开状态中的 Claude 连接器行会携带可选的有界 `registry` 观测:`entriesScanned`、`parseableRecords`、单调的 `parseableRecordSeenSinceBoot`、按安全代码分组且有界的 `rejected`,以及 `rejectedCodesOmitted`。两种仪表盘会醒目呈现同一事实:如果 Claude 正在运行,但自代理启动以来从未观测到带可解析必需字段的记录,它的注册表布局可能已更改。
|
|
61
62
|
|
|
62
|
-
每个替代 Codex App Server
|
|
63
|
+
每个替代 Codex App Server 端点代际都会协商一条新连接;只有 `thread/loaded/list` 恰好一次找到精确私有任务身份时,Embassy 才会重新锚定保留路由。协商失败、任务缺失或重复、转换不干净都会让路由保持陈旧,而不是改投其他任务。
|
|
63
64
|
|
|
64
|
-
|
|
65
|
+
托管 Codex 安装通过精确已验证路径解析;`PATH` 上其他位置的 `codex` 不会被使用或修改。Claude 从 `EMBASSY_CLAUDE_BIN` 或官方用户级启动器解析,从不搜索 `PATH`。DeepSeek 只使用上方已验证的 checkout 根目录。Grok Build 使用发布版固定的 ACP 启动。版本字符串如存在,也只是有界诊断元数据。
|
|
65
66
|
|
|
66
67
|
## 寻址
|
|
67
68
|
|
package/docs/DASHBOARD.md
CHANGED
|
@@ -9,7 +9,7 @@ tabs, request controls, bounded actions, and security caveat.
|
|
|
9
9
|
|
|
10
10
|
## Static dashboard
|
|
11
11
|
|
|
12
|
-
Open `gateway-dashboard.html` inside the configured state directory. It gives a metadata-only view of
|
|
12
|
+
Open `gateway-dashboard.html` inside the configured state directory. It gives a metadata-only view of all four provider rows (Claude, Codex, DeepSeek, and Grok Build), connector health, exact named routes and consent edges, recent delivery states, queue depth, latency, and last safe codes.
|
|
13
13
|
|
|
14
14
|
Interpret queue and delivery by direction. Codex-bound ordinary work can wait
|
|
15
15
|
for the task to become idle. Claude-bound work does not wait for Claude idle:
|
|
@@ -81,43 +81,9 @@ snapshot via same-origin `fetch`; after each bounded action it reads
|
|
|
81
81
|
a fresh snapshot. A snapshot observation may settle already-due
|
|
82
82
|
lifecycle deliveries before projecting state.
|
|
83
83
|
|
|
84
|
-
An
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
`schema_attested` is informational and means the live probes passed on a
|
|
88
|
-
same-major build outside this release's tested inventory. It is writable only
|
|
89
|
-
when those probes cover the write path. Ordinary Codex compatibility and
|
|
90
|
-
registration reads remain read-only: they may include `initialize`,
|
|
91
|
-
`thread/loaded/list`, and registration-time `thread/resume`, but do not invoke
|
|
92
|
-
`turn/start`. The optional Codex write-attestation probe is the sole exception.
|
|
93
|
-
It may create at most one disposable broker-owned thread per attempt, under a
|
|
94
|
-
bounded write fence with zero user-thread contact; every created probe thread
|
|
95
|
-
is archived and confirmed absent from the loaded set. The probe resolves the
|
|
96
|
-
pinned model's lowest advertised effort. Whenever that model/effort pin cannot
|
|
97
|
-
resolve, it declines in a zero-spend fail-safe before creating any thread or
|
|
98
|
-
model turn. Current untested Codex 0.x builds therefore stay monitor-only.
|
|
99
|
-
A same-major probe failure, different major, or version evidence that
|
|
100
|
-
cannot establish a safe major leaves only that provider degraded, monitor-only,
|
|
101
|
-
and write-fenced while the
|
|
102
|
-
broker and other provider remain available, and probes never promote across a
|
|
103
|
-
major or unknown major. The different-major alert names the observed/tested
|
|
104
|
-
versions and supported major
|
|
105
|
-
and says that a supporting Embassy release is required. Probe, major-version,
|
|
106
|
-
or generation failures remain explicit while a missing or duplicate exact task
|
|
107
|
-
leaves its route stale. The Diagnostics
|
|
108
|
-
registry block mirrors optional bounded `registry` evidence on the existing
|
|
109
|
-
public Claude connector row: `entriesScanned`, `parseableRecords`, monotonic
|
|
110
|
-
`parseableRecordSeenSinceBoot`, bounded per-safe-code `rejected`, and
|
|
111
|
-
`rejectedCodesOmitted`. It derives “Parseable required fields observed”,
|
|
112
|
-
“Empty since broker start”, or “No parseable record since broker start”. The
|
|
113
|
-
last warning says that no Claude registry record with parseable required fields
|
|
114
|
-
has been observed since broker start and that, if Claude is running, its
|
|
115
|
-
registry layout may have changed; that possible layout change therefore cannot
|
|
116
|
-
look like a healthy empty peer list. Compatibility remains passive status: the
|
|
117
|
-
dashboard has no compatibility action or override. The dashboard never exposes
|
|
118
|
-
the retained task ID, either
|
|
119
|
-
endpoint generation, or raw registry records, and endpoint recovery never
|
|
120
|
-
replays a message body.
|
|
84
|
+
An exact App Server generation transition appears in Activity as an automatic event, distinct from operator actions. The dashboard does not certify builds or grant authority: it reports only best-effort runtime facts from the bounded public snapshot. Overview and Routes keep Claude, Codex, DeepSeek, and Grok Build visible even when a route or connector is absent; Deliveries filters by all four source and target providers; Diagnostics shows observed protocol/version metadata, current connector health, and the last safe code. Version metadata never changes route authority.
|
|
85
|
+
|
|
86
|
+
The Diagnostics registry block mirrors optional bounded `registry` observations on the Claude connector row: `entriesScanned`, `parseableRecords`, monotonic `parseableRecordSeenSinceBoot`, bounded per-safe-code `rejected`, and `rejectedCodesOmitted`. It derives “Parseable required fields observed”, “Empty since broker start”, or “No parseable record since broker start”. The last warning says that no Claude registry record with parseable required fields has been observed since broker start and that, if Claude is running, its registry layout may have changed; that possible layout change therefore cannot look like a healthy empty peer list. The dashboard never exposes retained native IDs, endpoint generations, raw registry records, or the release-owned offline support matrix, and endpoint recovery never replays a message body.
|
|
121
87
|
|
|
122
88
|
An optional `--lang en|zh-CN` flag selects the display language. It belongs to
|
|
123
89
|
the live companion only; the static pair is always written in both languages
|
package/docs/DASHBOARD.zh-CN.md
CHANGED
|
@@ -6,7 +6,7 @@ Embassy 提供两种仪表盘界面:一对仅包含元数据的静态文件,
|
|
|
6
6
|
|
|
7
7
|
## 静态仪表盘
|
|
8
8
|
|
|
9
|
-
在配置的状态目录下打开 `gateway-dashboard.html
|
|
9
|
+
在配置的状态目录下打开 `gateway-dashboard.html`。它提供一个纯元数据视图,包含四种提供方行(Claude、Codex、DeepSeek、Grok Build)、连接器健康度、精确具名路由与同意边、近期投递状态、队列深度、延迟和最近安全代码。
|
|
10
10
|
|
|
11
11
|
请按方向理解队列与投递。朝向 Codex 的普通工作可以等待任务空闲;朝向 Claude 的工作不等待 Claude 空闲:通过路由与写前检查后,它会立即进入 Claude 的原生邮箱,而 `transport_written` 会把该方向结算为 `delivered`。这个邮箱边界不表示 Claude 已读取或消费正文。
|
|
12
12
|
|
|
@@ -38,7 +38,9 @@ embassy dashboard --live --port 41962
|
|
|
38
38
|
|
|
39
39
|
每个请求都会检查精确的 Host 头。导航 GET 可以缺少 Origin,但每个 POST 都要求精确的 Origin 与 `X-Embassy-Request: 1`。服务器不接受 `OPTIONS`,也不发送 CORS 头。这些检查约束浏览器的跨来源请求,但不认证本地软件。没有通用控制或提供方路由、遥测或外部资源。唯一的变更路由只接受配对、取消配对、刷新发现结果和移除陈旧 Codex 注册四种精确操作;每次都要求页内明确确认,正文上限为 1 KiB,并限制为每分钟六次。移除操作只携带公开的 `codex-*` 别名;仅当代理确认注册已陈旧且其端点代际已失效时才会接受。任务 ID 与端点代际不会进入浏览器契约。浏览器客户端仅在 `localStorage` 中保存一个显示偏好键(当前选项卡与语言)。浏览器不能创建或注销在线任务、发送、回复、审批、中断、更改设置,也不能调用任意代理或提供方方法。它通过同源 `fetch` 接收快照,并在每次有限操作后重新读取最新快照。一次快照观测可能会在投射状态之前结算已到期的生命周期投递。
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
精确 App Server 代际转换会作为自动事件出现在“活动”中,并与操作员操作明确区分。仪表盘不认证构建,也不授予权限;它只报告有界公开快照中的尽力而为运行时事实。“总览”与“路由”会在路由或连接器缺失时仍显示 Claude、Codex、DeepSeek 与 Grok Build;“投递”可按四种发送方与接收方提供方筛选;“诊断”显示已观察协议/版本元数据、当前连接器健康度与最近安全代码。版本元数据绝不改变路由权限。
|
|
42
|
+
|
|
43
|
+
“诊断”中的注册表区块会镜像 Claude 连接器行上可选的有界 `registry` 观测:`entriesScanned`、`parseableRecords`、单调的 `parseableRecordSeenSinceBoot`、按安全代码分组且有界的 `rejected`,以及 `rejectedCodesOmitted`。它会派生“已观察到可解析必需字段”、“自代理启动以来为空”或“自代理启动以来没有可解析记录”。最后一种警告会说明:自代理启动以来从未观察到带可解析必需字段的 Claude 注册表记录;如果 Claude 正在运行,它的注册表布局可能已更改。因此,这种变化不会伪装成健康的空对等列表。仪表盘绝不暴露保留的原生 ID、端点代际、原始注册表记录或发布版自有的离线支持矩阵;端点恢复也绝不重放消息正文。
|
|
42
44
|
|
|
43
45
|
可选的 `--lang en|zh-CN` 标志用于选择显示语言。它仅属于实时组件;静态版本始终以两种语言写入,通过页内链接切换。
|
|
44
46
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Embassy Gateway Architecture
|
|
2
2
|
|
|
3
|
-
Status: local bidirectional
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Status: local bidirectional routing is implemented for Claude, Codex, DeepSeek,
|
|
4
|
+
and Grok. Remote connectors remain deferred. The published package supports
|
|
5
|
+
macOS, the only platform exercised end to end so far.
|
|
6
6
|
|
|
7
7
|
This document uses four evidence labels:
|
|
8
8
|
|
|
@@ -29,33 +29,17 @@ edge, created by `pair` or the one-task `select-claude` shorthand. It provides
|
|
|
29
29
|
a single private operational view across the two products without rebuilding
|
|
30
30
|
either agent runtime.
|
|
31
31
|
|
|
32
|
-
Provider
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
advertised effort. Whenever that model/effort pin cannot resolve, it declines
|
|
44
|
-
in a zero-spend fail-safe before creating any thread or model turn. An untested
|
|
45
|
-
Codex 0.x build therefore stays monitor-only pending a certified write schema.
|
|
46
|
-
Failed
|
|
47
|
-
probes, a different major, or version evidence that
|
|
48
|
-
cannot establish a safe major leave only that provider degraded, monitor-only,
|
|
49
|
-
and write-fenced while the
|
|
50
|
-
broker and other provider remain available. Probes never promote across a
|
|
51
|
-
major or compensate for unknown major evidence; an exact official launcher
|
|
52
|
-
target may supply separate bounded major evidence even when its banner is
|
|
53
|
-
unparseable. Unsafe OS evidence for Embassy-owned or executed artifacts and
|
|
54
|
-
Embassy callback, control, or state paths refuses broker startup; unsafe UID or
|
|
55
|
-
mode evidence on Claude's external sessions registry root quarantines only
|
|
56
|
-
Claude. A Claude
|
|
57
|
-
session record whose native peer protocol is not 1 is rejected in isolation and
|
|
58
|
-
included in bounded rejection evidence.
|
|
32
|
+
Provider versions are best-effort diagnostic metadata, never routing authority.
|
|
33
|
+
An explicit pair plus the exact owned route and session identity authorizes an
|
|
34
|
+
attempt; current connector, generation, strict wire, capability, and correlated
|
|
35
|
+
operation facts decide its result. The release-owned offline support matrix is
|
|
36
|
+
the tested-artifact record and is never imported by runtime. Unsafe OS evidence
|
|
37
|
+
for Embassy-owned or executed artifacts and Embassy callback, control, or state
|
|
38
|
+
paths refuses broker startup; unsafe UID or mode evidence on Claude's external
|
|
39
|
+
sessions registry root quarantines only Claude. A Claude session record whose
|
|
40
|
+
native peer protocol is not 1 is rejected in isolation and included in bounded
|
|
41
|
+
rejection evidence. Missing optional providers and interface drift degrade only
|
|
42
|
+
their own routes while the broker and other providers remain available.
|
|
59
43
|
|
|
60
44
|
It is deliberately:
|
|
61
45
|
|
|
@@ -96,27 +80,22 @@ sessions and `SendMessage` to contact them. A target can accept, hold, or
|
|
|
96
80
|
refuse inbound cross-session messages through `crossSessionInbound`. Messages
|
|
97
81
|
do not bypass the receiver's tool permissions or approval boundary.
|
|
98
82
|
|
|
99
|
-
**
|
|
83
|
+
**Best-effort internal boundary:** the installed Claude Code build advertises
|
|
100
84
|
live sessions through registry records and transports peer frames over
|
|
101
85
|
per-session Unix-domain sockets using peer protocol 1. Those registry and wire
|
|
102
86
|
shapes are not documented as a stable third-party integration API. The gateway
|
|
103
|
-
therefore
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
patch outside the tested inventory is writable `schema_attested`; a failed
|
|
109
|
-
probe, different major, or version evidence that cannot establish a safe major
|
|
110
|
-
keeps only the Claude surface monitor-only. An exact official launcher target
|
|
111
|
-
may supply separate bounded major evidence when its banner is unparseable, but
|
|
112
|
-
unknown major evidence is never promoted by probes.
|
|
87
|
+
therefore validates every consumed field, frame, socket, generation, and
|
|
88
|
+
correlated result immediately before use. Unknown top-level registry fields are
|
|
89
|
+
tolerated because Embassy never consumes them; malformed required fields and
|
|
90
|
+
records whose peer protocol is not 1 remain isolated and counted. Version
|
|
91
|
+
metadata describes what was observed but grants no runtime authority.
|
|
113
92
|
|
|
114
93
|
For the lowest-impedance native path, the gateway publishes one process-owned
|
|
115
94
|
registry record whose name is visibly prefixed `codex-` and which carries the
|
|
116
95
|
supported explicit versioned Embassy-advertisement marker. The listener remains
|
|
117
96
|
gateway-owned and does not claim to be a Claude model session; the marker, not
|
|
118
97
|
the name prefix alone, distinguishes Embassy's advertisement. The record uses
|
|
119
|
-
the
|
|
98
|
+
the validated native peer shape so Claude's own `ListAgents` and
|
|
120
99
|
`SendMessage` tools work unchanged.
|
|
121
100
|
|
|
122
101
|
Consequences:
|
|
@@ -194,11 +173,11 @@ The status below is intentionally narrower than the target architecture.
|
|
|
194
173
|
| Private JSONL control protocol over a controller-owned UDS | **Implemented**, deterministic synthetic tests; no provider connection required |
|
|
195
174
|
| Static metadata-only dashboard renderer and atomic publisher | **Implemented**, deterministic security tests; the static renderer requires no browser or HTTP server |
|
|
196
175
|
| Opt-in live dashboard companion (`embassy dashboard --live`) | **Implemented**, deterministic tests over the stable loopback listener, direct multi-browser access, projection, request guards, and four bounded route actions; it is a separate foreground process, never part of `embassy serve` |
|
|
197
|
-
| Claude registry/peer adapter
|
|
198
|
-
|
|
|
176
|
+
| Claude registry/peer adapter with strict peer protocol 1 and per-operation validation | **Implemented** and live-tested through Claude Code 2.1.227, including discovery, native status frames, cancellation, and accessible-workspace validation |
|
|
177
|
+
| Claude binary/runtime metadata | **Implemented**; validates the exact owned path and records launcher-leaf metadata without granting it routing authority |
|
|
199
178
|
| Allowlisted Codex App Server connector with bounded busy behavior | **Implemented** and live-tested against App Server 0.147.0 for external busy observation, registered-route reachability across settings changes, and an automatically started queued turn; exact `STEER:` boundary behavior is covered deterministically |
|
|
200
179
|
| Attach-only local Codex proxy transport and exact-owned cleanup | **Implemented**, five deterministic tests; no live App Server connection in routine tests |
|
|
201
|
-
| Local provider adapters | **Implemented**, focused synthetic tests cover
|
|
180
|
+
| Local provider adapters | **Implemented**, focused synthetic tests cover Claude discovery, exact Codex ownership, and lazy ACP-backed DeepSeek and Grok routes with provider-local degradation and cleanup; remote adapters remain disabled |
|
|
202
181
|
| Gateway service composition | **Implemented**, including private control-server startup, adapter lifecycle, synthetic cross-provider selection/dispatch/reply correlation, metadata-only publication, and clean-restart abandonment tests |
|
|
203
182
|
| Delivery receipt/status lifecycle | **Implemented**, deterministic synthetic tests cover stable-UUID native receipt re-resolution, the merged/verbose/quiet Claude notice policy, one bounded stall notice with pending age where enabled, opaque memory-only correlation handles, the closed status/terminal schema, and one-shot/bounded-wait CLI behavior |
|
|
204
183
|
| Broker-owned cross-provider provenance framing | **Implemented**, deterministic tests cover exact Codex and Claude wire shapes, bounded long-alias attribution, recipient reply hints, reserved-tag neutralization, single wrapping across clean retries, and pre-write failure |
|
|
@@ -248,8 +227,8 @@ generation.
|
|
|
248
227
|
|
|
249
228
|
An App Server endpoint-generation change is a fenced route transition, not a
|
|
250
229
|
new registration. Embassy stops dispatch through the old connector and creates
|
|
251
|
-
a
|
|
252
|
-
|
|
230
|
+
a replacement connector. That exact generation must negotiate its current
|
|
231
|
+
interface and pass `thread/loaded/list` validation, where every retained
|
|
253
232
|
private thread ID must occur exactly once. The connector resumes that exact
|
|
254
233
|
task with history excluded; only then may the controller activate writes and
|
|
255
234
|
atomically re-anchor the same alias, owner lease, and pair edges to the new
|
|
@@ -687,10 +666,9 @@ prototype state root is no longer read, locked, or mutated.
|
|
|
687
666
|
|
|
688
667
|
It emits one normalized ready line, publishes the private dashboard, and
|
|
689
668
|
holds the process until `SIGINT` or `SIGTERM`, when exact-owned resources are
|
|
690
|
-
closed. Startup
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
keeps that surface monitor-only. Unsafe ownership, path, symlink, lease, state,
|
|
669
|
+
closed. Startup validates exact owned provider paths and binds controller-owned
|
|
670
|
+
UDS listeners. Missing optional providers or a provider-local interface failure
|
|
671
|
+
degrades only that surface. Unsafe ownership, path, symlink, lease, state,
|
|
694
672
|
or generation evidence for Embassy-owned or executed artifacts and Embassy
|
|
695
673
|
callback, control, or state paths aborts startup; unsafe UID or mode evidence
|
|
696
674
|
on Claude's external sessions registry root quarantines only Claude. The bounded read-only Claude registry
|
|
@@ -755,16 +733,11 @@ any NVM-managed `codex` on the user's `PATH` (for example
|
|
|
755
733
|
it, and does not edit a shell profile. The two installations therefore do not
|
|
756
734
|
conflict.
|
|
757
735
|
|
|
758
|
-
The connector has a fixed App Server method allowlist.
|
|
736
|
+
The connector has a fixed App Server method allowlist. A connector
|
|
759
737
|
may initialize, observe loaded tasks, resume/unsubscribe the exact registered
|
|
760
|
-
task, start a dedicated turn, and interrupt only its own confirmed turn.
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
absent from the loaded set. The probe resolves the pinned model's lowest
|
|
764
|
-
advertised effort. Whenever that model/effort pin cannot resolve, it declines
|
|
765
|
-
in a zero-spend fail-safe before creating any thread or model turn. Delete,
|
|
766
|
-
history, shell, configuration, authentication, plugin, approval-response, and
|
|
767
|
-
generic RPC methods remain excluded everywhere.
|
|
738
|
+
task, start a dedicated turn, and interrupt only its own confirmed turn. Archive,
|
|
739
|
+
delete, history, shell, configuration, authentication, plugin,
|
|
740
|
+
approval-response, and generic RPC methods remain excluded everywhere.
|
|
768
741
|
|
|
769
742
|
The App Server capability first tested with 0.147.0 gates the privacy-preserving
|
|
770
743
|
`thread/resume.excludeTurns` field behind initialization capability
|
|
@@ -776,25 +749,12 @@ Missing, malformed, or nonempty turns fail closed and are never emitted or
|
|
|
776
749
|
persisted. The capability does not add an experimental client method or change
|
|
777
750
|
the closed RPC allowlist.
|
|
778
751
|
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
remain read-only: they may include `initialize`, `thread/loaded/list`, and
|
|
786
|
-
registration-time `thread/resume`, but do not invoke `turn/start`. The optional
|
|
787
|
-
Codex write-attestation probe is the sole exception. It may create at most one
|
|
788
|
-
disposable broker-owned thread per attempt, under a bounded write fence with
|
|
789
|
-
zero user-thread contact; every created probe thread is archived and confirmed
|
|
790
|
-
absent from the loaded set. The probe resolves the pinned model's lowest
|
|
791
|
-
advertised effort. Whenever that model/effort pin cannot resolve, it declines
|
|
792
|
-
in a zero-spend fail-safe before creating any thread or model turn. That build,
|
|
793
|
-
failed probes, a different major, or version evidence
|
|
794
|
-
that cannot establish a safe major remain on the monitor-only path and cannot
|
|
795
|
-
be promoted by probes. No Claude-initiated turn
|
|
796
|
-
can start until the controller activates that exact endpoint generation and
|
|
797
|
-
explicit route ownership is established.
|
|
752
|
+
Generation validation and controller activation are distinct gates. A
|
|
753
|
+
replacement connector may initialize, list, resume, and expose normalized
|
|
754
|
+
status before the controller activates it. No Claude-initiated turn can start
|
|
755
|
+
until that exact endpoint generation has negotiated its current interface,
|
|
756
|
+
re-observed the registered task, and established explicit route ownership.
|
|
757
|
+
Version metadata does not participate in that decision.
|
|
798
758
|
|
|
799
759
|
Registration resumes the exact task and establishes reachability. Embassy does
|
|
800
760
|
not read or retain reported working-directory or policy fields. Before
|
|
@@ -875,13 +835,11 @@ The one Desktop restart needed for the local shared-App-Server feasibility
|
|
|
875
835
|
test has already been completed. Building, running synthetic tests, starting
|
|
876
836
|
the gateway, rendering the dashboard, and a future Claude peer-socket test do
|
|
877
837
|
not themselves require another Desktop restart. A provider or Desktop major
|
|
878
|
-
upgrade
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
Patch updates within the supported major are admitted according to live
|
|
884
|
-
evidence rather than a release pin.
|
|
838
|
+
upgrade may change an internal interface; strict per-operation checks keep the
|
|
839
|
+
responsible route closed if that interface no longer matches. Other providers
|
|
840
|
+
remain available. If the attachment mode changes, a supporting release may
|
|
841
|
+
require a separately announced controlled restart. The offline support matrix
|
|
842
|
+
records what a release was tested with but never grants runtime authority.
|
|
885
843
|
|
|
886
844
|
## Dashboard
|
|
887
845
|
|
|
@@ -900,18 +858,18 @@ no meta refresh and the page tells the operator to re-run
|
|
|
900
858
|
|
|
901
859
|
Each page assembles seven sections:
|
|
902
860
|
|
|
903
|
-
- **Exchange** — aggregate gateway health plus
|
|
904
|
-
|
|
861
|
+
- **Exchange** — aggregate gateway health plus every explicit cross-provider
|
|
862
|
+
pair and its per-edge counters.
|
|
905
863
|
- **Attention** — allowlisted alerts such as stale route, protocol mismatch,
|
|
906
864
|
queue full, or ambiguous delivery.
|
|
907
865
|
- **Transit** — queued-message depth and bytes in flight.
|
|
908
866
|
- **Progress supervision** — active progress watches and their state.
|
|
909
867
|
- **Operator activity** — the broker's bounded public journal of accepted
|
|
910
868
|
operator actions.
|
|
911
|
-
- **Sessions** —
|
|
912
|
-
|
|
913
|
-
- **Diagnostics** —
|
|
914
|
-
|
|
869
|
+
- **Sessions** — first-class Claude, Codex, DeepSeek, and Grok provider rows,
|
|
870
|
+
aliases, host, route state, and queue depth.
|
|
871
|
+
- **Diagnostics** — best-effort observed metadata, per-host connector health,
|
|
872
|
+
last safe code, deadline-pressure buckets, accounting totals, and the
|
|
915
873
|
omission counters below. Normalized message direction and delivery state,
|
|
916
874
|
timestamp, latency, byte count, and a short opaque message-ID suffix appear
|
|
917
875
|
with the delivery rows.
|
|
@@ -1036,8 +994,8 @@ and fake App Server transports.
|
|
|
1036
994
|
|
|
1037
995
|
### Exact default roots on macOS
|
|
1038
996
|
|
|
1039
|
-
|
|
1040
|
-
|
|
997
|
+
Provider setup derives these paths from the current OS user's verified home; it
|
|
998
|
+
does not scan the home directory. These are the reviewed
|
|
1041
999
|
boundaries exercised by the live gateway; routine tests substitute synthetic
|
|
1042
1000
|
paths, peers, and transports:
|
|
1043
1001
|
|
|
@@ -1066,25 +1024,11 @@ the preferred least-context setup, but it is not mandatory.
|
|
|
1066
1024
|
|
|
1067
1025
|
## Failure and upgrade policy
|
|
1068
1026
|
|
|
1069
|
-
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
write-attestation probe is the sole exception. It may create at most one
|
|
1075
|
-
disposable broker-owned thread per attempt, under a bounded write fence with
|
|
1076
|
-
zero user-thread contact; every created probe thread is archived and
|
|
1077
|
-
confirmed absent from the loaded set. The probe resolves the pinned model's
|
|
1078
|
-
lowest advertised effort. Whenever that model/effort pin cannot resolve, it
|
|
1079
|
-
declines in a zero-spend fail-safe before creating any thread or model turn.
|
|
1080
|
-
Current untested Codex 0.x therefore stays monitor-only. Failed
|
|
1081
|
-
probes, a different major, or
|
|
1082
|
-
version evidence that cannot establish a safe major leave only that provider
|
|
1083
|
-
monitor-only and write-fenced. Probes never promote across a major or
|
|
1084
|
-
compensate for unknown major evidence. A different-major alert names the observed/tested versions
|
|
1085
|
-
and supported major and requires an Embassy release supporting the observed
|
|
1086
|
-
major. A session record whose peer protocol is not 1 is rejected per record
|
|
1087
|
-
and counted without stopping the broker.
|
|
1027
|
+
- Provider versions are best-effort metadata and never grant or remove routing
|
|
1028
|
+
authority. The offline support matrix records tested artifacts, capabilities,
|
|
1029
|
+
limitations, and dates without entering runtime. A session record whose peer
|
|
1030
|
+
protocol is not 1 is rejected per record and counted without stopping the
|
|
1031
|
+
broker; interface drift degrades only its responsible provider.
|
|
1088
1032
|
- Unsafe ownership, path, symlink, lease, state, or generation evidence for
|
|
1089
1033
|
Embassy-owned or executed artifacts and Embassy callback, control, or state
|
|
1090
1034
|
paths refuses broker startup. Unsafe UID or mode evidence on Claude's
|
|
@@ -1127,12 +1071,10 @@ the preferred least-context setup, but it is not mandatory.
|
|
|
1127
1071
|
the process was lost settles `ambiguous` with `CONTROLLER_RESTARTED`; a
|
|
1128
1072
|
message whose target authority was transient, or whose target route no longer
|
|
1129
1073
|
exists, settles `abandoned` with the same code.
|
|
1130
|
-
- A provider or Desktop update
|
|
1131
|
-
|
|
1132
|
-
record outside peer protocol 1 is rejected per record
|
|
1133
|
-
|
|
1134
|
-
an unvalidated replacement endpoint generation. A patch update that passes
|
|
1135
|
-
those checks does not block writes for its version alone.
|
|
1074
|
+
- A provider or Desktop update that changes an internal interface degrades its
|
|
1075
|
+
responsible route while the broker and other providers remain available. A
|
|
1076
|
+
Claude record outside peer protocol 1 is rejected per record, and retained
|
|
1077
|
+
state never activates an unvalidated replacement endpoint generation.
|
|
1136
1078
|
|
|
1137
1079
|
## Validation boundary
|
|
1138
1080
|
|
package/package.json
CHANGED
|
@@ -31,7 +31,7 @@ embassy health
|
|
|
31
31
|
|
|
32
32
|
If Embassy is unavailable, stop and report that it must be started in a trusted local terminal with `embassy serve`. `GATEWAY_INSTANCE_IN_USE` means an Embassy or recognized legacy lock already owns this login account; stop that foreground process rather than changing `EMBASSY_STATE_DIR`. If no legacy process remains, the operator may remove only the exact stale legacy controller lock and retry. Do not launch a background copy, retry in a loop, discover sockets, or fall back to a provider CLI.
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
Embassy presents Claude, Codex, DeepSeek, and Grok as first-class providers. Runtime status is best-effort: use route staleness, connector health, observed metadata, and the last safe code to explain what is available now. Provider versions are diagnostic metadata, not routing authority; the release-owned offline support matrix is the record of tested artifacts, capabilities, limitations, and test dates. There is no agent or operator compatibility action. Report a degraded surface and stop rather than sending a test message or trying to override a failed route.
|
|
35
35
|
|
|
36
36
|
List the public snapshot:
|
|
37
37
|
|
|
@@ -47,18 +47,18 @@ embassy refresh-dashboard
|
|
|
47
47
|
|
|
48
48
|
Run that refresh only at the passive-discovery authorization stage. Treat the response as a normalized refresh result; it does not reveal the path. The operator-facing page is `gateway-dashboard.html` in the configured state directory, by default `~/.local/state/agent-embassy/`. Use the operator's configured location when it differs. Do not search for the file or scan controller-owned paths.
|
|
49
49
|
|
|
50
|
-
## Pair
|
|
50
|
+
## Pair providers
|
|
51
51
|
|
|
52
|
-
Create one explicit
|
|
52
|
+
Create one explicit cross-provider edge by naming both ends. Each endpoint must be a user-chosen route from the current snapshot:
|
|
53
53
|
|
|
54
54
|
```sh
|
|
55
|
-
embassy pair --
|
|
55
|
+
embassy pair --from codex-reviewer@this-mac --to advisor@this-mac
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
Pairs are additive and bounded; many edges may coexist, and `pair` never retires another edge. Run `pair` and `unpair` from inside a registered Codex task so the CLI reads the inherited `CODEX_THREAD_ID`; a plain operator shell fails closed with `CODEX_IDENTITY_REQUIRED` — use the live dashboard or the one-task shorthand instead. Remove exactly the named edge:
|
|
59
59
|
|
|
60
60
|
```sh
|
|
61
|
-
embassy unpair --
|
|
61
|
+
embassy unpair --from codex-reviewer@this-mac --to advisor@this-mac
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
When the Codex end is unambiguous — inherited from the calling task, or the sole registered task — the one-task shorthand forms or removes the same edge:
|
|
@@ -113,7 +113,7 @@ until manual recovery rather than leaving two live registrations.
|
|
|
113
113
|
|
|
114
114
|
Embassy also pins the exact identity fail-closed when a retained route cannot fully reactivate or a fresh registration cannot confirm complete rollback. Retry only that exact identity; choose another only after the old route is confirmed unregistered and Embassy is restarted.
|
|
115
115
|
|
|
116
|
-
A
|
|
116
|
+
A Codex App Server generation change or broker restart can reattach an exact registered task automatically. Each replacement generation negotiates its current interface and must observe the exact task before the controller re-anchors it. A normal broker restart therefore needs no manual registration. If boot reactivation cannot find the task exactly once, the route remains stale with `REOBSERVATION_REQUIRED`; once the task is observable, recover it only from that exact Codex task by rerunning `embassy register-codex --alias <same-alias>`. Do not unregister first, supply a thread ID, or replay any ambiguously written body.
|
|
117
117
|
|
|
118
118
|
Unregister from the same Codex task:
|
|
119
119
|
|