@rivet-dev/agentos-core 0.0.0-integrate-dylib-into-main.815fcda → 0.0.0-main.29b0797
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 +43 -43
- package/dist/agent-os.d.ts +313 -226
- package/dist/agent-os.js +1418 -1545
- package/dist/agentos-package.d.ts +31 -0
- package/dist/agentos-package.js +91 -0
- package/dist/base-filesystem.d.ts +2 -15
- package/dist/base-filesystem.js +23 -171
- package/dist/{host-tools-zod.d.ts → bindings-zod.d.ts} +1 -1
- package/dist/{host-tools-zod.js → bindings-zod.js} +52 -25
- package/dist/bindings.d.ts +43 -0
- package/dist/bindings.js +34 -0
- package/dist/cron/cron-manager.js +43 -10
- package/dist/cron/index.d.ts +1 -1
- package/dist/cron/types.d.ts +26 -10
- package/dist/default-software.d.ts +8 -0
- package/dist/default-software.js +10 -0
- package/dist/filesystem-snapshot.d.ts +1 -2
- package/dist/filesystem-snapshot.js +0 -43
- package/dist/generated/AcpLimitsConfig.d.ts +20 -0
- package/dist/generated/AcpLimitsConfig.js +2 -0
- package/dist/generated/BindingLimitsConfig.d.ts +10 -0
- package/dist/generated/BindingLimitsConfig.js +2 -0
- package/dist/generated/CreateVmConfig.d.ts +28 -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 +11 -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/ProcessLimitsConfig.d.ts +7 -0
- package/dist/generated/ProcessLimitsConfig.js +2 -0
- package/dist/generated/PythonLimitsConfig.d.ts +6 -0
- package/dist/generated/PythonLimitsConfig.js +2 -0
- package/dist/generated/ResourceLimitsConfig.d.ts +24 -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/VmDnsConfig.d.ts +6 -0
- package/dist/generated/VmDnsConfig.js +2 -0
- package/dist/generated/VmGroupConfig.d.ts +5 -0
- package/dist/generated/VmGroupConfig.js +2 -0
- package/dist/generated/VmLimitsConfig.d.ts +20 -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/VmUserAccountConfig.d.ts +9 -0
- package/dist/generated/VmUserAccountConfig.js +2 -0
- package/dist/generated/VmUserConfig.d.ts +19 -0
- package/dist/generated/VmUserConfig.js +1 -0
- package/dist/generated/WasmLimitsConfig.d.ts +8 -0
- package/dist/generated/WasmLimitsConfig.js +2 -0
- package/dist/host-dir-mount.d.ts +1 -1
- package/dist/index.d.ts +6 -5
- package/dist/index.js +5 -5
- package/dist/layers.d.ts +7 -4
- package/dist/layers.js +0 -176
- package/dist/options-schema.d.ts +556 -0
- package/dist/options-schema.js +386 -0
- package/dist/packages.d.ts +17 -116
- package/dist/packages.js +35 -322
- package/dist/runtime-compat.d.ts +33 -46
- package/dist/runtime-compat.js +197 -511
- package/dist/runtime.d.ts +42 -8
- package/dist/sandbox.d.ts +112 -0
- package/dist/sandbox.js +264 -0
- package/dist/session-api.d.ts +180 -0
- package/dist/session-api.js +1 -0
- package/dist/sidecar/agentos-protocol.d.ts +509 -20
- package/dist/sidecar/agentos-protocol.js +808 -81
- package/dist/sidecar/native-process-client.d.ts +6 -2
- package/dist/sidecar/native-process-client.js +8 -1
- package/dist/sidecar/permissions.d.ts +1 -1
- package/dist/sidecar/permissions.js +4 -4
- package/dist/sidecar/rpc-client.d.ts +100 -9
- package/dist/sidecar/rpc-client.js +445 -110
- package/dist/test/runtime.d.ts +2 -1
- package/dist/test/runtime.js +2 -1
- package/dist/test/terminal-harness.js +0 -3
- package/dist/types.d.ts +13 -7
- package/package.json +46 -35
- package/dist/agent-session-types.d.ts +0 -67
- package/dist/agents.d.ts +0 -63
- package/dist/agents.js +0 -42
- package/dist/host-tools.d.ts +0 -45
- package/dist/host-tools.js +0 -26
- package/dist/overlay-filesystem.d.ts +0 -19
- package/dist/overlay-filesystem.js +0 -645
- package/fixtures/AGENTOS_SYSTEM_PROMPT.md +0 -21
- /package/dist/{agent-session-types.js → generated/CreateVmConfig.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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;
|
|
@@ -11,10 +12,16 @@ export declare enum AcpRuntimeKind {
|
|
|
11
12
|
}
|
|
12
13
|
export declare function readAcpRuntimeKind(bc: bare.ByteCursor): AcpRuntimeKind;
|
|
13
14
|
export declare function writeAcpRuntimeKind(bc: bare.ByteCursor, x: AcpRuntimeKind): void;
|
|
15
|
+
/**
|
|
16
|
+
* Legacy connection-owned ACP messages below remain encoded only for the
|
|
17
|
+
* dormant browser reference runtime. They are not part of the public AgentOS
|
|
18
|
+
* session API, and the native sidecar rejects them. Native durable orchestration
|
|
19
|
+
* uses the same structs internally as a private adapter-process driver until the
|
|
20
|
+
* browser protocol can be split into its own schema.
|
|
21
|
+
*/
|
|
14
22
|
export type AcpCreateSessionRequest = {
|
|
15
23
|
readonly agentType: string;
|
|
16
24
|
readonly runtime: AcpRuntimeKind;
|
|
17
|
-
readonly adapterEntrypoint: string;
|
|
18
25
|
readonly cwd: string;
|
|
19
26
|
readonly args: readonly string[];
|
|
20
27
|
readonly env: ReadonlyMap<string, string>;
|
|
@@ -33,6 +40,187 @@ export type AcpSessionRequest = {
|
|
|
33
40
|
};
|
|
34
41
|
export declare function readAcpSessionRequest(bc: bare.ByteCursor): AcpSessionRequest;
|
|
35
42
|
export declare function writeAcpSessionRequest(bc: bare.ByteCursor, x: AcpSessionRequest): void;
|
|
43
|
+
/**
|
|
44
|
+
* Enumerate the agents available in this VM. The sidecar answers from the already
|
|
45
|
+
* projected `/opt/agentos` packages (client parses no manifests).
|
|
46
|
+
*/
|
|
47
|
+
export type AcpListAgentsRequest = {
|
|
48
|
+
readonly reserved: boolean;
|
|
49
|
+
};
|
|
50
|
+
export declare function readAcpListAgentsRequest(bc: bare.ByteCursor): AcpListAgentsRequest;
|
|
51
|
+
export declare function writeAcpListAgentsRequest(bc: bare.ByteCursor, x: AcpListAgentsRequest): void;
|
|
52
|
+
export type AcpAgentEntry = {
|
|
53
|
+
readonly id: string;
|
|
54
|
+
readonly installed: boolean;
|
|
55
|
+
readonly adapterEntrypoint: string;
|
|
56
|
+
};
|
|
57
|
+
export declare function readAcpAgentEntry(bc: bare.ByteCursor): AcpAgentEntry;
|
|
58
|
+
export declare function writeAcpAgentEntry(bc: bare.ByteCursor, x: AcpAgentEntry): void;
|
|
59
|
+
export type AcpListAgentsResponse = {
|
|
60
|
+
readonly agents: readonly AcpAgentEntry[];
|
|
61
|
+
};
|
|
62
|
+
export declare function readAcpListAgentsResponse(bc: bare.ByteCursor): AcpListAgentsResponse;
|
|
63
|
+
export declare function writeAcpListAgentsResponse(bc: bare.ByteCursor, x: AcpListAgentsResponse): void;
|
|
64
|
+
/**
|
|
65
|
+
* `openSession` is idempotent. Opening an existing durable ID restores its
|
|
66
|
+
* adapter when unloaded; getSession/listSessions remain the storage-only ways to
|
|
67
|
+
* inspect it without starting an adapter. The sidecar owns ACP session/new versus
|
|
68
|
+
* native resume/load selection and returns only after negotiation has populated
|
|
69
|
+
* the cached configuration/capability/agent-info fields. Omitted cwd resolves to
|
|
70
|
+
* `/home/agentos` in the sidecar. Restoration reapplies the original cwd,
|
|
71
|
+
* additionalDirectories, env, exact native ACP McpServer values, instruction
|
|
72
|
+
* settings, and current configuration values. The response is intentionally
|
|
73
|
+
* empty: the caller owns the requested public ID (or the documented `main`
|
|
74
|
+
* default), and getSession is the only API that returns durable metadata.
|
|
75
|
+
* permissionPolicy is an immutable AgentOS-side strategy for resolving native
|
|
76
|
+
* ACP session/request_permission calls: allow_all (the default) selects an
|
|
77
|
+
* adapter-provided allow option, reject_all selects a reject option or returns a
|
|
78
|
+
* typed permission_policy_unsatisfied error when none is offered,
|
|
79
|
+
* and ask durably exposes the adapter's exact options for a caller response. It
|
|
80
|
+
* does not change VM permissions and is not sent to the ACP adapter as config.
|
|
81
|
+
*/
|
|
82
|
+
export type AcpOpenSessionRequest = {
|
|
83
|
+
readonly sessionId: string | null;
|
|
84
|
+
readonly agent: string;
|
|
85
|
+
readonly cwd: string | null;
|
|
86
|
+
readonly additionalDirectories: JsonUtf8 | null;
|
|
87
|
+
readonly env: JsonUtf8 | null;
|
|
88
|
+
readonly mcpServers: JsonUtf8 | null;
|
|
89
|
+
readonly permissionPolicy: string | null;
|
|
90
|
+
readonly skipOsInstructions: boolean | null;
|
|
91
|
+
readonly additionalInstructions: string | null;
|
|
92
|
+
};
|
|
93
|
+
export declare function readAcpOpenSessionRequest(bc: bare.ByteCursor): AcpOpenSessionRequest;
|
|
94
|
+
export declare function writeAcpOpenSessionRequest(bc: bare.ByteCursor, x: AcpOpenSessionRequest): void;
|
|
95
|
+
/**
|
|
96
|
+
* This lookup never starts, restores, or queries an ACP adapter.
|
|
97
|
+
*/
|
|
98
|
+
export type AcpGetDurableSessionRequest = {
|
|
99
|
+
readonly sessionId: string | null;
|
|
100
|
+
};
|
|
101
|
+
export declare function readAcpGetDurableSessionRequest(bc: bare.ByteCursor): AcpGetDurableSessionRequest;
|
|
102
|
+
export declare function writeAcpGetDurableSessionRequest(bc: bare.ByteCursor, x: AcpGetDurableSessionRequest): void;
|
|
103
|
+
/**
|
|
104
|
+
* Listing is an ordinary updatedAt/sessionId keyset traversal. It never starts,
|
|
105
|
+
* restores, or queries an ACP adapter. It deliberately does not freeze a database
|
|
106
|
+
* snapshot across pages: a session updated between page requests can move in the
|
|
107
|
+
* ordering, which keeps cursors simple and avoids a snapshot registry.
|
|
108
|
+
*/
|
|
109
|
+
export type AcpListDurableSessionsRequest = {
|
|
110
|
+
readonly cursor: string | null;
|
|
111
|
+
readonly limit: u32 | null;
|
|
112
|
+
};
|
|
113
|
+
export declare function readAcpListDurableSessionsRequest(bc: bare.ByteCursor): AcpListDurableSessionsRequest;
|
|
114
|
+
export declare function writeAcpListDurableSessionsRequest(bc: bare.ByteCursor, x: AcpListDurableSessionsRequest): void;
|
|
115
|
+
/**
|
|
116
|
+
* Deletion is naturally idempotent by its target ID. It permanently
|
|
117
|
+
* removes durable metadata and history after orderly runtime teardown.
|
|
118
|
+
*/
|
|
119
|
+
export type AcpDeleteSessionRequest = {
|
|
120
|
+
readonly sessionId: string | null;
|
|
121
|
+
};
|
|
122
|
+
export declare function readAcpDeleteSessionRequest(bc: bare.ByteCursor): AcpDeleteSessionRequest;
|
|
123
|
+
export declare function writeAcpDeleteSessionRequest(bc: bare.ByteCursor, x: AcpDeleteSessionRequest): void;
|
|
124
|
+
/**
|
|
125
|
+
* Unload cancels active work and releases the adapter but preserves the durable
|
|
126
|
+
* session and all history. A later prompt transparently restores it.
|
|
127
|
+
*/
|
|
128
|
+
export type AcpUnloadSessionRequest = {
|
|
129
|
+
readonly sessionId: string | null;
|
|
130
|
+
};
|
|
131
|
+
export declare function readAcpUnloadSessionRequest(bc: bare.ByteCursor): AcpUnloadSessionRequest;
|
|
132
|
+
export declare function writeAcpUnloadSessionRequest(bc: bare.ByteCursor, x: AcpUnloadSessionRequest): void;
|
|
133
|
+
/**
|
|
134
|
+
* Prompt never creates a missing session. It transparently restores an unloaded
|
|
135
|
+
* adapter, durably accepts input before dispatch, blocks through the turn, and
|
|
136
|
+
* never automatically replays a prompt whose delivery became uncertain. The
|
|
137
|
+
* sidecar imposes no absolute session/prompt deadline: long turns and ask-policy
|
|
138
|
+
* permission waits remain active while the actor keep-awake scope is held.
|
|
139
|
+
*/
|
|
140
|
+
export type AcpPromptRequest = {
|
|
141
|
+
readonly sessionId: string | null;
|
|
142
|
+
readonly idempotencyKey: string | null;
|
|
143
|
+
readonly content: JsonUtf8;
|
|
144
|
+
};
|
|
145
|
+
export declare function readAcpPromptRequest(bc: bare.ByteCursor): AcpPromptRequest;
|
|
146
|
+
export declare function writeAcpPromptRequest(bc: bare.ByteCursor, x: AcpPromptRequest): void;
|
|
147
|
+
/**
|
|
148
|
+
* Cancellation is first-writer-wins against prompt completion and returns its
|
|
149
|
+
* typed race outcome.
|
|
150
|
+
*/
|
|
151
|
+
export type AcpCancelPromptRequest = {
|
|
152
|
+
readonly sessionId: string | null;
|
|
153
|
+
};
|
|
154
|
+
export declare function readAcpCancelPromptRequest(bc: bare.ByteCursor): AcpCancelPromptRequest;
|
|
155
|
+
export declare function writeAcpCancelPromptRequest(bc: bare.ByteCursor, x: AcpCancelPromptRequest): void;
|
|
156
|
+
/**
|
|
157
|
+
* Respond to a pending native ACP session/request_permission. sessionId is
|
|
158
|
+
* always the explicit caller-owned AgentOS identity; it never defaults to main.
|
|
159
|
+
* requestId is globally unique AgentOS-owned correlation and never contains the
|
|
160
|
+
* adapter JSON-RPC ID. optionId is one of the exact adapter-supplied ACP option
|
|
161
|
+
* identifiers. Resolution is first-writer-wins. accepted means the decision won
|
|
162
|
+
* that race and was delivered to the active ACP waiter, not that the tool ran.
|
|
163
|
+
* Invalid options are typed invalid_permission_option errors and do not consume
|
|
164
|
+
* the request. A terminal late response is non-throwing and names its reason.
|
|
165
|
+
*/
|
|
166
|
+
export type AcpRespondPermissionRequest = {
|
|
167
|
+
readonly sessionId: string;
|
|
168
|
+
readonly requestId: string;
|
|
169
|
+
readonly optionId: string;
|
|
170
|
+
};
|
|
171
|
+
export declare function readAcpRespondPermissionRequest(bc: bare.ByteCursor): AcpRespondPermissionRequest;
|
|
172
|
+
export declare function writeAcpRespondPermissionRequest(bc: bare.ByteCursor, x: AcpRespondPermissionRequest): void;
|
|
173
|
+
/**
|
|
174
|
+
* History is SQLite-only and never starts, restores, or queries an adapter. It
|
|
175
|
+
* stores the generic durable event union below; nested wire payloads retain
|
|
176
|
+
* unknown extension metadata and clients mechanically expose them as one flat
|
|
177
|
+
* top-level type union. Agent message/thought deltas are emitted live as ephemeral entries;
|
|
178
|
+
* they enter durable history only when the message completes. Non-delta ACP
|
|
179
|
+
* updates interleaved during a message remain in native arrival order.
|
|
180
|
+
* before/after are exclusive and mutually exclusive. Cursor expiry is a typed
|
|
181
|
+
* error, never a silent skip. History retention and response pages are bounded
|
|
182
|
+
* by the VM's generous `limits.acp.*` settings; retention prunes oldest events.
|
|
183
|
+
* Durable sequence values can repeat on live delivery because observers
|
|
184
|
+
* deduplicate by (sessionId, sequence).
|
|
185
|
+
*/
|
|
186
|
+
export type AcpReadHistoryRequest = {
|
|
187
|
+
readonly sessionId: string | null;
|
|
188
|
+
readonly before: u64 | null;
|
|
189
|
+
readonly after: u64 | null;
|
|
190
|
+
readonly limit: u32 | null;
|
|
191
|
+
};
|
|
192
|
+
export declare function readAcpReadHistoryRequest(bc: bare.ByteCursor): AcpReadHistoryRequest;
|
|
193
|
+
export declare function writeAcpReadHistoryRequest(bc: bare.ByteCursor, x: AcpReadHistoryRequest): void;
|
|
194
|
+
/**
|
|
195
|
+
* Cached getters never start, restore, or query an adapter.
|
|
196
|
+
*/
|
|
197
|
+
export type AcpGetSessionConfigRequest = {
|
|
198
|
+
readonly sessionId: string | null;
|
|
199
|
+
};
|
|
200
|
+
export declare function readAcpGetSessionConfigRequest(bc: bare.ByteCursor): AcpGetSessionConfigRequest;
|
|
201
|
+
export declare function writeAcpGetSessionConfigRequest(bc: bare.ByteCursor, x: AcpGetSessionConfigRequest): void;
|
|
202
|
+
export type AcpGetSessionCapabilitiesRequest = {
|
|
203
|
+
readonly sessionId: string | null;
|
|
204
|
+
};
|
|
205
|
+
export declare function readAcpGetSessionCapabilitiesRequest(bc: bare.ByteCursor): AcpGetSessionCapabilitiesRequest;
|
|
206
|
+
export declare function writeAcpGetSessionCapabilitiesRequest(bc: bare.ByteCursor, x: AcpGetSessionCapabilitiesRequest): void;
|
|
207
|
+
export type AcpGetSessionAgentInfoRequest = {
|
|
208
|
+
readonly sessionId: string | null;
|
|
209
|
+
};
|
|
210
|
+
export declare function readAcpGetSessionAgentInfoRequest(bc: bare.ByteCursor): AcpGetSessionAgentInfoRequest;
|
|
211
|
+
export declare function writeAcpGetSessionAgentInfoRequest(bc: bare.ByteCursor, x: AcpGetSessionAgentInfoRequest): void;
|
|
212
|
+
/**
|
|
213
|
+
* Setting configuration may transparently restore the adapter; ACP owns
|
|
214
|
+
* validation and the response replaces the complete cached option collection.
|
|
215
|
+
* `value` encodes exactly one native ACP string or boolean config value.
|
|
216
|
+
*/
|
|
217
|
+
export type AcpSetSessionConfigOptionRequest = {
|
|
218
|
+
readonly sessionId: string | null;
|
|
219
|
+
readonly configId: string;
|
|
220
|
+
readonly value: JsonUtf8;
|
|
221
|
+
};
|
|
222
|
+
export declare function readAcpSetSessionConfigOptionRequest(bc: bare.ByteCursor): AcpSetSessionConfigOptionRequest;
|
|
223
|
+
export declare function writeAcpSetSessionConfigOptionRequest(bc: bare.ByteCursor, x: AcpSetSessionConfigOptionRequest): void;
|
|
36
224
|
export type AcpGetSessionStateRequest = {
|
|
37
225
|
readonly sessionId: string;
|
|
38
226
|
};
|
|
@@ -60,7 +248,61 @@ export type AcpResumeSessionRequest = {
|
|
|
60
248
|
};
|
|
61
249
|
export declare function readAcpResumeSessionRequest(bc: bare.ByteCursor): AcpResumeSessionRequest;
|
|
62
250
|
export declare function writeAcpResumeSessionRequest(bc: bare.ByteCursor, x: AcpResumeSessionRequest): void;
|
|
251
|
+
/**
|
|
252
|
+
* Browser RESUMABLE path only (AGENTOS-WEB-ASYNC-AGENTS.md §3.2.1): the kernel
|
|
253
|
+
* worker feeds a chunk of the agent's stdout into the in-flight create_session /
|
|
254
|
+
* session/prompt handshake. The synchronous sidecar would block inside one
|
|
255
|
+
* pushFrame; the resumable browser path returns between steps so the worker can
|
|
256
|
+
* service the agent's own syscalls (incl. pi's net call for inference) on fresh,
|
|
257
|
+
* non-nested pushFrames. `processId` is the handshake handle returned in the
|
|
258
|
+
* AcpPendingResponse for the originating create/prompt request.
|
|
259
|
+
*/
|
|
260
|
+
export type AcpDeliverAgentOutputRequest = {
|
|
261
|
+
readonly processId: string;
|
|
262
|
+
readonly chunk: ArrayBuffer;
|
|
263
|
+
};
|
|
264
|
+
export declare function readAcpDeliverAgentOutputRequest(bc: bare.ByteCursor): AcpDeliverAgentOutputRequest;
|
|
265
|
+
export declare function writeAcpDeliverAgentOutputRequest(bc: bare.ByteCursor, x: AcpDeliverAgentOutputRequest): void;
|
|
63
266
|
export type AcpRequest = {
|
|
267
|
+
readonly tag: "AcpOpenSessionRequest";
|
|
268
|
+
readonly val: AcpOpenSessionRequest;
|
|
269
|
+
} | {
|
|
270
|
+
readonly tag: "AcpGetDurableSessionRequest";
|
|
271
|
+
readonly val: AcpGetDurableSessionRequest;
|
|
272
|
+
} | {
|
|
273
|
+
readonly tag: "AcpListDurableSessionsRequest";
|
|
274
|
+
readonly val: AcpListDurableSessionsRequest;
|
|
275
|
+
} | {
|
|
276
|
+
readonly tag: "AcpDeleteSessionRequest";
|
|
277
|
+
readonly val: AcpDeleteSessionRequest;
|
|
278
|
+
} | {
|
|
279
|
+
readonly tag: "AcpUnloadSessionRequest";
|
|
280
|
+
readonly val: AcpUnloadSessionRequest;
|
|
281
|
+
} | {
|
|
282
|
+
readonly tag: "AcpPromptRequest";
|
|
283
|
+
readonly val: AcpPromptRequest;
|
|
284
|
+
} | {
|
|
285
|
+
readonly tag: "AcpCancelPromptRequest";
|
|
286
|
+
readonly val: AcpCancelPromptRequest;
|
|
287
|
+
} | {
|
|
288
|
+
readonly tag: "AcpRespondPermissionRequest";
|
|
289
|
+
readonly val: AcpRespondPermissionRequest;
|
|
290
|
+
} | {
|
|
291
|
+
readonly tag: "AcpReadHistoryRequest";
|
|
292
|
+
readonly val: AcpReadHistoryRequest;
|
|
293
|
+
} | {
|
|
294
|
+
readonly tag: "AcpGetSessionConfigRequest";
|
|
295
|
+
readonly val: AcpGetSessionConfigRequest;
|
|
296
|
+
} | {
|
|
297
|
+
readonly tag: "AcpSetSessionConfigOptionRequest";
|
|
298
|
+
readonly val: AcpSetSessionConfigOptionRequest;
|
|
299
|
+
} | {
|
|
300
|
+
readonly tag: "AcpGetSessionCapabilitiesRequest";
|
|
301
|
+
readonly val: AcpGetSessionCapabilitiesRequest;
|
|
302
|
+
} | {
|
|
303
|
+
readonly tag: "AcpGetSessionAgentInfoRequest";
|
|
304
|
+
readonly val: AcpGetSessionAgentInfoRequest;
|
|
305
|
+
} | {
|
|
64
306
|
readonly tag: "AcpCreateSessionRequest";
|
|
65
307
|
readonly val: AcpCreateSessionRequest;
|
|
66
308
|
} | {
|
|
@@ -75,11 +317,151 @@ export type AcpRequest = {
|
|
|
75
317
|
} | {
|
|
76
318
|
readonly tag: "AcpResumeSessionRequest";
|
|
77
319
|
readonly val: AcpResumeSessionRequest;
|
|
320
|
+
} | {
|
|
321
|
+
readonly tag: "AcpDeliverAgentOutputRequest";
|
|
322
|
+
readonly val: AcpDeliverAgentOutputRequest;
|
|
323
|
+
} | {
|
|
324
|
+
readonly tag: "AcpListAgentsRequest";
|
|
325
|
+
readonly val: AcpListAgentsRequest;
|
|
78
326
|
};
|
|
79
327
|
export declare function readAcpRequest(bc: bare.ByteCursor): AcpRequest;
|
|
80
328
|
export declare function writeAcpRequest(bc: bare.ByteCursor, x: AcpRequest): void;
|
|
81
329
|
export declare function encodeAcpRequest(x: AcpRequest, config?: Partial<bare.Config>): Uint8Array;
|
|
82
330
|
export declare function decodeAcpRequest(bytes: Uint8Array): AcpRequest;
|
|
331
|
+
export type AcpDurableSessionInfo = {
|
|
332
|
+
readonly sessionId: string;
|
|
333
|
+
readonly agent: string;
|
|
334
|
+
readonly cwd: string;
|
|
335
|
+
readonly additionalDirectories: JsonUtf8;
|
|
336
|
+
readonly state: JsonUtf8;
|
|
337
|
+
readonly latestSequence: u64;
|
|
338
|
+
readonly title: string | null;
|
|
339
|
+
readonly metadata: JsonUtf8 | null;
|
|
340
|
+
readonly createdAt: string;
|
|
341
|
+
readonly updatedAt: string;
|
|
342
|
+
};
|
|
343
|
+
export declare function readAcpDurableSessionInfo(bc: bare.ByteCursor): AcpDurableSessionInfo;
|
|
344
|
+
export declare function writeAcpDurableSessionInfo(bc: bare.ByteCursor, x: AcpDurableSessionInfo): void;
|
|
345
|
+
export type AcpOpenSessionResponse = {
|
|
346
|
+
readonly reserved: boolean;
|
|
347
|
+
};
|
|
348
|
+
export declare function readAcpOpenSessionResponse(bc: bare.ByteCursor): AcpOpenSessionResponse;
|
|
349
|
+
export declare function writeAcpOpenSessionResponse(bc: bare.ByteCursor, x: AcpOpenSessionResponse): void;
|
|
350
|
+
export type AcpGetDurableSessionResponse = {
|
|
351
|
+
readonly session: AcpDurableSessionInfo;
|
|
352
|
+
};
|
|
353
|
+
export declare function readAcpGetDurableSessionResponse(bc: bare.ByteCursor): AcpGetDurableSessionResponse;
|
|
354
|
+
export declare function writeAcpGetDurableSessionResponse(bc: bare.ByteCursor, x: AcpGetDurableSessionResponse): void;
|
|
355
|
+
export type AcpListDurableSessionsResponse = {
|
|
356
|
+
readonly sessions: readonly AcpDurableSessionInfo[];
|
|
357
|
+
readonly nextCursor: string | null;
|
|
358
|
+
};
|
|
359
|
+
export declare function readAcpListDurableSessionsResponse(bc: bare.ByteCursor): AcpListDurableSessionsResponse;
|
|
360
|
+
export declare function writeAcpListDurableSessionsResponse(bc: bare.ByteCursor, x: AcpListDurableSessionsResponse): void;
|
|
361
|
+
export type AcpDeleteSessionResponse = {
|
|
362
|
+
readonly reserved: boolean;
|
|
363
|
+
};
|
|
364
|
+
export declare function readAcpDeleteSessionResponse(bc: bare.ByteCursor): AcpDeleteSessionResponse;
|
|
365
|
+
export declare function writeAcpDeleteSessionResponse(bc: bare.ByteCursor, x: AcpDeleteSessionResponse): void;
|
|
366
|
+
export type AcpUnloadSessionResponse = {
|
|
367
|
+
readonly reserved: boolean;
|
|
368
|
+
};
|
|
369
|
+
export declare function readAcpUnloadSessionResponse(bc: bare.ByteCursor): AcpUnloadSessionResponse;
|
|
370
|
+
export declare function writeAcpUnloadSessionResponse(bc: bare.ByteCursor, x: AcpUnloadSessionResponse): void;
|
|
371
|
+
export type AcpPromptResponse = {
|
|
372
|
+
readonly sessionId: string;
|
|
373
|
+
readonly message: JsonUtf8 | null;
|
|
374
|
+
readonly stopReason: string;
|
|
375
|
+
};
|
|
376
|
+
export declare function readAcpPromptResponse(bc: bare.ByteCursor): AcpPromptResponse;
|
|
377
|
+
export declare function writeAcpPromptResponse(bc: bare.ByteCursor, x: AcpPromptResponse): void;
|
|
378
|
+
export type AcpCancelPromptResponse = {
|
|
379
|
+
readonly status: string;
|
|
380
|
+
};
|
|
381
|
+
export declare function readAcpCancelPromptResponse(bc: bare.ByteCursor): AcpCancelPromptResponse;
|
|
382
|
+
export declare function writeAcpCancelPromptResponse(bc: bare.ByteCursor, x: AcpCancelPromptResponse): void;
|
|
383
|
+
export type AcpRespondPermissionResponse = {
|
|
384
|
+
readonly status: string;
|
|
385
|
+
readonly reason: string | null;
|
|
386
|
+
};
|
|
387
|
+
export declare function readAcpRespondPermissionResponse(bc: bare.ByteCursor): AcpRespondPermissionResponse;
|
|
388
|
+
export declare function writeAcpRespondPermissionResponse(bc: bare.ByteCursor, x: AcpRespondPermissionResponse): void;
|
|
389
|
+
/**
|
|
390
|
+
* The generic internal wire/storage union. Native payloads retain their
|
|
391
|
+
* negotiated ACP field names, optional values, and opaque _meta. Public clients
|
|
392
|
+
* flatten SessionUpdate.sessionUpdate into top-level type and flatten permission
|
|
393
|
+
* request/response fields beside the durability envelope; they do not expose
|
|
394
|
+
* these internal update/request/response wrappers. Native adapter request IDs
|
|
395
|
+
* and private ACP session IDs never enter the public union. Automatically
|
|
396
|
+
* resolved permission requests are never persisted or emitted. An ask request
|
|
397
|
+
* has no permission timeout: the active prompt remains awake until a response
|
|
398
|
+
* or explicit adapter/session/VM lifecycle transition wins.
|
|
399
|
+
*/
|
|
400
|
+
export type AcpDurableSessionUpdate = {
|
|
401
|
+
readonly update: JsonUtf8;
|
|
402
|
+
};
|
|
403
|
+
export declare function readAcpDurableSessionUpdate(bc: bare.ByteCursor): AcpDurableSessionUpdate;
|
|
404
|
+
export declare function writeAcpDurableSessionUpdate(bc: bare.ByteCursor, x: AcpDurableSessionUpdate): void;
|
|
405
|
+
export type AcpDurablePermissionRequest = {
|
|
406
|
+
readonly requestId: string;
|
|
407
|
+
readonly request: JsonUtf8;
|
|
408
|
+
};
|
|
409
|
+
export declare function readAcpDurablePermissionRequest(bc: bare.ByteCursor): AcpDurablePermissionRequest;
|
|
410
|
+
export declare function writeAcpDurablePermissionRequest(bc: bare.ByteCursor, x: AcpDurablePermissionRequest): void;
|
|
411
|
+
export type AcpDurablePermissionResponse = {
|
|
412
|
+
readonly requestId: string;
|
|
413
|
+
readonly response: JsonUtf8;
|
|
414
|
+
readonly status: string;
|
|
415
|
+
readonly reason: string | null;
|
|
416
|
+
};
|
|
417
|
+
export declare function readAcpDurablePermissionResponse(bc: bare.ByteCursor): AcpDurablePermissionResponse;
|
|
418
|
+
export declare function writeAcpDurablePermissionResponse(bc: bare.ByteCursor, x: AcpDurablePermissionResponse): void;
|
|
419
|
+
export type AcpDurableEvent = {
|
|
420
|
+
readonly tag: "AcpDurableSessionUpdate";
|
|
421
|
+
readonly val: AcpDurableSessionUpdate;
|
|
422
|
+
} | {
|
|
423
|
+
readonly tag: "AcpDurablePermissionRequest";
|
|
424
|
+
readonly val: AcpDurablePermissionRequest;
|
|
425
|
+
} | {
|
|
426
|
+
readonly tag: "AcpDurablePermissionResponse";
|
|
427
|
+
readonly val: AcpDurablePermissionResponse;
|
|
428
|
+
};
|
|
429
|
+
export declare function readAcpDurableEvent(bc: bare.ByteCursor): AcpDurableEvent;
|
|
430
|
+
export declare function writeAcpDurableEvent(bc: bare.ByteCursor, x: AcpDurableEvent): void;
|
|
431
|
+
/**
|
|
432
|
+
* AgentOS adds only this public identity, sequence, and timestamp envelope.
|
|
433
|
+
*/
|
|
434
|
+
export type AcpDurableHistoryEntry = {
|
|
435
|
+
readonly sessionId: string;
|
|
436
|
+
readonly sequence: u64;
|
|
437
|
+
readonly timestamp: string;
|
|
438
|
+
readonly event: AcpDurableEvent;
|
|
439
|
+
};
|
|
440
|
+
export declare function readAcpDurableHistoryEntry(bc: bare.ByteCursor): AcpDurableHistoryEntry;
|
|
441
|
+
export declare function writeAcpDurableHistoryEntry(bc: bare.ByteCursor, x: AcpDurableHistoryEntry): void;
|
|
442
|
+
export type AcpHistoryPageResponse = {
|
|
443
|
+
readonly events: readonly AcpDurableHistoryEntry[];
|
|
444
|
+
readonly hasMoreBefore: boolean;
|
|
445
|
+
readonly hasMoreAfter: boolean;
|
|
446
|
+
};
|
|
447
|
+
export declare function readAcpHistoryPageResponse(bc: bare.ByteCursor): AcpHistoryPageResponse;
|
|
448
|
+
export declare function writeAcpHistoryPageResponse(bc: bare.ByteCursor, x: AcpHistoryPageResponse): void;
|
|
449
|
+
export type AcpSessionConfigResponse = {
|
|
450
|
+
readonly revision: u64;
|
|
451
|
+
readonly options: JsonUtf8;
|
|
452
|
+
};
|
|
453
|
+
export declare function readAcpSessionConfigResponse(bc: bare.ByteCursor): AcpSessionConfigResponse;
|
|
454
|
+
export declare function writeAcpSessionConfigResponse(bc: bare.ByteCursor, x: AcpSessionConfigResponse): void;
|
|
455
|
+
export type AcpSessionCapabilitiesResponse = {
|
|
456
|
+
readonly capabilities: JsonUtf8 | null;
|
|
457
|
+
};
|
|
458
|
+
export declare function readAcpSessionCapabilitiesResponse(bc: bare.ByteCursor): AcpSessionCapabilitiesResponse;
|
|
459
|
+
export declare function writeAcpSessionCapabilitiesResponse(bc: bare.ByteCursor, x: AcpSessionCapabilitiesResponse): void;
|
|
460
|
+
export type AcpSessionAgentInfoResponse = {
|
|
461
|
+
readonly agentInfo: JsonUtf8 | null;
|
|
462
|
+
};
|
|
463
|
+
export declare function readAcpSessionAgentInfoResponse(bc: bare.ByteCursor): AcpSessionAgentInfoResponse;
|
|
464
|
+
export declare function writeAcpSessionAgentInfoResponse(bc: bare.ByteCursor, x: AcpSessionAgentInfoResponse): void;
|
|
83
465
|
export type AcpSessionCreatedResponse = {
|
|
84
466
|
readonly sessionId: string;
|
|
85
467
|
readonly pid: u32 | null;
|
|
@@ -134,7 +516,55 @@ export type AcpErrorResponse = {
|
|
|
134
516
|
};
|
|
135
517
|
export declare function readAcpErrorResponse(bc: bare.ByteCursor): AcpErrorResponse;
|
|
136
518
|
export declare function writeAcpErrorResponse(bc: bare.ByteCursor, x: AcpErrorResponse): void;
|
|
519
|
+
/**
|
|
520
|
+
* Browser RESUMABLE path: the create_session / session/prompt request (and each
|
|
521
|
+
* AcpDeliverAgentOutputRequest that has not yet completed the handshake) returns
|
|
522
|
+
* this, carrying the `processId` handle the kernel worker drives the interaction
|
|
523
|
+
* with. The real result (AcpSessionCreatedResponse / AcpSessionRpcResponse) is
|
|
524
|
+
* delivered as the response to the AcpDeliverAgentOutputRequest that completes it.
|
|
525
|
+
*/
|
|
526
|
+
export type AcpPendingResponse = {
|
|
527
|
+
readonly processId: string;
|
|
528
|
+
};
|
|
529
|
+
export declare function readAcpPendingResponse(bc: bare.ByteCursor): AcpPendingResponse;
|
|
530
|
+
export declare function writeAcpPendingResponse(bc: bare.ByteCursor, x: AcpPendingResponse): void;
|
|
137
531
|
export type AcpResponse = {
|
|
532
|
+
readonly tag: "AcpOpenSessionResponse";
|
|
533
|
+
readonly val: AcpOpenSessionResponse;
|
|
534
|
+
} | {
|
|
535
|
+
readonly tag: "AcpGetDurableSessionResponse";
|
|
536
|
+
readonly val: AcpGetDurableSessionResponse;
|
|
537
|
+
} | {
|
|
538
|
+
readonly tag: "AcpListDurableSessionsResponse";
|
|
539
|
+
readonly val: AcpListDurableSessionsResponse;
|
|
540
|
+
} | {
|
|
541
|
+
readonly tag: "AcpDeleteSessionResponse";
|
|
542
|
+
readonly val: AcpDeleteSessionResponse;
|
|
543
|
+
} | {
|
|
544
|
+
readonly tag: "AcpUnloadSessionResponse";
|
|
545
|
+
readonly val: AcpUnloadSessionResponse;
|
|
546
|
+
} | {
|
|
547
|
+
readonly tag: "AcpPromptResponse";
|
|
548
|
+
readonly val: AcpPromptResponse;
|
|
549
|
+
} | {
|
|
550
|
+
readonly tag: "AcpCancelPromptResponse";
|
|
551
|
+
readonly val: AcpCancelPromptResponse;
|
|
552
|
+
} | {
|
|
553
|
+
readonly tag: "AcpRespondPermissionResponse";
|
|
554
|
+
readonly val: AcpRespondPermissionResponse;
|
|
555
|
+
} | {
|
|
556
|
+
readonly tag: "AcpHistoryPageResponse";
|
|
557
|
+
readonly val: AcpHistoryPageResponse;
|
|
558
|
+
} | {
|
|
559
|
+
readonly tag: "AcpSessionConfigResponse";
|
|
560
|
+
readonly val: AcpSessionConfigResponse;
|
|
561
|
+
} | {
|
|
562
|
+
readonly tag: "AcpSessionCapabilitiesResponse";
|
|
563
|
+
readonly val: AcpSessionCapabilitiesResponse;
|
|
564
|
+
} | {
|
|
565
|
+
readonly tag: "AcpSessionAgentInfoResponse";
|
|
566
|
+
readonly val: AcpSessionAgentInfoResponse;
|
|
567
|
+
} | {
|
|
138
568
|
readonly tag: "AcpSessionCreatedResponse";
|
|
139
569
|
readonly val: AcpSessionCreatedResponse;
|
|
140
570
|
} | {
|
|
@@ -152,32 +582,103 @@ export type AcpResponse = {
|
|
|
152
582
|
} | {
|
|
153
583
|
readonly tag: "AcpErrorResponse";
|
|
154
584
|
readonly val: AcpErrorResponse;
|
|
585
|
+
} | {
|
|
586
|
+
readonly tag: "AcpPendingResponse";
|
|
587
|
+
readonly val: AcpPendingResponse;
|
|
588
|
+
} | {
|
|
589
|
+
readonly tag: "AcpListAgentsResponse";
|
|
590
|
+
readonly val: AcpListAgentsResponse;
|
|
155
591
|
};
|
|
156
592
|
export declare function readAcpResponse(bc: bare.ByteCursor): AcpResponse;
|
|
157
593
|
export declare function writeAcpResponse(bc: bare.ByteCursor, x: AcpResponse): void;
|
|
158
594
|
export declare function encodeAcpResponse(x: AcpResponse, config?: Partial<bare.Config>): Uint8Array;
|
|
159
595
|
export declare function decodeAcpResponse(bytes: Uint8Array): AcpResponse;
|
|
596
|
+
/**
|
|
597
|
+
* Live delivery uses the identical durable union/history envelope. Consumers
|
|
598
|
+
* reconnect by subscribing, fetching after their last sequence, then
|
|
599
|
+
* deduplicating by (sessionId, sequence); there is no second replay protocol.
|
|
600
|
+
*/
|
|
601
|
+
export type AcpDurableSessionEvent = {
|
|
602
|
+
readonly sessionId: string;
|
|
603
|
+
readonly sequence: u64;
|
|
604
|
+
readonly timestamp: string;
|
|
605
|
+
readonly event: AcpDurableEvent;
|
|
606
|
+
};
|
|
607
|
+
export declare function readAcpDurableSessionEvent(bc: bare.ByteCursor): AcpDurableSessionEvent;
|
|
608
|
+
export declare function writeAcpDurableSessionEvent(bc: bare.ByteCursor, x: AcpDurableSessionEvent): void;
|
|
609
|
+
/**
|
|
610
|
+
* Ephemeral entries are live-only ACP agent_message_chunk or
|
|
611
|
+
* agent_thought_chunk updates. They are never persisted or sequenced; the
|
|
612
|
+
* durable completed message is authoritative after reconnect.
|
|
613
|
+
*/
|
|
614
|
+
export type AcpEphemeralSessionUpdateEvent = {
|
|
615
|
+
readonly sessionId: string;
|
|
616
|
+
readonly afterSequence: u64;
|
|
617
|
+
readonly update: JsonUtf8;
|
|
618
|
+
};
|
|
619
|
+
export declare function readAcpEphemeralSessionUpdateEvent(bc: bare.ByteCursor): AcpEphemeralSessionUpdateEvent;
|
|
620
|
+
export declare function writeAcpEphemeralSessionUpdateEvent(bc: bare.ByteCursor, x: AcpEphemeralSessionUpdateEvent): void;
|
|
621
|
+
/**
|
|
622
|
+
* Legacy browser-reference live event. Native durable clients ignore it and
|
|
623
|
+
* consume AcpDurableSessionEvent/AcpEphemeralSessionUpdateEvent instead.
|
|
624
|
+
*/
|
|
160
625
|
export type AcpSessionEvent = {
|
|
161
626
|
readonly sessionId: string;
|
|
162
627
|
readonly notification: JsonUtf8;
|
|
163
628
|
};
|
|
164
629
|
export declare function readAcpSessionEvent(bc: bare.ByteCursor): AcpSessionEvent;
|
|
165
630
|
export declare function writeAcpSessionEvent(bc: bare.ByteCursor, x: AcpSessionEvent): void;
|
|
631
|
+
export type AcpAgentStderrEvent = {
|
|
632
|
+
readonly sessionId: string;
|
|
633
|
+
readonly agentType: string;
|
|
634
|
+
readonly processId: string;
|
|
635
|
+
readonly chunk: ArrayBuffer;
|
|
636
|
+
};
|
|
637
|
+
export declare function readAcpAgentStderrEvent(bc: bare.ByteCursor): AcpAgentStderrEvent;
|
|
638
|
+
export declare function writeAcpAgentStderrEvent(bc: bare.ByteCursor, x: AcpAgentStderrEvent): void;
|
|
639
|
+
/**
|
|
640
|
+
* Emitted when the ACP adapter process exits unexpectedly — a crash from the
|
|
641
|
+
* host's perspective (any spontaneous exit, including code 0).
|
|
642
|
+
* `restart` is "not_attempted": the sidecar never respawns an adapter or
|
|
643
|
+
* replays an interrupted request implicitly. `restartCount` and `maxRestarts`
|
|
644
|
+
* are therefore both zero. Explicit session restoration is a separate caller
|
|
645
|
+
* operation.
|
|
646
|
+
* `exitCode` is absent when the exit was observed indirectly (e.g. a write to
|
|
647
|
+
* the adapter's stdin failed because the process was already gone).
|
|
648
|
+
* `pid` is the host pid reported when the adapter process was launched.
|
|
649
|
+
*/
|
|
650
|
+
export type AcpAgentExitedEvent = {
|
|
651
|
+
readonly sessionId: string;
|
|
652
|
+
readonly agentType: string;
|
|
653
|
+
readonly processId: string;
|
|
654
|
+
readonly pid: u32 | null;
|
|
655
|
+
readonly exitCode: i32 | null;
|
|
656
|
+
readonly restart: string;
|
|
657
|
+
readonly restartCount: u32;
|
|
658
|
+
readonly maxRestarts: u32;
|
|
659
|
+
};
|
|
660
|
+
export declare function readAcpAgentExitedEvent(bc: bare.ByteCursor): AcpAgentExitedEvent;
|
|
661
|
+
export declare function writeAcpAgentExitedEvent(bc: bare.ByteCursor, x: AcpAgentExitedEvent): void;
|
|
166
662
|
export type AcpEvent = {
|
|
663
|
+
readonly tag: "AcpDurableSessionEvent";
|
|
664
|
+
readonly val: AcpDurableSessionEvent;
|
|
665
|
+
} | {
|
|
666
|
+
readonly tag: "AcpEphemeralSessionUpdateEvent";
|
|
667
|
+
readonly val: AcpEphemeralSessionUpdateEvent;
|
|
668
|
+
} | {
|
|
167
669
|
readonly tag: "AcpSessionEvent";
|
|
168
670
|
readonly val: AcpSessionEvent;
|
|
671
|
+
} | {
|
|
672
|
+
readonly tag: "AcpAgentStderrEvent";
|
|
673
|
+
readonly val: AcpAgentStderrEvent;
|
|
674
|
+
} | {
|
|
675
|
+
readonly tag: "AcpAgentExitedEvent";
|
|
676
|
+
readonly val: AcpAgentExitedEvent;
|
|
169
677
|
};
|
|
170
678
|
export declare function readAcpEvent(bc: bare.ByteCursor): AcpEvent;
|
|
171
679
|
export declare function writeAcpEvent(bc: bare.ByteCursor, x: AcpEvent): void;
|
|
172
680
|
export declare function encodeAcpEvent(x: AcpEvent, config?: Partial<bare.Config>): Uint8Array;
|
|
173
681
|
export declare function decodeAcpEvent(bytes: Uint8Array): AcpEvent;
|
|
174
|
-
export type AcpPermissionCallback = {
|
|
175
|
-
readonly sessionId: string;
|
|
176
|
-
readonly permissionId: string;
|
|
177
|
-
readonly params: JsonUtf8;
|
|
178
|
-
};
|
|
179
|
-
export declare function readAcpPermissionCallback(bc: bare.ByteCursor): AcpPermissionCallback;
|
|
180
|
-
export declare function writeAcpPermissionCallback(bc: bare.ByteCursor, x: AcpPermissionCallback): void;
|
|
181
682
|
export type AcpHostRequestCallback = {
|
|
182
683
|
readonly sessionId: string;
|
|
183
684
|
readonly request: JsonUtf8;
|
|
@@ -185,9 +686,6 @@ export type AcpHostRequestCallback = {
|
|
|
185
686
|
export declare function readAcpHostRequestCallback(bc: bare.ByteCursor): AcpHostRequestCallback;
|
|
186
687
|
export declare function writeAcpHostRequestCallback(bc: bare.ByteCursor, x: AcpHostRequestCallback): void;
|
|
187
688
|
export type AcpCallback = {
|
|
188
|
-
readonly tag: "AcpPermissionCallback";
|
|
189
|
-
readonly val: AcpPermissionCallback;
|
|
190
|
-
} | {
|
|
191
689
|
readonly tag: "AcpHostRequestCallback";
|
|
192
690
|
readonly val: AcpHostRequestCallback;
|
|
193
691
|
};
|
|
@@ -195,21 +693,12 @@ export declare function readAcpCallback(bc: bare.ByteCursor): AcpCallback;
|
|
|
195
693
|
export declare function writeAcpCallback(bc: bare.ByteCursor, x: AcpCallback): void;
|
|
196
694
|
export declare function encodeAcpCallback(x: AcpCallback, config?: Partial<bare.Config>): Uint8Array;
|
|
197
695
|
export declare function decodeAcpCallback(bytes: Uint8Array): AcpCallback;
|
|
198
|
-
export type AcpPermissionCallbackResponse = {
|
|
199
|
-
readonly permissionId: string;
|
|
200
|
-
readonly reply: string;
|
|
201
|
-
};
|
|
202
|
-
export declare function readAcpPermissionCallbackResponse(bc: bare.ByteCursor): AcpPermissionCallbackResponse;
|
|
203
|
-
export declare function writeAcpPermissionCallbackResponse(bc: bare.ByteCursor, x: AcpPermissionCallbackResponse): void;
|
|
204
696
|
export type AcpHostRequestCallbackResponse = {
|
|
205
697
|
readonly response: JsonUtf8 | null;
|
|
206
698
|
};
|
|
207
699
|
export declare function readAcpHostRequestCallbackResponse(bc: bare.ByteCursor): AcpHostRequestCallbackResponse;
|
|
208
700
|
export declare function writeAcpHostRequestCallbackResponse(bc: bare.ByteCursor, x: AcpHostRequestCallbackResponse): void;
|
|
209
701
|
export type AcpCallbackResponse = {
|
|
210
|
-
readonly tag: "AcpPermissionCallbackResponse";
|
|
211
|
-
readonly val: AcpPermissionCallbackResponse;
|
|
212
|
-
} | {
|
|
213
702
|
readonly tag: "AcpHostRequestCallbackResponse";
|
|
214
703
|
readonly val: AcpHostRequestCallbackResponse;
|
|
215
704
|
};
|