agent-embassy 1.2.0 → 1.4.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 (109) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/CONTRIBUTING.md +50 -16
  3. package/README.md +57 -25
  4. package/README.zh-CN.md +45 -23
  5. package/SECURITY.md +68 -48
  6. package/dist/src/gateway/claude-helper-protocol.d.ts +1 -0
  7. package/dist/src/gateway/claude-helper-protocol.js +4 -2
  8. package/dist/src/gateway/claude-helper-protocol.js.map +1 -1
  9. package/dist/src/gateway/claude-helper-supervisor.d.ts +1 -0
  10. package/dist/src/gateway/claude-helper-supervisor.js +3 -1
  11. package/dist/src/gateway/claude-helper-supervisor.js.map +1 -1
  12. package/dist/src/gateway/claude-runtime.d.ts +0 -2
  13. package/dist/src/gateway/claude-runtime.js +6 -17
  14. package/dist/src/gateway/claude-runtime.js.map +1 -1
  15. package/dist/src/gateway/cli-copy.d.ts +1 -1
  16. package/dist/src/gateway/cli-copy.en.d.ts +4 -1
  17. package/dist/src/gateway/cli-copy.en.js +7 -3
  18. package/dist/src/gateway/cli-copy.en.js.map +1 -1
  19. package/dist/src/gateway/cli-copy.js +3 -0
  20. package/dist/src/gateway/cli-copy.js.map +1 -1
  21. package/dist/src/gateway/cli-copy.zh-CN.d.ts +4 -1
  22. package/dist/src/gateway/cli-copy.zh-CN.js +7 -3
  23. package/dist/src/gateway/cli-copy.zh-CN.js.map +1 -1
  24. package/dist/src/gateway/cli.d.ts +2 -5
  25. package/dist/src/gateway/cli.js +41 -67
  26. package/dist/src/gateway/cli.js.map +1 -1
  27. package/dist/src/gateway/codex-app-server.d.ts +2 -8
  28. package/dist/src/gateway/codex-app-server.js +36 -62
  29. package/dist/src/gateway/codex-app-server.js.map +1 -1
  30. package/dist/src/gateway/codex-local-transport.d.ts +4 -10
  31. package/dist/src/gateway/codex-local-transport.js +13 -16
  32. package/dist/src/gateway/codex-local-transport.js.map +1 -1
  33. package/dist/src/gateway/compatibility.d.ts +0 -27
  34. package/dist/src/gateway/compatibility.js +1 -101
  35. package/dist/src/gateway/compatibility.js.map +1 -1
  36. package/dist/src/gateway/config.d.ts +1 -4
  37. package/dist/src/gateway/config.js +0 -10
  38. package/dist/src/gateway/config.js.map +1 -1
  39. package/dist/src/gateway/control.d.ts +2 -21
  40. package/dist/src/gateway/control.js +7 -36
  41. package/dist/src/gateway/control.js.map +1 -1
  42. package/dist/src/gateway/dashboard-copy.d.ts +1 -1
  43. package/dist/src/gateway/dashboard-copy.en.d.ts +21 -8
  44. package/dist/src/gateway/dashboard-copy.en.js +40 -27
  45. package/dist/src/gateway/dashboard-copy.en.js.map +1 -1
  46. package/dist/src/gateway/dashboard-copy.js +21 -8
  47. package/dist/src/gateway/dashboard-copy.js.map +1 -1
  48. package/dist/src/gateway/dashboard-copy.zh-CN.d.ts +21 -8
  49. package/dist/src/gateway/dashboard-copy.zh-CN.js +40 -27
  50. package/dist/src/gateway/dashboard-copy.zh-CN.js.map +1 -1
  51. package/dist/src/gateway/dashboard-model.d.ts +4 -9
  52. package/dist/src/gateway/dashboard-model.js +159 -46
  53. package/dist/src/gateway/dashboard-model.js.map +1 -1
  54. package/dist/src/gateway/dashboard.js +27 -16
  55. package/dist/src/gateway/dashboard.js.map +1 -1
  56. package/dist/src/gateway/instance-lease.d.ts +2 -3
  57. package/dist/src/gateway/instance-lease.js +17 -140
  58. package/dist/src/gateway/instance-lease.js.map +1 -1
  59. package/dist/src/gateway/live-dashboard-app/app.js +62 -63
  60. package/dist/src/gateway/live-dashboard-command.d.ts +5 -1
  61. package/dist/src/gateway/live-dashboard-command.js +8 -6
  62. package/dist/src/gateway/live-dashboard-command.js.map +1 -1
  63. package/dist/src/gateway/live-dashboard-http.d.ts +0 -4
  64. package/dist/src/gateway/live-dashboard-http.js +20 -94
  65. package/dist/src/gateway/live-dashboard-http.js.map +1 -1
  66. package/dist/src/gateway/live-dashboard-protocol.d.ts +1 -5
  67. package/dist/src/gateway/live-dashboard-protocol.js +0 -42
  68. package/dist/src/gateway/live-dashboard-protocol.js.map +1 -1
  69. package/dist/src/gateway/live-dashboard-server.d.ts +2 -2
  70. package/dist/src/gateway/live-dashboard-server.js +18 -4
  71. package/dist/src/gateway/live-dashboard-server.js.map +1 -1
  72. package/dist/src/gateway/live-dashboard.d.ts +3 -6
  73. package/dist/src/gateway/live-dashboard.js +6 -42
  74. package/dist/src/gateway/live-dashboard.js.map +1 -1
  75. package/dist/src/gateway/progress-watch-machine.d.ts +6 -5
  76. package/dist/src/gateway/progress-watch-machine.js +6 -6
  77. package/dist/src/gateway/progress-watch-machine.js.map +1 -1
  78. package/dist/src/gateway/provenance-envelope.d.ts +1 -0
  79. package/dist/src/gateway/provenance-envelope.js +11 -4
  80. package/dist/src/gateway/provenance-envelope.js.map +1 -1
  81. package/dist/src/gateway/providers.d.ts +2 -21
  82. package/dist/src/gateway/providers.js +21 -261
  83. package/dist/src/gateway/providers.js.map +1 -1
  84. package/dist/src/gateway/server.js +0 -3
  85. package/dist/src/gateway/server.js.map +1 -1
  86. package/dist/src/gateway/service.d.ts +5 -15
  87. package/dist/src/gateway/service.js +101 -265
  88. package/dist/src/gateway/service.js.map +1 -1
  89. package/dist/src/gateway/store.d.ts +9 -21
  90. package/dist/src/gateway/store.js +360 -140
  91. package/dist/src/gateway/store.js.map +1 -1
  92. package/dist/src/gateway/types.d.ts +1 -6
  93. package/dist/src/gateway/types.js.map +1 -1
  94. package/docs/CONFIGURATION.md +102 -0
  95. package/docs/CONFIGURATION.zh-CN.md +72 -0
  96. package/docs/DASHBOARD.md +103 -0
  97. package/docs/DASHBOARD.zh-CN.md +47 -0
  98. package/docs/DELIVERY.md +84 -0
  99. package/docs/DELIVERY.zh-CN.md +53 -0
  100. package/docs/GATEWAY-ARCHITECTURE.md +249 -153
  101. package/package.json +8 -4
  102. package/skills/embassy-peer/SKILL.md +25 -10
  103. package/dist/src/gateway/claude-compatibility-scratch.d.ts +0 -18
  104. package/dist/src/gateway/claude-compatibility-scratch.js +0 -158
  105. package/dist/src/gateway/claude-compatibility-scratch.js.map +0 -1
  106. package/dist/src/gateway/live-dashboard-bootstrap.d.ts +0 -36
  107. package/dist/src/gateway/live-dashboard-bootstrap.js +0 -176
  108. package/dist/src/gateway/live-dashboard-bootstrap.js.map +0 -1
  109. package/docs/DESIGN.md +0 -134
@@ -3,23 +3,12 @@ import type { GatewayConfig } from "./config.js";
3
3
  import { type ProgressWatchMachine, type ProgressWatchOutcome } from "./progress-watch-machine.js";
4
4
  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
5
  export declare const GATEWAY_MAX_STATE_FILE_BYTES: number;
6
- export type OpenProgressWatchInput = Readonly<{
7
- conversationId: string;
8
- ownerAlias: string;
9
- workerAlias: string;
10
- idleMs: number;
11
- }>;
12
6
  export type ProgressWatchAction = Readonly<{
13
7
  type: "send_nudge";
14
8
  conversationId: string;
15
9
  ownerAlias: string;
16
10
  workerAlias: string;
17
11
  nudgeNumber: 1 | 2;
18
- }> | Readonly<{
19
- type: "notify_capability_degraded";
20
- conversationId: string;
21
- ownerAlias: string;
22
- workerAlias: string;
23
12
  }> | Readonly<{
24
13
  type: "settled";
25
14
  conversationId: string;
@@ -244,20 +233,16 @@ export declare class GatewayStore {
244
233
  }>;
245
234
  /** Bounded metadata-only graph inventory for controller inference. */
246
235
  inspectPairs(): Promise<GatewayPairInput[]>;
247
- /** Open one durable owner-ended watch on an exact consent edge. */
248
- openProgressWatch(input: OpenProgressWatchInput): Promise<{
249
- created: boolean;
250
- watch: ProgressWatchMachine;
251
- }>;
252
236
  inspectProgressWatches(): Promise<ProgressWatchMachine[]>;
237
+ /** Bind one restarted route-capability watch to its first exact owner send. */
238
+ bindProgressWatchConversation(input: Readonly<{
239
+ conversationId: string;
240
+ ownerAlias: string;
241
+ workerAlias: string;
242
+ }>): Promise<boolean>;
253
243
  inspectCompatibilityAttestation(surface: CompatibilitySurface, version: string): Promise<CompatibilityAttestation | undefined>;
254
244
  inspectCompatibilityAttestations(): Promise<CompatibilityAttestation[]>;
255
245
  recordCompatibilityAttestation(attestation: CompatibilityAttestation): Promise<void>;
256
- touchProgressWatch(input: Readonly<{
257
- conversationId: string;
258
- actorAlias: string;
259
- workerReportedComplete?: true;
260
- }>): Promise<boolean>;
261
246
  touchProgressWatchesForAlias(alias: string): Promise<number>;
262
247
  settleProgressWatch(input: Readonly<{
263
248
  conversationId: string;
@@ -353,9 +338,12 @@ export declare class GatewayStore {
353
338
  private applyProgressWatchMessageActivity;
354
339
  private progressWatchDueTransition;
355
340
  private commitProgressWatchNudge;
341
+ private installProgressWatch;
342
+ private requireProgressWatchJournalCapacity;
356
343
  private appendProgressWatchEvent;
357
344
  private settleProgressWatchesForAliases;
358
345
  private settleProgressWatchesForPair;
346
+ private bindRouteProgressWatchConversation;
359
347
  private finishMetadata;
360
348
  private validateAffectedInFlightSettlements;
361
349
  private validateAffectedPairInFlightSettlements;