@byok-sdk/protocol 0.14.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/envelope.d.ts +24 -0
- package/dist/http-api.d.ts +49 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +31 -4
- package/dist/index.js.map +1 -1
- package/dist/messages.d.ts +79 -0
- package/dist/version.d.ts +5 -1
- package/package.json +1 -1
package/dist/messages.d.ts
CHANGED
|
@@ -62,6 +62,32 @@ export declare const RuntimeInfoSchema: z.ZodObject<{
|
|
|
62
62
|
}, z.core.$strip>>;
|
|
63
63
|
}, z.core.$strip>;
|
|
64
64
|
export type RuntimeInfo = z.infer<typeof RuntimeInfoSchema>;
|
|
65
|
+
/** Custom identities are disjoint from the frozen built-in runtime enum. */
|
|
66
|
+
export declare const HarnessIdSchema: z.ZodString;
|
|
67
|
+
export type HarnessId = z.infer<typeof HarnessIdSchema>;
|
|
68
|
+
export declare const HarnessInfoSchema: z.ZodObject<{
|
|
69
|
+
id: z.ZodString;
|
|
70
|
+
version: z.ZodOptional<z.ZodString>;
|
|
71
|
+
capabilities: z.ZodObject<{
|
|
72
|
+
steer: z.ZodOptional<z.ZodBoolean>;
|
|
73
|
+
resume: z.ZodOptional<z.ZodBoolean>;
|
|
74
|
+
approvalInteractive: z.ZodOptional<z.ZodBoolean>;
|
|
75
|
+
mcpToolsets: z.ZodOptional<z.ZodBoolean>;
|
|
76
|
+
permissionModes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
77
|
+
}, z.core.$strip>;
|
|
78
|
+
}, z.core.$strip>;
|
|
79
|
+
export type HarnessInfo = z.infer<typeof HarnessInfoSchema>;
|
|
80
|
+
export declare const HarnessInventorySchema: z.ZodArray<z.ZodObject<{
|
|
81
|
+
id: z.ZodString;
|
|
82
|
+
version: z.ZodOptional<z.ZodString>;
|
|
83
|
+
capabilities: z.ZodObject<{
|
|
84
|
+
steer: z.ZodOptional<z.ZodBoolean>;
|
|
85
|
+
resume: z.ZodOptional<z.ZodBoolean>;
|
|
86
|
+
approvalInteractive: z.ZodOptional<z.ZodBoolean>;
|
|
87
|
+
mcpToolsets: z.ZodOptional<z.ZodBoolean>;
|
|
88
|
+
permissionModes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
89
|
+
}, z.core.$strip>;
|
|
90
|
+
}, z.core.$strip>>;
|
|
65
91
|
/** Maximum logical toolsets one daemon may advertise as locally configured. */
|
|
66
92
|
export declare const CONFIGURED_TOOLSETS_MAX_ITEMS = 64;
|
|
67
93
|
/**
|
|
@@ -117,6 +143,17 @@ export declare const ConnHelloPayloadSchema: z.ZodObject<{
|
|
|
117
143
|
permissionModes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
118
144
|
}, z.core.$strip>>;
|
|
119
145
|
}, z.core.$strip>>>;
|
|
146
|
+
harnesses: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
147
|
+
id: z.ZodString;
|
|
148
|
+
version: z.ZodOptional<z.ZodString>;
|
|
149
|
+
capabilities: z.ZodObject<{
|
|
150
|
+
steer: z.ZodOptional<z.ZodBoolean>;
|
|
151
|
+
resume: z.ZodOptional<z.ZodBoolean>;
|
|
152
|
+
approvalInteractive: z.ZodOptional<z.ZodBoolean>;
|
|
153
|
+
mcpToolsets: z.ZodOptional<z.ZodBoolean>;
|
|
154
|
+
permissionModes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
155
|
+
}, z.core.$strip>;
|
|
156
|
+
}, z.core.$strip>>>;
|
|
120
157
|
configuredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
121
158
|
cursor: z.ZodOptional<z.ZodNumber>;
|
|
122
159
|
}, z.core.$strip>;
|
|
@@ -195,6 +232,7 @@ export declare const TaskOfferPayloadSchema: z.ZodObject<{
|
|
|
195
232
|
codex: "codex";
|
|
196
233
|
pi: "pi";
|
|
197
234
|
}>>;
|
|
235
|
+
harnessId: z.ZodOptional<z.ZodString>;
|
|
198
236
|
dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
199
237
|
lane: z.ZodLiteral<"subscription">;
|
|
200
238
|
runtimeId: z.ZodEnum<{
|
|
@@ -266,6 +304,7 @@ export declare const TaskOfferWithToolsetsPayloadSchema: z.ZodObject<{
|
|
|
266
304
|
codex: "codex";
|
|
267
305
|
pi: "pi";
|
|
268
306
|
}>>;
|
|
307
|
+
harnessId: z.ZodOptional<z.ZodString>;
|
|
269
308
|
dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
270
309
|
lane: z.ZodLiteral<"subscription">;
|
|
271
310
|
runtimeId: z.ZodEnum<{
|
|
@@ -338,6 +377,7 @@ export declare const TaskOfferForAgentPayloadSchema: z.ZodObject<{
|
|
|
338
377
|
codex: "codex";
|
|
339
378
|
pi: "pi";
|
|
340
379
|
}>>;
|
|
380
|
+
harnessId: z.ZodOptional<z.ZodString>;
|
|
341
381
|
dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
342
382
|
lane: z.ZodLiteral<"subscription">;
|
|
343
383
|
runtimeId: z.ZodEnum<{
|
|
@@ -414,6 +454,7 @@ export declare const TaskOfferForAgentWithEgressPayloadSchema: z.ZodObject<{
|
|
|
414
454
|
codex: "codex";
|
|
415
455
|
pi: "pi";
|
|
416
456
|
}>>;
|
|
457
|
+
harnessId: z.ZodOptional<z.ZodString>;
|
|
417
458
|
dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
418
459
|
lane: z.ZodLiteral<"subscription">;
|
|
419
460
|
runtimeId: z.ZodEnum<{
|
|
@@ -531,6 +572,7 @@ export declare const TaskOfferForAgentWithEgressFreshPayloadSchema: z.ZodObject<
|
|
|
531
572
|
codex: "codex";
|
|
532
573
|
pi: "pi";
|
|
533
574
|
}>>;
|
|
575
|
+
harnessId: z.ZodOptional<z.ZodString>;
|
|
534
576
|
dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
535
577
|
lane: z.ZodLiteral<"subscription">;
|
|
536
578
|
runtimeId: z.ZodEnum<{
|
|
@@ -948,6 +990,7 @@ export declare const TaskClaimPayloadSchema: z.ZodObject<{
|
|
|
948
990
|
codex: "codex";
|
|
949
991
|
pi: "pi";
|
|
950
992
|
}>>;
|
|
993
|
+
harnessId: z.ZodOptional<z.ZodString>;
|
|
951
994
|
capabilities: z.ZodOptional<z.ZodObject<{
|
|
952
995
|
steer: z.ZodOptional<z.ZodBoolean>;
|
|
953
996
|
resume: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1258,6 +1301,7 @@ export type TerminalInferenceUsage = z.infer<typeof TerminalInferenceUsageSchema
|
|
|
1258
1301
|
* see `packages/client`'s `task-runner.ts`.
|
|
1259
1302
|
*/
|
|
1260
1303
|
export declare const TaskCompletePayloadSchema: z.ZodObject<{
|
|
1304
|
+
harnessId: z.ZodOptional<z.ZodString>;
|
|
1261
1305
|
summary: z.ZodString;
|
|
1262
1306
|
sessionRef: z.ZodString;
|
|
1263
1307
|
artifactRefs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -1290,6 +1334,11 @@ export declare const TaskCompletePayloadSchema: z.ZodObject<{
|
|
|
1290
1334
|
export type TaskCompletePayload = z.infer<typeof TaskCompletePayloadSchema>;
|
|
1291
1335
|
/** daemon -> server: task failed. */
|
|
1292
1336
|
export declare const TaskFailPayloadSchema: z.ZodObject<{
|
|
1337
|
+
recovery: z.ZodOptional<z.ZodObject<{
|
|
1338
|
+
kind: z.ZodLiteral<"daemon_interrupted">;
|
|
1339
|
+
offerId: z.ZodUUID;
|
|
1340
|
+
}, z.core.$strict>>;
|
|
1341
|
+
harnessId: z.ZodOptional<z.ZodString>;
|
|
1293
1342
|
reason: z.ZodString;
|
|
1294
1343
|
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
1295
1344
|
usage: z.ZodOptional<z.ZodObject<{
|
|
@@ -1332,6 +1381,7 @@ export type TaskFailPayload = z.infer<typeof TaskFailPayloadSchema>;
|
|
|
1332
1381
|
* trigger that moves `Claimed`/`Running`/`AwaitApproval -> Cancelled`.
|
|
1333
1382
|
*/
|
|
1334
1383
|
export declare const TaskCancelledPayloadSchema: z.ZodObject<{
|
|
1384
|
+
harnessId: z.ZodOptional<z.ZodString>;
|
|
1335
1385
|
reason: z.ZodOptional<z.ZodString>;
|
|
1336
1386
|
usage: z.ZodOptional<z.ZodObject<{
|
|
1337
1387
|
runtime: z.ZodEnum<{
|
|
@@ -1430,6 +1480,7 @@ declare const TASK_OFFER_PAYLOAD_SCHEMAS: {
|
|
|
1430
1480
|
codex: "codex";
|
|
1431
1481
|
pi: "pi";
|
|
1432
1482
|
}>>;
|
|
1483
|
+
harnessId: z.ZodOptional<z.ZodString>;
|
|
1433
1484
|
dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1434
1485
|
lane: z.ZodLiteral<"subscription">;
|
|
1435
1486
|
runtimeId: z.ZodEnum<{
|
|
@@ -1490,6 +1541,7 @@ declare const TASK_OFFER_PAYLOAD_SCHEMAS: {
|
|
|
1490
1541
|
codex: "codex";
|
|
1491
1542
|
pi: "pi";
|
|
1492
1543
|
}>>;
|
|
1544
|
+
harnessId: z.ZodOptional<z.ZodString>;
|
|
1493
1545
|
dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1494
1546
|
lane: z.ZodLiteral<"subscription">;
|
|
1495
1547
|
runtimeId: z.ZodEnum<{
|
|
@@ -1556,6 +1608,7 @@ declare const TASK_OFFER_PAYLOAD_SCHEMAS: {
|
|
|
1556
1608
|
codex: "codex";
|
|
1557
1609
|
pi: "pi";
|
|
1558
1610
|
}>>;
|
|
1611
|
+
harnessId: z.ZodOptional<z.ZodString>;
|
|
1559
1612
|
dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1560
1613
|
lane: z.ZodLiteral<"subscription">;
|
|
1561
1614
|
runtimeId: z.ZodEnum<{
|
|
@@ -1626,6 +1679,7 @@ declare const TASK_OFFER_PAYLOAD_SCHEMAS: {
|
|
|
1626
1679
|
codex: "codex";
|
|
1627
1680
|
pi: "pi";
|
|
1628
1681
|
}>>;
|
|
1682
|
+
harnessId: z.ZodOptional<z.ZodString>;
|
|
1629
1683
|
dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1630
1684
|
lane: z.ZodLiteral<"subscription">;
|
|
1631
1685
|
runtimeId: z.ZodEnum<{
|
|
@@ -1736,6 +1790,7 @@ declare const TASK_OFFER_PAYLOAD_SCHEMAS: {
|
|
|
1736
1790
|
codex: "codex";
|
|
1737
1791
|
pi: "pi";
|
|
1738
1792
|
}>>;
|
|
1793
|
+
harnessId: z.ZodOptional<z.ZodString>;
|
|
1739
1794
|
dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1740
1795
|
lane: z.ZodLiteral<"subscription">;
|
|
1741
1796
|
runtimeId: z.ZodEnum<{
|
|
@@ -1846,6 +1901,7 @@ export declare const MESSAGE_PAYLOAD_SCHEMAS: {
|
|
|
1846
1901
|
codex: "codex";
|
|
1847
1902
|
pi: "pi";
|
|
1848
1903
|
}>>;
|
|
1904
|
+
harnessId: z.ZodOptional<z.ZodString>;
|
|
1849
1905
|
dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1850
1906
|
lane: z.ZodLiteral<"subscription">;
|
|
1851
1907
|
runtimeId: z.ZodEnum<{
|
|
@@ -1906,6 +1962,7 @@ export declare const MESSAGE_PAYLOAD_SCHEMAS: {
|
|
|
1906
1962
|
codex: "codex";
|
|
1907
1963
|
pi: "pi";
|
|
1908
1964
|
}>>;
|
|
1965
|
+
harnessId: z.ZodOptional<z.ZodString>;
|
|
1909
1966
|
dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1910
1967
|
lane: z.ZodLiteral<"subscription">;
|
|
1911
1968
|
runtimeId: z.ZodEnum<{
|
|
@@ -1972,6 +2029,7 @@ export declare const MESSAGE_PAYLOAD_SCHEMAS: {
|
|
|
1972
2029
|
codex: "codex";
|
|
1973
2030
|
pi: "pi";
|
|
1974
2031
|
}>>;
|
|
2032
|
+
harnessId: z.ZodOptional<z.ZodString>;
|
|
1975
2033
|
dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1976
2034
|
lane: z.ZodLiteral<"subscription">;
|
|
1977
2035
|
runtimeId: z.ZodEnum<{
|
|
@@ -2042,6 +2100,7 @@ export declare const MESSAGE_PAYLOAD_SCHEMAS: {
|
|
|
2042
2100
|
codex: "codex";
|
|
2043
2101
|
pi: "pi";
|
|
2044
2102
|
}>>;
|
|
2103
|
+
harnessId: z.ZodOptional<z.ZodString>;
|
|
2045
2104
|
dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2046
2105
|
lane: z.ZodLiteral<"subscription">;
|
|
2047
2106
|
runtimeId: z.ZodEnum<{
|
|
@@ -2152,6 +2211,7 @@ export declare const MESSAGE_PAYLOAD_SCHEMAS: {
|
|
|
2152
2211
|
codex: "codex";
|
|
2153
2212
|
pi: "pi";
|
|
2154
2213
|
}>>;
|
|
2214
|
+
harnessId: z.ZodOptional<z.ZodString>;
|
|
2155
2215
|
dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2156
2216
|
lane: z.ZodLiteral<"subscription">;
|
|
2157
2217
|
runtimeId: z.ZodEnum<{
|
|
@@ -2251,6 +2311,17 @@ export declare const MESSAGE_PAYLOAD_SCHEMAS: {
|
|
|
2251
2311
|
permissionModes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2252
2312
|
}, z.core.$strip>>;
|
|
2253
2313
|
}, z.core.$strip>>>;
|
|
2314
|
+
harnesses: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2315
|
+
id: z.ZodString;
|
|
2316
|
+
version: z.ZodOptional<z.ZodString>;
|
|
2317
|
+
capabilities: z.ZodObject<{
|
|
2318
|
+
steer: z.ZodOptional<z.ZodBoolean>;
|
|
2319
|
+
resume: z.ZodOptional<z.ZodBoolean>;
|
|
2320
|
+
approvalInteractive: z.ZodOptional<z.ZodBoolean>;
|
|
2321
|
+
mcpToolsets: z.ZodOptional<z.ZodBoolean>;
|
|
2322
|
+
permissionModes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2323
|
+
}, z.core.$strip>;
|
|
2324
|
+
}, z.core.$strip>>>;
|
|
2254
2325
|
configuredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2255
2326
|
cursor: z.ZodOptional<z.ZodNumber>;
|
|
2256
2327
|
}, z.core.$strip>;
|
|
@@ -2494,6 +2565,7 @@ export declare const MESSAGE_PAYLOAD_SCHEMAS: {
|
|
|
2494
2565
|
codex: "codex";
|
|
2495
2566
|
pi: "pi";
|
|
2496
2567
|
}>>;
|
|
2568
|
+
harnessId: z.ZodOptional<z.ZodString>;
|
|
2497
2569
|
capabilities: z.ZodOptional<z.ZodObject<{
|
|
2498
2570
|
steer: z.ZodOptional<z.ZodBoolean>;
|
|
2499
2571
|
resume: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -2601,6 +2673,7 @@ export declare const MESSAGE_PAYLOAD_SCHEMAS: {
|
|
|
2601
2673
|
approvalId: z.ZodOptional<z.ZodString>;
|
|
2602
2674
|
}, z.core.$strip>;
|
|
2603
2675
|
readonly 'task.complete': z.ZodObject<{
|
|
2676
|
+
harnessId: z.ZodOptional<z.ZodString>;
|
|
2604
2677
|
summary: z.ZodString;
|
|
2605
2678
|
sessionRef: z.ZodString;
|
|
2606
2679
|
artifactRefs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -2631,6 +2704,11 @@ export declare const MESSAGE_PAYLOAD_SCHEMAS: {
|
|
|
2631
2704
|
}, z.core.$strict>>;
|
|
2632
2705
|
}, z.core.$strip>;
|
|
2633
2706
|
readonly 'task.fail': z.ZodObject<{
|
|
2707
|
+
recovery: z.ZodOptional<z.ZodObject<{
|
|
2708
|
+
kind: z.ZodLiteral<"daemon_interrupted">;
|
|
2709
|
+
offerId: z.ZodUUID;
|
|
2710
|
+
}, z.core.$strict>>;
|
|
2711
|
+
harnessId: z.ZodOptional<z.ZodString>;
|
|
2634
2712
|
reason: z.ZodString;
|
|
2635
2713
|
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
2636
2714
|
usage: z.ZodOptional<z.ZodObject<{
|
|
@@ -2653,6 +2731,7 @@ export declare const MESSAGE_PAYLOAD_SCHEMAS: {
|
|
|
2653
2731
|
}, z.core.$strict>>;
|
|
2654
2732
|
}, z.core.$strip>;
|
|
2655
2733
|
readonly 'task.cancelled': z.ZodObject<{
|
|
2734
|
+
harnessId: z.ZodOptional<z.ZodString>;
|
|
2656
2735
|
reason: z.ZodOptional<z.ZodString>;
|
|
2657
2736
|
usage: z.ZodOptional<z.ZodObject<{
|
|
2658
2737
|
runtime: z.ZodEnum<{
|
package/dist/version.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/** Bounded volatile navigation; only cursor is a durable acknowledgement. */
|
|
2
|
+
export declare const MAILBOX_READ_AHEAD_MAX_SEQS = 4096;
|
|
3
|
+
export declare const MAILBOX_READ_AHEAD_CAPABILITY = "mailbox-read-ahead";
|
|
1
4
|
/**
|
|
2
5
|
* Wire protocol version. Bump on breaking (non-additive) changes to the envelope
|
|
3
6
|
* or message shapes. Additive changes (new optional fields, new message types)
|
|
@@ -103,5 +106,6 @@ export declare const STRICT_AGENT_ONLY_CAPABILITY: 'strict-agent-only';
|
|
|
103
106
|
* boundary for long-poll: an older daemon skips it as unknown and therefore
|
|
104
107
|
* cannot accidentally execute the instruction without the required tools.
|
|
105
108
|
*/
|
|
106
|
-
export declare const
|
|
109
|
+
export declare const CUSTOM_HARNESS_CAPABILITY: 'custom-harness';
|
|
110
|
+
export declare const CAPABILITY_FLAGS: readonly ['steer', 'blob-upload', 'interactive-approval', 'approval_resolved', 'approval-targeting', 'result-document', 'dispatch-selection', "provider-profile-binding", 'toolset-selection', 'agent-home-contract', "strict-agent-only", "agent-egress-policy", "agent-egress-reliable-ack", "agent-message-egress", "agent-egress-fresh-session", "agent-content-workspace-read", "agent-content-transcript-read", "agent-content-artifact-read", "agent-home-projection", "terminal-projection-selection", "custom-harness", "mailbox-read-ahead"];
|
|
107
111
|
export type CapabilityFlag = (typeof CAPABILITY_FLAGS)[number];
|