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
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { BridgeError } from "../errors.js";
|
|
3
|
+
export const PROVENANCE_RAW_BODY_MAX_BYTES = 16 * 1024;
|
|
4
|
+
export const PROVENANCE_ENVELOPE_MAX_BYTES = 64 * 1024;
|
|
5
|
+
const ALIAS_PATTERN = /^[a-z][a-z0-9_-]{0,31}@[a-z0-9](?:[a-z0-9.-]{0,61}[a-z0-9])?$/;
|
|
6
|
+
const CONVERSATION_ID_PATTERN = /^conv_[A-Za-z0-9_-]{16,64}$/;
|
|
7
|
+
const RESERVED_TAG_PATTERN = /<(?=\/?(?:cross-session-message|embassy-reply-hint)(?:[>\s/]|$))/giu;
|
|
8
|
+
const CLAUDE_FROM_NAME_MAX_CODEPOINTS = 64;
|
|
9
|
+
const LONG_ALIAS_PREFIX_CODEPOINTS = 47;
|
|
10
|
+
const LONG_ALIAS_HASH_HEX_LENGTH = 16;
|
|
11
|
+
function invalidEnvelope() {
|
|
12
|
+
throw new BridgeError("PROVENANCE_ENVELOPE_INVALID", "The provenance envelope metadata is invalid.");
|
|
13
|
+
}
|
|
14
|
+
function envelopeTooLarge() {
|
|
15
|
+
throw new BridgeError("PROVENANCE_ENVELOPE_TOO_LARGE", "The provenance envelope exceeds its byte limit.");
|
|
16
|
+
}
|
|
17
|
+
function validateInput(input) {
|
|
18
|
+
if (typeof input !== "object" ||
|
|
19
|
+
input === null ||
|
|
20
|
+
(input.direction !== "codex" && input.direction !== "claude") ||
|
|
21
|
+
typeof input.sourceAlias !== "string" ||
|
|
22
|
+
!ALIAS_PATTERN.test(input.sourceAlias) ||
|
|
23
|
+
typeof input.targetAlias !== "string" ||
|
|
24
|
+
!ALIAS_PATTERN.test(input.targetAlias) ||
|
|
25
|
+
typeof input.conversationId !== "string" ||
|
|
26
|
+
!CONVERSATION_ID_PATTERN.test(input.conversationId) ||
|
|
27
|
+
typeof input.body !== "string") {
|
|
28
|
+
invalidEnvelope();
|
|
29
|
+
}
|
|
30
|
+
if (Buffer.byteLength(input.body, "utf8") > PROVENANCE_RAW_BODY_MAX_BYTES) {
|
|
31
|
+
envelopeTooLarge();
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function claudeDisplayAlias(alias) {
|
|
35
|
+
const codepoints = [...alias];
|
|
36
|
+
if (codepoints.length <= CLAUDE_FROM_NAME_MAX_CODEPOINTS) {
|
|
37
|
+
return { displayAlias: alias, shortened: false };
|
|
38
|
+
}
|
|
39
|
+
const digest = createHash("sha256")
|
|
40
|
+
.update(alias, "utf8")
|
|
41
|
+
.digest("hex")
|
|
42
|
+
.slice(0, LONG_ALIAS_HASH_HEX_LENGTH);
|
|
43
|
+
return {
|
|
44
|
+
displayAlias: `${codepoints.slice(0, LONG_ALIAS_PREFIX_CODEPOINTS).join("")}~${digest}`,
|
|
45
|
+
shortened: true,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function neutralizeReservedTags(body) {
|
|
49
|
+
return body.replace(RESERVED_TAG_PATTERN, "<\\");
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Adds broker-owned, Claude-compatible textual framing at the provider write
|
|
53
|
+
* boundary. The result is not general XML and does not provide a cryptographic
|
|
54
|
+
* signature; the wrapper is a structural provenance marker for the recipient.
|
|
55
|
+
*/
|
|
56
|
+
export function composeProvenanceEnvelope(input) {
|
|
57
|
+
validateInput(input);
|
|
58
|
+
const display = claudeDisplayAlias(input.sourceAlias);
|
|
59
|
+
const fromName = input.direction === "codex" ? input.sourceAlias : display.displayAlias;
|
|
60
|
+
const conversationAttribute = input.direction === "codex"
|
|
61
|
+
? ` conversation="${input.conversationId}"`
|
|
62
|
+
: "";
|
|
63
|
+
const exactSourceAttribute = input.direction === "claude" && display.shortened
|
|
64
|
+
? ` from-alias="${input.sourceAlias}"`
|
|
65
|
+
: "";
|
|
66
|
+
const replyCommand = `embassy reply --conversation ${input.conversationId}` +
|
|
67
|
+
` --alias ${input.targetAlias}`;
|
|
68
|
+
const hint = `<embassy-reply-hint conversation="${input.conversationId}"` +
|
|
69
|
+
` reply-as="${input.targetAlias}"${exactSourceAttribute}>` +
|
|
70
|
+
`Reply by running \`${replyCommand}\` with the reply body on stdin. ` +
|
|
71
|
+
"Route and hop policy are rechecked.</embassy-reply-hint>";
|
|
72
|
+
const body = neutralizeReservedTags(input.body);
|
|
73
|
+
const envelope = `<cross-session-message from-name="${fromName}"${conversationAttribute}>\n` +
|
|
74
|
+
`${hint}\n${body}\n</cross-session-message>`;
|
|
75
|
+
if (Buffer.byteLength(envelope, "utf8") > PROVENANCE_ENVELOPE_MAX_BYTES) {
|
|
76
|
+
envelopeTooLarge();
|
|
77
|
+
}
|
|
78
|
+
return envelope;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=provenance-envelope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provenance-envelope.js","sourceRoot":"","sources":["../../../src/gateway/provenance-envelope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,CAAC,MAAM,6BAA6B,GAAG,EAAE,GAAG,IAAI,CAAC;AACvD,MAAM,CAAC,MAAM,6BAA6B,GAAG,EAAE,GAAG,IAAI,CAAC;AAEvD,MAAM,aAAa,GACjB,+DAA+D,CAAC;AAClE,MAAM,uBAAuB,GAAG,6BAA6B,CAAC;AAC9D,MAAM,oBAAoB,GACxB,qEAAqE,CAAC;AACxE,MAAM,+BAA+B,GAAG,EAAE,CAAC;AAC3C,MAAM,4BAA4B,GAAG,EAAE,CAAC;AACxC,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAYtC,SAAS,eAAe;IACtB,MAAM,IAAI,WAAW,CACnB,6BAA6B,EAC7B,8CAA8C,CAC/C,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB;IACvB,MAAM,IAAI,WAAW,CACnB,+BAA+B,EAC/B,iDAAiD,CACl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C;IAE/C,IACE,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,MAAM,CAAC,GAAG,6BAA6B,EACnE,CAAC;QACD,gBAAgB,EAAE,CAAC;IACrB,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ClaudePeerAdapter, type ClaudePeerInboundProgress, type ClaudePeerRegistryPublicationOutcome } from "./claude-peer.js";
|
|
2
2
|
import type { AttestedClaudePeerRuntime } from "./claude-runtime.js";
|
|
3
3
|
import { type ClaudeCompatibilityScratchFactory } from "./claude-compatibility-scratch.js";
|
|
4
|
-
import { type CompatibilityAttestation, type CompatibilityCertification, type CompatibilityProbeResult, type CompatibilitySurfaceObservation } from "./compatibility.js";
|
|
4
|
+
import { type CompatibilityAttestation, type CompatibilityCertification, type CompatibilityPolicy, type CompatibilityProbeResult, type CompatibilitySurfaceObservation } from "./compatibility.js";
|
|
5
5
|
import { type CodexConnectorObservation } from "./codex-app-server.js";
|
|
6
6
|
import type { LocalCodexTransportFactory } from "./codex-local-transport.js";
|
|
7
7
|
import type { GatewayDeliveryNoticeMode } from "./config.js";
|
|
8
8
|
import type { ClaudeNativeHelperFactory } from "./claude-helper-client.js";
|
|
9
9
|
import { type DashboardLocale } from "./locale.js";
|
|
10
|
-
import type { GatewayAdapterCallbacks, GatewayAdapterDiscoverySnapshot, GatewayAdapterDispatchResult, GatewayAdapterRouteState, GatewayAdapterStart, GatewayProviderAdapter } from "./service.js";
|
|
10
|
+
import type { GatewayAdapterCallbacks, GatewayAdapterDiscoverySnapshot, GatewayAdapterDispatchResult, GatewayAdapterEndpointRefresh, GatewayAdapterDispatchInput, GatewayAdapterRouteState, GatewayAdapterStart, GatewayProviderAdapter } from "./service.js";
|
|
11
11
|
import type { PrivateEndpointIdentity, PrivateRouteBinding } from "./types.js";
|
|
12
12
|
type ClaudePeerFactory = (runtime: AttestedClaudePeerRuntime, locale: DashboardLocale, deliveryNotices: GatewayDeliveryNoticeMode) => ClaudePeerAdapter;
|
|
13
13
|
export type LocalClaudeGatewayProviderOptions = {
|
|
@@ -161,7 +161,9 @@ export declare class LocalClaudeGatewayProvider implements GatewayProviderAdapte
|
|
|
161
161
|
releaseNativeInboundReceipt(receiptHandle: string): Promise<boolean>;
|
|
162
162
|
quiesceNativeInbound(): Promise<void>;
|
|
163
163
|
dispatch(input: {
|
|
164
|
-
sourceAlias
|
|
164
|
+
sourceAlias: string;
|
|
165
|
+
targetAlias: string;
|
|
166
|
+
conversationId: string;
|
|
165
167
|
binding: PrivateRouteBinding;
|
|
166
168
|
authorization: "selected_route" | "native_reply";
|
|
167
169
|
messageId: string;
|
|
@@ -199,6 +201,10 @@ export declare class LocalClaudeGatewayProvider implements GatewayProviderAdapte
|
|
|
199
201
|
export declare function createLocalClaudeGatewayProvider(options: LocalClaudeGatewayProviderOptions): LocalClaudeGatewayProvider;
|
|
200
202
|
export type LocalCodexGatewayProviderOptions = {
|
|
201
203
|
factory: LocalCodexTransportFactory;
|
|
204
|
+
/** Re-resolves the exact pinned managed install after its generation moves. */
|
|
205
|
+
refreshFactory?: () => Promise<LocalCodexTransportFactory>;
|
|
206
|
+
/** Controller policy retained across every endpoint generation. */
|
|
207
|
+
compatibilityPolicy?: CompatibilityPolicy;
|
|
202
208
|
cleanupPollMs?: number;
|
|
203
209
|
cleanupTimeoutMs?: number;
|
|
204
210
|
recoveryInitialMs?: number;
|
|
@@ -209,10 +215,9 @@ export type LocalCodexGatewayProviderOptions = {
|
|
|
209
215
|
now?: () => Date;
|
|
210
216
|
};
|
|
211
217
|
export declare class LocalCodexGatewayProvider implements GatewayProviderAdapter {
|
|
212
|
-
|
|
213
|
-
readonly
|
|
214
|
-
readonly
|
|
215
|
-
private readonly factory;
|
|
218
|
+
private factory;
|
|
219
|
+
private readonly refreshFactory;
|
|
220
|
+
private readonly compatibilityPolicy;
|
|
216
221
|
private readonly maxCallbacks;
|
|
217
222
|
private readonly maxRoutes;
|
|
218
223
|
private readonly maxReplyBytes;
|
|
@@ -222,26 +227,42 @@ export declare class LocalCodexGatewayProvider implements GatewayProviderAdapter
|
|
|
222
227
|
private readonly recoveryMaxMs;
|
|
223
228
|
private readonly now;
|
|
224
229
|
private readonly routes;
|
|
230
|
+
/** Exact public alias authority retained across internal route recovery. */
|
|
231
|
+
private readonly routeAliases;
|
|
225
232
|
private readonly routeCreations;
|
|
226
233
|
private readonly routeReleases;
|
|
227
234
|
private readonly routeRecoveryAttempts;
|
|
228
235
|
private readonly routeRecoveryTimers;
|
|
229
236
|
private readonly routeRecoveries;
|
|
230
237
|
private readonly routesRequiringRecovery;
|
|
238
|
+
private readonly trackedRoutes;
|
|
239
|
+
private retiredEndpointGeneration;
|
|
231
240
|
private readonly expectsReply;
|
|
232
241
|
private readonly compatibilityCertifyingRoutes;
|
|
233
242
|
private readonly compatibilityTurns;
|
|
234
243
|
private readonly callbackQueue;
|
|
235
244
|
private callbackScheduled;
|
|
236
245
|
private callbacks;
|
|
246
|
+
private endpointRefresh;
|
|
247
|
+
private endpointRefreshDelivery;
|
|
248
|
+
private endpointActivationRetry;
|
|
249
|
+
private endpointActivationRetryTimer;
|
|
250
|
+
private callbackDrainFrozen;
|
|
237
251
|
private compatibilityAttested;
|
|
252
|
+
private endpointUnavailable;
|
|
253
|
+
private pendingEndpointAttestation;
|
|
254
|
+
private pendingEndpointRefreshEvent;
|
|
238
255
|
private initialized;
|
|
239
256
|
private closing;
|
|
240
257
|
private closed;
|
|
241
258
|
constructor(options: LocalCodexGatewayProviderOptions);
|
|
259
|
+
get identity(): PrivateEndpointIdentity;
|
|
260
|
+
get protocol(): string;
|
|
261
|
+
get protocolVersion(): string;
|
|
242
262
|
compatibilitySurface(): CompatibilitySurfaceObservation;
|
|
243
263
|
acceptCompatibilityAttestation(attestation: CompatibilityAttestation): void;
|
|
244
264
|
runCompatibilityProbes(): Promise<readonly CompatibilityProbeResult[]>;
|
|
265
|
+
private runCompatibilityProbesFor;
|
|
245
266
|
runCompatibilityCertification(input: Readonly<{
|
|
246
267
|
controllerStateRoot: string;
|
|
247
268
|
routeHandle?: string;
|
|
@@ -254,17 +275,10 @@ export declare class LocalCodexGatewayProvider implements GatewayProviderAdapter
|
|
|
254
275
|
}): Promise<{
|
|
255
276
|
routeHandle: string;
|
|
256
277
|
state: GatewayAdapterRouteState;
|
|
278
|
+
endpointRefresh?: GatewayAdapterEndpointRefresh;
|
|
257
279
|
}>;
|
|
258
280
|
observeRouteSuccessionBarrier(routeHandle: string): CodexRouteSuccessionBarrier;
|
|
259
|
-
dispatch(input:
|
|
260
|
-
binding: PrivateRouteBinding;
|
|
261
|
-
authorization: "selected_route" | "native_reply";
|
|
262
|
-
messageId: string;
|
|
263
|
-
text: string;
|
|
264
|
-
expectsReply: boolean;
|
|
265
|
-
deadlineAt: string;
|
|
266
|
-
steer?: true;
|
|
267
|
-
}): Promise<GatewayAdapterDispatchResult>;
|
|
281
|
+
dispatch(input: GatewayAdapterDispatchInput): Promise<GatewayAdapterDispatchResult>;
|
|
268
282
|
releaseRoute(routeHandle: string): Promise<void>;
|
|
269
283
|
private releaseRouteInternal;
|
|
270
284
|
close(): Promise<void>;
|
|
@@ -275,6 +289,19 @@ export declare class LocalCodexGatewayProvider implements GatewayProviderAdapter
|
|
|
275
289
|
private scheduleRouteRecovery;
|
|
276
290
|
private recoverRoute;
|
|
277
291
|
private cancelRouteRecovery;
|
|
292
|
+
private isEndpointGenerationChanged;
|
|
293
|
+
private pendingEndpointActivationClaims;
|
|
294
|
+
private refreshEndpoint;
|
|
295
|
+
private performEndpointRefresh;
|
|
296
|
+
private resolveEndpointRefreshCandidate;
|
|
297
|
+
private retireEndpointGeneration;
|
|
298
|
+
private reserveSelectorRefresh;
|
|
299
|
+
private emitSelectorRefreshFallback;
|
|
300
|
+
private publishEndpointRefresh;
|
|
301
|
+
private armEndpointActivationRetry;
|
|
302
|
+
private scheduleEndpointActivationRetry;
|
|
303
|
+
private clearEndpointActivationRetry;
|
|
304
|
+
private emitEndpointRefresh;
|
|
278
305
|
private onTurnResult;
|
|
279
306
|
private queueRouteObservation;
|
|
280
307
|
private enqueueCodexCallback;
|