@byok-sdk/protocol 0.29.0 → 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.
@@ -1,4 +1,6 @@
1
1
  import { z } from 'zod';
2
+ import { ProviderProvisioningAvailablePayloadSchema } from './provider-provisioning';
3
+ import { E2eeKeyPackageAvailablePayloadSchema } from './e2ee-member';
2
4
  import { type PlainJsonCheck } from './plain-json';
3
5
  export declare const RuntimeIdSchema: z.ZodEnum<{
4
6
  claude: "claude";
@@ -197,6 +199,8 @@ export type DispatchSelection = z.infer<typeof DispatchSelectionSchema>;
197
199
  * envelope's `task_id` (M1 gap #7 — single source of truth for routing).
198
200
  */
199
201
  export declare const TaskOfferPayloadSchema: z.ZodObject<{
202
+ sealed: z.ZodOptional<z.ZodNever>;
203
+ sealing: z.ZodOptional<z.ZodNever>;
200
204
  instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
201
205
  blobRef: z.ZodObject<{
202
206
  blobId: z.ZodString;
@@ -258,6 +262,8 @@ export declare const RequiredToolsetsSchema: z.ZodArray<z.ZodString>;
258
262
  * strict because every field here affects execution authority.
259
263
  */
260
264
  export declare const TaskOfferWithToolsetsPayloadSchema: z.ZodObject<{
265
+ sealed: z.ZodOptional<z.ZodNever>;
266
+ sealing: z.ZodOptional<z.ZodNever>;
261
267
  instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
262
268
  blobRef: z.ZodObject<{
263
269
  blobId: z.ZodString;
@@ -321,17 +327,32 @@ export type TaskOfferWithToolsetsPayload = z.infer<typeof TaskOfferWithToolsetsP
321
327
  */
322
328
  export declare const AgentHomeAccessSchema: z.ZodLiteral<"memory-reader">;
323
329
  export type AgentHomeAccess = z.infer<typeof AgentHomeAccessSchema>;
330
+ /**
331
+ * The `agentMemory` of an ordinary Agent offer: the prepared modes plus
332
+ * `read-if-admitted`. That value runs as `read` when the daemon admits the
333
+ * memory MCP and as `none` when it does not. A host sends it only to a device
334
+ * that advertises `agent-memory-read-if-admitted`. Prepared offers refuse it.
335
+ */
336
+ export declare const AgentMemorySelectionSchema: z.ZodEnum<{
337
+ none: "none";
338
+ read: "read";
339
+ "read-if-admitted": "read-if-admitted";
340
+ "read-write": "read-write";
341
+ }>;
342
+ export type AgentMemorySelection = z.infer<typeof AgentMemorySelectionSchema>;
324
343
  /**
325
344
  * Strict additive offer for a durable host-owned Agent. An older daemon that
326
345
  * does not advertise `agent-home-contract` skips this distinct message type
327
346
  * instead of stripping identity and applying legacy workspace semantics.
328
347
  *
329
- * `agentMemory` selects the Agent memory of this one task, with the values of
330
- * the prepared offer. Absent keeps the daemon admission. A host sends it only
331
- * to a device that advertises `agent-memory-selection`. The prepared offer
332
- * replaces it with its own required selection.
348
+ * `agentMemory` selects the Agent memory of this one task (see
349
+ * {@link AgentMemorySelectionSchema}). Absent keeps the daemon admission. A
350
+ * host sends it only to a device that advertises `agent-memory-selection`. The
351
+ * prepared offer replaces it with its own required selection.
333
352
  */
334
353
  export declare const TaskOfferForAgentPayloadSchema: z.ZodObject<{
354
+ sealed: z.ZodOptional<z.ZodNever>;
355
+ sealing: z.ZodOptional<z.ZodNever>;
335
356
  instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
336
357
  blobRef: z.ZodObject<{
337
358
  blobId: z.ZodString;
@@ -349,6 +370,7 @@ export declare const TaskOfferForAgentPayloadSchema: z.ZodObject<{
349
370
  agentMemory: z.ZodOptional<z.ZodEnum<{
350
371
  none: "none";
351
372
  read: "read";
373
+ "read-if-admitted": "read-if-admitted";
352
374
  "read-write": "read-write";
353
375
  }>>;
354
376
  requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -404,6 +426,8 @@ export type TaskOfferForAgentPayload = z.infer<typeof TaskOfferForAgentPayloadSc
404
426
  * with an unconsumed egress declaration.
405
427
  */
406
428
  export declare const TaskOfferForAgentWithEgressPayloadSchema: z.ZodObject<{
429
+ sealed: z.ZodOptional<z.ZodNever>;
430
+ sealing: z.ZodOptional<z.ZodNever>;
407
431
  instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
408
432
  blobRef: z.ZodObject<{
409
433
  blobId: z.ZodString;
@@ -421,6 +445,7 @@ export declare const TaskOfferForAgentWithEgressPayloadSchema: z.ZodObject<{
421
445
  agentMemory: z.ZodOptional<z.ZodEnum<{
422
446
  none: "none";
423
447
  read: "read";
448
+ "read-if-admitted": "read-if-admitted";
424
449
  "read-write": "read-write";
425
450
  }>>;
426
451
  requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -513,6 +538,8 @@ export type TaskOfferForAgentWithEgressPayload = z.infer<typeof TaskOfferForAgen
513
538
  * interpreted as a fresh execution by an older daemon.
514
539
  */
515
540
  export declare const TaskOfferForAgentWithEgressFreshPayloadSchema: z.ZodObject<{
541
+ sealed: z.ZodOptional<z.ZodNever>;
542
+ sealing: z.ZodOptional<z.ZodNever>;
516
543
  instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
517
544
  blobRef: z.ZodObject<{
518
545
  blobId: z.ZodString;
@@ -530,6 +557,7 @@ export declare const TaskOfferForAgentWithEgressFreshPayloadSchema: z.ZodObject<
530
557
  agentMemory: z.ZodOptional<z.ZodEnum<{
531
558
  none: "none";
532
559
  read: "read";
560
+ "read-if-admitted": "read-if-admitted";
533
561
  "read-write": "read-write";
534
562
  }>>;
535
563
  requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -635,6 +663,8 @@ export type TaskOfferForAgentWithEgressFreshPayload = z.infer<typeof TaskOfferFo
635
663
  * and declines non-retryably on any difference; nothing here is authority.
636
664
  */
637
665
  export declare const TaskOfferPreparedPayloadSchema: z.ZodObject<{
666
+ sealed: z.ZodOptional<z.ZodNever>;
667
+ sealing: z.ZodOptional<z.ZodNever>;
638
668
  agentRef: z.ZodObject<{
639
669
  agentId: z.ZodString;
640
670
  profileRevision: z.ZodString;
@@ -1188,6 +1218,8 @@ export declare const TaskCancelPayloadSchema: z.ZodObject<{
1188
1218
  export type TaskCancelPayload = z.infer<typeof TaskCancelPayloadSchema>;
1189
1219
  /** server -> daemon: inject steering text into a running task. */
1190
1220
  export declare const TaskSteerPayloadSchema: z.ZodObject<{
1221
+ sealed: z.ZodOptional<z.ZodNever>;
1222
+ sealing: z.ZodOptional<z.ZodNever>;
1191
1223
  text: z.ZodString;
1192
1224
  }, z.core.$strip>;
1193
1225
  export type TaskSteerPayload = z.infer<typeof TaskSteerPayloadSchema>;
@@ -1258,21 +1290,13 @@ export type TaskClaimPayload = z.infer<typeof TaskClaimPayloadSchema>;
1258
1290
  export declare const TaskStartedPayloadSchema: z.ZodObject<{}, z.core.$strip>;
1259
1291
  export type TaskStartedPayload = z.infer<typeof TaskStartedPayloadSchema>;
1260
1292
  /**
1261
- * daemon -> server: decline an offer *before* claiming it (M1 gap #5) — e.g.
1262
- * no compatible/available runtime. Fail-closed rejections must use this instead of silently
1263
- * dropping the offer.
1264
- *
1265
- * Decision (see docs/protocol.md "Declined vs. Failed" for the full
1266
- * writeup): declining does *not* introduce a new `Declined` terminal state.
1267
- * It maps onto the existing `Failed` state via a new `Offered -> Failed`
1268
- * transition. `reason`/`retryable` intentionally mirror `TaskFailPayload`
1269
- * semantics, because a pre-claim decline and a post-claim failure are the same
1270
- * outcome from the dispatcher's point of view (this attempt produced no
1271
- * result; here's whether retrying — e.g. offering to a different device —
1272
- * makes sense), and keeping the state machine minimal avoids forking every
1273
- * terminal-state consumer into "Failed or Declined, handle both".
1293
+ * #654: a sealed decline code names a fixed, non-retryable outcome and
1294
+ * carries no content, so its `reason` is the code itself. A free-text reason
1295
+ * or `retryable: true` never goes with it.
1274
1296
  */
1275
1297
  export declare const TaskDeclinePayloadSchema: z.ZodObject<{
1298
+ sealed: z.ZodOptional<z.ZodNever>;
1299
+ sealing: z.ZodOptional<z.ZodNever>;
1276
1300
  reason: z.ZodString;
1277
1301
  retryable: z.ZodOptional<z.ZodBoolean>;
1278
1302
  agentRef: z.ZodOptional<z.ZodObject<{
@@ -1282,6 +1306,10 @@ export declare const TaskDeclinePayloadSchema: z.ZodObject<{
1282
1306
  code: z.ZodOptional<z.ZodEnum<{
1283
1307
  agent_home_reader_busy: "agent_home_reader_busy";
1284
1308
  agent_home_writer_busy: "agent_home_writer_busy";
1309
+ sealed_content_mac_mismatch: "sealed_content_mac_mismatch";
1310
+ sealed_key_unavailable: "sealed_key_unavailable";
1311
+ sealed_open_failed: "sealed_open_failed";
1312
+ sealing_policy_mismatch: "sealing_policy_mismatch";
1285
1313
  }>>;
1286
1314
  }, z.core.$strip>;
1287
1315
  export type TaskDeclinePayload = z.infer<typeof TaskDeclinePayloadSchema>;
@@ -1297,6 +1325,8 @@ export type TaskDeclinePayload = z.infer<typeof TaskDeclinePayloadSchema>;
1297
1325
  * unknowns instead of choking on them.
1298
1326
  */
1299
1327
  export declare const TaskProgressPayloadSchema: z.ZodObject<{
1328
+ sealed: z.ZodOptional<z.ZodNever>;
1329
+ sealing: z.ZodOptional<z.ZodNever>;
1300
1330
  seq: z.ZodNumber;
1301
1331
  events: z.ZodArray<z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
1302
1332
  type: z.ZodLiteral<"progress">;
@@ -1386,6 +1416,8 @@ export declare const TaskProgressPayloadSchema: z.ZodObject<{
1386
1416
  export type TaskProgressPayload = z.infer<typeof TaskProgressPayloadSchema>;
1387
1417
  /** daemon -> server: an artifact produced by the task, inline or by blob ref. */
1388
1418
  export declare const TaskArtifactPayloadSchema: z.ZodObject<{
1419
+ sealed: z.ZodOptional<z.ZodNever>;
1420
+ sealing: z.ZodOptional<z.ZodNever>;
1389
1421
  name: z.ZodString;
1390
1422
  contentType: z.ZodString;
1391
1423
  inline: z.ZodOptional<z.ZodString>;
@@ -1415,6 +1447,8 @@ export type TaskArtifactPayload = z.infer<typeof TaskArtifactPayloadSchema>;
1415
1447
  * pending" — the same behavior every server had before this field existed.
1416
1448
  */
1417
1449
  export declare const TaskAwaitApprovalPayloadSchema: z.ZodObject<{
1450
+ sealed: z.ZodOptional<z.ZodNever>;
1451
+ sealing: z.ZodOptional<z.ZodNever>;
1418
1452
  summary: z.ZodString;
1419
1453
  approvalId: z.ZodOptional<z.ZodString>;
1420
1454
  }, z.core.$strip>;
@@ -1630,6 +1664,8 @@ export type TerminalAgentHomeMemoryChange = z.infer<typeof TerminalAgentHomeMemo
1630
1664
  * `RESULT_OUTCOME_MAX_BYTES`).
1631
1665
  */
1632
1666
  export declare const TaskCompletePayloadSchema: z.ZodObject<{
1667
+ sealed: z.ZodOptional<z.ZodNever>;
1668
+ sealing: z.ZodOptional<z.ZodNever>;
1633
1669
  harnessId: z.ZodOptional<z.ZodString>;
1634
1670
  summary: z.ZodString;
1635
1671
  finalMessage: z.ZodOptional<z.ZodString>;
@@ -1684,6 +1720,8 @@ export declare const TaskCompletePayloadSchema: z.ZodObject<{
1684
1720
  export type TaskCompletePayload = z.infer<typeof TaskCompletePayloadSchema>;
1685
1721
  /** daemon -> server: task failed. */
1686
1722
  export declare const TaskFailPayloadSchema: z.ZodObject<{
1723
+ sealed: z.ZodOptional<z.ZodNever>;
1724
+ sealing: z.ZodOptional<z.ZodNever>;
1687
1725
  recovery: z.ZodOptional<z.ZodObject<{
1688
1726
  kind: z.ZodLiteral<"daemon_interrupted">;
1689
1727
  offerId: z.ZodUUID;
@@ -1751,6 +1789,8 @@ export type TaskFailPayload = z.infer<typeof TaskFailPayloadSchema>;
1751
1789
  * trigger that moves `Claimed`/`Running`/`AwaitApproval -> Cancelled`.
1752
1790
  */
1753
1791
  export declare const TaskCancelledPayloadSchema: z.ZodObject<{
1792
+ sealed: z.ZodOptional<z.ZodNever>;
1793
+ sealing: z.ZodOptional<z.ZodNever>;
1754
1794
  harnessId: z.ZodOptional<z.ZodString>;
1755
1795
  reason: z.ZodOptional<z.ZodString>;
1756
1796
  usage: z.ZodOptional<z.ZodObject<{
@@ -1836,1629 +1876,1024 @@ export declare const TaskApprovalResolvedPayloadSchema: z.ZodObject<{
1836
1876
  at: z.ZodISODateTime;
1837
1877
  }, z.core.$strip>;
1838
1878
  export type TaskApprovalResolvedPayload = z.infer<typeof TaskApprovalResolvedPayloadSchema>;
1839
- /** Protocol-owned task-opening family; the wire registry consumes these same entries. */
1840
- declare const TASK_OFFER_PAYLOAD_SCHEMAS: {
1841
- readonly 'task.offer': z.ZodObject<{
1842
- instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1843
- blobRef: z.ZodObject<{
1844
- blobId: z.ZodString;
1845
- contentHash: z.ZodString;
1846
- size: z.ZodNumber;
1847
- contentType: z.ZodString;
1848
- url: z.ZodOptional<z.ZodString>;
1849
- }, z.core.$strip>;
1850
- }, z.core.$strict>]>;
1851
- runtime: z.ZodOptional<z.ZodEnum<{
1852
- claude: "claude";
1853
- codex: "codex";
1854
- pi: "pi";
1855
- }>>;
1856
- harnessId: z.ZodOptional<z.ZodString>;
1857
- dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1858
- lane: z.ZodLiteral<"subscription">;
1859
- runtimeId: z.ZodEnum<{
1860
- claude: "claude";
1861
- codex: "codex";
1862
- }>;
1863
- providerId: z.ZodNull;
1864
- modelId: z.ZodString;
1865
- }, z.core.$strict>, z.ZodObject<{
1866
- lane: z.ZodLiteral<"byok">;
1867
- runtimeId: z.ZodLiteral<"pi">;
1868
- providerId: z.ZodString;
1869
- modelId: z.ZodString;
1870
- }, z.core.$strict>, z.ZodObject<{
1871
- lane: z.ZodLiteral<"byok-profile">;
1872
- runtimeId: z.ZodLiteral<"pi">;
1873
- providerProfile: z.ZodObject<{
1874
- profileRef: z.ZodString;
1875
- profileRevision: z.ZodString;
1876
- profileHash: z.ZodString;
1877
- modelId: z.ZodString;
1878
- requiredCapabilities: z.ZodArray<z.ZodEnum<{
1879
- "image-input": "image-input";
1880
- }>>;
1881
- }, z.core.$strict>;
1882
- }, z.core.$strict>], "lane">>;
1883
- sessionRef: z.ZodOptional<z.ZodString>;
1884
- workspaceHint: z.ZodOptional<z.ZodString>;
1885
- limits: z.ZodOptional<z.ZodObject<{
1886
- maxDurationMs: z.ZodOptional<z.ZodNumber>;
1887
- maxTokens: z.ZodOptional<z.ZodNumber>;
1888
- }, z.core.$strip>>;
1889
- }, z.core.$strip>;
1890
- readonly 'task.offer_with_toolsets': z.ZodObject<{
1891
- instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1892
- blobRef: z.ZodObject<{
1893
- blobId: z.ZodString;
1894
- contentHash: z.ZodString;
1895
- size: z.ZodNumber;
1896
- contentType: z.ZodString;
1897
- url: z.ZodOptional<z.ZodString>;
1898
- }, z.core.$strip>;
1899
- }, z.core.$strict>]>;
1900
- runtime: z.ZodOptional<z.ZodEnum<{
1879
+ /** server -> daemon: `task.offer` of a sealed task. */
1880
+ export declare const TaskOfferSealedPayloadSchema: z.ZodObject<{
1881
+ runtime: z.ZodOptional<z.ZodEnum<{
1882
+ claude: "claude";
1883
+ codex: "codex";
1884
+ pi: "pi";
1885
+ }>>;
1886
+ harnessId: z.ZodOptional<z.ZodString>;
1887
+ dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1888
+ lane: z.ZodLiteral<"subscription">;
1889
+ runtimeId: z.ZodEnum<{
1901
1890
  claude: "claude";
1902
1891
  codex: "codex";
1903
- pi: "pi";
1904
- }>>;
1905
- harnessId: z.ZodOptional<z.ZodString>;
1906
- dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1907
- lane: z.ZodLiteral<"subscription">;
1908
- runtimeId: z.ZodEnum<{
1909
- claude: "claude";
1910
- codex: "codex";
1911
- }>;
1912
- providerId: z.ZodNull;
1913
- modelId: z.ZodString;
1914
- }, z.core.$strict>, z.ZodObject<{
1915
- lane: z.ZodLiteral<"byok">;
1916
- runtimeId: z.ZodLiteral<"pi">;
1917
- providerId: z.ZodString;
1918
- modelId: z.ZodString;
1919
- }, z.core.$strict>, z.ZodObject<{
1920
- lane: z.ZodLiteral<"byok-profile">;
1921
- runtimeId: z.ZodLiteral<"pi">;
1922
- providerProfile: z.ZodObject<{
1923
- profileRef: z.ZodString;
1924
- profileRevision: z.ZodString;
1925
- profileHash: z.ZodString;
1926
- modelId: z.ZodString;
1927
- requiredCapabilities: z.ZodArray<z.ZodEnum<{
1928
- "image-input": "image-input";
1929
- }>>;
1930
- }, z.core.$strict>;
1931
- }, z.core.$strict>], "lane">>;
1932
- sessionRef: z.ZodOptional<z.ZodString>;
1933
- workspaceHint: z.ZodOptional<z.ZodString>;
1934
- limits: z.ZodOptional<z.ZodObject<{
1935
- maxDurationMs: z.ZodOptional<z.ZodNumber>;
1936
- maxTokens: z.ZodOptional<z.ZodNumber>;
1937
- }, z.core.$strip>>;
1938
- requiredToolsets: z.ZodArray<z.ZodString>;
1939
- }, z.core.$strict>;
1940
- readonly 'task.offer_for_agent': z.ZodObject<{
1941
- instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1942
- blobRef: z.ZodObject<{
1943
- blobId: z.ZodString;
1944
- contentHash: z.ZodString;
1945
- size: z.ZodNumber;
1946
- contentType: z.ZodString;
1947
- url: z.ZodOptional<z.ZodString>;
1948
- }, z.core.$strip>;
1949
- }, z.core.$strict>]>;
1950
- agentRef: z.ZodObject<{
1951
- agentId: z.ZodString;
1892
+ }>;
1893
+ providerId: z.ZodNull;
1894
+ modelId: z.ZodString;
1895
+ }, z.core.$strict>, z.ZodObject<{
1896
+ lane: z.ZodLiteral<"byok">;
1897
+ runtimeId: z.ZodLiteral<"pi">;
1898
+ providerId: z.ZodString;
1899
+ modelId: z.ZodString;
1900
+ }, z.core.$strict>, z.ZodObject<{
1901
+ lane: z.ZodLiteral<"byok-profile">;
1902
+ runtimeId: z.ZodLiteral<"pi">;
1903
+ providerProfile: z.ZodObject<{
1904
+ profileRef: z.ZodString;
1952
1905
  profileRevision: z.ZodString;
1906
+ profileHash: z.ZodString;
1907
+ modelId: z.ZodString;
1908
+ requiredCapabilities: z.ZodArray<z.ZodEnum<{
1909
+ "image-input": "image-input";
1910
+ }>>;
1953
1911
  }, z.core.$strict>;
1954
- homeAccess: z.ZodOptional<z.ZodLiteral<"memory-reader">>;
1955
- agentMemory: z.ZodOptional<z.ZodEnum<{
1956
- none: "none";
1957
- read: "read";
1958
- "read-write": "read-write";
1959
- }>>;
1960
- requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
1961
- runtime: z.ZodOptional<z.ZodEnum<{
1962
- claude: "claude";
1963
- codex: "codex";
1964
- pi: "pi";
1912
+ }, z.core.$strict>], "lane">>;
1913
+ sessionRef: z.ZodOptional<z.ZodString>;
1914
+ workspaceHint: z.ZodOptional<z.ZodString>;
1915
+ limits: z.ZodOptional<z.ZodObject<{
1916
+ maxDurationMs: z.ZodOptional<z.ZodNumber>;
1917
+ maxTokens: z.ZodOptional<z.ZodNumber>;
1918
+ }, z.core.$strip>>;
1919
+ instruction: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1920
+ blobRef: z.ZodObject<{
1921
+ blobId: z.ZodString;
1922
+ contentHash: z.ZodString;
1923
+ size: z.ZodNumber;
1924
+ contentType: z.ZodString;
1925
+ url: z.ZodOptional<z.ZodString>;
1926
+ }, z.core.$strip>;
1927
+ }, z.core.$strict>]>>;
1928
+ sealing: z.ZodObject<{
1929
+ scopeId: z.ZodString;
1930
+ epoch: z.ZodNumber;
1931
+ categories: z.ZodArray<z.ZodEnum<{
1932
+ "task-input": "task-input";
1933
+ "task-output": "task-output";
1965
1934
  }>>;
1966
- harnessId: z.ZodOptional<z.ZodString>;
1967
- dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1968
- lane: z.ZodLiteral<"subscription">;
1969
- runtimeId: z.ZodEnum<{
1970
- claude: "claude";
1971
- codex: "codex";
1972
- }>;
1973
- providerId: z.ZodNull;
1974
- modelId: z.ZodString;
1975
- }, z.core.$strict>, z.ZodObject<{
1976
- lane: z.ZodLiteral<"byok">;
1977
- runtimeId: z.ZodLiteral<"pi">;
1978
- providerId: z.ZodString;
1979
- modelId: z.ZodString;
1980
- }, z.core.$strict>, z.ZodObject<{
1981
- lane: z.ZodLiteral<"byok-profile">;
1982
- runtimeId: z.ZodLiteral<"pi">;
1983
- providerProfile: z.ZodObject<{
1984
- profileRef: z.ZodString;
1985
- profileRevision: z.ZodString;
1986
- profileHash: z.ZodString;
1987
- modelId: z.ZodString;
1988
- requiredCapabilities: z.ZodArray<z.ZodEnum<{
1989
- "image-input": "image-input";
1990
- }>>;
1991
- }, z.core.$strict>;
1992
- }, z.core.$strict>], "lane">>;
1993
- terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1994
- mode: z.ZodLiteral<"none">;
1995
- }, z.core.$strict>, z.ZodObject<{
1996
- mode: z.ZodLiteral<"result-document">;
1997
- contract: z.ZodString;
1998
- schema: z.ZodCustom<import("./result-schema").ResultSchema, import("./result-schema").ResultSchema>;
1999
- }, z.core.$strict>], "mode">>;
2000
- sessionRef: z.ZodOptional<z.ZodString>;
2001
- limits: z.ZodOptional<z.ZodObject<{
2002
- maxDurationMs: z.ZodOptional<z.ZodNumber>;
2003
- maxTokens: z.ZodOptional<z.ZodNumber>;
2004
- }, z.core.$strip>>;
2005
1935
  }, z.core.$strict>;
2006
- readonly 'task.offer_for_agent_with_egress': z.ZodObject<{
2007
- instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
2008
- blobRef: z.ZodObject<{
2009
- blobId: z.ZodString;
2010
- contentHash: z.ZodString;
2011
- size: z.ZodNumber;
2012
- contentType: z.ZodString;
2013
- url: z.ZodOptional<z.ZodString>;
2014
- }, z.core.$strip>;
2015
- }, z.core.$strict>]>;
2016
- agentRef: z.ZodObject<{
2017
- agentId: z.ZodString;
2018
- profileRevision: z.ZodString;
1936
+ sealed: z.ZodOptional<z.ZodObject<{
1937
+ v: z.ZodLiteral<1>;
1938
+ suite: z.ZodLiteral<"byok-sealed-v1.hkdf-sha256.aes-256-gcm">;
1939
+ category: z.ZodLiteral<"task-input">;
1940
+ scope: z.ZodObject<{
1941
+ id: z.ZodString;
1942
+ epoch: z.ZodNumber;
1943
+ keyId: z.ZodString;
2019
1944
  }, z.core.$strict>;
2020
- homeAccess: z.ZodOptional<z.ZodLiteral<"memory-reader">>;
2021
- agentMemory: z.ZodOptional<z.ZodEnum<{
2022
- none: "none";
2023
- read: "read";
2024
- "read-write": "read-write";
2025
- }>>;
2026
- requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
2027
- runtime: z.ZodOptional<z.ZodEnum<{
2028
- claude: "claude";
2029
- codex: "codex";
2030
- pi: "pi";
2031
- }>>;
2032
- harnessId: z.ZodOptional<z.ZodString>;
2033
- dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2034
- lane: z.ZodLiteral<"subscription">;
2035
- runtimeId: z.ZodEnum<{
2036
- claude: "claude";
2037
- codex: "codex";
2038
- }>;
2039
- providerId: z.ZodNull;
2040
- modelId: z.ZodString;
2041
- }, z.core.$strict>, z.ZodObject<{
2042
- lane: z.ZodLiteral<"byok">;
2043
- runtimeId: z.ZodLiteral<"pi">;
2044
- providerId: z.ZodString;
2045
- modelId: z.ZodString;
2046
- }, z.core.$strict>, z.ZodObject<{
2047
- lane: z.ZodLiteral<"byok-profile">;
2048
- runtimeId: z.ZodLiteral<"pi">;
2049
- providerProfile: z.ZodObject<{
2050
- profileRef: z.ZodString;
2051
- profileRevision: z.ZodString;
2052
- profileHash: z.ZodString;
2053
- modelId: z.ZodString;
2054
- requiredCapabilities: z.ZodArray<z.ZodEnum<{
2055
- "image-input": "image-input";
2056
- }>>;
2057
- }, z.core.$strict>;
2058
- }, z.core.$strict>], "lane">>;
2059
- terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2060
- mode: z.ZodLiteral<"none">;
2061
- }, z.core.$strict>, z.ZodObject<{
2062
- mode: z.ZodLiteral<"result-document">;
2063
- contract: z.ZodString;
2064
- schema: z.ZodCustom<import("./result-schema").ResultSchema, import("./result-schema").ResultSchema>;
2065
- }, z.core.$strict>], "mode">>;
2066
- limits: z.ZodOptional<z.ZodObject<{
2067
- maxDurationMs: z.ZodOptional<z.ZodNumber>;
2068
- maxTokens: z.ZodOptional<z.ZodNumber>;
2069
- }, z.core.$strip>>;
2070
- sessionRef: z.ZodString;
2071
- egressPolicy: z.ZodObject<{
2072
- policyRevision: z.ZodString;
2073
- activity: z.ZodObject<{
2074
- delivery: z.ZodLiteral<"latest-value">;
2075
- maxCoalesceMs: z.ZodNumber;
2076
- maxEventBytes: z.ZodNumber;
2077
- }, z.core.$strict>;
2078
- reliable: z.ZodObject<{
2079
- maxPendingEventsPerAgent: z.ZodNumber;
2080
- maxPendingBytesPerAgent: z.ZodNumber;
2081
- maxPendingBytesPerTenant: z.ZodNumber;
2082
- }, z.core.$strict>;
2083
- transfers: z.ZodObject<{
2084
- workspace: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
2085
- maxBytes: z.ZodNumber;
2086
- allowedMimeTypes: z.ZodArray<z.ZodString>;
2087
- }, z.core.$strict>]>;
2088
- transcript: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
2089
- maxBytes: z.ZodNumber;
2090
- allowedMimeTypes: z.ZodArray<z.ZodString>;
2091
- }, z.core.$strict>]>;
2092
- artifact: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
2093
- maxBytes: z.ZodNumber;
2094
- allowedMimeTypes: z.ZodArray<z.ZodString>;
2095
- }, z.core.$strict>]>;
2096
- }, z.core.$strict>;
1945
+ chainHead: z.ZodObject<{
1946
+ seq: z.ZodNumber;
1947
+ hash: z.ZodString;
2097
1948
  }, z.core.$strict>;
2098
- messageEgress: z.ZodOptional<z.ZodObject<{
2099
- mode: z.ZodLiteral<"required">;
2100
- contract: z.ZodString;
2101
- contentType: z.ZodEnum<{
2102
- "text/markdown": "text/markdown";
2103
- "text/plain": "text/plain";
2104
- }>;
2105
- maxBytes: z.ZodNumber;
1949
+ sender: z.ZodString;
1950
+ salt: z.ZodString;
1951
+ nonce: z.ZodString;
1952
+ paddedLength: z.ZodNumber;
1953
+ contentMac: z.ZodString;
1954
+ ciphertext: z.ZodOptional<z.ZodString>;
1955
+ ciphertextRef: z.ZodOptional<z.ZodObject<{
1956
+ blobId: z.ZodString;
1957
+ contentHash: z.ZodString;
1958
+ size: z.ZodNumber;
1959
+ contentType: z.ZodString;
2106
1960
  }, z.core.$strict>>;
2107
- }, z.core.$strict>;
2108
- readonly 'task.offer_for_agent_with_egress_fresh': z.ZodObject<{
2109
- instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
2110
- blobRef: z.ZodObject<{
2111
- blobId: z.ZodString;
2112
- contentHash: z.ZodString;
2113
- size: z.ZodNumber;
2114
- contentType: z.ZodString;
2115
- url: z.ZodOptional<z.ZodString>;
2116
- }, z.core.$strip>;
2117
- }, z.core.$strict>]>;
2118
- agentRef: z.ZodObject<{
2119
- agentId: z.ZodString;
2120
- profileRevision: z.ZodString;
2121
- }, z.core.$strict>;
2122
- homeAccess: z.ZodOptional<z.ZodLiteral<"memory-reader">>;
2123
- agentMemory: z.ZodOptional<z.ZodEnum<{
2124
- none: "none";
2125
- read: "read";
2126
- "read-write": "read-write";
2127
- }>>;
2128
- requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
2129
- runtime: z.ZodOptional<z.ZodEnum<{
1961
+ }, z.core.$strict>>;
1962
+ }, z.core.$strict>;
1963
+ export type TaskOfferSealedPayload = z.infer<typeof TaskOfferSealedPayloadSchema>;
1964
+ /** server -> daemon: `task.offer_with_toolsets` of a sealed task. */
1965
+ export declare const TaskOfferWithToolsetsSealedPayloadSchema: z.ZodObject<{
1966
+ runtime: z.ZodOptional<z.ZodEnum<{
1967
+ claude: "claude";
1968
+ codex: "codex";
1969
+ pi: "pi";
1970
+ }>>;
1971
+ harnessId: z.ZodOptional<z.ZodString>;
1972
+ dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1973
+ lane: z.ZodLiteral<"subscription">;
1974
+ runtimeId: z.ZodEnum<{
2130
1975
  claude: "claude";
2131
1976
  codex: "codex";
2132
- pi: "pi";
2133
- }>>;
2134
- harnessId: z.ZodOptional<z.ZodString>;
2135
- dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2136
- lane: z.ZodLiteral<"subscription">;
2137
- runtimeId: z.ZodEnum<{
2138
- claude: "claude";
2139
- codex: "codex";
2140
- }>;
2141
- providerId: z.ZodNull;
2142
- modelId: z.ZodString;
2143
- }, z.core.$strict>, z.ZodObject<{
2144
- lane: z.ZodLiteral<"byok">;
2145
- runtimeId: z.ZodLiteral<"pi">;
2146
- providerId: z.ZodString;
2147
- modelId: z.ZodString;
2148
- }, z.core.$strict>, z.ZodObject<{
2149
- lane: z.ZodLiteral<"byok-profile">;
2150
- runtimeId: z.ZodLiteral<"pi">;
2151
- providerProfile: z.ZodObject<{
2152
- profileRef: z.ZodString;
2153
- profileRevision: z.ZodString;
2154
- profileHash: z.ZodString;
2155
- modelId: z.ZodString;
2156
- requiredCapabilities: z.ZodArray<z.ZodEnum<{
2157
- "image-input": "image-input";
2158
- }>>;
2159
- }, z.core.$strict>;
2160
- }, z.core.$strict>], "lane">>;
2161
- terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2162
- mode: z.ZodLiteral<"none">;
2163
- }, z.core.$strict>, z.ZodObject<{
2164
- mode: z.ZodLiteral<"result-document">;
2165
- contract: z.ZodString;
2166
- schema: z.ZodCustom<import("./result-schema").ResultSchema, import("./result-schema").ResultSchema>;
2167
- }, z.core.$strict>], "mode">>;
2168
- limits: z.ZodOptional<z.ZodObject<{
2169
- maxDurationMs: z.ZodOptional<z.ZodNumber>;
2170
- maxTokens: z.ZodOptional<z.ZodNumber>;
2171
- }, z.core.$strip>>;
2172
- egressPolicy: z.ZodObject<{
2173
- policyRevision: z.ZodString;
2174
- activity: z.ZodObject<{
2175
- delivery: z.ZodLiteral<"latest-value">;
2176
- maxCoalesceMs: z.ZodNumber;
2177
- maxEventBytes: z.ZodNumber;
2178
- }, z.core.$strict>;
2179
- reliable: z.ZodObject<{
2180
- maxPendingEventsPerAgent: z.ZodNumber;
2181
- maxPendingBytesPerAgent: z.ZodNumber;
2182
- maxPendingBytesPerTenant: z.ZodNumber;
2183
- }, z.core.$strict>;
2184
- transfers: z.ZodObject<{
2185
- workspace: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
2186
- maxBytes: z.ZodNumber;
2187
- allowedMimeTypes: z.ZodArray<z.ZodString>;
2188
- }, z.core.$strict>]>;
2189
- transcript: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
2190
- maxBytes: z.ZodNumber;
2191
- allowedMimeTypes: z.ZodArray<z.ZodString>;
2192
- }, z.core.$strict>]>;
2193
- artifact: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
2194
- maxBytes: z.ZodNumber;
2195
- allowedMimeTypes: z.ZodArray<z.ZodString>;
2196
- }, z.core.$strict>]>;
2197
- }, z.core.$strict>;
2198
- }, z.core.$strict>;
2199
- messageEgress: z.ZodOptional<z.ZodObject<{
2200
- mode: z.ZodLiteral<"required">;
2201
- contract: z.ZodString;
2202
- contentType: z.ZodEnum<{
2203
- "text/markdown": "text/markdown";
2204
- "text/plain": "text/plain";
2205
- }>;
2206
- maxBytes: z.ZodNumber;
2207
- }, z.core.$strict>>;
2208
- }, z.core.$strict>;
2209
- readonly 'task.offer_prepared': z.ZodObject<{
2210
- agentRef: z.ZodObject<{
2211
- agentId: z.ZodString;
1977
+ }>;
1978
+ providerId: z.ZodNull;
1979
+ modelId: z.ZodString;
1980
+ }, z.core.$strict>, z.ZodObject<{
1981
+ lane: z.ZodLiteral<"byok">;
1982
+ runtimeId: z.ZodLiteral<"pi">;
1983
+ providerId: z.ZodString;
1984
+ modelId: z.ZodString;
1985
+ }, z.core.$strict>, z.ZodObject<{
1986
+ lane: z.ZodLiteral<"byok-profile">;
1987
+ runtimeId: z.ZodLiteral<"pi">;
1988
+ providerProfile: z.ZodObject<{
1989
+ profileRef: z.ZodString;
2212
1990
  profileRevision: z.ZodString;
1991
+ profileHash: z.ZodString;
1992
+ modelId: z.ZodString;
1993
+ requiredCapabilities: z.ZodArray<z.ZodEnum<{
1994
+ "image-input": "image-input";
1995
+ }>>;
2213
1996
  }, z.core.$strict>;
2214
- homeAccess: z.ZodOptional<z.ZodLiteral<"memory-reader">>;
2215
- requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
2216
- runtime: z.ZodOptional<z.ZodEnum<{
2217
- claude: "claude";
2218
- codex: "codex";
2219
- pi: "pi";
1997
+ }, z.core.$strict>], "lane">>;
1998
+ sessionRef: z.ZodOptional<z.ZodString>;
1999
+ workspaceHint: z.ZodOptional<z.ZodString>;
2000
+ limits: z.ZodOptional<z.ZodObject<{
2001
+ maxDurationMs: z.ZodOptional<z.ZodNumber>;
2002
+ maxTokens: z.ZodOptional<z.ZodNumber>;
2003
+ }, z.core.$strip>>;
2004
+ requiredToolsets: z.ZodArray<z.ZodString>;
2005
+ instruction: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
2006
+ blobRef: z.ZodObject<{
2007
+ blobId: z.ZodString;
2008
+ contentHash: z.ZodString;
2009
+ size: z.ZodNumber;
2010
+ contentType: z.ZodString;
2011
+ url: z.ZodOptional<z.ZodString>;
2012
+ }, z.core.$strip>;
2013
+ }, z.core.$strict>]>>;
2014
+ sealing: z.ZodObject<{
2015
+ scopeId: z.ZodString;
2016
+ epoch: z.ZodNumber;
2017
+ categories: z.ZodArray<z.ZodEnum<{
2018
+ "task-input": "task-input";
2019
+ "task-output": "task-output";
2220
2020
  }>>;
2221
- harnessId: z.ZodOptional<z.ZodString>;
2222
- dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2223
- lane: z.ZodLiteral<"subscription">;
2224
- runtimeId: z.ZodEnum<{
2225
- claude: "claude";
2226
- codex: "codex";
2227
- }>;
2228
- providerId: z.ZodNull;
2229
- modelId: z.ZodString;
2230
- }, z.core.$strict>, z.ZodObject<{
2231
- lane: z.ZodLiteral<"byok">;
2232
- runtimeId: z.ZodLiteral<"pi">;
2233
- providerId: z.ZodString;
2234
- modelId: z.ZodString;
2235
- }, z.core.$strict>, z.ZodObject<{
2236
- lane: z.ZodLiteral<"byok-profile">;
2237
- runtimeId: z.ZodLiteral<"pi">;
2238
- providerProfile: z.ZodObject<{
2239
- profileRef: z.ZodString;
2240
- profileRevision: z.ZodString;
2241
- profileHash: z.ZodString;
2242
- modelId: z.ZodString;
2243
- requiredCapabilities: z.ZodArray<z.ZodEnum<{
2244
- "image-input": "image-input";
2245
- }>>;
2246
- }, z.core.$strict>;
2247
- }, z.core.$strict>], "lane">>;
2248
- terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2249
- mode: z.ZodLiteral<"none">;
2250
- }, z.core.$strict>, z.ZodObject<{
2251
- mode: z.ZodLiteral<"result-document">;
2252
- contract: z.ZodString;
2253
- schema: z.ZodCustom<import("./result-schema").ResultSchema, import("./result-schema").ResultSchema>;
2254
- }, z.core.$strict>], "mode">>;
2255
- limits: z.ZodOptional<z.ZodObject<{
2256
- maxDurationMs: z.ZodOptional<z.ZodNumber>;
2257
- maxTokens: z.ZodOptional<z.ZodNumber>;
2258
- }, z.core.$strip>>;
2259
- preparation: z.ZodObject<{
2260
- reference: z.ZodString;
2261
- requestDigest: z.ZodString;
2262
- artifactDigest: z.ZodOptional<z.ZodString>;
2021
+ }, z.core.$strict>;
2022
+ sealed: z.ZodOptional<z.ZodObject<{
2023
+ v: z.ZodLiteral<1>;
2024
+ suite: z.ZodLiteral<"byok-sealed-v1.hkdf-sha256.aes-256-gcm">;
2025
+ category: z.ZodLiteral<"task-input">;
2026
+ scope: z.ZodObject<{
2027
+ id: z.ZodString;
2028
+ epoch: z.ZodNumber;
2029
+ keyId: z.ZodString;
2263
2030
  }, z.core.$strict>;
2264
- agentMemory: z.ZodEnum<{
2265
- none: "none";
2266
- read: "read";
2267
- "read-write": "read-write";
2268
- }>;
2269
- egressPolicy: z.ZodObject<{
2270
- policyRevision: z.ZodString;
2271
- activity: z.ZodObject<{
2272
- delivery: z.ZodLiteral<"latest-value">;
2273
- maxCoalesceMs: z.ZodNumber;
2274
- maxEventBytes: z.ZodNumber;
2275
- }, z.core.$strict>;
2276
- reliable: z.ZodObject<{
2277
- maxPendingEventsPerAgent: z.ZodNumber;
2278
- maxPendingBytesPerAgent: z.ZodNumber;
2279
- maxPendingBytesPerTenant: z.ZodNumber;
2280
- }, z.core.$strict>;
2281
- transfers: z.ZodObject<{
2282
- workspace: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
2283
- maxBytes: z.ZodNumber;
2284
- allowedMimeTypes: z.ZodArray<z.ZodString>;
2285
- }, z.core.$strict>]>;
2286
- transcript: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
2287
- maxBytes: z.ZodNumber;
2288
- allowedMimeTypes: z.ZodArray<z.ZodString>;
2289
- }, z.core.$strict>]>;
2290
- artifact: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
2291
- maxBytes: z.ZodNumber;
2292
- allowedMimeTypes: z.ZodArray<z.ZodString>;
2293
- }, z.core.$strict>]>;
2294
- }, z.core.$strict>;
2031
+ chainHead: z.ZodObject<{
2032
+ seq: z.ZodNumber;
2033
+ hash: z.ZodString;
2295
2034
  }, z.core.$strict>;
2296
- messageEgress: z.ZodOptional<z.ZodObject<{
2297
- mode: z.ZodLiteral<"required">;
2298
- contract: z.ZodString;
2299
- contentType: z.ZodEnum<{
2300
- "text/markdown": "text/markdown";
2301
- "text/plain": "text/plain";
2302
- }>;
2303
- maxBytes: z.ZodNumber;
2035
+ sender: z.ZodString;
2036
+ salt: z.ZodString;
2037
+ nonce: z.ZodString;
2038
+ paddedLength: z.ZodNumber;
2039
+ contentMac: z.ZodString;
2040
+ ciphertext: z.ZodOptional<z.ZodString>;
2041
+ ciphertextRef: z.ZodOptional<z.ZodObject<{
2042
+ blobId: z.ZodString;
2043
+ contentHash: z.ZodString;
2044
+ size: z.ZodNumber;
2045
+ contentType: z.ZodString;
2304
2046
  }, z.core.$strict>>;
2047
+ }, z.core.$strict>>;
2048
+ }, z.core.$strict>;
2049
+ export type TaskOfferWithToolsetsSealedPayload = z.infer<typeof TaskOfferWithToolsetsSealedPayloadSchema>;
2050
+ /** server -> daemon: `task.offer_for_agent` of a sealed task. */
2051
+ export declare const TaskOfferForAgentSealedPayloadSchema: z.ZodObject<{
2052
+ agentRef: z.ZodObject<{
2053
+ agentId: z.ZodString;
2054
+ profileRevision: z.ZodString;
2305
2055
  }, z.core.$strict>;
2306
- };
2307
- export type TaskOfferType = keyof typeof TASK_OFFER_PAYLOAD_SCHEMAS;
2308
- export declare const TASK_OFFER_TYPES: readonly TaskOfferType[];
2309
- /** Classify task-opening offers without duplicating the protocol registry in consumers. */
2310
- export declare function isTaskOfferType(type: string): type is TaskOfferType;
2311
- export declare const MESSAGE_PAYLOAD_SCHEMAS: {
2312
- readonly 'task.offer': z.ZodObject<{
2313
- instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
2314
- blobRef: z.ZodObject<{
2315
- blobId: z.ZodString;
2316
- contentHash: z.ZodString;
2317
- size: z.ZodNumber;
2318
- contentType: z.ZodString;
2319
- url: z.ZodOptional<z.ZodString>;
2320
- }, z.core.$strip>;
2321
- }, z.core.$strict>]>;
2322
- runtime: z.ZodOptional<z.ZodEnum<{
2056
+ homeAccess: z.ZodOptional<z.ZodLiteral<"memory-reader">>;
2057
+ agentMemory: z.ZodOptional<z.ZodEnum<{
2058
+ none: "none";
2059
+ read: "read";
2060
+ "read-if-admitted": "read-if-admitted";
2061
+ "read-write": "read-write";
2062
+ }>>;
2063
+ requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
2064
+ runtime: z.ZodOptional<z.ZodEnum<{
2065
+ claude: "claude";
2066
+ codex: "codex";
2067
+ pi: "pi";
2068
+ }>>;
2069
+ harnessId: z.ZodOptional<z.ZodString>;
2070
+ dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2071
+ lane: z.ZodLiteral<"subscription">;
2072
+ runtimeId: z.ZodEnum<{
2323
2073
  claude: "claude";
2324
2074
  codex: "codex";
2325
- pi: "pi";
2326
- }>>;
2327
- harnessId: z.ZodOptional<z.ZodString>;
2328
- dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2329
- lane: z.ZodLiteral<"subscription">;
2330
- runtimeId: z.ZodEnum<{
2331
- claude: "claude";
2332
- codex: "codex";
2333
- }>;
2334
- providerId: z.ZodNull;
2335
- modelId: z.ZodString;
2336
- }, z.core.$strict>, z.ZodObject<{
2337
- lane: z.ZodLiteral<"byok">;
2338
- runtimeId: z.ZodLiteral<"pi">;
2339
- providerId: z.ZodString;
2075
+ }>;
2076
+ providerId: z.ZodNull;
2077
+ modelId: z.ZodString;
2078
+ }, z.core.$strict>, z.ZodObject<{
2079
+ lane: z.ZodLiteral<"byok">;
2080
+ runtimeId: z.ZodLiteral<"pi">;
2081
+ providerId: z.ZodString;
2082
+ modelId: z.ZodString;
2083
+ }, z.core.$strict>, z.ZodObject<{
2084
+ lane: z.ZodLiteral<"byok-profile">;
2085
+ runtimeId: z.ZodLiteral<"pi">;
2086
+ providerProfile: z.ZodObject<{
2087
+ profileRef: z.ZodString;
2088
+ profileRevision: z.ZodString;
2089
+ profileHash: z.ZodString;
2340
2090
  modelId: z.ZodString;
2341
- }, z.core.$strict>, z.ZodObject<{
2342
- lane: z.ZodLiteral<"byok-profile">;
2343
- runtimeId: z.ZodLiteral<"pi">;
2344
- providerProfile: z.ZodObject<{
2345
- profileRef: z.ZodString;
2346
- profileRevision: z.ZodString;
2347
- profileHash: z.ZodString;
2348
- modelId: z.ZodString;
2349
- requiredCapabilities: z.ZodArray<z.ZodEnum<{
2350
- "image-input": "image-input";
2351
- }>>;
2352
- }, z.core.$strict>;
2353
- }, z.core.$strict>], "lane">>;
2354
- sessionRef: z.ZodOptional<z.ZodString>;
2355
- workspaceHint: z.ZodOptional<z.ZodString>;
2356
- limits: z.ZodOptional<z.ZodObject<{
2357
- maxDurationMs: z.ZodOptional<z.ZodNumber>;
2358
- maxTokens: z.ZodOptional<z.ZodNumber>;
2359
- }, z.core.$strip>>;
2360
- }, z.core.$strip>;
2361
- readonly 'task.offer_with_toolsets': z.ZodObject<{
2362
- instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
2363
- blobRef: z.ZodObject<{
2364
- blobId: z.ZodString;
2365
- contentHash: z.ZodString;
2366
- size: z.ZodNumber;
2367
- contentType: z.ZodString;
2368
- url: z.ZodOptional<z.ZodString>;
2369
- }, z.core.$strip>;
2370
- }, z.core.$strict>]>;
2371
- runtime: z.ZodOptional<z.ZodEnum<{
2372
- claude: "claude";
2373
- codex: "codex";
2374
- pi: "pi";
2375
- }>>;
2376
- harnessId: z.ZodOptional<z.ZodString>;
2377
- dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2378
- lane: z.ZodLiteral<"subscription">;
2379
- runtimeId: z.ZodEnum<{
2380
- claude: "claude";
2381
- codex: "codex";
2382
- }>;
2383
- providerId: z.ZodNull;
2384
- modelId: z.ZodString;
2385
- }, z.core.$strict>, z.ZodObject<{
2386
- lane: z.ZodLiteral<"byok">;
2387
- runtimeId: z.ZodLiteral<"pi">;
2388
- providerId: z.ZodString;
2389
- modelId: z.ZodString;
2390
- }, z.core.$strict>, z.ZodObject<{
2391
- lane: z.ZodLiteral<"byok-profile">;
2392
- runtimeId: z.ZodLiteral<"pi">;
2393
- providerProfile: z.ZodObject<{
2394
- profileRef: z.ZodString;
2395
- profileRevision: z.ZodString;
2396
- profileHash: z.ZodString;
2397
- modelId: z.ZodString;
2398
- requiredCapabilities: z.ZodArray<z.ZodEnum<{
2399
- "image-input": "image-input";
2400
- }>>;
2401
- }, z.core.$strict>;
2402
- }, z.core.$strict>], "lane">>;
2403
- sessionRef: z.ZodOptional<z.ZodString>;
2404
- workspaceHint: z.ZodOptional<z.ZodString>;
2405
- limits: z.ZodOptional<z.ZodObject<{
2406
- maxDurationMs: z.ZodOptional<z.ZodNumber>;
2407
- maxTokens: z.ZodOptional<z.ZodNumber>;
2408
- }, z.core.$strip>>;
2409
- requiredToolsets: z.ZodArray<z.ZodString>;
2410
- }, z.core.$strict>;
2411
- readonly 'task.offer_for_agent': z.ZodObject<{
2412
- instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
2413
- blobRef: z.ZodObject<{
2414
- blobId: z.ZodString;
2415
- contentHash: z.ZodString;
2416
- size: z.ZodNumber;
2417
- contentType: z.ZodString;
2418
- url: z.ZodOptional<z.ZodString>;
2419
- }, z.core.$strip>;
2420
- }, z.core.$strict>]>;
2421
- agentRef: z.ZodObject<{
2422
- agentId: z.ZodString;
2423
- profileRevision: z.ZodString;
2091
+ requiredCapabilities: z.ZodArray<z.ZodEnum<{
2092
+ "image-input": "image-input";
2093
+ }>>;
2424
2094
  }, z.core.$strict>;
2425
- homeAccess: z.ZodOptional<z.ZodLiteral<"memory-reader">>;
2426
- agentMemory: z.ZodOptional<z.ZodEnum<{
2427
- none: "none";
2428
- read: "read";
2429
- "read-write": "read-write";
2430
- }>>;
2431
- requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
2432
- runtime: z.ZodOptional<z.ZodEnum<{
2433
- claude: "claude";
2434
- codex: "codex";
2435
- pi: "pi";
2095
+ }, z.core.$strict>], "lane">>;
2096
+ terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2097
+ mode: z.ZodLiteral<"none">;
2098
+ }, z.core.$strict>, z.ZodObject<{
2099
+ mode: z.ZodLiteral<"result-document">;
2100
+ contract: z.ZodString;
2101
+ schema: z.ZodCustom<import("./result-schema").ResultSchema, import("./result-schema").ResultSchema>;
2102
+ }, z.core.$strict>], "mode">>;
2103
+ sessionRef: z.ZodOptional<z.ZodString>;
2104
+ limits: z.ZodOptional<z.ZodObject<{
2105
+ maxDurationMs: z.ZodOptional<z.ZodNumber>;
2106
+ maxTokens: z.ZodOptional<z.ZodNumber>;
2107
+ }, z.core.$strip>>;
2108
+ instruction: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
2109
+ blobRef: z.ZodObject<{
2110
+ blobId: z.ZodString;
2111
+ contentHash: z.ZodString;
2112
+ size: z.ZodNumber;
2113
+ contentType: z.ZodString;
2114
+ url: z.ZodOptional<z.ZodString>;
2115
+ }, z.core.$strip>;
2116
+ }, z.core.$strict>]>>;
2117
+ sealing: z.ZodObject<{
2118
+ scopeId: z.ZodString;
2119
+ epoch: z.ZodNumber;
2120
+ categories: z.ZodArray<z.ZodEnum<{
2121
+ "task-input": "task-input";
2122
+ "task-output": "task-output";
2436
2123
  }>>;
2437
- harnessId: z.ZodOptional<z.ZodString>;
2438
- dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2439
- lane: z.ZodLiteral<"subscription">;
2440
- runtimeId: z.ZodEnum<{
2441
- claude: "claude";
2442
- codex: "codex";
2443
- }>;
2444
- providerId: z.ZodNull;
2445
- modelId: z.ZodString;
2446
- }, z.core.$strict>, z.ZodObject<{
2447
- lane: z.ZodLiteral<"byok">;
2448
- runtimeId: z.ZodLiteral<"pi">;
2449
- providerId: z.ZodString;
2450
- modelId: z.ZodString;
2451
- }, z.core.$strict>, z.ZodObject<{
2452
- lane: z.ZodLiteral<"byok-profile">;
2453
- runtimeId: z.ZodLiteral<"pi">;
2454
- providerProfile: z.ZodObject<{
2455
- profileRef: z.ZodString;
2456
- profileRevision: z.ZodString;
2457
- profileHash: z.ZodString;
2458
- modelId: z.ZodString;
2459
- requiredCapabilities: z.ZodArray<z.ZodEnum<{
2460
- "image-input": "image-input";
2461
- }>>;
2462
- }, z.core.$strict>;
2463
- }, z.core.$strict>], "lane">>;
2464
- terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2465
- mode: z.ZodLiteral<"none">;
2466
- }, z.core.$strict>, z.ZodObject<{
2467
- mode: z.ZodLiteral<"result-document">;
2468
- contract: z.ZodString;
2469
- schema: z.ZodCustom<import("./result-schema").ResultSchema, import("./result-schema").ResultSchema>;
2470
- }, z.core.$strict>], "mode">>;
2471
- sessionRef: z.ZodOptional<z.ZodString>;
2472
- limits: z.ZodOptional<z.ZodObject<{
2473
- maxDurationMs: z.ZodOptional<z.ZodNumber>;
2474
- maxTokens: z.ZodOptional<z.ZodNumber>;
2475
- }, z.core.$strip>>;
2476
2124
  }, z.core.$strict>;
2477
- readonly 'task.offer_for_agent_with_egress': z.ZodObject<{
2478
- instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
2479
- blobRef: z.ZodObject<{
2480
- blobId: z.ZodString;
2481
- contentHash: z.ZodString;
2482
- size: z.ZodNumber;
2483
- contentType: z.ZodString;
2484
- url: z.ZodOptional<z.ZodString>;
2485
- }, z.core.$strip>;
2486
- }, z.core.$strict>]>;
2487
- agentRef: z.ZodObject<{
2488
- agentId: z.ZodString;
2489
- profileRevision: z.ZodString;
2125
+ sealed: z.ZodOptional<z.ZodObject<{
2126
+ v: z.ZodLiteral<1>;
2127
+ suite: z.ZodLiteral<"byok-sealed-v1.hkdf-sha256.aes-256-gcm">;
2128
+ category: z.ZodLiteral<"task-input">;
2129
+ scope: z.ZodObject<{
2130
+ id: z.ZodString;
2131
+ epoch: z.ZodNumber;
2132
+ keyId: z.ZodString;
2490
2133
  }, z.core.$strict>;
2491
- homeAccess: z.ZodOptional<z.ZodLiteral<"memory-reader">>;
2492
- agentMemory: z.ZodOptional<z.ZodEnum<{
2493
- none: "none";
2494
- read: "read";
2495
- "read-write": "read-write";
2496
- }>>;
2497
- requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
2498
- runtime: z.ZodOptional<z.ZodEnum<{
2499
- claude: "claude";
2500
- codex: "codex";
2501
- pi: "pi";
2502
- }>>;
2503
- harnessId: z.ZodOptional<z.ZodString>;
2504
- dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2505
- lane: z.ZodLiteral<"subscription">;
2506
- runtimeId: z.ZodEnum<{
2507
- claude: "claude";
2508
- codex: "codex";
2509
- }>;
2510
- providerId: z.ZodNull;
2511
- modelId: z.ZodString;
2512
- }, z.core.$strict>, z.ZodObject<{
2513
- lane: z.ZodLiteral<"byok">;
2514
- runtimeId: z.ZodLiteral<"pi">;
2515
- providerId: z.ZodString;
2516
- modelId: z.ZodString;
2517
- }, z.core.$strict>, z.ZodObject<{
2518
- lane: z.ZodLiteral<"byok-profile">;
2519
- runtimeId: z.ZodLiteral<"pi">;
2520
- providerProfile: z.ZodObject<{
2521
- profileRef: z.ZodString;
2522
- profileRevision: z.ZodString;
2523
- profileHash: z.ZodString;
2524
- modelId: z.ZodString;
2525
- requiredCapabilities: z.ZodArray<z.ZodEnum<{
2526
- "image-input": "image-input";
2527
- }>>;
2528
- }, z.core.$strict>;
2529
- }, z.core.$strict>], "lane">>;
2530
- terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2531
- mode: z.ZodLiteral<"none">;
2532
- }, z.core.$strict>, z.ZodObject<{
2533
- mode: z.ZodLiteral<"result-document">;
2534
- contract: z.ZodString;
2535
- schema: z.ZodCustom<import("./result-schema").ResultSchema, import("./result-schema").ResultSchema>;
2536
- }, z.core.$strict>], "mode">>;
2537
- limits: z.ZodOptional<z.ZodObject<{
2538
- maxDurationMs: z.ZodOptional<z.ZodNumber>;
2539
- maxTokens: z.ZodOptional<z.ZodNumber>;
2540
- }, z.core.$strip>>;
2541
- sessionRef: z.ZodString;
2542
- egressPolicy: z.ZodObject<{
2543
- policyRevision: z.ZodString;
2544
- activity: z.ZodObject<{
2545
- delivery: z.ZodLiteral<"latest-value">;
2546
- maxCoalesceMs: z.ZodNumber;
2547
- maxEventBytes: z.ZodNumber;
2548
- }, z.core.$strict>;
2549
- reliable: z.ZodObject<{
2550
- maxPendingEventsPerAgent: z.ZodNumber;
2551
- maxPendingBytesPerAgent: z.ZodNumber;
2552
- maxPendingBytesPerTenant: z.ZodNumber;
2553
- }, z.core.$strict>;
2554
- transfers: z.ZodObject<{
2555
- workspace: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
2556
- maxBytes: z.ZodNumber;
2557
- allowedMimeTypes: z.ZodArray<z.ZodString>;
2558
- }, z.core.$strict>]>;
2559
- transcript: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
2560
- maxBytes: z.ZodNumber;
2561
- allowedMimeTypes: z.ZodArray<z.ZodString>;
2562
- }, z.core.$strict>]>;
2563
- artifact: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
2564
- maxBytes: z.ZodNumber;
2565
- allowedMimeTypes: z.ZodArray<z.ZodString>;
2566
- }, z.core.$strict>]>;
2567
- }, z.core.$strict>;
2134
+ chainHead: z.ZodObject<{
2135
+ seq: z.ZodNumber;
2136
+ hash: z.ZodString;
2568
2137
  }, z.core.$strict>;
2569
- messageEgress: z.ZodOptional<z.ZodObject<{
2570
- mode: z.ZodLiteral<"required">;
2571
- contract: z.ZodString;
2572
- contentType: z.ZodEnum<{
2573
- "text/markdown": "text/markdown";
2574
- "text/plain": "text/plain";
2575
- }>;
2576
- maxBytes: z.ZodNumber;
2138
+ sender: z.ZodString;
2139
+ salt: z.ZodString;
2140
+ nonce: z.ZodString;
2141
+ paddedLength: z.ZodNumber;
2142
+ contentMac: z.ZodString;
2143
+ ciphertext: z.ZodOptional<z.ZodString>;
2144
+ ciphertextRef: z.ZodOptional<z.ZodObject<{
2145
+ blobId: z.ZodString;
2146
+ contentHash: z.ZodString;
2147
+ size: z.ZodNumber;
2148
+ contentType: z.ZodString;
2577
2149
  }, z.core.$strict>>;
2150
+ }, z.core.$strict>>;
2151
+ }, z.core.$strict>;
2152
+ export type TaskOfferForAgentSealedPayload = z.infer<typeof TaskOfferForAgentSealedPayloadSchema>;
2153
+ /** server -> daemon: `task.offer_for_agent_with_egress` of a sealed task. */
2154
+ export declare const TaskOfferForAgentWithEgressSealedPayloadSchema: z.ZodObject<{
2155
+ agentRef: z.ZodObject<{
2156
+ agentId: z.ZodString;
2157
+ profileRevision: z.ZodString;
2578
2158
  }, z.core.$strict>;
2579
- readonly 'task.offer_for_agent_with_egress_fresh': z.ZodObject<{
2580
- instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
2581
- blobRef: z.ZodObject<{
2582
- blobId: z.ZodString;
2583
- contentHash: z.ZodString;
2584
- size: z.ZodNumber;
2585
- contentType: z.ZodString;
2586
- url: z.ZodOptional<z.ZodString>;
2587
- }, z.core.$strip>;
2588
- }, z.core.$strict>]>;
2589
- agentRef: z.ZodObject<{
2590
- agentId: z.ZodString;
2591
- profileRevision: z.ZodString;
2592
- }, z.core.$strict>;
2593
- homeAccess: z.ZodOptional<z.ZodLiteral<"memory-reader">>;
2594
- agentMemory: z.ZodOptional<z.ZodEnum<{
2595
- none: "none";
2596
- read: "read";
2597
- "read-write": "read-write";
2598
- }>>;
2599
- requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
2600
- runtime: z.ZodOptional<z.ZodEnum<{
2159
+ homeAccess: z.ZodOptional<z.ZodLiteral<"memory-reader">>;
2160
+ agentMemory: z.ZodOptional<z.ZodEnum<{
2161
+ none: "none";
2162
+ read: "read";
2163
+ "read-if-admitted": "read-if-admitted";
2164
+ "read-write": "read-write";
2165
+ }>>;
2166
+ requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
2167
+ runtime: z.ZodOptional<z.ZodEnum<{
2168
+ claude: "claude";
2169
+ codex: "codex";
2170
+ pi: "pi";
2171
+ }>>;
2172
+ harnessId: z.ZodOptional<z.ZodString>;
2173
+ dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2174
+ lane: z.ZodLiteral<"subscription">;
2175
+ runtimeId: z.ZodEnum<{
2601
2176
  claude: "claude";
2602
2177
  codex: "codex";
2603
- pi: "pi";
2604
- }>>;
2605
- harnessId: z.ZodOptional<z.ZodString>;
2606
- dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2607
- lane: z.ZodLiteral<"subscription">;
2608
- runtimeId: z.ZodEnum<{
2609
- claude: "claude";
2610
- codex: "codex";
2611
- }>;
2612
- providerId: z.ZodNull;
2613
- modelId: z.ZodString;
2614
- }, z.core.$strict>, z.ZodObject<{
2615
- lane: z.ZodLiteral<"byok">;
2616
- runtimeId: z.ZodLiteral<"pi">;
2617
- providerId: z.ZodString;
2178
+ }>;
2179
+ providerId: z.ZodNull;
2180
+ modelId: z.ZodString;
2181
+ }, z.core.$strict>, z.ZodObject<{
2182
+ lane: z.ZodLiteral<"byok">;
2183
+ runtimeId: z.ZodLiteral<"pi">;
2184
+ providerId: z.ZodString;
2185
+ modelId: z.ZodString;
2186
+ }, z.core.$strict>, z.ZodObject<{
2187
+ lane: z.ZodLiteral<"byok-profile">;
2188
+ runtimeId: z.ZodLiteral<"pi">;
2189
+ providerProfile: z.ZodObject<{
2190
+ profileRef: z.ZodString;
2191
+ profileRevision: z.ZodString;
2192
+ profileHash: z.ZodString;
2618
2193
  modelId: z.ZodString;
2619
- }, z.core.$strict>, z.ZodObject<{
2620
- lane: z.ZodLiteral<"byok-profile">;
2621
- runtimeId: z.ZodLiteral<"pi">;
2622
- providerProfile: z.ZodObject<{
2623
- profileRef: z.ZodString;
2624
- profileRevision: z.ZodString;
2625
- profileHash: z.ZodString;
2626
- modelId: z.ZodString;
2627
- requiredCapabilities: z.ZodArray<z.ZodEnum<{
2628
- "image-input": "image-input";
2629
- }>>;
2630
- }, z.core.$strict>;
2631
- }, z.core.$strict>], "lane">>;
2632
- terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2633
- mode: z.ZodLiteral<"none">;
2634
- }, z.core.$strict>, z.ZodObject<{
2635
- mode: z.ZodLiteral<"result-document">;
2636
- contract: z.ZodString;
2637
- schema: z.ZodCustom<import("./result-schema").ResultSchema, import("./result-schema").ResultSchema>;
2638
- }, z.core.$strict>], "mode">>;
2639
- limits: z.ZodOptional<z.ZodObject<{
2640
- maxDurationMs: z.ZodOptional<z.ZodNumber>;
2641
- maxTokens: z.ZodOptional<z.ZodNumber>;
2642
- }, z.core.$strip>>;
2643
- egressPolicy: z.ZodObject<{
2644
- policyRevision: z.ZodString;
2645
- activity: z.ZodObject<{
2646
- delivery: z.ZodLiteral<"latest-value">;
2647
- maxCoalesceMs: z.ZodNumber;
2648
- maxEventBytes: z.ZodNumber;
2649
- }, z.core.$strict>;
2650
- reliable: z.ZodObject<{
2651
- maxPendingEventsPerAgent: z.ZodNumber;
2652
- maxPendingBytesPerAgent: z.ZodNumber;
2653
- maxPendingBytesPerTenant: z.ZodNumber;
2654
- }, z.core.$strict>;
2655
- transfers: z.ZodObject<{
2656
- workspace: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
2657
- maxBytes: z.ZodNumber;
2658
- allowedMimeTypes: z.ZodArray<z.ZodString>;
2659
- }, z.core.$strict>]>;
2660
- transcript: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
2661
- maxBytes: z.ZodNumber;
2662
- allowedMimeTypes: z.ZodArray<z.ZodString>;
2663
- }, z.core.$strict>]>;
2664
- artifact: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
2665
- maxBytes: z.ZodNumber;
2666
- allowedMimeTypes: z.ZodArray<z.ZodString>;
2667
- }, z.core.$strict>]>;
2668
- }, z.core.$strict>;
2194
+ requiredCapabilities: z.ZodArray<z.ZodEnum<{
2195
+ "image-input": "image-input";
2196
+ }>>;
2669
2197
  }, z.core.$strict>;
2670
- messageEgress: z.ZodOptional<z.ZodObject<{
2671
- mode: z.ZodLiteral<"required">;
2672
- contract: z.ZodString;
2673
- contentType: z.ZodEnum<{
2674
- "text/markdown": "text/markdown";
2675
- "text/plain": "text/plain";
2676
- }>;
2677
- maxBytes: z.ZodNumber;
2678
- }, z.core.$strict>>;
2679
- }, z.core.$strict>;
2680
- readonly 'task.offer_prepared': z.ZodObject<{
2681
- agentRef: z.ZodObject<{
2682
- agentId: z.ZodString;
2683
- profileRevision: z.ZodString;
2198
+ }, z.core.$strict>], "lane">>;
2199
+ terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2200
+ mode: z.ZodLiteral<"none">;
2201
+ }, z.core.$strict>, z.ZodObject<{
2202
+ mode: z.ZodLiteral<"result-document">;
2203
+ contract: z.ZodString;
2204
+ schema: z.ZodCustom<import("./result-schema").ResultSchema, import("./result-schema").ResultSchema>;
2205
+ }, z.core.$strict>], "mode">>;
2206
+ limits: z.ZodOptional<z.ZodObject<{
2207
+ maxDurationMs: z.ZodOptional<z.ZodNumber>;
2208
+ maxTokens: z.ZodOptional<z.ZodNumber>;
2209
+ }, z.core.$strip>>;
2210
+ sessionRef: z.ZodString;
2211
+ egressPolicy: z.ZodObject<{
2212
+ policyRevision: z.ZodString;
2213
+ activity: z.ZodObject<{
2214
+ delivery: z.ZodLiteral<"latest-value">;
2215
+ maxCoalesceMs: z.ZodNumber;
2216
+ maxEventBytes: z.ZodNumber;
2684
2217
  }, z.core.$strict>;
2685
- homeAccess: z.ZodOptional<z.ZodLiteral<"memory-reader">>;
2686
- requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
2687
- runtime: z.ZodOptional<z.ZodEnum<{
2688
- claude: "claude";
2689
- codex: "codex";
2690
- pi: "pi";
2691
- }>>;
2692
- harnessId: z.ZodOptional<z.ZodString>;
2693
- dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2694
- lane: z.ZodLiteral<"subscription">;
2695
- runtimeId: z.ZodEnum<{
2696
- claude: "claude";
2697
- codex: "codex";
2698
- }>;
2699
- providerId: z.ZodNull;
2700
- modelId: z.ZodString;
2701
- }, z.core.$strict>, z.ZodObject<{
2702
- lane: z.ZodLiteral<"byok">;
2703
- runtimeId: z.ZodLiteral<"pi">;
2704
- providerId: z.ZodString;
2705
- modelId: z.ZodString;
2706
- }, z.core.$strict>, z.ZodObject<{
2707
- lane: z.ZodLiteral<"byok-profile">;
2708
- runtimeId: z.ZodLiteral<"pi">;
2709
- providerProfile: z.ZodObject<{
2710
- profileRef: z.ZodString;
2711
- profileRevision: z.ZodString;
2712
- profileHash: z.ZodString;
2713
- modelId: z.ZodString;
2714
- requiredCapabilities: z.ZodArray<z.ZodEnum<{
2715
- "image-input": "image-input";
2716
- }>>;
2717
- }, z.core.$strict>;
2718
- }, z.core.$strict>], "lane">>;
2719
- terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2720
- mode: z.ZodLiteral<"none">;
2721
- }, z.core.$strict>, z.ZodObject<{
2722
- mode: z.ZodLiteral<"result-document">;
2723
- contract: z.ZodString;
2724
- schema: z.ZodCustom<import("./result-schema").ResultSchema, import("./result-schema").ResultSchema>;
2725
- }, z.core.$strict>], "mode">>;
2726
- limits: z.ZodOptional<z.ZodObject<{
2727
- maxDurationMs: z.ZodOptional<z.ZodNumber>;
2728
- maxTokens: z.ZodOptional<z.ZodNumber>;
2729
- }, z.core.$strip>>;
2730
- preparation: z.ZodObject<{
2731
- reference: z.ZodString;
2732
- requestDigest: z.ZodString;
2733
- artifactDigest: z.ZodOptional<z.ZodString>;
2218
+ reliable: z.ZodObject<{
2219
+ maxPendingEventsPerAgent: z.ZodNumber;
2220
+ maxPendingBytesPerAgent: z.ZodNumber;
2221
+ maxPendingBytesPerTenant: z.ZodNumber;
2734
2222
  }, z.core.$strict>;
2735
- agentMemory: z.ZodEnum<{
2736
- none: "none";
2737
- read: "read";
2738
- "read-write": "read-write";
2739
- }>;
2740
- egressPolicy: z.ZodObject<{
2741
- policyRevision: z.ZodString;
2742
- activity: z.ZodObject<{
2743
- delivery: z.ZodLiteral<"latest-value">;
2744
- maxCoalesceMs: z.ZodNumber;
2745
- maxEventBytes: z.ZodNumber;
2746
- }, z.core.$strict>;
2747
- reliable: z.ZodObject<{
2748
- maxPendingEventsPerAgent: z.ZodNumber;
2749
- maxPendingBytesPerAgent: z.ZodNumber;
2750
- maxPendingBytesPerTenant: z.ZodNumber;
2751
- }, z.core.$strict>;
2752
- transfers: z.ZodObject<{
2753
- workspace: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
2754
- maxBytes: z.ZodNumber;
2755
- allowedMimeTypes: z.ZodArray<z.ZodString>;
2756
- }, z.core.$strict>]>;
2757
- transcript: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
2758
- maxBytes: z.ZodNumber;
2759
- allowedMimeTypes: z.ZodArray<z.ZodString>;
2760
- }, z.core.$strict>]>;
2761
- artifact: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
2762
- maxBytes: z.ZodNumber;
2763
- allowedMimeTypes: z.ZodArray<z.ZodString>;
2764
- }, z.core.$strict>]>;
2765
- }, z.core.$strict>;
2223
+ transfers: z.ZodObject<{
2224
+ workspace: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
2225
+ maxBytes: z.ZodNumber;
2226
+ allowedMimeTypes: z.ZodArray<z.ZodString>;
2227
+ }, z.core.$strict>]>;
2228
+ transcript: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
2229
+ maxBytes: z.ZodNumber;
2230
+ allowedMimeTypes: z.ZodArray<z.ZodString>;
2231
+ }, z.core.$strict>]>;
2232
+ artifact: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
2233
+ maxBytes: z.ZodNumber;
2234
+ allowedMimeTypes: z.ZodArray<z.ZodString>;
2235
+ }, z.core.$strict>]>;
2766
2236
  }, z.core.$strict>;
2767
- messageEgress: z.ZodOptional<z.ZodObject<{
2768
- mode: z.ZodLiteral<"required">;
2769
- contract: z.ZodString;
2770
- contentType: z.ZodEnum<{
2771
- "text/markdown": "text/markdown";
2772
- "text/plain": "text/plain";
2773
- }>;
2774
- maxBytes: z.ZodNumber;
2775
- }, z.core.$strict>>;
2776
2237
  }, z.core.$strict>;
2777
- readonly 'conn.hello': z.ZodObject<{
2778
- protocolVersions: z.ZodArray<z.ZodNumber>;
2779
- capabilities: z.ZodArray<z.ZodString>;
2780
- deviceId: z.ZodString;
2781
- productId: z.ZodString;
2782
- clientVersion: z.ZodOptional<z.ZodString>;
2783
- runtimes: z.ZodOptional<z.ZodArray<z.ZodObject<{
2784
- id: z.ZodEnum<{
2785
- claude: "claude";
2786
- codex: "codex";
2787
- pi: "pi";
2788
- }>;
2789
- version: z.ZodOptional<z.ZodString>;
2790
- authPresent: z.ZodOptional<z.ZodBoolean>;
2791
- capabilities: z.ZodOptional<z.ZodObject<{
2792
- steer: z.ZodOptional<z.ZodBoolean>;
2793
- resume: z.ZodOptional<z.ZodBoolean>;
2794
- approvalInteractive: z.ZodOptional<z.ZodBoolean>;
2795
- mcpToolsets: z.ZodOptional<z.ZodBoolean>;
2796
- messageDraft: z.ZodOptional<z.ZodBoolean>;
2797
- }, z.core.$strip>>;
2798
- }, z.core.$strip>>>;
2799
- harnesses: z.ZodOptional<z.ZodArray<z.ZodObject<{
2238
+ messageEgress: z.ZodOptional<z.ZodObject<{
2239
+ mode: z.ZodLiteral<"required">;
2240
+ contract: z.ZodString;
2241
+ contentType: z.ZodEnum<{
2242
+ "text/markdown": "text/markdown";
2243
+ "text/plain": "text/plain";
2244
+ }>;
2245
+ maxBytes: z.ZodNumber;
2246
+ }, z.core.$strict>>;
2247
+ instruction: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
2248
+ blobRef: z.ZodObject<{
2249
+ blobId: z.ZodString;
2250
+ contentHash: z.ZodString;
2251
+ size: z.ZodNumber;
2252
+ contentType: z.ZodString;
2253
+ url: z.ZodOptional<z.ZodString>;
2254
+ }, z.core.$strip>;
2255
+ }, z.core.$strict>]>>;
2256
+ sealing: z.ZodObject<{
2257
+ scopeId: z.ZodString;
2258
+ epoch: z.ZodNumber;
2259
+ categories: z.ZodArray<z.ZodEnum<{
2260
+ "task-input": "task-input";
2261
+ "task-output": "task-output";
2262
+ }>>;
2263
+ }, z.core.$strict>;
2264
+ sealed: z.ZodOptional<z.ZodObject<{
2265
+ v: z.ZodLiteral<1>;
2266
+ suite: z.ZodLiteral<"byok-sealed-v1.hkdf-sha256.aes-256-gcm">;
2267
+ category: z.ZodLiteral<"task-input">;
2268
+ scope: z.ZodObject<{
2800
2269
  id: z.ZodString;
2801
- version: z.ZodOptional<z.ZodString>;
2802
- capabilities: z.ZodObject<{
2803
- steer: z.ZodOptional<z.ZodBoolean>;
2804
- resume: z.ZodOptional<z.ZodBoolean>;
2805
- approvalInteractive: z.ZodOptional<z.ZodBoolean>;
2806
- mcpToolsets: z.ZodOptional<z.ZodBoolean>;
2807
- messageDraft: z.ZodOptional<z.ZodBoolean>;
2808
- }, z.core.$strip>;
2809
- }, z.core.$strip>>>;
2810
- configuredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
2811
- cursor: z.ZodOptional<z.ZodNumber>;
2812
- }, z.core.$strip>;
2813
- readonly 'conn.ack': z.ZodObject<{
2814
- protocolVersion: z.ZodNumber;
2815
- capabilities: z.ZodArray<z.ZodString>;
2816
- serverTime: z.ZodISODateTime;
2817
- }, z.core.$strip>;
2818
- readonly 'agent.egress.reliable': z.ZodObject<{
2819
- agentRef: z.ZodObject<{
2820
- agentId: z.ZodString;
2821
- profileRevision: z.ZodString;
2270
+ epoch: z.ZodNumber;
2271
+ keyId: z.ZodString;
2822
2272
  }, z.core.$strict>;
2823
- sessionRef: z.ZodString;
2824
- policyRevision: z.ZodString;
2825
- eventId: z.ZodUUID;
2826
- cursor: z.ZodNumber;
2827
- payload: z.ZodJSONSchema;
2828
- contentHash: z.ZodString;
2829
- byteCount: z.ZodNumber;
2273
+ chainHead: z.ZodObject<{
2274
+ seq: z.ZodNumber;
2275
+ hash: z.ZodString;
2276
+ }, z.core.$strict>;
2277
+ sender: z.ZodString;
2278
+ salt: z.ZodString;
2279
+ nonce: z.ZodString;
2280
+ paddedLength: z.ZodNumber;
2281
+ contentMac: z.ZodString;
2282
+ ciphertext: z.ZodOptional<z.ZodString>;
2283
+ ciphertextRef: z.ZodOptional<z.ZodObject<{
2284
+ blobId: z.ZodString;
2285
+ contentHash: z.ZodString;
2286
+ size: z.ZodNumber;
2287
+ contentType: z.ZodString;
2288
+ }, z.core.$strict>>;
2289
+ }, z.core.$strict>>;
2290
+ }, z.core.$strict>;
2291
+ export type TaskOfferForAgentWithEgressSealedPayload = z.infer<typeof TaskOfferForAgentWithEgressSealedPayloadSchema>;
2292
+ /**
2293
+ * server -> daemon: `task.offer_for_agent_with_egress_fresh` of a sealed task.
2294
+ * Only this type takes `routineRef`: a routine occurrence is an execution.
2295
+ */
2296
+ export declare const TaskOfferForAgentWithEgressFreshSealedPayloadSchema: z.ZodObject<{
2297
+ agentRef: z.ZodObject<{
2298
+ agentId: z.ZodString;
2299
+ profileRevision: z.ZodString;
2830
2300
  }, z.core.$strict>;
2831
- readonly 'agent.egress.ack': z.ZodObject<{
2832
- agentRef: z.ZodObject<{
2833
- agentId: z.ZodString;
2301
+ homeAccess: z.ZodOptional<z.ZodLiteral<"memory-reader">>;
2302
+ agentMemory: z.ZodOptional<z.ZodEnum<{
2303
+ none: "none";
2304
+ read: "read";
2305
+ "read-if-admitted": "read-if-admitted";
2306
+ "read-write": "read-write";
2307
+ }>>;
2308
+ requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
2309
+ runtime: z.ZodOptional<z.ZodEnum<{
2310
+ claude: "claude";
2311
+ codex: "codex";
2312
+ pi: "pi";
2313
+ }>>;
2314
+ harnessId: z.ZodOptional<z.ZodString>;
2315
+ dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2316
+ lane: z.ZodLiteral<"subscription">;
2317
+ runtimeId: z.ZodEnum<{
2318
+ claude: "claude";
2319
+ codex: "codex";
2320
+ }>;
2321
+ providerId: z.ZodNull;
2322
+ modelId: z.ZodString;
2323
+ }, z.core.$strict>, z.ZodObject<{
2324
+ lane: z.ZodLiteral<"byok">;
2325
+ runtimeId: z.ZodLiteral<"pi">;
2326
+ providerId: z.ZodString;
2327
+ modelId: z.ZodString;
2328
+ }, z.core.$strict>, z.ZodObject<{
2329
+ lane: z.ZodLiteral<"byok-profile">;
2330
+ runtimeId: z.ZodLiteral<"pi">;
2331
+ providerProfile: z.ZodObject<{
2332
+ profileRef: z.ZodString;
2834
2333
  profileRevision: z.ZodString;
2334
+ profileHash: z.ZodString;
2335
+ modelId: z.ZodString;
2336
+ requiredCapabilities: z.ZodArray<z.ZodEnum<{
2337
+ "image-input": "image-input";
2338
+ }>>;
2835
2339
  }, z.core.$strict>;
2836
- sessionRef: z.ZodString;
2340
+ }, z.core.$strict>], "lane">>;
2341
+ terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2342
+ mode: z.ZodLiteral<"none">;
2343
+ }, z.core.$strict>, z.ZodObject<{
2344
+ mode: z.ZodLiteral<"result-document">;
2345
+ contract: z.ZodString;
2346
+ schema: z.ZodCustom<import("./result-schema").ResultSchema, import("./result-schema").ResultSchema>;
2347
+ }, z.core.$strict>], "mode">>;
2348
+ limits: z.ZodOptional<z.ZodObject<{
2349
+ maxDurationMs: z.ZodOptional<z.ZodNumber>;
2350
+ maxTokens: z.ZodOptional<z.ZodNumber>;
2351
+ }, z.core.$strip>>;
2352
+ egressPolicy: z.ZodObject<{
2837
2353
  policyRevision: z.ZodString;
2838
- eventId: z.ZodUUID;
2839
- cursor: z.ZodNumber;
2840
- receiptId: z.ZodUUID;
2841
- }, z.core.$strict>;
2842
- readonly 'agent.message.draft': z.ZodObject<{
2843
- agentRef: z.ZodObject<{
2844
- agentId: z.ZodString;
2845
- profileRevision: z.ZodString;
2354
+ activity: z.ZodObject<{
2355
+ delivery: z.ZodLiteral<"latest-value">;
2356
+ maxCoalesceMs: z.ZodNumber;
2357
+ maxEventBytes: z.ZodNumber;
2846
2358
  }, z.core.$strict>;
2847
- revision: z.ZodNumber;
2848
- offset: z.ZodNumber;
2849
- text: z.ZodString;
2850
- overflow: z.ZodOptional<z.ZodLiteral<true>>;
2851
- }, z.core.$strict>;
2852
- readonly 'agent.message.publish': z.ZodObject<{
2853
- agentRef: z.ZodObject<{
2854
- agentId: z.ZodString;
2855
- profileRevision: z.ZodString;
2359
+ reliable: z.ZodObject<{
2360
+ maxPendingEventsPerAgent: z.ZodNumber;
2361
+ maxPendingBytesPerAgent: z.ZodNumber;
2362
+ maxPendingBytesPerTenant: z.ZodNumber;
2856
2363
  }, z.core.$strict>;
2857
- sessionRef: z.ZodString;
2364
+ transfers: z.ZodObject<{
2365
+ workspace: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
2366
+ maxBytes: z.ZodNumber;
2367
+ allowedMimeTypes: z.ZodArray<z.ZodString>;
2368
+ }, z.core.$strict>]>;
2369
+ transcript: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
2370
+ maxBytes: z.ZodNumber;
2371
+ allowedMimeTypes: z.ZodArray<z.ZodString>;
2372
+ }, z.core.$strict>]>;
2373
+ artifact: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
2374
+ maxBytes: z.ZodNumber;
2375
+ allowedMimeTypes: z.ZodArray<z.ZodString>;
2376
+ }, z.core.$strict>]>;
2377
+ }, z.core.$strict>;
2378
+ }, z.core.$strict>;
2379
+ messageEgress: z.ZodOptional<z.ZodObject<{
2380
+ mode: z.ZodLiteral<"required">;
2858
2381
  contract: z.ZodString;
2859
- messageId: z.ZodUUID;
2860
- cursor: z.ZodNumber;
2861
2382
  contentType: z.ZodEnum<{
2862
2383
  "text/markdown": "text/markdown";
2863
2384
  "text/plain": "text/plain";
2864
2385
  }>;
2865
- body: z.ZodString;
2866
- contentHash: z.ZodString;
2867
- byteCount: z.ZodNumber;
2386
+ maxBytes: z.ZodNumber;
2387
+ }, z.core.$strict>>;
2388
+ instruction: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
2389
+ blobRef: z.ZodObject<{
2390
+ blobId: z.ZodString;
2391
+ contentHash: z.ZodString;
2392
+ size: z.ZodNumber;
2393
+ contentType: z.ZodString;
2394
+ url: z.ZodOptional<z.ZodString>;
2395
+ }, z.core.$strip>;
2396
+ }, z.core.$strict>]>>;
2397
+ sealing: z.ZodObject<{
2398
+ scopeId: z.ZodString;
2399
+ epoch: z.ZodNumber;
2400
+ categories: z.ZodArray<z.ZodEnum<{
2401
+ "task-input": "task-input";
2402
+ "task-output": "task-output";
2403
+ }>>;
2868
2404
  }, z.core.$strict>;
2869
- readonly 'agent.message.disposition': z.ZodObject<{
2870
- agentRef: z.ZodObject<{
2871
- agentId: z.ZodString;
2872
- profileRevision: z.ZodString;
2405
+ sealed: z.ZodOptional<z.ZodObject<{
2406
+ v: z.ZodLiteral<1>;
2407
+ suite: z.ZodLiteral<"byok-sealed-v1.hkdf-sha256.aes-256-gcm">;
2408
+ category: z.ZodLiteral<"task-input">;
2409
+ scope: z.ZodObject<{
2410
+ id: z.ZodString;
2411
+ epoch: z.ZodNumber;
2412
+ keyId: z.ZodString;
2873
2413
  }, z.core.$strict>;
2874
- sessionRef: z.ZodString;
2875
- contract: z.ZodString;
2876
- messageId: z.ZodUUID;
2877
- cursor: z.ZodNumber;
2878
- contentHash: z.ZodString;
2879
- outcome: z.ZodEnum<{
2880
- accepted: "accepted";
2881
- held: "held";
2882
- refused: "refused";
2883
- }>;
2884
- receiptId: z.ZodUUID;
2885
- reasonCode: z.ZodOptional<z.ZodString>;
2414
+ chainHead: z.ZodObject<{
2415
+ seq: z.ZodNumber;
2416
+ hash: z.ZodString;
2417
+ }, z.core.$strict>;
2418
+ sender: z.ZodString;
2419
+ salt: z.ZodString;
2420
+ nonce: z.ZodString;
2421
+ paddedLength: z.ZodNumber;
2422
+ contentMac: z.ZodString;
2423
+ ciphertext: z.ZodOptional<z.ZodString>;
2424
+ ciphertextRef: z.ZodOptional<z.ZodObject<{
2425
+ blobId: z.ZodString;
2426
+ contentHash: z.ZodString;
2427
+ size: z.ZodNumber;
2428
+ contentType: z.ZodString;
2429
+ }, z.core.$strict>>;
2430
+ }, z.core.$strict>>;
2431
+ routineRef: z.ZodOptional<z.ZodObject<{
2432
+ routineId: z.ZodString;
2433
+ definitionVersion: z.ZodNumber;
2434
+ notAfter: z.ZodString;
2435
+ }, z.core.$strict>>;
2436
+ }, z.core.$strict>;
2437
+ export type TaskOfferForAgentWithEgressFreshSealedPayload = z.infer<typeof TaskOfferForAgentWithEgressFreshSealedPayloadSchema>;
2438
+ /**
2439
+ * server -> daemon: sealed steering text. `steerId` names this steer in the
2440
+ * AAD and the content MAC, so the Host cannot replay an earlier steer of the
2441
+ * same task as a new one.
2442
+ */
2443
+ export declare const TaskSteerSealedPayloadSchema: z.ZodObject<{
2444
+ steerId: z.ZodUUID;
2445
+ sealed: z.ZodObject<{
2446
+ v: z.ZodLiteral<1>;
2447
+ suite: z.ZodLiteral<"byok-sealed-v1.hkdf-sha256.aes-256-gcm">;
2448
+ category: z.ZodLiteral<"task-input">;
2449
+ scope: z.ZodObject<{
2450
+ id: z.ZodString;
2451
+ epoch: z.ZodNumber;
2452
+ keyId: z.ZodString;
2453
+ }, z.core.$strict>;
2454
+ chainHead: z.ZodObject<{
2455
+ seq: z.ZodNumber;
2456
+ hash: z.ZodString;
2457
+ }, z.core.$strict>;
2458
+ sender: z.ZodString;
2459
+ salt: z.ZodString;
2460
+ nonce: z.ZodString;
2461
+ paddedLength: z.ZodNumber;
2462
+ contentMac: z.ZodString;
2463
+ ciphertext: z.ZodOptional<z.ZodString>;
2464
+ ciphertextRef: z.ZodOptional<z.ZodObject<{
2465
+ blobId: z.ZodString;
2466
+ contentHash: z.ZodString;
2467
+ size: z.ZodNumber;
2468
+ contentType: z.ZodString;
2469
+ }, z.core.$strict>>;
2886
2470
  }, z.core.$strict>;
2887
- readonly 'agent.content.read': z.ZodObject<{
2888
- requestId: z.ZodUUID;
2889
- surface: z.ZodEnum<{
2890
- artifact: "artifact";
2891
- transcript: "transcript";
2892
- workspace: "workspace";
2471
+ }, z.core.$strict>;
2472
+ export type TaskSteerSealedPayload = z.infer<typeof TaskSteerSealedPayloadSchema>;
2473
+ /**
2474
+ * daemon -> server: `task.complete` of a sealed task. `summary`,
2475
+ * `finalMessage` and `document` are sealed. `artifactRefs` and
2476
+ * `preparedObservation` are not carried in v1.
2477
+ */
2478
+ export declare const TaskCompleteSealedPayloadSchema: z.ZodObject<{
2479
+ sealing: z.ZodOptional<z.ZodNever>;
2480
+ harnessId: z.ZodOptional<z.ZodString>;
2481
+ sessionRef: z.ZodString;
2482
+ usage: z.ZodOptional<z.ZodObject<{
2483
+ runtime: z.ZodEnum<{
2484
+ claude: "claude";
2485
+ codex: "codex";
2486
+ pi: "pi";
2893
2487
  }>;
2894
- actor: z.ZodObject<{
2895
- kind: z.ZodEnum<{
2896
- agent: "agent";
2897
- system: "system";
2898
- user: "user";
2899
- }>;
2488
+ provider: z.ZodOptional<z.ZodString>;
2489
+ model: z.ZodOptional<z.ZodString>;
2490
+ promptTokens: z.ZodOptional<z.ZodNumber>;
2491
+ completionTokens: z.ZodOptional<z.ZodNumber>;
2492
+ durationMs: z.ZodOptional<z.ZodNumber>;
2493
+ clientVersion: z.ZodString;
2494
+ reportedAt: z.ZodISODateTime;
2495
+ }, z.core.$strip>>;
2496
+ agentRef: z.ZodOptional<z.ZodObject<{
2497
+ agentId: z.ZodString;
2498
+ profileRevision: z.ZodString;
2499
+ }, z.core.$strict>>;
2500
+ agentHomeProjection: z.ZodOptional<z.ZodObject<{
2501
+ profileRevision: z.ZodString;
2502
+ projectionHash: z.ZodString;
2503
+ }, z.core.$strict>>;
2504
+ agentHomeMemoryChange: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2505
+ outcome: z.ZodLiteral<"unchanged">;
2506
+ }, z.core.$strict>, z.ZodObject<{
2507
+ outcome: z.ZodLiteral<"reader-attributed">;
2508
+ paths: z.ZodArray<z.ZodString>;
2509
+ }, z.core.$strict>, z.ZodObject<{
2510
+ outcome: z.ZodLiteral<"unattributed">;
2511
+ paths: z.ZodArray<z.ZodString>;
2512
+ }, z.core.$strict>, z.ZodObject<{
2513
+ outcome: z.ZodLiteral<"unmeasured">;
2514
+ }, z.core.$strict>], "outcome">>;
2515
+ sealed: z.ZodObject<{
2516
+ v: z.ZodLiteral<1>;
2517
+ suite: z.ZodLiteral<"byok-sealed-v1.hkdf-sha256.aes-256-gcm">;
2518
+ category: z.ZodLiteral<"task-output">;
2519
+ scope: z.ZodObject<{
2900
2520
  id: z.ZodString;
2521
+ epoch: z.ZodNumber;
2522
+ keyId: z.ZodString;
2901
2523
  }, z.core.$strict>;
2902
- agentRef: z.ZodObject<{
2903
- agentId: z.ZodString;
2904
- profileRevision: z.ZodString;
2524
+ chainHead: z.ZodObject<{
2525
+ seq: z.ZodNumber;
2526
+ hash: z.ZodString;
2905
2527
  }, z.core.$strict>;
2906
- sessionRef: z.ZodString;
2528
+ sender: z.ZodString;
2529
+ salt: z.ZodString;
2530
+ nonce: z.ZodString;
2531
+ paddedLength: z.ZodNumber;
2532
+ contentMac: z.ZodString;
2533
+ ciphertext: z.ZodOptional<z.ZodString>;
2534
+ ciphertextRef: z.ZodOptional<z.ZodObject<{
2535
+ blobId: z.ZodString;
2536
+ contentHash: z.ZodString;
2537
+ size: z.ZodNumber;
2538
+ contentType: z.ZodString;
2539
+ }, z.core.$strict>>;
2540
+ }, z.core.$strict>;
2541
+ }, z.core.$strict>;
2542
+ export type TaskCompleteSealedPayload = z.infer<typeof TaskCompleteSealedPayloadSchema>;
2543
+ /** daemon -> server: `task.fail` of a sealed task. `reason` is sealed; `preparedObservation` is not carried in v1. */
2544
+ export declare const TaskFailSealedPayloadSchema: z.ZodObject<{
2545
+ sealing: z.ZodOptional<z.ZodNever>;
2546
+ recovery: z.ZodOptional<z.ZodObject<{
2547
+ kind: z.ZodLiteral<"daemon_interrupted">;
2548
+ offerId: z.ZodUUID;
2549
+ }, z.core.$strict>>;
2550
+ harnessId: z.ZodOptional<z.ZodString>;
2551
+ retryable: z.ZodOptional<z.ZodBoolean>;
2552
+ usage: z.ZodOptional<z.ZodObject<{
2907
2553
  runtime: z.ZodEnum<{
2908
2554
  claude: "claude";
2909
2555
  codex: "codex";
2910
2556
  pi: "pi";
2911
2557
  }>;
2912
- cwd: z.ZodString;
2913
- policyRevision: z.ZodString;
2914
- target: z.ZodString;
2915
- mimeType: z.ZodString;
2916
- decodeAs: z.ZodEnum<{
2917
- bytes: "bytes";
2918
- utf8: "utf8";
2919
- }>;
2920
- policy: z.ZodObject<{
2921
- maxBytes: z.ZodNumber;
2922
- allowedMimeTypes: z.ZodArray<z.ZodString>;
2923
- }, z.core.$strict>;
2924
- }, z.core.$strict>;
2925
- readonly 'agent.content.receipt': z.ZodDiscriminatedUnion<[z.ZodObject<{
2926
- requestId: z.ZodUUID;
2927
- eventId: z.ZodUUID;
2928
- cursor: z.ZodNumber;
2929
- surface: z.ZodEnum<{
2930
- artifact: "artifact";
2931
- transcript: "transcript";
2932
- workspace: "workspace";
2933
- }>;
2934
- actor: z.ZodObject<{
2935
- kind: z.ZodEnum<{
2936
- agent: "agent";
2937
- system: "system";
2938
- user: "user";
2939
- }>;
2558
+ provider: z.ZodOptional<z.ZodString>;
2559
+ model: z.ZodOptional<z.ZodString>;
2560
+ promptTokens: z.ZodOptional<z.ZodNumber>;
2561
+ completionTokens: z.ZodOptional<z.ZodNumber>;
2562
+ durationMs: z.ZodOptional<z.ZodNumber>;
2563
+ clientVersion: z.ZodString;
2564
+ reportedAt: z.ZodISODateTime;
2565
+ }, z.core.$strip>>;
2566
+ agentRef: z.ZodOptional<z.ZodObject<{
2567
+ agentId: z.ZodString;
2568
+ profileRevision: z.ZodString;
2569
+ }, z.core.$strict>>;
2570
+ agentHomeProjection: z.ZodOptional<z.ZodObject<{
2571
+ profileRevision: z.ZodString;
2572
+ projectionHash: z.ZodString;
2573
+ }, z.core.$strict>>;
2574
+ agentHomeMemoryChange: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2575
+ outcome: z.ZodLiteral<"unchanged">;
2576
+ }, z.core.$strict>, z.ZodObject<{
2577
+ outcome: z.ZodLiteral<"reader-attributed">;
2578
+ paths: z.ZodArray<z.ZodString>;
2579
+ }, z.core.$strict>, z.ZodObject<{
2580
+ outcome: z.ZodLiteral<"unattributed">;
2581
+ paths: z.ZodArray<z.ZodString>;
2582
+ }, z.core.$strict>, z.ZodObject<{
2583
+ outcome: z.ZodLiteral<"unmeasured">;
2584
+ }, z.core.$strict>], "outcome">>;
2585
+ sealed: z.ZodObject<{
2586
+ v: z.ZodLiteral<1>;
2587
+ suite: z.ZodLiteral<"byok-sealed-v1.hkdf-sha256.aes-256-gcm">;
2588
+ category: z.ZodLiteral<"task-output">;
2589
+ scope: z.ZodObject<{
2940
2590
  id: z.ZodString;
2591
+ epoch: z.ZodNumber;
2592
+ keyId: z.ZodString;
2941
2593
  }, z.core.$strict>;
2942
- agentRef: z.ZodObject<{
2943
- agentId: z.ZodString;
2944
- profileRevision: z.ZodString;
2594
+ chainHead: z.ZodObject<{
2595
+ seq: z.ZodNumber;
2596
+ hash: z.ZodString;
2945
2597
  }, z.core.$strict>;
2946
- sessionRef: z.ZodString;
2947
- runtime: z.ZodEnum<{
2948
- claude: "claude";
2949
- codex: "codex";
2950
- pi: "pi";
2951
- }>;
2952
- cwd: z.ZodString;
2953
- policyRevision: z.ZodString;
2954
- target: z.ZodString;
2955
- mimeType: z.ZodString;
2956
- decodeAs: z.ZodEnum<{
2957
- bytes: "bytes";
2958
- utf8: "utf8";
2959
- }>;
2960
- decision: z.ZodLiteral<"allowed">;
2961
- byteCount: z.ZodNumber;
2962
- contentHash: z.ZodString;
2963
- blobRef: z.ZodObject<{
2598
+ sender: z.ZodString;
2599
+ salt: z.ZodString;
2600
+ nonce: z.ZodString;
2601
+ paddedLength: z.ZodNumber;
2602
+ contentMac: z.ZodString;
2603
+ ciphertext: z.ZodOptional<z.ZodString>;
2604
+ ciphertextRef: z.ZodOptional<z.ZodObject<{
2964
2605
  blobId: z.ZodString;
2965
2606
  contentHash: z.ZodString;
2966
2607
  size: z.ZodNumber;
2967
2608
  contentType: z.ZodString;
2968
- url: z.ZodOptional<z.ZodString>;
2969
- }, z.core.$strip>;
2970
- }, z.core.$strict>, z.ZodObject<{
2971
- requestId: z.ZodUUID;
2972
- eventId: z.ZodUUID;
2973
- cursor: z.ZodNumber;
2974
- surface: z.ZodEnum<{
2975
- artifact: "artifact";
2976
- transcript: "transcript";
2977
- workspace: "workspace";
2978
- }>;
2979
- actor: z.ZodObject<{
2980
- kind: z.ZodEnum<{
2981
- agent: "agent";
2982
- system: "system";
2983
- user: "user";
2984
- }>;
2609
+ }, z.core.$strict>>;
2610
+ }, z.core.$strict>;
2611
+ }, z.core.$strict>;
2612
+ export type TaskFailSealedPayload = z.infer<typeof TaskFailSealedPayloadSchema>;
2613
+ /**
2614
+ * daemon -> server: `task.decline` of a sealed task with a sealed `reason`.
2615
+ * The sealed decline codes go only on the plaintext `task.decline`: a device
2616
+ * that cannot open or use the scope key often cannot seal a reply either.
2617
+ */
2618
+ export declare const TaskDeclineSealedPayloadSchema: z.ZodObject<{
2619
+ sealing: z.ZodOptional<z.ZodNever>;
2620
+ retryable: z.ZodOptional<z.ZodBoolean>;
2621
+ agentRef: z.ZodOptional<z.ZodObject<{
2622
+ agentId: z.ZodString;
2623
+ profileRevision: z.ZodString;
2624
+ }, z.core.$strict>>;
2625
+ code: z.ZodOptional<z.ZodEnum<{
2626
+ agent_home_reader_busy: "agent_home_reader_busy";
2627
+ agent_home_writer_busy: "agent_home_writer_busy";
2628
+ }>>;
2629
+ sealed: z.ZodObject<{
2630
+ v: z.ZodLiteral<1>;
2631
+ suite: z.ZodLiteral<"byok-sealed-v1.hkdf-sha256.aes-256-gcm">;
2632
+ category: z.ZodLiteral<"task-output">;
2633
+ scope: z.ZodObject<{
2985
2634
  id: z.ZodString;
2635
+ epoch: z.ZodNumber;
2636
+ keyId: z.ZodString;
2986
2637
  }, z.core.$strict>;
2987
- agentRef: z.ZodObject<{
2988
- agentId: z.ZodString;
2989
- profileRevision: z.ZodString;
2638
+ chainHead: z.ZodObject<{
2639
+ seq: z.ZodNumber;
2640
+ hash: z.ZodString;
2990
2641
  }, z.core.$strict>;
2991
- sessionRef: z.ZodString;
2642
+ sender: z.ZodString;
2643
+ salt: z.ZodString;
2644
+ nonce: z.ZodString;
2645
+ paddedLength: z.ZodNumber;
2646
+ contentMac: z.ZodString;
2647
+ ciphertext: z.ZodOptional<z.ZodString>;
2648
+ ciphertextRef: z.ZodOptional<z.ZodObject<{
2649
+ blobId: z.ZodString;
2650
+ contentHash: z.ZodString;
2651
+ size: z.ZodNumber;
2652
+ contentType: z.ZodString;
2653
+ }, z.core.$strict>>;
2654
+ }, z.core.$strict>;
2655
+ }, z.core.$strict>;
2656
+ export type TaskDeclineSealedPayload = z.infer<typeof TaskDeclineSealedPayloadSchema>;
2657
+ /** daemon -> server: `task.cancelled` of a sealed task. `reason` is sealed. */
2658
+ export declare const TaskCancelledSealedPayloadSchema: z.ZodObject<{
2659
+ sealing: z.ZodOptional<z.ZodNever>;
2660
+ harnessId: z.ZodOptional<z.ZodString>;
2661
+ usage: z.ZodOptional<z.ZodObject<{
2992
2662
  runtime: z.ZodEnum<{
2993
2663
  claude: "claude";
2994
2664
  codex: "codex";
2995
2665
  pi: "pi";
2996
2666
  }>;
2997
- cwd: z.ZodString;
2998
- policyRevision: z.ZodString;
2999
- target: z.ZodString;
3000
- mimeType: z.ZodString;
3001
- decodeAs: z.ZodEnum<{
3002
- bytes: "bytes";
3003
- utf8: "utf8";
3004
- }>;
3005
- decision: z.ZodLiteral<"denied">;
3006
- byteCount: z.ZodLiteral<0>;
3007
- reason: z.ZodEnum<{
3008
- "absolute-target": "absolute-target";
3009
- "byte-limit": "byte-limit";
3010
- "capability-missing": "capability-missing";
3011
- "dot-segment": "dot-segment";
3012
- "identity-mismatch": "identity-mismatch";
3013
- "invalid-request": "invalid-request";
3014
- "mime-not-allowlisted": "mime-not-allowlisted";
3015
- "non-relative-target": "non-relative-target";
3016
- "not-regular-file": "not-regular-file";
3017
- "path-escape": "path-escape";
3018
- "policy-disabled": "policy-disabled";
3019
- "policy-revision-mismatch": "policy-revision-mismatch";
3020
- "root-invalid": "root-invalid";
3021
- "root-not-allowlisted": "root-not-allowlisted";
3022
- "sensitive-name": "sensitive-name";
3023
- symlink: "symlink";
3024
- "target-missing": "target-missing";
3025
- "text-decode-failed": "text-decode-failed";
3026
- "text-not-allowlisted": "text-not-allowlisted";
3027
- }>;
3028
- }, z.core.$strict>], "decision">;
3029
- readonly 'agent.home.projection': z.ZodObject<{
3030
- requestId: z.ZodUUID;
3031
- agentRef: z.ZodObject<{
3032
- agentId: z.ZodString;
3033
- profileRevision: z.ZodString;
3034
- }, z.core.$strict>;
2667
+ provider: z.ZodOptional<z.ZodString>;
2668
+ model: z.ZodOptional<z.ZodString>;
2669
+ promptTokens: z.ZodOptional<z.ZodNumber>;
2670
+ completionTokens: z.ZodOptional<z.ZodNumber>;
2671
+ durationMs: z.ZodOptional<z.ZodNumber>;
2672
+ clientVersion: z.ZodString;
2673
+ reportedAt: z.ZodISODateTime;
2674
+ }, z.core.$strip>>;
2675
+ agentRef: z.ZodOptional<z.ZodObject<{
2676
+ agentId: z.ZodString;
2677
+ profileRevision: z.ZodString;
2678
+ }, z.core.$strict>>;
2679
+ agentHomeProjection: z.ZodOptional<z.ZodObject<{
2680
+ profileRevision: z.ZodString;
3035
2681
  projectionHash: z.ZodString;
3036
- projection: z.ZodType<import("./agent-home-projection").AgentHomeProjectionValue, unknown, z.core.$ZodTypeInternals<import("./agent-home-projection").AgentHomeProjectionValue, unknown>>;
3037
- }, z.core.$strict>;
3038
- readonly 'agent.input.preparation': z.ZodObject<{
3039
- agentMemory: z.ZodEnum<{
3040
- none: "none";
3041
- read: "read";
3042
- "read-write": "read-write";
3043
- }>;
3044
- requestId: z.ZodUUID;
3045
- agentRef: z.ZodObject<{
3046
- agentId: z.ZodString;
3047
- profileRevision: z.ZodString;
3048
- }, z.core.$strict>;
3049
- profileId: z.ZodString;
3050
- policyRevision: z.ZodString;
3051
- source: z.ZodObject<{
3052
- revision: z.ZodString;
3053
- digest: z.ZodString;
2682
+ }, z.core.$strict>>;
2683
+ agentHomeMemoryChange: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2684
+ outcome: z.ZodLiteral<"unchanged">;
2685
+ }, z.core.$strict>, z.ZodObject<{
2686
+ outcome: z.ZodLiteral<"reader-attributed">;
2687
+ paths: z.ZodArray<z.ZodString>;
2688
+ }, z.core.$strict>, z.ZodObject<{
2689
+ outcome: z.ZodLiteral<"unattributed">;
2690
+ paths: z.ZodArray<z.ZodString>;
2691
+ }, z.core.$strict>, z.ZodObject<{
2692
+ outcome: z.ZodLiteral<"unmeasured">;
2693
+ }, z.core.$strict>], "outcome">>;
2694
+ sealed: z.ZodObject<{
2695
+ v: z.ZodLiteral<1>;
2696
+ suite: z.ZodLiteral<"byok-sealed-v1.hkdf-sha256.aes-256-gcm">;
2697
+ category: z.ZodLiteral<"task-output">;
2698
+ scope: z.ZodObject<{
2699
+ id: z.ZodString;
2700
+ epoch: z.ZodNumber;
2701
+ keyId: z.ZodString;
3054
2702
  }, z.core.$strict>;
3055
- selection: z.ZodObject<{
3056
- model: z.ZodObject<{
3057
- id: z.ZodString;
3058
- name: z.ZodString;
3059
- api: z.ZodLiteral<"openai-completions">;
3060
- provider: z.ZodString;
3061
- baseUrl: z.ZodString;
3062
- reasoning: z.ZodBoolean;
3063
- input: z.ZodArray<z.ZodEnum<{
3064
- image: "image";
3065
- text: "text";
3066
- }>>;
3067
- cost: z.ZodObject<{
3068
- input: z.ZodNumber;
3069
- output: z.ZodNumber;
3070
- cacheRead: z.ZodNumber;
3071
- cacheWrite: z.ZodNumber;
3072
- }, z.core.$strict>;
3073
- contextWindow: z.ZodNumber;
3074
- maxTokens: z.ZodNumber;
3075
- thinkingLevelMap: z.ZodOptional<z.ZodObject<{
3076
- off: z.ZodNullable<z.ZodString>;
3077
- minimal: z.ZodNullable<z.ZodString>;
3078
- low: z.ZodNullable<z.ZodString>;
3079
- medium: z.ZodNullable<z.ZodString>;
3080
- high: z.ZodNullable<z.ZodString>;
3081
- xhigh: z.ZodNullable<z.ZodString>;
3082
- max: z.ZodNullable<z.ZodString>;
3083
- }, z.core.$strict>>;
3084
- compat: z.ZodOptional<z.ZodObject<{
3085
- supportsStore: z.ZodOptional<z.ZodBoolean>;
3086
- supportsDeveloperRole: z.ZodOptional<z.ZodBoolean>;
3087
- supportsReasoningEffort: z.ZodOptional<z.ZodBoolean>;
3088
- supportsUsageInStreaming: z.ZodOptional<z.ZodBoolean>;
3089
- maxTokensField: z.ZodOptional<z.ZodEnum<{
3090
- max_completion_tokens: "max_completion_tokens";
3091
- max_tokens: "max_tokens";
3092
- }>>;
3093
- thinkingFormat: z.ZodOptional<z.ZodEnum<{
3094
- "ant-ling": "ant-ling";
3095
- baseten: "baseten";
3096
- "chat-template": "chat-template";
3097
- deepseek: "deepseek";
3098
- openai: "openai";
3099
- openrouter: "openrouter";
3100
- qwen: "qwen";
3101
- "qwen-chat-template": "qwen-chat-template";
3102
- "string-thinking": "string-thinking";
3103
- together: "together";
3104
- zai: "zai";
3105
- }>>;
3106
- zaiToolStream: z.ZodOptional<z.ZodBoolean>;
3107
- }, z.core.$strict>>;
3108
- }, z.core.$strict>;
3109
- options: z.ZodObject<{
3110
- cacheRetention: z.ZodEnum<{
3111
- long: "long";
3112
- none: "none";
3113
- short: "short";
3114
- }>;
3115
- maxTokens: z.ZodNumber;
3116
- temperature: z.ZodOptional<z.ZodNumber>;
3117
- toolChoice: z.ZodOptional<z.ZodEnum<{
3118
- auto: "auto";
3119
- none: "none";
3120
- }>>;
3121
- reasoningEffort: z.ZodOptional<z.ZodEnum<{
3122
- high: "high";
3123
- low: "low";
3124
- max: "max";
3125
- medium: "medium";
3126
- minimal: "minimal";
3127
- xhigh: "xhigh";
3128
- }>>;
3129
- }, z.core.$strict>;
2703
+ chainHead: z.ZodObject<{
2704
+ seq: z.ZodNumber;
2705
+ hash: z.ZodString;
3130
2706
  }, z.core.$strict>;
3131
- deadlineAt: z.ZodISODateTime;
3132
- context: z.ZodUnion<readonly [z.ZodObject<{
3133
- inline: z.ZodString;
3134
- }, z.core.$strict>, z.ZodObject<{
3135
- blobRef: z.ZodObject<{
3136
- blobId: z.ZodString;
3137
- contentHash: z.ZodString;
3138
- size: z.ZodNumber;
3139
- contentType: z.ZodString;
3140
- url: z.ZodOptional<z.ZodString>;
3141
- }, z.core.$strip>;
2707
+ sender: z.ZodString;
2708
+ salt: z.ZodString;
2709
+ nonce: z.ZodString;
2710
+ paddedLength: z.ZodNumber;
2711
+ contentMac: z.ZodString;
2712
+ ciphertext: z.ZodOptional<z.ZodString>;
2713
+ ciphertextRef: z.ZodOptional<z.ZodObject<{
2714
+ blobId: z.ZodString;
3142
2715
  contentHash: z.ZodString;
3143
- }, z.core.$strict>]>;
3144
- requiredToolsets: z.ZodArray<z.ZodString>;
3145
- accountingPolicyRef: z.ZodOptional<z.ZodObject<{
3146
- revision: z.ZodString;
3147
- ruledRuntime: z.ZodString;
3148
- ruledTarget: z.ZodObject<{
3149
- endpoint: z.ZodString;
3150
- modelId: z.ZodString;
3151
- }, z.core.$strict>;
3152
- ruledResidualKeys: z.ZodArray<z.ZodString>;
2716
+ size: z.ZodNumber;
2717
+ contentType: z.ZodString;
3153
2718
  }, z.core.$strict>>;
3154
2719
  }, z.core.$strict>;
3155
- readonly 'provider.provisioning.available': z.ZodObject<{
3156
- requestId: z.ZodUUID;
3157
- }, z.core.$strict>;
3158
- readonly 'agent.memory.intent.available': z.ZodObject<{
3159
- intentId: z.ZodUUID;
3160
- agentRef: z.ZodObject<{
3161
- agentId: z.ZodString;
3162
- profileRevision: z.ZodString;
2720
+ }, z.core.$strict>;
2721
+ export type TaskCancelledSealedPayload = z.infer<typeof TaskCancelledSealedPayloadSchema>;
2722
+ /** daemon -> server: `task.progress` of a sealed task. `events` is sealed; `seq` names the batch. */
2723
+ export declare const TaskProgressSealedPayloadSchema: z.ZodObject<{
2724
+ sealing: z.ZodOptional<z.ZodNever>;
2725
+ seq: z.ZodNumber;
2726
+ sealed: z.ZodObject<{
2727
+ v: z.ZodLiteral<1>;
2728
+ suite: z.ZodLiteral<"byok-sealed-v1.hkdf-sha256.aes-256-gcm">;
2729
+ category: z.ZodLiteral<"task-output">;
2730
+ scope: z.ZodObject<{
2731
+ id: z.ZodString;
2732
+ epoch: z.ZodNumber;
2733
+ keyId: z.ZodString;
3163
2734
  }, z.core.$strict>;
3164
- }, z.core.$strict>;
3165
- readonly 'task.approve': z.ZodObject<{
3166
- approvalId: z.ZodOptional<z.ZodString>;
3167
- }, z.core.$strip>;
3168
- readonly 'task.reject': z.ZodObject<{
3169
- reason: z.ZodOptional<z.ZodString>;
3170
- approvalId: z.ZodOptional<z.ZodString>;
3171
- }, z.core.$strip>;
3172
- readonly 'task.cancel': z.ZodObject<{
3173
- reason: z.ZodOptional<z.ZodString>;
3174
- }, z.core.$strip>;
3175
- readonly 'task.steer': z.ZodObject<{
3176
- text: z.ZodString;
3177
- }, z.core.$strip>;
3178
- readonly 'task.claim': z.ZodObject<{
3179
- deviceId: z.ZodString;
3180
- agentId: z.ZodOptional<z.ZodString>;
3181
- agentRef: z.ZodOptional<z.ZodObject<{
3182
- agentId: z.ZodString;
3183
- profileRevision: z.ZodString;
3184
- }, z.core.$strict>>;
3185
- runtime: z.ZodOptional<z.ZodEnum<{
3186
- claude: "claude";
3187
- codex: "codex";
3188
- pi: "pi";
3189
- }>>;
3190
- harnessId: z.ZodOptional<z.ZodString>;
3191
- capabilities: z.ZodOptional<z.ZodObject<{
3192
- steer: z.ZodOptional<z.ZodBoolean>;
3193
- resume: z.ZodOptional<z.ZodBoolean>;
3194
- approvalInteractive: z.ZodOptional<z.ZodBoolean>;
3195
- mcpToolsets: z.ZodOptional<z.ZodBoolean>;
3196
- messageDraft: z.ZodOptional<z.ZodBoolean>;
3197
- }, z.core.$strip>>;
3198
- }, z.core.$strip>;
3199
- readonly 'task.started': z.ZodObject<{}, z.core.$strip>;
3200
- readonly 'task.decline': z.ZodObject<{
3201
- reason: z.ZodString;
3202
- retryable: z.ZodOptional<z.ZodBoolean>;
3203
- agentRef: z.ZodOptional<z.ZodObject<{
3204
- agentId: z.ZodString;
3205
- profileRevision: z.ZodString;
3206
- }, z.core.$strict>>;
3207
- code: z.ZodOptional<z.ZodEnum<{
3208
- agent_home_reader_busy: "agent_home_reader_busy";
3209
- agent_home_writer_busy: "agent_home_writer_busy";
3210
- }>>;
3211
- }, z.core.$strip>;
3212
- readonly 'task.progress': z.ZodObject<{
3213
- seq: z.ZodNumber;
3214
- events: z.ZodArray<z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
3215
- type: z.ZodLiteral<"progress">;
3216
- text: z.ZodString;
3217
- }, z.core.$strip>, z.ZodObject<{
3218
- type: z.ZodLiteral<"tool_use">;
3219
- tool: z.ZodString;
3220
- mcp: z.ZodOptional<z.ZodObject<{
3221
- server: z.ZodString;
3222
- tool: z.ZodString;
3223
- }, z.core.$strict>>;
3224
- input: z.ZodOptional<z.ZodUnknown>;
3225
- toolCallId: z.ZodOptional<z.ZodString>;
3226
- spill: z.ZodOptional<z.ZodObject<{
3227
- field: z.ZodEnum<{
3228
- input: "input";
3229
- output: "output";
3230
- }>;
3231
- totalBytes: z.ZodNumber;
3232
- omittedBytes: z.ZodNumber;
3233
- contentType: z.ZodLiteral<"application/json">;
3234
- blob: z.ZodOptional<z.ZodObject<{
3235
- blobId: z.ZodString;
3236
- contentHash: z.ZodString;
3237
- size: z.ZodNumber;
3238
- contentType: z.ZodString;
3239
- url: z.ZodOptional<z.ZodString>;
3240
- }, z.core.$strip>>;
3241
- unstoredReason: z.ZodOptional<z.ZodString>;
3242
- }, z.core.$strict>>;
3243
- }, z.core.$strip>, z.ZodObject<{
3244
- type: z.ZodLiteral<"tool_result">;
3245
- tool: z.ZodString;
3246
- mcp: z.ZodOptional<z.ZodObject<{
3247
- server: z.ZodString;
3248
- tool: z.ZodString;
3249
- }, z.core.$strict>>;
3250
- output: z.ZodOptional<z.ZodUnknown>;
3251
- toolCallId: z.ZodOptional<z.ZodString>;
3252
- isError: z.ZodOptional<z.ZodBoolean>;
3253
- spill: z.ZodOptional<z.ZodObject<{
3254
- field: z.ZodEnum<{
3255
- input: "input";
3256
- output: "output";
3257
- }>;
3258
- totalBytes: z.ZodNumber;
3259
- omittedBytes: z.ZodNumber;
3260
- contentType: z.ZodLiteral<"application/json">;
3261
- blob: z.ZodOptional<z.ZodObject<{
3262
- blobId: z.ZodString;
3263
- contentHash: z.ZodString;
3264
- size: z.ZodNumber;
3265
- contentType: z.ZodString;
3266
- url: z.ZodOptional<z.ZodString>;
3267
- }, z.core.$strip>>;
3268
- unstoredReason: z.ZodOptional<z.ZodString>;
3269
- }, z.core.$strict>>;
3270
- }, z.core.$strip>, z.ZodObject<{
3271
- type: z.ZodLiteral<"artifact">;
3272
- name: z.ZodString;
3273
- contentType: z.ZodString;
3274
- }, z.core.$strip>, z.ZodObject<{
3275
- type: z.ZodLiteral<"needs_approval">;
3276
- summary: z.ZodString;
3277
- }, z.core.$strip>, z.ZodObject<{
3278
- type: z.ZodLiteral<"turn_end">;
3279
- }, z.core.$strip>, z.ZodObject<{
3280
- type: z.ZodLiteral<"error">;
3281
- message: z.ZodString;
3282
- }, z.core.$strip>, z.ZodObject<{
3283
- type: z.ZodLiteral<"usage">;
3284
- inputTokens: z.ZodOptional<z.ZodNumber>;
3285
- cachedInputTokens: z.ZodOptional<z.ZodNumber>;
3286
- outputTokens: z.ZodOptional<z.ZodNumber>;
3287
- reasoningTokens: z.ZodOptional<z.ZodNumber>;
3288
- totalTokens: z.ZodOptional<z.ZodNumber>;
3289
- contextTokens: z.ZodOptional<z.ZodNumber>;
3290
- contextWindow: z.ZodOptional<z.ZodNumber>;
3291
- contextSource: z.ZodOptional<z.ZodEnum<{
3292
- estimate: "estimate";
3293
- provider: "provider";
3294
- }>>;
3295
- }, z.core.$strip>], "type">, z.ZodObject<{
3296
- type: z.ZodString;
3297
- }, z.core.$loose>]>>;
3298
- }, z.core.$strip>;
3299
- readonly 'task.artifact': z.ZodObject<{
3300
- name: z.ZodString;
3301
- contentType: z.ZodString;
3302
- inline: z.ZodOptional<z.ZodString>;
3303
- blobRef: z.ZodOptional<z.ZodObject<{
2735
+ chainHead: z.ZodObject<{
2736
+ seq: z.ZodNumber;
2737
+ hash: z.ZodString;
2738
+ }, z.core.$strict>;
2739
+ sender: z.ZodString;
2740
+ salt: z.ZodString;
2741
+ nonce: z.ZodString;
2742
+ paddedLength: z.ZodNumber;
2743
+ contentMac: z.ZodString;
2744
+ ciphertext: z.ZodOptional<z.ZodString>;
2745
+ ciphertextRef: z.ZodOptional<z.ZodObject<{
3304
2746
  blobId: z.ZodString;
3305
2747
  contentHash: z.ZodString;
3306
2748
  size: z.ZodNumber;
3307
2749
  contentType: z.ZodString;
3308
- url: z.ZodOptional<z.ZodString>;
3309
- }, z.core.$strip>>;
3310
- }, z.core.$strip>;
3311
- readonly 'task.await_approval': z.ZodObject<{
3312
- summary: z.ZodString;
3313
- approvalId: z.ZodOptional<z.ZodString>;
3314
- }, z.core.$strip>;
3315
- readonly 'task.complete': z.ZodObject<{
3316
- harnessId: z.ZodOptional<z.ZodString>;
3317
- summary: z.ZodString;
3318
- finalMessage: z.ZodOptional<z.ZodString>;
3319
- sessionRef: z.ZodString;
3320
- artifactRefs: z.ZodOptional<z.ZodArray<z.ZodObject<{
2750
+ }, z.core.$strict>>;
2751
+ }, z.core.$strict>;
2752
+ }, z.core.$strict>;
2753
+ export type TaskProgressSealedPayload = z.infer<typeof TaskProgressSealedPayloadSchema>;
2754
+ /**
2755
+ * daemon -> server: an inline artifact of a sealed task. `inline` is sealed; a
2756
+ * blob artifact is not carried in v1. `artifactId` names the write in the AAD
2757
+ * and the content MAC, because two artifacts of one task may share a `name`.
2758
+ */
2759
+ export declare const TaskArtifactSealedPayloadSchema: z.ZodObject<{
2760
+ sealing: z.ZodOptional<z.ZodNever>;
2761
+ name: z.ZodString;
2762
+ contentType: z.ZodString;
2763
+ artifactId: z.ZodUUID;
2764
+ sealed: z.ZodObject<{
2765
+ v: z.ZodLiteral<1>;
2766
+ suite: z.ZodLiteral<"byok-sealed-v1.hkdf-sha256.aes-256-gcm">;
2767
+ category: z.ZodLiteral<"task-output">;
2768
+ scope: z.ZodObject<{
2769
+ id: z.ZodString;
2770
+ epoch: z.ZodNumber;
2771
+ keyId: z.ZodString;
2772
+ }, z.core.$strict>;
2773
+ chainHead: z.ZodObject<{
2774
+ seq: z.ZodNumber;
2775
+ hash: z.ZodString;
2776
+ }, z.core.$strict>;
2777
+ sender: z.ZodString;
2778
+ salt: z.ZodString;
2779
+ nonce: z.ZodString;
2780
+ paddedLength: z.ZodNumber;
2781
+ contentMac: z.ZodString;
2782
+ ciphertext: z.ZodOptional<z.ZodString>;
2783
+ ciphertextRef: z.ZodOptional<z.ZodObject<{
3321
2784
  blobId: z.ZodString;
3322
2785
  contentHash: z.ZodString;
3323
2786
  size: z.ZodNumber;
3324
2787
  contentType: z.ZodString;
3325
- url: z.ZodOptional<z.ZodString>;
3326
- }, z.core.$strip>>>;
3327
- document: z.ZodOptional<z.ZodUnknown>;
3328
- usage: z.ZodOptional<z.ZodObject<{
3329
- runtime: z.ZodEnum<{
3330
- claude: "claude";
3331
- codex: "codex";
3332
- pi: "pi";
3333
- }>;
3334
- provider: z.ZodOptional<z.ZodString>;
3335
- model: z.ZodOptional<z.ZodString>;
3336
- promptTokens: z.ZodOptional<z.ZodNumber>;
3337
- completionTokens: z.ZodOptional<z.ZodNumber>;
3338
- durationMs: z.ZodOptional<z.ZodNumber>;
3339
- clientVersion: z.ZodString;
3340
- reportedAt: z.ZodISODateTime;
3341
- }, z.core.$strip>>;
3342
- preparedObservation: z.ZodOptional<z.ZodObject<{
3343
- requestDigest: z.ZodString;
3344
- initialPromptTokens: z.ZodNumber;
3345
- maxPromptTokens: z.ZodNumber;
3346
- }, z.core.$strict>>;
3347
- agentRef: z.ZodOptional<z.ZodObject<{
3348
- agentId: z.ZodString;
3349
- profileRevision: z.ZodString;
3350
- }, z.core.$strict>>;
3351
- agentHomeProjection: z.ZodOptional<z.ZodObject<{
3352
- profileRevision: z.ZodString;
3353
- projectionHash: z.ZodString;
3354
- }, z.core.$strict>>;
3355
- agentHomeMemoryChange: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
3356
- outcome: z.ZodLiteral<"unchanged">;
3357
- }, z.core.$strict>, z.ZodObject<{
3358
- outcome: z.ZodLiteral<"reader-attributed">;
3359
- paths: z.ZodArray<z.ZodString>;
3360
- }, z.core.$strict>, z.ZodObject<{
3361
- outcome: z.ZodLiteral<"unattributed">;
3362
- paths: z.ZodArray<z.ZodString>;
3363
- }, z.core.$strict>, z.ZodObject<{
3364
- outcome: z.ZodLiteral<"unmeasured">;
3365
- }, z.core.$strict>], "outcome">>;
3366
- }, z.core.$strip>;
3367
- readonly 'task.fail': z.ZodObject<{
3368
- recovery: z.ZodOptional<z.ZodObject<{
3369
- kind: z.ZodLiteral<"daemon_interrupted">;
3370
- offerId: z.ZodUUID;
3371
- }, z.core.$strict>>;
3372
- harnessId: z.ZodOptional<z.ZodString>;
3373
- reason: z.ZodString;
3374
- retryable: z.ZodOptional<z.ZodBoolean>;
3375
- usage: z.ZodOptional<z.ZodObject<{
3376
- runtime: z.ZodEnum<{
3377
- claude: "claude";
3378
- codex: "codex";
3379
- pi: "pi";
3380
- }>;
3381
- provider: z.ZodOptional<z.ZodString>;
3382
- model: z.ZodOptional<z.ZodString>;
3383
- promptTokens: z.ZodOptional<z.ZodNumber>;
3384
- completionTokens: z.ZodOptional<z.ZodNumber>;
3385
- durationMs: z.ZodOptional<z.ZodNumber>;
3386
- clientVersion: z.ZodString;
3387
- reportedAt: z.ZodISODateTime;
3388
- }, z.core.$strip>>;
3389
- preparedObservation: z.ZodOptional<z.ZodObject<{
3390
- requestDigest: z.ZodString;
3391
- initialPromptTokens: z.ZodNumber;
3392
- maxPromptTokens: z.ZodNumber;
3393
- }, z.core.$strict>>;
3394
- agentRef: z.ZodOptional<z.ZodObject<{
3395
- agentId: z.ZodString;
3396
- profileRevision: z.ZodString;
3397
- }, z.core.$strict>>;
3398
- agentHomeProjection: z.ZodOptional<z.ZodObject<{
3399
- profileRevision: z.ZodString;
3400
- projectionHash: z.ZodString;
3401
2788
  }, z.core.$strict>>;
3402
- agentHomeMemoryChange: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
3403
- outcome: z.ZodLiteral<"unchanged">;
3404
- }, z.core.$strict>, z.ZodObject<{
3405
- outcome: z.ZodLiteral<"reader-attributed">;
3406
- paths: z.ZodArray<z.ZodString>;
3407
- }, z.core.$strict>, z.ZodObject<{
3408
- outcome: z.ZodLiteral<"unattributed">;
3409
- paths: z.ZodArray<z.ZodString>;
3410
- }, z.core.$strict>, z.ZodObject<{
3411
- outcome: z.ZodLiteral<"unmeasured">;
3412
- }, z.core.$strict>], "outcome">>;
3413
- }, z.core.$strip>;
3414
- readonly 'task.cancelled': z.ZodObject<{
3415
- harnessId: z.ZodOptional<z.ZodString>;
3416
- reason: z.ZodOptional<z.ZodString>;
3417
- usage: z.ZodOptional<z.ZodObject<{
3418
- runtime: z.ZodEnum<{
3419
- claude: "claude";
3420
- codex: "codex";
3421
- pi: "pi";
3422
- }>;
3423
- provider: z.ZodOptional<z.ZodString>;
3424
- model: z.ZodOptional<z.ZodString>;
3425
- promptTokens: z.ZodOptional<z.ZodNumber>;
3426
- completionTokens: z.ZodOptional<z.ZodNumber>;
3427
- durationMs: z.ZodOptional<z.ZodNumber>;
3428
- clientVersion: z.ZodString;
3429
- reportedAt: z.ZodISODateTime;
3430
- }, z.core.$strip>>;
3431
- agentRef: z.ZodOptional<z.ZodObject<{
3432
- agentId: z.ZodString;
3433
- profileRevision: z.ZodString;
3434
- }, z.core.$strict>>;
3435
- agentHomeProjection: z.ZodOptional<z.ZodObject<{
3436
- profileRevision: z.ZodString;
3437
- projectionHash: z.ZodString;
2789
+ }, z.core.$strict>;
2790
+ }, z.core.$strict>;
2791
+ export type TaskArtifactSealedPayload = z.infer<typeof TaskArtifactSealedPayloadSchema>;
2792
+ /** daemon -> server: `task.await_approval` of a sealed task. `summary` is sealed; `approvalId` is required. */
2793
+ export declare const TaskAwaitApprovalSealedPayloadSchema: z.ZodObject<{
2794
+ sealing: z.ZodOptional<z.ZodNever>;
2795
+ approvalId: z.ZodString;
2796
+ sealed: z.ZodObject<{
2797
+ v: z.ZodLiteral<1>;
2798
+ suite: z.ZodLiteral<"byok-sealed-v1.hkdf-sha256.aes-256-gcm">;
2799
+ category: z.ZodLiteral<"task-output">;
2800
+ scope: z.ZodObject<{
2801
+ id: z.ZodString;
2802
+ epoch: z.ZodNumber;
2803
+ keyId: z.ZodString;
2804
+ }, z.core.$strict>;
2805
+ chainHead: z.ZodObject<{
2806
+ seq: z.ZodNumber;
2807
+ hash: z.ZodString;
2808
+ }, z.core.$strict>;
2809
+ sender: z.ZodString;
2810
+ salt: z.ZodString;
2811
+ nonce: z.ZodString;
2812
+ paddedLength: z.ZodNumber;
2813
+ contentMac: z.ZodString;
2814
+ ciphertext: z.ZodOptional<z.ZodString>;
2815
+ ciphertextRef: z.ZodOptional<z.ZodObject<{
2816
+ blobId: z.ZodString;
2817
+ contentHash: z.ZodString;
2818
+ size: z.ZodNumber;
2819
+ contentType: z.ZodString;
3438
2820
  }, z.core.$strict>>;
3439
- agentHomeMemoryChange: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
3440
- outcome: z.ZodLiteral<"unchanged">;
3441
- }, z.core.$strict>, z.ZodObject<{
3442
- outcome: z.ZodLiteral<"reader-attributed">;
3443
- paths: z.ZodArray<z.ZodString>;
3444
- }, z.core.$strict>, z.ZodObject<{
3445
- outcome: z.ZodLiteral<"unattributed">;
3446
- paths: z.ZodArray<z.ZodString>;
3447
- }, z.core.$strict>, z.ZodObject<{
3448
- outcome: z.ZodLiteral<"unmeasured">;
3449
- }, z.core.$strict>], "outcome">>;
3450
- }, z.core.$strip>;
3451
- readonly 'task.approval_resolved': z.ZodObject<{
3452
- approvalId: z.ZodString;
3453
- decision: z.ZodEnum<{
3454
- approve: "approve";
3455
- reject: "reject";
3456
- }>;
3457
- resolvedBy: z.ZodEnum<{
3458
- local: "local";
3459
- }>;
3460
- at: z.ZodISODateTime;
3461
- }, z.core.$strip>;
2821
+ }, z.core.$strict>;
2822
+ }, z.core.$strict>;
2823
+ export type TaskAwaitApprovalSealedPayload = z.infer<typeof TaskAwaitApprovalSealedPayloadSchema>;
2824
+ /**
2825
+ * Protocol-owned task-opening family; the wire registry consumes these same entries.
2826
+ *
2827
+ * Each value is written `X as typeof X`, here and in `MESSAGE_PAYLOAD_SCHEMAS`.
2828
+ * The assertion is type-only (no runtime code). It makes declaration emit
2829
+ * name each schema (`typeof X`) instead of copying its full type, which keeps
2830
+ * the published `.d.ts` small. Every new entry follows this rule.
2831
+ */
2832
+ declare const TASK_OFFER_PAYLOAD_SCHEMAS: {
2833
+ readonly 'task.offer': typeof TaskOfferPayloadSchema;
2834
+ readonly 'task.offer_with_toolsets': typeof TaskOfferWithToolsetsPayloadSchema;
2835
+ readonly 'task.offer_for_agent': typeof TaskOfferForAgentPayloadSchema;
2836
+ readonly 'task.offer_for_agent_with_egress': typeof TaskOfferForAgentWithEgressPayloadSchema;
2837
+ readonly 'task.offer_for_agent_with_egress_fresh': typeof TaskOfferForAgentWithEgressFreshPayloadSchema;
2838
+ readonly 'task.offer_prepared': typeof TaskOfferPreparedPayloadSchema;
2839
+ readonly 'task.offer_sealed': typeof TaskOfferSealedPayloadSchema;
2840
+ readonly 'task.offer_with_toolsets_sealed': typeof TaskOfferWithToolsetsSealedPayloadSchema;
2841
+ readonly 'task.offer_for_agent_sealed': typeof TaskOfferForAgentSealedPayloadSchema;
2842
+ readonly 'task.offer_for_agent_with_egress_sealed': typeof TaskOfferForAgentWithEgressSealedPayloadSchema;
2843
+ readonly 'task.offer_for_agent_with_egress_fresh_sealed': typeof TaskOfferForAgentWithEgressFreshSealedPayloadSchema;
2844
+ };
2845
+ export type TaskOfferType = keyof typeof TASK_OFFER_PAYLOAD_SCHEMAS;
2846
+ export declare const TASK_OFFER_TYPES: readonly TaskOfferType[];
2847
+ /** Classify task-opening offers without duplicating the protocol registry in consumers. */
2848
+ export declare function isTaskOfferType(type: string): type is TaskOfferType;
2849
+ export declare const MESSAGE_PAYLOAD_SCHEMAS: {
2850
+ readonly 'task.offer': typeof TaskOfferPayloadSchema;
2851
+ readonly 'task.offer_with_toolsets': typeof TaskOfferWithToolsetsPayloadSchema;
2852
+ readonly 'task.offer_for_agent': typeof TaskOfferForAgentPayloadSchema;
2853
+ readonly 'task.offer_for_agent_with_egress': typeof TaskOfferForAgentWithEgressPayloadSchema;
2854
+ readonly 'task.offer_for_agent_with_egress_fresh': typeof TaskOfferForAgentWithEgressFreshPayloadSchema;
2855
+ readonly 'task.offer_prepared': typeof TaskOfferPreparedPayloadSchema;
2856
+ readonly 'task.offer_sealed': typeof TaskOfferSealedPayloadSchema;
2857
+ readonly 'task.offer_with_toolsets_sealed': typeof TaskOfferWithToolsetsSealedPayloadSchema;
2858
+ readonly 'task.offer_for_agent_sealed': typeof TaskOfferForAgentSealedPayloadSchema;
2859
+ readonly 'task.offer_for_agent_with_egress_sealed': typeof TaskOfferForAgentWithEgressSealedPayloadSchema;
2860
+ readonly 'task.offer_for_agent_with_egress_fresh_sealed': typeof TaskOfferForAgentWithEgressFreshSealedPayloadSchema;
2861
+ readonly 'conn.hello': typeof ConnHelloPayloadSchema;
2862
+ readonly 'conn.ack': typeof ConnAckPayloadSchema;
2863
+ readonly 'agent.egress.reliable': typeof AgentEgressReliablePayloadSchema;
2864
+ readonly 'agent.egress.ack': typeof AgentEgressAckPayloadSchema;
2865
+ readonly 'agent.message.draft': typeof AgentMessageDraftPayloadSchema;
2866
+ readonly 'agent.message.publish': typeof AgentMessagePublishPayloadSchema;
2867
+ readonly 'agent.message.disposition': typeof AgentMessageDispositionPayloadSchema;
2868
+ readonly 'agent.content.read': typeof AgentContentReadPayloadSchema;
2869
+ readonly 'agent.content.receipt': typeof AgentContentReceiptPayloadSchema;
2870
+ readonly 'agent.home.projection': typeof AgentHomeProjectionPayloadSchema;
2871
+ readonly 'agent.input.preparation': typeof AgentInputPreparationPayloadSchema;
2872
+ readonly 'provider.provisioning.available': typeof ProviderProvisioningAvailablePayloadSchema;
2873
+ readonly 'agent.memory.intent.available': typeof AgentMemoryIntentAvailablePayloadSchema;
2874
+ readonly 'task.approve': typeof TaskApprovePayloadSchema;
2875
+ readonly 'task.reject': typeof TaskRejectPayloadSchema;
2876
+ readonly 'task.cancel': typeof TaskCancelPayloadSchema;
2877
+ readonly 'task.steer': typeof TaskSteerPayloadSchema;
2878
+ readonly 'task.claim': typeof TaskClaimPayloadSchema;
2879
+ readonly 'task.started': typeof TaskStartedPayloadSchema;
2880
+ readonly 'task.decline': typeof TaskDeclinePayloadSchema;
2881
+ readonly 'task.progress': typeof TaskProgressPayloadSchema;
2882
+ readonly 'task.artifact': typeof TaskArtifactPayloadSchema;
2883
+ readonly 'task.await_approval': typeof TaskAwaitApprovalPayloadSchema;
2884
+ readonly 'task.complete': typeof TaskCompletePayloadSchema;
2885
+ readonly 'task.fail': typeof TaskFailPayloadSchema;
2886
+ readonly 'task.cancelled': typeof TaskCancelledPayloadSchema;
2887
+ readonly 'task.approval_resolved': typeof TaskApprovalResolvedPayloadSchema;
2888
+ readonly 'task.steer_sealed': typeof TaskSteerSealedPayloadSchema;
2889
+ readonly 'task.complete_sealed': typeof TaskCompleteSealedPayloadSchema;
2890
+ readonly 'task.fail_sealed': typeof TaskFailSealedPayloadSchema;
2891
+ readonly 'task.decline_sealed': typeof TaskDeclineSealedPayloadSchema;
2892
+ readonly 'task.cancelled_sealed': typeof TaskCancelledSealedPayloadSchema;
2893
+ readonly 'task.progress_sealed': typeof TaskProgressSealedPayloadSchema;
2894
+ readonly 'task.artifact_sealed': typeof TaskArtifactSealedPayloadSchema;
2895
+ readonly 'task.await_approval_sealed': typeof TaskAwaitApprovalSealedPayloadSchema;
2896
+ readonly 'e2ee.key_package.available': typeof E2eeKeyPackageAvailablePayloadSchema;
3462
2897
  };
3463
2898
  export type MessageType = keyof typeof MESSAGE_PAYLOAD_SCHEMAS;
3464
2899
  export declare const MESSAGE_TYPES: MessageType[];
@@ -3467,7 +2902,7 @@ export declare const MESSAGE_TYPES: MessageType[];
3467
2902
  * (`envelope.ts`) to decide which branches require envelope `seq` (M1
3468
2903
  * redelivery cursor).
3469
2904
  */
3470
- export declare const SERVER_TO_DAEMON_TYPES: readonly ["conn.ack", "task.offer", "task.offer_with_toolsets", "task.offer_for_agent", "task.offer_for_agent_with_egress", "task.offer_for_agent_with_egress_fresh", "task.offer_prepared", "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"];
2905
+ export declare const SERVER_TO_DAEMON_TYPES: readonly ["conn.ack", "task.offer", "task.offer_with_toolsets", "task.offer_for_agent", "task.offer_for_agent_with_egress", "task.offer_for_agent_with_egress_fresh", "task.offer_prepared", "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", "task.offer_sealed", "task.offer_with_toolsets_sealed", "task.offer_for_agent_sealed", "task.offer_for_agent_with_egress_sealed", "task.offer_for_agent_with_egress_fresh_sealed", "task.steer_sealed", "e2ee.key_package.available"];
3471
2906
  /**
3472
2907
  * Message types the daemon sends to the server — the flip side of
3473
2908
  * {@link SERVER_TO_DAEMON_TYPES}. `conn.hello` is deliberately excluded: it's
@@ -3480,5 +2915,5 @@ export declare const SERVER_TO_DAEMON_TYPES: readonly ["conn.ack", "task.offer",
3480
2915
  * or anything unrecognized — is rejected before it's dispatched to any
3481
2916
  * handler or counted `accepted` on the `/byok/messages` wire.
3482
2917
  */
3483
- 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"];
2918
+ 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", "task.complete_sealed", "task.fail_sealed", "task.decline_sealed", "task.cancelled_sealed", "task.progress_sealed", "task.artifact_sealed", "task.await_approval_sealed"];
3484
2919
  export {};