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.
- package/CHANGELOG.md +32 -0
- package/CONTRIBUTING.md +61 -6
- package/README.md +6 -5
- package/README.zh-CN.md +4 -4
- package/SECURITY.md +128 -24
- package/dist/src/gateway/claude-peer.d.ts +8 -5
- package/dist/src/gateway/claude-peer.js +81 -36
- package/dist/src/gateway/claude-peer.js.map +1 -1
- package/dist/src/gateway/claude-runtime.d.ts +4 -0
- package/dist/src/gateway/claude-runtime.js +50 -39
- 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 +1 -1
- package/dist/src/gateway/cli-copy.en.js +1 -1
- package/dist/src/gateway/cli-copy.en.js.map +1 -1
- package/dist/src/gateway/cli-copy.js +1 -1
- package/dist/src/gateway/cli-copy.js.map +1 -1
- package/dist/src/gateway/cli-copy.zh-CN.d.ts +1 -1
- package/dist/src/gateway/cli-copy.zh-CN.js +1 -1
- 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 +3 -7
- package/dist/src/gateway/cli.js.map +1 -1
- package/dist/src/gateway/codex-app-server.d.ts +2 -1
- package/dist/src/gateway/codex-app-server.js +1 -1
- package/dist/src/gateway/codex-app-server.js.map +1 -1
- package/dist/src/gateway/codex-local-transport.d.ts +10 -6
- package/dist/src/gateway/codex-local-transport.js +101 -56
- package/dist/src/gateway/codex-local-transport.js.map +1 -1
- package/dist/src/gateway/compatibility.d.ts +11 -0
- package/dist/src/gateway/compatibility.js +104 -22
- package/dist/src/gateway/compatibility.js.map +1 -1
- package/dist/src/gateway/control.js +28 -30
- 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 +36 -17
- package/dist/src/gateway/dashboard-copy.en.js +50 -31
- package/dist/src/gateway/dashboard-copy.en.js.map +1 -1
- package/dist/src/gateway/dashboard-copy.js +36 -17
- package/dist/src/gateway/dashboard-copy.js.map +1 -1
- package/dist/src/gateway/dashboard-copy.zh-CN.d.ts +36 -17
- package/dist/src/gateway/dashboard-copy.zh-CN.js +50 -31
- package/dist/src/gateway/dashboard-copy.zh-CN.js.map +1 -1
- package/dist/src/gateway/dashboard-model.d.ts +176 -8
- package/dist/src/gateway/dashboard-model.js +420 -70
- package/dist/src/gateway/dashboard-model.js.map +1 -1
- package/dist/src/gateway/dashboard.js +48 -135
- package/dist/src/gateway/dashboard.js.map +1 -1
- package/dist/src/gateway/live-dashboard-app/app.js +148 -247
- package/dist/src/gateway/live-dashboard-assets.js +2 -1
- package/dist/src/gateway/live-dashboard-assets.js.map +1 -1
- package/dist/src/gateway/live-dashboard-stream.d.ts +2 -2
- package/dist/src/gateway/live-dashboard-stream.js +2 -2
- package/dist/src/gateway/live-dashboard-stream.js.map +1 -1
- package/dist/src/gateway/progress-watch-machine.d.ts +50 -64
- package/dist/src/gateway/progress-watch-machine.js +42 -133
- package/dist/src/gateway/progress-watch-machine.js.map +1 -1
- package/dist/src/gateway/provenance-envelope.d.ts +2 -0
- package/dist/src/gateway/provenance-envelope.js +13 -3
- package/dist/src/gateway/provenance-envelope.js.map +1 -1
- package/dist/src/gateway/providers.d.ts +69 -15
- package/dist/src/gateway/providers.js +456 -109
- package/dist/src/gateway/providers.js.map +1 -1
- package/dist/src/gateway/server.d.ts +8 -5
- package/dist/src/gateway/server.js +94 -13
- package/dist/src/gateway/server.js.map +1 -1
- package/dist/src/gateway/service.d.ts +25 -1
- package/dist/src/gateway/service.js +252 -69
- package/dist/src/gateway/service.js.map +1 -1
- package/dist/src/gateway/store.d.ts +23 -28
- package/dist/src/gateway/store.js +479 -467
- package/dist/src/gateway/store.js.map +1 -1
- package/dist/src/gateway/types.d.ts +38 -11
- package/dist/src/gateway/types.js +141 -3
- package/dist/src/gateway/types.js.map +1 -1
- package/docs/CONFIGURATION.md +8 -8
- package/docs/CONFIGURATION.zh-CN.md +8 -8
- package/docs/DASHBOARD.md +29 -6
- package/docs/DASHBOARD.zh-CN.md +1 -1
- package/docs/GATEWAY-ARCHITECTURE.md +143 -57
- package/package.json +1 -1
- 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
|
-
|
|
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
|
-
|
|
237
|
-
|
|
238
|
-
|
|
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
|
-
|
|
241
|
-
|
|
242
|
-
|
|
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
|
-
|
|
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<
|
|
248
|
+
advanceDueProgressWatches(): Promise<ProgressWatchNudge[]>;
|
|
254
249
|
nextProgressWatchActionAt(): Promise<string | undefined>;
|
|
255
|
-
deferProgressWatchNudge(conversationId: string,
|
|
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
|
|
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
|
|
336
|
+
private inspectProgressWatchDue;
|
|
340
337
|
private commitProgressWatchNudge;
|
|
341
338
|
private installProgressWatch;
|
|
342
|
-
private
|
|
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;
|