agent-embassy 1.0.0 → 1.2.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 +44 -0
- package/README.md +50 -5
- package/README.zh-CN.md +32 -5
- package/SECURITY.md +26 -2
- 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 +25 -1
- package/dist/src/gateway/claude-helper-supervisor.js.map +1 -1
- package/dist/src/gateway/cli-copy.en.d.ts +1 -0
- package/dist/src/gateway/cli-copy.en.js +1 -0
- package/dist/src/gateway/cli-copy.en.js.map +1 -1
- package/dist/src/gateway/cli-copy.zh-CN.d.ts +1 -0
- package/dist/src/gateway/cli-copy.zh-CN.js +1 -0
- package/dist/src/gateway/cli-copy.zh-CN.js.map +1 -1
- package/dist/src/gateway/cli.d.ts +1 -1
- package/dist/src/gateway/cli.js +20 -7
- package/dist/src/gateway/cli.js.map +1 -1
- package/dist/src/gateway/codex-app-server.js +6 -2
- package/dist/src/gateway/codex-app-server.js.map +1 -1
- package/dist/src/gateway/codex-local-transport.d.ts +13 -0
- package/dist/src/gateway/codex-local-transport.js +21 -2
- package/dist/src/gateway/codex-local-transport.js.map +1 -1
- package/dist/src/gateway/config.js +5 -3
- package/dist/src/gateway/config.js.map +1 -1
- package/dist/src/gateway/control.d.ts +11 -1
- package/dist/src/gateway/control.js +48 -14
- 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 +6 -0
- package/dist/src/gateway/dashboard-copy.en.js +11 -5
- package/dist/src/gateway/dashboard-copy.en.js.map +1 -1
- package/dist/src/gateway/dashboard-copy.js +6 -0
- package/dist/src/gateway/dashboard-copy.js.map +1 -1
- package/dist/src/gateway/dashboard-copy.zh-CN.d.ts +6 -0
- package/dist/src/gateway/dashboard-copy.zh-CN.js +11 -5
- package/dist/src/gateway/dashboard-copy.zh-CN.js.map +1 -1
- package/dist/src/gateway/dashboard-model.d.ts +4 -2
- package/dist/src/gateway/dashboard-model.js +6 -0
- package/dist/src/gateway/dashboard-model.js.map +1 -1
- package/dist/src/gateway/dashboard.js +5 -3
- package/dist/src/gateway/dashboard.js.map +1 -1
- package/dist/src/gateway/live-dashboard-app/app.js +48 -10
- package/dist/src/gateway/live-dashboard-command.js +10 -0
- package/dist/src/gateway/live-dashboard-command.js.map +1 -1
- package/dist/src/gateway/live-dashboard-http.d.ts +3 -0
- package/dist/src/gateway/live-dashboard-http.js +13 -0
- package/dist/src/gateway/live-dashboard-http.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/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 +43 -16
- package/dist/src/gateway/providers.js +688 -61
- package/dist/src/gateway/providers.js.map +1 -1
- package/dist/src/gateway/server.d.ts +2 -0
- package/dist/src/gateway/server.js +9 -3
- package/dist/src/gateway/server.js.map +1 -1
- package/dist/src/gateway/service.d.ts +102 -10
- package/dist/src/gateway/service.js +1309 -54
- package/dist/src/gateway/service.js.map +1 -1
- package/dist/src/gateway/store.d.ts +39 -3
- package/dist/src/gateway/store.js +528 -26
- package/dist/src/gateway/store.js.map +1 -1
- package/dist/src/gateway/types.d.ts +90 -5
- package/dist/src/gateway/types.js +6 -0
- package/dist/src/gateway/types.js.map +1 -1
- package/docs/GATEWAY-ARCHITECTURE.md +98 -11
- package/package.json +3 -2
- package/skills/embassy-peer/SKILL.md +15 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type CompatibilityAttestation, type CompatibilitySurface } from "./compatibility.js";
|
|
2
2
|
import type { GatewayConfig } from "./config.js";
|
|
3
3
|
import { type ProgressWatchMachine, type ProgressWatchOutcome } from "./progress-watch-machine.js";
|
|
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 RebindStaleRouteInput, type RegisterRouteInput, type RequeueInFlightMessageResult, type SettleMessageInput, type SettleMessageResult, type TerminalMessageSettlement, type TransientQueuedMessage } from "./types.js";
|
|
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
6
|
export type OpenProgressWatchInput = Readonly<{
|
|
7
7
|
conversationId: string;
|
|
@@ -138,7 +138,9 @@ export declare class GatewayStore {
|
|
|
138
138
|
commitInitialization(): Promise<void>;
|
|
139
139
|
close(): Promise<void>;
|
|
140
140
|
observeConnector(input: ObserveConnectorInput): Promise<void>;
|
|
141
|
-
markConnectorOffline(identity: PrivateEndpointIdentity, safeErrorCode?: string, inFlightSettlements?: readonly RouteInFlightSettlementInput[]
|
|
141
|
+
markConnectorOffline(identity: PrivateEndpointIdentity, safeErrorCode?: string, inFlightSettlements?: readonly RouteInFlightSettlementInput[], options?: Readonly<{
|
|
142
|
+
preserveQueued?: boolean;
|
|
143
|
+
}>): Promise<TerminalMessageSettlement[]>;
|
|
142
144
|
registerRoute(input: RegisterRouteInput): Promise<void>;
|
|
143
145
|
/**
|
|
144
146
|
* Replace the complete selected-Claude set with one exact live session in a
|
|
@@ -156,6 +158,17 @@ export declare class GatewayStore {
|
|
|
156
158
|
* display name. Names alone are never rebind authority.
|
|
157
159
|
*/
|
|
158
160
|
rebindStaleRoute(input: RebindStaleRouteInput): Promise<void>;
|
|
161
|
+
/**
|
|
162
|
+
* Atomically re-anchor only the exact Codex tasks proved present on a newly
|
|
163
|
+
* compatible App Server generation. Omitted stale tasks stay untouched.
|
|
164
|
+
*/
|
|
165
|
+
reanchorCodexRoutes(input: ReanchorCodexRoutesInput): Promise<ReanchorCodexRoutesResult>;
|
|
166
|
+
/**
|
|
167
|
+
* Dashboard recovery primitive for one abandoned Codex registration. The
|
|
168
|
+
* alias is only authority to request evaluation; durable state must prove
|
|
169
|
+
* the task is empty, stale, expired, and on a dead or superseded generation.
|
|
170
|
+
*/
|
|
171
|
+
removeStaleCodexOrphan(input: RemoveStaleCodexOrphanInput): Promise<RemoveStaleCodexOrphanResult>;
|
|
159
172
|
disableRoute(alias: string, ownerLease: string, inFlightSettlements?: readonly RouteInFlightSettlementInput[]): Promise<TerminalMessageSettlement[]>;
|
|
160
173
|
unregisterRoute(alias: string, ownerLease: string, inFlightSettlements?: readonly RouteInFlightSettlementInput[]): Promise<TerminalMessageSettlement[]>;
|
|
161
174
|
/**
|
|
@@ -172,6 +185,23 @@ export declare class GatewayStore {
|
|
|
172
185
|
* control response, dashboard projection, log, or normalized event.
|
|
173
186
|
*/
|
|
174
187
|
inspectPrivateRoute(alias: string): Promise<GatewayPrivateRouteInspection | undefined>;
|
|
188
|
+
/**
|
|
189
|
+
* Read-only preflight for service-side provider cleanup. Removal repeats the
|
|
190
|
+
* identical proof atomically so no intervening state change can authorize it.
|
|
191
|
+
*/
|
|
192
|
+
inspectStaleCodexOrphan(alias: string): Promise<PrivateRouteBinding>;
|
|
193
|
+
/**
|
|
194
|
+
* Capture the exact pre-mutation authority needed to reconcile a possible
|
|
195
|
+
* post-rename orphan-removal commit. This value remains controller-private.
|
|
196
|
+
*/
|
|
197
|
+
inspectStaleCodexOrphanRemovalAuthority(alias: string): Promise<StaleCodexOrphanRemovalAuthority>;
|
|
198
|
+
/**
|
|
199
|
+
* Fail-closed reconciliation for one exact removal whose durable rename may
|
|
200
|
+
* have committed before a directory-sync error. The latest private journal
|
|
201
|
+
* row, monotonic predecessor, alias absence, and native authority absence
|
|
202
|
+
* must all corroborate the same mutation.
|
|
203
|
+
*/
|
|
204
|
+
wasStaleCodexOrphanRemovalCommitted(input: StaleCodexOrphanRemovalCommitProofInput): Promise<boolean>;
|
|
175
205
|
/**
|
|
176
206
|
* Controller-internal inventory used to preserve exact Codex registration
|
|
177
207
|
* identities across restart. Native task handles never cross the control
|
|
@@ -266,6 +296,8 @@ export declare class GatewayStore {
|
|
|
266
296
|
*/
|
|
267
297
|
enqueueNativeReply(input: EnqueueNativeReplyInput): Promise<EnqueueMessageResult>;
|
|
268
298
|
dequeueMessage(targetAlias?: string, mode?: "any" | "steer_only"): Promise<TransientQueuedMessage | undefined>;
|
|
299
|
+
/** Controller-private shutdown inventory; full IDs never cross control output. */
|
|
300
|
+
inspectQueuedMessageIds(): Promise<string[]>;
|
|
269
301
|
/**
|
|
270
302
|
* Atomically terminalizes every message whose delivery deadline is due.
|
|
271
303
|
* Returned settlements are emitted only by the mutation that removed the
|
|
@@ -278,7 +310,7 @@ export declare class GatewayStore {
|
|
|
278
310
|
*/
|
|
279
311
|
expireDueMessages(now?: Date): Promise<TerminalMessageSettlement[]>;
|
|
280
312
|
settleMessage(input: SettleMessageInput): Promise<SettleMessageResult>;
|
|
281
|
-
requeueInFlightMessage(messageId: string, body: string): Promise<RequeueInFlightMessageResult>;
|
|
313
|
+
requeueInFlightMessage(messageId: string, body: string, safeErrorCode?: string): Promise<RequeueInFlightMessageResult>;
|
|
282
314
|
markMessageProgress(messageId: string, progress: InFlightMessageProgressState): Promise<void>;
|
|
283
315
|
/**
|
|
284
316
|
* Atomically terminalize one queued message and return the authoritative
|
|
@@ -305,6 +337,7 @@ export declare class GatewayStore {
|
|
|
305
337
|
private requireCompatibleObservedEndpoint;
|
|
306
338
|
private validateRouteInput;
|
|
307
339
|
private requireOwnedRoute;
|
|
340
|
+
private requireStaleCodexOrphan;
|
|
308
341
|
private requireAvailableRoute;
|
|
309
342
|
private requirePairRoutes;
|
|
310
343
|
private requireExactPair;
|
|
@@ -313,6 +346,9 @@ export declare class GatewayStore {
|
|
|
313
346
|
private consumeRateLimit;
|
|
314
347
|
private recordRejection;
|
|
315
348
|
private appendEvent;
|
|
349
|
+
private pruneRetainedEventBodies;
|
|
350
|
+
private appendCodexEndpointRefreshEvent;
|
|
351
|
+
private appendCodexOrphanRemovalEvent;
|
|
316
352
|
/** Commit watch activity only after every message-admission check succeeds. */
|
|
317
353
|
private applyProgressWatchMessageActivity;
|
|
318
354
|
private progressWatchDueTransition;
|