agent-embassy 1.7.0 → 1.8.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 +51 -47
- package/README.md +26 -9
- package/README.zh-CN.md +22 -9
- package/SECURITY.md +48 -35
- package/dist/src/gateway/acp-client.d.ts +12 -19
- package/dist/src/gateway/acp-client.js +90 -65
- package/dist/src/gateway/acp-client.js.map +1 -1
- package/dist/src/gateway/acp-provider.d.ts +11 -10
- package/dist/src/gateway/acp-provider.js +165 -53
- package/dist/src/gateway/acp-provider.js.map +1 -1
- package/dist/src/gateway/claude-helper-client.d.ts +2 -43
- package/dist/src/gateway/claude-helper-client.js +1 -211
- package/dist/src/gateway/claude-helper-client.js.map +1 -1
- package/dist/src/gateway/claude-helper-protocol.d.ts +16 -74
- package/dist/src/gateway/claude-helper-protocol.js +99 -378
- package/dist/src/gateway/claude-helper-protocol.js.map +1 -1
- package/dist/src/gateway/claude-helper-supervisor.d.ts +56 -44
- package/dist/src/gateway/claude-helper-supervisor.js +265 -456
- package/dist/src/gateway/claude-helper-supervisor.js.map +1 -1
- package/dist/src/gateway/claude-helper.js +184 -210
- package/dist/src/gateway/claude-helper.js.map +1 -1
- package/dist/src/gateway/claude-peer.d.ts +20 -87
- package/dist/src/gateway/claude-peer.js +310 -1009
- package/dist/src/gateway/claude-peer.js.map +1 -1
- package/dist/src/gateway/claude-runtime.d.ts +13 -15
- package/dist/src/gateway/claude-runtime.js +14 -168
- package/dist/src/gateway/claude-runtime.js.map +1 -1
- package/dist/src/gateway/cli-copy.en.d.ts +2 -2
- package/dist/src/gateway/cli-copy.en.js +4 -2
- package/dist/src/gateway/cli-copy.en.js.map +1 -1
- package/dist/src/gateway/cli-copy.zh-CN.d.ts +2 -2
- package/dist/src/gateway/cli-copy.zh-CN.js +4 -2
- package/dist/src/gateway/cli-copy.zh-CN.js.map +1 -1
- package/dist/src/gateway/cli.d.ts +7 -2
- package/dist/src/gateway/cli.js +277 -575
- package/dist/src/gateway/cli.js.map +1 -1
- package/dist/src/gateway/codex-app-server.d.ts +5 -227
- package/dist/src/gateway/codex-app-server.js +18 -1463
- package/dist/src/gateway/codex-app-server.js.map +1 -1
- package/dist/src/gateway/codex-doctor.d.ts +36 -0
- package/dist/src/gateway/codex-doctor.js +127 -0
- package/dist/src/gateway/codex-doctor.js.map +1 -0
- package/dist/src/gateway/codex-local-transport.d.ts +6 -6
- package/dist/src/gateway/codex-local-transport.js +13 -10
- package/dist/src/gateway/codex-local-transport.js.map +1 -1
- package/dist/src/gateway/codex-stateless-transport.d.ts +114 -0
- package/dist/src/gateway/codex-stateless-transport.js +1108 -0
- package/dist/src/gateway/codex-stateless-transport.js.map +1 -0
- package/dist/src/gateway/config.d.ts +2 -9
- package/dist/src/gateway/config.js +62 -100
- package/dist/src/gateway/config.js.map +1 -1
- package/dist/src/gateway/control.d.ts +36 -90
- package/dist/src/gateway/control.js +465 -1123
- 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 +8 -26
- package/dist/src/gateway/dashboard-copy.en.js +19 -37
- package/dist/src/gateway/dashboard-copy.en.js.map +1 -1
- package/dist/src/gateway/dashboard-copy.js +8 -26
- package/dist/src/gateway/dashboard-copy.js.map +1 -1
- package/dist/src/gateway/dashboard-copy.zh-CN.d.ts +8 -26
- package/dist/src/gateway/dashboard-copy.zh-CN.js +19 -37
- package/dist/src/gateway/dashboard-copy.zh-CN.js.map +1 -1
- package/dist/src/gateway/dashboard-model.d.ts +8 -22
- package/dist/src/gateway/dashboard-model.js +44 -130
- package/dist/src/gateway/dashboard-model.js.map +1 -1
- package/dist/src/gateway/dashboard.d.ts +0 -6
- package/dist/src/gateway/dashboard.js +3 -7
- package/dist/src/gateway/dashboard.js.map +1 -1
- package/dist/src/gateway/live-dashboard-app/app.js +20 -34
- package/dist/src/gateway/live-dashboard-command.js +2 -2
- package/dist/src/gateway/live-dashboard-command.js.map +1 -1
- package/dist/src/gateway/live-dashboard-http.d.ts +1 -1
- package/dist/src/gateway/live-dashboard-http.js +2 -2
- package/dist/src/gateway/live-dashboard-http.js.map +1 -1
- package/dist/src/gateway/progress-watch-machine.d.ts +1 -37
- package/dist/src/gateway/progress-watch-machine.js +4 -15
- package/dist/src/gateway/progress-watch-machine.js.map +1 -1
- package/dist/src/gateway/providers.d.ts +58 -191
- package/dist/src/gateway/providers.js +637 -2434
- package/dist/src/gateway/providers.js.map +1 -1
- package/dist/src/gateway/server.d.ts +16 -25
- package/dist/src/gateway/server.js +165 -240
- package/dist/src/gateway/server.js.map +1 -1
- package/dist/src/gateway/service.d.ts +149 -427
- package/dist/src/gateway/service.js +1639 -5662
- package/dist/src/gateway/service.js.map +1 -1
- package/dist/src/gateway/state-v2-to-v3.d.ts +23 -0
- package/dist/src/gateway/state-v2-to-v3.js +994 -0
- package/dist/src/gateway/state-v2-to-v3.js.map +1 -0
- package/dist/src/gateway/store.d.ts +54 -309
- package/dist/src/gateway/store.js +1560 -3510
- package/dist/src/gateway/store.js.map +1 -1
- package/dist/src/gateway/types.d.ts +181 -225
- package/dist/src/gateway/types.js +115 -251
- package/dist/src/gateway/types.js.map +1 -1
- package/docs/CONFIGURATION.md +22 -9
- package/docs/CONFIGURATION.zh-CN.md +21 -9
- package/docs/DASHBOARD.md +10 -10
- package/docs/DASHBOARD.zh-CN.md +3 -3
- package/docs/DELIVERY.md +4 -4
- package/docs/DELIVERY.zh-CN.md +4 -4
- package/docs/GATEWAY-ARCHITECTURE.md +158 -187
- package/package.json +1 -1
- package/skills/embassy-peer/SKILL.md +28 -22
- package/dist/src/gateway/codex-registration-generation.d.ts +0 -5
- package/dist/src/gateway/codex-registration-generation.js +0 -19
- package/dist/src/gateway/codex-registration-generation.js.map +0 -1
- package/dist/src/gateway/codex-registration-succession.d.ts +0 -209
- package/dist/src/gateway/codex-registration-succession.js +0 -588
- package/dist/src/gateway/codex-registration-succession.js.map +0 -1
- package/dist/src/gateway/compatibility.d.ts +0 -22
- package/dist/src/gateway/compatibility.js +0 -23
- package/dist/src/gateway/compatibility.js.map +0 -1
- package/dist/src/gateway/delivery-machine.d.ts +0 -235
- package/dist/src/gateway/delivery-machine.js +0 -540
- package/dist/src/gateway/delivery-machine.js.map +0 -1
|
@@ -1,12 +1,58 @@
|
|
|
1
|
+
import { type ChildProcess } from "node:child_process";
|
|
1
2
|
import type { AttestedClaudePeerRuntime } from "./claude-runtime.js";
|
|
2
|
-
import { type ClaudeNativeHelperFactory } from "./claude-helper-client.js";
|
|
3
3
|
import type { GatewayDeliveryNoticeMode } from "./config.js";
|
|
4
4
|
import type { DashboardLocale } from "./locale.js";
|
|
5
|
-
import type { ClaudeNativeCodexSuccessionBarrier } from "./providers.js";
|
|
6
5
|
import type { GatewayAdapterCallbacks, GatewayAdapterDispatchResult } from "./service.js";
|
|
7
|
-
import { type GatewayProvider, type
|
|
6
|
+
import { type GatewayProvider, type LogicalRouteBinding } from "./types.js";
|
|
7
|
+
import { type ClaudeNativeHelperCommand, type ClaudeNativeHelperEvent, type ClaudeNativeHelperRegistration, type ClaudeNativeHelperResult } from "./claude-helper-protocol.js";
|
|
8
|
+
export type ClaudeNativeHelperClientCallbacks = Readonly<{
|
|
9
|
+
onEvent: (event: ClaudeNativeHelperEvent) => void;
|
|
10
|
+
onExit: (event: Readonly<{
|
|
11
|
+
code: number | null;
|
|
12
|
+
signal: NodeJS.Signals | null;
|
|
13
|
+
}>) => void;
|
|
14
|
+
}>;
|
|
15
|
+
export type ClaudeNativeHelperClientStartOptions = Readonly<{
|
|
16
|
+
entryPath?: string;
|
|
17
|
+
runtime: AttestedClaudePeerRuntime;
|
|
18
|
+
hostId: "this-mac";
|
|
19
|
+
locale: DashboardLocale;
|
|
20
|
+
deliveryNotices: GatewayDeliveryNoticeMode;
|
|
21
|
+
maxPendingMessages: number;
|
|
22
|
+
registration: ClaudeNativeHelperRegistration;
|
|
23
|
+
callbacks: ClaudeNativeHelperClientCallbacks;
|
|
24
|
+
}>;
|
|
25
|
+
export interface ClaudeNativeHelperClientLike {
|
|
26
|
+
readonly pid: number;
|
|
27
|
+
readonly registration: ClaudeNativeHelperRegistration;
|
|
28
|
+
generation: string;
|
|
29
|
+
request(command: ClaudeNativeHelperCommand, timeoutMs?: number): Promise<ClaudeNativeHelperResult>;
|
|
30
|
+
close(): Promise<void>;
|
|
31
|
+
forceClose(): Promise<void>;
|
|
32
|
+
}
|
|
33
|
+
export type ClaudeNativeHelperFactory = (options: ClaudeNativeHelperClientStartOptions) => Promise<ClaudeNativeHelperClientLike>;
|
|
34
|
+
export declare class ClaudeNativeHelperClient implements ClaudeNativeHelperClientLike {
|
|
35
|
+
#private;
|
|
36
|
+
readonly child: ChildProcess;
|
|
37
|
+
readonly callbacks: ClaudeNativeHelperClientCallbacks;
|
|
38
|
+
readonly pid: number;
|
|
39
|
+
readonly registration: ClaudeNativeHelperRegistration;
|
|
40
|
+
generation: string;
|
|
41
|
+
private constructor();
|
|
42
|
+
static start(options: ClaudeNativeHelperClientStartOptions): Promise<ClaudeNativeHelperClient>;
|
|
43
|
+
request(command: ClaudeNativeHelperCommand, timeoutMs?: number): Promise<ClaudeNativeHelperResult>;
|
|
44
|
+
close(): Promise<void>;
|
|
45
|
+
forceClose(): Promise<void>;
|
|
46
|
+
}
|
|
47
|
+
export declare const createClaudeNativeHelper: ClaudeNativeHelperFactory;
|
|
48
|
+
export type ClaudeNativeHelperPreparedDispatch = Readonly<{
|
|
49
|
+
frameBytes: number;
|
|
50
|
+
sha256: string;
|
|
51
|
+
perform: () => Promise<GatewayAdapterDispatchResult>;
|
|
52
|
+
cancel: () => Promise<void>;
|
|
53
|
+
}>;
|
|
8
54
|
export type ClaudeNativeHelperSupervisorOptions = Readonly<{
|
|
9
|
-
identity:
|
|
55
|
+
identity: Pick<LogicalRouteBinding, "provider" | "hostId">;
|
|
10
56
|
runtime: AttestedClaudePeerRuntime;
|
|
11
57
|
locale: DashboardLocale;
|
|
12
58
|
deliveryNotices: GatewayDeliveryNoticeMode;
|
|
@@ -17,63 +63,29 @@ export type ClaudeNativeHelperSupervisorOptions = Readonly<{
|
|
|
17
63
|
}>;
|
|
18
64
|
export declare class ClaudeNativeHelperSupervisor {
|
|
19
65
|
#private;
|
|
66
|
+
readonly options: ClaudeNativeHelperSupervisorOptions;
|
|
20
67
|
constructor(options: ClaudeNativeHelperSupervisorOptions);
|
|
21
68
|
get size(): number;
|
|
22
|
-
advertise(input:
|
|
23
|
-
alias: string;
|
|
24
|
-
sourceProvider: GatewayProvider;
|
|
25
|
-
cwd: string;
|
|
26
|
-
}>): Promise<void>;
|
|
27
|
-
currentGeneration(alias: string): string;
|
|
69
|
+
advertise(input: ClaudeNativeHelperRegistration): Promise<void>;
|
|
28
70
|
updateStatus(alias: string, status: "idle" | "busy" | "waiting"): Promise<void>;
|
|
29
71
|
unadvertise(alias: string): Promise<void>;
|
|
30
|
-
|
|
72
|
+
prepareDispatch(input: Readonly<{
|
|
31
73
|
sourceAlias: string;
|
|
32
74
|
sourceProvider: GatewayProvider;
|
|
33
75
|
targetAlias: string;
|
|
34
76
|
conversationId: string;
|
|
35
77
|
selectedAlias?: string;
|
|
36
78
|
stateRoot?: string;
|
|
37
|
-
binding:
|
|
79
|
+
binding: LogicalRouteBinding;
|
|
38
80
|
authorization: "selected_route" | "native_reply";
|
|
39
81
|
messageId: string;
|
|
40
82
|
text: string;
|
|
41
83
|
expectsReply: boolean;
|
|
42
84
|
deadlineAt: string;
|
|
43
85
|
progressWatchActive?: true;
|
|
44
|
-
}>): Promise<
|
|
45
|
-
releaseRoute(routeHandle: string): Promise<void>;
|
|
86
|
+
}>): Promise<ClaudeNativeHelperPreparedDispatch>;
|
|
46
87
|
updateInboundStatus(receiptHandle: string, status: "held" | "delivered" | "denied" | "expired", diagnosticCode?: string): Promise<void>;
|
|
47
|
-
notifyInboundProgress(receiptHandle: string, progress:
|
|
48
|
-
kind: "stall";
|
|
49
|
-
reason: "ROUTE_BUSY" | "ROUTE_UNAVAILABLE" | "CODEX_ROUTE_STALE" | "AWAITING_EXTERNAL_APPROVAL";
|
|
50
|
-
queuedForMs: number;
|
|
51
|
-
}>): Promise<void>;
|
|
88
|
+
notifyInboundProgress(receiptHandle: string, progress: import("./claude-peer.js").ClaudePeerInboundProgress): Promise<void>;
|
|
52
89
|
releaseInboundReceipt(receiptHandle: string): Promise<boolean>;
|
|
53
|
-
quiesceAll(): Promise<void>;
|
|
54
|
-
quiesceGeneration(generation: string): Promise<void>;
|
|
55
|
-
observeBarrier(generation: string): Promise<ClaudeNativeCodexSuccessionBarrier>;
|
|
56
|
-
prepareGeneration(input: Readonly<{
|
|
57
|
-
alias: string;
|
|
58
|
-
cwd: string;
|
|
59
|
-
generation: string;
|
|
60
|
-
currentGeneration: string;
|
|
61
|
-
}>): Promise<void>;
|
|
62
|
-
publishPrepared(input: Readonly<{
|
|
63
|
-
currentGeneration: string;
|
|
64
|
-
preparedGeneration: string;
|
|
65
|
-
}>): Promise<"published" | "not_published" | "unknown">;
|
|
66
|
-
activatePrepared(generation: string): Promise<void>;
|
|
67
|
-
cleanupPrepared(generation: string): Promise<void>;
|
|
68
|
-
resumeGeneration(generation: string): Promise<void>;
|
|
69
|
-
rollbackPrepared(input: Readonly<{
|
|
70
|
-
preparedGeneration: string;
|
|
71
|
-
resumeGeneration: string;
|
|
72
|
-
}>): Promise<void>;
|
|
73
|
-
retireGeneration(input: Readonly<{
|
|
74
|
-
retiredGeneration: string;
|
|
75
|
-
protectedActiveGeneration: string;
|
|
76
|
-
}>): Promise<void>;
|
|
77
|
-
purgeGenerationReplies(generation: string): Promise<number>;
|
|
78
90
|
close(): Promise<void>;
|
|
79
91
|
}
|