agent-embassy 1.9.5 → 3.0.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.
Files changed (150) hide show
  1. package/CHANGELOG.md +87 -0
  2. package/CONTRIBUTING.md +19 -34
  3. package/README.md +110 -221
  4. package/SECURITY.md +55 -89
  5. package/dist/src/errors.d.ts +10 -1
  6. package/dist/src/errors.js +3 -1
  7. package/dist/src/errors.js.map +1 -1
  8. package/dist/src/gateway/claude-helper-protocol.d.ts +9 -12
  9. package/dist/src/gateway/claude-helper-protocol.js +15 -13
  10. package/dist/src/gateway/claude-helper-protocol.js.map +1 -1
  11. package/dist/src/gateway/claude-helper-supervisor.d.ts +2 -6
  12. package/dist/src/gateway/claude-helper-supervisor.js +10 -9
  13. package/dist/src/gateway/claude-helper-supervisor.js.map +1 -1
  14. package/dist/src/gateway/claude-helper.js +18 -10
  15. package/dist/src/gateway/claude-helper.js.map +1 -1
  16. package/dist/src/gateway/claude-peer.d.ts +0 -3
  17. package/dist/src/gateway/claude-peer.js +6 -18
  18. package/dist/src/gateway/claude-peer.js.map +1 -1
  19. package/dist/src/gateway/cli.d.ts +18 -13
  20. package/dist/src/gateway/cli.js +942 -298
  21. package/dist/src/gateway/cli.js.map +1 -1
  22. package/dist/src/gateway/codex-local-transport.d.ts +1 -1
  23. package/dist/src/gateway/codex-local-transport.js +2 -2
  24. package/dist/src/gateway/codex-local-transport.js.map +1 -1
  25. package/dist/src/gateway/codex-socket-holder.d.ts +26 -0
  26. package/dist/src/gateway/codex-socket-holder.js +76 -0
  27. package/dist/src/gateway/codex-socket-holder.js.map +1 -0
  28. package/dist/src/gateway/codex-stateless-transport.js +1 -1
  29. package/dist/src/gateway/codex-stateless-transport.js.map +1 -1
  30. package/dist/src/gateway/config.d.ts +5 -13
  31. package/dist/src/gateway/config.js +7 -19
  32. package/dist/src/gateway/config.js.map +1 -1
  33. package/dist/src/gateway/control.d.ts +55 -108
  34. package/dist/src/gateway/control.js +95 -222
  35. package/dist/src/gateway/control.js.map +1 -1
  36. package/dist/src/gateway/federation-nodes.d.ts +29 -3
  37. package/dist/src/gateway/federation-nodes.js +200 -15
  38. package/dist/src/gateway/federation-nodes.js.map +1 -1
  39. package/dist/src/gateway/peer-client.d.ts +4 -3
  40. package/dist/src/gateway/peer-client.js +22 -13
  41. package/dist/src/gateway/peer-client.js.map +1 -1
  42. package/dist/src/gateway/peer-protocol.d.ts +8 -11
  43. package/dist/src/gateway/peer-protocol.js +5 -12
  44. package/dist/src/gateway/peer-protocol.js.map +1 -1
  45. package/dist/src/gateway/provenance-envelope.d.ts +0 -1
  46. package/dist/src/gateway/provenance-envelope.js +4 -19
  47. package/dist/src/gateway/provenance-envelope.js.map +1 -1
  48. package/dist/src/gateway/providers.d.ts +10 -7
  49. package/dist/src/gateway/providers.js +21 -28
  50. package/dist/src/gateway/providers.js.map +1 -1
  51. package/dist/src/gateway/server.d.ts +4 -14
  52. package/dist/src/gateway/server.js +33 -59
  53. package/dist/src/gateway/server.js.map +1 -1
  54. package/dist/src/gateway/service-agent.d.ts +187 -0
  55. package/dist/src/gateway/service-agent.js +758 -0
  56. package/dist/src/gateway/service-agent.js.map +1 -0
  57. package/dist/src/gateway/service.d.ts +117 -32
  58. package/dist/src/gateway/service.js +525 -576
  59. package/dist/src/gateway/service.js.map +1 -1
  60. package/dist/src/gateway/status-view.d.ts +167 -0
  61. package/dist/src/gateway/status-view.js +488 -0
  62. package/dist/src/gateway/status-view.js.map +1 -0
  63. package/dist/src/gateway/store.d.ts +103 -21
  64. package/dist/src/gateway/store.js +473 -547
  65. package/dist/src/gateway/store.js.map +1 -1
  66. package/dist/src/gateway/types.d.ts +51 -102
  67. package/dist/src/gateway/types.js +15 -52
  68. package/dist/src/gateway/types.js.map +1 -1
  69. package/docs/CONFIGURATION.md +194 -59
  70. package/docs/DELIVERY.md +11 -11
  71. package/docs/GATEWAY-ARCHITECTURE.md +286 -394
  72. package/package.json +4 -12
  73. package/skills/embassy-peer/SKILL.md +72 -92
  74. package/skills/embassy-peer/agents/openai.yaml +1 -1
  75. package/README.zh-CN.md +0 -269
  76. package/assets/live-dashboard/app.css +0 -1619
  77. package/assets/vendor/react/LICENSE +0 -21
  78. package/assets/vendor/react/react-dom.production.min.js +0 -267
  79. package/assets/vendor/react/react.production.min.js +0 -31
  80. package/dist/src/gateway/acp-client.d.ts +0 -110
  81. package/dist/src/gateway/acp-client.js +0 -407
  82. package/dist/src/gateway/acp-client.js.map +0 -1
  83. package/dist/src/gateway/acp-provider.d.ts +0 -66
  84. package/dist/src/gateway/acp-provider.js +0 -275
  85. package/dist/src/gateway/acp-provider.js.map +0 -1
  86. package/dist/src/gateway/cli-copy.d.ts +0 -8
  87. package/dist/src/gateway/cli-copy.en.d.ts +0 -17
  88. package/dist/src/gateway/cli-copy.en.js +0 -58
  89. package/dist/src/gateway/cli-copy.en.js.map +0 -1
  90. package/dist/src/gateway/cli-copy.js +0 -22
  91. package/dist/src/gateway/cli-copy.js.map +0 -1
  92. package/dist/src/gateway/cli-copy.zh-CN.d.ts +0 -17
  93. package/dist/src/gateway/cli-copy.zh-CN.js +0 -58
  94. package/dist/src/gateway/cli-copy.zh-CN.js.map +0 -1
  95. package/dist/src/gateway/codex-doctor.d.ts +0 -36
  96. package/dist/src/gateway/codex-doctor.js +0 -127
  97. package/dist/src/gateway/codex-doctor.js.map +0 -1
  98. package/dist/src/gateway/dashboard-copy.d.ts +0 -7
  99. package/dist/src/gateway/dashboard-copy.en.d.ts +0 -504
  100. package/dist/src/gateway/dashboard-copy.en.js +0 -505
  101. package/dist/src/gateway/dashboard-copy.en.js.map +0 -1
  102. package/dist/src/gateway/dashboard-copy.js +0 -514
  103. package/dist/src/gateway/dashboard-copy.js.map +0 -1
  104. package/dist/src/gateway/dashboard-copy.zh-CN.d.ts +0 -504
  105. package/dist/src/gateway/dashboard-copy.zh-CN.js +0 -505
  106. package/dist/src/gateway/dashboard-copy.zh-CN.js.map +0 -1
  107. package/dist/src/gateway/dashboard-model.d.ts +0 -343
  108. package/dist/src/gateway/dashboard-model.js +0 -1061
  109. package/dist/src/gateway/dashboard-model.js.map +0 -1
  110. package/dist/src/gateway/dashboard.d.ts +0 -20
  111. package/dist/src/gateway/dashboard.js +0 -874
  112. package/dist/src/gateway/dashboard.js.map +0 -1
  113. package/dist/src/gateway/deepseek-detect.d.ts +0 -14
  114. package/dist/src/gateway/deepseek-detect.js +0 -41
  115. package/dist/src/gateway/deepseek-detect.js.map +0 -1
  116. package/dist/src/gateway/live-dashboard-app/app.js +0 -2385
  117. package/dist/src/gateway/live-dashboard-assets.d.ts +0 -10
  118. package/dist/src/gateway/live-dashboard-assets.js +0 -74
  119. package/dist/src/gateway/live-dashboard-assets.js.map +0 -1
  120. package/dist/src/gateway/live-dashboard-command.d.ts +0 -58
  121. package/dist/src/gateway/live-dashboard-command.js +0 -334
  122. package/dist/src/gateway/live-dashboard-command.js.map +0 -1
  123. package/dist/src/gateway/live-dashboard-http.d.ts +0 -39
  124. package/dist/src/gateway/live-dashboard-http.js +0 -383
  125. package/dist/src/gateway/live-dashboard-http.js.map +0 -1
  126. package/dist/src/gateway/live-dashboard-protocol.d.ts +0 -34
  127. package/dist/src/gateway/live-dashboard-protocol.js +0 -114
  128. package/dist/src/gateway/live-dashboard-protocol.js.map +0 -1
  129. package/dist/src/gateway/live-dashboard-server.d.ts +0 -33
  130. package/dist/src/gateway/live-dashboard-server.js +0 -144
  131. package/dist/src/gateway/live-dashboard-server.js.map +0 -1
  132. package/dist/src/gateway/live-dashboard-stream.d.ts +0 -46
  133. package/dist/src/gateway/live-dashboard-stream.js +0 -234
  134. package/dist/src/gateway/live-dashboard-stream.js.map +0 -1
  135. package/dist/src/gateway/live-dashboard.d.ts +0 -28
  136. package/dist/src/gateway/live-dashboard.js +0 -154
  137. package/dist/src/gateway/live-dashboard.js.map +0 -1
  138. package/dist/src/gateway/locale.d.ts +0 -4
  139. package/dist/src/gateway/locale.js +0 -10
  140. package/dist/src/gateway/locale.js.map +0 -1
  141. package/dist/src/gateway/progress-watch-machine.d.ts +0 -45
  142. package/dist/src/gateway/progress-watch-machine.js +0 -70
  143. package/dist/src/gateway/progress-watch-machine.js.map +0 -1
  144. package/dist/src/gateway/state-v2-to-v3.d.ts +0 -24
  145. package/dist/src/gateway/state-v2-to-v3.js +0 -1034
  146. package/dist/src/gateway/state-v2-to-v3.js.map +0 -1
  147. package/docs/CONFIGURATION.zh-CN.md +0 -93
  148. package/docs/DASHBOARD.md +0 -98
  149. package/docs/DASHBOARD.zh-CN.md +0 -49
  150. package/docs/DELIVERY.zh-CN.md +0 -55
@@ -1,40 +1,34 @@
1
1
  # Embassy Gateway Architecture
2
2
 
3
- Status: local bidirectional routing is implemented for Claude, Codex, DeepSeek,
4
- Grok, and universal shell peers. Configured Embassy nodes federate allowlisted
5
- named routes over a fixed attach-only SSH transport. The published package
6
- supports macOS, the only platform exercised end to end so far.
3
+ Local bidirectional routing between Claude Code sessions, Codex CLI tasks,
4
+ and universal shell peers, with optional federation of named routes between
5
+ the operator's own machines over a fixed attach-only SSH transport. The
6
+ published package supports macOS, the only platform exercised end to end.
7
7
 
8
- This document uses four evidence labels:
8
+ This document uses three evidence labels:
9
9
 
10
10
  - **Official**: documented by Anthropic or OpenAI.
11
- - **Implemented**: present in this worktree and covered by deterministic tests.
12
- - **Observed**: established by a bounded, read-only local feasibility probe.
13
- - **Planned**: designed but not yet integrated or live-validated.
14
-
15
- A bounded real test completed native Claude discovery and messaging, held a
16
- message while the registered Codex task was active, automatically started the
17
- queued turn after idle, and delivered the exact final reply back to Claude.
11
+ - **Implemented**: present in this tree and covered by deterministic tests.
12
+ - **Observed**: established by a bounded, read-only local probe.
18
13
 
19
14
  ## Purpose and boundary
20
15
 
21
16
  The gateway lets already-running Claude Code sessions and explicitly
22
- registered native Codex tasks address one another by short aliases. Both
23
- directions require an explicit permission edge. The broker runs in `paired`
24
- inbound mode by default, so an inbound native Claude message is admitted only
25
- from a session that already holds a pair edge to the addressed Codex task;
26
- `embassy serve --inbound open` is the explicit opt-out that restores any exact
27
- compatible live same-UID session as an inbound sender without making it
28
- outbound-selected. Outbound Codex-to-Claude sends likewise require the pair
29
- edge, created by `pair` or the one-task `select-claude` shorthand. It provides
17
+ registered native Codex tasks address one another by short aliases. The
18
+ permission to message is the boundary the broker already sits inside: the same
19
+ UID, the same host — or a host the operator listed in the private `nodes.json`
20
+ — and an exact alias. There is no separate, revocable grant between two
21
+ endpoints, because no such record could defend against software already
22
+ running as that UID; what the broker guarantees instead is attribution, and a
23
+ discovered Claude session's route installs on its first use rather than by a
24
+ separate command. It provides
30
25
  a single private operational view across the two products without rebuilding
31
26
  either agent runtime.
32
27
 
33
28
  Provider versions are best-effort diagnostic metadata, never routing authority.
34
- An explicit pair plus the exact owned route and session identity authorizes an
29
+ The OS boundary plus the exact owned route and session identity authorizes an
35
30
  attempt; the current per-operation transport, strict wire, capability, and
36
- correlated operation facts decide its result. The release-owned offline support matrix is
37
- the tested-artifact record and is never imported by runtime. Unsafe OS evidence
31
+ correlated operation facts decide its result. Unsafe OS evidence
38
32
  for Embassy-owned or executed artifacts and Embassy callback, control, or state
39
33
  paths refuses broker startup; unsafe UID or mode evidence on Claude's external
40
34
  sessions registry root quarantines only Claude. A Claude session record whose
@@ -50,12 +44,8 @@ It is deliberately:
50
44
  - unable to create Codex sidebar task cards or Claude session UI.
51
45
 
52
46
  Embassy uses one private same-user Unix-domain control socket for its thin
53
- clients and generates a private static dashboard page in each supported
54
- language. `embassy serve` does not add a TCP listener, HTTP server, or public
55
- API. The opt-in `embassy dashboard --live` companion is a separate foreground
56
- process that binds an unauthenticated stable-port listener with four bounded
57
- route actions on exact `127.0.0.1`; it is
58
- described under [Live dashboard companion](#live-dashboard-companion).
47
+ clients. `embassy serve` does not add a TCP listener, HTTP server, or public
48
+ API.
59
49
 
60
50
  ### Why this uses the new feature, but is not skill-only
61
51
 
@@ -67,9 +57,9 @@ Claude–Codex address book the user wants.
67
57
 
68
58
  The repo-shipped skill is the lightweight user/agent interface. A persistent
69
59
  local broker is still required to own the private control socket, retain
70
- transient reply correlation, publish native advertisements, queue while a Codex
71
- task is busy, and regenerate the dashboard between agent turns. The skill does
72
- not wrap, replace, or recreate either provider.
60
+ transient reply correlation, publish native advertisements, and queue while a
61
+ Codex task is busy. The skill does not wrap, replace, or recreate either
62
+ provider.
73
63
 
74
64
  ## What is official and what is internal
75
65
 
@@ -105,11 +95,12 @@ Consequences:
105
95
  explicitly marked `codex-*` gateway peer.
106
96
  - The gateway discovers compatible real Claude sessions as transient
107
97
  candidates, but publishes only sanitized aliases and state. A send from a
108
- registered Codex task may address only an explicitly selected route by its
109
- current name or UUID. Per-message consent stays native: delivery lands in the
98
+ registered Codex task addresses a session by its current name or its UUID,
99
+ and the broker installs that session's logical route on this first use.
100
+ Per-message consent stays native: delivery lands in the
110
101
  Claude session's own `crossSessionInbound` policy and approval flow.
111
- - Codex aliases are discovered through the gateway CLI/skill and dashboard,
112
- not through `ListAgents`.
102
+ - Codex aliases are discovered through the gateway CLI/skill, not through
103
+ `ListAgents`.
113
104
  - A gateway-owned anonymous callback UDS can receive a correlated reply. It
114
105
  does not need, and must not create, a Claude registry record.
115
106
 
@@ -122,20 +113,6 @@ turn start, turn steer, turn interrupt, and notifications. Embassy exposes
122
113
  `turn/steer` only behind the exact Claude-to-Codex `STEER:` contract described
123
114
  below; there is no generic RPC surface.
124
115
 
125
- **Official:** for an SSH project, the ChatGPT desktop app starts the remote
126
- Codex App Server through SSH using the remote user's login shell. Files,
127
- commands, credentials, permissions, plugins, skills, and local tools come from
128
- that execution host. App Server transports should not be exposed directly on
129
- a shared or public network.
130
-
131
- **Observed:** this Desktop build connects to a host-local App Server on each
132
- execution host. Remote tasks on `build-mac` do not route through the local App
133
- Server. Desktop reaches the remote listener through an SSH `app-server proxy`.
134
- A second attach-only client successfully initialized against the already-owned
135
- `build-mac` listener and called only `thread/loaded/list` without creating a turn.
136
- The same topology is expected for `lab-mac.example`, but that host has not been
137
- probed by this project.
138
-
139
116
  ## Topology
140
117
 
141
118
  ```text
@@ -146,14 +123,12 @@ probed by this project.
146
123
  │ │ callback replies
147
124
  ▼ ▼
148
125
  ┌──────────────────────── local singleton gateway ───────────────────────┐
149
- │ private control UDS │ retained bodies │ metadata state │ static HTML │
150
- └──────────┬──────────┴──────────────────┴────────────────┴──────────────┘
126
+ │ private control UDS │ retained bodies │ metadata state │ public snapshot │
127
+ └──────────┬──────────┴──────────────────┴────────────────┴─────────────────┘
151
128
  │
152
129
  ├─ local Codex App Server ─ registered native local tasks
153
130
  │
154
- ├─ planned attach-only SSH proxy ─ build-mac App Server
155
- │
156
- └─ planned attach-only SSH proxy ─ lab-mac.example App Server
131
+ └─ optional federation ─ ssh <node> embassy peer-stdio ─ peer broker
157
132
 
158
133
  Claude-side skill/CLI ─ private control UDS ─ gateway
159
134
  Codex-side skill/CLI ─ private control UDS ─ gateway
@@ -166,32 +141,28 @@ wake a different idle runtime after that turn ends.
166
141
 
167
142
  ## Component status
168
143
 
169
- The status below is intentionally narrower than the target architecture.
144
+ Everything below is exercised by the deterministic suite; live validation is
145
+ a separately authorized operator action (see [Validation boundary](#validation-boundary)).
170
146
 
171
147
  | Component | Current evidence |
172
148
  | --- | --- |
173
- | Neutral gateway types, native-v3 metadata store, bounded attempt state machine, queues, dedupe, rate limits, and public projection | **Implemented**, deterministic tests; message bodies persist under bounded retention |
149
+ | Neutral gateway types, schema-5 metadata store, bounded attempt state machine, queues, dedupe, rate limits, and public projection | **Implemented**, deterministic tests; message bodies persist under bounded retention |
174
150
  | Private JSONL control protocol over a controller-owned UDS | **Implemented**, deterministic synthetic tests; no provider connection required |
175
- | Static metadata-only dashboard renderer and atomic publisher | **Implemented**, deterministic security tests; the static renderer requires no browser or HTTP server |
176
- | 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` |
177
- | 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 |
151
+ | Claude registry/peer adapter with strict peer protocol 1 and per-operation validation | **Implemented**; deterministic tests cover discovery, native status frames, cancellation, and accessible-workspace validation |
178
152
  | Claude current-user runtime roots | **Implemented**; derives the registry and callback roots from the verified OS user without inspecting a launcher or configuration file |
179
153
  | Stateless allowlisted Codex App Server transport with bounded busy behavior | **Implemented**; every operation opens and attests its own transport, and the conformance suite covers idle gating, exact `STEER:` behavior, clean retry, and ambiguous no-replay settlement |
180
154
  | Attach-only local Codex proxy transport and exact-owned cleanup | **Implemented**, five deterministic tests; no live App Server connection in routine tests |
181
- | Local provider adapters and Embassy-node federation | **Implemented**, focused synthetic tests cover Claude discovery, exact Codex ownership, lazy ACP-backed DeepSeek and Grok routes with provider-local degradation and cleanup, plus bounded catalog reconciliation and destination-owned handoff over the fixed attach-only SSH transport |
155
+ | Local provider adapters and Embassy-node federation | **Implemented**, focused synthetic tests cover Claude discovery, exact Codex ownership, plus bounded catalog reconciliation and destination-owned handoff over the fixed attach-only SSH transport |
182
156
  | Universal shell peer mailbox | **Implemented**, alias-plus-token same-UID attribution, hash-only durable ownership, bounded long polling, stdout-flush receipts, and restart uncertainty tests; no PID binding, token file, Keychain entry, or daemon |
183
- | Gateway service composition | **Implemented**, including private control-server startup, synthetic cross-provider selection/dispatch/reply correlation, metadata-only publication, and restart attempt-phase tests |
184
- | 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 private-v3 correlation handles, restart continuity, the closed status/terminal schema, and one-shot/bounded-wait CLI behavior |
157
+ | Gateway service composition | **Implemented**, including private control-server startup, synthetic cross-provider route installation/dispatch/reply correlation, bounded public-snapshot projection, and restart attempt-phase tests |
158
+ | 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 private-v5 correlation handles, restart continuity, the closed status/terminal schema, and one-shot/bounded-wait CLI behavior |
185
159
  | 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 |
186
160
  | Operator/agent client CLI and package binary | **Implemented**, deterministic private-UDS tests cover the closed command family, inherited provider identity, bounded stdin-only bodies, normalized output, and ambiguous no-retry behavior |
187
161
  | Repo-shipped cross-provider skill | **Implemented** as a repo-scoped workflow over the client CLI; it is not installed into either provider's global configuration |
188
162
  | Foreground local broker launcher and provider assembly | **Implemented** as `embassy serve`; local-host-only with native messaging enabled |
189
- | Live Codex-to-Claude delivery | **Tested** through selected real Claude 2.1.224–2.1.226 sessions |
190
- | Claude-initiated Codex turn/reply into Codex | **Tested** with a real busy Codex task: native `busy → waiting`, automatic post-idle turn, terminal delivery status, and exact reply round trip |
191
- | Remote production connector | **Planned**; only the `build-mac` read-only attach feasibility probe is complete |
192
163
 
193
164
  Synthetic tests do not scan `~/.claude`, connect `/tmp/cc-socks`, attach to a
194
- Desktop App Server, invoke SSH, or make a model request.
165
+ live App Server, invoke SSH, or make a model request.
195
166
 
196
167
  ## Identity, discovery, and opt-in
197
168
 
@@ -209,7 +180,7 @@ claude-advisor@this-mac
209
180
  Claude's native `sessionId` UUID is its sole logical identity. Its current
210
181
  name is a mutable lookup alias for that UUID; the gateway keeps no historical
211
182
  name index. A rename therefore makes the old name stop resolving immediately,
212
- while the UUID and an already selected UUID-bound route continue to identify
183
+ while the UUID and an already installed UUID-bound route continue to identify
213
184
  the same session. PID, registry path, process generation, and socket generation
214
185
  are replaceable delivery coordinates, not identity, and are refreshed from the
215
186
  live registry before a write. The gateway rejects duplicate current names and
@@ -225,18 +196,11 @@ Codex registration is explicit. A task registers its own alias and
225
196
  authoritative `CODEX_THREAD_ID`; the gateway does not enumerate global Codex
226
197
  history to invent routes. Registration performs no provider I/O. Each delivery
227
198
  opens a fresh attested App Server transport, initializes it, resumes the exact
228
- private task with history excluded, and authorizes one body write. Endpoint or
229
- Desktop restart is therefore a transport fact, not a logical route transition;
199
+ private task with history excluded, and authorizes one body write. An App
200
+ Server restart is therefore a transport fact, not a logical route transition;
230
201
  an unavailable or duplicate exact task fails that operation with a safe code
231
202
  without retargeting the alias or replaying an ambiguous write.
232
203
 
233
- The live dashboard exposes the bounded `remove_codex_registration` operation.
234
- It carries only one public canonical `codex-*` alias and requires explicit
235
- operator confirmation of the consequences. In one fencing commit the broker
236
- cancels queued or reserved work, settles armed work ambiguous and accepted work
237
- unconfirmed, removes that registration and its incident consent edges, and
238
- never replays uncertain work. The browser cannot name a thread ID.
239
-
240
204
  Claude discovery is passive and limited to currently advertised genuine
241
205
  Claude session records. Only a validated native record bearing the supported
242
206
  explicit versioned Embassy-advertisement marker is classified as a gateway
@@ -262,20 +226,73 @@ correlation, accessibility, liveness, and generation checks above without an
262
226
  invented additional owner or mode rule. A current name resolves to a UUID but
263
227
  never substitutes for it.
264
228
 
265
- A selected Claude UUID remains the durable route identity until explicit
266
- unselection. Discovery publishes only bounded sanitized candidates and current
267
- lookup aliases; it never changes the selected UUID. Immediately before a
229
+ An installed Claude route keeps its UUID as durable identity until a
230
+ different session claims its alias and displaces it; there is no operator
231
+ command that retires one.
232
+ Discovery publishes only bounded sanitized candidates and current
233
+ lookup aliases; it never changes the installed UUID. Immediately before a
268
234
  Claude-bound write, Embassy performs a fresh bounded registry scan, resolves
269
235
  that byte-identical UUID exactly once, and revalidates its current workspace,
270
236
  process, socket, and used-artifact generation. An incomplete scan, duplicate
271
- name or UUID, changed UUID, or unsafe current coordinate fails that operation
272
- closed. A name alone never restores or retargets a durable selection.
273
-
274
- The dashboard is the single pane for the human. It shows both sanitized
275
- available/selected Claude aliases and explicitly registered Codex aliases,
276
- including their host, current state, last-seen age, and queue depth.
237
+ UUID, changed UUID, or unsafe current coordinate fails that operation closed.
238
+ A duplicate display name is fenced from listing and from every send that
239
+ addresses it BY NAME, and the fence is re-evaluated inside the
240
+ send path, never only on the discovery timer. The fence is a fence on names:
241
+ a session UUID is unambiguous, so an operator-supplied UUID remains the
242
+ recovery selector and reaches the session even while its name collides, and a
243
+ sender whose own display name collides is never silenced, because its identity
244
+ was attested rather than typed. A pre-bound route retains its identity-pinned
245
+ binding, and a name alone never restores or retargets a durable route.
246
+
247
+ `embassy status` is the single pane for the human, and it is read-only: it
248
+ makes exactly one call, `list_snapshot`, and never `refresh_discovery`, so the
249
+ scan it reports is the broker's own and a status loop cannot journal anything.
250
+ Its `sessions` block is the sanitized `availablePeers` inventory — every live
251
+ Claude session the last scan found, by current name, marked `routed` once a
252
+ route exists for it — and its header says how old that scan is, offering
253
+ `embassy refresh` when it is older than a minute — that age is read from the
254
+ newest discovered session's own stamp, because the connector's `lastSeenAt`
255
+ also moves on a delivery. Below the sessions come the
256
+ routes: routed Claude aliases and explicitly registered Codex aliases, with
257
+ provider, current state, queue depth, and last-seen age. The same
258
+ pane also carries the bounded ledger's retained message bodies, so its output
259
+ is as sensitive as the messages themselves.
277
260
  The thin skill/CLI exposes the same safe alias list to either provider.
278
261
 
262
+ That pane has two forms of the same snapshot. Piped, or with `--json`, it is
263
+ the snapshot verbatim — the form every script and the skill read. On a
264
+ terminal it is rendered by `status-view.ts`, a pure function of the snapshot
265
+ and the reader's clock: it derives one of four plain words per connector
266
+ (`ok`, `stale`, `degraded`, `offline`) and pairs every word that is not `ok`
267
+ with its safe code and a one-line remedy. Two clocks govern staleness, and
268
+ they are deliberately far apart. The broker's own connector window is 35
269
+ seconds (`CONNECTOR_OBSERVATION_STALE_AFTER_MS`), and it is crossed routinely
270
+ and innocently — the Codex observer polls one route at a time every 15
271
+ seconds, and Claude routes are not polled at all: their evidence is
272
+ edge-triggered, written when a discovery scan or a delivery observes the
273
+ session, so a quiet Claude session's `lastSeenAt` stops advancing while the
274
+ session is perfectly alive. The view therefore keeps the broker's word until
275
+ a route has gone unobserved for ten minutes, and only then calls it `stale`;
276
+ past that backstop a Codex route earns the succession remedy only when it
277
+ also carries a code that says the task itself is gone (`THREAD_NOT_OBSERVED`)
278
+ — bare silence says the task may be busy or the app-server slow. A Claude
279
+ route whose alias the latest scan still lists is never `stale`: the scan is
280
+ fresher evidence than the route's own observation, so the discovered state is
281
+ shown with `discovered <age>` as its last-seen cell, and a Claude route past
282
+ the backstop that the scan no longer lists says the session exited or renamed.
283
+ A connector that merely has nothing to observe is `stale`, never `degraded`,
284
+ and a shell peer with unclaimed mail never moves the overall word at all:
285
+ silence in a pull mailbox is a fact about the operator's other terminal.
286
+ `embassy watch` tails the same snapshot through `observe_snapshot` once a
287
+ second, printing each new message row and each settlement at most once — a
288
+ transition passed through entirely between two polls is never seen, and rows
289
+ evicted from the retained window before the tail read them are announced as
290
+ a note. `embassy check` proves the whole path end to end — it registers an
291
+ ephemeral `peer-*` principal of its own, sends one marked body through the
292
+ ordinary send path, waits for `delivered`, then awaits the correlated reply on
293
+ its own mailbox, and releases the registration again; the broker retires the
294
+ registration itself if the check never gets to.
295
+
279
296
  ## Message flows
280
297
 
281
298
  ### Codex to Claude
@@ -285,10 +302,10 @@ The thin skill/CLI exposes the same safe alias list to either provider.
285
302
  and bounded text.
286
303
  2. The gateway checks thread ownership, selector state, rate and size limits,
287
304
  deadline, and dedupe state.
288
- 3. It requires the selector to match an explicitly selected live UUID,
289
- refreshes the UUID's current process/socket coordinates, and revalidates
290
- the selected Claude peer's canonical workspace access and exact generation
291
- before every send.
305
+ 3. It resolves the selector against a discovery scan run inside this send,
306
+ installing the session's route if this is its first use, then refreshes the
307
+ UUID's current process/socket coordinates and revalidates that Claude
308
+ peer's canonical workspace access and exact generation before every send.
292
309
  4. Immediately before the native write, it composes one broker-owned canonical
293
310
  `cross-session-message` textual frame with bounded sender attribution and a
294
311
  first-child reply hint containing the full conversation token, exact aliases,
@@ -325,15 +342,12 @@ final reply.
325
342
  2. A real Claude session uses native `ListAgents` and `SendMessage`; the
326
343
  gateway validates that exact live registry/socket generation and treats the
327
344
  text as untrusted user-role input. This inbound observation grants only a
328
- transient, in-memory capability for the correlated reply. It does not add a
329
- Claude route, flip `selected`, or authorize a later unsolicited send.
330
- In paired mode — the default — a sender without the exact permission edge is
331
- refused before message admission with `SENDER_NOT_PAIRED`. No message is
332
- accepted, so no delivery is created, but the refusal is not silent: the
333
- broker records it as a `rejected` journal event carrying the direction, both
334
- aliases, the byte count, and the safe error code, and increments the
335
- rejected counters on the accounting, the source route, and any matching
336
- pair.
345
+ transient, in-memory capability for the correlated reply. The sending
346
+ session's own route is installed here, from the exact identity the adapter
347
+ attested, so the Codex task's reply travels the ordinary path; the alias the
348
+ adapter reports must be the one discovery shows for that UUID, and a
349
+ mismatch is refused rather than silently renamed. Installing the route
350
+ authorizes nothing beyond what addressing already implied.
337
351
  3. The Claude process's inherited messaging-socket value may be accepted as a
338
352
  transient reply address after strict validation. Claude Code exports
339
353
  `CLAUDE_CODE_MESSAGING_SOCKET` as a raw absolute socket path; the CLI
@@ -367,7 +381,7 @@ final reply.
367
381
  deliberate: stall visibility must not scale with the deadline, so under the
368
382
  default four-hour deadline the notice fires at two minutes, not two hours.
369
383
  `quiet` suppresses this gateway-authored frame without changing native status
370
- or dashboard state.
384
+ or public snapshot state.
371
385
  8. A later bounded attempt opens a new transport and starts the held message
372
386
  after it observes the exact task idle. A route retains at most three queued steering
373
387
  messages; accepting a fourth atomically cancels the oldest with safe code
@@ -398,7 +412,7 @@ not uniquely re-observed with peer protocol 1, the write fails closed. A termina
398
412
  write whose outcome is ambiguous is never replayed; only a proven pre-write
399
413
  failure may be retried while the bounded in-memory receipt remains live. The
400
414
  receipt correlation does not add the UUID or receipt handle to public output
401
- or durable state; a separately selected route may already persist that same
415
+ or durable state; a separately installed route may already persist that same
402
416
  Claude UUID as its private native route handle.
403
417
 
404
418
  Delivery callback arrival is timestamped at the service boundary. A terminal
@@ -422,8 +436,8 @@ next-tool-call-boundary rules above.
422
436
 
423
437
  ### Provenance framing and conversation continuation
424
438
 
425
- The broker classifies `STEER:`, `TRACK:`, and `DONE:`, enforces raw-byte body
426
- limits, deduplicates, and queues before presentation framing.
439
+ The broker classifies `STEER:`, enforces raw-byte body limits, deduplicates,
440
+ and queues before presentation framing.
427
441
  The store therefore retains only the raw unframed body, never the composed
428
442
  envelope. A pure composer runs at the final semantic provider-write boundary so
429
443
  a clean retry produces the same bytes with exactly one authoritative outer
@@ -445,7 +459,7 @@ broker-owned `cross-session-message` outer element and an
445
459
  does not accept.
446
460
  - In either direction, the first hint carries the full token in `conversation`
447
461
  and the exact recipient alias in `reply-as`, followed by an exact stdin-based
448
- `embassy reply --conversation ... --alias ...` instruction and the statement
462
+ `embassy send --conversation ... --from ...` instruction and the statement
449
463
  that caller, conversation, and route policy are rechecked.
450
464
 
451
465
  Embassy does not synthesize `from`, `from-session`, or `from-mode` attributes:
@@ -463,20 +477,21 @@ consistent structural provenance marker at the model input boundary. A native
463
477
  Claude wrapper already present in an inbound body is untrusted nested text
464
478
  beneath the Embassy wrapper.
465
479
 
466
- The full token delivered in the hint lets the recipient call `reply`, but it is
467
- only a participant-scoped conversation locator. The service still validates
480
+ The full token delivered in the hint lets the recipient answer with
481
+ `send --conversation`, but it is only a participant-scoped conversation
482
+ locator. The service still validates
468
483
  the inherited caller, current conversation membership, and current route
469
484
  policy. The full token remains confined to the accepted control result
470
485
  and transient provider payload, and is memory-only: it is never persisted,
471
- journaled, logged, snapshotted, rendered on a dashboard, placed in a receipt,
486
+ journaled, logged, snapshotted, placed in a receipt,
472
487
  or returned from suffix-only public correlation. Formatter,
473
488
  provenance-metadata, and framed-size failures are clean pre-write terminal
474
489
  failures; they can never become ambiguous writes or replay authorizations.
475
490
 
476
491
  The gateway exposes `turn/steer` only through an exact leading `STEER:` body in
477
492
  the Claude-to-Codex direction. The global `EMBASSY_STEERING_ENABLED` switch is
478
- on by default and exact `0` disables classification. The tested 0.147.0 schema
479
- requires `expectedTurnId`, rejects a nonmatching active turn, reports a clean
493
+ on by default and exact `0` disables classification. The 0.147.0 schema this
494
+ adapter targets requires `expectedTurnId`, rejects a nonmatching active turn, reports a clean
480
495
  `activeTurnNotSteerable` condition, and returns the accepted turn ID. Embassy
481
496
  validates all of those temporal correlations before settlement. `turn/interrupt`
482
497
  is never called or exposed, and there is no generic App Server RPC escape
@@ -484,15 +499,14 @@ hatch.
484
499
 
485
500
  ### Delivery status and bounded waits
486
501
 
487
- Every accepted control-plane `send_to_claude`, `send_to_codex`, or `reply`
502
+ Every accepted control-plane `send`
488
503
  result contains both its conversation ID and a fresh opaque delivery
489
504
  correlation handle called a delivery token.
490
505
  The token has the closed form `dlv_` followed by exactly 24 base64url
491
506
  characters (`A-Z`, `a-z`, `0-9`, `_`, or `-`). It addresses one bounded
492
- private-v3 message/status row and is not a provider receipt handle or a
507
+ private schema-5 message/status row and is not a provider receipt handle or a
493
508
  provider native identifier. It is stored only in the mode-0600 broker state
494
- and never appears in a public snapshot, normal log, provider receipt, or
495
- dashboard.
509
+ and never appears in a public snapshot, normal log, or provider receipt.
496
510
 
497
511
  The read-only `delivery_status` method accepts only that token and returns one
498
512
  of these closed results:
@@ -539,7 +553,7 @@ never displaced to admit a new send. A pressure-evicted handle returns
539
553
  Conversation IDs correlate replies, and callback addresses exist only in
540
554
  memory, but message bodies and their bounded attempt phase are durable. After a
541
555
  gateway restart, queued or reserved work may resume once against the same
542
- logical route and consent edge. Work that crossed the armed boundary settles
556
+ logical route. Work that crossed the armed boundary settles
543
557
  `ambiguous`; provider-accepted work without terminal evidence settles
544
558
  `unconfirmed`. Neither is replayed. Work already past its deadline settles
545
559
  `expired`.
@@ -548,8 +562,8 @@ The delivery token and status of each retained message survive the restart: a
548
562
  queued or reserved attempt remains inspectable while it resumes, and armed or
549
563
  accepted work remains inspectable after it settles ambiguous or unconfirmed.
550
564
  Pending replies, callbacks, native receipt handles, and conversation
551
- capabilities do not survive. Logical registrations, Claude selections, and
552
- consent edges remain, while each subsequent provider operation must attest its
565
+ capabilities do not survive. Logical registrations and installed Claude routes
566
+ remain, while each subsequent provider operation must attest its
553
567
  own current transport facts.
554
568
 
555
569
  ## Gateway control plane
@@ -559,78 +573,97 @@ controller-owned mode-0700 state directory. The socket and state files are
559
573
  mode 0600. Frames are size-bounded and closed against unknown keys, methods,
560
574
  versions, and enum values.
561
575
 
562
- The closed version 1 method family is exactly these sixteen methods:
576
+ The closed version 3 method family is exactly these fourteen methods:
563
577
 
564
578
  - `health` and `list_snapshot`, a safe public snapshot;
565
579
  - `observe_snapshot`, a read-only projection that may settle already-due
566
580
  delivery deadlines before projecting;
567
- - `register_codex`, `unregister_codex`, and
568
- `remove_codex_registration` — explicit Codex registration and atomic
569
- `--succeeds` replacement, owner unregister, and confirmed operator removal;
570
- - `select_claude` and `unselect_claude`, from the current sanitized
571
- available-peer inventory;
572
- - `pair` and `unpair`, the two-endpoint permission edge;
581
+ - `register_codex` and `unregister_codex` — explicit Codex registration with
582
+ atomic `--succeeds` replacement, and owner unregister;
573
583
  - `delivery_status`, a lookup by an opaque correlation handle retained only in
574
- bounded private v3 state;
575
- - `untrack`, which closes one active progress watch by conversation token;
576
- - `send_to_claude` and `send_to_codex`, the provider-specific sends;
577
- - `reply`, the correlated reply operation; and
578
- - `refresh_dashboard`, which refreshes provider discovery and republishes.
579
-
580
- The live dashboard companion calls `observe_snapshot` for every read; its
581
- mutation route additionally calls `pair`, `unpair`,
582
- `remove_codex_registration`, and `refresh_dashboard`, and nothing else.
584
+ bounded private v5 state;
585
+ - `send`, whose direction follows the inherited principal — who is sending —
586
+ rather than the route table, and which installs a discovered Claude
587
+ session's route on its first use. It addresses either a route by name
588
+ (`toAlias`) or an open conversation by its token (`conversationId`), never
589
+ both: the conversation form is the correlated reply operation, and the
590
+ caller must already own one end of that conversation;
591
+ - `refresh_discovery`, which rescans for Claude sessions;
592
+ - `peer_catalog` and `peer_handoff`, the private federation catalog and
593
+ destination-owned handoff operations; and
594
+ - `register_peer`, `unregister_peer`, `await_peer`, and `peer_receipt`, the
595
+ shell-peer registration, mailbox, and flush-before-receipt operations. A
596
+ first registration may ask to be `ephemeral` with a bounded `ttlMs`
597
+ (default five minutes): the route is real in memory — it routes, queues,
598
+ and settles like any other — but it is projected out of the durable state
599
+ document together with every row that names it (its messages, dedupe and
600
+ rate rows, and journal entries), excluded from the federation catalog, and
601
+ retired by the broker's own clock, so it cannot survive a restart or be
602
+ restored on another node. Removal — by `unregister_peer` or by that clock —
603
+ takes the same rows out of the live state in the same write, so nothing of
604
+ it is written afterwards either; a retirement that fails is retried twice,
605
+ five seconds apart, then left to the next restart. The clock is guarded by
606
+ the registration's identity, so a durable route that later takes the same
607
+ alias is never retired by it. `embassy check` uses one.
583
608
 
584
609
  The installed binary is `embassy`, and it is the only installed binary. Its
585
- eighteen implemented commands are
586
- `serve`, `health`, `status`, `delivery-status`, `wait-delivery`, `untrack`,
587
- `refresh-dashboard`, `dashboard`, `register-codex`, `unregister-codex`,
588
- `select-claude`, `unselect-claude`, `pair`, `unpair`, `send-to-claude`,
589
- `send-to-codex`, `reply`, and `convert-state-v2-to-v3`. `dashboard` requires `--live` and accepts an
590
- optional `--lang en|zh-CN` and `--port <n>`; it starts the companion process
591
- rather than issuing a single control request. Message bodies are non-empty
610
+ seventeen implemented commands are
611
+ `serve`, `service`, `health`, `status`, `watch`, `check`, `delivery-status`,
612
+ `wait-delivery`, `refresh`, `register-codex`, `unregister-codex`, `send`,
613
+ `reply`, `register-peer`, `unregister-peer`, `await`, and
614
+ `peer-stdio`. `reply --conversation <token> --alias <own-alias>` is a
615
+ deprecated alias for `send --conversation <token> --from <own-alias>`: it
616
+ builds the same `send` request and is kept only until the reply hints already
617
+ delivered in older envelopes have aged out. Message bodies are non-empty
592
618
  UTF-8 from standard input only, with a 16 KiB ceiling; they are never accepted
593
- in an argument or file. The client emits one bounded normalized JSON line and
594
- never returns a thread ID, provider-native ID, path, address, or message body.
595
- These commands require the foreground broker, except that `serve` starts it in
596
- the current terminal and `convert-state-v2-to-v3` is an offline one-shot
597
- upgrade. The converter uses only the normally resolved state directory,
598
- requires the controller lock, installs strict native schema 3 through an
599
- fsynced atomic replacement, and reports only success plus the verified v2
600
- backup basename. It starts no provider, helper, listener, discovery, or control
601
- socket. The launcher never daemonizes itself.
619
+ in an argument or file. The client emits one bounded normalized JSON line, and
620
+ for every broker-protocol command it never returns a thread ID,
621
+ provider-native ID, path, or address, and only `status` and `watch` return
622
+ message bodies — the snapshot's own. There are three deliberate
623
+ exceptions, each of them about something the operator alone is looking at.
624
+ `service` reports its own plist path, its log path, and any program path in
625
+ the plist that is no longer on disk, because managing local files is what it
626
+ does. `status` on a terminal, `watch`, and `check` render for a person instead
627
+ of emitting that JSON line: `status` and `watch` show the snapshot's own
628
+ retained bodies (previewed to one control-free line) and the resolved state
629
+ directory, and `check` prints its own hops. Piped or with `--json`, `status`
630
+ and `watch` are machine-readable again, and every other command is unchanged. Every command but `serve` and `service` requires a running
631
+ broker: `serve`
632
+ starts one in the current terminal, and `service install|uninstall|status`
633
+ manages the macOS launchd agent that runs one, contacting no broker itself
634
+ apart from the bounded health check `install` reports at the end. The launcher
635
+ never daemonizes itself.
602
636
 
603
637
  `register-codex --alias <new> --succeeds <current>` is one atomic logical-route
604
638
  transaction. It verifies the inherited identity of the replacement task,
605
639
  settles the outgoing route's work according to recorded write phase, removes
606
- its incident consent edges and transient capabilities, and publishes only the
640
+ its transient capabilities, and publishes only the
607
641
  new registration. There is no prepared, activated, endpoint-generation, or
608
642
  manual-recovery state.
609
643
 
610
- `select-claude --alias <current-name@host>` and
611
- `select-claude --session <uuid>` select the same logical session.
612
- `send-to-claude --to` accepts either form only after explicit selection. UUID
644
+ `send --to <current-name@host>` and `send --to <uuid>` address the same logical
645
+ session, and either form installs its route on first use. UUID
613
646
  input is normalized to lowercase. No command returns the
614
647
  UUID, and no historical name remains routable after a rename.
615
648
 
616
- Provider-authorized mutations require one exclusive inherited principal.
649
+ Provider-authorized registration and send operations require one exclusive inherited principal.
617
650
  Codex registration, unregister, and Codex-to-Claude send require only a valid
618
651
  `CODEX_THREAD_ID`; they fail if a non-empty Claude messaging socket is also
619
652
  inherited. Claude-to-Codex send requires only the raw inherited Claude socket
620
- path and fails if a non-empty Codex thread ID is also present. `reply` likewise
621
- fails with both identities or neither. `pair` and `unpair` also require an
622
- exclusive inherited `CODEX_THREAD_ID`: naming both endpoints does not make them
623
- operator commands, and they fail `CODEX_IDENTITY_REQUIRED` from a plain terminal
624
- or `CALLER_IDENTITY_CONFLICT` from inside a Claude session.
625
-
626
- `select-claude` and `unselect-claude` are the operator-runnable shorthand.
627
- They do not ignore provider identity — they consume an inherited
628
- `CODEX_THREAD_ID` when one is present, to resolve the Codex end, and reject a
629
- malformed one — but they tolerate its absence and then resolve the Codex end
630
- from the sole registered task. Selection is not a weaker operation than
631
- `pair`: it atomically creates the same permission edge. The health, status,
632
- dashboard refresh, live dashboard, untrack, and serve commands are the ones
633
- that genuinely ignore provider identities.
653
+ path and fails if a non-empty Codex thread ID is also present. A
654
+ conversation-addressed send likewise fails with both identities or neither.
655
+
656
+ Installing a Claude route is a side effect of a send, not a command: the
657
+ sending principal is already attested, the addressed session is resolved
658
+ against a discovery scan performed inside that send, and the store binds the
659
+ route under the live-peer registration mode. A session already bound under the
660
+ same (host, session UUID) keeps its registration — and therefore its in-flight
661
+ conversations — and is renamed in place if its display name changed; a route
662
+ whose alias now names a different session is displaced, its work settled
663
+ `cancelled` with `ENDPOINT_RETIRED`, and both outcomes are journaled so
664
+ `embassy status` shows them. Agents are instructed to send only where the user
665
+ pointed them; that is an operating norm, not an additional gateway identity
666
+ check.
634
667
 
635
668
  The foreground command is:
636
669
 
@@ -638,15 +671,8 @@ The foreground command is:
638
671
  embassy serve
639
672
  ```
640
673
 
641
- `--inbound open` is the one security-relevant option:
642
-
643
- ```text
644
- embassy serve --inbound open
645
- ```
646
-
647
- The default is `paired`. `open` is the explicit opt-out that lets any exact
648
- compatible live same-UID Claude session send inbound without a pair edge; it is
649
- never implied and cannot be set through an environment variable.
674
+ `serve` takes no options. There is no inbound mode to choose: the broker has
675
+ one posture, and it is the OS boundary.
650
676
 
651
677
  Before provider validation, listener creation, or App Server attachment, the
652
678
  launcher acquires one fixed host-wide crash-reclaimable owner lease under the
@@ -655,8 +681,8 @@ controllers cannot be started for the same login account by choosing different
655
681
  state roots. It is the only instance lock Embassy takes: the pre-rename
656
682
  prototype state root is no longer read, locked, or mutated.
657
683
 
658
- It emits one normalized ready line, publishes the private dashboard, and
659
- holds the process until `SIGINT` or `SIGTERM`, when exact-owned resources are
684
+ It emits one normalized ready line and holds the process until `SIGINT` or
685
+ `SIGTERM`, when exact-owned resources are
660
686
  closed. Startup validates exact owned provider paths and binds controller-owned
661
687
  UDS listeners. Missing optional providers or a provider-local interface failure
662
688
  degrades only that surface. Unsafe ownership, path, symlink, lease, state,
@@ -668,54 +694,28 @@ does not publish candidates, select or connect to a peer, write a provider
668
694
  socket, request provider history, start a model turn, or contact a remote host.
669
695
  Validated target bindings may retain private native and socket-derived evidence
670
696
  memory-only until rescan or close, but none enters public state or persistence.
671
- Its ready result reports local host `this-mac`, dashboard filename
672
- `gateway-dashboard.html`, and `codexMode: "native_messaging"` without exposing
673
- paths.
697
+ Its ready result reports the exact local host — from `nodes.json`, or this
698
+ host's own hostname when that file is absent — and `codexMode: "native_messaging"`
699
+ without exposing paths.
674
700
 
675
701
  There is no arbitrary filesystem operation, shell command, SSH command, App
676
702
  Server method, Claude registry mutation, credential argument, approval reply,
677
703
  or raw diagnostic method.
678
704
 
679
- Same-UID socket access is a local containment boundary, not proof of a trusted
680
- agent process. Every mutation additionally checks route ownership, exact
681
- thread/session generation, source alias, bounds, and conversation state.
682
-
683
- ### Progress watches
684
-
685
- `send-to-claude`, `send-to-codex`, and `reply` each accept an opt-in `--track`
686
- flag that opens one progress watch over the resulting conversation, plus an
687
- optional `--idle-minutes <n>` that sets how long the watched thread may sit idle
688
- before each bounded liveness nudge. If the watch ultimately times out, Embassy
689
- records `settled` / `gateway` / `idle_timeout` only in watch history and emits
690
- no runtime stall alert. `n` is an integer from 1 through 1440 and defaults to 5;
691
- supplying it without `--track` is an argument error. A body with
692
- an exact leading `TRACK:` prefix opens the same watch at the default idle window
693
- without the flag.
694
-
695
- `untrack --conversation conv_<token>` closes an active watch explicitly, and a
696
- body with an exact leading `DONE:` prefix closes it as completed; one message
697
- may not both open and complete a watch (`PROGRESS_WATCH_SIGNAL_CONFLICT`). The
698
- global `EMBASSY_TRACKING_ENABLED` switch is on by default and exact `0` disables
699
- the surface; `EMBASSY_MAX_WATCHES` bounds concurrent watches at 32 by default
700
- (hard cap 256).
705
+ Reaching the same-UID private control socket is the permission to message —
706
+ and it is a local containment boundary, not proof of a trusted agent process.
707
+ Every mutation additionally checks route ownership, exact
708
+ thread/session generation, source alias, bounds, and conversation state. A name
709
+ currently shared by more than one live Claude session is refused with
710
+ `PEER_ALIAS_COLLISION` inside the send that addressed it BY NAME; the broker
711
+ never resolves an ambiguous name by picking first. The fence is a fence on
712
+ names only: a session UUID is unambiguous, so a UUID selector still reaches its
713
+ session, and a sender is never fenced by its own display name because its
714
+ identity was attested rather than typed.
701
715
 
702
- A watch is independent evidence about thread activity, not delivery evidence. It
703
- may outlive an opener whose own delivery expired, so check the opener's
704
- `delivery-status` separately before assuming the assignment text arrived.
716
+ ## Codex connector and federation
705
717
 
706
- ## Codex connectors and remote hosts
707
-
708
- In the target multi-host design, each allowlisted execution host has a separate
709
- connector because each host has its own App Server and native state:
710
-
711
- - `this-mac`: the managed local App Server shared with Desktop;
712
- - `build-mac`: a host-local remote App Server reached through an attach-only SSH
713
- proxy; and
714
- - `lab-mac.example`: the same design, still unprobed and disabled by default.
715
-
716
- The shipped foreground launcher accepts only `this-mac`; it rejects any remote
717
- host configuration. The two SSH connectors above remain planned rather than
718
- runnable v1 routes.
718
+ Each broker's local connector has an explicit host identity, from `nodes.json` when federating or from this host's own hostname otherwise; `this-mac` has no reserved meaning. Configured peers exchange only body-free local catalogs and destination-owned handoffs over fixed SSH.
719
719
 
720
720
  The local connector resolves the managed standalone Codex release by exact
721
721
  owned path; it does not use `PATH`. That installation is separate from
@@ -731,7 +731,7 @@ unsubscribe, interrupt, archive,
731
731
  delete, history, shell, configuration, authentication, plugin,
732
732
  approval-response, and generic RPC methods remain excluded everywhere.
733
733
 
734
- The App Server capability first tested with 0.147.0 gates the privacy-preserving
734
+ The App Server 0.147.0 schema this adapter targets gates the privacy-preserving
735
735
  `thread/resume.excludeTurns` field behind initialization capability
736
736
  `experimentalApi: true`. The transport therefore hard-codes that one
737
737
  non-configurable capability solely to suppress history retrieval. The attempt's
@@ -750,9 +750,9 @@ does not participate. Embassy does not read or retain reported
750
750
  working-directory or policy fields, and a transport failure cannot discard the
751
751
  registration or its accepted queue.
752
752
 
753
- Version 1 never changes or independently classifies a Codex task's approval or
754
- sandbox policy. Offline `TurnStartParams` schema evidence from tested App
755
- Server 0.147.0 shows that
753
+ Embassy never changes or independently classifies a Codex task's approval or
754
+ sandbox policy. Offline `TurnStartParams` schema evidence from the App
755
+ Server 0.147.0 schema this adapter targets shows that
756
756
  policy overrides persist for the current and subsequent turns, so using them
757
757
  as per-message restrictions would silently mutate the native task. Embassy
758
758
  therefore starts the turn without overrides and leaves approval, sandbox, and
@@ -760,37 +760,24 @@ tool enforcement to the registered task's native Codex configuration. Explicit
760
760
  `codex-*` registration plus exact per-operation task and transport validation is the
761
761
  gateway reachability boundary; native task policy remains Codex's concern.
762
762
 
763
- A remote connector never starts, stops, replaces, signals, or unlinks a
764
- Desktop-owned App Server or its socket. If attach fails, the host is offline;
765
- Desktop remains responsible for lifecycle recovery. SSH aliases are fixed
766
- operator configuration, never model-provided strings. Normal OpenSSH host-key
767
- validation applies.
768
-
769
- ### Completed no-model feasibility evidence
770
-
771
- On 2026-08-07:
772
-
773
- - A no-model environment check in the current Codex task confirmed that the
774
- task tool process inherits `CODEX_THREAD_ID` and that its value matches the
775
- required UUID grammar. The check emitted booleans only and never printed or
776
- retained the identifier. This validates the repo skill/CLI premise that a
777
- Codex task can self-register without accepting its private thread ID as a
778
- command-line argument.
779
- - A local attach-only probe connected through a second proxy to managed Codex
780
- App Server 0.147.0, initialized, called only `thread/loaded/list`, and
781
- confirmed the current task was already loaded. It emitted normalized
782
- booleans and an aggregate count, then confirmed cleanup of only its own
783
- proxy process.
784
- - An authorized remote probe attached through a second SSH proxy to the
785
- already-running `build-mac` App Server (remote Codex CLI 0.145.0), initialized,
786
- and validated a schema-correct `thread/loaded/list`. It printed no task IDs,
787
- payloads, remote diagnostics, history, or credentials and left Desktop's
788
- original proxy alive.
789
-
790
- Both proxy processes required their exact-owned forced-cleanup fallback after
791
- the bounded graceful-close window; final cleanup was confirmed. These probes
792
- prove attach and loaded-task discovery on the tested versions. They do not
793
- prove notification fanout, approval routing, or writable task control.
763
+ ### Federation
764
+
765
+ Federation is the only cross-machine path. Each entry in `nodes.json` is an
766
+ OpenSSH `Host` alias; the broker dials `ssh <node> embassy peer-stdio` and
767
+ speaks the fixed peer protocol — version 2, three methods: `initialize`,
768
+ `catalog/get`, `handoff`. A peer's catalog is body-free (aliases, providers,
769
+ states), and its routes appear locally as `alias@host` mirrors behind opaque
770
+ references; a handoff is `delivered` when the destination durably accepts it,
771
+ after which the destination owns provider delivery, and anything lost after
772
+ that acceptance settles ambiguous and is never replayed. One hop only, no
773
+ forwarding. A node answering `initialize` with another protocol version
774
+ surfaces `PEER_PROTOCOL_MISMATCH` on its mirrored routes and in `embassy
775
+ status` instead of a tunnel fault. SSH aliases are fixed operator
776
+ configuration, never model-provided strings; normal OpenSSH host-key
777
+ validation applies, your SSH configuration owns keys, users, and ports, and
778
+ Embassy opens no listener of its own.
779
+
780
+ ### Offline App Server schema evidence
794
781
 
795
782
  The connector requires turn notifications to carry the exact `threadId` and
796
783
  correlates the exact `turn.id`; `item/completed` must carry the exact
@@ -818,122 +805,29 @@ next-tool-call timing boundary to App Server, treats a clean refusal as normal
818
805
  queue fallback, and treats malformed or write-ambiguous results as terminally
819
806
  uncertain without replay.
820
807
 
821
- The one Desktop restart needed for the local shared-App-Server feasibility
822
- test has already been completed. Building, running synthetic tests, starting
823
- the gateway, rendering the dashboard, and a future Claude peer-socket test do
824
- not themselves require another Desktop restart. A provider or Desktop major
825
- upgrade may change an internal interface; strict per-operation checks keep the
826
- responsible route closed if that interface no longer matches. Other providers
827
- remain available. If the attachment mode changes, a supporting release may
828
- require a separately announced controlled restart. The offline support matrix
829
- records what a release was tested with but never grants runtime authority.
830
-
831
- ## Dashboard
832
-
833
- Version 1 generates self-contained HTML files under the controller-owned state
834
- directory: `gateway-dashboard.html` and `gateway-dashboard.zh-CN.html`, both
835
- rendered from one typed catalog and both atomically replaced, mode 0600, on
836
- every publish. Each page links to the other; that in-page link is the only
837
- static language switch, and `refresh-dashboard` takes no `--lang`. Each page
838
- has inline CSS and a restrictive Content Security Policy, with no JavaScript,
839
- external assets, CDN, cookies, local storage, service worker, telemetry,
840
- mutation endpoint, or network listener.
841
-
842
- A static page is a point-in-time snapshot and never refreshes itself: it emits
843
- no meta refresh and the page tells the operator to re-run
844
- `embassy refresh-dashboard` and reload, or to use `embassy dashboard --live`.
845
-
846
- Each page assembles seven sections:
847
-
848
- - **Exchange** — aggregate gateway health plus every explicit cross-provider
849
- pair and its per-edge counters.
850
- - **Attention** — allowlisted alerts such as an unavailable route, protocol mismatch,
851
- queue full, or ambiguous delivery.
852
- - **Transit** — queued-message depth and bytes in flight.
853
- - **Progress supervision** — active progress watches and their state.
854
- - **Operator activity** — the broker's bounded public journal of accepted
855
- operator actions.
856
- - **Sessions** — first-class Claude, Codex, DeepSeek, Grok, and shell-peer provider rows,
857
- aliases, host, route state, and queue depth.
858
- - **Diagnostics** — best-effort observed metadata, per-host connector health,
859
- last safe code, deadline-pressure buckets, accounting totals, and the
860
- omission counters below. Normalized message direction and delivery state,
861
- timestamp, latency, byte count, and a short opaque message-ID suffix appear
862
- with the delivery rows.
863
-
864
- It never shows message content, prompts, replies, transcripts, titles, working
865
- directories, native IDs, PIDs, socket paths, endpoint paths, tool data, raw
866
- events, stderr, credentials, or configuration contents — retained bodies reach
867
- only the live companion, never these files. This is a controller-owned UI
868
- artifact, not a shared task file. The public snapshot has a 240 KiB projection
869
- budget and reports explicit omission counters whenever bounded rows are
870
- truncated: connectors, available peers, routes, pairs, progress watches,
871
- upstream and projected progress-watch events, upstream message events, message
872
- groups, message events, upstream alerts, attention items, and upstream and
873
- projected activity events.
874
-
875
- ### Live dashboard companion
876
-
877
- `embassy dashboard --live` is the opt-in browser view of broker state,
878
- including bounded retained bodies in delivery detail; the static dashboard's
879
- public projection remains metadata-only.
880
- It is a separate foreground process, not a mode of `embassy serve`: it holds no
881
- provider capability, owns no registry record, and reaches the broker over the
882
- same private control socket every other client command uses, so it reports the
883
- gateway as unavailable when nothing is serving.
884
-
885
- - **Bind.** One `http.createServer` listener binds exact `127.0.0.1` on stable
886
- port `41961` by default, or the integer from the per-invocation `--port <n>`
887
- option in the closed range 1024 through 65535. The direct root URL is
888
- `http://127.0.0.1:<port>/`. A collision fails with
889
- `LIVE_DASHBOARD_PORT_IN_USE` and directs the operator to `--port`; there is no
890
- ephemeral-port fallback. No other interface is bound.
891
- - **Access.** The root URL is usable concurrently from multiple windows, tabs,
892
- and browsers. There is no capability token, URL fragment, cookie, browser
893
- session, random instance path, or bootstrap file.
894
- - **Request checks.** The exact Host header is validated on every request.
895
- Navigation GETs may omit Origin; every POST requires the exact Origin plus
896
- `X-Embassy-Request: 1`. `OPTIONS` is not accepted, there are no CORS headers,
897
- and cross-origin reads are unavailable.
898
- - **Projection and actions.** The companion observes through
899
- `observe_snapshot`. Its only mutations are exact two-endpoint `pair`,
900
- `unpair`, `refresh_dashboard`, and `remove_codex_registration`
901
- control calls behind one closed `/action` route. The removal action carries
902
- only a canonical public `codex-*` alias; native task IDs never enter the
903
- browser contract. In one fencing commit it cancels queued or reserved work,
904
- settles armed work ambiguous and accepted work unconfirmed, removes the
905
- route's consent edges, and never replays uncertain work. The browser shows
906
- the consequence and requires
907
- explicit confirmation; the server rejects bodies over 1 KiB and limits the
908
- companion to six actions per minute. It cannot create a registration,
909
- succeed,
910
- send, reply, approve, interrupt, change settings, or invoke a generic/provider
911
- method. Each mutation touches only the edge it names: adding an edge never
912
- retires another, and removing one settles its accepted work before the
913
- change is published. Every action is followed by a
914
- fresh observation. An observation may
915
- settle already-due lifecycle deliveries before projecting, which is a broker
916
- timer effect, not additional browser authority.
917
- - **Containment.** The loopback server deliberately performs no local-process
918
- or UID authentication. It assumes a trusted single-user machine: any local
919
- software that can reach or spoof loopback can read the live view and invoke
920
- the bounded actions. Host, Origin, and sentinel checks constrain ambient
921
- browser-origin requests; they do not authenticate local software.
922
-
923
- `--lang en|zh-CN` selects the companion's display language. It has no effect on
924
- the static pair, which is always written in both languages.
808
+ ## Protocol and schema versions
809
+
810
+ Each number below is bumped once per release line, at first need, and a
811
+ mismatch is refused rather than adapted to:
812
+
813
+ | Surface | Version | On mismatch |
814
+ | --- | --- | --- |
815
+ | Private state schema (`gateway-state.json`) | 5 | An older or unknown schema refuses with `GATEWAY_STATE_SCHEMA_UNSUPPORTED`; reset only, never rewritten |
816
+ | Private control protocol (CLI ↔ broker) | 3 | `CONTROL_VERSION_MISMATCH` at the client; keep the CLI and broker on one installation. A method the broker does not implement is `UNKNOWN_METHOD`, and the CLI says to rebuild or update the client |
817
+ | Federation peer protocol (`peer-stdio`) | 2 | `PEER_PROTOCOL_MISMATCH` on that node's mirrored routes and in `embassy status` |
818
+ | Native Claude helper IPC protocol | 2 | Internal to one installation; the helper and broker ship together |
819
+ | Public snapshot schema (`embassy status --json`) | 2 | Unchanged across the 3.0 line |
820
+ | Claude peer protocol (consumed, not owned) | 1 | A session record declaring another value is rejected in isolation and counted |
925
821
 
926
822
  ## Persistence and privacy
927
823
 
928
824
  The private store may retain:
929
825
 
930
- - schema-3 logical registrations with aliases, registration IDs, and exact
826
+ - schema-5 logical registrations with aliases, registration IDs, and exact
931
827
  provider-native route handles inside the closed private binding schema;
932
- - consent edges tied to exact registration IDs, so alias reuse cannot inherit
933
- permission;
934
828
  - bounded messages with explicit `queued`, `reserved`, `armed`, `accepted`, or
935
829
  `terminal` attempt phase and normalized activity used for accounting and
936
- dashboard projection;
830
+ public projection;
937
831
  - timestamps, counters, dedupe/rate-limit records, and safe error codes.
938
832
 
939
833
  It also retains message bodies under bounded caps — the queued body of every
@@ -945,19 +839,18 @@ snapshot is a
945
839
  strict projection that removes private route handles, registration IDs, and
946
840
  operation-local endpoint evidence. The state directory is mode 0700 and state is mode 0600;
947
841
  provider-native identifiers never enter normalized events, public snapshots,
948
- the dashboard, CLI arguments/output, aliases, logs, or error text. On restart,
949
- logical routes and consent edges remain unchanged. Queued and reserved bodies
950
- may resume once only after their exact registration and consent authority is
842
+ CLI arguments/output, aliases, logs, or error text. On restart,
843
+ logical routes remain unchanged. Queued and reserved bodies
844
+ may resume once only after their exact registration authority is
951
845
  rechecked; armed and accepted work settles without replay. Callback, native
952
846
  receipt, conversation, and reply capabilities are not reconstructed.
953
847
 
954
- Private schema 3 is the binary's only native store format; the bounded public
955
- snapshot deliberately remains schema version 2. Upgrading an existing schema-2
956
- state requires the offline `embassy convert-state-v2-to-v3` command before
957
- starting the broker. It verifies and retains a byte-identical v2 backup, then
958
- atomically installs and reads back strict v3 state. The runtime performs no
959
- in-binary migration or best-effort rewrite; any non-v3 state produces the
960
- ordinary strict corrupt-state error.
848
+ Private schema 5 is the binary's only native store format; the bounded public
849
+ snapshot deliberately remains schema version 2. The runtime performs no
850
+ migration or best-effort rewrite. An old or unknown private schema refuses with
851
+ `GATEWAY_STATE_SCHEMA_UNSUPPORTED` without mutating the state file; the operator
852
+ must follow the reset-only runbook in `docs/CONFIGURATION.md`. A malformed
853
+ schema-5 document produces the ordinary strict corrupt-state error.
961
854
 
962
855
  ## Minimum filesystem and process access
963
856
 
@@ -969,11 +862,12 @@ user's interactive Claude history. The narrow live boundary is:
969
862
  directory;
970
863
  - create and later remove only its exact-owned callback socket inside the
971
864
  accessible Claude peer-socket directory, with inode/generation checks;
972
- - create its control socket plus metadata/dashboard files only inside its
865
+ - create its control socket plus metadata files only inside its
973
866
  separate controller-owned mode-0700 state directory;
974
- - attach to explicitly allowlisted Codex App Server endpoints; and
975
- - optionally execute fixed `ssh`/Codex proxy argv for allowlisted hosts, with
976
- no shell and no model-supplied command or hostname.
867
+ - attach to the managed local Codex App Server; and
868
+ - optionally execute the fixed `ssh <node> embassy peer-stdio` argv for each
869
+ node listed in `nodes.json`, with no shell and no model-supplied command or
870
+ hostname.
977
871
 
978
872
  It does not read Claude transcripts, settings, project state, credentials,
979
873
  Keychain, shell history, or unrelated user files. It does not copy, print,
@@ -994,27 +888,26 @@ paths, peers, and transports:
994
888
  | `/tmp/cc-socks` | At foreground startup, validate the private directory and create/remove only `/tmp/cc-socks/<gateway-pid>.sock` after inode/generation checks; search/stat genuine peers at passive discovery and connect one validated target only at the separately authorized send gate |
995
889
  | `~/.local/state/agent-embassy/.agent-embassy-state` | Validate or establish the exact ownership marker before creating the fixed host lease; an existing non-empty unmarked root is rejected without mutation |
996
890
  | `/usr/bin/lockf` and `/bin/cat` | Hold one fixed, non-waiting macOS advisory lease for the foreground controller; the helper receives no shell text, provider data, or model-supplied argument |
997
- | `/usr/bin/open` | Executed only by the opt-in `embassy dashboard --live` companion, to open the loopback dashboard URL in the operator's browser; no shell, a scrubbed fixed environment, and a bounded timeout and output cap |
998
891
  | `~/.local/state/agent-embassy/.gateway-host.lock` | Fixed per-login kernel-held lease acquired before provider setup; it remains here even when `EMBASSY_STATE_DIR` is overridden. Its bounded PID/token record is exact-cleanup metadata, not a path-only stale-lock authority; a crash releases the kernel lock and the next foreground process may acquire the existing file |
999
- | `~/.local/state/agent-embassy` (or explicit `EMBASSY_STATE_DIR`) | Default controller-owned store, control UDS, state lock, and static dashboard; an explicit absolute configuration may replace only these state surfaces |
892
+ | `~/.local/state/agent-embassy` (or explicit `EMBASSY_STATE_DIR`) | Default controller-owned store, control UDS, and state lock; an explicit absolute configuration may replace only these state surfaces |
1000
893
  | `~/.codex/packages/standalone` and `~/.codex/app-server-control/app-server-control.sock` | Resolve the exact owned managed Codex binary and attach to the already-running private local App Server; never bootstrap or unlink it |
1001
894
 
1002
895
  No grant to `~/.claude/projects`, the rest of
1003
896
  `~/.claude`, Keychain APIs, the full home directory, or
1004
- unrelated temporary files is required. Remote-host access is a later,
1005
- separately reviewed fixed-SSH-alias capability.
897
+ unrelated temporary files is required. Cross-machine reach is federation over
898
+ `ssh <node> embassy peer-stdio`, configured only in `nodes.json`.
1006
899
 
1007
- Selected Claude workspaces may contain the private controller-state directory. The
1008
- filesystem root and configured temporary roots are still rejected as
1009
- deliberately broad Claude workspaces. The user's home is selectable with the
900
+ A routed Claude session's workspace may contain the private controller-state
901
+ directory. The filesystem root and configured temporary roots are still
902
+ rejected as deliberately broad Claude workspaces, and that refusal happens
903
+ before any route is installed. The user's home is addressable with the
1010
904
  default controller-state root beneath it. A narrower project directory remains
1011
905
  the preferred least-context setup, but it is not mandatory.
1012
906
 
1013
907
  ## Failure and upgrade policy
1014
908
 
1015
909
  - Provider versions are best-effort metadata and never grant or remove routing
1016
- authority. The offline support matrix records tested artifacts, capabilities,
1017
- limitations, and dates without entering runtime. A session record whose peer
910
+ authority. A session record whose peer
1018
911
  protocol is not 1 is rejected per record and counted without stopping the
1019
912
  broker; interface drift degrades only its responsible provider.
1020
913
  - Unsafe ownership, path, symlink, lease, state, or generation evidence for
@@ -1026,8 +919,8 @@ the preferred least-context setup, but it is not mandatory.
1026
919
  gateway-owned state, unexpected paths, queue overflow, deadline expiry, and ambiguous writes are
1027
920
  normalized failures, never raw diagnostics.
1028
921
  - A provider disconnect fails or defers only the current operation. The next
1029
- eligible attempt opens and attests a new transport; logical registration and
1030
- consent do not depend on a connector lifecycle.
922
+ eligible attempt opens and attests a new transport; logical registration
923
+ does not depend on a connector lifecycle.
1031
924
  - The first successful Codex registration locks its exact alias, task, and host
1032
925
  until that registration is explicitly replaced or unregistered. Exact
1033
926
  re-registration remains idempotent.
@@ -1036,15 +929,15 @@ the preferred least-context setup, but it is not mandatory.
1036
929
  the one atomic transaction that changes the registered Codex identity. A
1037
930
  replacement must name the exact current registration on the same host, with
1038
931
  a different alias and thread. Embassy settles the outgoing registration's
1039
- work from its durable attempt phase, removes its consent edges and transient
932
+ work from its durable attempt phase, removes its transient
1040
933
  capabilities, and publishes only the replacement. No conversation, reply
1041
- capability, queued body, or permission transfers to the new identity, and no
934
+ capability, or queued body transfers to the new identity, and no
1042
935
  intermediate generation or manual-recovery state exists.
1043
936
  - No ambiguous mutation is retried automatically.
1044
937
  - A queued or reserved body survives process loss under bounded retention and
1045
938
  may resume once after exact logical authority is rechecked. Armed or accepted
1046
939
  work settles `ambiguous` or `unconfirmed` and is never replayed.
1047
- - A provider or Desktop update that changes an internal interface degrades its
940
+ - A provider update that changes an internal interface degrades its
1048
941
  responsible route while the broker and other providers remain available. A
1049
942
  Claude record outside peer protocol 1 is rejected per record, and every
1050
943
  current provider artifact used for an operation is re-attested before effect.
@@ -1053,11 +946,10 @@ the preferred least-context setup, but it is not mandatory.
1053
946
 
1054
947
  Routine validation is deterministic and synthetic: it does not inspect live
1055
948
  provider state, connect a provider socket, attach to App Server, invoke SSH, or
1056
- make a model request. The separately authorized local live tests recorded
1057
- above established discovery and both message directions. Remote production
1058
- connectors remain a separately reviewed future capability.
949
+ make a model request. Live validation is a separately authorized operator
950
+ action — `embassy check` is its everyday form — and is never part of CI.
1059
951
 
1060
- Only the synthetic layer is routine validation. Server/dashboard startup,
952
+ Only the synthetic layer is routine validation. Server startup,
1061
953
  discovery, and callback binding remain no-send operations; step 4 is the first
1062
954
  provider write. A real provider message is never enabled in CI.
1063
955