@byok-sdk/protocol 0.28.3 → 0.30.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/dist/index.js CHANGED
@@ -17,7 +17,10 @@ var PROVIDER_PROFILE_BINDING_CAPABILITY = "provider-profile-binding";
17
17
  var PROVIDER_PROVISIONING_CAPABILITY = "provider-provisioning.v1";
18
18
  var AGENT_MEMORY_INTENT_CAPABILITY = "agent-memory-intent.v1";
19
19
  var AGENT_MEMORY_PROJECTION_CAPABILITY = "agent.memory.projection";
20
+ var AGENT_MEMORY_SELECTION_CAPABILITY = "agent-memory-selection";
21
+ var AGENT_MEMORY_READ_IF_ADMITTED_CAPABILITY = "agent-memory-read-if-admitted";
20
22
  var AGENT_INPUT_PREPARATION_CAPABILITY = `agent-input-preparation-v${INPUT_PREPARATION_WIRE_VERSION}`;
23
+ var SEALED_PAYLOAD_CAPABILITY = "sealed-payload-v1";
21
24
  var PREPARED_AGENT_MEMORY_MODES = ["none", "read", "read-write"];
22
25
  function isPreparedAgentMemoryMode(value) {
23
26
  return typeof value === "string" && PREPARED_AGENT_MEMORY_MODES.some((mode) => mode === value);
@@ -57,7 +60,10 @@ var CAPABILITY_FLAGS = [
57
60
  MAILBOX_READ_AHEAD_CAPABILITY,
58
61
  PROVIDER_PROVISIONING_CAPABILITY,
59
62
  AGENT_MEMORY_INTENT_CAPABILITY,
60
- "agent-message-draft"
63
+ AGENT_MEMORY_SELECTION_CAPABILITY,
64
+ AGENT_MEMORY_READ_IF_ADMITTED_CAPABILITY,
65
+ "agent-message-draft",
66
+ SEALED_PAYLOAD_CAPABILITY
61
67
  ];
62
68
 
63
69
  // src/task-state.ts
@@ -88,6 +94,93 @@ var AGENT_MEMORY_MAX_SNAPSHOT_BYTES = 1024 * 1024;
88
94
  var AGENT_MEMORY_MAX_SNAPSHOT_FILES = 128;
89
95
  var RUNTIME_IDS = Object.freeze(["pi", "claude", "codex"]);
90
96
 
97
+ // src/sealed-split-table.ts
98
+ var OFFER_DIGESTS = {
99
+ "instruction.blobRef.contentHash": "sealed",
100
+ "dispatchSelection.providerProfile.profileRevision": "plain",
101
+ "dispatchSelection.providerProfile.profileHash": "plain"
102
+ };
103
+ var AGENT_OFFER_DIGESTS = { ...OFFER_DIGESTS, "agentRef.profileRevision": "plain" };
104
+ var EGRESS_OFFER_DIGESTS = { ...AGENT_OFFER_DIGESTS, "egressPolicy.policyRevision": "plain" };
105
+ var TERMINAL_DIGESTS = {
106
+ "agentRef.profileRevision": "plain",
107
+ "agentHomeProjection.profileRevision": "plain",
108
+ "agentHomeProjection.projectionHash": "plain"
109
+ };
110
+ var sealedOffer = (plainType, digests) => ({ plainType, category: "task-input", identity: [], moved: ["instruction"], forbidden: [], digests });
111
+ var SEALED_SPLIT_TABLE = Object.freeze({
112
+ "task.offer_sealed": sealedOffer("task.offer", OFFER_DIGESTS),
113
+ "task.offer_with_toolsets_sealed": sealedOffer("task.offer_with_toolsets", OFFER_DIGESTS),
114
+ "task.offer_for_agent_sealed": sealedOffer("task.offer_for_agent", AGENT_OFFER_DIGESTS),
115
+ "task.offer_for_agent_with_egress_sealed": sealedOffer("task.offer_for_agent_with_egress", EGRESS_OFFER_DIGESTS),
116
+ "task.offer_for_agent_with_egress_fresh_sealed": sealedOffer("task.offer_for_agent_with_egress_fresh", EGRESS_OFFER_DIGESTS),
117
+ "task.steer_sealed": { plainType: "task.steer", category: "task-input", identity: ["steerId"], moved: ["text"], forbidden: [], digests: {} },
118
+ "task.complete_sealed": {
119
+ plainType: "task.complete",
120
+ category: "task-output",
121
+ identity: [],
122
+ moved: ["summary", "finalMessage", "document"],
123
+ forbidden: ["artifactRefs", "preparedObservation"],
124
+ digests: {
125
+ ...TERMINAL_DIGESTS,
126
+ "artifactRefs[].contentHash": "forbidden",
127
+ "preparedObservation.requestDigest": "forbidden"
128
+ }
129
+ },
130
+ "task.fail_sealed": {
131
+ plainType: "task.fail",
132
+ category: "task-output",
133
+ identity: [],
134
+ moved: ["reason"],
135
+ forbidden: ["preparedObservation"],
136
+ digests: { ...TERMINAL_DIGESTS, "preparedObservation.requestDigest": "forbidden" }
137
+ },
138
+ "task.decline_sealed": {
139
+ plainType: "task.decline",
140
+ category: "task-output",
141
+ identity: [],
142
+ moved: ["reason"],
143
+ forbidden: [],
144
+ digests: { "agentRef.profileRevision": "plain" }
145
+ },
146
+ "task.cancelled_sealed": {
147
+ plainType: "task.cancelled",
148
+ category: "task-output",
149
+ identity: [],
150
+ moved: ["reason"],
151
+ forbidden: [],
152
+ digests: TERMINAL_DIGESTS
153
+ },
154
+ "task.progress_sealed": {
155
+ plainType: "task.progress",
156
+ category: "task-output",
157
+ identity: ["seq"],
158
+ moved: ["events"],
159
+ forbidden: [],
160
+ digests: { "events[].spill.blob.contentHash": "sealed" }
161
+ },
162
+ "task.artifact_sealed": {
163
+ plainType: "task.artifact",
164
+ category: "task-output",
165
+ identity: ["artifactId"],
166
+ moved: ["inline"],
167
+ forbidden: ["blobRef"],
168
+ digests: { "blobRef.contentHash": "forbidden" },
169
+ limits: { inline: 2 * 1024 * 1024 }
170
+ },
171
+ "task.await_approval_sealed": {
172
+ plainType: "task.await_approval",
173
+ category: "task-output",
174
+ identity: ["approvalId"],
175
+ moved: ["summary"],
176
+ forbidden: [],
177
+ digests: {}
178
+ }
179
+ });
180
+ function isSealedMessageType(type) {
181
+ return Object.hasOwn(SEALED_SPLIT_TABLE, type);
182
+ }
183
+
91
184
  // src/wire-additions.ts
92
185
  var AGENT_OFFER_FIELDS = (surface) => [
93
186
  { kind: "envelope", rule: "gated", surface, field: "dispatchSelection", capability: "dispatch-selection", advertisedBy: "device" },
@@ -99,21 +192,41 @@ var EGRESS_OFFER_FIELDS = (surface) => [
99
192
  { kind: "envelope", rule: "gated", surface, field: "messageEgress", capability: "agent-message-egress", advertisedBy: "device" },
100
193
  ...AGENT_OFFER_FIELDS(surface)
101
194
  ];
102
- var WIRE_ADDITIONS = Object.freeze([
195
+ function sealedRows(plainRows) {
196
+ return Object.keys(SEALED_SPLIT_TABLE).flatMap((surface) => {
197
+ const { plainType, moved, forbidden } = SEALED_SPLIT_TABLE[surface];
198
+ const dropped = [...moved, ...forbidden];
199
+ const advertisedBy = SEALED_SPLIT_TABLE[surface].category === "task-input" ? "device" : "server";
200
+ const inherited = plainRows.flatMap((row) => {
201
+ if (row.kind !== "envelope" || row.surface !== plainType) return [];
202
+ if (row.field !== void 0 && dropped.includes(row.field.split(/[.[]/u)[0])) return [];
203
+ return [{ ...row, surface }];
204
+ });
205
+ return [{ kind: "envelope", rule: "gated", surface, capability: "sealed-payload-v1", advertisedBy }, ...inherited];
206
+ });
207
+ }
208
+ var SEALED_DECLINE_CODE = (value) => ({ kind: "envelope", rule: "gated", surface: "task.decline", field: "code", value, capability: "sealed-payload-v1", advertisedBy: "server" });
209
+ var PLAIN_ROWS = [
103
210
  // Server to daemon: offers.
104
211
  { kind: "envelope", rule: "gated", surface: "task.offer", field: "harnessId", capability: "custom-harness", advertisedBy: "device" },
105
212
  { kind: "envelope", rule: "gated", surface: "task.offer_with_toolsets", field: "harnessId", capability: "custom-harness", advertisedBy: "device" },
106
213
  { kind: "envelope", rule: "gated", surface: "task.offer_for_agent", capability: "agent-home-contract", advertisedBy: "device" },
107
214
  ...AGENT_OFFER_FIELDS("task.offer_for_agent"),
215
+ { kind: "envelope", rule: "gated", surface: "task.offer_for_agent", field: "agentMemory", capability: "agent-memory-selection", advertisedBy: "device" },
216
+ { kind: "envelope", rule: "gated", surface: "task.offer_for_agent", field: "agentMemory", value: "read-if-admitted", capability: "agent-memory-read-if-admitted", advertisedBy: "device" },
108
217
  { kind: "envelope", rule: "gated", surface: "task.offer_for_agent_with_egress", capability: "agent-home-contract", advertisedBy: "device" },
109
218
  { kind: "envelope", rule: "gated", surface: "task.offer_for_agent_with_egress", capability: "agent-egress-policy", advertisedBy: "device" },
110
219
  { kind: "envelope", rule: "gated", surface: "task.offer_for_agent_with_egress", capability: "agent-egress-reliable-ack", advertisedBy: "device" },
111
220
  ...EGRESS_OFFER_FIELDS("task.offer_for_agent_with_egress"),
221
+ { kind: "envelope", rule: "gated", surface: "task.offer_for_agent_with_egress", field: "agentMemory", capability: "agent-memory-selection", advertisedBy: "device" },
222
+ { kind: "envelope", rule: "gated", surface: "task.offer_for_agent_with_egress", field: "agentMemory", value: "read-if-admitted", capability: "agent-memory-read-if-admitted", advertisedBy: "device" },
112
223
  { kind: "envelope", rule: "gated", surface: "task.offer_for_agent_with_egress_fresh", capability: "agent-home-contract", advertisedBy: "device" },
113
224
  { kind: "envelope", rule: "gated", surface: "task.offer_for_agent_with_egress_fresh", capability: "agent-egress-policy", advertisedBy: "device" },
114
225
  { kind: "envelope", rule: "gated", surface: "task.offer_for_agent_with_egress_fresh", capability: "agent-egress-reliable-ack", advertisedBy: "device" },
115
226
  { kind: "envelope", rule: "gated", surface: "task.offer_for_agent_with_egress_fresh", capability: "agent-egress-fresh-session", advertisedBy: "device" },
116
227
  ...EGRESS_OFFER_FIELDS("task.offer_for_agent_with_egress_fresh"),
228
+ { kind: "envelope", rule: "gated", surface: "task.offer_for_agent_with_egress_fresh", field: "agentMemory", capability: "agent-memory-selection", advertisedBy: "device" },
229
+ { kind: "envelope", rule: "gated", surface: "task.offer_for_agent_with_egress_fresh", field: "agentMemory", value: "read-if-admitted", capability: "agent-memory-read-if-admitted", advertisedBy: "device" },
117
230
  { kind: "envelope", rule: "gated", surface: "task.offer_prepared", capability: "agent-home-contract", advertisedBy: "device" },
118
231
  { kind: "envelope", rule: "gated", surface: "task.offer_prepared", capability: "agent-input-preparation-v9", advertisedBy: "device" },
119
232
  { kind: "envelope", rule: "gated", surface: "task.offer_prepared", capability: "agent-egress-policy", advertisedBy: "device" },
@@ -133,6 +246,7 @@ var WIRE_ADDITIONS = Object.freeze([
133
246
  { kind: "envelope", rule: "gated", surface: "agent.input.preparation", capability: "agent-input-preparation-v9", advertisedBy: "device" },
134
247
  { kind: "envelope", rule: "gated", surface: "provider.provisioning.available", capability: "provider-provisioning.v1", advertisedBy: "device" },
135
248
  { kind: "envelope", rule: "gated", surface: "agent.memory.intent.available", capability: "agent-memory-intent.v1", advertisedBy: "device" },
249
+ { kind: "envelope", rule: "gated", surface: "e2ee.key_package.available", capability: "sealed-payload-v1", advertisedBy: "device" },
136
250
  // One optional runtime capability, shared by discovery and the claim snapshot.
137
251
  { kind: "envelope", rule: "strip-safe", surface: "conn.hello", field: "runtimes[].capabilities.messageDraft" },
138
252
  { kind: "envelope", rule: "strip-safe", surface: "conn.hello", field: "harnesses[].capabilities.messageDraft" },
@@ -142,6 +256,14 @@ var WIRE_ADDITIONS = Object.freeze([
142
256
  // Daemon to server.
143
257
  { kind: "envelope", rule: "gated", surface: "agent.message.draft", capability: "agent-message-draft", advertisedBy: "server" },
144
258
  { kind: "envelope", rule: "gated", surface: "task.approval_resolved", capability: "approval_resolved", advertisedBy: "server" }
259
+ ];
260
+ var WIRE_ADDITIONS = Object.freeze([
261
+ ...PLAIN_ROWS,
262
+ ...sealedRows(PLAIN_ROWS),
263
+ SEALED_DECLINE_CODE("sealed_key_unavailable"),
264
+ SEALED_DECLINE_CODE("sealed_open_failed"),
265
+ SEALED_DECLINE_CODE("sealed_content_mac_mismatch"),
266
+ SEALED_DECLINE_CODE("sealing_policy_mismatch")
145
267
  ]);
146
268
  function requiredReceiverCapabilities(type, payload) {
147
269
  const fields = payload !== null && typeof payload === "object" ? payload : {};
@@ -165,6 +287,154 @@ var BlobRefSchema = z.object({
165
287
  contentType: z.string(),
166
288
  url: z.string().optional()
167
289
  });
290
+ var SEALED_PAYLOAD_VERSION = 1;
291
+ var SEALED_PAYLOAD_SUITE = "byok-sealed-v1.hkdf-sha256.aes-256-gcm";
292
+ var SEALED_PAYLOAD_CATEGORIES = ["task-input", "agent-message", "task-output", "memory-projection"];
293
+ var SEALED_PAYLOAD_V1_CATEGORIES = ["task-input", "task-output"];
294
+ var SEALED_DECLINE_CODES = [
295
+ "sealed_key_unavailable",
296
+ "sealed_open_failed",
297
+ "sealed_content_mac_mismatch",
298
+ "sealing_policy_mismatch"
299
+ ];
300
+ var SEALED_TASK_PLAIN_CODES = Object.freeze({
301
+ "task.fail": { reason: ["daemon_interrupted", "sealed_key_unavailable"] },
302
+ "task.decline": { reason: SEALED_DECLINE_CODES },
303
+ "task.cancelled": { reason: [] }
304
+ });
305
+ function isSealedTaskPlainOutput(type, payload) {
306
+ const codes = Object.hasOwn(SEALED_TASK_PLAIN_CODES, type) ? SEALED_TASK_PLAIN_CODES[type] : {};
307
+ const fields = Object.values(SEALED_SPLIT_TABLE).filter((entry) => entry.category === "task-output" && entry.plainType === type).flatMap((entry) => [...entry.moved, ...entry.forbidden]);
308
+ if (fields.length > 0 && !Object.hasOwn(SEALED_TASK_PLAIN_CODES, type)) return false;
309
+ const record = payload;
310
+ for (const field of fields) {
311
+ const value = record[field];
312
+ if (value !== void 0 && !(typeof value === "string" && (codes[field] ?? []).includes(value))) return false;
313
+ }
314
+ return type !== "task.decline" || record.reason === void 0 || record.code === record.reason;
315
+ }
316
+ var SEALED_INLINE_MAX_PADDED_LENGTH = 256 * 1024;
317
+ var SEALED_PAYLOAD_MAX_CONTENT_LENGTH = 2 * 1024 * 1024;
318
+ var AEAD_TAG_BYTES = 16;
319
+ var FRAME_HEADER_BYTES = 4;
320
+ var ALIGNED_FRAME_LIMIT = 16 * 1024;
321
+ var FRAME_ALIGNMENT = 256;
322
+ var SALT_BYTES = 32;
323
+ var NONCE_BYTES = 12;
324
+ function floorLog2(value) {
325
+ let exponent = 0;
326
+ for (let remaining = value; remaining >= 2; remaining = Math.floor(remaining / 2)) exponent += 1;
327
+ return exponent;
328
+ }
329
+ function sealedPayloadPaddedLength(frameLength) {
330
+ if (!Number.isSafeInteger(frameLength) || frameLength < FRAME_HEADER_BYTES) {
331
+ throw new RangeError("Sealed frame length must be a safe integer of at least 4");
332
+ }
333
+ if (frameLength <= ALIGNED_FRAME_LIMIT) return Math.ceil(frameLength / FRAME_ALIGNMENT) * FRAME_ALIGNMENT;
334
+ const exponent = floorLog2(frameLength);
335
+ const step = 2 ** (exponent - (floorLog2(exponent) + 1));
336
+ return Math.ceil(frameLength / step) * step;
337
+ }
338
+ var SEALED_PAYLOAD_MAX_PADDED_LENGTH = sealedPayloadPaddedLength(
339
+ FRAME_HEADER_BYTES + SEALED_PAYLOAD_MAX_CONTENT_LENGTH
340
+ );
341
+ function isLegalPaddedLength(value) {
342
+ return Number.isSafeInteger(value) && value >= FRAME_ALIGNMENT && value <= SEALED_PAYLOAD_MAX_PADDED_LENGTH && sealedPayloadPaddedLength(value) === value;
343
+ }
344
+ var BASE64URL_VALUE = /^[A-Za-z0-9_-]*$/u;
345
+ var BASE64URL_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
346
+ function sealedBase64UrlByteLength(value) {
347
+ if (!BASE64URL_VALUE.test(value)) return void 0;
348
+ const tail = value.length % 4;
349
+ if (tail === 1) return void 0;
350
+ if (tail !== 0) {
351
+ const last = BASE64URL_ALPHABET.indexOf(value[value.length - 1]);
352
+ const unusedBits = tail === 2 ? 15 : 3;
353
+ if ((last & unusedBits) !== 0) return void 0;
354
+ }
355
+ return Math.floor(value.length / 4) * 3 + (tail === 0 ? 0 : tail - 1);
356
+ }
357
+ function base64UrlOf(bytes) {
358
+ return z.string().refine((value) => sealedBase64UrlByteLength(value) === bytes, `must be canonical unpadded base64url of ${bytes} bytes`);
359
+ }
360
+ var PositiveIntegerSchema = z.number().int().positive().max(Number.MAX_SAFE_INTEGER);
361
+ function sealedPayloadSchema(category) {
362
+ return z.object({
363
+ v: z.literal(SEALED_PAYLOAD_VERSION),
364
+ suite: z.literal(SEALED_PAYLOAD_SUITE),
365
+ category,
366
+ scope: z.object({
367
+ id: z.string().min(1),
368
+ epoch: PositiveIntegerSchema,
369
+ keyId: z.string().regex(/^[A-Za-z0-9_-]{22}$/u)
370
+ }).strict(),
371
+ chainHead: z.object({
372
+ seq: PositiveIntegerSchema,
373
+ hash: z.string().regex(CONTENT_HASH_RE)
374
+ }).strict(),
375
+ sender: z.string().regex(/^[A-Za-z0-9_-]{43}$/u),
376
+ salt: base64UrlOf(SALT_BYTES),
377
+ nonce: base64UrlOf(NONCE_BYTES),
378
+ paddedLength: PositiveIntegerSchema.refine(isLegalPaddedLength, "must be a legal padded frame length within the v1 limit"),
379
+ contentMac: z.string().regex(/^hmac-sha256:[0-9a-f]{64}$/u),
380
+ ciphertext: z.string().optional(),
381
+ /** The ciphertext blob. A presigned `url` is transport detail and never part of a sealed member. */
382
+ ciphertextRef: BlobRefSchema.omit({ url: true }).strict().optional()
383
+ }).strict().superRefine((sealed, ctx) => {
384
+ const ciphertextLength = sealed.paddedLength + AEAD_TAG_BYTES;
385
+ const inline = sealed.paddedLength <= SEALED_INLINE_MAX_PADDED_LENGTH;
386
+ if (inline) {
387
+ if (sealed.ciphertextRef !== void 0 || sealed.ciphertext === void 0) {
388
+ ctx.addIssue({ code: "custom", path: ["ciphertext"], message: `a padded length up to ${SEALED_INLINE_MAX_PADDED_LENGTH} carries inline ciphertext only` });
389
+ } else if (sealedBase64UrlByteLength(sealed.ciphertext) !== ciphertextLength) {
390
+ ctx.addIssue({ code: "custom", path: ["ciphertext"], message: "ciphertext must be canonical base64url of paddedLength + 16 bytes" });
391
+ }
392
+ return;
393
+ }
394
+ if (sealed.ciphertext !== void 0 || sealed.ciphertextRef === void 0) {
395
+ ctx.addIssue({ code: "custom", path: ["ciphertextRef"], message: `a padded length above ${SEALED_INLINE_MAX_PADDED_LENGTH} carries ciphertextRef only` });
396
+ } else if (sealed.ciphertextRef.size !== ciphertextLength) {
397
+ ctx.addIssue({ code: "custom", path: ["ciphertextRef", "size"], message: "ciphertextRef size must equal paddedLength + 16" });
398
+ }
399
+ });
400
+ }
401
+ var SealedPayloadSchema = sealedPayloadSchema(z.enum(SEALED_PAYLOAD_V1_CATEGORIES));
402
+ var SealedTaskInputSchema = sealedPayloadSchema(z.literal("task-input"));
403
+ var SealedTaskOutputSchema = sealedPayloadSchema(z.literal("task-output"));
404
+ function isCanonicalCategoryList(categories) {
405
+ return categories.every((category, index) => index === 0 || SEALED_PAYLOAD_CATEGORIES.indexOf(categories[index - 1]) < SEALED_PAYLOAD_CATEGORIES.indexOf(category));
406
+ }
407
+ var TaskSealingSchema = z.object({
408
+ scopeId: z.string().min(1),
409
+ epoch: PositiveIntegerSchema,
410
+ categories: z.array(z.enum(SEALED_PAYLOAD_V1_CATEGORIES)).min(1).refine(isCanonicalCategoryList, "categories must be unique and in canonical order")
411
+ }).strict();
412
+ var CanonicalInstantSchema = z.string().regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/u).refine((value) => {
413
+ const instant = Date.parse(value);
414
+ return Number.isFinite(instant) && new Date(instant).toISOString() === value;
415
+ }, "must be a canonical UTC instant");
416
+ var RoutineRefSchema = z.object({
417
+ routineId: z.string().min(1),
418
+ definitionVersion: z.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER),
419
+ notAfter: CanonicalInstantSchema
420
+ }).strict();
421
+ function sealedOfferRule(payload, ctx) {
422
+ const { instruction, sealing, sealed, routineRef } = payload;
423
+ if (!sealing.categories.includes("task-input")) {
424
+ if (routineRef !== void 0) ctx.addIssue({ code: "custom", path: ["routineRef"], message: "a routine template is sealed task input, so routineRef needs a task that seals task-input" });
425
+ if (sealed !== void 0) ctx.addIssue({ code: "custom", path: ["sealed"], message: "a task that does not seal task-input carries no sealed member" });
426
+ if (instruction === void 0) ctx.addIssue({ code: "custom", path: ["instruction"], message: "a task that does not seal task-input carries a plaintext instruction" });
427
+ return;
428
+ }
429
+ if (sealed === void 0) {
430
+ ctx.addIssue({ code: "custom", path: ["sealed"], message: "a task that seals task-input carries the sealed instruction" });
431
+ return;
432
+ }
433
+ if (instruction !== void 0) ctx.addIssue({ code: "custom", path: ["instruction"], message: "a sealed instruction never travels in plaintext too" });
434
+ if (sealed.scope.id !== sealing.scopeId || sealed.scope.epoch !== sealing.epoch) {
435
+ ctx.addIssue({ code: "custom", path: ["sealed", "scope"], message: "the offer task-input must be sealed under the task scope at the task epoch" });
436
+ }
437
+ }
168
438
  var ProviderProfileRefSchema = z.string().min(1).max(64).regex(/^[a-z0-9]+(?:[-_][a-z0-9]+)*$/u, "provider profile refs must be lowercase portable identifiers");
169
439
  var ProviderProfileRevisionSchema = z.string().regex(/^(?:0|[1-9][0-9]{0,19})$/u, "provider profile revision must be canonical decimal");
170
440
  var ProviderProfileHashSchema = z.string().regex(/^sha256:[0-9a-f]{64}$/u, "provider profile hash must be lowercase sha256");
@@ -1172,6 +1442,83 @@ var AgentHomeProjectionValueSchema = z.json().refine(
1172
1442
  (value) => new TextEncoder().encode(JSON.stringify(value)).byteLength <= AGENT_HOME_PROJECTION_MAX_BYTES,
1173
1443
  `projection must not exceed ${AGENT_HOME_PROJECTION_MAX_BYTES} UTF-8 JSON bytes`
1174
1444
  );
1445
+ var E2EE_MEMBER_CHAIN_APPEND_MAX_ENTRIES = 64;
1446
+ var E2EE_MEMBER_CHAIN_ENTRY_MAX_BYTES = 65536;
1447
+ var E2EE_MEMBER_CHAIN_READ_MAX_ENTRIES = 256;
1448
+ var E2EE_SCOPE_KEY_PACKAGE_PUT_MAX = 256;
1449
+ var E2EE_SCOPE_ID_MAX_LENGTH = 512;
1450
+ var E2EE_MEMBER_KEY_REGISTER_OPERATION = "e2ee-member-key.register";
1451
+ var E2EE_MEMBER_CHAIN_APPEND_OPERATION = "e2ee-member-chain.append";
1452
+ var E2EE_SCOPE_KEY_PACKAGE_PUT_OPERATION = "e2ee-scope-key-package.put";
1453
+ function base64UrlBytes(bytes) {
1454
+ const length = Math.ceil(bytes * 4 / 3);
1455
+ const last = ["[A-Za-z0-9_-]", "[AQgw]", "[AEIMQUYcgkosw048]"][bytes % 3];
1456
+ return z.string().regex(new RegExp(`^[A-Za-z0-9_-]{${length - 1}}${last}$`, "u"));
1457
+ }
1458
+ var MemberIdSchema = z.string().regex(/^[A-Za-z0-9_-]{43}$/u);
1459
+ var PositiveSafeIntegerSchema = z.number().int().positive().max(Number.MAX_SAFE_INTEGER);
1460
+ var SignatureSchema = base64UrlBytes(64);
1461
+ var P256PublicJwkSchema = z.strictObject({
1462
+ kty: z.literal("EC"),
1463
+ crv: z.literal("P-256"),
1464
+ x: base64UrlBytes(32),
1465
+ y: base64UrlBytes(32)
1466
+ });
1467
+ var E2eeMemberKeyBundleSchema = z.strictObject({
1468
+ v: z.literal(1),
1469
+ memberId: MemberIdSchema,
1470
+ signingPublicJwk: P256PublicJwkSchema,
1471
+ kemPublicJwk: P256PublicJwkSchema,
1472
+ kemEpoch: PositiveSafeIntegerSchema,
1473
+ kemSig: SignatureSchema,
1474
+ deviceId: z.string().min(1).optional()
1475
+ });
1476
+ var E2EE_MEMBER_CHAIN_OPS = ["add", "remove", "rotate", "scope-policy", "shred"];
1477
+ var E2eeMemberChainEntrySchema = z.strictObject({
1478
+ v: z.literal(1),
1479
+ tenantId: z.string().min(1),
1480
+ seq: PositiveSafeIntegerSchema,
1481
+ prev: z.union([z.null(), z.string().regex(CONTENT_HASH_RE)]),
1482
+ op: z.enum(E2EE_MEMBER_CHAIN_OPS),
1483
+ subject: z.custom(
1484
+ (value) => value !== null && typeof value === "object" && !Array.isArray(value)
1485
+ ),
1486
+ signer: MemberIdSchema,
1487
+ sig: SignatureSchema
1488
+ }).refine((entry) => entry.seq === 1 === (entry.prev === null), {
1489
+ path: ["prev"],
1490
+ message: "the first entry, and only the first, has no prev"
1491
+ });
1492
+ var E2eeScopeKeyPackageSchema = z.strictObject({
1493
+ v: z.literal(1),
1494
+ tenantId: z.string().min(1),
1495
+ scopeId: z.string().min(1),
1496
+ epoch: PositiveSafeIntegerSchema,
1497
+ keyId: z.string().regex(/^[A-Za-z0-9_-]{22}$/u),
1498
+ recipient: MemberIdSchema,
1499
+ sender: MemberIdSchema,
1500
+ enc: base64UrlBytes(65),
1501
+ ciphertext: base64UrlBytes(48),
1502
+ sig: SignatureSchema
1503
+ });
1504
+ var E2eePairingMacSchema = base64UrlBytes(32);
1505
+ var E2eeMemberKeyRegisterRequestSchema = z.strictObject({
1506
+ member: E2eeMemberKeyBundleSchema.refine((member) => member.deviceId !== void 0, {
1507
+ message: "a device member names its deviceId"
1508
+ }),
1509
+ mac: E2eePairingMacSchema
1510
+ });
1511
+ var E2eeClientPairingMacSchema = z.strictObject({
1512
+ mac: E2eePairingMacSchema,
1513
+ member: E2eeMemberKeyBundleSchema.refine((member) => member.deviceId === void 0, {
1514
+ message: "a client member has no deviceId"
1515
+ }),
1516
+ chainHead: z.strictObject({ seq: PositiveSafeIntegerSchema, hash: z.string().regex(CONTENT_HASH_RE) })
1517
+ });
1518
+ var E2eeKeyPackageAvailablePayloadSchema = z.strictObject({
1519
+ scopeId: z.string().min(1).max(E2EE_SCOPE_ID_MAX_LENGTH),
1520
+ epoch: PositiveSafeIntegerSchema
1521
+ });
1175
1522
 
1176
1523
  // src/messages.ts
1177
1524
  var MAX_INLINE_BYTES = 64 * 1024;
@@ -1278,7 +1625,9 @@ var DispatchSelectionSchema = z.discriminatedUnion("lane", [
1278
1625
  providerProfile: ProviderProfileBindingSchema
1279
1626
  }).strict()
1280
1627
  ]);
1628
+ var NO_SEALED_MEMBER = { sealed: z.never().optional(), sealing: z.never().optional() };
1281
1629
  var TaskOfferPayloadSchema = z.object({
1630
+ ...NO_SEALED_MEMBER,
1282
1631
  instruction: z.union([z.string(), InstructionBlobRefSchema]),
1283
1632
  runtime: RuntimeIdSchema.optional(),
1284
1633
  harnessId: HarnessIdSchema.optional(),
@@ -1295,10 +1644,13 @@ var TaskOfferWithToolsetsPayloadSchema = TaskOfferPayloadSchema.extend({
1295
1644
  requiredToolsets: RequiredToolsetsSchema
1296
1645
  }).strict();
1297
1646
  var AgentHomeAccessSchema = z.literal("memory-reader");
1647
+ var AgentMemorySelectionSchema = z.enum([...PreparedAgentMemoryModeSchema.options, "read-if-admitted"]);
1298
1648
  var TaskOfferForAgentPayloadSchema = z.object({
1649
+ ...NO_SEALED_MEMBER,
1299
1650
  instruction: z.union([z.string(), InstructionBlobRefSchema]),
1300
1651
  agentRef: AgentRefSchema,
1301
1652
  homeAccess: AgentHomeAccessSchema.optional(),
1653
+ agentMemory: AgentMemorySelectionSchema.optional(),
1302
1654
  requiredToolsets: RequiredToolsetsSchema.optional(),
1303
1655
  runtime: RuntimeIdSchema.optional(),
1304
1656
  harnessId: HarnessIdSchema.optional(),
@@ -1323,7 +1675,8 @@ var TaskOfferForAgentWithEgressFreshPayloadSchema = TaskOfferForAgentPayloadSche
1323
1675
  }).strict();
1324
1676
  var TaskOfferPreparedPayloadSchema = TaskOfferForAgentPayloadSchema.omit({
1325
1677
  instruction: true,
1326
- sessionRef: true
1678
+ sessionRef: true,
1679
+ agentMemory: true
1327
1680
  }).extend({
1328
1681
  preparation: InputPreparationOfferBindingSchema,
1329
1682
  agentMemory: PreparedAgentMemoryModeSchema,
@@ -1517,6 +1870,7 @@ var TaskCancelPayloadSchema = z.object({
1517
1870
  reason: z.string().optional()
1518
1871
  });
1519
1872
  var TaskSteerPayloadSchema = z.object({
1873
+ ...NO_SEALED_MEMBER,
1520
1874
  text: z.string()
1521
1875
  });
1522
1876
  var TaskClaimPayloadSchema = z.object({
@@ -1528,17 +1882,25 @@ var TaskClaimPayloadSchema = z.object({
1528
1882
  capabilities: RuntimeCapabilitiesSchema.optional()
1529
1883
  });
1530
1884
  var TaskStartedPayloadSchema = z.object({});
1531
- var TaskDeclinePayloadSchema = z.object({
1885
+ var HOME_DECLINE_CODES = ["agent_home_writer_busy", "agent_home_reader_busy"];
1886
+ var DeclineFields = z.object({
1887
+ ...NO_SEALED_MEMBER,
1532
1888
  reason: z.string(),
1533
1889
  retryable: z.boolean().optional(),
1534
1890
  agentRef: AgentRefSchema.optional(),
1535
- code: z.enum(["agent_home_writer_busy", "agent_home_reader_busy"]).optional()
1891
+ code: z.enum([...HOME_DECLINE_CODES, ...SEALED_DECLINE_CODES]).optional()
1536
1892
  });
1893
+ var TaskDeclinePayloadSchema = DeclineFields.refine(
1894
+ (p) => !SEALED_DECLINE_CODES.includes(p.code) || p.reason === p.code && p.retryable !== true,
1895
+ { message: "a sealed code needs reason === code, not retryable" }
1896
+ );
1537
1897
  var TaskProgressPayloadSchema = z.object({
1898
+ ...NO_SEALED_MEMBER,
1538
1899
  seq: z.number().int(),
1539
1900
  events: z.array(AgentEventOrUnknownSchema)
1540
1901
  });
1541
1902
  var TaskArtifactPayloadSchema = z.object({
1903
+ ...NO_SEALED_MEMBER,
1542
1904
  name: z.string(),
1543
1905
  contentType: z.string(),
1544
1906
  inline: z.string().refine(isWithinInlineByteLimit, {
@@ -1547,6 +1909,7 @@ var TaskArtifactPayloadSchema = z.object({
1547
1909
  blobRef: BlobRefSchema.optional()
1548
1910
  });
1549
1911
  var TaskAwaitApprovalPayloadSchema = z.object({
1912
+ ...NO_SEALED_MEMBER,
1550
1913
  summary: z.string(),
1551
1914
  approvalId: z.string().optional()
1552
1915
  });
@@ -1603,6 +1966,7 @@ var TerminalAgentHomeMemoryChangeSchema = z.discriminatedUnion("outcome", [
1603
1966
  z.object({ outcome: z.literal("unmeasured") }).strict()
1604
1967
  ]);
1605
1968
  var TaskCompletePayloadSchema = z.object({
1969
+ ...NO_SEALED_MEMBER,
1606
1970
  harnessId: HarnessIdSchema.optional(),
1607
1971
  summary: z.string(),
1608
1972
  /**
@@ -1627,6 +1991,7 @@ var TaskCompletePayloadSchema = z.object({
1627
1991
  agentHomeMemoryChange: TerminalAgentHomeMemoryChangeSchema.optional()
1628
1992
  });
1629
1993
  var TaskFailPayloadSchema = z.object({
1994
+ ...NO_SEALED_MEMBER,
1630
1995
  /** Local interruption observation bound to the immutable offer; does not assert a cloud claim. */
1631
1996
  recovery: z.object({ kind: z.literal("daemon_interrupted"), offerId: z.uuid() }).strict().optional(),
1632
1997
  harnessId: HarnessIdSchema.optional(),
@@ -1640,6 +2005,7 @@ var TaskFailPayloadSchema = z.object({
1640
2005
  agentHomeMemoryChange: TerminalAgentHomeMemoryChangeSchema.optional()
1641
2006
  });
1642
2007
  var TaskCancelledPayloadSchema = z.object({
2008
+ ...NO_SEALED_MEMBER,
1643
2009
  harnessId: HarnessIdSchema.optional(),
1644
2010
  reason: z.string().optional(),
1645
2011
  usage: TerminalInferenceUsageSchema.optional(),
@@ -1653,13 +2019,42 @@ var TaskApprovalResolvedPayloadSchema = z.object({
1653
2019
  resolvedBy: z.enum(["local"]),
1654
2020
  at: z.iso.datetime({ offset: true })
1655
2021
  });
2022
+ var SEALED_OFFER_FIELDS = {
2023
+ instruction: z.union([z.string(), InstructionBlobRefSchema]).optional(),
2024
+ sealing: TaskSealingSchema,
2025
+ sealed: SealedTaskInputSchema.optional()
2026
+ };
2027
+ var TaskOfferSealedPayloadSchema = TaskOfferPayloadSchema.extend(SEALED_OFFER_FIELDS).strict().superRefine(sealedOfferRule);
2028
+ var TaskOfferWithToolsetsSealedPayloadSchema = TaskOfferWithToolsetsPayloadSchema.extend(SEALED_OFFER_FIELDS).strict().superRefine(sealedOfferRule);
2029
+ var TaskOfferForAgentSealedPayloadSchema = TaskOfferForAgentPayloadSchema.extend(SEALED_OFFER_FIELDS).strict().superRefine(sealedOfferRule);
2030
+ var TaskOfferForAgentWithEgressSealedPayloadSchema = TaskOfferForAgentWithEgressPayloadSchema.extend(SEALED_OFFER_FIELDS).strict().superRefine(sealedOfferRule);
2031
+ var TaskOfferForAgentWithEgressFreshSealedPayloadSchema = TaskOfferForAgentWithEgressFreshPayloadSchema.extend({ ...SEALED_OFFER_FIELDS, routineRef: RoutineRefSchema.optional() }).strict().superRefine(sealedOfferRule);
2032
+ var TaskSteerSealedPayloadSchema = z.object({ steerId: z.uuid(), sealed: SealedTaskInputSchema }).strict();
2033
+ var TaskCompleteSealedPayloadSchema = TaskCompletePayloadSchema.omit({
2034
+ summary: true,
2035
+ finalMessage: true,
2036
+ document: true,
2037
+ artifactRefs: true,
2038
+ preparedObservation: true
2039
+ }).extend({ sealed: SealedTaskOutputSchema }).strict();
2040
+ var TaskFailSealedPayloadSchema = TaskFailPayloadSchema.omit({ reason: true, preparedObservation: true }).extend({ sealed: SealedTaskOutputSchema }).strict();
2041
+ var TaskDeclineSealedPayloadSchema = DeclineFields.omit({ reason: true }).extend({ code: z.enum(HOME_DECLINE_CODES).optional(), sealed: SealedTaskOutputSchema }).strict();
2042
+ var TaskCancelledSealedPayloadSchema = TaskCancelledPayloadSchema.omit({ reason: true }).extend({ sealed: SealedTaskOutputSchema }).strict();
2043
+ var TaskProgressSealedPayloadSchema = TaskProgressPayloadSchema.omit({ events: true }).extend({ sealed: SealedTaskOutputSchema }).strict();
2044
+ var TaskArtifactSealedPayloadSchema = TaskArtifactPayloadSchema.omit({ inline: true, blobRef: true }).extend({ artifactId: z.uuid(), sealed: SealedTaskOutputSchema }).strict();
2045
+ var TaskAwaitApprovalSealedPayloadSchema = TaskAwaitApprovalPayloadSchema.omit({ summary: true }).extend({ approvalId: z.string().min(1), sealed: SealedTaskOutputSchema }).strict();
1656
2046
  var TASK_OFFER_PAYLOAD_SCHEMAS = {
1657
2047
  "task.offer": TaskOfferPayloadSchema,
1658
2048
  "task.offer_with_toolsets": TaskOfferWithToolsetsPayloadSchema,
1659
2049
  "task.offer_for_agent": TaskOfferForAgentPayloadSchema,
1660
2050
  "task.offer_for_agent_with_egress": TaskOfferForAgentWithEgressPayloadSchema,
1661
2051
  "task.offer_for_agent_with_egress_fresh": TaskOfferForAgentWithEgressFreshPayloadSchema,
1662
- "task.offer_prepared": TaskOfferPreparedPayloadSchema
2052
+ "task.offer_prepared": TaskOfferPreparedPayloadSchema,
2053
+ "task.offer_sealed": TaskOfferSealedPayloadSchema,
2054
+ "task.offer_with_toolsets_sealed": TaskOfferWithToolsetsSealedPayloadSchema,
2055
+ "task.offer_for_agent_sealed": TaskOfferForAgentSealedPayloadSchema,
2056
+ "task.offer_for_agent_with_egress_sealed": TaskOfferForAgentWithEgressSealedPayloadSchema,
2057
+ "task.offer_for_agent_with_egress_fresh_sealed": TaskOfferForAgentWithEgressFreshSealedPayloadSchema
1663
2058
  };
1664
2059
  var TASK_OFFER_TYPES = Object.freeze(
1665
2060
  Object.keys(TASK_OFFER_PAYLOAD_SCHEMAS)
@@ -1695,7 +2090,16 @@ var MESSAGE_PAYLOAD_SCHEMAS = {
1695
2090
  "task.complete": TaskCompletePayloadSchema,
1696
2091
  "task.fail": TaskFailPayloadSchema,
1697
2092
  "task.cancelled": TaskCancelledPayloadSchema,
1698
- "task.approval_resolved": TaskApprovalResolvedPayloadSchema
2093
+ "task.approval_resolved": TaskApprovalResolvedPayloadSchema,
2094
+ "task.steer_sealed": TaskSteerSealedPayloadSchema,
2095
+ "task.complete_sealed": TaskCompleteSealedPayloadSchema,
2096
+ "task.fail_sealed": TaskFailSealedPayloadSchema,
2097
+ "task.decline_sealed": TaskDeclineSealedPayloadSchema,
2098
+ "task.cancelled_sealed": TaskCancelledSealedPayloadSchema,
2099
+ "task.progress_sealed": TaskProgressSealedPayloadSchema,
2100
+ "task.artifact_sealed": TaskArtifactSealedPayloadSchema,
2101
+ "task.await_approval_sealed": TaskAwaitApprovalSealedPayloadSchema,
2102
+ "e2ee.key_package.available": E2eeKeyPackageAvailablePayloadSchema
1699
2103
  };
1700
2104
  var MESSAGE_TYPES = Object.keys(MESSAGE_PAYLOAD_SCHEMAS);
1701
2105
  var SERVER_TO_DAEMON_TYPES = [
@@ -1716,7 +2120,14 @@ var SERVER_TO_DAEMON_TYPES = [
1716
2120
  "task.approve",
1717
2121
  "task.reject",
1718
2122
  "task.cancel",
1719
- "task.steer"
2123
+ "task.steer",
2124
+ "task.offer_sealed",
2125
+ "task.offer_with_toolsets_sealed",
2126
+ "task.offer_for_agent_sealed",
2127
+ "task.offer_for_agent_with_egress_sealed",
2128
+ "task.offer_for_agent_with_egress_fresh_sealed",
2129
+ "task.steer_sealed",
2130
+ "e2ee.key_package.available"
1720
2131
  ];
1721
2132
  var DAEMON_TO_SERVER_TYPES = [
1722
2133
  "task.claim",
@@ -1732,7 +2143,14 @@ var DAEMON_TO_SERVER_TYPES = [
1732
2143
  "agent.egress.reliable",
1733
2144
  "agent.message.draft",
1734
2145
  "agent.message.publish",
1735
- "agent.content.receipt"
2146
+ "agent.content.receipt",
2147
+ "task.complete_sealed",
2148
+ "task.fail_sealed",
2149
+ "task.decline_sealed",
2150
+ "task.cancelled_sealed",
2151
+ "task.progress_sealed",
2152
+ "task.artifact_sealed",
2153
+ "task.await_approval_sealed"
1736
2154
  ];
1737
2155
 
1738
2156
  // src/agent-memory-intent.ts
@@ -2028,7 +2446,24 @@ var EnvelopeSchema = z.discriminatedUnion("type", [
2028
2446
  envelopeShape("agent.egress.reliable", OPTIONAL_TASK_ID, OPTIONAL_SEQ),
2029
2447
  envelopeShape("agent.message.draft", REQUIRED_TASK_ID, OPTIONAL_SEQ),
2030
2448
  envelopeShape("agent.message.publish", REQUIRED_TASK_ID, OPTIONAL_SEQ),
2031
- envelopeShape("agent.content.receipt", OPTIONAL_TASK_ID, OPTIONAL_SEQ)
2449
+ envelopeShape("agent.content.receipt", OPTIONAL_TASK_ID, OPTIONAL_SEQ),
2450
+ // Sealed payload v1 (#654). Appended last, so every released branch keeps
2451
+ // its position in the union.
2452
+ envelopeShape("task.offer_sealed", REQUIRED_TASK_ID, REQUIRED_SEQ),
2453
+ envelopeShape("task.offer_with_toolsets_sealed", REQUIRED_TASK_ID, REQUIRED_SEQ),
2454
+ envelopeShape("task.offer_for_agent_sealed", REQUIRED_TASK_ID, REQUIRED_SEQ),
2455
+ envelopeShape("task.offer_for_agent_with_egress_sealed", REQUIRED_TASK_ID, REQUIRED_SEQ),
2456
+ envelopeShape("task.offer_for_agent_with_egress_fresh_sealed", REQUIRED_TASK_ID, REQUIRED_SEQ),
2457
+ envelopeShape("task.steer_sealed", REQUIRED_TASK_ID, REQUIRED_SEQ),
2458
+ envelopeShape("task.complete_sealed", REQUIRED_TASK_ID, OPTIONAL_SEQ),
2459
+ envelopeShape("task.fail_sealed", REQUIRED_TASK_ID, OPTIONAL_SEQ),
2460
+ envelopeShape("task.decline_sealed", REQUIRED_TASK_ID, OPTIONAL_SEQ),
2461
+ envelopeShape("task.cancelled_sealed", REQUIRED_TASK_ID, OPTIONAL_SEQ),
2462
+ envelopeShape("task.progress_sealed", REQUIRED_TASK_ID, OPTIONAL_SEQ),
2463
+ envelopeShape("task.artifact_sealed", REQUIRED_TASK_ID, OPTIONAL_SEQ),
2464
+ envelopeShape("task.await_approval_sealed", REQUIRED_TASK_ID, OPTIONAL_SEQ),
2465
+ // E2EE key package notice (#654 E2c-3), appended for the same reason.
2466
+ envelopeShape("e2ee.key_package.available", FORBIDDEN_TASK_ID, REQUIRED_SEQ)
2032
2467
  ]);
2033
2468
  function isServerToDaemonType(type) {
2034
2469
  return SERVER_TO_DAEMON_TYPES.includes(type);
@@ -2229,6 +2664,7 @@ var EventsPollResponseSchema = z.object({
2229
2664
  ingress: ActivityIngressSchema
2230
2665
  });
2231
2666
  var MAX_MESSAGES_PER_BATCH = 256;
2667
+ var MESSAGES_SEND_MAX_BODY_BYTES = 2 * 1024 * 1024;
2232
2668
  var MessagesSendRequestSchema = z.object({
2233
2669
  messages: z.array(EnvelopeSchema).max(MAX_MESSAGES_PER_BATCH)
2234
2670
  });
@@ -2343,6 +2779,10 @@ var BYOK_RECORD_ROUTE = "/byok/records/:kind/:key";
2343
2779
  function byokRecordPath(kind, key) {
2344
2780
  return `/byok/records/${encodeURIComponent(kind)}/${encodeURIComponent(key)}`;
2345
2781
  }
2782
+ var BYOK_E2EE_MEMBER_KEY_PATH = "/byok/e2ee/member-key";
2783
+ var BYOK_E2EE_CHAIN_PATH = "/byok/e2ee/chain";
2784
+ var BYOK_E2EE_KEY_PACKAGES_PATH = "/byok/e2ee/key-packages";
2785
+ var BYOK_E2EE_PAIRING_MAC_PATH = "/byok/e2ee/pairing-mac";
2346
2786
  var BYOK_SKILL_PACKS_PATH = "/byok/skill-packs";
2347
2787
  var BYOK_SKILL_PACK_FILE_ROUTE = "/byok/skill-packs/:name/files/:path";
2348
2788
  function byokSkillPackFilePath(name, path) {
@@ -2551,6 +2991,6 @@ function composeBotTurnOutcomeSchema(fragments, required = []) {
2551
2991
  return admitted.canonical;
2552
2992
  }
2553
2993
 
2554
- export { AGENT_CONTENT_ARTIFACT_READ_CAPABILITY, AGENT_CONTENT_TRANSCRIPT_READ_CAPABILITY, AGENT_CONTENT_WORKSPACE_READ_CAPABILITY, AGENT_EGRESS_FRESH_SESSION_CAPABILITY, AGENT_EGRESS_POLICY_CAPABILITY, AGENT_EGRESS_RELIABLE_ACK_CAPABILITY, AGENT_EVENT_SPILL_UNSTORED_REASON_MAX_LENGTH, AGENT_HOME_MEMORY_DIGEST_MAX_BYTES, AGENT_HOME_MEMORY_DIGEST_MAX_FILES, AGENT_HOME_MEMORY_PATH_MAX_LENGTH, AGENT_HOME_PROJECTION_CAPABILITY, AGENT_HOME_PROJECTION_MAX_BYTES, AGENT_HOME_PROJECTION_PROFILE_REVISION_MAXIMUM, AGENT_HOME_READERS_CAPABILITY, AGENT_INPUT_PREPARATION_CAPABILITY, AGENT_MEMORY_INTENT_APPROVAL_REF_MAX_BYTES, AGENT_MEMORY_INTENT_CAPABILITY, AGENT_MEMORY_INTENT_CONTENT_MAX_BYTES, AGENT_MEMORY_INTENT_FETCH_DISPOSITIONS, AGENT_MEMORY_INTENT_FETCH_DISPOSITIONS_BY_RESERVATION, AGENT_MEMORY_INTENT_HOST_TERMINAL_CODES, AGENT_MEMORY_INTENT_OPERATIONS, AGENT_MEMORY_INTENT_PATH_MAX_BYTES, AGENT_MEMORY_INTENT_READBACK_DISPOSITIONS, AGENT_MEMORY_INTENT_REJECTION_CODES, AGENT_MEMORY_INTENT_RESERVATIONS, AGENT_MEMORY_MAX_SNAPSHOT_BYTES, AGENT_MEMORY_MAX_SNAPSHOT_FILES, AGENT_MEMORY_PROJECTION_CAPABILITY, AGENT_MEMORY_PROJECTION_MAX_ORDERING_VALUE, AGENT_MEMORY_PROJECTION_MAX_REDACTED_BYTES, AGENT_MESSAGE_DRAFT_FRAME_MAX_BYTES, AGENT_MESSAGE_EGRESS_CAPABILITY, AGENT_MESSAGE_MAX_BYTES, AGENT_REF_MAX_BYTES, ActivityIngressSchema, AgentContentActorKindSchema, AgentContentActorSchema, AgentContentDecodeAsSchema, AgentContentMimeTypeSchema, AgentContentReadDecisionSchema, AgentContentReadDenialReasonSchema, AgentContentReadPayloadSchema, AgentContentReadSurfaceSchema, AgentContentReceiptPayloadSchema, AgentEgressAckPayloadSchema, AgentEgressActivityPolicySchema, AgentEgressContentHashSchema, AgentEgressDropReasonSchema, AgentEgressLaneSchema, AgentEgressPolicyRevisionSchema, AgentEgressPolicySchema, AgentEgressReliablePayloadSchema, AgentEventOrUnknownSchema, AgentEventSchema, AgentEventSpillSchema, AgentHomeAccessSchema, AgentHomeProjectionAgentRefSchema, AgentHomeProjectionCompletionRequestSchema, AgentHomeProjectionHashSchema, AgentHomeProjectionOutcomeSchema, AgentHomeProjectionPayloadSchema, AgentHomeProjectionProfileRevisionSchema, AgentHomeProjectionReadbackSchema, AgentHomeProjectionStatusSchema, AgentHomeProjectionValueSchema, AgentInputPreparationPayloadSchema, AgentMemoryIntentApprovalRefSchema, AgentMemoryIntentAvailablePayloadSchema, AgentMemoryIntentCompletionSchema, AgentMemoryIntentContentSchema, AgentMemoryIntentFetchRequestSchema, AgentMemoryIntentFetchResponseSchema, AgentMemoryIntentFileObservationSchema, AgentMemoryIntentHostTerminalCodeSchema, AgentMemoryIntentOperationDigestSchema, AgentMemoryIntentOperationSchema, AgentMemoryIntentPathSchema, AgentMemoryIntentReadbackDispositionSchema, AgentMemoryIntentReadbackSchema, AgentMemoryIntentRejectionCodeSchema, AgentMemoryIntentReservationSchema, AgentMemoryIntentRevisionSchema, AgentMemoryIntentV1Schema, AgentMemoryProjectionCommitRequestSchema, AgentMemoryProjectionCommitResponseSchema, AgentMemoryProjectionEraseResultSchema, AgentMemoryProjectionGrantRefSchema, AgentMemoryProjectionMeteringReceiptSchema, AgentMemoryProjectionMutationSchema, AgentMemoryProjectionReceiptSchema, AgentMemoryProjectionSessionRefSchema, AgentMemoryProjectionSnapshotSchema, AgentMemoryProjectionSourceSeqSchema, AgentMemoryProjectionWriterEpochSchema, AgentMessageContentTypeSchema, AgentMessageContractSchema, AgentMessageDestinationBindingSchema, AgentMessageDispositionPayloadSchema, AgentMessageDraftPayloadSchema, AgentMessageEgressRequirementSchema, AgentMessageFreshnessCursorSchema, AgentMessagePublishPayloadSchema, AgentMessageServerContextSchema, AgentRefSchema, AgentReliableQuotaPolicySchema, BOT_TURN_OUTCOME_CONTRACT, BOT_TURN_OUTCOME_LIMITS, BYOK_ACTIVITY_PATH, BYOK_AGENT_HOME_PROJECTIONS_PATH, BYOK_AGENT_HOME_PROJECTION_COMPLETION_ROUTE, BYOK_AGENT_MEMORY_PROJECTIONS_PATH, BYOK_BLOBS_PATH, BYOK_BLOB_CONTENT_ROUTE, BYOK_BLOB_FINALIZE_ROUTE, BYOK_BLOB_URL_ROUTE, BYOK_BOARD_CLAIM_ROUTE, BYOK_BOARD_PATH, BYOK_BOARD_STATUS_ROUTE, BYOK_BOARD_STREAM_PATH, BYOK_BOARD_UNCLAIM_ROUTE, BYOK_CAPABILITIES_PATH, BYOK_CHALLENGE_PATH, BYOK_EVENTS_PATH, BYOK_INPUT_PREPARATIONS_PATH, BYOK_INPUT_PREPARATION_COMPLETION_ROUTE, BYOK_INPUT_PREPARATION_STATUS_ROUTE, BYOK_MESSAGES_PATH, BYOK_PAIR_PATH, BYOK_PRESENCE_PATH, BYOK_RECORDS_PATH, BYOK_RECORD_ROUTE, BYOK_SKILL_PACKS_PATH, BYOK_SKILL_PACK_FILE_ROUTE, BYOK_TOKEN_PATH, BlobDownloadUrlResponseSchema, BlobRefSchema, BotTurnOutcomeSchemaError, CAPABILITY_FLAGS, CONFIGURED_TOOLSETS_MAX_ITEMS, CONTENT_HASH_RE, CUSTOM_HARNESS_CAPABILITY, ChallengeRequestSchema, ChallengeResponseSchema, ConfiguredToolsetsSchema, ConnAckPayloadSchema, ConnHelloPayloadSchema, ContentReadPolicySchema, CreateBlobRequestSchema, CreateBlobResponseSchema, DAEMON_TO_SERVER_TYPES, DispatchSelectionSchema, EnvelopeParseError, EnvelopeSchema, EnvelopeValidationError, EventsPollQuerySchema, EventsPollResponseSchema, HOST_MCP_TASK_CONTEXT_CAPABILITY, HarnessIdSchema, HarnessInfoSchema, HarnessInventorySchema, INPUT_PREPARATION_WIRE_VERSION, InputPreparationAccountingPolicyRefSchema, InputPreparationArtifactSummarySchema, InputPreparationBindingSchema, InputPreparationCompletionRequestSchema, InputPreparationContentHashSchema, InputPreparationContextDocumentSchema, InputPreparationCounterEvidenceSchema, InputPreparationCounterProviderEvidenceSchema, InputPreparationCounterTargetSchema, InputPreparationHostCanonicalAssistantMessageSchema, InputPreparationMessageSchema, InputPreparationModelCostSchema, InputPreparationModelSchema, InputPreparationOfferBindingSchema, InputPreparationOptionsSchema, InputPreparationPolicyRevisionSchema, InputPreparationProfileIdSchema, InputPreparationProjectionSchema, InputPreparationPromptSnapshotSchema, InputPreparationReadbackSchema, InputPreparationReadinessReasonSchema, InputPreparationReceiptSummarySchema, InputPreparationReferenceSchema, InputPreparationRejectionReasonSchema, InputPreparationResidualKeySchema, InputPreparationResidualValueClassSchema, InputPreparationRuntimeIdentitySchema, InputPreparationSelectionSchema, InputPreparationSourceSchema, InputPreparationStateSchema, InputPreparationStatusQuerySchema, InputPreparationStatusSchema, InputPreparationUserMessageSchema, KNOWN_AGENT_EVENT_TYPES, MAILBOX_READ_AHEAD_CAPABILITY, MAILBOX_READ_AHEAD_MAX_SEQS, MAX_MESSAGES_PER_BATCH, MESSAGE_PAYLOAD_SCHEMAS, MESSAGE_TYPES, MessageSendOutcomeSchema, MessagesSendRequestSchema, MessagesSendResponseSchema, OUTBOUND_REFUSAL_REASONS, PAIR_RESPONSE_TENANT_ID_MAX_LENGTH, PREPARED_AGENT_MEMORY_MODES, PROTOCOL_VERSION, PROVIDER_MODEL_CAPABILITIES, PROVIDER_PROFILE_BINDING_CAPABILITY, PROVIDER_PROVISIONING_CAPABILITY, PROVIDER_PROVISIONING_DISPOSITIONS, PROVIDER_PROVISIONING_HOST_TERMINAL_CODES, PROVIDER_PROVISIONING_KEY_CHECK_RESULTS, PROVIDER_PROVISIONING_OPERATIONS, PROVIDER_PROVISIONING_OPERATION_GENERATION_MAXIMUM, PROVIDER_PROVISIONING_REJECTION_CODES, PROVIDER_SECRET_SEALING_KEY_REGISTER_OPERATION, PairRequestSchema, PairResponseSchema, PairResponseTenantIdSchema, PreparedAgentMemoryModeSchema, PresencePublishRequestSchema, ProtocolError, ProtocolVersionNumberSchema, ProviderModelCapabilitySchema, ProviderProfileBindingSchema, ProviderProfileHashSchema, ProviderProfileRefSchema, ProviderProfileRevisionSchema, ProviderProvisioningAvailablePayloadSchema, ProviderProvisioningCompletionSchema, ProviderProvisioningDispositionSchema, ProviderProvisioningKeyCheckResultSchema, ProviderProvisioningKeyCheckSchema, ProviderProvisioningOperationDigestSchema, ProviderProvisioningOperationGenerationSchema, ProviderProvisioningOperationSchema, ProviderProvisioningProviderStatusSchema, ProviderProvisioningReadbackSchema, ProviderProvisioningRejectionCodeSchema, RESULT_DOCUMENT_MAX_BYTES, RESULT_ISSUES_MAX_BYTES, RESULT_ISSUES_MAX_COUNT, RESULT_JSON_MAX_DEPTH, RESULT_OUTCOME_MAX_BYTES, RESULT_SCHEMA_INSTANCE_TYPES, RESULT_SCHEMA_KEYWORDS, RESULT_SCHEMA_MAX_BYTES, RESULT_SCHEMA_MAX_DEPTH, ROUTINE_DAYS_OF_WEEK, RUNTIME_IDS, RequiredToolsetsSchema, ResultDocumentSchemaSchema, RuntimeCapabilitiesSchema, RuntimeIdSchema, RuntimeInfoSchema, SERVER_TO_DAEMON_TYPES, STRICT_AGENT_ONLY_CAPABILITY, TASK_OFFER_TYPES, TASK_STATES, TASK_TRANSITIONS, TERMINAL_INFERENCE_USAGE_CLIENT_VERSION_MAX_LENGTH, TERMINAL_INFERENCE_USAGE_MAX_DURATION_MS, TERMINAL_INFERENCE_USAGE_MAX_TOKENS, TERMINAL_INFERENCE_USAGE_MODEL_MAX_LENGTH, TERMINAL_INFERENCE_USAGE_PROVIDER_MAX_LENGTH, TERMINAL_PROJECTION_SELECTION_CAPABILITY, TaskApprovalResolvedPayloadSchema, TaskApprovePayloadSchema, TaskArtifactPayloadSchema, TaskAwaitApprovalPayloadSchema, TaskCancelPayloadSchema, TaskCancelledPayloadSchema, TaskClaimPayloadSchema, TaskCompletePayloadSchema, TaskDeclinePayloadSchema, TaskFailPayloadSchema, TaskOfferForAgentPayloadSchema, TaskOfferForAgentWithEgressFreshPayloadSchema, TaskOfferForAgentWithEgressPayloadSchema, TaskOfferPayloadSchema, TaskOfferPreparedPayloadSchema, TaskOfferWithToolsetsPayloadSchema, TaskProgressPayloadSchema, TaskRejectPayloadSchema, TaskStartedPayloadSchema, TaskSteerPayloadSchema, TerminalAgentHomeMemoryChangeSchema, TerminalAgentHomeProjectionSchema, TerminalInferenceUsageSchema, TerminalPreparedObservationSchema, TerminalProjectionContractSchema, TerminalProjectionSelectionSchema, TokenRequestSchema, TokenResponseSchema, ToolsetIdSchema, UnknownAgentEventSchema, UnknownMessageTypeError, WIRE_ADDITIONS, agentMemoryIntentFetchResponseSchemaFor, agentMemoryProjectionBase64UrlByteLength, botTurnOutcomeFragments, byokAgentHomeProjectionCompletionPath, byokBlobContentPath, byokBlobFinalizePath, byokBlobUrlPath, byokInputPreparationCompletionPath, byokInputPreparationStatusPath, byokRecordPath, byokSkillPackFilePath, canTransition, checkResultDocument, checkResultSchema, composeBotTurnOutcomeSchema, createEnvelope, decodeEnvelope, encodeEnvelope, isKnownAgentEvent, isPreparedAgentMemoryMode, isServerToDaemonType, isTaskOfferType, parseMessage, partitionAgentEvents, requiredReceiverCapabilities, resultOutcomeMaxBytes, validateResultOutcome };
2994
+ export { AGENT_CONTENT_ARTIFACT_READ_CAPABILITY, AGENT_CONTENT_TRANSCRIPT_READ_CAPABILITY, AGENT_CONTENT_WORKSPACE_READ_CAPABILITY, AGENT_EGRESS_FRESH_SESSION_CAPABILITY, AGENT_EGRESS_POLICY_CAPABILITY, AGENT_EGRESS_RELIABLE_ACK_CAPABILITY, AGENT_EVENT_SPILL_UNSTORED_REASON_MAX_LENGTH, AGENT_HOME_MEMORY_DIGEST_MAX_BYTES, AGENT_HOME_MEMORY_DIGEST_MAX_FILES, AGENT_HOME_MEMORY_PATH_MAX_LENGTH, AGENT_HOME_PROJECTION_CAPABILITY, AGENT_HOME_PROJECTION_MAX_BYTES, AGENT_HOME_PROJECTION_PROFILE_REVISION_MAXIMUM, AGENT_HOME_READERS_CAPABILITY, AGENT_INPUT_PREPARATION_CAPABILITY, AGENT_MEMORY_INTENT_APPROVAL_REF_MAX_BYTES, AGENT_MEMORY_INTENT_CAPABILITY, AGENT_MEMORY_INTENT_CONTENT_MAX_BYTES, AGENT_MEMORY_INTENT_FETCH_DISPOSITIONS, AGENT_MEMORY_INTENT_FETCH_DISPOSITIONS_BY_RESERVATION, AGENT_MEMORY_INTENT_HOST_TERMINAL_CODES, AGENT_MEMORY_INTENT_OPERATIONS, AGENT_MEMORY_INTENT_PATH_MAX_BYTES, AGENT_MEMORY_INTENT_READBACK_DISPOSITIONS, AGENT_MEMORY_INTENT_REJECTION_CODES, AGENT_MEMORY_INTENT_RESERVATIONS, AGENT_MEMORY_MAX_SNAPSHOT_BYTES, AGENT_MEMORY_MAX_SNAPSHOT_FILES, AGENT_MEMORY_PROJECTION_CAPABILITY, AGENT_MEMORY_PROJECTION_MAX_ORDERING_VALUE, AGENT_MEMORY_PROJECTION_MAX_REDACTED_BYTES, AGENT_MEMORY_READ_IF_ADMITTED_CAPABILITY, AGENT_MEMORY_SELECTION_CAPABILITY, AGENT_MESSAGE_DRAFT_FRAME_MAX_BYTES, AGENT_MESSAGE_EGRESS_CAPABILITY, AGENT_MESSAGE_MAX_BYTES, AGENT_REF_MAX_BYTES, ActivityIngressSchema, AgentContentActorKindSchema, AgentContentActorSchema, AgentContentDecodeAsSchema, AgentContentMimeTypeSchema, AgentContentReadDecisionSchema, AgentContentReadDenialReasonSchema, AgentContentReadPayloadSchema, AgentContentReadSurfaceSchema, AgentContentReceiptPayloadSchema, AgentEgressAckPayloadSchema, AgentEgressActivityPolicySchema, AgentEgressContentHashSchema, AgentEgressDropReasonSchema, AgentEgressLaneSchema, AgentEgressPolicyRevisionSchema, AgentEgressPolicySchema, AgentEgressReliablePayloadSchema, AgentEventOrUnknownSchema, AgentEventSchema, AgentEventSpillSchema, AgentHomeAccessSchema, AgentHomeProjectionAgentRefSchema, AgentHomeProjectionCompletionRequestSchema, AgentHomeProjectionHashSchema, AgentHomeProjectionOutcomeSchema, AgentHomeProjectionPayloadSchema, AgentHomeProjectionProfileRevisionSchema, AgentHomeProjectionReadbackSchema, AgentHomeProjectionStatusSchema, AgentHomeProjectionValueSchema, AgentInputPreparationPayloadSchema, AgentMemoryIntentApprovalRefSchema, AgentMemoryIntentAvailablePayloadSchema, AgentMemoryIntentCompletionSchema, AgentMemoryIntentContentSchema, AgentMemoryIntentFetchRequestSchema, AgentMemoryIntentFetchResponseSchema, AgentMemoryIntentFileObservationSchema, AgentMemoryIntentHostTerminalCodeSchema, AgentMemoryIntentOperationDigestSchema, AgentMemoryIntentOperationSchema, AgentMemoryIntentPathSchema, AgentMemoryIntentReadbackDispositionSchema, AgentMemoryIntentReadbackSchema, AgentMemoryIntentRejectionCodeSchema, AgentMemoryIntentReservationSchema, AgentMemoryIntentRevisionSchema, AgentMemoryIntentV1Schema, AgentMemoryProjectionCommitRequestSchema, AgentMemoryProjectionCommitResponseSchema, AgentMemoryProjectionEraseResultSchema, AgentMemoryProjectionGrantRefSchema, AgentMemoryProjectionMeteringReceiptSchema, AgentMemoryProjectionMutationSchema, AgentMemoryProjectionReceiptSchema, AgentMemoryProjectionSessionRefSchema, AgentMemoryProjectionSnapshotSchema, AgentMemoryProjectionSourceSeqSchema, AgentMemoryProjectionWriterEpochSchema, AgentMemorySelectionSchema, AgentMessageContentTypeSchema, AgentMessageContractSchema, AgentMessageDestinationBindingSchema, AgentMessageDispositionPayloadSchema, AgentMessageDraftPayloadSchema, AgentMessageEgressRequirementSchema, AgentMessageFreshnessCursorSchema, AgentMessagePublishPayloadSchema, AgentMessageServerContextSchema, AgentRefSchema, AgentReliableQuotaPolicySchema, BOT_TURN_OUTCOME_CONTRACT, BOT_TURN_OUTCOME_LIMITS, BYOK_ACTIVITY_PATH, BYOK_AGENT_HOME_PROJECTIONS_PATH, BYOK_AGENT_HOME_PROJECTION_COMPLETION_ROUTE, BYOK_AGENT_MEMORY_PROJECTIONS_PATH, BYOK_BLOBS_PATH, BYOK_BLOB_CONTENT_ROUTE, BYOK_BLOB_FINALIZE_ROUTE, BYOK_BLOB_URL_ROUTE, BYOK_BOARD_CLAIM_ROUTE, BYOK_BOARD_PATH, BYOK_BOARD_STATUS_ROUTE, BYOK_BOARD_STREAM_PATH, BYOK_BOARD_UNCLAIM_ROUTE, BYOK_CAPABILITIES_PATH, BYOK_CHALLENGE_PATH, BYOK_E2EE_CHAIN_PATH, BYOK_E2EE_KEY_PACKAGES_PATH, BYOK_E2EE_MEMBER_KEY_PATH, BYOK_E2EE_PAIRING_MAC_PATH, BYOK_EVENTS_PATH, BYOK_INPUT_PREPARATIONS_PATH, BYOK_INPUT_PREPARATION_COMPLETION_ROUTE, BYOK_INPUT_PREPARATION_STATUS_ROUTE, BYOK_MESSAGES_PATH, BYOK_PAIR_PATH, BYOK_PRESENCE_PATH, BYOK_RECORDS_PATH, BYOK_RECORD_ROUTE, BYOK_SKILL_PACKS_PATH, BYOK_SKILL_PACK_FILE_ROUTE, BYOK_TOKEN_PATH, BlobDownloadUrlResponseSchema, BlobRefSchema, BotTurnOutcomeSchemaError, CAPABILITY_FLAGS, CONFIGURED_TOOLSETS_MAX_ITEMS, CONTENT_HASH_RE, CUSTOM_HARNESS_CAPABILITY, ChallengeRequestSchema, ChallengeResponseSchema, ConfiguredToolsetsSchema, ConnAckPayloadSchema, ConnHelloPayloadSchema, ContentReadPolicySchema, CreateBlobRequestSchema, CreateBlobResponseSchema, DAEMON_TO_SERVER_TYPES, DispatchSelectionSchema, E2EE_MEMBER_CHAIN_APPEND_MAX_ENTRIES, E2EE_MEMBER_CHAIN_APPEND_OPERATION, E2EE_MEMBER_CHAIN_ENTRY_MAX_BYTES, E2EE_MEMBER_CHAIN_OPS, E2EE_MEMBER_CHAIN_READ_MAX_ENTRIES, E2EE_MEMBER_KEY_REGISTER_OPERATION, E2EE_SCOPE_ID_MAX_LENGTH, E2EE_SCOPE_KEY_PACKAGE_PUT_MAX, E2EE_SCOPE_KEY_PACKAGE_PUT_OPERATION, E2eeClientPairingMacSchema, E2eeKeyPackageAvailablePayloadSchema, E2eeMemberChainEntrySchema, E2eeMemberKeyBundleSchema, E2eeMemberKeyRegisterRequestSchema, E2eePairingMacSchema, E2eeScopeKeyPackageSchema, EnvelopeParseError, EnvelopeSchema, EnvelopeValidationError, EventsPollQuerySchema, EventsPollResponseSchema, HOST_MCP_TASK_CONTEXT_CAPABILITY, HarnessIdSchema, HarnessInfoSchema, HarnessInventorySchema, INPUT_PREPARATION_WIRE_VERSION, InputPreparationAccountingPolicyRefSchema, InputPreparationArtifactSummarySchema, InputPreparationBindingSchema, InputPreparationCompletionRequestSchema, InputPreparationContentHashSchema, InputPreparationContextDocumentSchema, InputPreparationCounterEvidenceSchema, InputPreparationCounterProviderEvidenceSchema, InputPreparationCounterTargetSchema, InputPreparationHostCanonicalAssistantMessageSchema, InputPreparationMessageSchema, InputPreparationModelCostSchema, InputPreparationModelSchema, InputPreparationOfferBindingSchema, InputPreparationOptionsSchema, InputPreparationPolicyRevisionSchema, InputPreparationProfileIdSchema, InputPreparationProjectionSchema, InputPreparationPromptSnapshotSchema, InputPreparationReadbackSchema, InputPreparationReadinessReasonSchema, InputPreparationReceiptSummarySchema, InputPreparationReferenceSchema, InputPreparationRejectionReasonSchema, InputPreparationResidualKeySchema, InputPreparationResidualValueClassSchema, InputPreparationRuntimeIdentitySchema, InputPreparationSelectionSchema, InputPreparationSourceSchema, InputPreparationStateSchema, InputPreparationStatusQuerySchema, InputPreparationStatusSchema, InputPreparationUserMessageSchema, KNOWN_AGENT_EVENT_TYPES, MAILBOX_READ_AHEAD_CAPABILITY, MAILBOX_READ_AHEAD_MAX_SEQS, MAX_MESSAGES_PER_BATCH, MESSAGES_SEND_MAX_BODY_BYTES, MESSAGE_PAYLOAD_SCHEMAS, MESSAGE_TYPES, MessageSendOutcomeSchema, MessagesSendRequestSchema, MessagesSendResponseSchema, OUTBOUND_REFUSAL_REASONS, PAIR_RESPONSE_TENANT_ID_MAX_LENGTH, PREPARED_AGENT_MEMORY_MODES, PROTOCOL_VERSION, PROVIDER_MODEL_CAPABILITIES, PROVIDER_PROFILE_BINDING_CAPABILITY, PROVIDER_PROVISIONING_CAPABILITY, PROVIDER_PROVISIONING_DISPOSITIONS, PROVIDER_PROVISIONING_HOST_TERMINAL_CODES, PROVIDER_PROVISIONING_KEY_CHECK_RESULTS, PROVIDER_PROVISIONING_OPERATIONS, PROVIDER_PROVISIONING_OPERATION_GENERATION_MAXIMUM, PROVIDER_PROVISIONING_REJECTION_CODES, PROVIDER_SECRET_SEALING_KEY_REGISTER_OPERATION, PairRequestSchema, PairResponseSchema, PairResponseTenantIdSchema, PreparedAgentMemoryModeSchema, PresencePublishRequestSchema, ProtocolError, ProtocolVersionNumberSchema, ProviderModelCapabilitySchema, ProviderProfileBindingSchema, ProviderProfileHashSchema, ProviderProfileRefSchema, ProviderProfileRevisionSchema, ProviderProvisioningAvailablePayloadSchema, ProviderProvisioningCompletionSchema, ProviderProvisioningDispositionSchema, ProviderProvisioningKeyCheckResultSchema, ProviderProvisioningKeyCheckSchema, ProviderProvisioningOperationDigestSchema, ProviderProvisioningOperationGenerationSchema, ProviderProvisioningOperationSchema, ProviderProvisioningProviderStatusSchema, ProviderProvisioningReadbackSchema, ProviderProvisioningRejectionCodeSchema, RESULT_DOCUMENT_MAX_BYTES, RESULT_ISSUES_MAX_BYTES, RESULT_ISSUES_MAX_COUNT, RESULT_JSON_MAX_DEPTH, RESULT_OUTCOME_MAX_BYTES, RESULT_SCHEMA_INSTANCE_TYPES, RESULT_SCHEMA_KEYWORDS, RESULT_SCHEMA_MAX_BYTES, RESULT_SCHEMA_MAX_DEPTH, ROUTINE_DAYS_OF_WEEK, RUNTIME_IDS, RequiredToolsetsSchema, ResultDocumentSchemaSchema, RuntimeCapabilitiesSchema, RuntimeIdSchema, RuntimeInfoSchema, SEALED_DECLINE_CODES, SEALED_INLINE_MAX_PADDED_LENGTH, SEALED_PAYLOAD_CAPABILITY, SEALED_PAYLOAD_CATEGORIES, SEALED_PAYLOAD_MAX_CONTENT_LENGTH, SEALED_PAYLOAD_MAX_PADDED_LENGTH, SEALED_PAYLOAD_SUITE, SEALED_PAYLOAD_V1_CATEGORIES, SEALED_PAYLOAD_VERSION, SEALED_SPLIT_TABLE, SEALED_TASK_PLAIN_CODES, SERVER_TO_DAEMON_TYPES, STRICT_AGENT_ONLY_CAPABILITY, SealedPayloadSchema, SealedTaskInputSchema, SealedTaskOutputSchema, TASK_OFFER_TYPES, TASK_STATES, TASK_TRANSITIONS, TERMINAL_INFERENCE_USAGE_CLIENT_VERSION_MAX_LENGTH, TERMINAL_INFERENCE_USAGE_MAX_DURATION_MS, TERMINAL_INFERENCE_USAGE_MAX_TOKENS, TERMINAL_INFERENCE_USAGE_MODEL_MAX_LENGTH, TERMINAL_INFERENCE_USAGE_PROVIDER_MAX_LENGTH, TERMINAL_PROJECTION_SELECTION_CAPABILITY, TaskApprovalResolvedPayloadSchema, TaskApprovePayloadSchema, TaskArtifactPayloadSchema, TaskAwaitApprovalPayloadSchema, TaskCancelPayloadSchema, TaskCancelledPayloadSchema, TaskClaimPayloadSchema, TaskCompletePayloadSchema, TaskDeclinePayloadSchema, TaskFailPayloadSchema, TaskOfferForAgentPayloadSchema, TaskOfferForAgentWithEgressFreshPayloadSchema, TaskOfferForAgentWithEgressPayloadSchema, TaskOfferPayloadSchema, TaskOfferPreparedPayloadSchema, TaskOfferWithToolsetsPayloadSchema, TaskProgressPayloadSchema, TaskRejectPayloadSchema, TaskSealingSchema, TaskStartedPayloadSchema, TaskSteerPayloadSchema, TerminalAgentHomeMemoryChangeSchema, TerminalAgentHomeProjectionSchema, TerminalInferenceUsageSchema, TerminalPreparedObservationSchema, TerminalProjectionContractSchema, TerminalProjectionSelectionSchema, TokenRequestSchema, TokenResponseSchema, ToolsetIdSchema, UnknownAgentEventSchema, UnknownMessageTypeError, WIRE_ADDITIONS, agentMemoryIntentFetchResponseSchemaFor, agentMemoryProjectionBase64UrlByteLength, botTurnOutcomeFragments, byokAgentHomeProjectionCompletionPath, byokBlobContentPath, byokBlobFinalizePath, byokBlobUrlPath, byokInputPreparationCompletionPath, byokInputPreparationStatusPath, byokRecordPath, byokSkillPackFilePath, canTransition, checkResultDocument, checkResultSchema, composeBotTurnOutcomeSchema, createEnvelope, decodeEnvelope, encodeEnvelope, isKnownAgentEvent, isPreparedAgentMemoryMode, isSealedMessageType, isSealedTaskPlainOutput, isServerToDaemonType, isTaskOfferType, parseMessage, partitionAgentEvents, requiredReceiverCapabilities, resultOutcomeMaxBytes, sealedBase64UrlByteLength, sealedPayloadPaddedLength, validateResultOutcome };
2555
2995
  //# sourceMappingURL=index.js.map
2556
2996
  //# sourceMappingURL=index.js.map