@byok-sdk/protocol 0.30.2 → 0.32.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/README.md +1 -1
- package/dist/agent-event.d.ts +2 -6
- package/dist/agent-memory.d.ts +79 -0
- package/dist/agent-memory.js +5 -0
- package/dist/agent-memory.js.map +1 -0
- package/dist/capability-constants.d.ts +9 -0
- package/dist/codec.d.ts +10 -86
- package/dist/constants.d.ts +14 -0
- package/dist/constants.js +2 -114
- package/dist/constants.js.map +1 -1
- package/dist/envelope.d.ts +1 -1
- package/dist/failure-reason.d.ts +23 -0
- package/dist/http-api.d.ts +74 -5
- package/dist/index.d.ts +7 -8
- package/dist/index.js +3 -3053
- package/dist/index.js.map +1 -1
- package/dist/input-preparation.d.ts +1 -1
- package/dist/messages.d.ts +1345 -1369
- package/dist/open-vocabulary.d.ts +5 -0
- package/dist/sealed-payload.d.ts +16 -14
- package/dist/sealed-split-table.d.ts +61 -55
- package/dist/version.d.ts +22 -54
- package/dist/wire-additions.d.ts +11 -7
- package/package.json +7 -4
- package/dist/task-assertion.d.ts +0 -28
package/dist/messages.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { type RuntimeUnavailableCause } from './constants';
|
|
2
3
|
import { ProviderProvisioningAvailablePayloadSchema } from './provider-provisioning';
|
|
3
4
|
import { E2eeKeyPackageAvailablePayloadSchema } from './e2ee-member';
|
|
4
5
|
import { type PlainJsonCheck } from './plain-json';
|
|
@@ -8,6 +9,14 @@ export declare const RuntimeIdSchema: z.ZodEnum<{
|
|
|
8
9
|
pi: "pi";
|
|
9
10
|
}>;
|
|
10
11
|
export type RuntimeId = z.infer<typeof RuntimeIdSchema>;
|
|
12
|
+
/** A runtime-unavailable cause as this version understands it; unknown reads as `unknown` with the raw token kept. */
|
|
13
|
+
export type RuntimeUnavailableCauseReading = {
|
|
14
|
+
readonly cause: RuntimeUnavailableCause;
|
|
15
|
+
} | {
|
|
16
|
+
readonly cause: 'unknown';
|
|
17
|
+
readonly reportedCause: string;
|
|
18
|
+
};
|
|
19
|
+
export declare function readRuntimeUnavailableCause(cause: string): RuntimeUnavailableCauseReading;
|
|
11
20
|
/** Wire-safe protocol version number: bounded before JSON reaches a store or comparison. */
|
|
12
21
|
export declare const ProtocolVersionNumberSchema: z.ZodNumber;
|
|
13
22
|
/**
|
|
@@ -31,8 +40,31 @@ export declare const RuntimeCapabilitiesSchema: z.ZodObject<{
|
|
|
31
40
|
approvalInteractive: z.ZodOptional<z.ZodBoolean>;
|
|
32
41
|
mcpToolsets: z.ZodOptional<z.ZodBoolean>;
|
|
33
42
|
messageDraft: z.ZodOptional<z.ZodBoolean>;
|
|
43
|
+
toolAuthorizationAuto: z.ZodOptional<z.ZodBoolean>;
|
|
44
|
+
durablePi: z.ZodOptional<z.ZodBoolean>;
|
|
45
|
+
preparedLane: z.ZodOptional<z.ZodBoolean>;
|
|
46
|
+
isolation: z.ZodOptional<z.ZodObject<{
|
|
47
|
+
userContext: z.ZodOptional<z.ZodBoolean>;
|
|
48
|
+
userMcpServers: z.ZodOptional<z.ZodBoolean>;
|
|
49
|
+
sessionPersistence: z.ZodOptional<z.ZodBoolean>;
|
|
50
|
+
}, z.core.$strip>>;
|
|
34
51
|
}, z.core.$strip>;
|
|
35
52
|
export type RuntimeCapabilities = z.infer<typeof RuntimeCapabilitiesSchema>;
|
|
53
|
+
/**
|
|
54
|
+
* The effective version policy's verdict, projected for discovery (#1103 D8).
|
|
55
|
+
* Only `state` and the policy's qualified token travel: `matched` and the
|
|
56
|
+
* allow/warn/block spec lists stay local. Absence means **unknown**, never
|
|
57
|
+
* `allow`: an older daemon or an adapter without a policy omits the field.
|
|
58
|
+
*/
|
|
59
|
+
export declare const RuntimeVersionPolicyProjectionSchema: z.ZodObject<{
|
|
60
|
+
state: z.ZodEnum<{
|
|
61
|
+
allow: "allow";
|
|
62
|
+
block: "block";
|
|
63
|
+
warn: "warn";
|
|
64
|
+
}>;
|
|
65
|
+
qualifiedVersion: z.ZodOptional<z.ZodString>;
|
|
66
|
+
}, z.core.$strip>;
|
|
67
|
+
export type RuntimeVersionPolicyProjection = z.infer<typeof RuntimeVersionPolicyProjectionSchema>;
|
|
36
68
|
/**
|
|
37
69
|
* Runtime detection info reported in `conn.hello`. Supersedes the M0
|
|
38
70
|
* `agents: unknown` field (M1 gap #4): typed, so the server no longer has to
|
|
@@ -52,6 +84,22 @@ export declare const RuntimeInfoSchema: z.ZodObject<{
|
|
|
52
84
|
approvalInteractive: z.ZodOptional<z.ZodBoolean>;
|
|
53
85
|
mcpToolsets: z.ZodOptional<z.ZodBoolean>;
|
|
54
86
|
messageDraft: z.ZodOptional<z.ZodBoolean>;
|
|
87
|
+
toolAuthorizationAuto: z.ZodOptional<z.ZodBoolean>;
|
|
88
|
+
durablePi: z.ZodOptional<z.ZodBoolean>;
|
|
89
|
+
preparedLane: z.ZodOptional<z.ZodBoolean>;
|
|
90
|
+
isolation: z.ZodOptional<z.ZodObject<{
|
|
91
|
+
userContext: z.ZodOptional<z.ZodBoolean>;
|
|
92
|
+
userMcpServers: z.ZodOptional<z.ZodBoolean>;
|
|
93
|
+
sessionPersistence: z.ZodOptional<z.ZodBoolean>;
|
|
94
|
+
}, z.core.$strip>>;
|
|
95
|
+
}, z.core.$strip>>;
|
|
96
|
+
versionPolicy: z.ZodOptional<z.ZodObject<{
|
|
97
|
+
state: z.ZodEnum<{
|
|
98
|
+
allow: "allow";
|
|
99
|
+
block: "block";
|
|
100
|
+
warn: "warn";
|
|
101
|
+
}>;
|
|
102
|
+
qualifiedVersion: z.ZodOptional<z.ZodString>;
|
|
55
103
|
}, z.core.$strip>>;
|
|
56
104
|
}, z.core.$strip>;
|
|
57
105
|
export type RuntimeInfo = z.infer<typeof RuntimeInfoSchema>;
|
|
@@ -67,7 +115,23 @@ export declare const HarnessInfoSchema: z.ZodObject<{
|
|
|
67
115
|
approvalInteractive: z.ZodOptional<z.ZodBoolean>;
|
|
68
116
|
mcpToolsets: z.ZodOptional<z.ZodBoolean>;
|
|
69
117
|
messageDraft: z.ZodOptional<z.ZodBoolean>;
|
|
118
|
+
toolAuthorizationAuto: z.ZodOptional<z.ZodBoolean>;
|
|
119
|
+
durablePi: z.ZodOptional<z.ZodBoolean>;
|
|
120
|
+
preparedLane: z.ZodOptional<z.ZodBoolean>;
|
|
121
|
+
isolation: z.ZodOptional<z.ZodObject<{
|
|
122
|
+
userContext: z.ZodOptional<z.ZodBoolean>;
|
|
123
|
+
userMcpServers: z.ZodOptional<z.ZodBoolean>;
|
|
124
|
+
sessionPersistence: z.ZodOptional<z.ZodBoolean>;
|
|
125
|
+
}, z.core.$strip>>;
|
|
70
126
|
}, z.core.$strip>;
|
|
127
|
+
versionPolicy: z.ZodOptional<z.ZodObject<{
|
|
128
|
+
state: z.ZodEnum<{
|
|
129
|
+
allow: "allow";
|
|
130
|
+
block: "block";
|
|
131
|
+
warn: "warn";
|
|
132
|
+
}>;
|
|
133
|
+
qualifiedVersion: z.ZodOptional<z.ZodString>;
|
|
134
|
+
}, z.core.$strip>>;
|
|
71
135
|
}, z.core.$strip>;
|
|
72
136
|
export type HarnessInfo = z.infer<typeof HarnessInfoSchema>;
|
|
73
137
|
export declare const HarnessInventorySchema: z.ZodArray<z.ZodObject<{
|
|
@@ -79,8 +143,55 @@ export declare const HarnessInventorySchema: z.ZodArray<z.ZodObject<{
|
|
|
79
143
|
approvalInteractive: z.ZodOptional<z.ZodBoolean>;
|
|
80
144
|
mcpToolsets: z.ZodOptional<z.ZodBoolean>;
|
|
81
145
|
messageDraft: z.ZodOptional<z.ZodBoolean>;
|
|
146
|
+
toolAuthorizationAuto: z.ZodOptional<z.ZodBoolean>;
|
|
147
|
+
durablePi: z.ZodOptional<z.ZodBoolean>;
|
|
148
|
+
preparedLane: z.ZodOptional<z.ZodBoolean>;
|
|
149
|
+
isolation: z.ZodOptional<z.ZodObject<{
|
|
150
|
+
userContext: z.ZodOptional<z.ZodBoolean>;
|
|
151
|
+
userMcpServers: z.ZodOptional<z.ZodBoolean>;
|
|
152
|
+
sessionPersistence: z.ZodOptional<z.ZodBoolean>;
|
|
153
|
+
}, z.core.$strip>>;
|
|
82
154
|
}, z.core.$strip>;
|
|
155
|
+
versionPolicy: z.ZodOptional<z.ZodObject<{
|
|
156
|
+
state: z.ZodEnum<{
|
|
157
|
+
allow: "allow";
|
|
158
|
+
block: "block";
|
|
159
|
+
warn: "warn";
|
|
160
|
+
}>;
|
|
161
|
+
qualifiedVersion: z.ZodOptional<z.ZodString>;
|
|
162
|
+
}, z.core.$strip>>;
|
|
83
163
|
}, z.core.$strip>>;
|
|
164
|
+
/**
|
|
165
|
+
* One non-available runtime or harness in `conn.hello.runtimeUnavailable`
|
|
166
|
+
* (#1103 D8). The id stays in the existing identity domain: a built-in
|
|
167
|
+
* runtime id or a custom harness id. The cause is the append-only
|
|
168
|
+
* vocabulary, and `retryable` carries the same per-cause default a
|
|
169
|
+
* `task.decline` reports. Absence of the whole array means unknown, never
|
|
170
|
+
* "everything is available".
|
|
171
|
+
*/
|
|
172
|
+
export declare const RuntimeUnavailableEntrySchema: z.ZodObject<{
|
|
173
|
+
id: z.ZodUnion<readonly [z.ZodEnum<{
|
|
174
|
+
claude: "claude";
|
|
175
|
+
codex: "codex";
|
|
176
|
+
pi: "pi";
|
|
177
|
+
}>, z.ZodString]>;
|
|
178
|
+
cause: z.ZodUnion<readonly [z.ZodEnum<{
|
|
179
|
+
acp_unavailable: "acp_unavailable";
|
|
180
|
+
app_server_unavailable: "app_server_unavailable";
|
|
181
|
+
environment_unavailable: "environment_unavailable";
|
|
182
|
+
none_available: "none_available";
|
|
183
|
+
not_executable: "not_executable";
|
|
184
|
+
not_installed: "not_installed";
|
|
185
|
+
platform_unsupported: "platform_unsupported";
|
|
186
|
+
probe_failed: "probe_failed";
|
|
187
|
+
probe_timeout: "probe_timeout";
|
|
188
|
+
runtime_not_allowed: "runtime_not_allowed";
|
|
189
|
+
runtime_not_configured: "runtime_not_configured";
|
|
190
|
+
version_blocked: "version_blocked";
|
|
191
|
+
}>, z.ZodString]>;
|
|
192
|
+
retryable: z.ZodBoolean;
|
|
193
|
+
}, z.core.$strip>;
|
|
194
|
+
export type RuntimeUnavailableEntry = z.infer<typeof RuntimeUnavailableEntrySchema>;
|
|
84
195
|
/** Maximum logical toolsets one daemon may advertise as locally configured. */
|
|
85
196
|
export declare const CONFIGURED_TOOLSETS_MAX_ITEMS = 64;
|
|
86
197
|
/**
|
|
@@ -134,6 +245,22 @@ export declare const ConnHelloPayloadSchema: z.ZodObject<{
|
|
|
134
245
|
approvalInteractive: z.ZodOptional<z.ZodBoolean>;
|
|
135
246
|
mcpToolsets: z.ZodOptional<z.ZodBoolean>;
|
|
136
247
|
messageDraft: z.ZodOptional<z.ZodBoolean>;
|
|
248
|
+
toolAuthorizationAuto: z.ZodOptional<z.ZodBoolean>;
|
|
249
|
+
durablePi: z.ZodOptional<z.ZodBoolean>;
|
|
250
|
+
preparedLane: z.ZodOptional<z.ZodBoolean>;
|
|
251
|
+
isolation: z.ZodOptional<z.ZodObject<{
|
|
252
|
+
userContext: z.ZodOptional<z.ZodBoolean>;
|
|
253
|
+
userMcpServers: z.ZodOptional<z.ZodBoolean>;
|
|
254
|
+
sessionPersistence: z.ZodOptional<z.ZodBoolean>;
|
|
255
|
+
}, z.core.$strip>>;
|
|
256
|
+
}, z.core.$strip>>;
|
|
257
|
+
versionPolicy: z.ZodOptional<z.ZodObject<{
|
|
258
|
+
state: z.ZodEnum<{
|
|
259
|
+
allow: "allow";
|
|
260
|
+
block: "block";
|
|
261
|
+
warn: "warn";
|
|
262
|
+
}>;
|
|
263
|
+
qualifiedVersion: z.ZodOptional<z.ZodString>;
|
|
137
264
|
}, z.core.$strip>>;
|
|
138
265
|
}, z.core.$strip>>>;
|
|
139
266
|
harnesses: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -145,19 +272,50 @@ export declare const ConnHelloPayloadSchema: z.ZodObject<{
|
|
|
145
272
|
approvalInteractive: z.ZodOptional<z.ZodBoolean>;
|
|
146
273
|
mcpToolsets: z.ZodOptional<z.ZodBoolean>;
|
|
147
274
|
messageDraft: z.ZodOptional<z.ZodBoolean>;
|
|
275
|
+
toolAuthorizationAuto: z.ZodOptional<z.ZodBoolean>;
|
|
276
|
+
durablePi: z.ZodOptional<z.ZodBoolean>;
|
|
277
|
+
preparedLane: z.ZodOptional<z.ZodBoolean>;
|
|
278
|
+
isolation: z.ZodOptional<z.ZodObject<{
|
|
279
|
+
userContext: z.ZodOptional<z.ZodBoolean>;
|
|
280
|
+
userMcpServers: z.ZodOptional<z.ZodBoolean>;
|
|
281
|
+
sessionPersistence: z.ZodOptional<z.ZodBoolean>;
|
|
282
|
+
}, z.core.$strip>>;
|
|
148
283
|
}, z.core.$strip>;
|
|
284
|
+
versionPolicy: z.ZodOptional<z.ZodObject<{
|
|
285
|
+
state: z.ZodEnum<{
|
|
286
|
+
allow: "allow";
|
|
287
|
+
block: "block";
|
|
288
|
+
warn: "warn";
|
|
289
|
+
}>;
|
|
290
|
+
qualifiedVersion: z.ZodOptional<z.ZodString>;
|
|
291
|
+
}, z.core.$strip>>;
|
|
292
|
+
}, z.core.$strip>>>;
|
|
293
|
+
runtimeUnavailable: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
294
|
+
id: z.ZodUnion<readonly [z.ZodEnum<{
|
|
295
|
+
claude: "claude";
|
|
296
|
+
codex: "codex";
|
|
297
|
+
pi: "pi";
|
|
298
|
+
}>, z.ZodString]>;
|
|
299
|
+
cause: z.ZodUnion<readonly [z.ZodEnum<{
|
|
300
|
+
acp_unavailable: "acp_unavailable";
|
|
301
|
+
app_server_unavailable: "app_server_unavailable";
|
|
302
|
+
environment_unavailable: "environment_unavailable";
|
|
303
|
+
none_available: "none_available";
|
|
304
|
+
not_executable: "not_executable";
|
|
305
|
+
not_installed: "not_installed";
|
|
306
|
+
platform_unsupported: "platform_unsupported";
|
|
307
|
+
probe_failed: "probe_failed";
|
|
308
|
+
probe_timeout: "probe_timeout";
|
|
309
|
+
runtime_not_allowed: "runtime_not_allowed";
|
|
310
|
+
runtime_not_configured: "runtime_not_configured";
|
|
311
|
+
version_blocked: "version_blocked";
|
|
312
|
+
}>, z.ZodString]>;
|
|
313
|
+
retryable: z.ZodBoolean;
|
|
149
314
|
}, z.core.$strip>>>;
|
|
150
315
|
configuredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
151
316
|
cursor: z.ZodOptional<z.ZodNumber>;
|
|
152
317
|
}, z.core.$strip>;
|
|
153
318
|
export type ConnHelloPayload = z.infer<typeof ConnHelloPayloadSchema>;
|
|
154
|
-
/** server -> daemon: handshake acknowledgement. */
|
|
155
|
-
export declare const ConnAckPayloadSchema: z.ZodObject<{
|
|
156
|
-
protocolVersion: z.ZodNumber;
|
|
157
|
-
capabilities: z.ZodArray<z.ZodString>;
|
|
158
|
-
serverTime: z.ZodISODateTime;
|
|
159
|
-
}, z.core.$strip>;
|
|
160
|
-
export type ConnAckPayload = z.infer<typeof ConnAckPayloadSchema>;
|
|
161
319
|
/**
|
|
162
320
|
* The web-selected runtime/model target carried end to end with a task.
|
|
163
321
|
*
|
|
@@ -192,128 +350,8 @@ export declare const DispatchSelectionSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
192
350
|
}, z.core.$strict>;
|
|
193
351
|
}, z.core.$strict>], "lane">;
|
|
194
352
|
export type DispatchSelection = z.infer<typeof DispatchSelectionSchema>;
|
|
195
|
-
/**
|
|
196
|
-
* server -> daemon: offer a task for a device to claim.
|
|
197
|
-
*
|
|
198
|
-
* `taskId` used to be duplicated here; it is now carried only by the
|
|
199
|
-
* envelope's `task_id` (M1 gap #7 — single source of truth for routing).
|
|
200
|
-
*/
|
|
201
|
-
export declare const TaskOfferPayloadSchema: z.ZodObject<{
|
|
202
|
-
sealed: z.ZodOptional<z.ZodNever>;
|
|
203
|
-
sealing: z.ZodOptional<z.ZodNever>;
|
|
204
|
-
instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
205
|
-
blobRef: z.ZodObject<{
|
|
206
|
-
blobId: z.ZodString;
|
|
207
|
-
contentHash: z.ZodString;
|
|
208
|
-
size: z.ZodNumber;
|
|
209
|
-
contentType: z.ZodString;
|
|
210
|
-
url: z.ZodOptional<z.ZodString>;
|
|
211
|
-
}, z.core.$strip>;
|
|
212
|
-
}, z.core.$strict>]>;
|
|
213
|
-
runtime: z.ZodOptional<z.ZodEnum<{
|
|
214
|
-
claude: "claude";
|
|
215
|
-
codex: "codex";
|
|
216
|
-
pi: "pi";
|
|
217
|
-
}>>;
|
|
218
|
-
harnessId: z.ZodOptional<z.ZodString>;
|
|
219
|
-
dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
220
|
-
lane: z.ZodLiteral<"subscription">;
|
|
221
|
-
runtimeId: z.ZodEnum<{
|
|
222
|
-
claude: "claude";
|
|
223
|
-
codex: "codex";
|
|
224
|
-
}>;
|
|
225
|
-
providerId: z.ZodNull;
|
|
226
|
-
modelId: z.ZodString;
|
|
227
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
228
|
-
lane: z.ZodLiteral<"byok">;
|
|
229
|
-
runtimeId: z.ZodLiteral<"pi">;
|
|
230
|
-
providerId: z.ZodString;
|
|
231
|
-
modelId: z.ZodString;
|
|
232
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
233
|
-
lane: z.ZodLiteral<"byok-profile">;
|
|
234
|
-
runtimeId: z.ZodLiteral<"pi">;
|
|
235
|
-
providerProfile: z.ZodObject<{
|
|
236
|
-
profileRef: z.ZodString;
|
|
237
|
-
profileRevision: z.ZodString;
|
|
238
|
-
profileHash: z.ZodString;
|
|
239
|
-
modelId: z.ZodString;
|
|
240
|
-
requiredCapabilities: z.ZodArray<z.ZodEnum<{
|
|
241
|
-
"image-input": "image-input";
|
|
242
|
-
}>>;
|
|
243
|
-
}, z.core.$strict>;
|
|
244
|
-
}, z.core.$strict>], "lane">>;
|
|
245
|
-
sessionRef: z.ZodOptional<z.ZodString>;
|
|
246
|
-
workspaceHint: z.ZodOptional<z.ZodString>;
|
|
247
|
-
limits: z.ZodOptional<z.ZodObject<{
|
|
248
|
-
maxDurationMs: z.ZodOptional<z.ZodNumber>;
|
|
249
|
-
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
250
|
-
}, z.core.$strip>>;
|
|
251
|
-
}, z.core.$strip>;
|
|
252
|
-
export type TaskOfferPayload = z.infer<typeof TaskOfferPayloadSchema>;
|
|
253
353
|
/** Every named toolset is required; duplicates are rejected instead of silently de-duplicated. */
|
|
254
354
|
export declare const RequiredToolsetsSchema: z.ZodArray<z.ZodString>;
|
|
255
|
-
/**
|
|
256
|
-
* Additive v1 offer variant for tasks whose semantics require local MCP
|
|
257
|
-
* tools. This is a distinct message type rather than an optional field on
|
|
258
|
-
* `task.offer`, so an older daemon can never strip an unknown optional control
|
|
259
|
-
* field and run the task without its required tools. An unknown type is not
|
|
260
|
-
* silently skipped either: on long-poll it freezes the cursor, so the enqueue
|
|
261
|
-
* capability gate is the real compatibility boundary. The whole payload is
|
|
262
|
-
* strict because every field here affects execution authority.
|
|
263
|
-
*/
|
|
264
|
-
export declare const TaskOfferWithToolsetsPayloadSchema: z.ZodObject<{
|
|
265
|
-
sealed: z.ZodOptional<z.ZodNever>;
|
|
266
|
-
sealing: z.ZodOptional<z.ZodNever>;
|
|
267
|
-
instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
268
|
-
blobRef: z.ZodObject<{
|
|
269
|
-
blobId: z.ZodString;
|
|
270
|
-
contentHash: z.ZodString;
|
|
271
|
-
size: z.ZodNumber;
|
|
272
|
-
contentType: z.ZodString;
|
|
273
|
-
url: z.ZodOptional<z.ZodString>;
|
|
274
|
-
}, z.core.$strip>;
|
|
275
|
-
}, z.core.$strict>]>;
|
|
276
|
-
runtime: z.ZodOptional<z.ZodEnum<{
|
|
277
|
-
claude: "claude";
|
|
278
|
-
codex: "codex";
|
|
279
|
-
pi: "pi";
|
|
280
|
-
}>>;
|
|
281
|
-
harnessId: z.ZodOptional<z.ZodString>;
|
|
282
|
-
dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
283
|
-
lane: z.ZodLiteral<"subscription">;
|
|
284
|
-
runtimeId: z.ZodEnum<{
|
|
285
|
-
claude: "claude";
|
|
286
|
-
codex: "codex";
|
|
287
|
-
}>;
|
|
288
|
-
providerId: z.ZodNull;
|
|
289
|
-
modelId: z.ZodString;
|
|
290
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
291
|
-
lane: z.ZodLiteral<"byok">;
|
|
292
|
-
runtimeId: z.ZodLiteral<"pi">;
|
|
293
|
-
providerId: z.ZodString;
|
|
294
|
-
modelId: z.ZodString;
|
|
295
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
296
|
-
lane: z.ZodLiteral<"byok-profile">;
|
|
297
|
-
runtimeId: z.ZodLiteral<"pi">;
|
|
298
|
-
providerProfile: z.ZodObject<{
|
|
299
|
-
profileRef: z.ZodString;
|
|
300
|
-
profileRevision: z.ZodString;
|
|
301
|
-
profileHash: z.ZodString;
|
|
302
|
-
modelId: z.ZodString;
|
|
303
|
-
requiredCapabilities: z.ZodArray<z.ZodEnum<{
|
|
304
|
-
"image-input": "image-input";
|
|
305
|
-
}>>;
|
|
306
|
-
}, z.core.$strict>;
|
|
307
|
-
}, z.core.$strict>], "lane">>;
|
|
308
|
-
sessionRef: z.ZodOptional<z.ZodString>;
|
|
309
|
-
workspaceHint: z.ZodOptional<z.ZodString>;
|
|
310
|
-
limits: z.ZodOptional<z.ZodObject<{
|
|
311
|
-
maxDurationMs: z.ZodOptional<z.ZodNumber>;
|
|
312
|
-
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
313
|
-
}, z.core.$strip>>;
|
|
314
|
-
requiredToolsets: z.ZodArray<z.ZodString>;
|
|
315
|
-
}, z.core.$strict>;
|
|
316
|
-
export type TaskOfferWithToolsetsPayload = z.infer<typeof TaskOfferWithToolsetsPayloadSchema>;
|
|
317
355
|
/**
|
|
318
356
|
* How an Agent Attempt uses its Agent home. `memory-reader` runs the Attempt
|
|
319
357
|
* in its own run directory, `<home>/.byok/runs/<taskId>/`, beside other
|
|
@@ -345,108 +383,36 @@ export declare const AgentMemorySelectionSchema: z.ZodEnum<{
|
|
|
345
383
|
}>;
|
|
346
384
|
export type AgentMemorySelection = z.infer<typeof AgentMemorySelectionSchema>;
|
|
347
385
|
/**
|
|
348
|
-
*
|
|
349
|
-
*
|
|
350
|
-
*
|
|
351
|
-
*
|
|
352
|
-
* `agentMemory` selects the Agent memory of this one task (see
|
|
353
|
-
* {@link AgentMemorySelectionSchema}). Absent keeps the daemon admission. A
|
|
354
|
-
* host sends it only to a device that advertises `agent-memory-selection`. The
|
|
355
|
-
* prepared offer replaces it with its own required selection.
|
|
386
|
+
* How a `task.offer` starts its runtime session. `resume` continues the named
|
|
387
|
+
* session; `fresh` lets the selected runtime mint one after start. It is
|
|
388
|
+
* required, so an offer without a resume reference is never read as fresh.
|
|
356
389
|
*/
|
|
357
|
-
export declare const
|
|
390
|
+
export declare const SessionSelectionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
391
|
+
mode: z.ZodLiteral<"resume">;
|
|
392
|
+
sessionRef: z.ZodString;
|
|
393
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
394
|
+
mode: z.ZodLiteral<"fresh">;
|
|
395
|
+
}, z.core.$strict>], "mode">;
|
|
396
|
+
export type SessionSelection = z.infer<typeof SessionSelectionSchema>;
|
|
397
|
+
/** server -> daemon: a `task.offer` of a task that is not sealed. */
|
|
398
|
+
export declare const TaskOfferPlainPayloadSchema: z.ZodObject<{
|
|
358
399
|
sealed: z.ZodOptional<z.ZodNever>;
|
|
359
400
|
sealing: z.ZodOptional<z.ZodNever>;
|
|
360
|
-
instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
361
|
-
blobRef: z.ZodObject<{
|
|
362
|
-
blobId: z.ZodString;
|
|
363
|
-
contentHash: z.ZodString;
|
|
364
|
-
size: z.ZodNumber;
|
|
365
|
-
contentType: z.ZodString;
|
|
366
|
-
url: z.ZodOptional<z.ZodString>;
|
|
367
|
-
}, z.core.$strip>;
|
|
368
|
-
}, z.core.$strict>]>;
|
|
369
401
|
agentRef: z.ZodObject<{
|
|
370
402
|
agentId: z.ZodString;
|
|
371
403
|
profileRevision: z.ZodString;
|
|
372
404
|
}, z.core.$strict>;
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
read: "read";
|
|
377
|
-
"read-if-admitted": "read-if-admitted";
|
|
378
|
-
"read-write": "read-write";
|
|
379
|
-
"read-write-if-admitted": "read-write-if-admitted";
|
|
380
|
-
}>>;
|
|
381
|
-
requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
382
|
-
runtime: z.ZodOptional<z.ZodEnum<{
|
|
383
|
-
claude: "claude";
|
|
384
|
-
codex: "codex";
|
|
385
|
-
pi: "pi";
|
|
386
|
-
}>>;
|
|
387
|
-
harnessId: z.ZodOptional<z.ZodString>;
|
|
388
|
-
dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
389
|
-
lane: z.ZodLiteral<"subscription">;
|
|
390
|
-
runtimeId: z.ZodEnum<{
|
|
391
|
-
claude: "claude";
|
|
392
|
-
codex: "codex";
|
|
393
|
-
}>;
|
|
394
|
-
providerId: z.ZodNull;
|
|
395
|
-
modelId: z.ZodString;
|
|
396
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
397
|
-
lane: z.ZodLiteral<"byok">;
|
|
398
|
-
runtimeId: z.ZodLiteral<"pi">;
|
|
399
|
-
providerId: z.ZodString;
|
|
400
|
-
modelId: z.ZodString;
|
|
401
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
402
|
-
lane: z.ZodLiteral<"byok-profile">;
|
|
403
|
-
runtimeId: z.ZodLiteral<"pi">;
|
|
404
|
-
providerProfile: z.ZodObject<{
|
|
405
|
-
profileRef: z.ZodString;
|
|
406
|
-
profileRevision: z.ZodString;
|
|
407
|
-
profileHash: z.ZodString;
|
|
408
|
-
modelId: z.ZodString;
|
|
409
|
-
requiredCapabilities: z.ZodArray<z.ZodEnum<{
|
|
410
|
-
"image-input": "image-input";
|
|
411
|
-
}>>;
|
|
412
|
-
}, z.core.$strict>;
|
|
413
|
-
}, z.core.$strict>], "lane">>;
|
|
414
|
-
terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
415
|
-
mode: z.ZodLiteral<"none">;
|
|
405
|
+
session: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
406
|
+
mode: z.ZodLiteral<"resume">;
|
|
407
|
+
sessionRef: z.ZodString;
|
|
416
408
|
}, z.core.$strict>, z.ZodObject<{
|
|
417
|
-
mode: z.ZodLiteral<"
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
425
|
-
}, z.core.$strip>>;
|
|
426
|
-
}, z.core.$strict>;
|
|
427
|
-
export type TaskOfferForAgentPayload = z.infer<typeof TaskOfferForAgentPayloadSchema>;
|
|
428
|
-
/**
|
|
429
|
-
* Strict Agent offer which consumes the typed egress policy. It is a distinct
|
|
430
|
-
* message so an older Agent-home daemon cannot strip control data and proceed
|
|
431
|
-
* with an unconsumed egress declaration.
|
|
432
|
-
*/
|
|
433
|
-
export declare const TaskOfferForAgentWithEgressPayloadSchema: z.ZodObject<{
|
|
434
|
-
sealed: z.ZodOptional<z.ZodNever>;
|
|
435
|
-
sealing: z.ZodOptional<z.ZodNever>;
|
|
436
|
-
instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
437
|
-
blobRef: z.ZodObject<{
|
|
438
|
-
blobId: z.ZodString;
|
|
439
|
-
contentHash: z.ZodString;
|
|
440
|
-
size: z.ZodNumber;
|
|
441
|
-
contentType: z.ZodString;
|
|
442
|
-
url: z.ZodOptional<z.ZodString>;
|
|
443
|
-
}, z.core.$strip>;
|
|
444
|
-
}, z.core.$strict>]>;
|
|
445
|
-
agentRef: z.ZodObject<{
|
|
446
|
-
agentId: z.ZodString;
|
|
447
|
-
profileRevision: z.ZodString;
|
|
448
|
-
}, z.core.$strict>;
|
|
449
|
-
homeAccess: z.ZodOptional<z.ZodLiteral<"memory-reader">>;
|
|
409
|
+
mode: z.ZodLiteral<"fresh">;
|
|
410
|
+
}, z.core.$strict>], "mode">;
|
|
411
|
+
preparation: z.ZodOptional<z.ZodObject<{
|
|
412
|
+
reference: z.ZodString;
|
|
413
|
+
requestDigest: z.ZodString;
|
|
414
|
+
artifactDigest: z.ZodOptional<z.ZodString>;
|
|
415
|
+
}, z.core.$strict>>;
|
|
450
416
|
agentMemory: z.ZodOptional<z.ZodEnum<{
|
|
451
417
|
none: "none";
|
|
452
418
|
read: "read";
|
|
@@ -454,6 +420,7 @@ export declare const TaskOfferForAgentWithEgressPayloadSchema: z.ZodObject<{
|
|
|
454
420
|
"read-write": "read-write";
|
|
455
421
|
"read-write-if-admitted": "read-write-if-admitted";
|
|
456
422
|
}>>;
|
|
423
|
+
homeAccess: z.ZodOptional<z.ZodLiteral<"memory-reader">>;
|
|
457
424
|
requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
458
425
|
runtime: z.ZodOptional<z.ZodEnum<{
|
|
459
426
|
claude: "claude";
|
|
@@ -497,9 +464,8 @@ export declare const TaskOfferForAgentWithEgressPayloadSchema: z.ZodObject<{
|
|
|
497
464
|
limits: z.ZodOptional<z.ZodObject<{
|
|
498
465
|
maxDurationMs: z.ZodOptional<z.ZodNumber>;
|
|
499
466
|
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
500
|
-
}, z.core.$
|
|
501
|
-
|
|
502
|
-
egressPolicy: z.ZodObject<{
|
|
467
|
+
}, z.core.$strict>>;
|
|
468
|
+
egressPolicy: z.ZodOptional<z.ZodObject<{
|
|
503
469
|
policyRevision: z.ZodString;
|
|
504
470
|
activity: z.ZodObject<{
|
|
505
471
|
delivery: z.ZodLiteral<"latest-value">;
|
|
@@ -525,7 +491,7 @@ export declare const TaskOfferForAgentWithEgressPayloadSchema: z.ZodObject<{
|
|
|
525
491
|
allowedMimeTypes: z.ZodArray<z.ZodString>;
|
|
526
492
|
}, z.core.$strict>]>;
|
|
527
493
|
}, z.core.$strict>;
|
|
528
|
-
}, z.core.$strict
|
|
494
|
+
}, z.core.$strict>>;
|
|
529
495
|
messageEgress: z.ZodOptional<z.ZodObject<{
|
|
530
496
|
mode: z.ZodLiteral<"required">;
|
|
531
497
|
contract: z.ZodString;
|
|
@@ -535,18 +501,8 @@ export declare const TaskOfferForAgentWithEgressPayloadSchema: z.ZodObject<{
|
|
|
535
501
|
}>;
|
|
536
502
|
maxBytes: z.ZodNumber;
|
|
537
503
|
}, z.core.$strict>>;
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
/**
|
|
541
|
-
* Strict fresh-session Agent egress offer. It deliberately omits `sessionRef`:
|
|
542
|
-
* the selected runtime is the sole authority that can mint that identity after
|
|
543
|
-
* start. This distinct message prevents a missing resume reference from being
|
|
544
|
-
* interpreted as a fresh execution by an older daemon.
|
|
545
|
-
*/
|
|
546
|
-
export declare const TaskOfferForAgentWithEgressFreshPayloadSchema: z.ZodObject<{
|
|
547
|
-
sealed: z.ZodOptional<z.ZodNever>;
|
|
548
|
-
sealing: z.ZodOptional<z.ZodNever>;
|
|
549
|
-
instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
504
|
+
routineRef: z.ZodOptional<z.ZodNever>;
|
|
505
|
+
instruction: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
550
506
|
blobRef: z.ZodObject<{
|
|
551
507
|
blobId: z.ZodString;
|
|
552
508
|
contentHash: z.ZodString;
|
|
@@ -554,12 +510,21 @@ export declare const TaskOfferForAgentWithEgressFreshPayloadSchema: z.ZodObject<
|
|
|
554
510
|
contentType: z.ZodString;
|
|
555
511
|
url: z.ZodOptional<z.ZodString>;
|
|
556
512
|
}, z.core.$strip>;
|
|
557
|
-
}, z.core.$strict>]
|
|
513
|
+
}, z.core.$strict>]>>;
|
|
514
|
+
}, z.core.$strict>;
|
|
515
|
+
export type TaskOfferPlainPayload = z.infer<typeof TaskOfferPlainPayloadSchema>;
|
|
516
|
+
/** server -> daemon: a `task.offer` of a sealed task. */
|
|
517
|
+
export declare const TaskOfferSealedPayloadSchema: z.ZodObject<{
|
|
558
518
|
agentRef: z.ZodObject<{
|
|
559
519
|
agentId: z.ZodString;
|
|
560
520
|
profileRevision: z.ZodString;
|
|
561
521
|
}, z.core.$strict>;
|
|
562
|
-
|
|
522
|
+
session: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
523
|
+
mode: z.ZodLiteral<"resume">;
|
|
524
|
+
sessionRef: z.ZodString;
|
|
525
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
526
|
+
mode: z.ZodLiteral<"fresh">;
|
|
527
|
+
}, z.core.$strict>], "mode">;
|
|
563
528
|
agentMemory: z.ZodOptional<z.ZodEnum<{
|
|
564
529
|
none: "none";
|
|
565
530
|
read: "read";
|
|
@@ -567,6 +532,7 @@ export declare const TaskOfferForAgentWithEgressFreshPayloadSchema: z.ZodObject<
|
|
|
567
532
|
"read-write": "read-write";
|
|
568
533
|
"read-write-if-admitted": "read-write-if-admitted";
|
|
569
534
|
}>>;
|
|
535
|
+
homeAccess: z.ZodOptional<z.ZodLiteral<"memory-reader">>;
|
|
570
536
|
requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
571
537
|
runtime: z.ZodOptional<z.ZodEnum<{
|
|
572
538
|
claude: "claude";
|
|
@@ -610,8 +576,8 @@ export declare const TaskOfferForAgentWithEgressFreshPayloadSchema: z.ZodObject<
|
|
|
610
576
|
limits: z.ZodOptional<z.ZodObject<{
|
|
611
577
|
maxDurationMs: z.ZodOptional<z.ZodNumber>;
|
|
612
578
|
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
613
|
-
}, z.core.$
|
|
614
|
-
egressPolicy: z.ZodObject<{
|
|
579
|
+
}, z.core.$strict>>;
|
|
580
|
+
egressPolicy: z.ZodOptional<z.ZodObject<{
|
|
615
581
|
policyRevision: z.ZodString;
|
|
616
582
|
activity: z.ZodObject<{
|
|
617
583
|
delivery: z.ZodLiteral<"latest-value">;
|
|
@@ -637,7 +603,7 @@ export declare const TaskOfferForAgentWithEgressFreshPayloadSchema: z.ZodObject<
|
|
|
637
603
|
allowedMimeTypes: z.ZodArray<z.ZodString>;
|
|
638
604
|
}, z.core.$strict>]>;
|
|
639
605
|
}, z.core.$strict>;
|
|
640
|
-
}, z.core.$strict
|
|
606
|
+
}, z.core.$strict>>;
|
|
641
607
|
messageEgress: z.ZodOptional<z.ZodObject<{
|
|
642
608
|
mode: z.ZodLiteral<"required">;
|
|
643
609
|
contract: z.ZodString;
|
|
@@ -647,38 +613,92 @@ export declare const TaskOfferForAgentWithEgressFreshPayloadSchema: z.ZodObject<
|
|
|
647
613
|
}>;
|
|
648
614
|
maxBytes: z.ZodNumber;
|
|
649
615
|
}, z.core.$strict>>;
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
616
|
+
instruction: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
617
|
+
blobRef: z.ZodObject<{
|
|
618
|
+
blobId: z.ZodString;
|
|
619
|
+
contentHash: z.ZodString;
|
|
620
|
+
size: z.ZodNumber;
|
|
621
|
+
contentType: z.ZodString;
|
|
622
|
+
url: z.ZodOptional<z.ZodString>;
|
|
623
|
+
}, z.core.$strip>;
|
|
624
|
+
}, z.core.$strict>]>>;
|
|
625
|
+
sealing: z.ZodObject<{
|
|
626
|
+
scopeId: z.ZodString;
|
|
627
|
+
epoch: z.ZodNumber;
|
|
628
|
+
categories: z.ZodArray<z.ZodEnum<{
|
|
629
|
+
"task-input": "task-input";
|
|
630
|
+
"task-output": "task-output";
|
|
631
|
+
}>>;
|
|
632
|
+
}, z.core.$strict>;
|
|
633
|
+
sealed: z.ZodOptional<z.ZodObject<{
|
|
634
|
+
v: z.ZodLiteral<1>;
|
|
635
|
+
suite: z.ZodLiteral<"byok-sealed-v1.hkdf-sha256.aes-256-gcm">;
|
|
636
|
+
category: z.ZodLiteral<"task-input">;
|
|
637
|
+
scope: z.ZodObject<{
|
|
638
|
+
id: z.ZodString;
|
|
639
|
+
epoch: z.ZodNumber;
|
|
640
|
+
keyId: z.ZodString;
|
|
641
|
+
}, z.core.$strict>;
|
|
642
|
+
chainHead: z.ZodObject<{
|
|
643
|
+
seq: z.ZodNumber;
|
|
644
|
+
hash: z.ZodString;
|
|
645
|
+
}, z.core.$strict>;
|
|
646
|
+
sender: z.ZodString;
|
|
647
|
+
salt: z.ZodString;
|
|
648
|
+
nonce: z.ZodString;
|
|
649
|
+
paddedLength: z.ZodNumber;
|
|
650
|
+
contentMac: z.ZodString;
|
|
651
|
+
ciphertext: z.ZodOptional<z.ZodString>;
|
|
652
|
+
ciphertextRef: z.ZodOptional<z.ZodObject<{
|
|
653
|
+
blobId: z.ZodString;
|
|
654
|
+
contentHash: z.ZodString;
|
|
655
|
+
size: z.ZodNumber;
|
|
656
|
+
contentType: z.ZodString;
|
|
657
|
+
}, z.core.$strict>>;
|
|
658
|
+
}, z.core.$strict>>;
|
|
659
|
+
routineRef: z.ZodOptional<z.ZodObject<{
|
|
660
|
+
routineId: z.ZodString;
|
|
661
|
+
definitionVersion: z.ZodNumber;
|
|
662
|
+
notAfter: z.ZodString;
|
|
663
|
+
}, z.core.$strict>>;
|
|
664
|
+
preparation: z.ZodOptional<z.ZodNever>;
|
|
665
|
+
}, z.core.$strict>;
|
|
666
|
+
export type TaskOfferSealedPayload = z.infer<typeof TaskOfferSealedPayloadSchema>;
|
|
667
|
+
/**
|
|
668
|
+
* server -> daemon: the one task-opening offer. Both branches are strict, so a
|
|
669
|
+
* field this decoder does not know stops the daemon's cursor (the long-poll
|
|
670
|
+
* treats it like an unknown type) instead of being stripped. The plaintext
|
|
671
|
+
* branch comes first and refuses `sealing`, so a sealed offer always takes the
|
|
672
|
+
* sealed branch; narrow with `payload.sealing !== undefined`.
|
|
673
|
+
*/
|
|
674
|
+
export declare const TaskOfferPayloadSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
675
|
+
sealed: z.ZodOptional<z.ZodNever>;
|
|
676
|
+
sealing: z.ZodOptional<z.ZodNever>;
|
|
677
|
+
agentRef: z.ZodObject<{
|
|
678
|
+
agentId: z.ZodString;
|
|
679
|
+
profileRevision: z.ZodString;
|
|
680
|
+
}, z.core.$strict>;
|
|
681
|
+
session: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
682
|
+
mode: z.ZodLiteral<"resume">;
|
|
683
|
+
sessionRef: z.ZodString;
|
|
684
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
685
|
+
mode: z.ZodLiteral<"fresh">;
|
|
686
|
+
}, z.core.$strict>], "mode">;
|
|
687
|
+
preparation: z.ZodOptional<z.ZodObject<{
|
|
688
|
+
reference: z.ZodString;
|
|
689
|
+
requestDigest: z.ZodString;
|
|
690
|
+
artifactDigest: z.ZodOptional<z.ZodString>;
|
|
691
|
+
}, z.core.$strict>>;
|
|
692
|
+
agentMemory: z.ZodOptional<z.ZodEnum<{
|
|
693
|
+
none: "none";
|
|
694
|
+
read: "read";
|
|
695
|
+
"read-if-admitted": "read-if-admitted";
|
|
696
|
+
"read-write": "read-write";
|
|
697
|
+
"read-write-if-admitted": "read-write-if-admitted";
|
|
698
|
+
}>>;
|
|
699
|
+
homeAccess: z.ZodOptional<z.ZodLiteral<"memory-reader">>;
|
|
700
|
+
requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
701
|
+
runtime: z.ZodOptional<z.ZodEnum<{
|
|
682
702
|
claude: "claude";
|
|
683
703
|
codex: "codex";
|
|
684
704
|
pi: "pi";
|
|
@@ -720,18 +740,117 @@ export declare const TaskOfferPreparedPayloadSchema: z.ZodObject<{
|
|
|
720
740
|
limits: z.ZodOptional<z.ZodObject<{
|
|
721
741
|
maxDurationMs: z.ZodOptional<z.ZodNumber>;
|
|
722
742
|
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
723
|
-
}, z.core.$
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
743
|
+
}, z.core.$strict>>;
|
|
744
|
+
egressPolicy: z.ZodOptional<z.ZodObject<{
|
|
745
|
+
policyRevision: z.ZodString;
|
|
746
|
+
activity: z.ZodObject<{
|
|
747
|
+
delivery: z.ZodLiteral<"latest-value">;
|
|
748
|
+
maxCoalesceMs: z.ZodNumber;
|
|
749
|
+
maxEventBytes: z.ZodNumber;
|
|
750
|
+
}, z.core.$strict>;
|
|
751
|
+
reliable: z.ZodObject<{
|
|
752
|
+
maxPendingEventsPerAgent: z.ZodNumber;
|
|
753
|
+
maxPendingBytesPerAgent: z.ZodNumber;
|
|
754
|
+
maxPendingBytesPerTenant: z.ZodNumber;
|
|
755
|
+
}, z.core.$strict>;
|
|
756
|
+
transfers: z.ZodObject<{
|
|
757
|
+
workspace: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
|
|
758
|
+
maxBytes: z.ZodNumber;
|
|
759
|
+
allowedMimeTypes: z.ZodArray<z.ZodString>;
|
|
760
|
+
}, z.core.$strict>]>;
|
|
761
|
+
transcript: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
|
|
762
|
+
maxBytes: z.ZodNumber;
|
|
763
|
+
allowedMimeTypes: z.ZodArray<z.ZodString>;
|
|
764
|
+
}, z.core.$strict>]>;
|
|
765
|
+
artifact: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
|
|
766
|
+
maxBytes: z.ZodNumber;
|
|
767
|
+
allowedMimeTypes: z.ZodArray<z.ZodString>;
|
|
768
|
+
}, z.core.$strict>]>;
|
|
769
|
+
}, z.core.$strict>;
|
|
770
|
+
}, z.core.$strict>>;
|
|
771
|
+
messageEgress: z.ZodOptional<z.ZodObject<{
|
|
772
|
+
mode: z.ZodLiteral<"required">;
|
|
773
|
+
contract: z.ZodString;
|
|
774
|
+
contentType: z.ZodEnum<{
|
|
775
|
+
"text/markdown": "text/markdown";
|
|
776
|
+
"text/plain": "text/plain";
|
|
777
|
+
}>;
|
|
778
|
+
maxBytes: z.ZodNumber;
|
|
779
|
+
}, z.core.$strict>>;
|
|
780
|
+
routineRef: z.ZodOptional<z.ZodNever>;
|
|
781
|
+
instruction: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
782
|
+
blobRef: z.ZodObject<{
|
|
783
|
+
blobId: z.ZodString;
|
|
784
|
+
contentHash: z.ZodString;
|
|
785
|
+
size: z.ZodNumber;
|
|
786
|
+
contentType: z.ZodString;
|
|
787
|
+
url: z.ZodOptional<z.ZodString>;
|
|
788
|
+
}, z.core.$strip>;
|
|
789
|
+
}, z.core.$strict>]>>;
|
|
790
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
791
|
+
agentRef: z.ZodObject<{
|
|
792
|
+
agentId: z.ZodString;
|
|
793
|
+
profileRevision: z.ZodString;
|
|
728
794
|
}, z.core.$strict>;
|
|
729
|
-
|
|
795
|
+
session: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
796
|
+
mode: z.ZodLiteral<"resume">;
|
|
797
|
+
sessionRef: z.ZodString;
|
|
798
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
799
|
+
mode: z.ZodLiteral<"fresh">;
|
|
800
|
+
}, z.core.$strict>], "mode">;
|
|
801
|
+
agentMemory: z.ZodOptional<z.ZodEnum<{
|
|
730
802
|
none: "none";
|
|
731
803
|
read: "read";
|
|
804
|
+
"read-if-admitted": "read-if-admitted";
|
|
732
805
|
"read-write": "read-write";
|
|
733
|
-
|
|
734
|
-
|
|
806
|
+
"read-write-if-admitted": "read-write-if-admitted";
|
|
807
|
+
}>>;
|
|
808
|
+
homeAccess: z.ZodOptional<z.ZodLiteral<"memory-reader">>;
|
|
809
|
+
requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
810
|
+
runtime: z.ZodOptional<z.ZodEnum<{
|
|
811
|
+
claude: "claude";
|
|
812
|
+
codex: "codex";
|
|
813
|
+
pi: "pi";
|
|
814
|
+
}>>;
|
|
815
|
+
harnessId: z.ZodOptional<z.ZodString>;
|
|
816
|
+
dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
817
|
+
lane: z.ZodLiteral<"subscription">;
|
|
818
|
+
runtimeId: z.ZodEnum<{
|
|
819
|
+
claude: "claude";
|
|
820
|
+
codex: "codex";
|
|
821
|
+
}>;
|
|
822
|
+
providerId: z.ZodNull;
|
|
823
|
+
modelId: z.ZodString;
|
|
824
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
825
|
+
lane: z.ZodLiteral<"byok">;
|
|
826
|
+
runtimeId: z.ZodLiteral<"pi">;
|
|
827
|
+
providerId: z.ZodString;
|
|
828
|
+
modelId: z.ZodString;
|
|
829
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
830
|
+
lane: z.ZodLiteral<"byok-profile">;
|
|
831
|
+
runtimeId: z.ZodLiteral<"pi">;
|
|
832
|
+
providerProfile: z.ZodObject<{
|
|
833
|
+
profileRef: z.ZodString;
|
|
834
|
+
profileRevision: z.ZodString;
|
|
835
|
+
profileHash: z.ZodString;
|
|
836
|
+
modelId: z.ZodString;
|
|
837
|
+
requiredCapabilities: z.ZodArray<z.ZodEnum<{
|
|
838
|
+
"image-input": "image-input";
|
|
839
|
+
}>>;
|
|
840
|
+
}, z.core.$strict>;
|
|
841
|
+
}, z.core.$strict>], "lane">>;
|
|
842
|
+
terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
843
|
+
mode: z.ZodLiteral<"none">;
|
|
844
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
845
|
+
mode: z.ZodLiteral<"result-document">;
|
|
846
|
+
contract: z.ZodString;
|
|
847
|
+
schema: z.ZodCustom<import("./result-schema").ResultSchema, import("./result-schema").ResultSchema>;
|
|
848
|
+
}, z.core.$strict>], "mode">>;
|
|
849
|
+
limits: z.ZodOptional<z.ZodObject<{
|
|
850
|
+
maxDurationMs: z.ZodOptional<z.ZodNumber>;
|
|
851
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
852
|
+
}, z.core.$strict>>;
|
|
853
|
+
egressPolicy: z.ZodOptional<z.ZodObject<{
|
|
735
854
|
policyRevision: z.ZodString;
|
|
736
855
|
activity: z.ZodObject<{
|
|
737
856
|
delivery: z.ZodLiteral<"latest-value">;
|
|
@@ -757,7 +876,7 @@ export declare const TaskOfferPreparedPayloadSchema: z.ZodObject<{
|
|
|
757
876
|
allowedMimeTypes: z.ZodArray<z.ZodString>;
|
|
758
877
|
}, z.core.$strict>]>;
|
|
759
878
|
}, z.core.$strict>;
|
|
760
|
-
}, z.core.$strict
|
|
879
|
+
}, z.core.$strict>>;
|
|
761
880
|
messageEgress: z.ZodOptional<z.ZodObject<{
|
|
762
881
|
mode: z.ZodLiteral<"required">;
|
|
763
882
|
contract: z.ZodString;
|
|
@@ -767,8 +886,57 @@ export declare const TaskOfferPreparedPayloadSchema: z.ZodObject<{
|
|
|
767
886
|
}>;
|
|
768
887
|
maxBytes: z.ZodNumber;
|
|
769
888
|
}, z.core.$strict>>;
|
|
770
|
-
|
|
771
|
-
|
|
889
|
+
instruction: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
890
|
+
blobRef: z.ZodObject<{
|
|
891
|
+
blobId: z.ZodString;
|
|
892
|
+
contentHash: z.ZodString;
|
|
893
|
+
size: z.ZodNumber;
|
|
894
|
+
contentType: z.ZodString;
|
|
895
|
+
url: z.ZodOptional<z.ZodString>;
|
|
896
|
+
}, z.core.$strip>;
|
|
897
|
+
}, z.core.$strict>]>>;
|
|
898
|
+
sealing: z.ZodObject<{
|
|
899
|
+
scopeId: z.ZodString;
|
|
900
|
+
epoch: z.ZodNumber;
|
|
901
|
+
categories: z.ZodArray<z.ZodEnum<{
|
|
902
|
+
"task-input": "task-input";
|
|
903
|
+
"task-output": "task-output";
|
|
904
|
+
}>>;
|
|
905
|
+
}, z.core.$strict>;
|
|
906
|
+
sealed: z.ZodOptional<z.ZodObject<{
|
|
907
|
+
v: z.ZodLiteral<1>;
|
|
908
|
+
suite: z.ZodLiteral<"byok-sealed-v1.hkdf-sha256.aes-256-gcm">;
|
|
909
|
+
category: z.ZodLiteral<"task-input">;
|
|
910
|
+
scope: z.ZodObject<{
|
|
911
|
+
id: z.ZodString;
|
|
912
|
+
epoch: z.ZodNumber;
|
|
913
|
+
keyId: z.ZodString;
|
|
914
|
+
}, z.core.$strict>;
|
|
915
|
+
chainHead: z.ZodObject<{
|
|
916
|
+
seq: z.ZodNumber;
|
|
917
|
+
hash: z.ZodString;
|
|
918
|
+
}, z.core.$strict>;
|
|
919
|
+
sender: z.ZodString;
|
|
920
|
+
salt: z.ZodString;
|
|
921
|
+
nonce: z.ZodString;
|
|
922
|
+
paddedLength: z.ZodNumber;
|
|
923
|
+
contentMac: z.ZodString;
|
|
924
|
+
ciphertext: z.ZodOptional<z.ZodString>;
|
|
925
|
+
ciphertextRef: z.ZodOptional<z.ZodObject<{
|
|
926
|
+
blobId: z.ZodString;
|
|
927
|
+
contentHash: z.ZodString;
|
|
928
|
+
size: z.ZodNumber;
|
|
929
|
+
contentType: z.ZodString;
|
|
930
|
+
}, z.core.$strict>>;
|
|
931
|
+
}, z.core.$strict>>;
|
|
932
|
+
routineRef: z.ZodOptional<z.ZodObject<{
|
|
933
|
+
routineId: z.ZodString;
|
|
934
|
+
definitionVersion: z.ZodNumber;
|
|
935
|
+
notAfter: z.ZodString;
|
|
936
|
+
}, z.core.$strict>>;
|
|
937
|
+
preparation: z.ZodOptional<z.ZodNever>;
|
|
938
|
+
}, z.core.$strict>]>;
|
|
939
|
+
export type TaskOfferPayload = z.infer<typeof TaskOfferPayloadSchema>;
|
|
772
940
|
/** Daemon -> cloud: one durable reliable-lane item, forwarded as the Agent produced it. */
|
|
773
941
|
export declare const AgentEgressReliablePayloadSchema: z.ZodObject<{
|
|
774
942
|
agentRef: z.ZodObject<{
|
|
@@ -970,7 +1138,7 @@ export declare const AgentContentReceiptPayloadSchema: z.ZodDiscriminatedUnion<[
|
|
|
970
1138
|
}>;
|
|
971
1139
|
decision: z.ZodLiteral<"denied">;
|
|
972
1140
|
byteCount: z.ZodLiteral<0>;
|
|
973
|
-
reason: z.ZodEnum<{
|
|
1141
|
+
reason: z.ZodUnion<readonly [z.ZodEnum<{
|
|
974
1142
|
"absolute-target": "absolute-target";
|
|
975
1143
|
"byte-limit": "byte-limit";
|
|
976
1144
|
"capability-missing": "capability-missing";
|
|
@@ -990,7 +1158,7 @@ export declare const AgentContentReceiptPayloadSchema: z.ZodDiscriminatedUnion<[
|
|
|
990
1158
|
"target-missing": "target-missing";
|
|
991
1159
|
"text-decode-failed": "text-decode-failed";
|
|
992
1160
|
"text-not-allowlisted": "text-not-allowlisted";
|
|
993
|
-
}>;
|
|
1161
|
+
}>, z.ZodString]>;
|
|
994
1162
|
}, z.core.$strict>], "decision">;
|
|
995
1163
|
export type AgentContentReceiptPayload = z.infer<typeof AgentContentReceiptPayloadSchema>;
|
|
996
1164
|
/**
|
|
@@ -1032,7 +1200,7 @@ export type AgentMemoryIntentAvailablePayload = z.infer<typeof AgentMemoryIntent
|
|
|
1032
1200
|
* Server -> daemon: one task-free, exact-device remote input preparation.
|
|
1033
1201
|
*
|
|
1034
1202
|
* Distinct message type rather than an optional field on an existing one, for
|
|
1035
|
-
* the same N/N-1 reason
|
|
1203
|
+
* the same N/N-1 reason the Agent offers are: an optional field could be
|
|
1036
1204
|
* legally STRIPPED by a daemon that predates this contract, which would then
|
|
1037
1205
|
* answer as though a preparation it never performed had somehow been handled.
|
|
1038
1206
|
* An unknown type (`parseMessage` -> `UnknownMessageTypeError`) is not skipped
|
|
@@ -1179,18 +1347,15 @@ export type AgentInputPreparationPayload = z.infer<typeof AgentInputPreparationP
|
|
|
1179
1347
|
* `task.fail`/`task.cancelled` if resuming turns out to be impossible) — no
|
|
1180
1348
|
* new ack message type is introduced. See docs/protocol.md "Approval flow".
|
|
1181
1349
|
*
|
|
1182
|
-
* `approvalId` (
|
|
1183
|
-
*
|
|
1184
|
-
*
|
|
1185
|
-
*
|
|
1186
|
-
*
|
|
1187
|
-
*
|
|
1188
|
-
* (`ActiveTask.pendingApprovalId`, `packages/client`'s `task-runner.ts`) and
|
|
1189
|
-
* treats a mismatch as a stale, audit-only no-op instead of resolving
|
|
1190
|
-
* whatever happens to be pending right now — see `TaskRunner.handleApprove`.
|
|
1350
|
+
* `approvalId` (required since v4): the SPECIFIC pending approval this
|
|
1351
|
+
* decision resolves. The daemon compares it against its own
|
|
1352
|
+
* currently-dispatched approval id (`ActiveTask.pendingApprovalId`,
|
|
1353
|
+
* `packages/client`'s `task-runner.ts`) and treats a mismatch as a stale,
|
|
1354
|
+
* audit-only no-op, so a late decision never lands on the task's next
|
|
1355
|
+
* approval — see `TaskRunner.handleApprove`.
|
|
1191
1356
|
*/
|
|
1192
1357
|
export declare const TaskApprovePayloadSchema: z.ZodObject<{
|
|
1193
|
-
approvalId: z.
|
|
1358
|
+
approvalId: z.ZodString;
|
|
1194
1359
|
}, z.core.$strip>;
|
|
1195
1360
|
export type TaskApprovePayload = z.infer<typeof TaskApprovePayloadSchema>;
|
|
1196
1361
|
/**
|
|
@@ -1201,13 +1366,13 @@ export type TaskApprovePayload = z.infer<typeof TaskApprovePayloadSchema>;
|
|
|
1201
1366
|
* message just tells the daemon to stop, and the daemon reports the outcome
|
|
1202
1367
|
* via its existing `task.fail` terminal message.
|
|
1203
1368
|
*
|
|
1204
|
-
* `approvalId` (
|
|
1205
|
-
*
|
|
1206
|
-
*
|
|
1369
|
+
* `approvalId` (required since v4): same targeting as
|
|
1370
|
+
* `TaskApprovePayloadSchema.approvalId` above, applied to the reject path
|
|
1371
|
+
* (`TaskRunner.handleReject`).
|
|
1207
1372
|
*/
|
|
1208
1373
|
export declare const TaskRejectPayloadSchema: z.ZodObject<{
|
|
1209
1374
|
reason: z.ZodOptional<z.ZodString>;
|
|
1210
|
-
approvalId: z.
|
|
1375
|
+
approvalId: z.ZodString;
|
|
1211
1376
|
}, z.core.$strip>;
|
|
1212
1377
|
export type TaskRejectPayload = z.infer<typeof TaskRejectPayloadSchema>;
|
|
1213
1378
|
/**
|
|
@@ -1223,13 +1388,23 @@ export declare const TaskCancelPayloadSchema: z.ZodObject<{
|
|
|
1223
1388
|
reason: z.ZodOptional<z.ZodString>;
|
|
1224
1389
|
}, z.core.$strip>;
|
|
1225
1390
|
export type TaskCancelPayload = z.infer<typeof TaskCancelPayloadSchema>;
|
|
1226
|
-
/**
|
|
1227
|
-
export declare const
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1391
|
+
/** Maximum offer admission duration, and of each phase in it (seven days). */
|
|
1392
|
+
export declare const OFFER_ADMISSION_MAX_DURATION_MS = 604800000;
|
|
1393
|
+
/**
|
|
1394
|
+
* #1014: how long this device spent admitting an offer, in milliseconds of its
|
|
1395
|
+
* monotonic clock, from receiving the offer to sending the claim or decline
|
|
1396
|
+
* that ends admission. A phase is present only when it ran; the time no phase
|
|
1397
|
+
* names is `totalMs` minus their sum.
|
|
1398
|
+
*/
|
|
1399
|
+
export declare const OfferAdmissionTimingsSchema: z.ZodObject<{
|
|
1400
|
+
totalMs: z.ZodNumber;
|
|
1401
|
+
agentHomeWaitMs: z.ZodOptional<z.ZodNumber>;
|
|
1402
|
+
messageHelperPreflightMs: z.ZodOptional<z.ZodNumber>;
|
|
1403
|
+
resultHelperPreflightMs: z.ZodOptional<z.ZodNumber>;
|
|
1404
|
+
toolsetProbeMs: z.ZodOptional<z.ZodNumber>;
|
|
1405
|
+
runtimeLaunchMs: z.ZodOptional<z.ZodNumber>;
|
|
1406
|
+
}, z.core.$strict>;
|
|
1407
|
+
export type OfferAdmissionTimings = z.infer<typeof OfferAdmissionTimingsSchema>;
|
|
1233
1408
|
/**
|
|
1234
1409
|
* daemon -> server: claim an offered task (idempotent CAS on the server
|
|
1235
1410
|
* side). `taskId` used to be duplicated here; it is now carried only by the
|
|
@@ -1239,18 +1414,17 @@ export type TaskSteerPayload = z.infer<typeof TaskSteerPayloadSchema>;
|
|
|
1239
1414
|
* `task.started`.
|
|
1240
1415
|
*
|
|
1241
1416
|
* `runtime` (M5, additive-minor — docs/protocol.md §3.1): the ACTUAL
|
|
1242
|
-
* adapter this device selected for the task, distinct from
|
|
1243
|
-
* own `runtime` (the merely REQUESTED one, `TaskOfferPayloadSchema
|
|
1417
|
+
* adapter this device selected for the task, distinct from the offer's
|
|
1418
|
+
* own `runtime` (the merely REQUESTED one, `TaskOfferPayloadSchema`'s `runtime`
|
|
1244
1419
|
* above). When an offer names no runtime the daemon auto-selects (pi-first —
|
|
1245
1420
|
* `TaskRunner.pickAdapter`, `packages/client`'s `task-runner.ts`), and before
|
|
1246
1421
|
* this field existed the server had no way to learn which adapter actually
|
|
1247
1422
|
* ran — `TaskSnapshot.runtime` (`packages/server`'s `types.ts`) only ever
|
|
1248
1423
|
* recorded what was requested. Plain optional property on this already-
|
|
1249
1424
|
* tolerant `z.object()`: an old server simply never reads it, so this needed
|
|
1250
|
-
* no version bump and no emission gating
|
|
1251
|
-
*
|
|
1252
|
-
*
|
|
1253
|
-
* new enough to store it.
|
|
1425
|
+
* no version bump and no emission gating — a new daemon sends it
|
|
1426
|
+
* unconditionally, regardless of whether the connected server is new enough
|
|
1427
|
+
* to store it.
|
|
1254
1428
|
*
|
|
1255
1429
|
* `capabilities` (S0/D-4, additive-minor — docs/protocol.md §2.4): the
|
|
1256
1430
|
* TASK-level capability authority — what the claiming adapter reported about
|
|
@@ -1286,7 +1460,23 @@ export declare const TaskClaimPayloadSchema: z.ZodObject<{
|
|
|
1286
1460
|
approvalInteractive: z.ZodOptional<z.ZodBoolean>;
|
|
1287
1461
|
mcpToolsets: z.ZodOptional<z.ZodBoolean>;
|
|
1288
1462
|
messageDraft: z.ZodOptional<z.ZodBoolean>;
|
|
1463
|
+
toolAuthorizationAuto: z.ZodOptional<z.ZodBoolean>;
|
|
1464
|
+
durablePi: z.ZodOptional<z.ZodBoolean>;
|
|
1465
|
+
preparedLane: z.ZodOptional<z.ZodBoolean>;
|
|
1466
|
+
isolation: z.ZodOptional<z.ZodObject<{
|
|
1467
|
+
userContext: z.ZodOptional<z.ZodBoolean>;
|
|
1468
|
+
userMcpServers: z.ZodOptional<z.ZodBoolean>;
|
|
1469
|
+
sessionPersistence: z.ZodOptional<z.ZodBoolean>;
|
|
1470
|
+
}, z.core.$strip>>;
|
|
1289
1471
|
}, z.core.$strip>>;
|
|
1472
|
+
admission: z.ZodOptional<z.ZodObject<{
|
|
1473
|
+
totalMs: z.ZodNumber;
|
|
1474
|
+
agentHomeWaitMs: z.ZodOptional<z.ZodNumber>;
|
|
1475
|
+
messageHelperPreflightMs: z.ZodOptional<z.ZodNumber>;
|
|
1476
|
+
resultHelperPreflightMs: z.ZodOptional<z.ZodNumber>;
|
|
1477
|
+
toolsetProbeMs: z.ZodOptional<z.ZodNumber>;
|
|
1478
|
+
runtimeLaunchMs: z.ZodOptional<z.ZodNumber>;
|
|
1479
|
+
}, z.core.$strict>>;
|
|
1290
1480
|
}, z.core.$strip>;
|
|
1291
1481
|
export type TaskClaimPayload = z.infer<typeof TaskClaimPayloadSchema>;
|
|
1292
1482
|
/**
|
|
@@ -1296,170 +1486,16 @@ export type TaskClaimPayload = z.infer<typeof TaskClaimPayloadSchema>;
|
|
|
1296
1486
|
*/
|
|
1297
1487
|
export declare const TaskStartedPayloadSchema: z.ZodObject<{}, z.core.$strip>;
|
|
1298
1488
|
export type TaskStartedPayload = z.infer<typeof TaskStartedPayloadSchema>;
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
agentRef: z.ZodOptional<z.ZodObject<{
|
|
1310
|
-
agentId: z.ZodString;
|
|
1311
|
-
profileRevision: z.ZodString;
|
|
1312
|
-
}, z.core.$strict>>;
|
|
1313
|
-
code: z.ZodOptional<z.ZodEnum<{
|
|
1314
|
-
agent_home_reader_busy: "agent_home_reader_busy";
|
|
1315
|
-
agent_home_writer_busy: "agent_home_writer_busy";
|
|
1316
|
-
sealed_content_mac_mismatch: "sealed_content_mac_mismatch";
|
|
1317
|
-
sealed_key_unavailable: "sealed_key_unavailable";
|
|
1318
|
-
sealed_open_failed: "sealed_open_failed";
|
|
1319
|
-
sealing_policy_mismatch: "sealing_policy_mismatch";
|
|
1320
|
-
}>>;
|
|
1321
|
-
}, z.core.$strip>;
|
|
1322
|
-
export type TaskDeclinePayload = z.infer<typeof TaskDeclinePayloadSchema>;
|
|
1323
|
-
/**
|
|
1324
|
-
* daemon -> server: batch of normalized agent events.
|
|
1325
|
-
*
|
|
1326
|
-
* `events` elements are known-or-unknown (`AgentEventOrUnknownSchema` —
|
|
1327
|
-
* `agent-event.ts`), not bare `AgentEventSchema`: pre-freeze, an unrecognized
|
|
1328
|
-
* event `type` must not fail the whole batch, since a peer running a newer
|
|
1329
|
-
* minor version may have emitted an additive event variant this schema
|
|
1330
|
-
* doesn't know about yet. See `agent-event.ts` for the full rationale and
|
|
1331
|
-
* `partitionAgentEvents`/`isKnownAgentEvent` for how consumers should skip
|
|
1332
|
-
* unknowns instead of choking on them.
|
|
1333
|
-
*/
|
|
1334
|
-
export declare const TaskProgressPayloadSchema: z.ZodObject<{
|
|
1335
|
-
sealed: z.ZodOptional<z.ZodNever>;
|
|
1336
|
-
sealing: z.ZodOptional<z.ZodNever>;
|
|
1337
|
-
seq: z.ZodNumber;
|
|
1338
|
-
events: z.ZodArray<z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1339
|
-
type: z.ZodLiteral<"progress">;
|
|
1340
|
-
text: z.ZodString;
|
|
1341
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1342
|
-
type: z.ZodLiteral<"tool_use">;
|
|
1343
|
-
tool: z.ZodString;
|
|
1344
|
-
mcp: z.ZodOptional<z.ZodObject<{
|
|
1345
|
-
server: z.ZodString;
|
|
1346
|
-
tool: z.ZodString;
|
|
1347
|
-
}, z.core.$strict>>;
|
|
1348
|
-
input: z.ZodOptional<z.ZodUnknown>;
|
|
1349
|
-
toolCallId: z.ZodOptional<z.ZodString>;
|
|
1350
|
-
spill: z.ZodOptional<z.ZodObject<{
|
|
1351
|
-
field: z.ZodEnum<{
|
|
1352
|
-
input: "input";
|
|
1353
|
-
output: "output";
|
|
1354
|
-
}>;
|
|
1355
|
-
totalBytes: z.ZodNumber;
|
|
1356
|
-
omittedBytes: z.ZodNumber;
|
|
1357
|
-
contentType: z.ZodLiteral<"application/json">;
|
|
1358
|
-
blob: z.ZodOptional<z.ZodObject<{
|
|
1359
|
-
blobId: z.ZodString;
|
|
1360
|
-
contentHash: z.ZodString;
|
|
1361
|
-
size: z.ZodNumber;
|
|
1362
|
-
contentType: z.ZodString;
|
|
1363
|
-
url: z.ZodOptional<z.ZodString>;
|
|
1364
|
-
}, z.core.$strip>>;
|
|
1365
|
-
unstoredReason: z.ZodOptional<z.ZodString>;
|
|
1366
|
-
}, z.core.$strict>>;
|
|
1367
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1368
|
-
type: z.ZodLiteral<"tool_result">;
|
|
1369
|
-
tool: z.ZodString;
|
|
1370
|
-
mcp: z.ZodOptional<z.ZodObject<{
|
|
1371
|
-
server: z.ZodString;
|
|
1372
|
-
tool: z.ZodString;
|
|
1373
|
-
}, z.core.$strict>>;
|
|
1374
|
-
output: z.ZodOptional<z.ZodUnknown>;
|
|
1375
|
-
toolCallId: z.ZodOptional<z.ZodString>;
|
|
1376
|
-
isError: z.ZodOptional<z.ZodBoolean>;
|
|
1377
|
-
spill: z.ZodOptional<z.ZodObject<{
|
|
1378
|
-
field: z.ZodEnum<{
|
|
1379
|
-
input: "input";
|
|
1380
|
-
output: "output";
|
|
1381
|
-
}>;
|
|
1382
|
-
totalBytes: z.ZodNumber;
|
|
1383
|
-
omittedBytes: z.ZodNumber;
|
|
1384
|
-
contentType: z.ZodLiteral<"application/json">;
|
|
1385
|
-
blob: z.ZodOptional<z.ZodObject<{
|
|
1386
|
-
blobId: z.ZodString;
|
|
1387
|
-
contentHash: z.ZodString;
|
|
1388
|
-
size: z.ZodNumber;
|
|
1389
|
-
contentType: z.ZodString;
|
|
1390
|
-
url: z.ZodOptional<z.ZodString>;
|
|
1391
|
-
}, z.core.$strip>>;
|
|
1392
|
-
unstoredReason: z.ZodOptional<z.ZodString>;
|
|
1393
|
-
}, z.core.$strict>>;
|
|
1394
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1395
|
-
type: z.ZodLiteral<"artifact">;
|
|
1396
|
-
name: z.ZodString;
|
|
1397
|
-
contentType: z.ZodString;
|
|
1398
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1399
|
-
type: z.ZodLiteral<"needs_approval">;
|
|
1400
|
-
summary: z.ZodString;
|
|
1401
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1402
|
-
type: z.ZodLiteral<"turn_end">;
|
|
1403
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1404
|
-
type: z.ZodLiteral<"error">;
|
|
1405
|
-
message: z.ZodString;
|
|
1406
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1407
|
-
type: z.ZodLiteral<"usage">;
|
|
1408
|
-
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
1409
|
-
cachedInputTokens: z.ZodOptional<z.ZodNumber>;
|
|
1410
|
-
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
1411
|
-
reasoningTokens: z.ZodOptional<z.ZodNumber>;
|
|
1412
|
-
totalTokens: z.ZodOptional<z.ZodNumber>;
|
|
1413
|
-
contextTokens: z.ZodOptional<z.ZodNumber>;
|
|
1414
|
-
contextWindow: z.ZodOptional<z.ZodNumber>;
|
|
1415
|
-
contextSource: z.ZodOptional<z.ZodEnum<{
|
|
1416
|
-
estimate: "estimate";
|
|
1417
|
-
provider: "provider";
|
|
1418
|
-
}>>;
|
|
1419
|
-
}, z.core.$strip>], "type">, z.ZodObject<{
|
|
1420
|
-
type: z.ZodString;
|
|
1421
|
-
}, z.core.$loose>]>>;
|
|
1422
|
-
}, z.core.$strip>;
|
|
1423
|
-
export type TaskProgressPayload = z.infer<typeof TaskProgressPayloadSchema>;
|
|
1424
|
-
/** daemon -> server: an artifact produced by the task, inline or by blob ref. */
|
|
1425
|
-
export declare const TaskArtifactPayloadSchema: z.ZodObject<{
|
|
1426
|
-
sealed: z.ZodOptional<z.ZodNever>;
|
|
1427
|
-
sealing: z.ZodOptional<z.ZodNever>;
|
|
1428
|
-
name: z.ZodString;
|
|
1429
|
-
contentType: z.ZodString;
|
|
1430
|
-
inline: z.ZodOptional<z.ZodString>;
|
|
1431
|
-
blobRef: z.ZodOptional<z.ZodObject<{
|
|
1432
|
-
blobId: z.ZodString;
|
|
1433
|
-
contentHash: z.ZodString;
|
|
1434
|
-
size: z.ZodNumber;
|
|
1435
|
-
contentType: z.ZodString;
|
|
1436
|
-
url: z.ZodOptional<z.ZodString>;
|
|
1437
|
-
}, z.core.$strip>>;
|
|
1438
|
-
}, z.core.$strip>;
|
|
1439
|
-
export type TaskArtifactPayload = z.infer<typeof TaskArtifactPayloadSchema>;
|
|
1440
|
-
/**
|
|
1441
|
-
* daemon -> server: task is blocked on an out-of-band approval.
|
|
1442
|
-
*
|
|
1443
|
-
* `approvalId` (M5, additive-minor — docs/protocol.md §5.3): the daemon's own
|
|
1444
|
-
* locally-generated identity for THIS SPECIFIC pending approval
|
|
1445
|
-
* (`ApprovalRegistry`, `packages/client`'s `approvals.ts`) — included
|
|
1446
|
-
* unconditionally by an M5+ daemon, regardless of whether the connected
|
|
1447
|
-
* server has advertised the `approval-targeting` capability flag
|
|
1448
|
-
* (`version.ts`; see that flag's own doc comment for why no emission gating
|
|
1449
|
-
* is needed here — it's a tolerant `z.object()` field, so an older server
|
|
1450
|
-
* simply ignores it). Optional purely for wire tolerance with a pre-M5
|
|
1451
|
-
* daemon build that never set it at all: a server that never learns an id
|
|
1452
|
-
* for a task's current approval can't target a later `approve`/`reject`
|
|
1453
|
-
* decision and falls back to resolving "whichever approval is currently
|
|
1454
|
-
* pending" — the same behavior every server had before this field existed.
|
|
1455
|
-
*/
|
|
1456
|
-
export declare const TaskAwaitApprovalPayloadSchema: z.ZodObject<{
|
|
1457
|
-
sealed: z.ZodOptional<z.ZodNever>;
|
|
1458
|
-
sealing: z.ZodOptional<z.ZodNever>;
|
|
1459
|
-
summary: z.ZodString;
|
|
1460
|
-
approvalId: z.ZodOptional<z.ZodString>;
|
|
1461
|
-
}, z.core.$strip>;
|
|
1462
|
-
export type TaskAwaitApprovalPayload = z.infer<typeof TaskAwaitApprovalPayloadSchema>;
|
|
1489
|
+
declare const DECLINE_CODES: readonly ["agent_home_writer_busy", "agent_home_reader_busy", "sealed_key_unavailable", "sealed_open_failed", "sealed_content_mac_mismatch", "sealing_policy_mismatch"];
|
|
1490
|
+
export type TaskDeclineCode = (typeof DECLINE_CODES)[number];
|
|
1491
|
+
/** A decline code as this version understands it: one it does not know reads as `unknown`, its raw token kept. */
|
|
1492
|
+
export type TaskDeclineCodeReading = {
|
|
1493
|
+
readonly code: TaskDeclineCode;
|
|
1494
|
+
} | {
|
|
1495
|
+
readonly code: 'unknown';
|
|
1496
|
+
readonly reportedCode: string;
|
|
1497
|
+
};
|
|
1498
|
+
export declare function readDeclineCode(code: string): TaskDeclineCodeReading;
|
|
1463
1499
|
/**
|
|
1464
1500
|
* Hard cap (1 MiB) on a single `task.complete.document` (see
|
|
1465
1501
|
* {@link TaskCompletePayloadSchema}), measured as the UTF-8 byte length of
|
|
@@ -1544,7 +1580,6 @@ export declare const TERMINAL_INFERENCE_USAGE_MAX_TOKENS = 1000000000;
|
|
|
1544
1580
|
/** Maximum device-observed elapsed duration retained in one terminal observation (seven days). */
|
|
1545
1581
|
export declare const TERMINAL_INFERENCE_USAGE_MAX_DURATION_MS = 604800000;
|
|
1546
1582
|
export declare const TERMINAL_INFERENCE_USAGE_PROVIDER_MAX_LENGTH = 160;
|
|
1547
|
-
export declare const TERMINAL_INFERENCE_USAGE_MODEL_MAX_LENGTH = 160;
|
|
1548
1583
|
export declare const TERMINAL_INFERENCE_USAGE_CLIENT_VERSION_MAX_LENGTH = 128;
|
|
1549
1584
|
/**
|
|
1550
1585
|
* A bounded, non-billing observation associated with one terminal runtime
|
|
@@ -1646,86 +1681,7 @@ export declare const TerminalAgentHomeMemoryChangeSchema: z.ZodDiscriminatedUnio
|
|
|
1646
1681
|
outcome: z.ZodLiteral<"unmeasured">;
|
|
1647
1682
|
}, z.core.$strict>], "outcome">;
|
|
1648
1683
|
export type TerminalAgentHomeMemoryChange = z.infer<typeof TerminalAgentHomeMemoryChangeSchema>;
|
|
1649
|
-
/**
|
|
1650
|
-
* daemon -> server: task finished successfully.
|
|
1651
|
-
*
|
|
1652
|
-
* `document` (docs/protocol.md §7.2): the OPTIONAL
|
|
1653
|
-
* structured terminal result of the task — one JSON value the product on the
|
|
1654
|
-
* other side consumes as the task's actual output, as opposed to `summary`
|
|
1655
|
-
* (human-readable prose) or `artifactRefs` (files). Deliberately
|
|
1656
|
-
* `z.unknown()`: this SDK never understands, validates, or transforms the
|
|
1657
|
-
* product's own document schema — that validation belongs to the consumer.
|
|
1658
|
-
* The only constraints the wire imposes are the ones
|
|
1659
|
-
* {@link checkResultDocument} enforces: it must be PLAIN JSON DATA (equal to
|
|
1660
|
-
* its own JSON round trip — see that function for why "stringify succeeded"
|
|
1661
|
-
* is not enough), and its canonical JSON UTF-8 encoding must be at most
|
|
1662
|
-
* {@link RESULT_DOCUMENT_MAX_BYTES}. An over-cap document is REJECTED here,
|
|
1663
|
-
* never truncated (see that constant's own doc comment). A sender puts the
|
|
1664
|
-
* check's `canonical` snapshot on the wire, never the original object.
|
|
1665
|
-
*
|
|
1666
|
-
* Wire v3: every v3 server keeps this field, so no capability flag gates it
|
|
1667
|
-
* (the v2 `result-document` flag is gone). For a
|
|
1668
|
-
* `terminalProjection.mode: 'result-document'` offer it carries the outcome
|
|
1669
|
-
* the daemon validated against the offer's frozen schema
|
|
1670
|
-
* (`validateResultOutcome`, `result-schema.ts`, at most
|
|
1671
|
-
* `RESULT_OUTCOME_MAX_BYTES`).
|
|
1672
|
-
*/
|
|
1673
|
-
export declare const TaskCompletePayloadSchema: z.ZodObject<{
|
|
1674
|
-
sealed: z.ZodOptional<z.ZodNever>;
|
|
1675
|
-
sealing: z.ZodOptional<z.ZodNever>;
|
|
1676
|
-
harnessId: z.ZodOptional<z.ZodString>;
|
|
1677
|
-
summary: z.ZodString;
|
|
1678
|
-
finalMessage: z.ZodOptional<z.ZodString>;
|
|
1679
|
-
sessionRef: z.ZodString;
|
|
1680
|
-
artifactRefs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1681
|
-
blobId: z.ZodString;
|
|
1682
|
-
contentHash: z.ZodString;
|
|
1683
|
-
size: z.ZodNumber;
|
|
1684
|
-
contentType: z.ZodString;
|
|
1685
|
-
url: z.ZodOptional<z.ZodString>;
|
|
1686
|
-
}, z.core.$strip>>>;
|
|
1687
|
-
document: z.ZodOptional<z.ZodUnknown>;
|
|
1688
|
-
usage: z.ZodOptional<z.ZodObject<{
|
|
1689
|
-
runtime: z.ZodEnum<{
|
|
1690
|
-
claude: "claude";
|
|
1691
|
-
codex: "codex";
|
|
1692
|
-
pi: "pi";
|
|
1693
|
-
}>;
|
|
1694
|
-
provider: z.ZodOptional<z.ZodString>;
|
|
1695
|
-
model: z.ZodOptional<z.ZodString>;
|
|
1696
|
-
promptTokens: z.ZodOptional<z.ZodNumber>;
|
|
1697
|
-
completionTokens: z.ZodOptional<z.ZodNumber>;
|
|
1698
|
-
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
1699
|
-
clientVersion: z.ZodString;
|
|
1700
|
-
reportedAt: z.ZodISODateTime;
|
|
1701
|
-
}, z.core.$strip>>;
|
|
1702
|
-
preparedObservation: z.ZodOptional<z.ZodObject<{
|
|
1703
|
-
requestDigest: z.ZodString;
|
|
1704
|
-
initialPromptTokens: z.ZodNumber;
|
|
1705
|
-
maxPromptTokens: z.ZodNumber;
|
|
1706
|
-
}, z.core.$strict>>;
|
|
1707
|
-
agentRef: z.ZodOptional<z.ZodObject<{
|
|
1708
|
-
agentId: z.ZodString;
|
|
1709
|
-
profileRevision: z.ZodString;
|
|
1710
|
-
}, z.core.$strict>>;
|
|
1711
|
-
agentHomeProjection: z.ZodOptional<z.ZodObject<{
|
|
1712
|
-
profileRevision: z.ZodString;
|
|
1713
|
-
projectionHash: z.ZodString;
|
|
1714
|
-
}, z.core.$strict>>;
|
|
1715
|
-
agentHomeMemoryChange: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1716
|
-
outcome: z.ZodLiteral<"unchanged">;
|
|
1717
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1718
|
-
outcome: z.ZodLiteral<"reader-attributed">;
|
|
1719
|
-
paths: z.ZodArray<z.ZodString>;
|
|
1720
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1721
|
-
outcome: z.ZodLiteral<"unattributed">;
|
|
1722
|
-
paths: z.ZodArray<z.ZodString>;
|
|
1723
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1724
|
-
outcome: z.ZodLiteral<"unmeasured">;
|
|
1725
|
-
}, z.core.$strict>], "outcome">>;
|
|
1726
|
-
}, z.core.$strip>;
|
|
1727
|
-
export type TaskCompletePayload = z.infer<typeof TaskCompletePayloadSchema>;
|
|
1728
|
-
/** A closed runtime failure class (#869). `unknown` means the runtime gave no structured evidence. */
|
|
1684
|
+
/** A runtime failure class this version knows (#869). `unknown` means the runtime gave no structured evidence. */
|
|
1729
1685
|
export declare const RuntimeFailureClassSchema: z.ZodEnum<{
|
|
1730
1686
|
auth: "auth";
|
|
1731
1687
|
billing: "billing";
|
|
@@ -1746,6 +1702,11 @@ export type RuntimeFailureClass = z.infer<typeof RuntimeFailureClassSchema>;
|
|
|
1746
1702
|
* The machine-readable failure of a `task.fail` (#869); `reason` stays display
|
|
1747
1703
|
* text. `resetsAt` (ISO 8601 UTC) exists only on `quota`, and only when the
|
|
1748
1704
|
* runtime reported when the limit resets.
|
|
1705
|
+
*
|
|
1706
|
+
* The class is open (#1121): a well-formed class this version does not know,
|
|
1707
|
+
* with whatever fields a newer device put beside it, is accepted and kept
|
|
1708
|
+
* verbatim, so the terminal is still recorded. {@link readTaskFailure} is the
|
|
1709
|
+
* typed reading.
|
|
1749
1710
|
*/
|
|
1750
1711
|
export declare const TaskFailureSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
1751
1712
|
class: z.ZodLiteral<"quota">;
|
|
@@ -1765,158 +1726,30 @@ export declare const TaskFailureSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1765
1726
|
runtime_exited: "runtime_exited";
|
|
1766
1727
|
unknown: "unknown";
|
|
1767
1728
|
}>;
|
|
1768
|
-
}, z.core.$strict
|
|
1729
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1730
|
+
class: z.ZodString;
|
|
1731
|
+
}, z.core.$loose>]>;
|
|
1769
1732
|
export type TaskFailure = z.infer<typeof TaskFailureSchema>;
|
|
1770
|
-
/**
|
|
1771
|
-
export
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
failure: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
1782
|
-
class: z.ZodLiteral<"quota">;
|
|
1783
|
-
resetsAt: z.ZodOptional<z.ZodISODateTime>;
|
|
1784
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1785
|
-
class: z.ZodEnum<{
|
|
1786
|
-
auth: "auth";
|
|
1787
|
-
billing: "billing";
|
|
1788
|
-
input_too_large: "input_too_large";
|
|
1789
|
-
invalid_request: "invalid_request";
|
|
1790
|
-
limit_reached: "limit_reached";
|
|
1791
|
-
model_unavailable: "model_unavailable";
|
|
1792
|
-
output_schema: "output_schema";
|
|
1793
|
-
overloaded: "overloaded";
|
|
1794
|
-
provider: "provider";
|
|
1795
|
-
rate_limited: "rate_limited";
|
|
1796
|
-
runtime_exited: "runtime_exited";
|
|
1797
|
-
unknown: "unknown";
|
|
1798
|
-
}>;
|
|
1799
|
-
}, z.core.$strict>]>>;
|
|
1800
|
-
usage: z.ZodOptional<z.ZodObject<{
|
|
1801
|
-
runtime: z.ZodEnum<{
|
|
1802
|
-
claude: "claude";
|
|
1803
|
-
codex: "codex";
|
|
1804
|
-
pi: "pi";
|
|
1805
|
-
}>;
|
|
1806
|
-
provider: z.ZodOptional<z.ZodString>;
|
|
1807
|
-
model: z.ZodOptional<z.ZodString>;
|
|
1808
|
-
promptTokens: z.ZodOptional<z.ZodNumber>;
|
|
1809
|
-
completionTokens: z.ZodOptional<z.ZodNumber>;
|
|
1810
|
-
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
1811
|
-
clientVersion: z.ZodString;
|
|
1812
|
-
reportedAt: z.ZodISODateTime;
|
|
1813
|
-
}, z.core.$strip>>;
|
|
1814
|
-
preparedObservation: z.ZodOptional<z.ZodObject<{
|
|
1815
|
-
requestDigest: z.ZodString;
|
|
1816
|
-
initialPromptTokens: z.ZodNumber;
|
|
1817
|
-
maxPromptTokens: z.ZodNumber;
|
|
1818
|
-
}, z.core.$strict>>;
|
|
1819
|
-
agentRef: z.ZodOptional<z.ZodObject<{
|
|
1820
|
-
agentId: z.ZodString;
|
|
1821
|
-
profileRevision: z.ZodString;
|
|
1822
|
-
}, z.core.$strict>>;
|
|
1823
|
-
agentHomeProjection: z.ZodOptional<z.ZodObject<{
|
|
1824
|
-
profileRevision: z.ZodString;
|
|
1825
|
-
projectionHash: z.ZodString;
|
|
1826
|
-
}, z.core.$strict>>;
|
|
1827
|
-
agentHomeMemoryChange: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1828
|
-
outcome: z.ZodLiteral<"unchanged">;
|
|
1829
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1830
|
-
outcome: z.ZodLiteral<"reader-attributed">;
|
|
1831
|
-
paths: z.ZodArray<z.ZodString>;
|
|
1832
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1833
|
-
outcome: z.ZodLiteral<"unattributed">;
|
|
1834
|
-
paths: z.ZodArray<z.ZodString>;
|
|
1835
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1836
|
-
outcome: z.ZodLiteral<"unmeasured">;
|
|
1837
|
-
}, z.core.$strict>], "outcome">>;
|
|
1838
|
-
}, z.core.$strip>;
|
|
1839
|
-
export type TaskFailPayload = z.infer<typeof TaskFailPayloadSchema>;
|
|
1733
|
+
/** A {@link TaskFailure} as this version understands it: a class it does not know reads as `unknown`, its raw token kept. */
|
|
1734
|
+
export type TaskFailureReading = {
|
|
1735
|
+
readonly class: 'quota';
|
|
1736
|
+
readonly resetsAt?: string;
|
|
1737
|
+
} | {
|
|
1738
|
+
readonly class: Exclude<RuntimeFailureClass, 'quota' | 'unknown'>;
|
|
1739
|
+
} | {
|
|
1740
|
+
readonly class: 'unknown';
|
|
1741
|
+
readonly reportedClass?: string;
|
|
1742
|
+
};
|
|
1743
|
+
export declare function readTaskFailure(failure: TaskFailure): TaskFailureReading;
|
|
1840
1744
|
/**
|
|
1841
|
-
* daemon -> server:
|
|
1842
|
-
*
|
|
1843
|
-
*
|
|
1844
|
-
*
|
|
1845
|
-
*
|
|
1846
|
-
*
|
|
1847
|
-
*
|
|
1848
|
-
*
|
|
1849
|
-
* `Cancelled` is semantically distinct from `Failed`: one is an intentional
|
|
1850
|
-
* stop, the other an error. Overloading `task.fail` with a magic
|
|
1851
|
-
* `reason: 'cancelled'` string convention hid that distinction on the wire.
|
|
1852
|
-
*
|
|
1853
|
-
* Dual-purpose on receipt: if the server already moved its own record to
|
|
1854
|
-
* `Cancelled` (it initiated the cancel — M1 gap #3's "server state is
|
|
1855
|
-
* authoritative" rule), this is an idempotent no-op ack. If the server
|
|
1856
|
-
* hasn't yet (a locally-observed cancellation), this is the authoritative
|
|
1857
|
-
* trigger that moves `Claimed`/`Running`/`AwaitApproval -> Cancelled`.
|
|
1858
|
-
*/
|
|
1859
|
-
export declare const TaskCancelledPayloadSchema: z.ZodObject<{
|
|
1860
|
-
sealed: z.ZodOptional<z.ZodNever>;
|
|
1861
|
-
sealing: z.ZodOptional<z.ZodNever>;
|
|
1862
|
-
harnessId: z.ZodOptional<z.ZodString>;
|
|
1863
|
-
reason: z.ZodOptional<z.ZodString>;
|
|
1864
|
-
usage: z.ZodOptional<z.ZodObject<{
|
|
1865
|
-
runtime: z.ZodEnum<{
|
|
1866
|
-
claude: "claude";
|
|
1867
|
-
codex: "codex";
|
|
1868
|
-
pi: "pi";
|
|
1869
|
-
}>;
|
|
1870
|
-
provider: z.ZodOptional<z.ZodString>;
|
|
1871
|
-
model: z.ZodOptional<z.ZodString>;
|
|
1872
|
-
promptTokens: z.ZodOptional<z.ZodNumber>;
|
|
1873
|
-
completionTokens: z.ZodOptional<z.ZodNumber>;
|
|
1874
|
-
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
1875
|
-
clientVersion: z.ZodString;
|
|
1876
|
-
reportedAt: z.ZodISODateTime;
|
|
1877
|
-
}, z.core.$strip>>;
|
|
1878
|
-
agentRef: z.ZodOptional<z.ZodObject<{
|
|
1879
|
-
agentId: z.ZodString;
|
|
1880
|
-
profileRevision: z.ZodString;
|
|
1881
|
-
}, z.core.$strict>>;
|
|
1882
|
-
agentHomeProjection: z.ZodOptional<z.ZodObject<{
|
|
1883
|
-
profileRevision: z.ZodString;
|
|
1884
|
-
projectionHash: z.ZodString;
|
|
1885
|
-
}, z.core.$strict>>;
|
|
1886
|
-
agentHomeMemoryChange: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1887
|
-
outcome: z.ZodLiteral<"unchanged">;
|
|
1888
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1889
|
-
outcome: z.ZodLiteral<"reader-attributed">;
|
|
1890
|
-
paths: z.ZodArray<z.ZodString>;
|
|
1891
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1892
|
-
outcome: z.ZodLiteral<"unattributed">;
|
|
1893
|
-
paths: z.ZodArray<z.ZodString>;
|
|
1894
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1895
|
-
outcome: z.ZodLiteral<"unmeasured">;
|
|
1896
|
-
}, z.core.$strict>], "outcome">>;
|
|
1897
|
-
}, z.core.$strip>;
|
|
1898
|
-
export type TaskCancelledPayload = z.infer<typeof TaskCancelledPayloadSchema>;
|
|
1899
|
-
/**
|
|
1900
|
-
* daemon -> server: a pending `task.await_approval` was resolved entirely
|
|
1901
|
-
* LOCALLY on the device — the local control-socket `approvals.resolve` RPC,
|
|
1902
|
-
* a fail-closed `requestApproval` timeout, or a fail-closed eviction/finish
|
|
1903
|
-
* rejection (see `packages/client`'s `task-runner.ts`/`approvals.ts`) —
|
|
1904
|
-
* *without* a wire `task.approve`/`task.reject` ever having been exchanged
|
|
1905
|
-
* for it. This is the additive-minor answer to a gap the M4 Phase 3 approval
|
|
1906
|
-
* work left open (see the "Deferred additive candidate" note this schema
|
|
1907
|
-
* resolves, `docs/protocol.md`): today the server only learns of a local
|
|
1908
|
-
* resolution IMPLICITLY, after the fact, once the daemon's next
|
|
1909
|
-
* `task.progress`/`task.artifact`/`task.complete` proves the task already
|
|
1910
|
-
* moved on (the `relay.onTaskActivity` hook in
|
|
1911
|
-
* `packages/server/src/index.ts`) — a window in which a SaaS-side
|
|
1912
|
-
* `TaskHandle.approve()`/`.reject()` can independently decide (and win) the
|
|
1913
|
-
* server's own authoritative record before that evidence ever arrives. This
|
|
1914
|
-
* message lets the daemon report the local resolution explicitly and
|
|
1915
|
-
* immediately, narrowing that window from "until the next progress message"
|
|
1916
|
-
* down to ordinary network latency; the implicit-inference path stays as-is,
|
|
1917
|
-
* unconditionally, as the compatibility fallback for an old server that
|
|
1918
|
-
* never advertises the `approval_resolved` capability flag (`version.ts`) or
|
|
1919
|
-
* an old daemon that predates this message entirely.
|
|
1745
|
+
* daemon -> server: a pending `task.await_approval` was resolved entirely
|
|
1746
|
+
* LOCALLY on the device — the local control-socket `approvals.resolve` RPC,
|
|
1747
|
+
* a fail-closed `requestApproval` timeout, or a fail-closed eviction/finish
|
|
1748
|
+
* rejection (see `packages/client`'s `task-runner.ts`/`approvals.ts`) —
|
|
1749
|
+
* *without* a wire `task.approve`/`task.reject` ever having been exchanged
|
|
1750
|
+
* for it. Baseline since v4: the daemon reports every local resolution, and
|
|
1751
|
+
* this report is the server's only source for one; the server does not infer
|
|
1752
|
+
* a resolution from later task activity.
|
|
1920
1753
|
*
|
|
1921
1754
|
* Observability-class tolerance applies (not control/security — see the
|
|
1922
1755
|
* freeze rule's asymmetry, `docs/protocol.md`): this is a daemon reporting
|
|
@@ -1927,10 +1760,8 @@ export type TaskCancelledPayload = z.infer<typeof TaskCancelledPayloadSchema>;
|
|
|
1927
1760
|
* non-control payload in this file.
|
|
1928
1761
|
*
|
|
1929
1762
|
* `resolvedBy` is a single-value enum (`'local'`) rather than a bare string:
|
|
1930
|
-
*
|
|
1931
|
-
*
|
|
1932
|
-
* same as a new message type or capability flag), while still being a closed,
|
|
1933
|
-
* typed shape today rather than an open string a typo could silently widen.
|
|
1763
|
+
* a later wave could add a DISTINCT value as a gated addition, while the
|
|
1764
|
+
* shape stays closed and typed today.
|
|
1934
1765
|
*/
|
|
1935
1766
|
export declare const TaskApprovalResolvedPayloadSchema: z.ZodObject<{
|
|
1936
1767
|
approvalId: z.ZodString;
|
|
@@ -1944,64 +1775,14 @@ export declare const TaskApprovalResolvedPayloadSchema: z.ZodObject<{
|
|
|
1944
1775
|
at: z.ZodISODateTime;
|
|
1945
1776
|
}, z.core.$strip>;
|
|
1946
1777
|
export type TaskApprovalResolvedPayload = z.infer<typeof TaskApprovalResolvedPayloadSchema>;
|
|
1947
|
-
/**
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1956
|
-
lane: z.ZodLiteral<"subscription">;
|
|
1957
|
-
runtimeId: z.ZodEnum<{
|
|
1958
|
-
claude: "claude";
|
|
1959
|
-
codex: "codex";
|
|
1960
|
-
}>;
|
|
1961
|
-
providerId: z.ZodNull;
|
|
1962
|
-
modelId: z.ZodString;
|
|
1963
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1964
|
-
lane: z.ZodLiteral<"byok">;
|
|
1965
|
-
runtimeId: z.ZodLiteral<"pi">;
|
|
1966
|
-
providerId: z.ZodString;
|
|
1967
|
-
modelId: z.ZodString;
|
|
1968
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1969
|
-
lane: z.ZodLiteral<"byok-profile">;
|
|
1970
|
-
runtimeId: z.ZodLiteral<"pi">;
|
|
1971
|
-
providerProfile: z.ZodObject<{
|
|
1972
|
-
profileRef: z.ZodString;
|
|
1973
|
-
profileRevision: z.ZodString;
|
|
1974
|
-
profileHash: z.ZodString;
|
|
1975
|
-
modelId: z.ZodString;
|
|
1976
|
-
requiredCapabilities: z.ZodArray<z.ZodEnum<{
|
|
1977
|
-
"image-input": "image-input";
|
|
1978
|
-
}>>;
|
|
1979
|
-
}, z.core.$strict>;
|
|
1980
|
-
}, z.core.$strict>], "lane">>;
|
|
1981
|
-
sessionRef: z.ZodOptional<z.ZodString>;
|
|
1982
|
-
workspaceHint: z.ZodOptional<z.ZodString>;
|
|
1983
|
-
limits: z.ZodOptional<z.ZodObject<{
|
|
1984
|
-
maxDurationMs: z.ZodOptional<z.ZodNumber>;
|
|
1985
|
-
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
1986
|
-
}, z.core.$strip>>;
|
|
1987
|
-
instruction: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1988
|
-
blobRef: z.ZodObject<{
|
|
1989
|
-
blobId: z.ZodString;
|
|
1990
|
-
contentHash: z.ZodString;
|
|
1991
|
-
size: z.ZodNumber;
|
|
1992
|
-
contentType: z.ZodString;
|
|
1993
|
-
url: z.ZodOptional<z.ZodString>;
|
|
1994
|
-
}, z.core.$strip>;
|
|
1995
|
-
}, z.core.$strict>]>>;
|
|
1996
|
-
sealing: z.ZodObject<{
|
|
1997
|
-
scopeId: z.ZodString;
|
|
1998
|
-
epoch: z.ZodNumber;
|
|
1999
|
-
categories: z.ZodArray<z.ZodEnum<{
|
|
2000
|
-
"task-input": "task-input";
|
|
2001
|
-
"task-output": "task-output";
|
|
2002
|
-
}>>;
|
|
2003
|
-
}, z.core.$strict>;
|
|
2004
|
-
sealed: z.ZodOptional<z.ZodObject<{
|
|
1778
|
+
/**
|
|
1779
|
+
* server -> daemon: sealed steering text. `steerId` names this steer in the
|
|
1780
|
+
* AAD and the content MAC, so the Host cannot replay an earlier steer of the
|
|
1781
|
+
* same task as a new one.
|
|
1782
|
+
*/
|
|
1783
|
+
export declare const TaskSteerSealedPayloadSchema: z.ZodObject<{
|
|
1784
|
+
steerId: z.ZodUUID;
|
|
1785
|
+
sealed: z.ZodObject<{
|
|
2005
1786
|
v: z.ZodLiteral<1>;
|
|
2006
1787
|
suite: z.ZodLiteral<"byok-sealed-v1.hkdf-sha256.aes-256-gcm">;
|
|
2007
1788
|
category: z.ZodLiteral<"task-input">;
|
|
@@ -2026,71 +1807,55 @@ export declare const TaskOfferSealedPayloadSchema: z.ZodObject<{
|
|
|
2026
1807
|
size: z.ZodNumber;
|
|
2027
1808
|
contentType: z.ZodString;
|
|
2028
1809
|
}, z.core.$strict>>;
|
|
2029
|
-
}, z.core.$strict
|
|
1810
|
+
}, z.core.$strict>;
|
|
2030
1811
|
}, z.core.$strict>;
|
|
2031
|
-
export type
|
|
2032
|
-
/**
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
1812
|
+
export type TaskSteerSealedPayload = z.infer<typeof TaskSteerSealedPayloadSchema>;
|
|
1813
|
+
/**
|
|
1814
|
+
* daemon -> server: `task.complete` of a sealed task. `summary`,
|
|
1815
|
+
* `finalMessage` and `document` are sealed. `artifactRefs` and
|
|
1816
|
+
* `preparedObservation` are not carried in v1.
|
|
1817
|
+
*/
|
|
1818
|
+
export declare const TaskCompleteSealedPayloadSchema: z.ZodObject<{
|
|
1819
|
+
sealing: z.ZodOptional<z.ZodNever>;
|
|
2039
1820
|
harnessId: z.ZodOptional<z.ZodString>;
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
1821
|
+
sessionRef: z.ZodString;
|
|
1822
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
1823
|
+
runtime: z.ZodEnum<{
|
|
2043
1824
|
claude: "claude";
|
|
2044
1825
|
codex: "codex";
|
|
1826
|
+
pi: "pi";
|
|
2045
1827
|
}>;
|
|
2046
|
-
|
|
2047
|
-
|
|
1828
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
1829
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1830
|
+
promptTokens: z.ZodOptional<z.ZodNumber>;
|
|
1831
|
+
completionTokens: z.ZodOptional<z.ZodNumber>;
|
|
1832
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
1833
|
+
clientVersion: z.ZodString;
|
|
1834
|
+
reportedAt: z.ZodISODateTime;
|
|
1835
|
+
}, z.core.$strip>>;
|
|
1836
|
+
agentRef: z.ZodOptional<z.ZodObject<{
|
|
1837
|
+
agentId: z.ZodString;
|
|
1838
|
+
profileRevision: z.ZodString;
|
|
1839
|
+
}, z.core.$strict>>;
|
|
1840
|
+
agentHomeProjection: z.ZodOptional<z.ZodObject<{
|
|
1841
|
+
profileRevision: z.ZodString;
|
|
1842
|
+
projectionHash: z.ZodString;
|
|
1843
|
+
}, z.core.$strict>>;
|
|
1844
|
+
agentHomeMemoryChange: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1845
|
+
outcome: z.ZodLiteral<"unchanged">;
|
|
2048
1846
|
}, z.core.$strict>, z.ZodObject<{
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
providerId: z.ZodString;
|
|
2052
|
-
modelId: z.ZodString;
|
|
1847
|
+
outcome: z.ZodLiteral<"reader-attributed">;
|
|
1848
|
+
paths: z.ZodArray<z.ZodString>;
|
|
2053
1849
|
}, z.core.$strict>, z.ZodObject<{
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
modelId: z.ZodString;
|
|
2061
|
-
requiredCapabilities: z.ZodArray<z.ZodEnum<{
|
|
2062
|
-
"image-input": "image-input";
|
|
2063
|
-
}>>;
|
|
2064
|
-
}, z.core.$strict>;
|
|
2065
|
-
}, z.core.$strict>], "lane">>;
|
|
2066
|
-
sessionRef: z.ZodOptional<z.ZodString>;
|
|
2067
|
-
workspaceHint: z.ZodOptional<z.ZodString>;
|
|
2068
|
-
limits: z.ZodOptional<z.ZodObject<{
|
|
2069
|
-
maxDurationMs: z.ZodOptional<z.ZodNumber>;
|
|
2070
|
-
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
2071
|
-
}, z.core.$strip>>;
|
|
2072
|
-
requiredToolsets: z.ZodArray<z.ZodString>;
|
|
2073
|
-
instruction: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
2074
|
-
blobRef: z.ZodObject<{
|
|
2075
|
-
blobId: z.ZodString;
|
|
2076
|
-
contentHash: z.ZodString;
|
|
2077
|
-
size: z.ZodNumber;
|
|
2078
|
-
contentType: z.ZodString;
|
|
2079
|
-
url: z.ZodOptional<z.ZodString>;
|
|
2080
|
-
}, z.core.$strip>;
|
|
2081
|
-
}, z.core.$strict>]>>;
|
|
2082
|
-
sealing: z.ZodObject<{
|
|
2083
|
-
scopeId: z.ZodString;
|
|
2084
|
-
epoch: z.ZodNumber;
|
|
2085
|
-
categories: z.ZodArray<z.ZodEnum<{
|
|
2086
|
-
"task-input": "task-input";
|
|
2087
|
-
"task-output": "task-output";
|
|
2088
|
-
}>>;
|
|
2089
|
-
}, z.core.$strict>;
|
|
2090
|
-
sealed: z.ZodOptional<z.ZodObject<{
|
|
1850
|
+
outcome: z.ZodLiteral<"unattributed">;
|
|
1851
|
+
paths: z.ZodArray<z.ZodString>;
|
|
1852
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1853
|
+
outcome: z.ZodLiteral<"unmeasured">;
|
|
1854
|
+
}, z.core.$strict>], "outcome">>;
|
|
1855
|
+
sealed: z.ZodObject<{
|
|
2091
1856
|
v: z.ZodLiteral<1>;
|
|
2092
1857
|
suite: z.ZodLiteral<"byok-sealed-v1.hkdf-sha256.aes-256-gcm">;
|
|
2093
|
-
category: z.ZodLiteral<"task-
|
|
1858
|
+
category: z.ZodLiteral<"task-output">;
|
|
2094
1859
|
scope: z.ZodObject<{
|
|
2095
1860
|
id: z.ZodString;
|
|
2096
1861
|
epoch: z.ZodNumber;
|
|
@@ -2112,89 +1877,145 @@ export declare const TaskOfferWithToolsetsSealedPayloadSchema: z.ZodObject<{
|
|
|
2112
1877
|
size: z.ZodNumber;
|
|
2113
1878
|
contentType: z.ZodString;
|
|
2114
1879
|
}, z.core.$strict>>;
|
|
2115
|
-
}, z.core.$strict>>;
|
|
2116
|
-
}, z.core.$strict>;
|
|
2117
|
-
export type TaskOfferWithToolsetsSealedPayload = z.infer<typeof TaskOfferWithToolsetsSealedPayloadSchema>;
|
|
2118
|
-
/** server -> daemon: `task.offer_for_agent` of a sealed task. */
|
|
2119
|
-
export declare const TaskOfferForAgentSealedPayloadSchema: z.ZodObject<{
|
|
2120
|
-
agentRef: z.ZodObject<{
|
|
2121
|
-
agentId: z.ZodString;
|
|
2122
|
-
profileRevision: z.ZodString;
|
|
2123
1880
|
}, z.core.$strict>;
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
runtime: z.ZodOptional<z.ZodEnum<{
|
|
2134
|
-
claude: "claude";
|
|
2135
|
-
codex: "codex";
|
|
2136
|
-
pi: "pi";
|
|
2137
|
-
}>>;
|
|
1881
|
+
}, z.core.$strict>;
|
|
1882
|
+
export type TaskCompleteSealedPayload = z.infer<typeof TaskCompleteSealedPayloadSchema>;
|
|
1883
|
+
/** daemon -> server: `task.fail` of a sealed task. `reason` is sealed; `preparedObservation` is not carried in v1. */
|
|
1884
|
+
export declare const TaskFailSealedPayloadSchema: z.ZodObject<{
|
|
1885
|
+
sealing: z.ZodOptional<z.ZodNever>;
|
|
1886
|
+
recovery: z.ZodOptional<z.ZodObject<{
|
|
1887
|
+
kind: z.ZodLiteral<"daemon_interrupted">;
|
|
1888
|
+
offerId: z.ZodUUID;
|
|
1889
|
+
}, z.core.$strict>>;
|
|
2138
1890
|
harnessId: z.ZodOptional<z.ZodString>;
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
1891
|
+
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
1892
|
+
failure: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
1893
|
+
class: z.ZodLiteral<"quota">;
|
|
1894
|
+
resetsAt: z.ZodOptional<z.ZodISODateTime>;
|
|
1895
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1896
|
+
class: z.ZodEnum<{
|
|
1897
|
+
auth: "auth";
|
|
1898
|
+
billing: "billing";
|
|
1899
|
+
input_too_large: "input_too_large";
|
|
1900
|
+
invalid_request: "invalid_request";
|
|
1901
|
+
limit_reached: "limit_reached";
|
|
1902
|
+
model_unavailable: "model_unavailable";
|
|
1903
|
+
output_schema: "output_schema";
|
|
1904
|
+
overloaded: "overloaded";
|
|
1905
|
+
provider: "provider";
|
|
1906
|
+
rate_limited: "rate_limited";
|
|
1907
|
+
runtime_exited: "runtime_exited";
|
|
1908
|
+
unknown: "unknown";
|
|
2144
1909
|
}>;
|
|
2145
|
-
providerId: z.ZodNull;
|
|
2146
|
-
modelId: z.ZodString;
|
|
2147
1910
|
}, z.core.$strict>, z.ZodObject<{
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
1911
|
+
class: z.ZodString;
|
|
1912
|
+
}, z.core.$loose>]>>;
|
|
1913
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
1914
|
+
runtime: z.ZodEnum<{
|
|
1915
|
+
claude: "claude";
|
|
1916
|
+
codex: "codex";
|
|
1917
|
+
pi: "pi";
|
|
1918
|
+
}>;
|
|
1919
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
1920
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1921
|
+
promptTokens: z.ZodOptional<z.ZodNumber>;
|
|
1922
|
+
completionTokens: z.ZodOptional<z.ZodNumber>;
|
|
1923
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
1924
|
+
clientVersion: z.ZodString;
|
|
1925
|
+
reportedAt: z.ZodISODateTime;
|
|
1926
|
+
}, z.core.$strip>>;
|
|
1927
|
+
agentRef: z.ZodOptional<z.ZodObject<{
|
|
1928
|
+
agentId: z.ZodString;
|
|
1929
|
+
profileRevision: z.ZodString;
|
|
1930
|
+
}, z.core.$strict>>;
|
|
1931
|
+
agentHomeProjection: z.ZodOptional<z.ZodObject<{
|
|
1932
|
+
profileRevision: z.ZodString;
|
|
1933
|
+
projectionHash: z.ZodString;
|
|
1934
|
+
}, z.core.$strict>>;
|
|
1935
|
+
agentHomeMemoryChange: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1936
|
+
outcome: z.ZodLiteral<"unchanged">;
|
|
2152
1937
|
}, z.core.$strict>, z.ZodObject<{
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
providerProfile: z.ZodObject<{
|
|
2156
|
-
profileRef: z.ZodString;
|
|
2157
|
-
profileRevision: z.ZodString;
|
|
2158
|
-
profileHash: z.ZodString;
|
|
2159
|
-
modelId: z.ZodString;
|
|
2160
|
-
requiredCapabilities: z.ZodArray<z.ZodEnum<{
|
|
2161
|
-
"image-input": "image-input";
|
|
2162
|
-
}>>;
|
|
2163
|
-
}, z.core.$strict>;
|
|
2164
|
-
}, z.core.$strict>], "lane">>;
|
|
2165
|
-
terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2166
|
-
mode: z.ZodLiteral<"none">;
|
|
1938
|
+
outcome: z.ZodLiteral<"reader-attributed">;
|
|
1939
|
+
paths: z.ZodArray<z.ZodString>;
|
|
2167
1940
|
}, z.core.$strict>, z.ZodObject<{
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
1941
|
+
outcome: z.ZodLiteral<"unattributed">;
|
|
1942
|
+
paths: z.ZodArray<z.ZodString>;
|
|
1943
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1944
|
+
outcome: z.ZodLiteral<"unmeasured">;
|
|
1945
|
+
}, z.core.$strict>], "outcome">>;
|
|
1946
|
+
sealed: z.ZodObject<{
|
|
1947
|
+
v: z.ZodLiteral<1>;
|
|
1948
|
+
suite: z.ZodLiteral<"byok-sealed-v1.hkdf-sha256.aes-256-gcm">;
|
|
1949
|
+
category: z.ZodLiteral<"task-output">;
|
|
1950
|
+
scope: z.ZodObject<{
|
|
1951
|
+
id: z.ZodString;
|
|
1952
|
+
epoch: z.ZodNumber;
|
|
1953
|
+
keyId: z.ZodString;
|
|
1954
|
+
}, z.core.$strict>;
|
|
1955
|
+
chainHead: z.ZodObject<{
|
|
1956
|
+
seq: z.ZodNumber;
|
|
1957
|
+
hash: z.ZodString;
|
|
1958
|
+
}, z.core.$strict>;
|
|
1959
|
+
sender: z.ZodString;
|
|
1960
|
+
salt: z.ZodString;
|
|
1961
|
+
nonce: z.ZodString;
|
|
1962
|
+
paddedLength: z.ZodNumber;
|
|
1963
|
+
contentMac: z.ZodString;
|
|
1964
|
+
ciphertext: z.ZodOptional<z.ZodString>;
|
|
1965
|
+
ciphertextRef: z.ZodOptional<z.ZodObject<{
|
|
2179
1966
|
blobId: z.ZodString;
|
|
2180
1967
|
contentHash: z.ZodString;
|
|
2181
1968
|
size: z.ZodNumber;
|
|
2182
1969
|
contentType: z.ZodString;
|
|
2183
|
-
|
|
2184
|
-
}, z.core.$strip>;
|
|
2185
|
-
}, z.core.$strict>]>>;
|
|
2186
|
-
sealing: z.ZodObject<{
|
|
2187
|
-
scopeId: z.ZodString;
|
|
2188
|
-
epoch: z.ZodNumber;
|
|
2189
|
-
categories: z.ZodArray<z.ZodEnum<{
|
|
2190
|
-
"task-input": "task-input";
|
|
2191
|
-
"task-output": "task-output";
|
|
2192
|
-
}>>;
|
|
1970
|
+
}, z.core.$strict>>;
|
|
2193
1971
|
}, z.core.$strict>;
|
|
2194
|
-
|
|
1972
|
+
}, z.core.$strict>;
|
|
1973
|
+
export type TaskFailSealedPayload = z.infer<typeof TaskFailSealedPayloadSchema>;
|
|
1974
|
+
/**
|
|
1975
|
+
* daemon -> server: `task.decline` of a sealed task with a sealed `reason`.
|
|
1976
|
+
* The sealed decline codes go only on the plaintext branch: a device that
|
|
1977
|
+
* cannot open or use the scope key often cannot seal a reply either.
|
|
1978
|
+
*/
|
|
1979
|
+
export declare const TaskDeclineSealedPayloadSchema: z.ZodObject<{
|
|
1980
|
+
sealing: z.ZodOptional<z.ZodNever>;
|
|
1981
|
+
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
1982
|
+
agentRef: z.ZodOptional<z.ZodObject<{
|
|
1983
|
+
agentId: z.ZodString;
|
|
1984
|
+
profileRevision: z.ZodString;
|
|
1985
|
+
}, z.core.$strict>>;
|
|
1986
|
+
runtimeUnavailable: z.ZodOptional<z.ZodObject<{
|
|
1987
|
+
cause: z.ZodUnion<readonly [z.ZodEnum<{
|
|
1988
|
+
acp_unavailable: "acp_unavailable";
|
|
1989
|
+
app_server_unavailable: "app_server_unavailable";
|
|
1990
|
+
environment_unavailable: "environment_unavailable";
|
|
1991
|
+
none_available: "none_available";
|
|
1992
|
+
not_executable: "not_executable";
|
|
1993
|
+
not_installed: "not_installed";
|
|
1994
|
+
platform_unsupported: "platform_unsupported";
|
|
1995
|
+
probe_failed: "probe_failed";
|
|
1996
|
+
probe_timeout: "probe_timeout";
|
|
1997
|
+
runtime_not_allowed: "runtime_not_allowed";
|
|
1998
|
+
runtime_not_configured: "runtime_not_configured";
|
|
1999
|
+
version_blocked: "version_blocked";
|
|
2000
|
+
}>, z.ZodString]>;
|
|
2001
|
+
code: z.ZodOptional<z.ZodString>;
|
|
2002
|
+
}, z.core.$strip>>;
|
|
2003
|
+
admission: z.ZodOptional<z.ZodObject<{
|
|
2004
|
+
totalMs: z.ZodNumber;
|
|
2005
|
+
agentHomeWaitMs: z.ZodOptional<z.ZodNumber>;
|
|
2006
|
+
messageHelperPreflightMs: z.ZodOptional<z.ZodNumber>;
|
|
2007
|
+
resultHelperPreflightMs: z.ZodOptional<z.ZodNumber>;
|
|
2008
|
+
toolsetProbeMs: z.ZodOptional<z.ZodNumber>;
|
|
2009
|
+
runtimeLaunchMs: z.ZodOptional<z.ZodNumber>;
|
|
2010
|
+
}, z.core.$strict>>;
|
|
2011
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2012
|
+
agent_home_reader_busy: "agent_home_reader_busy";
|
|
2013
|
+
agent_home_writer_busy: "agent_home_writer_busy";
|
|
2014
|
+
}>, z.ZodString]>>;
|
|
2015
|
+
sealed: z.ZodObject<{
|
|
2195
2016
|
v: z.ZodLiteral<1>;
|
|
2196
2017
|
suite: z.ZodLiteral<"byok-sealed-v1.hkdf-sha256.aes-256-gcm">;
|
|
2197
|
-
category: z.ZodLiteral<"task-
|
|
2018
|
+
category: z.ZodLiteral<"task-output">;
|
|
2198
2019
|
scope: z.ZodObject<{
|
|
2199
2020
|
id: z.ZodString;
|
|
2200
2021
|
epoch: z.ZodNumber;
|
|
@@ -2216,125 +2037,455 @@ export declare const TaskOfferForAgentSealedPayloadSchema: z.ZodObject<{
|
|
|
2216
2037
|
size: z.ZodNumber;
|
|
2217
2038
|
contentType: z.ZodString;
|
|
2218
2039
|
}, z.core.$strict>>;
|
|
2219
|
-
}, z.core.$strict>>;
|
|
2220
|
-
}, z.core.$strict>;
|
|
2221
|
-
export type TaskOfferForAgentSealedPayload = z.infer<typeof TaskOfferForAgentSealedPayloadSchema>;
|
|
2222
|
-
/** server -> daemon: `task.offer_for_agent_with_egress` of a sealed task. */
|
|
2223
|
-
export declare const TaskOfferForAgentWithEgressSealedPayloadSchema: z.ZodObject<{
|
|
2224
|
-
agentRef: z.ZodObject<{
|
|
2225
|
-
agentId: z.ZodString;
|
|
2226
|
-
profileRevision: z.ZodString;
|
|
2227
2040
|
}, z.core.$strict>;
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
"read-write": "read-write";
|
|
2234
|
-
"read-write-if-admitted": "read-write-if-admitted";
|
|
2235
|
-
}>>;
|
|
2236
|
-
requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2237
|
-
runtime: z.ZodOptional<z.ZodEnum<{
|
|
2238
|
-
claude: "claude";
|
|
2239
|
-
codex: "codex";
|
|
2240
|
-
pi: "pi";
|
|
2241
|
-
}>>;
|
|
2041
|
+
}, z.core.$strict>;
|
|
2042
|
+
export type TaskDeclineSealedPayload = z.infer<typeof TaskDeclineSealedPayloadSchema>;
|
|
2043
|
+
/** daemon -> server: `task.cancelled` of a sealed task. `reason` is sealed. */
|
|
2044
|
+
export declare const TaskCancelledSealedPayloadSchema: z.ZodObject<{
|
|
2045
|
+
sealing: z.ZodOptional<z.ZodNever>;
|
|
2242
2046
|
harnessId: z.ZodOptional<z.ZodString>;
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
runtimeId: z.ZodEnum<{
|
|
2047
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
2048
|
+
runtime: z.ZodEnum<{
|
|
2246
2049
|
claude: "claude";
|
|
2247
2050
|
codex: "codex";
|
|
2051
|
+
pi: "pi";
|
|
2248
2052
|
}>;
|
|
2249
|
-
|
|
2250
|
-
|
|
2053
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
2054
|
+
model: z.ZodOptional<z.ZodString>;
|
|
2055
|
+
promptTokens: z.ZodOptional<z.ZodNumber>;
|
|
2056
|
+
completionTokens: z.ZodOptional<z.ZodNumber>;
|
|
2057
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
2058
|
+
clientVersion: z.ZodString;
|
|
2059
|
+
reportedAt: z.ZodISODateTime;
|
|
2060
|
+
}, z.core.$strip>>;
|
|
2061
|
+
agentRef: z.ZodOptional<z.ZodObject<{
|
|
2062
|
+
agentId: z.ZodString;
|
|
2063
|
+
profileRevision: z.ZodString;
|
|
2064
|
+
}, z.core.$strict>>;
|
|
2065
|
+
agentHomeProjection: z.ZodOptional<z.ZodObject<{
|
|
2066
|
+
profileRevision: z.ZodString;
|
|
2067
|
+
projectionHash: z.ZodString;
|
|
2068
|
+
}, z.core.$strict>>;
|
|
2069
|
+
agentHomeMemoryChange: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2070
|
+
outcome: z.ZodLiteral<"unchanged">;
|
|
2251
2071
|
}, z.core.$strict>, z.ZodObject<{
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
providerId: z.ZodString;
|
|
2255
|
-
modelId: z.ZodString;
|
|
2072
|
+
outcome: z.ZodLiteral<"reader-attributed">;
|
|
2073
|
+
paths: z.ZodArray<z.ZodString>;
|
|
2256
2074
|
}, z.core.$strict>, z.ZodObject<{
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
providerProfile: z.ZodObject<{
|
|
2260
|
-
profileRef: z.ZodString;
|
|
2261
|
-
profileRevision: z.ZodString;
|
|
2262
|
-
profileHash: z.ZodString;
|
|
2263
|
-
modelId: z.ZodString;
|
|
2264
|
-
requiredCapabilities: z.ZodArray<z.ZodEnum<{
|
|
2265
|
-
"image-input": "image-input";
|
|
2266
|
-
}>>;
|
|
2267
|
-
}, z.core.$strict>;
|
|
2268
|
-
}, z.core.$strict>], "lane">>;
|
|
2269
|
-
terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2270
|
-
mode: z.ZodLiteral<"none">;
|
|
2075
|
+
outcome: z.ZodLiteral<"unattributed">;
|
|
2076
|
+
paths: z.ZodArray<z.ZodString>;
|
|
2271
2077
|
}, z.core.$strict>, z.ZodObject<{
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
policyRevision: z.ZodString;
|
|
2283
|
-
activity: z.ZodObject<{
|
|
2284
|
-
delivery: z.ZodLiteral<"latest-value">;
|
|
2285
|
-
maxCoalesceMs: z.ZodNumber;
|
|
2286
|
-
maxEventBytes: z.ZodNumber;
|
|
2287
|
-
}, z.core.$strict>;
|
|
2288
|
-
reliable: z.ZodObject<{
|
|
2289
|
-
maxPendingEventsPerAgent: z.ZodNumber;
|
|
2290
|
-
maxPendingBytesPerAgent: z.ZodNumber;
|
|
2291
|
-
maxPendingBytesPerTenant: z.ZodNumber;
|
|
2078
|
+
outcome: z.ZodLiteral<"unmeasured">;
|
|
2079
|
+
}, z.core.$strict>], "outcome">>;
|
|
2080
|
+
sealed: z.ZodObject<{
|
|
2081
|
+
v: z.ZodLiteral<1>;
|
|
2082
|
+
suite: z.ZodLiteral<"byok-sealed-v1.hkdf-sha256.aes-256-gcm">;
|
|
2083
|
+
category: z.ZodLiteral<"task-output">;
|
|
2084
|
+
scope: z.ZodObject<{
|
|
2085
|
+
id: z.ZodString;
|
|
2086
|
+
epoch: z.ZodNumber;
|
|
2087
|
+
keyId: z.ZodString;
|
|
2292
2088
|
}, z.core.$strict>;
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
allowedMimeTypes: z.ZodArray<z.ZodString>;
|
|
2297
|
-
}, z.core.$strict>]>;
|
|
2298
|
-
transcript: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
|
|
2299
|
-
maxBytes: z.ZodNumber;
|
|
2300
|
-
allowedMimeTypes: z.ZodArray<z.ZodString>;
|
|
2301
|
-
}, z.core.$strict>]>;
|
|
2302
|
-
artifact: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
|
|
2303
|
-
maxBytes: z.ZodNumber;
|
|
2304
|
-
allowedMimeTypes: z.ZodArray<z.ZodString>;
|
|
2305
|
-
}, z.core.$strict>]>;
|
|
2089
|
+
chainHead: z.ZodObject<{
|
|
2090
|
+
seq: z.ZodNumber;
|
|
2091
|
+
hash: z.ZodString;
|
|
2306
2092
|
}, z.core.$strict>;
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
}>;
|
|
2315
|
-
maxBytes: z.ZodNumber;
|
|
2316
|
-
}, z.core.$strict>>;
|
|
2317
|
-
instruction: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
2318
|
-
blobRef: z.ZodObject<{
|
|
2093
|
+
sender: z.ZodString;
|
|
2094
|
+
salt: z.ZodString;
|
|
2095
|
+
nonce: z.ZodString;
|
|
2096
|
+
paddedLength: z.ZodNumber;
|
|
2097
|
+
contentMac: z.ZodString;
|
|
2098
|
+
ciphertext: z.ZodOptional<z.ZodString>;
|
|
2099
|
+
ciphertextRef: z.ZodOptional<z.ZodObject<{
|
|
2319
2100
|
blobId: z.ZodString;
|
|
2320
2101
|
contentHash: z.ZodString;
|
|
2321
2102
|
size: z.ZodNumber;
|
|
2322
2103
|
contentType: z.ZodString;
|
|
2323
|
-
|
|
2324
|
-
}, z.core.$strip>;
|
|
2325
|
-
}, z.core.$strict>]>>;
|
|
2326
|
-
sealing: z.ZodObject<{
|
|
2327
|
-
scopeId: z.ZodString;
|
|
2328
|
-
epoch: z.ZodNumber;
|
|
2329
|
-
categories: z.ZodArray<z.ZodEnum<{
|
|
2330
|
-
"task-input": "task-input";
|
|
2331
|
-
"task-output": "task-output";
|
|
2332
|
-
}>>;
|
|
2104
|
+
}, z.core.$strict>>;
|
|
2333
2105
|
}, z.core.$strict>;
|
|
2334
|
-
|
|
2106
|
+
}, z.core.$strict>;
|
|
2107
|
+
export type TaskCancelledSealedPayload = z.infer<typeof TaskCancelledSealedPayloadSchema>;
|
|
2108
|
+
/** daemon -> server: `task.progress` of a sealed task. `events` is sealed; `seq` names the batch. */
|
|
2109
|
+
export declare const TaskProgressSealedPayloadSchema: z.ZodObject<{
|
|
2110
|
+
sealing: z.ZodOptional<z.ZodNever>;
|
|
2111
|
+
seq: z.ZodNumber;
|
|
2112
|
+
sealed: z.ZodObject<{
|
|
2113
|
+
v: z.ZodLiteral<1>;
|
|
2114
|
+
suite: z.ZodLiteral<"byok-sealed-v1.hkdf-sha256.aes-256-gcm">;
|
|
2115
|
+
category: z.ZodLiteral<"task-output">;
|
|
2116
|
+
scope: z.ZodObject<{
|
|
2117
|
+
id: z.ZodString;
|
|
2118
|
+
epoch: z.ZodNumber;
|
|
2119
|
+
keyId: z.ZodString;
|
|
2120
|
+
}, z.core.$strict>;
|
|
2121
|
+
chainHead: z.ZodObject<{
|
|
2122
|
+
seq: z.ZodNumber;
|
|
2123
|
+
hash: z.ZodString;
|
|
2124
|
+
}, z.core.$strict>;
|
|
2125
|
+
sender: z.ZodString;
|
|
2126
|
+
salt: z.ZodString;
|
|
2127
|
+
nonce: z.ZodString;
|
|
2128
|
+
paddedLength: z.ZodNumber;
|
|
2129
|
+
contentMac: z.ZodString;
|
|
2130
|
+
ciphertext: z.ZodOptional<z.ZodString>;
|
|
2131
|
+
ciphertextRef: z.ZodOptional<z.ZodObject<{
|
|
2132
|
+
blobId: z.ZodString;
|
|
2133
|
+
contentHash: z.ZodString;
|
|
2134
|
+
size: z.ZodNumber;
|
|
2135
|
+
contentType: z.ZodString;
|
|
2136
|
+
}, z.core.$strict>>;
|
|
2137
|
+
}, z.core.$strict>;
|
|
2138
|
+
}, z.core.$strict>;
|
|
2139
|
+
export type TaskProgressSealedPayload = z.infer<typeof TaskProgressSealedPayloadSchema>;
|
|
2140
|
+
/**
|
|
2141
|
+
* daemon -> server: an inline artifact of a sealed task. `inline` is sealed; a
|
|
2142
|
+
* blob artifact is not carried in v1. `artifactId` names the write in the AAD
|
|
2143
|
+
* and the content MAC, because two artifacts of one task may share a `name`.
|
|
2144
|
+
*/
|
|
2145
|
+
export declare const TaskArtifactSealedPayloadSchema: z.ZodObject<{
|
|
2146
|
+
sealing: z.ZodOptional<z.ZodNever>;
|
|
2147
|
+
name: z.ZodString;
|
|
2148
|
+
contentType: z.ZodString;
|
|
2149
|
+
artifactId: z.ZodUUID;
|
|
2150
|
+
sealed: z.ZodObject<{
|
|
2151
|
+
v: z.ZodLiteral<1>;
|
|
2152
|
+
suite: z.ZodLiteral<"byok-sealed-v1.hkdf-sha256.aes-256-gcm">;
|
|
2153
|
+
category: z.ZodLiteral<"task-output">;
|
|
2154
|
+
scope: z.ZodObject<{
|
|
2155
|
+
id: z.ZodString;
|
|
2156
|
+
epoch: z.ZodNumber;
|
|
2157
|
+
keyId: z.ZodString;
|
|
2158
|
+
}, z.core.$strict>;
|
|
2159
|
+
chainHead: z.ZodObject<{
|
|
2160
|
+
seq: z.ZodNumber;
|
|
2161
|
+
hash: z.ZodString;
|
|
2162
|
+
}, z.core.$strict>;
|
|
2163
|
+
sender: z.ZodString;
|
|
2164
|
+
salt: z.ZodString;
|
|
2165
|
+
nonce: z.ZodString;
|
|
2166
|
+
paddedLength: z.ZodNumber;
|
|
2167
|
+
contentMac: z.ZodString;
|
|
2168
|
+
ciphertext: z.ZodOptional<z.ZodString>;
|
|
2169
|
+
ciphertextRef: z.ZodOptional<z.ZodObject<{
|
|
2170
|
+
blobId: z.ZodString;
|
|
2171
|
+
contentHash: z.ZodString;
|
|
2172
|
+
size: z.ZodNumber;
|
|
2173
|
+
contentType: z.ZodString;
|
|
2174
|
+
}, z.core.$strict>>;
|
|
2175
|
+
}, z.core.$strict>;
|
|
2176
|
+
}, z.core.$strict>;
|
|
2177
|
+
export type TaskArtifactSealedPayload = z.infer<typeof TaskArtifactSealedPayloadSchema>;
|
|
2178
|
+
/** daemon -> server: `task.await_approval` of a sealed task. `summary` is sealed; `approvalId` is required. */
|
|
2179
|
+
export declare const TaskAwaitApprovalSealedPayloadSchema: z.ZodObject<{
|
|
2180
|
+
sealing: z.ZodOptional<z.ZodNever>;
|
|
2181
|
+
approvalId: z.ZodString;
|
|
2182
|
+
sealed: z.ZodObject<{
|
|
2183
|
+
v: z.ZodLiteral<1>;
|
|
2184
|
+
suite: z.ZodLiteral<"byok-sealed-v1.hkdf-sha256.aes-256-gcm">;
|
|
2185
|
+
category: z.ZodLiteral<"task-output">;
|
|
2186
|
+
scope: z.ZodObject<{
|
|
2187
|
+
id: z.ZodString;
|
|
2188
|
+
epoch: z.ZodNumber;
|
|
2189
|
+
keyId: z.ZodString;
|
|
2190
|
+
}, z.core.$strict>;
|
|
2191
|
+
chainHead: z.ZodObject<{
|
|
2192
|
+
seq: z.ZodNumber;
|
|
2193
|
+
hash: z.ZodString;
|
|
2194
|
+
}, z.core.$strict>;
|
|
2195
|
+
sender: z.ZodString;
|
|
2196
|
+
salt: z.ZodString;
|
|
2197
|
+
nonce: z.ZodString;
|
|
2198
|
+
paddedLength: z.ZodNumber;
|
|
2199
|
+
contentMac: z.ZodString;
|
|
2200
|
+
ciphertext: z.ZodOptional<z.ZodString>;
|
|
2201
|
+
ciphertextRef: z.ZodOptional<z.ZodObject<{
|
|
2202
|
+
blobId: z.ZodString;
|
|
2203
|
+
contentHash: z.ZodString;
|
|
2204
|
+
size: z.ZodNumber;
|
|
2205
|
+
contentType: z.ZodString;
|
|
2206
|
+
}, z.core.$strict>>;
|
|
2207
|
+
}, z.core.$strict>;
|
|
2208
|
+
}, z.core.$strict>;
|
|
2209
|
+
export type TaskAwaitApprovalSealedPayload = z.infer<typeof TaskAwaitApprovalSealedPayloadSchema>;
|
|
2210
|
+
export declare const TaskSteerPayloadSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
2211
|
+
sealed: z.ZodOptional<z.ZodNever>;
|
|
2212
|
+
sealing: z.ZodOptional<z.ZodNever>;
|
|
2213
|
+
text: z.ZodString;
|
|
2214
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2215
|
+
steerId: z.ZodUUID;
|
|
2216
|
+
sealed: z.ZodObject<{
|
|
2217
|
+
v: z.ZodLiteral<1>;
|
|
2218
|
+
suite: z.ZodLiteral<"byok-sealed-v1.hkdf-sha256.aes-256-gcm">;
|
|
2219
|
+
category: z.ZodLiteral<"task-input">;
|
|
2220
|
+
scope: z.ZodObject<{
|
|
2221
|
+
id: z.ZodString;
|
|
2222
|
+
epoch: z.ZodNumber;
|
|
2223
|
+
keyId: z.ZodString;
|
|
2224
|
+
}, z.core.$strict>;
|
|
2225
|
+
chainHead: z.ZodObject<{
|
|
2226
|
+
seq: z.ZodNumber;
|
|
2227
|
+
hash: z.ZodString;
|
|
2228
|
+
}, z.core.$strict>;
|
|
2229
|
+
sender: z.ZodString;
|
|
2230
|
+
salt: z.ZodString;
|
|
2231
|
+
nonce: z.ZodString;
|
|
2232
|
+
paddedLength: z.ZodNumber;
|
|
2233
|
+
contentMac: z.ZodString;
|
|
2234
|
+
ciphertext: z.ZodOptional<z.ZodString>;
|
|
2235
|
+
ciphertextRef: z.ZodOptional<z.ZodObject<{
|
|
2236
|
+
blobId: z.ZodString;
|
|
2237
|
+
contentHash: z.ZodString;
|
|
2238
|
+
size: z.ZodNumber;
|
|
2239
|
+
contentType: z.ZodString;
|
|
2240
|
+
}, z.core.$strict>>;
|
|
2241
|
+
}, z.core.$strict>;
|
|
2242
|
+
}, z.core.$strict>]>;
|
|
2243
|
+
export type TaskSteerPayload = z.infer<typeof TaskSteerPayloadSchema>;
|
|
2244
|
+
export declare const TaskDeclinePayloadSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
2245
|
+
sealed: z.ZodOptional<z.ZodNever>;
|
|
2246
|
+
sealing: z.ZodOptional<z.ZodNever>;
|
|
2247
|
+
reason: z.ZodString;
|
|
2248
|
+
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
2249
|
+
agentRef: z.ZodOptional<z.ZodObject<{
|
|
2250
|
+
agentId: z.ZodString;
|
|
2251
|
+
profileRevision: z.ZodString;
|
|
2252
|
+
}, z.core.$strict>>;
|
|
2253
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2254
|
+
agent_home_reader_busy: "agent_home_reader_busy";
|
|
2255
|
+
agent_home_writer_busy: "agent_home_writer_busy";
|
|
2256
|
+
sealed_content_mac_mismatch: "sealed_content_mac_mismatch";
|
|
2257
|
+
sealed_key_unavailable: "sealed_key_unavailable";
|
|
2258
|
+
sealed_open_failed: "sealed_open_failed";
|
|
2259
|
+
sealing_policy_mismatch: "sealing_policy_mismatch";
|
|
2260
|
+
}>, z.ZodString]>>;
|
|
2261
|
+
runtimeUnavailable: z.ZodOptional<z.ZodObject<{
|
|
2262
|
+
cause: z.ZodUnion<readonly [z.ZodEnum<{
|
|
2263
|
+
acp_unavailable: "acp_unavailable";
|
|
2264
|
+
app_server_unavailable: "app_server_unavailable";
|
|
2265
|
+
environment_unavailable: "environment_unavailable";
|
|
2266
|
+
none_available: "none_available";
|
|
2267
|
+
not_executable: "not_executable";
|
|
2268
|
+
not_installed: "not_installed";
|
|
2269
|
+
platform_unsupported: "platform_unsupported";
|
|
2270
|
+
probe_failed: "probe_failed";
|
|
2271
|
+
probe_timeout: "probe_timeout";
|
|
2272
|
+
runtime_not_allowed: "runtime_not_allowed";
|
|
2273
|
+
runtime_not_configured: "runtime_not_configured";
|
|
2274
|
+
version_blocked: "version_blocked";
|
|
2275
|
+
}>, z.ZodString]>;
|
|
2276
|
+
code: z.ZodOptional<z.ZodString>;
|
|
2277
|
+
}, z.core.$strip>>;
|
|
2278
|
+
admission: z.ZodOptional<z.ZodObject<{
|
|
2279
|
+
totalMs: z.ZodNumber;
|
|
2280
|
+
agentHomeWaitMs: z.ZodOptional<z.ZodNumber>;
|
|
2281
|
+
messageHelperPreflightMs: z.ZodOptional<z.ZodNumber>;
|
|
2282
|
+
resultHelperPreflightMs: z.ZodOptional<z.ZodNumber>;
|
|
2283
|
+
toolsetProbeMs: z.ZodOptional<z.ZodNumber>;
|
|
2284
|
+
runtimeLaunchMs: z.ZodOptional<z.ZodNumber>;
|
|
2285
|
+
}, z.core.$strict>>;
|
|
2286
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2287
|
+
sealing: z.ZodOptional<z.ZodNever>;
|
|
2288
|
+
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
2289
|
+
agentRef: z.ZodOptional<z.ZodObject<{
|
|
2290
|
+
agentId: z.ZodString;
|
|
2291
|
+
profileRevision: z.ZodString;
|
|
2292
|
+
}, z.core.$strict>>;
|
|
2293
|
+
runtimeUnavailable: z.ZodOptional<z.ZodObject<{
|
|
2294
|
+
cause: z.ZodUnion<readonly [z.ZodEnum<{
|
|
2295
|
+
acp_unavailable: "acp_unavailable";
|
|
2296
|
+
app_server_unavailable: "app_server_unavailable";
|
|
2297
|
+
environment_unavailable: "environment_unavailable";
|
|
2298
|
+
none_available: "none_available";
|
|
2299
|
+
not_executable: "not_executable";
|
|
2300
|
+
not_installed: "not_installed";
|
|
2301
|
+
platform_unsupported: "platform_unsupported";
|
|
2302
|
+
probe_failed: "probe_failed";
|
|
2303
|
+
probe_timeout: "probe_timeout";
|
|
2304
|
+
runtime_not_allowed: "runtime_not_allowed";
|
|
2305
|
+
runtime_not_configured: "runtime_not_configured";
|
|
2306
|
+
version_blocked: "version_blocked";
|
|
2307
|
+
}>, z.ZodString]>;
|
|
2308
|
+
code: z.ZodOptional<z.ZodString>;
|
|
2309
|
+
}, z.core.$strip>>;
|
|
2310
|
+
admission: z.ZodOptional<z.ZodObject<{
|
|
2311
|
+
totalMs: z.ZodNumber;
|
|
2312
|
+
agentHomeWaitMs: z.ZodOptional<z.ZodNumber>;
|
|
2313
|
+
messageHelperPreflightMs: z.ZodOptional<z.ZodNumber>;
|
|
2314
|
+
resultHelperPreflightMs: z.ZodOptional<z.ZodNumber>;
|
|
2315
|
+
toolsetProbeMs: z.ZodOptional<z.ZodNumber>;
|
|
2316
|
+
runtimeLaunchMs: z.ZodOptional<z.ZodNumber>;
|
|
2317
|
+
}, z.core.$strict>>;
|
|
2318
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2319
|
+
agent_home_reader_busy: "agent_home_reader_busy";
|
|
2320
|
+
agent_home_writer_busy: "agent_home_writer_busy";
|
|
2321
|
+
}>, z.ZodString]>>;
|
|
2322
|
+
sealed: z.ZodObject<{
|
|
2323
|
+
v: z.ZodLiteral<1>;
|
|
2324
|
+
suite: z.ZodLiteral<"byok-sealed-v1.hkdf-sha256.aes-256-gcm">;
|
|
2325
|
+
category: z.ZodLiteral<"task-output">;
|
|
2326
|
+
scope: z.ZodObject<{
|
|
2327
|
+
id: z.ZodString;
|
|
2328
|
+
epoch: z.ZodNumber;
|
|
2329
|
+
keyId: z.ZodString;
|
|
2330
|
+
}, z.core.$strict>;
|
|
2331
|
+
chainHead: z.ZodObject<{
|
|
2332
|
+
seq: z.ZodNumber;
|
|
2333
|
+
hash: z.ZodString;
|
|
2334
|
+
}, z.core.$strict>;
|
|
2335
|
+
sender: z.ZodString;
|
|
2336
|
+
salt: z.ZodString;
|
|
2337
|
+
nonce: z.ZodString;
|
|
2338
|
+
paddedLength: z.ZodNumber;
|
|
2339
|
+
contentMac: z.ZodString;
|
|
2340
|
+
ciphertext: z.ZodOptional<z.ZodString>;
|
|
2341
|
+
ciphertextRef: z.ZodOptional<z.ZodObject<{
|
|
2342
|
+
blobId: z.ZodString;
|
|
2343
|
+
contentHash: z.ZodString;
|
|
2344
|
+
size: z.ZodNumber;
|
|
2345
|
+
contentType: z.ZodString;
|
|
2346
|
+
}, z.core.$strict>>;
|
|
2347
|
+
}, z.core.$strict>;
|
|
2348
|
+
}, z.core.$strict>]>;
|
|
2349
|
+
export type TaskDeclinePayload = z.infer<typeof TaskDeclinePayloadSchema>;
|
|
2350
|
+
export declare const TaskProgressPayloadSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
2351
|
+
sealed: z.ZodOptional<z.ZodNever>;
|
|
2352
|
+
sealing: z.ZodOptional<z.ZodNever>;
|
|
2353
|
+
seq: z.ZodNumber;
|
|
2354
|
+
events: z.ZodArray<z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2355
|
+
type: z.ZodLiteral<"progress">;
|
|
2356
|
+
text: z.ZodString;
|
|
2357
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2358
|
+
type: z.ZodLiteral<"tool_use">;
|
|
2359
|
+
tool: z.ZodString;
|
|
2360
|
+
mcp: z.ZodOptional<z.ZodObject<{
|
|
2361
|
+
server: z.ZodString;
|
|
2362
|
+
tool: z.ZodString;
|
|
2363
|
+
}, z.core.$strict>>;
|
|
2364
|
+
input: z.ZodOptional<z.ZodUnknown>;
|
|
2365
|
+
toolCallId: z.ZodOptional<z.ZodString>;
|
|
2366
|
+
spill: z.ZodOptional<z.ZodObject<{
|
|
2367
|
+
field: z.ZodEnum<{
|
|
2368
|
+
input: "input";
|
|
2369
|
+
output: "output";
|
|
2370
|
+
}>;
|
|
2371
|
+
totalBytes: z.ZodNumber;
|
|
2372
|
+
omittedBytes: z.ZodNumber;
|
|
2373
|
+
contentType: z.ZodLiteral<"application/json">;
|
|
2374
|
+
blob: z.ZodOptional<z.ZodObject<{
|
|
2375
|
+
blobId: z.ZodString;
|
|
2376
|
+
contentHash: z.ZodString;
|
|
2377
|
+
size: z.ZodNumber;
|
|
2378
|
+
contentType: z.ZodString;
|
|
2379
|
+
url: z.ZodOptional<z.ZodString>;
|
|
2380
|
+
}, z.core.$strip>>;
|
|
2381
|
+
unstoredReason: z.ZodOptional<z.ZodString>;
|
|
2382
|
+
}, z.core.$strict>>;
|
|
2383
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2384
|
+
type: z.ZodLiteral<"tool_result">;
|
|
2385
|
+
tool: z.ZodString;
|
|
2386
|
+
mcp: z.ZodOptional<z.ZodObject<{
|
|
2387
|
+
server: z.ZodString;
|
|
2388
|
+
tool: z.ZodString;
|
|
2389
|
+
}, z.core.$strict>>;
|
|
2390
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
2391
|
+
toolCallId: z.ZodOptional<z.ZodString>;
|
|
2392
|
+
isError: z.ZodOptional<z.ZodBoolean>;
|
|
2393
|
+
spill: z.ZodOptional<z.ZodObject<{
|
|
2394
|
+
field: z.ZodEnum<{
|
|
2395
|
+
input: "input";
|
|
2396
|
+
output: "output";
|
|
2397
|
+
}>;
|
|
2398
|
+
totalBytes: z.ZodNumber;
|
|
2399
|
+
omittedBytes: z.ZodNumber;
|
|
2400
|
+
contentType: z.ZodLiteral<"application/json">;
|
|
2401
|
+
blob: z.ZodOptional<z.ZodObject<{
|
|
2402
|
+
blobId: z.ZodString;
|
|
2403
|
+
contentHash: z.ZodString;
|
|
2404
|
+
size: z.ZodNumber;
|
|
2405
|
+
contentType: z.ZodString;
|
|
2406
|
+
url: z.ZodOptional<z.ZodString>;
|
|
2407
|
+
}, z.core.$strip>>;
|
|
2408
|
+
unstoredReason: z.ZodOptional<z.ZodString>;
|
|
2409
|
+
}, z.core.$strict>>;
|
|
2410
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2411
|
+
type: z.ZodLiteral<"artifact">;
|
|
2412
|
+
name: z.ZodString;
|
|
2413
|
+
contentType: z.ZodString;
|
|
2414
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2415
|
+
type: z.ZodLiteral<"turn_end">;
|
|
2416
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2417
|
+
type: z.ZodLiteral<"error">;
|
|
2418
|
+
message: z.ZodString;
|
|
2419
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2420
|
+
type: z.ZodLiteral<"usage">;
|
|
2421
|
+
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
2422
|
+
cachedInputTokens: z.ZodOptional<z.ZodNumber>;
|
|
2423
|
+
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
2424
|
+
reasoningTokens: z.ZodOptional<z.ZodNumber>;
|
|
2425
|
+
totalTokens: z.ZodOptional<z.ZodNumber>;
|
|
2426
|
+
contextTokens: z.ZodOptional<z.ZodNumber>;
|
|
2427
|
+
contextWindow: z.ZodOptional<z.ZodNumber>;
|
|
2428
|
+
contextSource: z.ZodOptional<z.ZodEnum<{
|
|
2429
|
+
estimate: "estimate";
|
|
2430
|
+
provider: "provider";
|
|
2431
|
+
}>>;
|
|
2432
|
+
model: z.ZodOptional<z.ZodString>;
|
|
2433
|
+
}, z.core.$strip>], "type">, z.ZodObject<{
|
|
2434
|
+
type: z.ZodString;
|
|
2435
|
+
}, z.core.$loose>]>>;
|
|
2436
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2437
|
+
sealing: z.ZodOptional<z.ZodNever>;
|
|
2438
|
+
seq: z.ZodNumber;
|
|
2439
|
+
sealed: z.ZodObject<{
|
|
2440
|
+
v: z.ZodLiteral<1>;
|
|
2441
|
+
suite: z.ZodLiteral<"byok-sealed-v1.hkdf-sha256.aes-256-gcm">;
|
|
2442
|
+
category: z.ZodLiteral<"task-output">;
|
|
2443
|
+
scope: z.ZodObject<{
|
|
2444
|
+
id: z.ZodString;
|
|
2445
|
+
epoch: z.ZodNumber;
|
|
2446
|
+
keyId: z.ZodString;
|
|
2447
|
+
}, z.core.$strict>;
|
|
2448
|
+
chainHead: z.ZodObject<{
|
|
2449
|
+
seq: z.ZodNumber;
|
|
2450
|
+
hash: z.ZodString;
|
|
2451
|
+
}, z.core.$strict>;
|
|
2452
|
+
sender: z.ZodString;
|
|
2453
|
+
salt: z.ZodString;
|
|
2454
|
+
nonce: z.ZodString;
|
|
2455
|
+
paddedLength: z.ZodNumber;
|
|
2456
|
+
contentMac: z.ZodString;
|
|
2457
|
+
ciphertext: z.ZodOptional<z.ZodString>;
|
|
2458
|
+
ciphertextRef: z.ZodOptional<z.ZodObject<{
|
|
2459
|
+
blobId: z.ZodString;
|
|
2460
|
+
contentHash: z.ZodString;
|
|
2461
|
+
size: z.ZodNumber;
|
|
2462
|
+
contentType: z.ZodString;
|
|
2463
|
+
}, z.core.$strict>>;
|
|
2464
|
+
}, z.core.$strict>;
|
|
2465
|
+
}, z.core.$strict>]>;
|
|
2466
|
+
export type TaskProgressPayload = z.infer<typeof TaskProgressPayloadSchema>;
|
|
2467
|
+
export declare const TaskArtifactPayloadSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
2468
|
+
sealed: z.ZodOptional<z.ZodNever>;
|
|
2469
|
+
sealing: z.ZodOptional<z.ZodNever>;
|
|
2470
|
+
name: z.ZodString;
|
|
2471
|
+
contentType: z.ZodString;
|
|
2472
|
+
inline: z.ZodOptional<z.ZodString>;
|
|
2473
|
+
blobRef: z.ZodOptional<z.ZodObject<{
|
|
2474
|
+
blobId: z.ZodString;
|
|
2475
|
+
contentHash: z.ZodString;
|
|
2476
|
+
size: z.ZodNumber;
|
|
2477
|
+
contentType: z.ZodString;
|
|
2478
|
+
url: z.ZodOptional<z.ZodString>;
|
|
2479
|
+
}, z.core.$strip>>;
|
|
2480
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2481
|
+
sealing: z.ZodOptional<z.ZodNever>;
|
|
2482
|
+
name: z.ZodString;
|
|
2483
|
+
contentType: z.ZodString;
|
|
2484
|
+
artifactId: z.ZodUUID;
|
|
2485
|
+
sealed: z.ZodObject<{
|
|
2335
2486
|
v: z.ZodLiteral<1>;
|
|
2336
2487
|
suite: z.ZodLiteral<"byok-sealed-v1.hkdf-sha256.aes-256-gcm">;
|
|
2337
|
-
category: z.ZodLiteral<"task-
|
|
2488
|
+
category: z.ZodLiteral<"task-output">;
|
|
2338
2489
|
scope: z.ZodObject<{
|
|
2339
2490
|
id: z.ZodString;
|
|
2340
2491
|
epoch: z.ZodNumber;
|
|
@@ -2356,127 +2507,21 @@ export declare const TaskOfferForAgentWithEgressSealedPayloadSchema: z.ZodObject
|
|
|
2356
2507
|
size: z.ZodNumber;
|
|
2357
2508
|
contentType: z.ZodString;
|
|
2358
2509
|
}, z.core.$strict>>;
|
|
2359
|
-
}, z.core.$strict>>;
|
|
2360
|
-
}, z.core.$strict>;
|
|
2361
|
-
export type TaskOfferForAgentWithEgressSealedPayload = z.infer<typeof TaskOfferForAgentWithEgressSealedPayloadSchema>;
|
|
2362
|
-
/**
|
|
2363
|
-
* server -> daemon: `task.offer_for_agent_with_egress_fresh` of a sealed task.
|
|
2364
|
-
* Only this type takes `routineRef`: a routine occurrence is an execution.
|
|
2365
|
-
*/
|
|
2366
|
-
export declare const TaskOfferForAgentWithEgressFreshSealedPayloadSchema: z.ZodObject<{
|
|
2367
|
-
agentRef: z.ZodObject<{
|
|
2368
|
-
agentId: z.ZodString;
|
|
2369
|
-
profileRevision: z.ZodString;
|
|
2370
|
-
}, z.core.$strict>;
|
|
2371
|
-
homeAccess: z.ZodOptional<z.ZodLiteral<"memory-reader">>;
|
|
2372
|
-
agentMemory: z.ZodOptional<z.ZodEnum<{
|
|
2373
|
-
none: "none";
|
|
2374
|
-
read: "read";
|
|
2375
|
-
"read-if-admitted": "read-if-admitted";
|
|
2376
|
-
"read-write": "read-write";
|
|
2377
|
-
"read-write-if-admitted": "read-write-if-admitted";
|
|
2378
|
-
}>>;
|
|
2379
|
-
requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2380
|
-
runtime: z.ZodOptional<z.ZodEnum<{
|
|
2381
|
-
claude: "claude";
|
|
2382
|
-
codex: "codex";
|
|
2383
|
-
pi: "pi";
|
|
2384
|
-
}>>;
|
|
2385
|
-
harnessId: z.ZodOptional<z.ZodString>;
|
|
2386
|
-
dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2387
|
-
lane: z.ZodLiteral<"subscription">;
|
|
2388
|
-
runtimeId: z.ZodEnum<{
|
|
2389
|
-
claude: "claude";
|
|
2390
|
-
codex: "codex";
|
|
2391
|
-
}>;
|
|
2392
|
-
providerId: z.ZodNull;
|
|
2393
|
-
modelId: z.ZodString;
|
|
2394
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
2395
|
-
lane: z.ZodLiteral<"byok">;
|
|
2396
|
-
runtimeId: z.ZodLiteral<"pi">;
|
|
2397
|
-
providerId: z.ZodString;
|
|
2398
|
-
modelId: z.ZodString;
|
|
2399
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
2400
|
-
lane: z.ZodLiteral<"byok-profile">;
|
|
2401
|
-
runtimeId: z.ZodLiteral<"pi">;
|
|
2402
|
-
providerProfile: z.ZodObject<{
|
|
2403
|
-
profileRef: z.ZodString;
|
|
2404
|
-
profileRevision: z.ZodString;
|
|
2405
|
-
profileHash: z.ZodString;
|
|
2406
|
-
modelId: z.ZodString;
|
|
2407
|
-
requiredCapabilities: z.ZodArray<z.ZodEnum<{
|
|
2408
|
-
"image-input": "image-input";
|
|
2409
|
-
}>>;
|
|
2410
|
-
}, z.core.$strict>;
|
|
2411
|
-
}, z.core.$strict>], "lane">>;
|
|
2412
|
-
terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2413
|
-
mode: z.ZodLiteral<"none">;
|
|
2414
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
2415
|
-
mode: z.ZodLiteral<"result-document">;
|
|
2416
|
-
contract: z.ZodString;
|
|
2417
|
-
schema: z.ZodCustom<import("./result-schema").ResultSchema, import("./result-schema").ResultSchema>;
|
|
2418
|
-
}, z.core.$strict>], "mode">>;
|
|
2419
|
-
limits: z.ZodOptional<z.ZodObject<{
|
|
2420
|
-
maxDurationMs: z.ZodOptional<z.ZodNumber>;
|
|
2421
|
-
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
2422
|
-
}, z.core.$strip>>;
|
|
2423
|
-
egressPolicy: z.ZodObject<{
|
|
2424
|
-
policyRevision: z.ZodString;
|
|
2425
|
-
activity: z.ZodObject<{
|
|
2426
|
-
delivery: z.ZodLiteral<"latest-value">;
|
|
2427
|
-
maxCoalesceMs: z.ZodNumber;
|
|
2428
|
-
maxEventBytes: z.ZodNumber;
|
|
2429
|
-
}, z.core.$strict>;
|
|
2430
|
-
reliable: z.ZodObject<{
|
|
2431
|
-
maxPendingEventsPerAgent: z.ZodNumber;
|
|
2432
|
-
maxPendingBytesPerAgent: z.ZodNumber;
|
|
2433
|
-
maxPendingBytesPerTenant: z.ZodNumber;
|
|
2434
|
-
}, z.core.$strict>;
|
|
2435
|
-
transfers: z.ZodObject<{
|
|
2436
|
-
workspace: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
|
|
2437
|
-
maxBytes: z.ZodNumber;
|
|
2438
|
-
allowedMimeTypes: z.ZodArray<z.ZodString>;
|
|
2439
|
-
}, z.core.$strict>]>;
|
|
2440
|
-
transcript: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
|
|
2441
|
-
maxBytes: z.ZodNumber;
|
|
2442
|
-
allowedMimeTypes: z.ZodArray<z.ZodString>;
|
|
2443
|
-
}, z.core.$strict>]>;
|
|
2444
|
-
artifact: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
|
|
2445
|
-
maxBytes: z.ZodNumber;
|
|
2446
|
-
allowedMimeTypes: z.ZodArray<z.ZodString>;
|
|
2447
|
-
}, z.core.$strict>]>;
|
|
2448
|
-
}, z.core.$strict>;
|
|
2449
|
-
}, z.core.$strict>;
|
|
2450
|
-
messageEgress: z.ZodOptional<z.ZodObject<{
|
|
2451
|
-
mode: z.ZodLiteral<"required">;
|
|
2452
|
-
contract: z.ZodString;
|
|
2453
|
-
contentType: z.ZodEnum<{
|
|
2454
|
-
"text/markdown": "text/markdown";
|
|
2455
|
-
"text/plain": "text/plain";
|
|
2456
|
-
}>;
|
|
2457
|
-
maxBytes: z.ZodNumber;
|
|
2458
|
-
}, z.core.$strict>>;
|
|
2459
|
-
instruction: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
2460
|
-
blobRef: z.ZodObject<{
|
|
2461
|
-
blobId: z.ZodString;
|
|
2462
|
-
contentHash: z.ZodString;
|
|
2463
|
-
size: z.ZodNumber;
|
|
2464
|
-
contentType: z.ZodString;
|
|
2465
|
-
url: z.ZodOptional<z.ZodString>;
|
|
2466
|
-
}, z.core.$strip>;
|
|
2467
|
-
}, z.core.$strict>]>>;
|
|
2468
|
-
sealing: z.ZodObject<{
|
|
2469
|
-
scopeId: z.ZodString;
|
|
2470
|
-
epoch: z.ZodNumber;
|
|
2471
|
-
categories: z.ZodArray<z.ZodEnum<{
|
|
2472
|
-
"task-input": "task-input";
|
|
2473
|
-
"task-output": "task-output";
|
|
2474
|
-
}>>;
|
|
2475
2510
|
}, z.core.$strict>;
|
|
2476
|
-
|
|
2511
|
+
}, z.core.$strict>]>;
|
|
2512
|
+
export type TaskArtifactPayload = z.infer<typeof TaskArtifactPayloadSchema>;
|
|
2513
|
+
export declare const TaskAwaitApprovalPayloadSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
2514
|
+
sealed: z.ZodOptional<z.ZodNever>;
|
|
2515
|
+
sealing: z.ZodOptional<z.ZodNever>;
|
|
2516
|
+
summary: z.ZodString;
|
|
2517
|
+
approvalId: z.ZodString;
|
|
2518
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2519
|
+
sealing: z.ZodOptional<z.ZodNever>;
|
|
2520
|
+
approvalId: z.ZodString;
|
|
2521
|
+
sealed: z.ZodObject<{
|
|
2477
2522
|
v: z.ZodLiteral<1>;
|
|
2478
2523
|
suite: z.ZodLiteral<"byok-sealed-v1.hkdf-sha256.aes-256-gcm">;
|
|
2479
|
-
category: z.ZodLiteral<"task-
|
|
2524
|
+
category: z.ZodLiteral<"task-output">;
|
|
2480
2525
|
scope: z.ZodObject<{
|
|
2481
2526
|
id: z.ZodString;
|
|
2482
2527
|
epoch: z.ZodNumber;
|
|
@@ -2498,25 +2543,103 @@ export declare const TaskOfferForAgentWithEgressFreshSealedPayloadSchema: z.ZodO
|
|
|
2498
2543
|
size: z.ZodNumber;
|
|
2499
2544
|
contentType: z.ZodString;
|
|
2500
2545
|
}, z.core.$strict>>;
|
|
2546
|
+
}, z.core.$strict>;
|
|
2547
|
+
}, z.core.$strict>]>;
|
|
2548
|
+
export type TaskAwaitApprovalPayload = z.infer<typeof TaskAwaitApprovalPayloadSchema>;
|
|
2549
|
+
export declare const TaskCompletePayloadSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
2550
|
+
sealed: z.ZodOptional<z.ZodNever>;
|
|
2551
|
+
sealing: z.ZodOptional<z.ZodNever>;
|
|
2552
|
+
harnessId: z.ZodOptional<z.ZodString>;
|
|
2553
|
+
summary: z.ZodString;
|
|
2554
|
+
finalMessage: z.ZodOptional<z.ZodString>;
|
|
2555
|
+
sessionRef: z.ZodString;
|
|
2556
|
+
artifactRefs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2557
|
+
blobId: z.ZodString;
|
|
2558
|
+
contentHash: z.ZodString;
|
|
2559
|
+
size: z.ZodNumber;
|
|
2560
|
+
contentType: z.ZodString;
|
|
2561
|
+
url: z.ZodOptional<z.ZodString>;
|
|
2562
|
+
}, z.core.$strip>>>;
|
|
2563
|
+
document: z.ZodOptional<z.ZodUnknown>;
|
|
2564
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
2565
|
+
runtime: z.ZodEnum<{
|
|
2566
|
+
claude: "claude";
|
|
2567
|
+
codex: "codex";
|
|
2568
|
+
pi: "pi";
|
|
2569
|
+
}>;
|
|
2570
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
2571
|
+
model: z.ZodOptional<z.ZodString>;
|
|
2572
|
+
promptTokens: z.ZodOptional<z.ZodNumber>;
|
|
2573
|
+
completionTokens: z.ZodOptional<z.ZodNumber>;
|
|
2574
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
2575
|
+
clientVersion: z.ZodString;
|
|
2576
|
+
reportedAt: z.ZodISODateTime;
|
|
2577
|
+
}, z.core.$strip>>;
|
|
2578
|
+
preparedObservation: z.ZodOptional<z.ZodObject<{
|
|
2579
|
+
requestDigest: z.ZodString;
|
|
2580
|
+
initialPromptTokens: z.ZodNumber;
|
|
2581
|
+
maxPromptTokens: z.ZodNumber;
|
|
2501
2582
|
}, z.core.$strict>>;
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
notAfter: z.ZodString;
|
|
2583
|
+
agentRef: z.ZodOptional<z.ZodObject<{
|
|
2584
|
+
agentId: z.ZodString;
|
|
2585
|
+
profileRevision: z.ZodString;
|
|
2506
2586
|
}, z.core.$strict>>;
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2587
|
+
agentHomeProjection: z.ZodOptional<z.ZodObject<{
|
|
2588
|
+
profileRevision: z.ZodString;
|
|
2589
|
+
projectionHash: z.ZodString;
|
|
2590
|
+
}, z.core.$strict>>;
|
|
2591
|
+
agentHomeMemoryChange: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2592
|
+
outcome: z.ZodLiteral<"unchanged">;
|
|
2593
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
2594
|
+
outcome: z.ZodLiteral<"reader-attributed">;
|
|
2595
|
+
paths: z.ZodArray<z.ZodString>;
|
|
2596
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
2597
|
+
outcome: z.ZodLiteral<"unattributed">;
|
|
2598
|
+
paths: z.ZodArray<z.ZodString>;
|
|
2599
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
2600
|
+
outcome: z.ZodLiteral<"unmeasured">;
|
|
2601
|
+
}, z.core.$strict>], "outcome">>;
|
|
2602
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2603
|
+
sealing: z.ZodOptional<z.ZodNever>;
|
|
2604
|
+
harnessId: z.ZodOptional<z.ZodString>;
|
|
2605
|
+
sessionRef: z.ZodString;
|
|
2606
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
2607
|
+
runtime: z.ZodEnum<{
|
|
2608
|
+
claude: "claude";
|
|
2609
|
+
codex: "codex";
|
|
2610
|
+
pi: "pi";
|
|
2611
|
+
}>;
|
|
2612
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
2613
|
+
model: z.ZodOptional<z.ZodString>;
|
|
2614
|
+
promptTokens: z.ZodOptional<z.ZodNumber>;
|
|
2615
|
+
completionTokens: z.ZodOptional<z.ZodNumber>;
|
|
2616
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
2617
|
+
clientVersion: z.ZodString;
|
|
2618
|
+
reportedAt: z.ZodISODateTime;
|
|
2619
|
+
}, z.core.$strip>>;
|
|
2620
|
+
agentRef: z.ZodOptional<z.ZodObject<{
|
|
2621
|
+
agentId: z.ZodString;
|
|
2622
|
+
profileRevision: z.ZodString;
|
|
2623
|
+
}, z.core.$strict>>;
|
|
2624
|
+
agentHomeProjection: z.ZodOptional<z.ZodObject<{
|
|
2625
|
+
profileRevision: z.ZodString;
|
|
2626
|
+
projectionHash: z.ZodString;
|
|
2627
|
+
}, z.core.$strict>>;
|
|
2628
|
+
agentHomeMemoryChange: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2629
|
+
outcome: z.ZodLiteral<"unchanged">;
|
|
2630
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
2631
|
+
outcome: z.ZodLiteral<"reader-attributed">;
|
|
2632
|
+
paths: z.ZodArray<z.ZodString>;
|
|
2633
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
2634
|
+
outcome: z.ZodLiteral<"unattributed">;
|
|
2635
|
+
paths: z.ZodArray<z.ZodString>;
|
|
2636
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
2637
|
+
outcome: z.ZodLiteral<"unmeasured">;
|
|
2638
|
+
}, z.core.$strict>], "outcome">>;
|
|
2516
2639
|
sealed: z.ZodObject<{
|
|
2517
2640
|
v: z.ZodLiteral<1>;
|
|
2518
2641
|
suite: z.ZodLiteral<"byok-sealed-v1.hkdf-sha256.aes-256-gcm">;
|
|
2519
|
-
category: z.ZodLiteral<"task-
|
|
2642
|
+
category: z.ZodLiteral<"task-output">;
|
|
2520
2643
|
scope: z.ZodObject<{
|
|
2521
2644
|
id: z.ZodString;
|
|
2522
2645
|
epoch: z.ZodNumber;
|
|
@@ -2539,17 +2662,39 @@ export declare const TaskSteerSealedPayloadSchema: z.ZodObject<{
|
|
|
2539
2662
|
contentType: z.ZodString;
|
|
2540
2663
|
}, z.core.$strict>>;
|
|
2541
2664
|
}, z.core.$strict>;
|
|
2542
|
-
}, z.core.$strict>;
|
|
2543
|
-
export type
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
* `finalMessage` and `document` are sealed. `artifactRefs` and
|
|
2547
|
-
* `preparedObservation` are not carried in v1.
|
|
2548
|
-
*/
|
|
2549
|
-
export declare const TaskCompleteSealedPayloadSchema: z.ZodObject<{
|
|
2665
|
+
}, z.core.$strict>]>;
|
|
2666
|
+
export type TaskCompletePayload = z.infer<typeof TaskCompletePayloadSchema>;
|
|
2667
|
+
export declare const TaskFailPayloadSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
2668
|
+
sealed: z.ZodOptional<z.ZodNever>;
|
|
2550
2669
|
sealing: z.ZodOptional<z.ZodNever>;
|
|
2670
|
+
recovery: z.ZodOptional<z.ZodObject<{
|
|
2671
|
+
kind: z.ZodLiteral<"daemon_interrupted">;
|
|
2672
|
+
offerId: z.ZodUUID;
|
|
2673
|
+
}, z.core.$strict>>;
|
|
2551
2674
|
harnessId: z.ZodOptional<z.ZodString>;
|
|
2552
|
-
|
|
2675
|
+
reason: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
2676
|
+
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
2677
|
+
failure: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
2678
|
+
class: z.ZodLiteral<"quota">;
|
|
2679
|
+
resetsAt: z.ZodOptional<z.ZodISODateTime>;
|
|
2680
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
2681
|
+
class: z.ZodEnum<{
|
|
2682
|
+
auth: "auth";
|
|
2683
|
+
billing: "billing";
|
|
2684
|
+
input_too_large: "input_too_large";
|
|
2685
|
+
invalid_request: "invalid_request";
|
|
2686
|
+
limit_reached: "limit_reached";
|
|
2687
|
+
model_unavailable: "model_unavailable";
|
|
2688
|
+
output_schema: "output_schema";
|
|
2689
|
+
overloaded: "overloaded";
|
|
2690
|
+
provider: "provider";
|
|
2691
|
+
rate_limited: "rate_limited";
|
|
2692
|
+
runtime_exited: "runtime_exited";
|
|
2693
|
+
unknown: "unknown";
|
|
2694
|
+
}>;
|
|
2695
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
2696
|
+
class: z.ZodString;
|
|
2697
|
+
}, z.core.$loose>]>>;
|
|
2553
2698
|
usage: z.ZodOptional<z.ZodObject<{
|
|
2554
2699
|
runtime: z.ZodEnum<{
|
|
2555
2700
|
claude: "claude";
|
|
@@ -2564,6 +2709,11 @@ export declare const TaskCompleteSealedPayloadSchema: z.ZodObject<{
|
|
|
2564
2709
|
clientVersion: z.ZodString;
|
|
2565
2710
|
reportedAt: z.ZodISODateTime;
|
|
2566
2711
|
}, z.core.$strip>>;
|
|
2712
|
+
preparedObservation: z.ZodOptional<z.ZodObject<{
|
|
2713
|
+
requestDigest: z.ZodString;
|
|
2714
|
+
initialPromptTokens: z.ZodNumber;
|
|
2715
|
+
maxPromptTokens: z.ZodNumber;
|
|
2716
|
+
}, z.core.$strict>>;
|
|
2567
2717
|
agentRef: z.ZodOptional<z.ZodObject<{
|
|
2568
2718
|
agentId: z.ZodString;
|
|
2569
2719
|
profileRevision: z.ZodString;
|
|
@@ -2583,36 +2733,7 @@ export declare const TaskCompleteSealedPayloadSchema: z.ZodObject<{
|
|
|
2583
2733
|
}, z.core.$strict>, z.ZodObject<{
|
|
2584
2734
|
outcome: z.ZodLiteral<"unmeasured">;
|
|
2585
2735
|
}, z.core.$strict>], "outcome">>;
|
|
2586
|
-
|
|
2587
|
-
v: z.ZodLiteral<1>;
|
|
2588
|
-
suite: z.ZodLiteral<"byok-sealed-v1.hkdf-sha256.aes-256-gcm">;
|
|
2589
|
-
category: z.ZodLiteral<"task-output">;
|
|
2590
|
-
scope: z.ZodObject<{
|
|
2591
|
-
id: z.ZodString;
|
|
2592
|
-
epoch: z.ZodNumber;
|
|
2593
|
-
keyId: z.ZodString;
|
|
2594
|
-
}, z.core.$strict>;
|
|
2595
|
-
chainHead: z.ZodObject<{
|
|
2596
|
-
seq: z.ZodNumber;
|
|
2597
|
-
hash: z.ZodString;
|
|
2598
|
-
}, z.core.$strict>;
|
|
2599
|
-
sender: z.ZodString;
|
|
2600
|
-
salt: z.ZodString;
|
|
2601
|
-
nonce: z.ZodString;
|
|
2602
|
-
paddedLength: z.ZodNumber;
|
|
2603
|
-
contentMac: z.ZodString;
|
|
2604
|
-
ciphertext: z.ZodOptional<z.ZodString>;
|
|
2605
|
-
ciphertextRef: z.ZodOptional<z.ZodObject<{
|
|
2606
|
-
blobId: z.ZodString;
|
|
2607
|
-
contentHash: z.ZodString;
|
|
2608
|
-
size: z.ZodNumber;
|
|
2609
|
-
contentType: z.ZodString;
|
|
2610
|
-
}, z.core.$strict>>;
|
|
2611
|
-
}, z.core.$strict>;
|
|
2612
|
-
}, z.core.$strict>;
|
|
2613
|
-
export type TaskCompleteSealedPayload = z.infer<typeof TaskCompleteSealedPayloadSchema>;
|
|
2614
|
-
/** daemon -> server: `task.fail` of a sealed task. `reason` is sealed; `preparedObservation` is not carried in v1. */
|
|
2615
|
-
export declare const TaskFailSealedPayloadSchema: z.ZodObject<{
|
|
2736
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2616
2737
|
sealing: z.ZodOptional<z.ZodNever>;
|
|
2617
2738
|
recovery: z.ZodOptional<z.ZodObject<{
|
|
2618
2739
|
kind: z.ZodLiteral<"daemon_interrupted">;
|
|
@@ -2638,7 +2759,9 @@ export declare const TaskFailSealedPayloadSchema: z.ZodObject<{
|
|
|
2638
2759
|
runtime_exited: "runtime_exited";
|
|
2639
2760
|
unknown: "unknown";
|
|
2640
2761
|
}>;
|
|
2641
|
-
}, z.core.$strict
|
|
2762
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
2763
|
+
class: z.ZodString;
|
|
2764
|
+
}, z.core.$loose>]>>;
|
|
2642
2765
|
usage: z.ZodOptional<z.ZodObject<{
|
|
2643
2766
|
runtime: z.ZodEnum<{
|
|
2644
2767
|
claude: "claude";
|
|
@@ -2698,54 +2821,47 @@ export declare const TaskFailSealedPayloadSchema: z.ZodObject<{
|
|
|
2698
2821
|
contentType: z.ZodString;
|
|
2699
2822
|
}, z.core.$strict>>;
|
|
2700
2823
|
}, z.core.$strict>;
|
|
2701
|
-
}, z.core.$strict>;
|
|
2702
|
-
export type
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
* The sealed decline codes go only on the plaintext `task.decline`: a device
|
|
2706
|
-
* that cannot open or use the scope key often cannot seal a reply either.
|
|
2707
|
-
*/
|
|
2708
|
-
export declare const TaskDeclineSealedPayloadSchema: z.ZodObject<{
|
|
2824
|
+
}, z.core.$strict>]>;
|
|
2825
|
+
export type TaskFailPayload = z.infer<typeof TaskFailPayloadSchema>;
|
|
2826
|
+
export declare const TaskCancelledPayloadSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
2827
|
+
sealed: z.ZodOptional<z.ZodNever>;
|
|
2709
2828
|
sealing: z.ZodOptional<z.ZodNever>;
|
|
2710
|
-
|
|
2829
|
+
harnessId: z.ZodOptional<z.ZodString>;
|
|
2830
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
2831
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
2832
|
+
runtime: z.ZodEnum<{
|
|
2833
|
+
claude: "claude";
|
|
2834
|
+
codex: "codex";
|
|
2835
|
+
pi: "pi";
|
|
2836
|
+
}>;
|
|
2837
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
2838
|
+
model: z.ZodOptional<z.ZodString>;
|
|
2839
|
+
promptTokens: z.ZodOptional<z.ZodNumber>;
|
|
2840
|
+
completionTokens: z.ZodOptional<z.ZodNumber>;
|
|
2841
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
2842
|
+
clientVersion: z.ZodString;
|
|
2843
|
+
reportedAt: z.ZodISODateTime;
|
|
2844
|
+
}, z.core.$strip>>;
|
|
2711
2845
|
agentRef: z.ZodOptional<z.ZodObject<{
|
|
2712
2846
|
agentId: z.ZodString;
|
|
2713
2847
|
profileRevision: z.ZodString;
|
|
2714
2848
|
}, z.core.$strict>>;
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
}>>;
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
}, z.core.$strict>;
|
|
2732
|
-
sender: z.ZodString;
|
|
2733
|
-
salt: z.ZodString;
|
|
2734
|
-
nonce: z.ZodString;
|
|
2735
|
-
paddedLength: z.ZodNumber;
|
|
2736
|
-
contentMac: z.ZodString;
|
|
2737
|
-
ciphertext: z.ZodOptional<z.ZodString>;
|
|
2738
|
-
ciphertextRef: z.ZodOptional<z.ZodObject<{
|
|
2739
|
-
blobId: z.ZodString;
|
|
2740
|
-
contentHash: z.ZodString;
|
|
2741
|
-
size: z.ZodNumber;
|
|
2742
|
-
contentType: z.ZodString;
|
|
2743
|
-
}, z.core.$strict>>;
|
|
2744
|
-
}, z.core.$strict>;
|
|
2745
|
-
}, z.core.$strict>;
|
|
2746
|
-
export type TaskDeclineSealedPayload = z.infer<typeof TaskDeclineSealedPayloadSchema>;
|
|
2747
|
-
/** daemon -> server: `task.cancelled` of a sealed task. `reason` is sealed. */
|
|
2748
|
-
export declare const TaskCancelledSealedPayloadSchema: z.ZodObject<{
|
|
2849
|
+
agentHomeProjection: z.ZodOptional<z.ZodObject<{
|
|
2850
|
+
profileRevision: z.ZodString;
|
|
2851
|
+
projectionHash: z.ZodString;
|
|
2852
|
+
}, z.core.$strict>>;
|
|
2853
|
+
agentHomeMemoryChange: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2854
|
+
outcome: z.ZodLiteral<"unchanged">;
|
|
2855
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
2856
|
+
outcome: z.ZodLiteral<"reader-attributed">;
|
|
2857
|
+
paths: z.ZodArray<z.ZodString>;
|
|
2858
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
2859
|
+
outcome: z.ZodLiteral<"unattributed">;
|
|
2860
|
+
paths: z.ZodArray<z.ZodString>;
|
|
2861
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
2862
|
+
outcome: z.ZodLiteral<"unmeasured">;
|
|
2863
|
+
}, z.core.$strict>], "outcome">>;
|
|
2864
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2749
2865
|
sealing: z.ZodOptional<z.ZodNever>;
|
|
2750
2866
|
harnessId: z.ZodOptional<z.ZodString>;
|
|
2751
2867
|
usage: z.ZodOptional<z.ZodObject<{
|
|
@@ -2807,156 +2923,20 @@ export declare const TaskCancelledSealedPayloadSchema: z.ZodObject<{
|
|
|
2807
2923
|
contentType: z.ZodString;
|
|
2808
2924
|
}, z.core.$strict>>;
|
|
2809
2925
|
}, z.core.$strict>;
|
|
2810
|
-
}, z.core.$strict>;
|
|
2811
|
-
export type
|
|
2812
|
-
/** daemon -> server: `task.progress` of a sealed task. `events` is sealed; `seq` names the batch. */
|
|
2813
|
-
export declare const TaskProgressSealedPayloadSchema: z.ZodObject<{
|
|
2814
|
-
sealing: z.ZodOptional<z.ZodNever>;
|
|
2815
|
-
seq: z.ZodNumber;
|
|
2816
|
-
sealed: z.ZodObject<{
|
|
2817
|
-
v: z.ZodLiteral<1>;
|
|
2818
|
-
suite: z.ZodLiteral<"byok-sealed-v1.hkdf-sha256.aes-256-gcm">;
|
|
2819
|
-
category: z.ZodLiteral<"task-output">;
|
|
2820
|
-
scope: z.ZodObject<{
|
|
2821
|
-
id: z.ZodString;
|
|
2822
|
-
epoch: z.ZodNumber;
|
|
2823
|
-
keyId: z.ZodString;
|
|
2824
|
-
}, z.core.$strict>;
|
|
2825
|
-
chainHead: z.ZodObject<{
|
|
2826
|
-
seq: z.ZodNumber;
|
|
2827
|
-
hash: z.ZodString;
|
|
2828
|
-
}, z.core.$strict>;
|
|
2829
|
-
sender: z.ZodString;
|
|
2830
|
-
salt: z.ZodString;
|
|
2831
|
-
nonce: z.ZodString;
|
|
2832
|
-
paddedLength: z.ZodNumber;
|
|
2833
|
-
contentMac: z.ZodString;
|
|
2834
|
-
ciphertext: z.ZodOptional<z.ZodString>;
|
|
2835
|
-
ciphertextRef: z.ZodOptional<z.ZodObject<{
|
|
2836
|
-
blobId: z.ZodString;
|
|
2837
|
-
contentHash: z.ZodString;
|
|
2838
|
-
size: z.ZodNumber;
|
|
2839
|
-
contentType: z.ZodString;
|
|
2840
|
-
}, z.core.$strict>>;
|
|
2841
|
-
}, z.core.$strict>;
|
|
2842
|
-
}, z.core.$strict>;
|
|
2843
|
-
export type TaskProgressSealedPayload = z.infer<typeof TaskProgressSealedPayloadSchema>;
|
|
2844
|
-
/**
|
|
2845
|
-
* daemon -> server: an inline artifact of a sealed task. `inline` is sealed; a
|
|
2846
|
-
* blob artifact is not carried in v1. `artifactId` names the write in the AAD
|
|
2847
|
-
* and the content MAC, because two artifacts of one task may share a `name`.
|
|
2848
|
-
*/
|
|
2849
|
-
export declare const TaskArtifactSealedPayloadSchema: z.ZodObject<{
|
|
2850
|
-
sealing: z.ZodOptional<z.ZodNever>;
|
|
2851
|
-
name: z.ZodString;
|
|
2852
|
-
contentType: z.ZodString;
|
|
2853
|
-
artifactId: z.ZodUUID;
|
|
2854
|
-
sealed: z.ZodObject<{
|
|
2855
|
-
v: z.ZodLiteral<1>;
|
|
2856
|
-
suite: z.ZodLiteral<"byok-sealed-v1.hkdf-sha256.aes-256-gcm">;
|
|
2857
|
-
category: z.ZodLiteral<"task-output">;
|
|
2858
|
-
scope: z.ZodObject<{
|
|
2859
|
-
id: z.ZodString;
|
|
2860
|
-
epoch: z.ZodNumber;
|
|
2861
|
-
keyId: z.ZodString;
|
|
2862
|
-
}, z.core.$strict>;
|
|
2863
|
-
chainHead: z.ZodObject<{
|
|
2864
|
-
seq: z.ZodNumber;
|
|
2865
|
-
hash: z.ZodString;
|
|
2866
|
-
}, z.core.$strict>;
|
|
2867
|
-
sender: z.ZodString;
|
|
2868
|
-
salt: z.ZodString;
|
|
2869
|
-
nonce: z.ZodString;
|
|
2870
|
-
paddedLength: z.ZodNumber;
|
|
2871
|
-
contentMac: z.ZodString;
|
|
2872
|
-
ciphertext: z.ZodOptional<z.ZodString>;
|
|
2873
|
-
ciphertextRef: z.ZodOptional<z.ZodObject<{
|
|
2874
|
-
blobId: z.ZodString;
|
|
2875
|
-
contentHash: z.ZodString;
|
|
2876
|
-
size: z.ZodNumber;
|
|
2877
|
-
contentType: z.ZodString;
|
|
2878
|
-
}, z.core.$strict>>;
|
|
2879
|
-
}, z.core.$strict>;
|
|
2880
|
-
}, z.core.$strict>;
|
|
2881
|
-
export type TaskArtifactSealedPayload = z.infer<typeof TaskArtifactSealedPayloadSchema>;
|
|
2882
|
-
/** daemon -> server: `task.await_approval` of a sealed task. `summary` is sealed; `approvalId` is required. */
|
|
2883
|
-
export declare const TaskAwaitApprovalSealedPayloadSchema: z.ZodObject<{
|
|
2884
|
-
sealing: z.ZodOptional<z.ZodNever>;
|
|
2885
|
-
approvalId: z.ZodString;
|
|
2886
|
-
sealed: z.ZodObject<{
|
|
2887
|
-
v: z.ZodLiteral<1>;
|
|
2888
|
-
suite: z.ZodLiteral<"byok-sealed-v1.hkdf-sha256.aes-256-gcm">;
|
|
2889
|
-
category: z.ZodLiteral<"task-output">;
|
|
2890
|
-
scope: z.ZodObject<{
|
|
2891
|
-
id: z.ZodString;
|
|
2892
|
-
epoch: z.ZodNumber;
|
|
2893
|
-
keyId: z.ZodString;
|
|
2894
|
-
}, z.core.$strict>;
|
|
2895
|
-
chainHead: z.ZodObject<{
|
|
2896
|
-
seq: z.ZodNumber;
|
|
2897
|
-
hash: z.ZodString;
|
|
2898
|
-
}, z.core.$strict>;
|
|
2899
|
-
sender: z.ZodString;
|
|
2900
|
-
salt: z.ZodString;
|
|
2901
|
-
nonce: z.ZodString;
|
|
2902
|
-
paddedLength: z.ZodNumber;
|
|
2903
|
-
contentMac: z.ZodString;
|
|
2904
|
-
ciphertext: z.ZodOptional<z.ZodString>;
|
|
2905
|
-
ciphertextRef: z.ZodOptional<z.ZodObject<{
|
|
2906
|
-
blobId: z.ZodString;
|
|
2907
|
-
contentHash: z.ZodString;
|
|
2908
|
-
size: z.ZodNumber;
|
|
2909
|
-
contentType: z.ZodString;
|
|
2910
|
-
}, z.core.$strict>>;
|
|
2911
|
-
}, z.core.$strict>;
|
|
2912
|
-
}, z.core.$strict>;
|
|
2913
|
-
export type TaskAwaitApprovalSealedPayload = z.infer<typeof TaskAwaitApprovalSealedPayloadSchema>;
|
|
2926
|
+
}, z.core.$strict>]>;
|
|
2927
|
+
export type TaskCancelledPayload = z.infer<typeof TaskCancelledPayloadSchema>;
|
|
2914
2928
|
/**
|
|
2915
|
-
*
|
|
2916
|
-
*
|
|
2917
|
-
*
|
|
2918
|
-
*
|
|
2919
|
-
* name each schema (`typeof X`) instead of copying its full type, which keeps
|
|
2920
|
-
* the published `.d.ts` small. Every new entry follows this rule.
|
|
2929
|
+
* Each value is written `X as typeof X`. The assertion is type-only (no
|
|
2930
|
+
* runtime code). It makes declaration emit name each schema (`typeof X`)
|
|
2931
|
+
* instead of copying its full type, which keeps the published `.d.ts` small.
|
|
2932
|
+
* Every new entry follows this rule. Entries are grouped by direction.
|
|
2921
2933
|
*/
|
|
2922
|
-
declare const TASK_OFFER_PAYLOAD_SCHEMAS: {
|
|
2923
|
-
readonly 'task.offer': typeof TaskOfferPayloadSchema;
|
|
2924
|
-
readonly 'task.offer_with_toolsets': typeof TaskOfferWithToolsetsPayloadSchema;
|
|
2925
|
-
readonly 'task.offer_for_agent': typeof TaskOfferForAgentPayloadSchema;
|
|
2926
|
-
readonly 'task.offer_for_agent_with_egress': typeof TaskOfferForAgentWithEgressPayloadSchema;
|
|
2927
|
-
readonly 'task.offer_for_agent_with_egress_fresh': typeof TaskOfferForAgentWithEgressFreshPayloadSchema;
|
|
2928
|
-
readonly 'task.offer_prepared': typeof TaskOfferPreparedPayloadSchema;
|
|
2929
|
-
readonly 'task.offer_sealed': typeof TaskOfferSealedPayloadSchema;
|
|
2930
|
-
readonly 'task.offer_with_toolsets_sealed': typeof TaskOfferWithToolsetsSealedPayloadSchema;
|
|
2931
|
-
readonly 'task.offer_for_agent_sealed': typeof TaskOfferForAgentSealedPayloadSchema;
|
|
2932
|
-
readonly 'task.offer_for_agent_with_egress_sealed': typeof TaskOfferForAgentWithEgressSealedPayloadSchema;
|
|
2933
|
-
readonly 'task.offer_for_agent_with_egress_fresh_sealed': typeof TaskOfferForAgentWithEgressFreshSealedPayloadSchema;
|
|
2934
|
-
};
|
|
2935
|
-
export type TaskOfferType = keyof typeof TASK_OFFER_PAYLOAD_SCHEMAS;
|
|
2936
|
-
export declare const TASK_OFFER_TYPES: readonly TaskOfferType[];
|
|
2937
|
-
/** Classify task-opening offers without duplicating the protocol registry in consumers. */
|
|
2938
|
-
export declare function isTaskOfferType(type: string): type is TaskOfferType;
|
|
2939
2934
|
export declare const MESSAGE_PAYLOAD_SCHEMAS: {
|
|
2940
|
-
readonly 'task.offer': typeof TaskOfferPayloadSchema;
|
|
2941
|
-
readonly 'task.offer_with_toolsets': typeof TaskOfferWithToolsetsPayloadSchema;
|
|
2942
|
-
readonly 'task.offer_for_agent': typeof TaskOfferForAgentPayloadSchema;
|
|
2943
|
-
readonly 'task.offer_for_agent_with_egress': typeof TaskOfferForAgentWithEgressPayloadSchema;
|
|
2944
|
-
readonly 'task.offer_for_agent_with_egress_fresh': typeof TaskOfferForAgentWithEgressFreshPayloadSchema;
|
|
2945
|
-
readonly 'task.offer_prepared': typeof TaskOfferPreparedPayloadSchema;
|
|
2946
|
-
readonly 'task.offer_sealed': typeof TaskOfferSealedPayloadSchema;
|
|
2947
|
-
readonly 'task.offer_with_toolsets_sealed': typeof TaskOfferWithToolsetsSealedPayloadSchema;
|
|
2948
|
-
readonly 'task.offer_for_agent_sealed': typeof TaskOfferForAgentSealedPayloadSchema;
|
|
2949
|
-
readonly 'task.offer_for_agent_with_egress_sealed': typeof TaskOfferForAgentWithEgressSealedPayloadSchema;
|
|
2950
|
-
readonly 'task.offer_for_agent_with_egress_fresh_sealed': typeof TaskOfferForAgentWithEgressFreshSealedPayloadSchema;
|
|
2951
2935
|
readonly 'conn.hello': typeof ConnHelloPayloadSchema;
|
|
2952
|
-
readonly '
|
|
2953
|
-
readonly 'agent.egress.reliable': typeof AgentEgressReliablePayloadSchema;
|
|
2936
|
+
readonly 'task.offer': typeof TaskOfferPayloadSchema;
|
|
2954
2937
|
readonly 'agent.egress.ack': typeof AgentEgressAckPayloadSchema;
|
|
2955
|
-
readonly 'agent.message.draft': typeof AgentMessageDraftPayloadSchema;
|
|
2956
|
-
readonly 'agent.message.publish': typeof AgentMessagePublishPayloadSchema;
|
|
2957
2938
|
readonly 'agent.message.disposition': typeof AgentMessageDispositionPayloadSchema;
|
|
2958
2939
|
readonly 'agent.content.read': typeof AgentContentReadPayloadSchema;
|
|
2959
|
-
readonly 'agent.content.receipt': typeof AgentContentReceiptPayloadSchema;
|
|
2960
2940
|
readonly 'agent.home.projection': typeof AgentHomeProjectionPayloadSchema;
|
|
2961
2941
|
readonly 'agent.input.preparation': typeof AgentInputPreparationPayloadSchema;
|
|
2962
2942
|
readonly 'provider.provisioning.available': typeof ProviderProvisioningAvailablePayloadSchema;
|
|
@@ -2965,6 +2945,7 @@ export declare const MESSAGE_PAYLOAD_SCHEMAS: {
|
|
|
2965
2945
|
readonly 'task.reject': typeof TaskRejectPayloadSchema;
|
|
2966
2946
|
readonly 'task.cancel': typeof TaskCancelPayloadSchema;
|
|
2967
2947
|
readonly 'task.steer': typeof TaskSteerPayloadSchema;
|
|
2948
|
+
readonly 'e2ee.key_package.available': typeof E2eeKeyPackageAvailablePayloadSchema;
|
|
2968
2949
|
readonly 'task.claim': typeof TaskClaimPayloadSchema;
|
|
2969
2950
|
readonly 'task.started': typeof TaskStartedPayloadSchema;
|
|
2970
2951
|
readonly 'task.decline': typeof TaskDeclinePayloadSchema;
|
|
@@ -2975,15 +2956,10 @@ export declare const MESSAGE_PAYLOAD_SCHEMAS: {
|
|
|
2975
2956
|
readonly 'task.fail': typeof TaskFailPayloadSchema;
|
|
2976
2957
|
readonly 'task.cancelled': typeof TaskCancelledPayloadSchema;
|
|
2977
2958
|
readonly 'task.approval_resolved': typeof TaskApprovalResolvedPayloadSchema;
|
|
2978
|
-
readonly '
|
|
2979
|
-
readonly '
|
|
2980
|
-
readonly '
|
|
2981
|
-
readonly '
|
|
2982
|
-
readonly 'task.cancelled_sealed': typeof TaskCancelledSealedPayloadSchema;
|
|
2983
|
-
readonly 'task.progress_sealed': typeof TaskProgressSealedPayloadSchema;
|
|
2984
|
-
readonly 'task.artifact_sealed': typeof TaskArtifactSealedPayloadSchema;
|
|
2985
|
-
readonly 'task.await_approval_sealed': typeof TaskAwaitApprovalSealedPayloadSchema;
|
|
2986
|
-
readonly 'e2ee.key_package.available': typeof E2eeKeyPackageAvailablePayloadSchema;
|
|
2959
|
+
readonly 'agent.egress.reliable': typeof AgentEgressReliablePayloadSchema;
|
|
2960
|
+
readonly 'agent.message.draft': typeof AgentMessageDraftPayloadSchema;
|
|
2961
|
+
readonly 'agent.message.publish': typeof AgentMessagePublishPayloadSchema;
|
|
2962
|
+
readonly 'agent.content.receipt': typeof AgentContentReceiptPayloadSchema;
|
|
2987
2963
|
};
|
|
2988
2964
|
export type MessageType = keyof typeof MESSAGE_PAYLOAD_SCHEMAS;
|
|
2989
2965
|
export declare const MESSAGE_TYPES: MessageType[];
|
|
@@ -2992,7 +2968,7 @@ export declare const MESSAGE_TYPES: MessageType[];
|
|
|
2992
2968
|
* (`envelope.ts`) to decide which branches require envelope `seq` (M1
|
|
2993
2969
|
* redelivery cursor).
|
|
2994
2970
|
*/
|
|
2995
|
-
export declare const SERVER_TO_DAEMON_TYPES: readonly ["
|
|
2971
|
+
export declare const SERVER_TO_DAEMON_TYPES: readonly ["task.offer", "agent.egress.ack", "agent.message.disposition", "agent.content.read", "agent.home.projection", "agent.input.preparation", "provider.provisioning.available", "agent.memory.intent.available", "task.approve", "task.reject", "task.cancel", "task.steer", "e2ee.key_package.available"];
|
|
2996
2972
|
/**
|
|
2997
2973
|
* Message types the daemon sends to the server — the flip side of
|
|
2998
2974
|
* {@link SERVER_TO_DAEMON_TYPES}. `conn.hello` is deliberately excluded: the
|
|
@@ -3005,5 +2981,5 @@ export declare const SERVER_TO_DAEMON_TYPES: readonly ["conn.ack", "task.offer",
|
|
|
3005
2981
|
* or anything unrecognized — is rejected before it's dispatched to any
|
|
3006
2982
|
* handler or counted `accepted` on the `/byok/messages` wire.
|
|
3007
2983
|
*/
|
|
3008
|
-
export declare const DAEMON_TO_SERVER_TYPES: readonly ["task.claim", "task.started", "task.decline", "task.progress", "task.artifact", "task.await_approval", "task.complete", "task.fail", "task.cancelled", "task.approval_resolved", "agent.egress.reliable", "agent.message.draft", "agent.message.publish", "agent.content.receipt"
|
|
2984
|
+
export declare const DAEMON_TO_SERVER_TYPES: readonly ["task.claim", "task.started", "task.decline", "task.progress", "task.artifact", "task.await_approval", "task.complete", "task.fail", "task.cancelled", "task.approval_resolved", "agent.egress.reliable", "agent.message.draft", "agent.message.publish", "agent.content.receipt"];
|
|
3009
2985
|
export {};
|