@rivet-dev/agentos-core 0.0.0-abc-fixes-1.d8c4d95 → 0.0.0-agent-acp-codex-session-benchmark.62b1f46
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/README.md +48 -48
- package/dist/agent-os.d.ts +215 -161
- package/dist/agent-os.js +1300 -2576
- package/dist/agentos-package.d.ts +27 -0
- package/dist/agentos-package.js +21 -0
- package/dist/base-filesystem.d.ts +1 -16
- package/dist/base-filesystem.js +1 -173
- package/dist/cron/cron-manager.d.ts +39 -14
- package/dist/cron/cron-manager.js +289 -128
- package/dist/cron/errors.d.ts +8 -0
- package/dist/cron/errors.js +16 -0
- package/dist/cron/index.d.ts +1 -3
- package/dist/cron/index.js +1 -2
- package/dist/cron/types.d.ts +2 -2
- package/dist/default-software.d.ts +8 -0
- package/dist/default-software.js +10 -0
- package/dist/filesystem-snapshot.d.ts +1 -1
- package/dist/filesystem-snapshot.js +1 -1
- package/dist/generated/AcpLimitsConfig.d.ts +4 -0
- package/dist/generated/AcpLimitsConfig.js +2 -0
- package/dist/generated/CreateVmConfig.d.ts +29 -0
- package/dist/generated/FsPermissionRule.d.ts +6 -0
- package/dist/generated/FsPermissionRule.js +1 -0
- package/dist/generated/FsPermissionRuleSet.d.ts +6 -0
- package/dist/generated/FsPermissionRuleSet.js +1 -0
- package/dist/generated/FsPermissionScope.d.ts +3 -0
- package/dist/generated/FsPermissionScope.js +1 -0
- package/dist/generated/HttpLimitsConfig.d.ts +3 -0
- package/dist/generated/HttpLimitsConfig.js +2 -0
- package/dist/generated/JsModuleResolution.d.ts +1 -0
- package/dist/generated/JsModuleResolution.js +2 -0
- package/dist/generated/JsRuntimeConfig.d.ts +31 -0
- package/dist/generated/JsRuntimeConfig.js +1 -0
- package/dist/generated/JsRuntimeLimitsConfig.d.ts +8 -0
- package/dist/generated/JsRuntimeLimitsConfig.js +2 -0
- package/dist/generated/JsRuntimePlatform.d.ts +1 -0
- package/dist/generated/JsRuntimePlatform.js +2 -0
- package/dist/generated/MountPluginDescriptor.d.ts +4 -0
- package/dist/generated/MountPluginDescriptor.js +2 -0
- package/dist/generated/NativeRootFilesystemConfig.d.ts +5 -0
- package/dist/generated/NativeRootFilesystemConfig.js +1 -0
- package/dist/generated/PatternPermissionRule.d.ts +6 -0
- package/dist/generated/PatternPermissionRule.js +1 -0
- package/dist/generated/PatternPermissionRuleSet.d.ts +6 -0
- package/dist/generated/PatternPermissionRuleSet.js +1 -0
- package/dist/generated/PatternPermissionScope.d.ts +3 -0
- package/dist/generated/PatternPermissionScope.js +1 -0
- package/dist/generated/PermissionMode.d.ts +1 -0
- package/dist/generated/PermissionMode.js +2 -0
- package/dist/generated/PermissionsPolicy.d.ts +10 -0
- package/dist/generated/PermissionsPolicy.js +1 -0
- package/dist/generated/PluginLimitsConfig.d.ts +4 -0
- package/dist/generated/PluginLimitsConfig.js +2 -0
- package/dist/generated/PythonLimitsConfig.d.ts +6 -0
- package/dist/generated/PythonLimitsConfig.js +2 -0
- package/dist/generated/ResourceLimitsConfig.d.ts +25 -0
- package/dist/generated/ResourceLimitsConfig.js +2 -0
- package/dist/generated/RootFilesystemConfig.d.ts +9 -0
- package/dist/generated/RootFilesystemConfig.js +1 -0
- package/dist/generated/RootFilesystemEntry.d.ts +13 -0
- package/dist/generated/RootFilesystemEntry.js +1 -0
- package/dist/generated/RootFilesystemEntryEncoding.d.ts +1 -0
- package/dist/generated/RootFilesystemEntryEncoding.js +2 -0
- package/dist/generated/RootFilesystemEntryKind.d.ts +1 -0
- package/dist/generated/RootFilesystemEntryKind.js +2 -0
- package/dist/generated/RootFilesystemLowerDescriptor.d.ts +7 -0
- package/dist/generated/RootFilesystemLowerDescriptor.js +1 -0
- package/dist/generated/RootFilesystemMode.d.ts +1 -0
- package/dist/generated/RootFilesystemMode.js +2 -0
- package/dist/generated/ToolLimitsConfig.d.ts +10 -0
- package/dist/generated/ToolLimitsConfig.js +2 -0
- package/dist/generated/VmDnsConfig.d.ts +6 -0
- package/dist/generated/VmDnsConfig.js +2 -0
- package/dist/generated/VmLimitsConfig.d.ts +18 -0
- package/dist/generated/VmLimitsConfig.js +1 -0
- package/dist/generated/VmListenPolicyConfig.d.ts +5 -0
- package/dist/generated/VmListenPolicyConfig.js +2 -0
- package/dist/generated/WasmLimitsConfig.d.ts +7 -0
- package/dist/generated/WasmLimitsConfig.js +2 -0
- package/dist/host-dir-mount.d.ts +5 -5
- package/dist/host-dir-mount.js +4 -4
- package/dist/host-tools-zod.js +27 -7
- package/dist/host-tools.d.ts +2 -9
- package/dist/host-tools.js +0 -18
- package/dist/index.d.ts +7 -4
- package/dist/index.js +6 -4
- package/dist/layers.d.ts +3 -3
- package/dist/layers.js +19 -10
- package/dist/memory-filesystem.d.ts +39 -0
- package/dist/memory-filesystem.js +375 -0
- package/dist/options-schema.d.ts +452 -0
- package/dist/options-schema.js +269 -0
- package/dist/overlay-filesystem.d.ts +1 -1
- package/dist/overlay-filesystem.js +3 -3
- package/dist/packages.d.ts +10 -123
- package/dist/packages.js +3 -329
- package/dist/runtime.d.ts +41 -184
- package/dist/sidecar/agentos-protocol.d.ts +232 -29
- package/dist/sidecar/agentos-protocol.js +456 -120
- package/dist/sidecar/binary.d.ts +2 -2
- package/dist/sidecar/binary.js +2 -2
- package/dist/sidecar/native-process-client.d.ts +5 -3
- package/dist/sidecar/native-process-client.js +5 -3
- package/dist/sidecar/permissions.d.ts +4 -3
- package/dist/sidecar/permissions.js +6 -23
- package/dist/sidecar/rpc-client.d.ts +74 -86
- package/dist/sidecar/rpc-client.js +422 -1418
- package/dist/test/file-system.d.ts +1 -1
- package/dist/test/file-system.js +3 -1
- package/dist/test/runtime.d.ts +2 -3
- package/dist/test/runtime.js +1 -1
- package/dist/test/terminal-harness.d.ts +5 -4
- package/dist/test/terminal-harness.js +12 -7
- package/dist/types.d.ts +12 -5
- package/package.json +37 -41
- package/dist/agents.d.ts +0 -63
- package/dist/agents.js +0 -42
- package/dist/cron/parse-schedule.d.ts +0 -25
- package/dist/cron/parse-schedule.js +0 -66
- package/dist/cron/schedule-driver.d.ts +0 -19
- package/dist/cron/timer-driver.d.ts +0 -17
- package/dist/cron/timer-driver.js +0 -61
- package/dist/runtime-compat.d.ts +0 -475
- package/dist/runtime-compat.js +0 -2010
- package/dist/sidecar/cargo.d.ts +0 -2
- package/dist/sidecar/cargo.js +0 -142
- package/fixtures/AGENTOS_SYSTEM_PROMPT.md +0 -21
- /package/dist/{cron/schedule-driver.js → generated/CreateVmConfig.js} +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as bare from "@rivetkit/bare-ts";
|
|
2
2
|
export type i32 = number;
|
|
3
3
|
export type u32 = number;
|
|
4
|
+
export type u64 = bigint;
|
|
4
5
|
export type JsonUtf8 = string;
|
|
5
6
|
export declare function readJsonUtf8(bc: bare.ByteCursor): JsonUtf8;
|
|
6
7
|
export declare function writeJsonUtf8(bc: bare.ByteCursor, x: JsonUtf8): void;
|
|
@@ -13,15 +14,14 @@ export declare function readAcpRuntimeKind(bc: bare.ByteCursor): AcpRuntimeKind;
|
|
|
13
14
|
export declare function writeAcpRuntimeKind(bc: bare.ByteCursor, x: AcpRuntimeKind): void;
|
|
14
15
|
export type AcpCreateSessionRequest = {
|
|
15
16
|
readonly agentType: string;
|
|
16
|
-
readonly runtime: AcpRuntimeKind;
|
|
17
|
-
readonly
|
|
18
|
-
readonly
|
|
19
|
-
readonly
|
|
20
|
-
readonly
|
|
21
|
-
readonly
|
|
22
|
-
readonly
|
|
23
|
-
readonly
|
|
24
|
-
readonly skipOsInstructions: boolean;
|
|
17
|
+
readonly runtime: AcpRuntimeKind | null;
|
|
18
|
+
readonly cwd: string | null;
|
|
19
|
+
readonly args: readonly string[] | null;
|
|
20
|
+
readonly env: ReadonlyMap<string, string> | null;
|
|
21
|
+
readonly protocolVersion: i32 | null;
|
|
22
|
+
readonly clientCapabilities: JsonUtf8 | null;
|
|
23
|
+
readonly mcpServers: JsonUtf8 | null;
|
|
24
|
+
readonly skipOsInstructions: boolean | null;
|
|
25
25
|
readonly additionalInstructions: string | null;
|
|
26
26
|
};
|
|
27
27
|
export declare function readAcpCreateSessionRequest(bc: bare.ByteCursor): AcpCreateSessionRequest;
|
|
@@ -33,11 +33,49 @@ export type AcpSessionRequest = {
|
|
|
33
33
|
};
|
|
34
34
|
export declare function readAcpSessionRequest(bc: bare.ByteCursor): AcpSessionRequest;
|
|
35
35
|
export declare function writeAcpSessionRequest(bc: bare.ByteCursor, x: AcpSessionRequest): void;
|
|
36
|
+
/**
|
|
37
|
+
* Select a session configuration option by its adapter-reported category. The
|
|
38
|
+
* sidecar owns category-to-config-id resolution and adapter-specific read-only
|
|
39
|
+
* behavior; clients forward only the caller's requested value.
|
|
40
|
+
*/
|
|
41
|
+
export type AcpSetSessionConfigRequest = {
|
|
42
|
+
readonly sessionId: string;
|
|
43
|
+
readonly category: string;
|
|
44
|
+
readonly value: string;
|
|
45
|
+
};
|
|
46
|
+
export declare function readAcpSetSessionConfigRequest(bc: bare.ByteCursor): AcpSetSessionConfigRequest;
|
|
47
|
+
export declare function writeAcpSetSessionConfigRequest(bc: bare.ByteCursor, x: AcpSetSessionConfigRequest): void;
|
|
48
|
+
/**
|
|
49
|
+
* Enumerate the agents available in this VM. The sidecar answers from the already
|
|
50
|
+
* projected `/opt/agentos` packages (client parses no manifests).
|
|
51
|
+
*/
|
|
52
|
+
export type AcpListAgentsRequest = {
|
|
53
|
+
readonly reserved: boolean;
|
|
54
|
+
};
|
|
55
|
+
export declare function readAcpListAgentsRequest(bc: bare.ByteCursor): AcpListAgentsRequest;
|
|
56
|
+
export declare function writeAcpListAgentsRequest(bc: bare.ByteCursor, x: AcpListAgentsRequest): void;
|
|
57
|
+
export type AcpAgentEntry = {
|
|
58
|
+
readonly id: string;
|
|
59
|
+
readonly installed: boolean;
|
|
60
|
+
readonly adapterEntrypoint: string;
|
|
61
|
+
};
|
|
62
|
+
export declare function readAcpAgentEntry(bc: bare.ByteCursor): AcpAgentEntry;
|
|
63
|
+
export declare function writeAcpAgentEntry(bc: bare.ByteCursor, x: AcpAgentEntry): void;
|
|
64
|
+
export type AcpListAgentsResponse = {
|
|
65
|
+
readonly agents: readonly AcpAgentEntry[];
|
|
66
|
+
};
|
|
67
|
+
export declare function readAcpListAgentsResponse(bc: bare.ByteCursor): AcpListAgentsResponse;
|
|
68
|
+
export declare function writeAcpListAgentsResponse(bc: bare.ByteCursor, x: AcpListAgentsResponse): void;
|
|
36
69
|
export type AcpGetSessionStateRequest = {
|
|
37
70
|
readonly sessionId: string;
|
|
38
71
|
};
|
|
39
72
|
export declare function readAcpGetSessionStateRequest(bc: bare.ByteCursor): AcpGetSessionStateRequest;
|
|
40
73
|
export declare function writeAcpGetSessionStateRequest(bc: bare.ByteCursor, x: AcpGetSessionStateRequest): void;
|
|
74
|
+
export type AcpListSessionsRequest = {
|
|
75
|
+
readonly reserved: boolean;
|
|
76
|
+
};
|
|
77
|
+
export declare function readAcpListSessionsRequest(bc: bare.ByteCursor): AcpListSessionsRequest;
|
|
78
|
+
export declare function writeAcpListSessionsRequest(bc: bare.ByteCursor, x: AcpListSessionsRequest): void;
|
|
41
79
|
export type AcpCloseSessionRequest = {
|
|
42
80
|
readonly sessionId: string;
|
|
43
81
|
};
|
|
@@ -55,26 +93,93 @@ export type AcpResumeSessionRequest = {
|
|
|
55
93
|
readonly sessionId: string;
|
|
56
94
|
readonly agentType: string;
|
|
57
95
|
readonly transcriptPath: string | null;
|
|
58
|
-
readonly cwd: string;
|
|
59
|
-
readonly env: ReadonlyMap<string, string
|
|
96
|
+
readonly cwd: string | null;
|
|
97
|
+
readonly env: ReadonlyMap<string, string> | null;
|
|
60
98
|
};
|
|
61
99
|
export declare function readAcpResumeSessionRequest(bc: bare.ByteCursor): AcpResumeSessionRequest;
|
|
62
100
|
export declare function writeAcpResumeSessionRequest(bc: bare.ByteCursor, x: AcpResumeSessionRequest): void;
|
|
101
|
+
/**
|
|
102
|
+
* Browser RESUMABLE path only (AGENTOS-WEB-ASYNC-AGENTS.md §3.2.1): the kernel
|
|
103
|
+
* worker feeds a chunk of the agent's stdout into the in-flight create_session /
|
|
104
|
+
* session/prompt handshake. The synchronous sidecar would block inside one
|
|
105
|
+
* pushFrame; the resumable browser path returns between steps so the worker can
|
|
106
|
+
* service the agent's own syscalls (incl. pi's net call for inference) on fresh,
|
|
107
|
+
* non-nested pushFrames. `processId` is the handshake handle returned in the
|
|
108
|
+
* AcpPendingResponse for the originating create/prompt request.
|
|
109
|
+
*/
|
|
110
|
+
export type AcpDeliverAgentOutputRequest = {
|
|
111
|
+
readonly processId: string;
|
|
112
|
+
readonly chunk: ArrayBuffer;
|
|
113
|
+
};
|
|
114
|
+
export declare function readAcpDeliverAgentOutputRequest(bc: bare.ByteCursor): AcpDeliverAgentOutputRequest;
|
|
115
|
+
export declare function writeAcpDeliverAgentOutputRequest(bc: bare.ByteCursor, x: AcpDeliverAgentOutputRequest): void;
|
|
116
|
+
/**
|
|
117
|
+
* Host-observed adapter stderr. The host forwards opaque bytes; the sidecar owns
|
|
118
|
+
* session identity, limits, event construction, and retryable delivery.
|
|
119
|
+
*/
|
|
120
|
+
export type AcpDeliverAgentStderrRequest = {
|
|
121
|
+
readonly processId: string;
|
|
122
|
+
readonly chunk: ArrayBuffer;
|
|
123
|
+
};
|
|
124
|
+
export declare function readAcpDeliverAgentStderrRequest(bc: bare.ByteCursor): AcpDeliverAgentStderrRequest;
|
|
125
|
+
export declare function writeAcpDeliverAgentStderrRequest(bc: bare.ByteCursor, x: AcpDeliverAgentStderrRequest): void;
|
|
126
|
+
/**
|
|
127
|
+
* Browser RESUMABLE terminal cleanup. The sidecar owns the stable error code and
|
|
128
|
+
* message for each observed terminal condition; the browser driver supplies only
|
|
129
|
+
* the process handle and the fact it observed.
|
|
130
|
+
*/
|
|
131
|
+
export declare enum AcpPendingAbortReason {
|
|
132
|
+
AgentExited = "AgentExited",
|
|
133
|
+
InteractionTimeout = "InteractionTimeout",
|
|
134
|
+
DriverFailed = "DriverFailed",
|
|
135
|
+
CallerCancelled = "CallerCancelled"
|
|
136
|
+
}
|
|
137
|
+
export declare function readAcpPendingAbortReason(bc: bare.ByteCursor): AcpPendingAbortReason;
|
|
138
|
+
export declare function writeAcpPendingAbortReason(bc: bare.ByteCursor, x: AcpPendingAbortReason): void;
|
|
139
|
+
export type AcpAbortPendingRequest = {
|
|
140
|
+
readonly processId: string;
|
|
141
|
+
readonly reason: AcpPendingAbortReason;
|
|
142
|
+
/**
|
|
143
|
+
* Present only when the browser execution transport directly observed a
|
|
144
|
+
* process exit status. Timeouts/driver failures and indirect exits omit it.
|
|
145
|
+
*/
|
|
146
|
+
readonly exitCode: i32 | null;
|
|
147
|
+
};
|
|
148
|
+
export declare function readAcpAbortPendingRequest(bc: bare.ByteCursor): AcpAbortPendingRequest;
|
|
149
|
+
export declare function writeAcpAbortPendingRequest(bc: bare.ByteCursor, x: AcpAbortPendingRequest): void;
|
|
63
150
|
export type AcpRequest = {
|
|
64
151
|
readonly tag: "AcpCreateSessionRequest";
|
|
65
152
|
readonly val: AcpCreateSessionRequest;
|
|
66
153
|
} | {
|
|
67
154
|
readonly tag: "AcpSessionRequest";
|
|
68
155
|
readonly val: AcpSessionRequest;
|
|
156
|
+
} | {
|
|
157
|
+
readonly tag: "AcpSetSessionConfigRequest";
|
|
158
|
+
readonly val: AcpSetSessionConfigRequest;
|
|
69
159
|
} | {
|
|
70
160
|
readonly tag: "AcpGetSessionStateRequest";
|
|
71
161
|
readonly val: AcpGetSessionStateRequest;
|
|
162
|
+
} | {
|
|
163
|
+
readonly tag: "AcpListSessionsRequest";
|
|
164
|
+
readonly val: AcpListSessionsRequest;
|
|
72
165
|
} | {
|
|
73
166
|
readonly tag: "AcpCloseSessionRequest";
|
|
74
167
|
readonly val: AcpCloseSessionRequest;
|
|
75
168
|
} | {
|
|
76
169
|
readonly tag: "AcpResumeSessionRequest";
|
|
77
170
|
readonly val: AcpResumeSessionRequest;
|
|
171
|
+
} | {
|
|
172
|
+
readonly tag: "AcpDeliverAgentOutputRequest";
|
|
173
|
+
readonly val: AcpDeliverAgentOutputRequest;
|
|
174
|
+
} | {
|
|
175
|
+
readonly tag: "AcpDeliverAgentStderrRequest";
|
|
176
|
+
readonly val: AcpDeliverAgentStderrRequest;
|
|
177
|
+
} | {
|
|
178
|
+
readonly tag: "AcpAbortPendingRequest";
|
|
179
|
+
readonly val: AcpAbortPendingRequest;
|
|
180
|
+
} | {
|
|
181
|
+
readonly tag: "AcpListAgentsRequest";
|
|
182
|
+
readonly val: AcpListAgentsRequest;
|
|
78
183
|
};
|
|
79
184
|
export declare function readAcpRequest(bc: bare.ByteCursor): AcpRequest;
|
|
80
185
|
export declare function writeAcpRequest(bc: bare.ByteCursor, x: AcpRequest): void;
|
|
@@ -82,6 +187,12 @@ export declare function encodeAcpRequest(x: AcpRequest, config?: Partial<bare.Co
|
|
|
82
187
|
export declare function decodeAcpRequest(bytes: Uint8Array): AcpRequest;
|
|
83
188
|
export type AcpSessionCreatedResponse = {
|
|
84
189
|
readonly sessionId: string;
|
|
190
|
+
/**
|
|
191
|
+
* Complete host-route identity. Clients install the route atomically when this
|
|
192
|
+
* response frame arrives, before following bootstrap events are dispatched.
|
|
193
|
+
*/
|
|
194
|
+
readonly agentType: string;
|
|
195
|
+
readonly processId: string;
|
|
85
196
|
readonly pid: u32 | null;
|
|
86
197
|
readonly modes: JsonUtf8 | null;
|
|
87
198
|
readonly configOptions: readonly JsonUtf8[];
|
|
@@ -93,6 +204,11 @@ export declare function writeAcpSessionCreatedResponse(bc: bare.ByteCursor, x: A
|
|
|
93
204
|
export type AcpSessionRpcResponse = {
|
|
94
205
|
readonly sessionId: string;
|
|
95
206
|
readonly response: JsonUtf8;
|
|
207
|
+
/**
|
|
208
|
+
* Present for session/prompt. The sidecar accumulates agent_message_chunk
|
|
209
|
+
* notifications while still streaming them as live session events.
|
|
210
|
+
*/
|
|
211
|
+
readonly text: string | null;
|
|
96
212
|
};
|
|
97
213
|
export declare function readAcpSessionRpcResponse(bc: bare.ByteCursor): AcpSessionRpcResponse;
|
|
98
214
|
export declare function writeAcpSessionRpcResponse(bc: bare.ByteCursor, x: AcpSessionRpcResponse): void;
|
|
@@ -110,11 +226,27 @@ export type AcpSessionStateResponse = {
|
|
|
110
226
|
};
|
|
111
227
|
export declare function readAcpSessionStateResponse(bc: bare.ByteCursor): AcpSessionStateResponse;
|
|
112
228
|
export declare function writeAcpSessionStateResponse(bc: bare.ByteCursor, x: AcpSessionStateResponse): void;
|
|
229
|
+
export type AcpSessionEntry = {
|
|
230
|
+
readonly sessionId: string;
|
|
231
|
+
readonly agentType: string;
|
|
232
|
+
};
|
|
233
|
+
export declare function readAcpSessionEntry(bc: bare.ByteCursor): AcpSessionEntry;
|
|
234
|
+
export declare function writeAcpSessionEntry(bc: bare.ByteCursor, x: AcpSessionEntry): void;
|
|
235
|
+
export type AcpListSessionsResponse = {
|
|
236
|
+
readonly sessions: readonly AcpSessionEntry[];
|
|
237
|
+
};
|
|
238
|
+
export declare function readAcpListSessionsResponse(bc: bare.ByteCursor): AcpListSessionsResponse;
|
|
239
|
+
export declare function writeAcpListSessionsResponse(bc: bare.ByteCursor, x: AcpListSessionsResponse): void;
|
|
113
240
|
export type AcpSessionClosedResponse = {
|
|
114
241
|
readonly sessionId: string;
|
|
115
242
|
};
|
|
116
243
|
export declare function readAcpSessionClosedResponse(bc: bare.ByteCursor): AcpSessionClosedResponse;
|
|
117
244
|
export declare function writeAcpSessionClosedResponse(bc: bare.ByteCursor, x: AcpSessionClosedResponse): void;
|
|
245
|
+
export type AcpAgentStderrDeliveredResponse = {
|
|
246
|
+
readonly processId: string;
|
|
247
|
+
};
|
|
248
|
+
export declare function readAcpAgentStderrDeliveredResponse(bc: bare.ByteCursor): AcpAgentStderrDeliveredResponse;
|
|
249
|
+
export declare function writeAcpAgentStderrDeliveredResponse(bc: bare.ByteCursor, x: AcpAgentStderrDeliveredResponse): void;
|
|
118
250
|
/**
|
|
119
251
|
* Result of AcpResumeSessionRequest. `sessionId` is the live ACP session id after
|
|
120
252
|
* resume: equal to the requested id for native loads, or the freshly assigned id
|
|
@@ -125,6 +257,12 @@ export declare function writeAcpSessionClosedResponse(bc: bare.ByteCursor, x: Ac
|
|
|
125
257
|
export type AcpSessionResumedResponse = {
|
|
126
258
|
readonly sessionId: string;
|
|
127
259
|
readonly mode: string;
|
|
260
|
+
/**
|
|
261
|
+
* Complete host-route identity for the newly live adapter/session.
|
|
262
|
+
*/
|
|
263
|
+
readonly agentType: string;
|
|
264
|
+
readonly processId: string;
|
|
265
|
+
readonly pid: u32 | null;
|
|
128
266
|
};
|
|
129
267
|
export declare function readAcpSessionResumedResponse(bc: bare.ByteCursor): AcpSessionResumedResponse;
|
|
130
268
|
export declare function writeAcpSessionResumedResponse(bc: bare.ByteCursor, x: AcpSessionResumedResponse): void;
|
|
@@ -134,6 +272,27 @@ export type AcpErrorResponse = {
|
|
|
134
272
|
};
|
|
135
273
|
export declare function readAcpErrorResponse(bc: bare.ByteCursor): AcpErrorResponse;
|
|
136
274
|
export declare function writeAcpErrorResponse(bc: bare.ByteCursor, x: AcpErrorResponse): void;
|
|
275
|
+
/**
|
|
276
|
+
* Browser RESUMABLE path: the create_session / session/prompt request (and each
|
|
277
|
+
* AcpDeliverAgentOutputRequest that has not yet completed the handshake) returns
|
|
278
|
+
* this, carrying the `processId` handle the kernel worker drives the interaction
|
|
279
|
+
* with. The real result (AcpSessionCreatedResponse / AcpSessionRpcResponse) is
|
|
280
|
+
* delivered as the response to the AcpDeliverAgentOutputRequest that completes it.
|
|
281
|
+
*/
|
|
282
|
+
export type AcpPendingResponse = {
|
|
283
|
+
readonly processId: string;
|
|
284
|
+
/**
|
|
285
|
+
* Sidecar-owned deadline for the currently awaited ACP phase.
|
|
286
|
+
*/
|
|
287
|
+
readonly timeoutMs: u32;
|
|
288
|
+
/**
|
|
289
|
+
* Stable phase identity. Browser routing resets the deadline only when this
|
|
290
|
+
* changes; partial lines and same-phase notifications cannot extend it.
|
|
291
|
+
*/
|
|
292
|
+
readonly timeoutPhase: string;
|
|
293
|
+
};
|
|
294
|
+
export declare function readAcpPendingResponse(bc: bare.ByteCursor): AcpPendingResponse;
|
|
295
|
+
export declare function writeAcpPendingResponse(bc: bare.ByteCursor, x: AcpPendingResponse): void;
|
|
137
296
|
export type AcpResponse = {
|
|
138
297
|
readonly tag: "AcpSessionCreatedResponse";
|
|
139
298
|
readonly val: AcpSessionCreatedResponse;
|
|
@@ -143,15 +302,27 @@ export type AcpResponse = {
|
|
|
143
302
|
} | {
|
|
144
303
|
readonly tag: "AcpSessionStateResponse";
|
|
145
304
|
readonly val: AcpSessionStateResponse;
|
|
305
|
+
} | {
|
|
306
|
+
readonly tag: "AcpListSessionsResponse";
|
|
307
|
+
readonly val: AcpListSessionsResponse;
|
|
146
308
|
} | {
|
|
147
309
|
readonly tag: "AcpSessionClosedResponse";
|
|
148
310
|
readonly val: AcpSessionClosedResponse;
|
|
311
|
+
} | {
|
|
312
|
+
readonly tag: "AcpAgentStderrDeliveredResponse";
|
|
313
|
+
readonly val: AcpAgentStderrDeliveredResponse;
|
|
149
314
|
} | {
|
|
150
315
|
readonly tag: "AcpSessionResumedResponse";
|
|
151
316
|
readonly val: AcpSessionResumedResponse;
|
|
152
317
|
} | {
|
|
153
318
|
readonly tag: "AcpErrorResponse";
|
|
154
319
|
readonly val: AcpErrorResponse;
|
|
320
|
+
} | {
|
|
321
|
+
readonly tag: "AcpPendingResponse";
|
|
322
|
+
readonly val: AcpPendingResponse;
|
|
323
|
+
} | {
|
|
324
|
+
readonly tag: "AcpListAgentsResponse";
|
|
325
|
+
readonly val: AcpListAgentsResponse;
|
|
155
326
|
};
|
|
156
327
|
export declare function readAcpResponse(bc: bare.ByteCursor): AcpResponse;
|
|
157
328
|
export declare function writeAcpResponse(bc: bare.ByteCursor, x: AcpResponse): void;
|
|
@@ -163,9 +334,48 @@ export type AcpSessionEvent = {
|
|
|
163
334
|
};
|
|
164
335
|
export declare function readAcpSessionEvent(bc: bare.ByteCursor): AcpSessionEvent;
|
|
165
336
|
export declare function writeAcpSessionEvent(bc: bare.ByteCursor, x: AcpSessionEvent): void;
|
|
337
|
+
export type AcpAgentStderrEvent = {
|
|
338
|
+
readonly sessionId: string;
|
|
339
|
+
readonly agentType: string;
|
|
340
|
+
readonly processId: string;
|
|
341
|
+
readonly chunk: ArrayBuffer;
|
|
342
|
+
};
|
|
343
|
+
export declare function readAcpAgentStderrEvent(bc: bare.ByteCursor): AcpAgentStderrEvent;
|
|
344
|
+
export declare function writeAcpAgentStderrEvent(bc: bare.ByteCursor, x: AcpAgentStderrEvent): void;
|
|
345
|
+
/**
|
|
346
|
+
* Emitted when the ACP adapter process exits without an explicit close_session —
|
|
347
|
+
* a crash from the host's perspective (any spontaneous exit, including code 0).
|
|
348
|
+
* `restart` reports the sidecar's bounded auto-restart outcome:
|
|
349
|
+
* "restarted" — adapter respawned and the session was natively re-attached
|
|
350
|
+
* (session/load | session/resume) under the same sessionId;
|
|
351
|
+
* the session stays live.
|
|
352
|
+
* "unsupported" — the respawned adapter does not advertise a native resume
|
|
353
|
+
* capability; the session record was evicted.
|
|
354
|
+
* "failed" — the respawn or the native re-attach errored; evicted.
|
|
355
|
+
* "exhausted" — maxRestarts was already spent for this session; evicted.
|
|
356
|
+
* `exitCode` is absent when the exit was observed indirectly (e.g. a write to
|
|
357
|
+
* the adapter's stdin failed because the process was already gone).
|
|
358
|
+
*/
|
|
359
|
+
export type AcpAgentExitedEvent = {
|
|
360
|
+
readonly sessionId: string;
|
|
361
|
+
readonly agentType: string;
|
|
362
|
+
readonly processId: string;
|
|
363
|
+
readonly exitCode: i32 | null;
|
|
364
|
+
readonly restart: string;
|
|
365
|
+
readonly restartCount: u32;
|
|
366
|
+
readonly maxRestarts: u32;
|
|
367
|
+
};
|
|
368
|
+
export declare function readAcpAgentExitedEvent(bc: bare.ByteCursor): AcpAgentExitedEvent;
|
|
369
|
+
export declare function writeAcpAgentExitedEvent(bc: bare.ByteCursor, x: AcpAgentExitedEvent): void;
|
|
166
370
|
export type AcpEvent = {
|
|
167
371
|
readonly tag: "AcpSessionEvent";
|
|
168
372
|
readonly val: AcpSessionEvent;
|
|
373
|
+
} | {
|
|
374
|
+
readonly tag: "AcpAgentStderrEvent";
|
|
375
|
+
readonly val: AcpAgentStderrEvent;
|
|
376
|
+
} | {
|
|
377
|
+
readonly tag: "AcpAgentExitedEvent";
|
|
378
|
+
readonly val: AcpAgentExitedEvent;
|
|
169
379
|
};
|
|
170
380
|
export declare function readAcpEvent(bc: bare.ByteCursor): AcpEvent;
|
|
171
381
|
export declare function writeAcpEvent(bc: bare.ByteCursor, x: AcpEvent): void;
|
|
@@ -175,21 +385,18 @@ export type AcpPermissionCallback = {
|
|
|
175
385
|
readonly sessionId: string;
|
|
176
386
|
readonly permissionId: string;
|
|
177
387
|
readonly params: JsonUtf8;
|
|
388
|
+
/**
|
|
389
|
+
* Sidecar-owned host bookkeeping deadline. This is strictly later than the
|
|
390
|
+
* sidecar's authoritative permission decision timeout; clients must not use
|
|
391
|
+
* it to choose the permission default.
|
|
392
|
+
*/
|
|
393
|
+
readonly cleanupAfterMs: u64;
|
|
178
394
|
};
|
|
179
395
|
export declare function readAcpPermissionCallback(bc: bare.ByteCursor): AcpPermissionCallback;
|
|
180
396
|
export declare function writeAcpPermissionCallback(bc: bare.ByteCursor, x: AcpPermissionCallback): void;
|
|
181
|
-
export type AcpHostRequestCallback = {
|
|
182
|
-
readonly sessionId: string;
|
|
183
|
-
readonly request: JsonUtf8;
|
|
184
|
-
};
|
|
185
|
-
export declare function readAcpHostRequestCallback(bc: bare.ByteCursor): AcpHostRequestCallback;
|
|
186
|
-
export declare function writeAcpHostRequestCallback(bc: bare.ByteCursor, x: AcpHostRequestCallback): void;
|
|
187
397
|
export type AcpCallback = {
|
|
188
398
|
readonly tag: "AcpPermissionCallback";
|
|
189
399
|
readonly val: AcpPermissionCallback;
|
|
190
|
-
} | {
|
|
191
|
-
readonly tag: "AcpHostRequestCallback";
|
|
192
|
-
readonly val: AcpHostRequestCallback;
|
|
193
400
|
};
|
|
194
401
|
export declare function readAcpCallback(bc: bare.ByteCursor): AcpCallback;
|
|
195
402
|
export declare function writeAcpCallback(bc: bare.ByteCursor, x: AcpCallback): void;
|
|
@@ -197,21 +404,17 @@ export declare function encodeAcpCallback(x: AcpCallback, config?: Partial<bare.
|
|
|
197
404
|
export declare function decodeAcpCallback(bytes: Uint8Array): AcpCallback;
|
|
198
405
|
export type AcpPermissionCallbackResponse = {
|
|
199
406
|
readonly permissionId: string;
|
|
200
|
-
|
|
407
|
+
/**
|
|
408
|
+
* The client supplies only an explicit host answer. The ACP sidecar owns the
|
|
409
|
+
* default behavior when the route is absent, times out, or fails.
|
|
410
|
+
*/
|
|
411
|
+
readonly reply: string | null;
|
|
201
412
|
};
|
|
202
413
|
export declare function readAcpPermissionCallbackResponse(bc: bare.ByteCursor): AcpPermissionCallbackResponse;
|
|
203
414
|
export declare function writeAcpPermissionCallbackResponse(bc: bare.ByteCursor, x: AcpPermissionCallbackResponse): void;
|
|
204
|
-
export type AcpHostRequestCallbackResponse = {
|
|
205
|
-
readonly response: JsonUtf8 | null;
|
|
206
|
-
};
|
|
207
|
-
export declare function readAcpHostRequestCallbackResponse(bc: bare.ByteCursor): AcpHostRequestCallbackResponse;
|
|
208
|
-
export declare function writeAcpHostRequestCallbackResponse(bc: bare.ByteCursor, x: AcpHostRequestCallbackResponse): void;
|
|
209
415
|
export type AcpCallbackResponse = {
|
|
210
416
|
readonly tag: "AcpPermissionCallbackResponse";
|
|
211
417
|
readonly val: AcpPermissionCallbackResponse;
|
|
212
|
-
} | {
|
|
213
|
-
readonly tag: "AcpHostRequestCallbackResponse";
|
|
214
|
-
readonly val: AcpHostRequestCallbackResponse;
|
|
215
418
|
};
|
|
216
419
|
export declare function readAcpCallbackResponse(bc: bare.ByteCursor): AcpCallbackResponse;
|
|
217
420
|
export declare function writeAcpCallbackResponse(bc: bare.ByteCursor, x: AcpCallbackResponse): void;
|