agent-embassy 1.0.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +68 -0
- package/CONTRIBUTING.md +25 -7
- package/README.md +66 -13
- package/README.zh-CN.md +41 -13
- package/SECURITY.md +80 -42
- package/assets/live-dashboard/app.css +14 -5
- package/dist/src/gateway/claude-helper-protocol.d.ts +3 -0
- package/dist/src/gateway/claude-helper-protocol.js +15 -1
- package/dist/src/gateway/claude-helper-protocol.js.map +1 -1
- package/dist/src/gateway/claude-helper-supervisor.d.ts +2 -0
- package/dist/src/gateway/claude-helper-supervisor.js +24 -1
- package/dist/src/gateway/claude-helper-supervisor.js.map +1 -1
- package/dist/src/gateway/claude-runtime.d.ts +0 -2
- package/dist/src/gateway/claude-runtime.js +6 -17
- package/dist/src/gateway/claude-runtime.js.map +1 -1
- package/dist/src/gateway/cli-copy.d.ts +1 -1
- package/dist/src/gateway/cli-copy.en.d.ts +4 -1
- package/dist/src/gateway/cli-copy.en.js +6 -3
- package/dist/src/gateway/cli-copy.en.js.map +1 -1
- package/dist/src/gateway/cli-copy.js +2 -0
- package/dist/src/gateway/cli-copy.js.map +1 -1
- package/dist/src/gateway/cli-copy.zh-CN.d.ts +4 -1
- package/dist/src/gateway/cli-copy.zh-CN.js +6 -3
- package/dist/src/gateway/cli-copy.zh-CN.js.map +1 -1
- package/dist/src/gateway/cli.d.ts +2 -5
- package/dist/src/gateway/cli.js +49 -73
- package/dist/src/gateway/cli.js.map +1 -1
- package/dist/src/gateway/codex-app-server.d.ts +1 -7
- package/dist/src/gateway/codex-app-server.js +10 -53
- package/dist/src/gateway/codex-app-server.js.map +1 -1
- package/dist/src/gateway/codex-local-transport.d.ts +10 -3
- package/dist/src/gateway/codex-local-transport.js +25 -9
- package/dist/src/gateway/codex-local-transport.js.map +1 -1
- package/dist/src/gateway/compatibility.d.ts +0 -27
- package/dist/src/gateway/compatibility.js +1 -101
- package/dist/src/gateway/compatibility.js.map +1 -1
- package/dist/src/gateway/config.d.ts +0 -3
- package/dist/src/gateway/config.js +4 -12
- package/dist/src/gateway/config.js.map +1 -1
- package/dist/src/gateway/control.d.ts +11 -20
- package/dist/src/gateway/control.js +50 -47
- 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 +12 -7
- package/dist/src/gateway/dashboard-copy.en.js +26 -21
- package/dist/src/gateway/dashboard-copy.en.js.map +1 -1
- package/dist/src/gateway/dashboard-copy.js +12 -7
- package/dist/src/gateway/dashboard-copy.js.map +1 -1
- package/dist/src/gateway/dashboard-copy.zh-CN.d.ts +12 -7
- package/dist/src/gateway/dashboard-copy.zh-CN.js +26 -21
- package/dist/src/gateway/dashboard-copy.zh-CN.js.map +1 -1
- package/dist/src/gateway/dashboard-model.d.ts +7 -9
- package/dist/src/gateway/dashboard-model.js +47 -16
- package/dist/src/gateway/dashboard-model.js.map +1 -1
- package/dist/src/gateway/dashboard.js +10 -10
- package/dist/src/gateway/dashboard.js.map +1 -1
- package/dist/src/gateway/live-dashboard-app/app.js +65 -55
- package/dist/src/gateway/live-dashboard-command.d.ts +5 -1
- package/dist/src/gateway/live-dashboard-command.js +18 -6
- package/dist/src/gateway/live-dashboard-command.js.map +1 -1
- package/dist/src/gateway/live-dashboard-http.d.ts +3 -4
- package/dist/src/gateway/live-dashboard-http.js +32 -93
- package/dist/src/gateway/live-dashboard-http.js.map +1 -1
- package/dist/src/gateway/live-dashboard-protocol.d.ts +1 -5
- package/dist/src/gateway/live-dashboard-protocol.js +0 -42
- package/dist/src/gateway/live-dashboard-protocol.js.map +1 -1
- package/dist/src/gateway/live-dashboard-server.d.ts +2 -2
- package/dist/src/gateway/live-dashboard-server.js +18 -4
- package/dist/src/gateway/live-dashboard-server.js.map +1 -1
- package/dist/src/gateway/live-dashboard-stream.js +26 -25
- package/dist/src/gateway/live-dashboard-stream.js.map +1 -1
- package/dist/src/gateway/live-dashboard.d.ts +3 -6
- package/dist/src/gateway/live-dashboard.js +6 -42
- package/dist/src/gateway/live-dashboard.js.map +1 -1
- package/dist/src/gateway/provenance-envelope.d.ts +16 -0
- package/dist/src/gateway/provenance-envelope.js +80 -0
- package/dist/src/gateway/provenance-envelope.js.map +1 -0
- package/dist/src/gateway/providers.d.ts +40 -33
- package/dist/src/gateway/providers.js +683 -302
- package/dist/src/gateway/providers.js.map +1 -1
- package/dist/src/gateway/server.d.ts +2 -0
- package/dist/src/gateway/server.js +8 -5
- package/dist/src/gateway/server.js.map +1 -1
- package/dist/src/gateway/service.d.ts +103 -23
- package/dist/src/gateway/service.js +1346 -272
- package/dist/src/gateway/service.js.map +1 -1
- package/dist/src/gateway/store.d.ts +39 -3
- package/dist/src/gateway/store.js +604 -44
- package/dist/src/gateway/store.js.map +1 -1
- package/dist/src/gateway/types.d.ts +90 -9
- package/dist/src/gateway/types.js +6 -0
- package/dist/src/gateway/types.js.map +1 -1
- package/docs/GATEWAY-ARCHITECTURE.md +155 -56
- package/package.json +3 -2
- package/skills/embassy-peer/SKILL.md +36 -7
- package/dist/src/gateway/claude-compatibility-scratch.d.ts +0 -18
- package/dist/src/gateway/claude-compatibility-scratch.js +0 -158
- package/dist/src/gateway/claude-compatibility-scratch.js.map +0 -1
- package/dist/src/gateway/live-dashboard-bootstrap.d.ts +0 -36
- package/dist/src/gateway/live-dashboard-bootstrap.js +0 -176
- package/dist/src/gateway/live-dashboard-bootstrap.js.map +0 -1
- package/docs/DESIGN.md +0 -134
|
@@ -119,7 +119,7 @@ export type ConnectorRecord = {
|
|
|
119
119
|
lastSeenAt?: string;
|
|
120
120
|
safeErrorCode?: string;
|
|
121
121
|
};
|
|
122
|
-
/** Metadata persisted for a queued message.
|
|
122
|
+
/** Metadata persisted for a queued message. Legacy rows may be bodyless. */
|
|
123
123
|
export type QueuedMessageMetadata = {
|
|
124
124
|
messageId: string;
|
|
125
125
|
messageIdSuffix: string;
|
|
@@ -131,13 +131,16 @@ export type QueuedMessageMetadata = {
|
|
|
131
131
|
enqueuedAt: string;
|
|
132
132
|
deadlineAt: string;
|
|
133
133
|
bytes: number;
|
|
134
|
-
|
|
134
|
+
/** Bounded same-user durable payload; absent only on pre-v1.2 rows. */
|
|
135
|
+
body?: string;
|
|
135
136
|
/** This message was admitted by the exact durable consent edge. */
|
|
136
137
|
pair?: true;
|
|
138
|
+
/** Target authority was transient and must never be reconstructed after restart. */
|
|
139
|
+
transientTarget?: true;
|
|
137
140
|
/** Exact Claude-to-Codex `STEER:` classification; absence means ordinary. */
|
|
138
141
|
steer?: true;
|
|
139
142
|
};
|
|
140
|
-
/** A
|
|
143
|
+
/** A dispatch value with the exact persisted body promoted to required. */
|
|
141
144
|
export type TransientQueuedMessage = QueuedMessageMetadata & {
|
|
142
145
|
body: string;
|
|
143
146
|
};
|
|
@@ -170,7 +173,8 @@ export type NormalizedMessageEvent = {
|
|
|
170
173
|
targetAlias: string;
|
|
171
174
|
state: DeliveryState;
|
|
172
175
|
bytes: number;
|
|
173
|
-
|
|
176
|
+
/** Retained payload; oldest values are evicted without removing metadata. */
|
|
177
|
+
body?: string;
|
|
174
178
|
steer?: true;
|
|
175
179
|
latencyMs?: number;
|
|
176
180
|
safeErrorCode?: string;
|
|
@@ -189,6 +193,34 @@ export type GatewayAccounting = {
|
|
|
189
193
|
bytesAccepted: number;
|
|
190
194
|
queuedBytes: number;
|
|
191
195
|
};
|
|
196
|
+
/**
|
|
197
|
+
* Private proof that one exact Codex task was re-anchored after its App Server
|
|
198
|
+
* endpoint generation changed. Native task and endpoint identifiers in this
|
|
199
|
+
* journal must never enter a public snapshot, event, error, or log.
|
|
200
|
+
*/
|
|
201
|
+
export type CodexEndpointRefreshJournalEvent = {
|
|
202
|
+
sequence: number;
|
|
203
|
+
timestamp: string;
|
|
204
|
+
alias: string;
|
|
205
|
+
hostId: string;
|
|
206
|
+
threadId: string;
|
|
207
|
+
oldEndpointGeneration: string;
|
|
208
|
+
newEndpointGeneration: string;
|
|
209
|
+
/** Broker-start proof; absent for a live endpoint-generation refresh. */
|
|
210
|
+
reason?: "boot_reactivation";
|
|
211
|
+
};
|
|
212
|
+
export declare const CODEX_ENDPOINT_REFRESH_JOURNAL_CAPACITY = 256;
|
|
213
|
+
/**
|
|
214
|
+
* Private durable evidence that an operator removed one safely proven stale
|
|
215
|
+
* Codex registration. No native task or endpoint identifiers are retained.
|
|
216
|
+
*/
|
|
217
|
+
export type CodexOrphanRemovalJournalEvent = {
|
|
218
|
+
sequence: number;
|
|
219
|
+
timestamp: string;
|
|
220
|
+
alias: string;
|
|
221
|
+
hostId: string;
|
|
222
|
+
};
|
|
223
|
+
export declare const CODEX_ORPHAN_REMOVAL_JOURNAL_CAPACITY = 256;
|
|
192
224
|
export type GatewayPersistedState = {
|
|
193
225
|
schemaVersion: 1;
|
|
194
226
|
createdAt: string;
|
|
@@ -208,6 +240,14 @@ export type GatewayPersistedState = {
|
|
|
208
240
|
progressWatchEvents: ProgressWatchJournalEvent[];
|
|
209
241
|
/** Bounded, body-free probe evidence keyed by provider surface and version. */
|
|
210
242
|
compatibilityAttestations: CompatibilityAttestation[];
|
|
243
|
+
/** Monotonic sequence for the bounded private endpoint-refresh journal. */
|
|
244
|
+
codexEndpointRefreshSequence: number;
|
|
245
|
+
/** Strictly private route-lifecycle evidence; never publicly projected. */
|
|
246
|
+
codexEndpointRefreshEvents: CodexEndpointRefreshJournalEvent[];
|
|
247
|
+
/** Monotonic sequence for bounded private operator-recovery evidence. */
|
|
248
|
+
codexOrphanRemovalSequence: number;
|
|
249
|
+
/** Strictly private orphan-removal evidence; never publicly projected. */
|
|
250
|
+
codexOrphanRemovalEvents: CodexOrphanRemovalJournalEvent[];
|
|
211
251
|
/** Strictly validated internal restart journal; never publicly projected. */
|
|
212
252
|
codexSuccession?: unknown;
|
|
213
253
|
};
|
|
@@ -263,9 +303,9 @@ export type PublicAvailablePeerSnapshot = {
|
|
|
263
303
|
lastSeenAt?: string;
|
|
264
304
|
safeErrorCode?: string;
|
|
265
305
|
};
|
|
266
|
-
export declare const gatewayActivityKinds: readonly ["discovery", "selection", "registration", "pairing", "watch"];
|
|
306
|
+
export declare const gatewayActivityKinds: readonly ["discovery", "selection", "registration", "pairing", "watch", "endpoint", "recovery"];
|
|
267
307
|
export type GatewayActivityKind = (typeof gatewayActivityKinds)[number];
|
|
268
|
-
export declare const gatewayActivityActions: readonly ["discovery_refreshed", "claude_selected", "claude_unselected", "codex_registered", "codex_succeeded", "codex_unregistered", "routes_paired", "routes_unpaired", "watch_ended"];
|
|
308
|
+
export declare const gatewayActivityActions: readonly ["discovery_refreshed", "claude_selected", "claude_unselected", "codex_registered", "codex_succeeded", "codex_unregistered", "routes_paired", "routes_unpaired", "watch_ended", "endpoint_refreshed", "codex_orphan_removed"];
|
|
269
309
|
export type GatewayActivityAction = (typeof gatewayActivityActions)[number];
|
|
270
310
|
/** Bounded, body-free operator activity retained for this broker process. */
|
|
271
311
|
export type PublicGatewayActivityEvent = {
|
|
@@ -275,7 +315,7 @@ export type PublicGatewayActivityEvent = {
|
|
|
275
315
|
action: GatewayActivityAction;
|
|
276
316
|
outcome: "accepted" | "rejected";
|
|
277
317
|
aliases: string[];
|
|
278
|
-
operatorAction:
|
|
318
|
+
operatorAction: boolean;
|
|
279
319
|
safeErrorCode?: string;
|
|
280
320
|
};
|
|
281
321
|
export declare const deadlinePressureBucketNames: readonly ["under_1m", "1m_to_5m", "5m_to_15m", "15m_to_60m", "over_60m"];
|
|
@@ -398,8 +438,49 @@ export type RebindStaleRouteInput = {
|
|
|
398
438
|
currentOwnerLease: string;
|
|
399
439
|
newBinding: PrivateRouteBinding;
|
|
400
440
|
reason: "endpoint_reobserved" | "peer_explicitly_reselected" | "peer_identity_reobserved";
|
|
441
|
+
/** Append exact private boot-recovery evidence in the refresh journal. */
|
|
442
|
+
journalReason?: "boot_reactivation";
|
|
443
|
+
state?: "idle" | "busy" | "awaiting_approval";
|
|
444
|
+
};
|
|
445
|
+
export type ReanchorCodexRouteInput = {
|
|
446
|
+
alias: string;
|
|
447
|
+
/** Exact private App Server thread identifier proved present by loaded/list. */
|
|
448
|
+
threadId: string;
|
|
449
|
+
/** Existing registration authority; a refresh never rotates this lease. */
|
|
450
|
+
ownerLease: string;
|
|
401
451
|
state?: "idle" | "busy" | "awaiting_approval";
|
|
402
452
|
};
|
|
453
|
+
export type ReanchorCodexRoutesInput = {
|
|
454
|
+
oldEndpoint: PrivateEndpointIdentity;
|
|
455
|
+
newEndpoint: PrivateEndpointIdentity;
|
|
456
|
+
/** Only the exact loaded/list-present subset is named here. */
|
|
457
|
+
routes: readonly ReanchorCodexRouteInput[];
|
|
458
|
+
};
|
|
459
|
+
export type ReanchorCodexRoutesResult = {
|
|
460
|
+
reboundAliases: string[];
|
|
461
|
+
};
|
|
462
|
+
export type RemoveStaleCodexOrphanInput = {
|
|
463
|
+
/** Dashboard-confirmed exact public alias; no native identifier is accepted. */
|
|
464
|
+
alias: string;
|
|
465
|
+
};
|
|
466
|
+
export type StaleCodexOrphanRemovalAuthority = {
|
|
467
|
+
binding: PrivateRouteBinding;
|
|
468
|
+
previousSequence: number;
|
|
469
|
+
};
|
|
470
|
+
export type StaleCodexOrphanRemovalCommitProofInput = {
|
|
471
|
+
alias: string;
|
|
472
|
+
binding: PrivateRouteBinding;
|
|
473
|
+
previousSequence: number;
|
|
474
|
+
};
|
|
475
|
+
export type RemoveStaleCodexOrphanResult = {
|
|
476
|
+
alias: string;
|
|
477
|
+
/** Private result used only to reconcile in-process service bindings. */
|
|
478
|
+
binding: PrivateRouteBinding;
|
|
479
|
+
removedPairs: Array<{
|
|
480
|
+
claudeAlias: string;
|
|
481
|
+
codexAlias: string;
|
|
482
|
+
}>;
|
|
483
|
+
};
|
|
403
484
|
export type EnqueueMessageInput = {
|
|
404
485
|
sourceAlias: string;
|
|
405
486
|
targetAlias: string;
|
|
@@ -408,7 +489,6 @@ export type EnqueueMessageInput = {
|
|
|
408
489
|
/** Last eight opaque characters of the controller-owned conversation ID. */
|
|
409
490
|
conversationIdSuffix?: string;
|
|
410
491
|
deadlineAt?: string;
|
|
411
|
-
hopCount?: number;
|
|
412
492
|
steer?: true;
|
|
413
493
|
/**
|
|
414
494
|
* Controller-derived watch intent committed in the same mutation as the
|
|
@@ -501,8 +581,9 @@ export type GatewayStoreLimits = {
|
|
|
501
581
|
maxInFlightMessages: number;
|
|
502
582
|
maxQueueBytes: number;
|
|
503
583
|
maxMessageBytes: number;
|
|
584
|
+
/** Bounded historical event-body bytes; omitted configs use 1 MiB. */
|
|
585
|
+
maxRetainedBodyBytes?: number;
|
|
504
586
|
messageDeadlineMs: number;
|
|
505
|
-
maxHopCount: number;
|
|
506
587
|
rateLimitPerRoute: number;
|
|
507
588
|
rateWindowMs: number;
|
|
508
589
|
};
|
|
@@ -71,6 +71,8 @@ export const gatewayPublicSnapshotLimits = Object.freeze({
|
|
|
71
71
|
});
|
|
72
72
|
/** Leaves headroom for the private control protocol response envelope. */
|
|
73
73
|
export const GATEWAY_PUBLIC_SNAPSHOT_BYTE_BUDGET = 240 * 1024;
|
|
74
|
+
export const CODEX_ENDPOINT_REFRESH_JOURNAL_CAPACITY = 256;
|
|
75
|
+
export const CODEX_ORPHAN_REMOVAL_JOURNAL_CAPACITY = 256;
|
|
74
76
|
export const publicAvailablePeerStates = [
|
|
75
77
|
"idle",
|
|
76
78
|
"busy",
|
|
@@ -84,6 +86,8 @@ export const gatewayActivityKinds = [
|
|
|
84
86
|
"registration",
|
|
85
87
|
"pairing",
|
|
86
88
|
"watch",
|
|
89
|
+
"endpoint",
|
|
90
|
+
"recovery",
|
|
87
91
|
];
|
|
88
92
|
export const gatewayActivityActions = [
|
|
89
93
|
"discovery_refreshed",
|
|
@@ -95,6 +99,8 @@ export const gatewayActivityActions = [
|
|
|
95
99
|
"routes_paired",
|
|
96
100
|
"routes_unpaired",
|
|
97
101
|
"watch_ended",
|
|
102
|
+
"endpoint_refreshed",
|
|
103
|
+
"codex_orphan_removed",
|
|
98
104
|
];
|
|
99
105
|
export const deadlinePressureBucketNames = [
|
|
100
106
|
"under_1m",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/gateway/types.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAU,CAAC;AAI7D,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAU,CAAC;AAI/D,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,SAAS;IACT,YAAY;IACZ,SAAS;IACT,UAAU;IACV,cAAc;CACN,CAAC;AAIX,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,SAAS;IACT,YAAY;IACZ,cAAc;IACd,SAAS;CACD,CAAC;AAIX,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,OAAO;IACP,MAAM;IACN,MAAM;IACN,mBAAmB;IACnB,SAAS;IACT,cAAc;IACd,UAAU;CACF,CAAC;AAIX,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,iBAAiB;IACjB,oBAAoB;CACZ,CAAC;AAKX,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,iBAAiB;IACjB,iBAAiB;CACT,CAAC;AAIX,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,QAAQ;IACR,WAAW;IACX,aAAa;IACb,mBAAmB;IACnB,MAAM;IACN,WAAW;IACX,aAAa;IACb,QAAQ;IACR,WAAW;IACX,SAAS;IACT,WAAW;IACX,WAAW;IACX,UAAU;CACF,CAAC;AAIX,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,GAAG,CAAgB;IAC3D,WAAW;IACX,aAAa;IACb,QAAQ;IACR,WAAW;IACX,SAAS;IACT,WAAW;IACX,WAAW;IACX,UAAU;CACX,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,MAAM,EAAE,SAAS,E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ACD,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,IAAI,UAAU,CAAC,2CAA2C,CAAC,CAAC;AACpE,CAAC"}
|
|
@@ -40,8 +40,8 @@ Embassy uses one private same-user Unix-domain control socket for its thin
|
|
|
40
40
|
clients and generates a private static dashboard page in each supported
|
|
41
41
|
language. `embassy serve` does not add a TCP listener, HTTP server, or public
|
|
42
42
|
API. The opt-in `embassy dashboard --live` companion is a separate foreground
|
|
43
|
-
process that binds an
|
|
44
|
-
actions on `127.0.0.1`; it is
|
|
43
|
+
process that binds an unauthenticated stable-port listener with four bounded
|
|
44
|
+
route actions on exact `127.0.0.1`; it is
|
|
45
45
|
described under [Live dashboard companion](#live-dashboard-companion).
|
|
46
46
|
|
|
47
47
|
### Why this uses the new feature, but is not skill-only
|
|
@@ -153,17 +153,18 @@ The status below is intentionally narrower than the target architecture.
|
|
|
153
153
|
|
|
154
154
|
| Component | Current evidence |
|
|
155
155
|
| --- | --- |
|
|
156
|
-
| Neutral gateway types, metadata store, route fencing, bounded queues, dedupe, rate limits, and public projection | **Implemented**, deterministic tests; message bodies
|
|
156
|
+
| Neutral gateway types, metadata store, route fencing, bounded queues, dedupe, rate limits, and public projection | **Implemented**, deterministic tests; message bodies persist under bounded retention (CO #36) |
|
|
157
157
|
| Private JSONL control protocol over a controller-owned UDS | **Implemented**, deterministic synthetic tests; no provider connection required |
|
|
158
158
|
| Static metadata-only dashboard renderer and atomic publisher | **Implemented**, deterministic security tests; the static renderer requires no browser or HTTP server |
|
|
159
|
-
| Opt-in live dashboard companion (`embassy dashboard --live`) | **Implemented**, deterministic tests over the loopback listener,
|
|
159
|
+
| 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` |
|
|
160
160
|
| Claude registry/peer adapter pinned to 2.1.226 / peer protocol 1 | **Implemented** and live-tested, including 2.1.224–2.1.226 patch-overlap discovery, print-session discovery, native status frames, cancellation, and accessible-workspace attestation |
|
|
161
|
-
|
|
|
161
|
+
| Automatic exact Claude 2.1.226 binary/runtime validation | **Implemented**; executes only bounded `claude --version` with a scrubbed environment and derives but does not open provider roots |
|
|
162
162
|
| 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 |
|
|
163
163
|
| Attach-only local Codex proxy transport and exact-owned cleanup | **Implemented**, five deterministic tests; no live App Server connection in routine tests |
|
|
164
164
|
| Local provider adapters | **Implemented**, focused synthetic tests cover genuine-interactive Claude discovery, exact send/callback/receipt settlement and post-dispatch refresh, plus exact opted-in Codex ownership, registered-route reachability, monitor-only fallback, and cleanup; remote adapters remain disabled |
|
|
165
165
|
| 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 |
|
|
166
166
|
| 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 |
|
|
167
|
+
| 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 |
|
|
167
168
|
| 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 |
|
|
168
169
|
| 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 |
|
|
169
170
|
| Foreground local broker launcher and provider assembly | **Implemented** as `embassy serve`; local-host-only with native messaging enabled |
|
|
@@ -208,6 +209,30 @@ history to invent routes. A route becomes usable only after the matching host
|
|
|
208
209
|
connector positively observes that exact task on the current endpoint
|
|
209
210
|
generation.
|
|
210
211
|
|
|
212
|
+
An App Server endpoint-generation change is a fenced route transition, not a
|
|
213
|
+
new registration. Embassy stops dispatch through the old connector and creates
|
|
214
|
+
a monitor-only replacement connector. That exact generation must pass a fresh
|
|
215
|
+
automatic initialize and `thread/loaded/list` validation, where every retained
|
|
216
|
+
private thread ID must occur exactly once. The connector resumes that exact
|
|
217
|
+
task with history excluded; only then may the controller activate writes and
|
|
218
|
+
atomically re-anchor the same alias, owner lease, and pair edges to the new
|
|
219
|
+
endpoint generation. Each successful re-anchor is recorded in a bounded
|
|
220
|
+
private journal; neither thread IDs nor endpoint generations enter public
|
|
221
|
+
activity, diagnostics, logs, or CLI output. An incompatible endpoint, a
|
|
222
|
+
missing or duplicate exact task, or an unclean transition leaves the route
|
|
223
|
+
stale and write-disabled. No body, callback, receipt handle, reply capability,
|
|
224
|
+
conversation capability, delivery token, or ambiguous write crosses this
|
|
225
|
+
boundary by replay.
|
|
226
|
+
|
|
227
|
+
The live dashboard exposes one bounded recovery operation for an orphaned
|
|
228
|
+
Codex registration. It carries only the public canonical `codex-*` alias and
|
|
229
|
+
requires explicit operator confirmation. The broker revalidates that the
|
|
230
|
+
route is stale and its owning endpoint generation is dead, then quiesces that
|
|
231
|
+
exact route before removing it and its incident pair edges and appending the
|
|
232
|
+
private recovery journal. Ready, merely offline, current-generation, and
|
|
233
|
+
ambiguous cases fail closed; the browser cannot name a thread ID or endpoint
|
|
234
|
+
generation.
|
|
235
|
+
|
|
211
236
|
Claude discovery is passive and limited to currently advertised genuine
|
|
212
237
|
Claude session records. A validated native record whose current name begins
|
|
213
238
|
with reserved `codex-` is another gateway advertisement, not a selectable
|
|
@@ -244,25 +269,32 @@ The thin skill/CLI exposes the same safe alias list to either provider.
|
|
|
244
269
|
thread identity, source alias, target Claude current name or session UUID,
|
|
245
270
|
and bounded text.
|
|
246
271
|
2. The gateway checks thread ownership, selector state, rate and size limits,
|
|
247
|
-
deadline,
|
|
272
|
+
deadline, and dedupe state.
|
|
248
273
|
3. It requires the selector to match an explicitly selected live UUID,
|
|
249
274
|
refreshes the UUID's current process/socket coordinates, and revalidates
|
|
250
275
|
the selected Claude peer's canonical workspace access and exact generation
|
|
251
276
|
before every send.
|
|
252
|
-
4.
|
|
253
|
-
|
|
254
|
-
|
|
277
|
+
4. Immediately before the native write, it composes one broker-owned canonical
|
|
278
|
+
`cross-session-message` textual frame with bounded sender attribution and a
|
|
279
|
+
first-child reply hint containing the full conversation token, exact aliases,
|
|
280
|
+
and reply command. It then opens a short-lived connection and writes one
|
|
281
|
+
version-pinned peer frame immediately, regardless of whether the current
|
|
282
|
+
Claude registry observation says `idle`, `busy`, or `waiting`. A reply
|
|
283
|
+
request carries the gateway's own
|
|
284
|
+
anonymous callback UDS as the transport reply address; that path is never
|
|
285
|
+
exposed in the content frame.
|
|
255
286
|
5. It records only normalized delivery metadata. It does not retry an
|
|
256
287
|
ambiguous write automatically.
|
|
257
288
|
6. A reply received on the callback listener is correlated in memory and
|
|
258
289
|
routed to the owning explicitly registered Codex task.
|
|
259
290
|
|
|
260
|
-
A
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
291
|
+
A Claude-bound peer socket is a native mailbox, not an idle gate. Once the
|
|
292
|
+
pre-write route checks pass, Embassy attempts that mailbox write immediately;
|
|
293
|
+
an observed busy state never queues the body. `transport_written` proves the
|
|
294
|
+
mailbox write and is reduced to terminal `delivered` for this direction. That
|
|
295
|
+
still does not prove Claude read, consumed, or acted on the body. The adapter
|
|
296
|
+
distinguishes this transport boundary from Claude-to-Codex native `held`, which
|
|
297
|
+
is a progress signal only. Neither boundary permits a retry.
|
|
266
298
|
|
|
267
299
|
### Claude to Codex
|
|
268
300
|
|
|
@@ -294,7 +326,9 @@ final reply.
|
|
|
294
326
|
not supply policy overrides.
|
|
295
327
|
6. App Server status notifications atomically refresh the advertised native
|
|
296
328
|
peer record to `idle`, `busy`, or `waiting`.
|
|
297
|
-
7.
|
|
329
|
+
7. Immediately before `turn/start` or `turn/steer`, the owning connector wraps
|
|
330
|
+
the raw body once in Embassy's authoritative Codex-bound
|
|
331
|
+
`cross-session-message` frame. If the task is idle, the connector starts one dedicated turn.
|
|
298
332
|
Ordinary messages received while it is active or awaiting approval queue
|
|
299
333
|
internally. An exact leading `STEER:` body in this direction is marked as a
|
|
300
334
|
steering message. If the connector has a positively observed active turn
|
|
@@ -356,10 +390,65 @@ terminally settles accepted work, joins its bounded receipt writes, and only
|
|
|
356
390
|
then closes provider adapters. This orders `GATEWAY_SHUTDOWN` receipts ahead of
|
|
357
391
|
listener teardown instead of silently dropping late admitted work.
|
|
358
392
|
|
|
359
|
-
Claude's native peer socket is itself
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
Claude
|
|
393
|
+
Claude's native peer socket is itself a mailbox, so every Claude-bound body,
|
|
394
|
+
including a correlated Codex reply, is written regardless of Claude's observed
|
|
395
|
+
busy or idle state. The gateway still serializes its own writes, but it never
|
|
396
|
+
waits for Claude to become idle and thereby deadlocks a Claude turn that is
|
|
397
|
+
waiting for the reply. This does not change the opposite direction: ordinary
|
|
398
|
+
Codex-bound bodies remain idle-gated, and exact leading `STEER:` bodies keep the
|
|
399
|
+
next-tool-call-boundary rules above.
|
|
400
|
+
|
|
401
|
+
### Provenance framing and conversation continuation
|
|
402
|
+
|
|
403
|
+
The broker classifies `STEER:`, `TRACK:`, and `DONE:`, enforces raw-byte body
|
|
404
|
+
limits, deduplicates, and queues before presentation framing.
|
|
405
|
+
The store therefore retains only the raw transient body. A pure composer runs
|
|
406
|
+
at the final semantic provider-write boundary so a clean retry produces the
|
|
407
|
+
same bytes with exactly one authoritative outer wrapper. Automatic provider
|
|
408
|
+
startup and endpoint-generation validation, receipt frames, and diagnostics do
|
|
409
|
+
not use this path.
|
|
410
|
+
|
|
411
|
+
Both provider directions use Claude-compatible textual framing with a
|
|
412
|
+
broker-owned `cross-session-message` outer element and an
|
|
413
|
+
`embassy-reply-hint` as the first body element:
|
|
414
|
+
|
|
415
|
+
- Codex-bound content uses the exact validated source alias as `from-name` and
|
|
416
|
+
the full conversation token as the outer `conversation` attribute.
|
|
417
|
+
- Claude-bound content uses only Claude Code's canonical bounded `from-name`
|
|
418
|
+
attribute. For a source alias over 64 characters, the display label is a
|
|
419
|
+
deterministic 47-character prefix, `~`, and 16 hexadecimal SHA-256
|
|
420
|
+
characters. The hint carries the exact source as `from-alias`. The outer
|
|
421
|
+
Claude wrapper intentionally omits `conversation`, which its pinned parser
|
|
422
|
+
does not accept.
|
|
423
|
+
- In either direction, the first hint carries the full token in `conversation`
|
|
424
|
+
and the exact recipient alias in `reply-as`, followed by an exact stdin-based
|
|
425
|
+
`embassy reply --conversation ... --alias ...` instruction and the statement
|
|
426
|
+
that caller, conversation, and route policy are rechecked.
|
|
427
|
+
|
|
428
|
+
Embassy does not synthesize `from`, `from-session`, `hop-chain`, or `from-mode`
|
|
429
|
+
attributes: those names have provider-native meanings the broker cannot
|
|
430
|
+
truthfully claim. Native socket addresses, Codex thread IDs, Claude session
|
|
431
|
+
UUIDs, endpoint generations, and route handles never enter the content frame.
|
|
432
|
+
|
|
433
|
+
The outer structure and hint come only from validated broker metadata. Before
|
|
434
|
+
composition, the untrusted body case-insensitively neutralizes boundary-shaped
|
|
435
|
+
opening or closing occurrences of `cross-session-message` and
|
|
436
|
+
`embassy-reply-hint` by inserting `\` immediately after the leading `<`.
|
|
437
|
+
Everything else remains raw text. This is not general XML, cryptographic
|
|
438
|
+
authentication, or proof that the message content is trustworthy; it is a
|
|
439
|
+
consistent structural provenance marker at the model input boundary. A native
|
|
440
|
+
Claude wrapper already present in an inbound body is untrusted nested text
|
|
441
|
+
beneath the Embassy wrapper.
|
|
442
|
+
|
|
443
|
+
The full token delivered in the hint lets the recipient call `reply`, but it is
|
|
444
|
+
only a participant-scoped conversation locator. The service still validates
|
|
445
|
+
the inherited caller, current conversation membership, and current route
|
|
446
|
+
policy. The full token remains confined to the accepted control result
|
|
447
|
+
and transient provider payload, and is memory-only: it is never persisted,
|
|
448
|
+
journaled, logged, snapshotted, rendered on a dashboard, placed in a receipt,
|
|
449
|
+
or returned from suffix-only public correlation. Formatter,
|
|
450
|
+
provenance-metadata, and framed-size failures are clean pre-write terminal
|
|
451
|
+
failures; they can never become ambiguous writes or replay authorizations.
|
|
363
452
|
|
|
364
453
|
The gateway exposes `turn/steer` only through an exact leading `STEER:` body in
|
|
365
454
|
the Claude-to-Codex direction. The global `EMBASSY_STEERING_ENABLED` switch is
|
|
@@ -490,7 +579,7 @@ The foreground command is:
|
|
|
490
579
|
embassy serve
|
|
491
580
|
```
|
|
492
581
|
|
|
493
|
-
Before provider
|
|
582
|
+
Before provider validation, listener creation, or App Server attachment, the
|
|
494
583
|
launcher acquires one fixed host-wide crash-reclaimable owner lease under the
|
|
495
584
|
verified login home. The lease is independent of `EMBASSY_STATE_DIR`, so two foreground
|
|
496
585
|
controllers cannot be started for the same login account by choosing different
|
|
@@ -503,8 +592,8 @@ are not created, imported, or mutated.
|
|
|
503
592
|
|
|
504
593
|
It emits one normalized ready line, publishes the private dashboard, and
|
|
505
594
|
holds the process until `SIGINT` or `SIGTERM`, when exact-owned resources are
|
|
506
|
-
closed. Startup
|
|
507
|
-
controller-owned UDS listeners, but does not discover a Claude peer, write a
|
|
595
|
+
closed. Startup automatically validates the exact-pinned local Claude and Codex
|
|
596
|
+
runtimes and binds controller-owned UDS listeners, but does not discover a Claude peer, write a
|
|
508
597
|
provider socket, start a model turn, or contact a remote host. Its ready result
|
|
509
598
|
reports local host `this-mac`, dashboard filename `gateway-dashboard.html`, and
|
|
510
599
|
`codexMode: "native_messaging"` without exposing paths.
|
|
@@ -554,11 +643,12 @@ Missing, malformed, or nonempty turns fail closed and are never emitted or
|
|
|
554
643
|
persisted. The capability does not add an experimental client method or change
|
|
555
644
|
the closed RPC allowlist.
|
|
556
645
|
|
|
557
|
-
|
|
558
|
-
may initialize, list, resume, and expose
|
|
559
|
-
|
|
560
|
-
unavailable. No Claude-initiated turn
|
|
561
|
-
|
|
646
|
+
Automatic generation validation and controller write activation are distinct
|
|
647
|
+
gates. A replacement connector may initialize, list, resume, and expose
|
|
648
|
+
normalized monitor state after its exact version and required schemas validate
|
|
649
|
+
while still reporting its write gate as unavailable. No Claude-initiated turn
|
|
650
|
+
can start until the controller activates that exact endpoint generation and
|
|
651
|
+
explicit route ownership is established.
|
|
562
652
|
|
|
563
653
|
Registration resumes the exact task and establishes reachability. Embassy does
|
|
564
654
|
not read or retain reported working-directory or policy fields. Before
|
|
@@ -638,8 +728,9 @@ The one Desktop restart needed for the local shared-App-Server feasibility
|
|
|
638
728
|
test has already been completed. Building, running synthetic tests, starting
|
|
639
729
|
the gateway, rendering the dashboard, and a future Claude peer-socket test do
|
|
640
730
|
not themselves require another Desktop restart. A provider or Desktop upgrade
|
|
641
|
-
|
|
642
|
-
separately announced controlled
|
|
731
|
+
outside this release's exact pins requires an updated, reviewed Embassy
|
|
732
|
+
adapter and, if its attachment mode changes, a separately announced controlled
|
|
733
|
+
restart.
|
|
643
734
|
|
|
644
735
|
## Dashboard
|
|
645
736
|
|
|
@@ -662,7 +753,7 @@ It shows only:
|
|
|
662
753
|
- available/selected Claude aliases, registered Codex aliases, provider, host,
|
|
663
754
|
compatibility, state, and queue depth;
|
|
664
755
|
- normalized message direction and delivery state, timestamp, latency, byte
|
|
665
|
-
count,
|
|
756
|
+
count, and a short opaque message-ID suffix; and
|
|
666
757
|
- allowlisted alerts such as stale route, protocol mismatch, queue full, or
|
|
667
758
|
ambiguous delivery.
|
|
668
759
|
|
|
@@ -675,33 +766,38 @@ connector, peer, route, message, or alert rows are truncated.
|
|
|
675
766
|
|
|
676
767
|
### Live dashboard companion
|
|
677
768
|
|
|
678
|
-
`embassy dashboard --live` is the opt-in browser view of
|
|
769
|
+
`embassy dashboard --live` is the opt-in browser view of broker state,
|
|
770
|
+
including bounded retained bodies in delivery detail; the static dashboard's
|
|
771
|
+
public projection remains metadata-only.
|
|
679
772
|
It is a separate foreground process, not a mode of `embassy serve`: it holds no
|
|
680
773
|
provider capability, owns no registry record, and reaches the broker over the
|
|
681
774
|
same private control socket every other client command uses, so it reports the
|
|
682
775
|
gateway as unavailable when nothing is serving.
|
|
683
776
|
|
|
684
|
-
- **Bind.** One `http.createServer` listener
|
|
685
|
-
port
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
path-scoped `HttpOnly` `SameSite=Strict` session cookie; the fragment never
|
|
694
|
-
reaches the server as part of a request line.
|
|
777
|
+
- **Bind.** One `http.createServer` listener binds exact `127.0.0.1` on stable
|
|
778
|
+
port `41961` by default, or the integer from the per-invocation `--port <n>`
|
|
779
|
+
option in the closed range 1024 through 65535. The direct root URL is
|
|
780
|
+
`http://127.0.0.1:<port>/`. A collision fails with
|
|
781
|
+
`LIVE_DASHBOARD_PORT_IN_USE` and directs the operator to `--port`; there is no
|
|
782
|
+
ephemeral-port fallback. No other interface is bound.
|
|
783
|
+
- **Access.** The root URL is usable concurrently from multiple windows, tabs,
|
|
784
|
+
and browsers. There is no capability token, URL fragment, cookie, browser
|
|
785
|
+
session, random instance path, or bootstrap file.
|
|
695
786
|
- **Request checks.** The exact Host header is validated on every request.
|
|
696
|
-
Navigation GETs may omit Origin
|
|
697
|
-
|
|
698
|
-
|
|
787
|
+
Navigation GETs may omit Origin; every POST requires the exact Origin plus
|
|
788
|
+
`X-Embassy-Request: 1`. `OPTIONS` is not accepted, there are no CORS headers,
|
|
789
|
+
and cross-origin reads are unavailable.
|
|
699
790
|
- **Projection and actions.** The companion observes through
|
|
700
791
|
`observe_snapshot`. Its only mutations are exact two-endpoint `pair`,
|
|
701
|
-
`unpair`, and `
|
|
702
|
-
|
|
792
|
+
`unpair`, `refresh_dashboard`, and `remove_stale_codex_registration`
|
|
793
|
+
control calls behind one closed `/action` route. The recovery
|
|
794
|
+
action carries only a canonical public `codex-*` alias and is accepted only
|
|
795
|
+
after the broker revalidates that the route is stale and its endpoint
|
|
796
|
+
generation is dead; native task and generation IDs never enter the browser
|
|
797
|
+
contract. The browser shows the consequence and requires
|
|
703
798
|
explicit confirmation; the server rejects bodies over 1 KiB and limits the
|
|
704
|
-
companion to six actions per minute. It cannot
|
|
799
|
+
companion to six actions per minute. It cannot create a registration,
|
|
800
|
+
unregister a live route, succeed,
|
|
705
801
|
send, reply, approve, interrupt, change settings, or invoke a generic/provider
|
|
706
802
|
method. Each mutation touches only the edge it names: adding an edge never
|
|
707
803
|
retires another, and removing one settles its accepted work before the
|
|
@@ -709,9 +805,11 @@ gateway as unavailable when nothing is serving.
|
|
|
709
805
|
fresh observation. An observation may
|
|
710
806
|
settle already-due lifecycle deliveries before projecting, which is a broker
|
|
711
807
|
timer effect, not additional browser authority.
|
|
712
|
-
- **Containment.**
|
|
713
|
-
|
|
714
|
-
|
|
808
|
+
- **Containment.** The loopback server deliberately performs no local-process
|
|
809
|
+
or UID authentication. It assumes a trusted single-user machine: any local
|
|
810
|
+
software that can reach or spoof loopback can read the live view and invoke
|
|
811
|
+
the bounded actions. Host, Origin, and sentinel checks constrain ambient
|
|
812
|
+
browser-origin requests; they do not authenticate local software.
|
|
715
813
|
|
|
716
814
|
`--lang en|zh-CN` selects the companion's display language. It has no effect on
|
|
717
815
|
the static pair, which is always written in both languages.
|
|
@@ -771,14 +869,14 @@ and fake App Server transports.
|
|
|
771
869
|
|
|
772
870
|
### Exact default roots on macOS
|
|
773
871
|
|
|
774
|
-
The
|
|
872
|
+
The automatic exact-version validator derives these paths from the current OS user's
|
|
775
873
|
verified home; it does not scan the home directory. These are the reviewed
|
|
776
874
|
boundaries exercised by the live gateway; routine tests substitute synthetic
|
|
777
875
|
paths, peers, and transports:
|
|
778
876
|
|
|
779
877
|
| Path/capability | Minimum purpose |
|
|
780
878
|
| --- | --- |
|
|
781
|
-
| `~/.local/bin/claude` and derived expected target `~/.local/share/claude/versions/2.1.226` | Stat the owned launcher/path components and read/execute only the resolved pinned target for bounded `--version`; live launcher
|
|
879
|
+
| `~/.local/bin/claude` and derived expected target `~/.local/share/claude/versions/2.1.226` | Stat the owned launcher/path components and read/execute only the resolved pinned target for bounded `--version`; live launcher validation succeeded |
|
|
782
880
|
| `~/.claude/sessions` | Read/enumerate only live registry JSON during the separately authorized passive-discovery gate |
|
|
783
881
|
| `/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 |
|
|
784
882
|
| `~/.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 |
|
|
@@ -836,8 +934,9 @@ the preferred least-context setup, but it is not mandatory.
|
|
|
836
934
|
unregistered and the controller is restarted.
|
|
837
935
|
- No ambiguous mutation is retried automatically.
|
|
838
936
|
- No queued body survives process loss.
|
|
839
|
-
-
|
|
840
|
-
|
|
937
|
+
- A provider or Desktop update outside the release's exact reviewed pins fails
|
|
938
|
+
closed; retained state never admits an unreviewed version or activates an
|
|
939
|
+
unvalidated replacement endpoint generation.
|
|
841
940
|
|
|
842
941
|
## Validation boundary
|
|
843
942
|
|