agent-embassy 1.6.0 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +9 -9
  3. package/README.zh-CN.md +9 -9
  4. package/SECURITY.md +34 -77
  5. package/dist/src/gateway/acp-client.d.ts +117 -0
  6. package/dist/src/gateway/acp-client.js +382 -0
  7. package/dist/src/gateway/acp-client.js.map +1 -0
  8. package/dist/src/gateway/acp-provider.d.ts +65 -0
  9. package/dist/src/gateway/acp-provider.js +163 -0
  10. package/dist/src/gateway/acp-provider.js.map +1 -0
  11. package/dist/src/gateway/claude-helper-protocol.d.ts +3 -1
  12. package/dist/src/gateway/claude-helper-protocol.js +15 -5
  13. package/dist/src/gateway/claude-helper-protocol.js.map +1 -1
  14. package/dist/src/gateway/claude-helper-supervisor.d.ts +3 -1
  15. package/dist/src/gateway/claude-helper-supervisor.js +16 -2
  16. package/dist/src/gateway/claude-helper-supervisor.js.map +1 -1
  17. package/dist/src/gateway/claude-helper.js +4 -3
  18. package/dist/src/gateway/claude-helper.js.map +1 -1
  19. package/dist/src/gateway/claude-peer.d.ts +1 -1
  20. package/dist/src/gateway/claude-peer.js +11 -13
  21. package/dist/src/gateway/claude-peer.js.map +1 -1
  22. package/dist/src/gateway/claude-runtime.d.ts +0 -20
  23. package/dist/src/gateway/claude-runtime.js +6 -127
  24. package/dist/src/gateway/claude-runtime.js.map +1 -1
  25. package/dist/src/gateway/cli-copy.en.d.ts +1 -1
  26. package/dist/src/gateway/cli-copy.en.js +2 -2
  27. package/dist/src/gateway/cli-copy.zh-CN.d.ts +1 -1
  28. package/dist/src/gateway/cli-copy.zh-CN.js +2 -2
  29. package/dist/src/gateway/cli.d.ts +1 -1
  30. package/dist/src/gateway/cli.js +26 -5
  31. package/dist/src/gateway/cli.js.map +1 -1
  32. package/dist/src/gateway/codex-app-server.d.ts +5 -74
  33. package/dist/src/gateway/codex-app-server.js +9 -597
  34. package/dist/src/gateway/codex-app-server.js.map +1 -1
  35. package/dist/src/gateway/codex-local-transport.d.ts +8 -26
  36. package/dist/src/gateway/codex-local-transport.js +26 -76
  37. package/dist/src/gateway/codex-local-transport.js.map +1 -1
  38. package/dist/src/gateway/compatibility.d.ts +6 -66
  39. package/dist/src/gateway/compatibility.js +14 -296
  40. package/dist/src/gateway/compatibility.js.map +1 -1
  41. package/dist/src/gateway/config.d.ts +9 -0
  42. package/dist/src/gateway/config.js +6 -2
  43. package/dist/src/gateway/config.js.map +1 -1
  44. package/dist/src/gateway/control.d.ts +16 -1
  45. package/dist/src/gateway/control.js +89 -57
  46. package/dist/src/gateway/control.js.map +1 -1
  47. package/dist/src/gateway/dashboard-copy.d.ts +1 -1
  48. package/dist/src/gateway/dashboard-copy.en.d.ts +14 -44
  49. package/dist/src/gateway/dashboard-copy.en.js +37 -67
  50. package/dist/src/gateway/dashboard-copy.en.js.map +1 -1
  51. package/dist/src/gateway/dashboard-copy.js +14 -44
  52. package/dist/src/gateway/dashboard-copy.js.map +1 -1
  53. package/dist/src/gateway/dashboard-copy.zh-CN.d.ts +14 -44
  54. package/dist/src/gateway/dashboard-copy.zh-CN.js +37 -67
  55. package/dist/src/gateway/dashboard-copy.zh-CN.js.map +1 -1
  56. package/dist/src/gateway/dashboard-model.d.ts +38 -76
  57. package/dist/src/gateway/dashboard-model.js +158 -256
  58. package/dist/src/gateway/dashboard-model.js.map +1 -1
  59. package/dist/src/gateway/dashboard.d.ts +0 -3
  60. package/dist/src/gateway/dashboard.js +75 -76
  61. package/dist/src/gateway/dashboard.js.map +1 -1
  62. package/dist/src/gateway/deepseek-detect.d.ts +7 -6
  63. package/dist/src/gateway/deepseek-detect.js +31 -115
  64. package/dist/src/gateway/deepseek-detect.js.map +1 -1
  65. package/dist/src/gateway/live-dashboard-app/app.js +166 -621
  66. package/dist/src/gateway/live-dashboard-command.js +2 -4
  67. package/dist/src/gateway/live-dashboard-command.js.map +1 -1
  68. package/dist/src/gateway/live-dashboard-http.d.ts +1 -2
  69. package/dist/src/gateway/live-dashboard-http.js +14 -15
  70. package/dist/src/gateway/live-dashboard-http.js.map +1 -1
  71. package/dist/src/gateway/progress-watch-machine.d.ts +1 -4
  72. package/dist/src/gateway/progress-watch-machine.js.map +1 -1
  73. package/dist/src/gateway/provenance-envelope.d.ts +3 -2
  74. package/dist/src/gateway/provenance-envelope.js +44 -11
  75. package/dist/src/gateway/provenance-envelope.js.map +1 -1
  76. package/dist/src/gateway/providers.d.ts +12 -84
  77. package/dist/src/gateway/providers.js +69 -806
  78. package/dist/src/gateway/providers.js.map +1 -1
  79. package/dist/src/gateway/server.d.ts +8 -9
  80. package/dist/src/gateway/server.js +51 -99
  81. package/dist/src/gateway/server.js.map +1 -1
  82. package/dist/src/gateway/service.d.ts +22 -49
  83. package/dist/src/gateway/service.js +196 -432
  84. package/dist/src/gateway/service.js.map +1 -1
  85. package/dist/src/gateway/store.d.ts +20 -29
  86. package/dist/src/gateway/store.js +281 -827
  87. package/dist/src/gateway/store.js.map +1 -1
  88. package/dist/src/gateway/types.d.ts +55 -55
  89. package/dist/src/gateway/types.js +49 -91
  90. package/dist/src/gateway/types.js.map +1 -1
  91. package/docs/CONFIGURATION.md +11 -10
  92. package/docs/CONFIGURATION.zh-CN.md +10 -9
  93. package/docs/DASHBOARD.md +4 -38
  94. package/docs/DASHBOARD.zh-CN.md +4 -2
  95. package/docs/GATEWAY-ARCHITECTURE.md +61 -119
  96. package/package.json +1 -1
  97. package/skills/embassy-peer/SKILL.md +6 -6
@@ -1,4 +1,3 @@
1
- import { type CompatibilityAttestation, type CompatibilitySurface } from "./compatibility.js";
2
1
  import type { GatewayConfig } from "./config.js";
3
2
  import { type DeliveryState, type EnqueueMessageInput, type EnqueueMessageResult, type EnqueueNativeIngressInput, type EnqueueNativeReplyInput, type GatewayPrivateRouteInspection, type GatewayPublicSnapshot, type GatewayStoreDependencies, type InFlightMessageProgressState, type ObserveConnectorInput, type ObserveRouteInput, type PrivateEndpointIdentity, type PrivateRouteBinding, type ReanchorCodexRoutesInput, type ReanchorCodexRoutesResult, type RebindStaleRouteInput, type RegisterRouteInput, type RequeueInFlightMessageResult, type RemoveStaleCodexOrphanInput, type RemoveStaleCodexOrphanResult, type SettleMessageInput, type SettleMessageResult, type StaleCodexOrphanRemovalAuthority, type StaleCodexOrphanRemovalCommitProofInput, type TerminalMessageSettlement, type TransientQueuedMessage } from "./types.js";
4
3
  export declare const GATEWAY_MAX_STATE_FILE_BYTES: number;
@@ -32,16 +31,15 @@ export type ReplaceClaudeSelectionInput = Readonly<{
32
31
  replacement: RegisterRouteInput;
33
32
  inFlightSettlements?: readonly RouteInFlightSettlementInput[];
34
33
  }>;
35
- export type GatewayPairInput = Readonly<{
36
- claudeAlias: string;
37
- codexAlias: string;
34
+ export type GatewayConsentEdgeInput = Readonly<{
35
+ aliases: readonly [string, string];
38
36
  }>;
39
- export type UnpairRoutesInput = GatewayPairInput & Readonly<{
37
+ export type RemoveConsentEdgeInput = GatewayConsentEdgeInput & Readonly<{
40
38
  inFlightSettlements?: readonly RouteInFlightSettlementInput[];
41
39
  }>;
42
- export type UnpairRoutesResult = Readonly<{
40
+ export type RemoveConsentEdgeResult = Readonly<{
43
41
  settlements: readonly TerminalMessageSettlement[];
44
- claudeRouteUnreferenced: boolean;
42
+ unreferencedAliases: readonly string[];
45
43
  }>;
46
44
  export declare const codexSuccessionJournalStages: readonly ["prepared", "publication_armed", "published", "activated", "recovery_forbidden"];
47
45
  export type CodexSuccessionJournalStage = (typeof codexSuccessionJournalStages)[number];
@@ -104,11 +102,7 @@ export declare class GatewayStore {
104
102
  private state;
105
103
  private lockHandle;
106
104
  private lockToken;
107
- /**
108
- * Startup admission may exercise migrated state in memory, but it must not
109
- * strand an older binary by rewriting the durable schema before every
110
- * provider and control-socket readiness check has passed.
111
- */
105
+ /** Startup may defer the first native-v2 persistence until admission passes. */
112
106
  private persistenceDeferred;
113
107
  constructor(config: GatewayConfig, dependencies?: GatewayStoreDependencies);
114
108
  get stateFilePath(): string;
@@ -219,12 +213,12 @@ export declare class GatewayStore {
219
213
  * must never cross the control protocol or enter a public projection.
220
214
  */
221
215
  inspectPrivateClaudeRoutes(): Promise<GatewayPrivateRouteInspection[]>;
222
- /** Create one explicit, durable Claude↔Codex consent edge. */
223
- pairRoutes(input: GatewayPairInput): Promise<{
216
+ /** Create one explicit, durable consent edge between distinct providers. */
217
+ addConsentEdge(input: GatewayConsentEdgeInput): Promise<{
224
218
  created: boolean;
225
219
  }>;
226
220
  /** Bounded metadata-only graph inventory for controller inference. */
227
- inspectPairs(): Promise<GatewayPairInput[]>;
221
+ inspectConsentEdges(): Promise<GatewayConsentEdgeInput[]>;
228
222
  /** Resolve only an exact live watch; recovery may substitute its suffix. */
229
223
  resolveProgressWatchDispatch(input: Readonly<{
230
224
  sourceAlias: string;
@@ -239,22 +233,19 @@ export declare class GatewayStore {
239
233
  conversationId?: string;
240
234
  markerActive: boolean;
241
235
  }>>;
242
- inspectCompatibilityAttestation(surface: CompatibilitySurface, version: string): Promise<CompatibilityAttestation | undefined>;
243
- inspectCompatibilityAttestations(): Promise<CompatibilityAttestation[]>;
244
- recordCompatibilityAttestation(attestation: CompatibilityAttestation): Promise<void>;
245
236
  touchProgressWatchesForAlias(alias: string): Promise<number>;
246
237
  endProgressWatch(conversationId: string): Promise<boolean>;
247
238
  /** Advance every due watch once under one durable store mutation. */
248
239
  advanceDueProgressWatches(): Promise<ProgressWatchNudge[]>;
249
240
  nextProgressWatchActionAt(): Promise<string | undefined>;
250
241
  deferProgressWatchNudge(conversationId: string, nudgeNumber: 1 | 2): Promise<boolean>;
251
- hasPair(input: GatewayPairInput): Promise<boolean>;
252
- inspectAffectedPairInFlightMessages(input: GatewayPairInput): Promise<AffectedInFlightMessageInspection[]>;
242
+ hasConsentEdge(input: GatewayConsentEdgeInput): Promise<boolean>;
243
+ inspectAffectedConsentEdgeInFlightMessages(input: GatewayConsentEdgeInput): Promise<AffectedInFlightMessageInspection[]>;
253
244
  /**
254
245
  * Remove exactly one consent edge and settle only work owned by that edge.
255
- * Adjacent pairs, terminal token metadata, and unrelated messages survive.
246
+ * Adjacent edges, terminal token metadata, and unrelated messages survive.
256
247
  */
257
- unpairRoutes(input: UnpairRoutesInput): Promise<UnpairRoutesResult>;
248
+ removeConsentEdge(input: RemoveConsentEdgeInput): Promise<RemoveConsentEdgeResult>;
258
249
  /**
259
250
  * Controller-internal inventory used to prepare an exact, evidence-aware
260
251
  * terminal plan before a route mutation. Message bodies and route handles
@@ -270,7 +261,7 @@ export declare class GatewayStore {
270
261
  */
271
262
  enqueueNativeIngress(input: EnqueueNativeIngressInput): Promise<EnqueueMessageResult>;
272
263
  /**
273
- * Queue a correlated Codex reply for a caller-attested transient Claude
264
+ * Queue a correlated provider reply for a caller-attested transient Claude
274
265
  * peer. The service owns conversation correlation and the live dispatch
275
266
  * capability; the store retains only bounded public-alias metadata.
276
267
  */
@@ -316,13 +307,13 @@ export declare class GatewayStore {
316
307
  private assertNewSuccessionIdentityAvailable;
317
308
  private replaceCodexRouteForSuccession;
318
309
  private assertAllowedIdentity;
319
- private requireCompatibleObservedEndpoint;
310
+ private requireObservedEndpoint;
320
311
  private validateRouteInput;
321
312
  private requireOwnedRoute;
322
313
  private requireStaleCodexOrphan;
323
314
  private requireAvailableRoute;
324
- private requirePairRoutes;
325
- private requireExactPair;
315
+ private requireConsentEdgeRoutes;
316
+ private requireExactConsentEdge;
326
317
  private validateTransientNativeClaudePeer;
327
318
  private enqueueResolvedMessage;
328
319
  private consumeRateLimit;
@@ -338,12 +329,12 @@ export declare class GatewayStore {
338
329
  private installProgressWatch;
339
330
  private appendProgressWatchEvents;
340
331
  private settleProgressWatchesForAliases;
341
- private settleProgressWatchesForPair;
332
+ private settleProgressWatchesForConsentEdge;
342
333
  private finishMetadata;
343
334
  private validateAffectedInFlightSettlements;
344
- private validateAffectedPairInFlightSettlements;
335
+ private validateAffectedConsentEdgeInFlightSettlements;
345
336
  private terminateAffectedMessages;
346
- private terminateAffectedPairMessages;
337
+ private terminateAffectedConsentEdgeMessages;
347
338
  private prune;
348
339
  private recoverAfterRestart;
349
340
  private recoverCodexSuccessionAfterRestart;