agent-embassy 1.4.0 → 1.5.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 (82) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/CONTRIBUTING.md +61 -6
  3. package/README.md +6 -5
  4. package/README.zh-CN.md +4 -4
  5. package/SECURITY.md +128 -24
  6. package/dist/src/gateway/claude-peer.d.ts +8 -5
  7. package/dist/src/gateway/claude-peer.js +81 -36
  8. package/dist/src/gateway/claude-peer.js.map +1 -1
  9. package/dist/src/gateway/claude-runtime.d.ts +4 -0
  10. package/dist/src/gateway/claude-runtime.js +50 -39
  11. package/dist/src/gateway/claude-runtime.js.map +1 -1
  12. package/dist/src/gateway/cli-copy.d.ts +1 -1
  13. package/dist/src/gateway/cli-copy.en.d.ts +1 -1
  14. package/dist/src/gateway/cli-copy.en.js +1 -1
  15. package/dist/src/gateway/cli-copy.en.js.map +1 -1
  16. package/dist/src/gateway/cli-copy.js +1 -1
  17. package/dist/src/gateway/cli-copy.js.map +1 -1
  18. package/dist/src/gateway/cli-copy.zh-CN.d.ts +1 -1
  19. package/dist/src/gateway/cli-copy.zh-CN.js +1 -1
  20. package/dist/src/gateway/cli-copy.zh-CN.js.map +1 -1
  21. package/dist/src/gateway/cli.d.ts +1 -1
  22. package/dist/src/gateway/cli.js +3 -7
  23. package/dist/src/gateway/cli.js.map +1 -1
  24. package/dist/src/gateway/codex-app-server.d.ts +2 -1
  25. package/dist/src/gateway/codex-app-server.js +1 -1
  26. package/dist/src/gateway/codex-app-server.js.map +1 -1
  27. package/dist/src/gateway/codex-local-transport.d.ts +10 -6
  28. package/dist/src/gateway/codex-local-transport.js +101 -56
  29. package/dist/src/gateway/codex-local-transport.js.map +1 -1
  30. package/dist/src/gateway/compatibility.d.ts +11 -0
  31. package/dist/src/gateway/compatibility.js +104 -22
  32. package/dist/src/gateway/compatibility.js.map +1 -1
  33. package/dist/src/gateway/control.js +28 -30
  34. package/dist/src/gateway/control.js.map +1 -1
  35. package/dist/src/gateway/dashboard-copy.d.ts +1 -1
  36. package/dist/src/gateway/dashboard-copy.en.d.ts +36 -17
  37. package/dist/src/gateway/dashboard-copy.en.js +50 -31
  38. package/dist/src/gateway/dashboard-copy.en.js.map +1 -1
  39. package/dist/src/gateway/dashboard-copy.js +36 -17
  40. package/dist/src/gateway/dashboard-copy.js.map +1 -1
  41. package/dist/src/gateway/dashboard-copy.zh-CN.d.ts +36 -17
  42. package/dist/src/gateway/dashboard-copy.zh-CN.js +50 -31
  43. package/dist/src/gateway/dashboard-copy.zh-CN.js.map +1 -1
  44. package/dist/src/gateway/dashboard-model.d.ts +176 -8
  45. package/dist/src/gateway/dashboard-model.js +420 -70
  46. package/dist/src/gateway/dashboard-model.js.map +1 -1
  47. package/dist/src/gateway/dashboard.js +48 -135
  48. package/dist/src/gateway/dashboard.js.map +1 -1
  49. package/dist/src/gateway/live-dashboard-app/app.js +148 -247
  50. package/dist/src/gateway/live-dashboard-assets.js +2 -1
  51. package/dist/src/gateway/live-dashboard-assets.js.map +1 -1
  52. package/dist/src/gateway/live-dashboard-stream.d.ts +2 -2
  53. package/dist/src/gateway/live-dashboard-stream.js +2 -2
  54. package/dist/src/gateway/live-dashboard-stream.js.map +1 -1
  55. package/dist/src/gateway/progress-watch-machine.d.ts +50 -64
  56. package/dist/src/gateway/progress-watch-machine.js +42 -133
  57. package/dist/src/gateway/progress-watch-machine.js.map +1 -1
  58. package/dist/src/gateway/provenance-envelope.d.ts +2 -0
  59. package/dist/src/gateway/provenance-envelope.js +13 -3
  60. package/dist/src/gateway/provenance-envelope.js.map +1 -1
  61. package/dist/src/gateway/providers.d.ts +69 -15
  62. package/dist/src/gateway/providers.js +456 -109
  63. package/dist/src/gateway/providers.js.map +1 -1
  64. package/dist/src/gateway/server.d.ts +8 -5
  65. package/dist/src/gateway/server.js +94 -13
  66. package/dist/src/gateway/server.js.map +1 -1
  67. package/dist/src/gateway/service.d.ts +25 -1
  68. package/dist/src/gateway/service.js +252 -69
  69. package/dist/src/gateway/service.js.map +1 -1
  70. package/dist/src/gateway/store.d.ts +23 -28
  71. package/dist/src/gateway/store.js +479 -467
  72. package/dist/src/gateway/store.js.map +1 -1
  73. package/dist/src/gateway/types.d.ts +38 -11
  74. package/dist/src/gateway/types.js +141 -3
  75. package/dist/src/gateway/types.js.map +1 -1
  76. package/docs/CONFIGURATION.md +8 -8
  77. package/docs/CONFIGURATION.zh-CN.md +8 -8
  78. package/docs/DASHBOARD.md +29 -6
  79. package/docs/DASHBOARD.zh-CN.md +1 -1
  80. package/docs/GATEWAY-ARCHITECTURE.md +143 -57
  81. package/package.json +1 -1
  82. package/skills/embassy-peer/SKILL.md +2 -2
@@ -1,20 +1,12 @@
1
1
  import { type CompatibilityAttestation, type CompatibilitySurface } from "./compatibility.js";
2
2
  import type { GatewayConfig } from "./config.js";
3
- import { type ProgressWatchMachine, type ProgressWatchOutcome } from "./progress-watch-machine.js";
4
3
  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";
5
4
  export declare const GATEWAY_MAX_STATE_FILE_BYTES: number;
6
- export type ProgressWatchAction = Readonly<{
7
- type: "send_nudge";
5
+ type ProgressWatchNudge = Readonly<{
8
6
  conversationId: string;
9
7
  ownerAlias: string;
10
8
  workerAlias: string;
11
9
  nudgeNumber: 1 | 2;
12
- }> | Readonly<{
13
- type: "settled";
14
- conversationId: string;
15
- ownerAlias: string;
16
- workerAlias: string;
17
- outcome: ProgressWatchOutcome;
18
10
  }>;
19
11
  export type SettleQueuedMessageInput = {
20
12
  messageId: string;
@@ -159,7 +151,7 @@ export declare class GatewayStore {
159
151
  */
160
152
  removeStaleCodexOrphan(input: RemoveStaleCodexOrphanInput): Promise<RemoveStaleCodexOrphanResult>;
161
153
  disableRoute(alias: string, ownerLease: string, inFlightSettlements?: readonly RouteInFlightSettlementInput[]): Promise<TerminalMessageSettlement[]>;
162
- unregisterRoute(alias: string, ownerLease: string, inFlightSettlements?: readonly RouteInFlightSettlementInput[]): Promise<TerminalMessageSettlement[]>;
154
+ unregisterRoute(alias: string, ownerLease: string, inFlightSettlements?: readonly RouteInFlightSettlementInput[], progressWatchSettlementActor?: "gateway" | "operator"): Promise<TerminalMessageSettlement[]>;
163
155
  /**
164
156
  * Move one owned route to its provider's latest live display name without
165
157
  * changing the logical provider route binding. Historical normalized events
@@ -233,26 +225,29 @@ export declare class GatewayStore {
233
225
  }>;
234
226
  /** Bounded metadata-only graph inventory for controller inference. */
235
227
  inspectPairs(): Promise<GatewayPairInput[]>;
236
- inspectProgressWatches(): Promise<ProgressWatchMachine[]>;
237
- /** Bind one restarted route-capability watch to its first exact owner send. */
238
- bindProgressWatchConversation(input: Readonly<{
228
+ /** Resolve only an exact live watch; recovery may substitute its suffix. */
229
+ resolveProgressWatchDispatch(input: Readonly<{
230
+ sourceAlias: string;
231
+ targetAlias: string;
232
+ }> & (Readonly<{
239
233
  conversationId: string;
240
- ownerAlias: string;
241
- workerAlias: string;
242
- }>): Promise<boolean>;
234
+ recoveredConversationIdSuffix?: never;
235
+ }> | Readonly<{
236
+ conversationId?: never;
237
+ recoveredConversationIdSuffix: string;
238
+ }>)): Promise<Readonly<{
239
+ conversationId?: string;
240
+ markerActive: boolean;
241
+ }>>;
243
242
  inspectCompatibilityAttestation(surface: CompatibilitySurface, version: string): Promise<CompatibilityAttestation | undefined>;
244
243
  inspectCompatibilityAttestations(): Promise<CompatibilityAttestation[]>;
245
244
  recordCompatibilityAttestation(attestation: CompatibilityAttestation): Promise<void>;
246
245
  touchProgressWatchesForAlias(alias: string): Promise<number>;
247
- settleProgressWatch(input: Readonly<{
248
- conversationId: string;
249
- outcome: ProgressWatchOutcome;
250
- ownerAlias?: string;
251
- }>): Promise<boolean>;
246
+ endProgressWatch(conversationId: string): Promise<boolean>;
252
247
  /** Advance every due watch once under one durable store mutation. */
253
- advanceDueProgressWatches(): Promise<ProgressWatchAction[]>;
248
+ advanceDueProgressWatches(): Promise<ProgressWatchNudge[]>;
254
249
  nextProgressWatchActionAt(): Promise<string | undefined>;
255
- deferProgressWatchNudge(conversationId: string, retryDelayMs?: number): Promise<boolean>;
250
+ deferProgressWatchNudge(conversationId: string, nudgeNumber: 1 | 2): Promise<boolean>;
256
251
  hasPair(input: GatewayPairInput): Promise<boolean>;
257
252
  inspectAffectedPairInFlightMessages(input: GatewayPairInput): Promise<AffectedInFlightMessageInspection[]>;
258
253
  /**
@@ -280,7 +275,9 @@ export declare class GatewayStore {
280
275
  * capability; the store retains only bounded public-alias metadata.
281
276
  */
282
277
  enqueueNativeReply(input: EnqueueNativeReplyInput): Promise<EnqueueMessageResult>;
283
- dequeueMessage(targetAlias?: string, mode?: "any" | "steer_only"): Promise<TransientQueuedMessage | undefined>;
278
+ dequeueMessage(targetAlias?: string, mode?: "any" | "steer_only"): Promise<(TransientQueuedMessage & {
279
+ queuedAhead?: number;
280
+ }) | undefined>;
284
281
  /** Controller-private shutdown inventory; full IDs never cross control output. */
285
282
  inspectQueuedMessageIds(): Promise<string[]>;
286
283
  /**
@@ -336,14 +333,12 @@ export declare class GatewayStore {
336
333
  private appendCodexOrphanRemovalEvent;
337
334
  /** Commit watch activity only after every message-admission check succeeds. */
338
335
  private applyProgressWatchMessageActivity;
339
- private progressWatchDueTransition;
336
+ private inspectProgressWatchDue;
340
337
  private commitProgressWatchNudge;
341
338
  private installProgressWatch;
342
- private requireProgressWatchJournalCapacity;
343
- private appendProgressWatchEvent;
339
+ private appendProgressWatchEvents;
344
340
  private settleProgressWatchesForAliases;
345
341
  private settleProgressWatchesForPair;
346
- private bindRouteProgressWatchConversation;
347
342
  private finishMetadata;
348
343
  private validateAffectedInFlightSettlements;
349
344
  private validateAffectedPairInFlightSettlements;