@byok-sdk/protocol 0.27.0-rc.2 → 0.28.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/agent-egress.d.ts +1 -0
- package/dist/bot-turn-outcome.d.ts +252 -0
- package/dist/codec.d.ts +4 -0
- package/dist/constants.js +2 -1
- package/dist/constants.js.map +1 -1
- package/dist/envelope.d.ts +21 -0
- package/dist/http-api.d.ts +21 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.js +303 -10
- package/dist/index.js.map +1 -1
- package/dist/messages.d.ts +33 -1
- package/dist/result-schema.d.ts +7 -0
- package/dist/version.d.ts +1 -1
- package/dist/wire-additions.d.ts +3 -3
- package/package.json +2 -1
package/dist/messages.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export declare const RuntimeCapabilitiesSchema: z.ZodObject<{
|
|
|
28
28
|
resume: z.ZodOptional<z.ZodBoolean>;
|
|
29
29
|
approvalInteractive: z.ZodOptional<z.ZodBoolean>;
|
|
30
30
|
mcpToolsets: z.ZodOptional<z.ZodBoolean>;
|
|
31
|
+
messageDraft: z.ZodOptional<z.ZodBoolean>;
|
|
31
32
|
}, z.core.$strip>;
|
|
32
33
|
export type RuntimeCapabilities = z.infer<typeof RuntimeCapabilitiesSchema>;
|
|
33
34
|
/**
|
|
@@ -48,6 +49,7 @@ export declare const RuntimeInfoSchema: z.ZodObject<{
|
|
|
48
49
|
resume: z.ZodOptional<z.ZodBoolean>;
|
|
49
50
|
approvalInteractive: z.ZodOptional<z.ZodBoolean>;
|
|
50
51
|
mcpToolsets: z.ZodOptional<z.ZodBoolean>;
|
|
52
|
+
messageDraft: z.ZodOptional<z.ZodBoolean>;
|
|
51
53
|
}, z.core.$strip>>;
|
|
52
54
|
}, z.core.$strip>;
|
|
53
55
|
export type RuntimeInfo = z.infer<typeof RuntimeInfoSchema>;
|
|
@@ -62,6 +64,7 @@ export declare const HarnessInfoSchema: z.ZodObject<{
|
|
|
62
64
|
resume: z.ZodOptional<z.ZodBoolean>;
|
|
63
65
|
approvalInteractive: z.ZodOptional<z.ZodBoolean>;
|
|
64
66
|
mcpToolsets: z.ZodOptional<z.ZodBoolean>;
|
|
67
|
+
messageDraft: z.ZodOptional<z.ZodBoolean>;
|
|
65
68
|
}, z.core.$strip>;
|
|
66
69
|
}, z.core.$strip>;
|
|
67
70
|
export type HarnessInfo = z.infer<typeof HarnessInfoSchema>;
|
|
@@ -73,6 +76,7 @@ export declare const HarnessInventorySchema: z.ZodArray<z.ZodObject<{
|
|
|
73
76
|
resume: z.ZodOptional<z.ZodBoolean>;
|
|
74
77
|
approvalInteractive: z.ZodOptional<z.ZodBoolean>;
|
|
75
78
|
mcpToolsets: z.ZodOptional<z.ZodBoolean>;
|
|
79
|
+
messageDraft: z.ZodOptional<z.ZodBoolean>;
|
|
76
80
|
}, z.core.$strip>;
|
|
77
81
|
}, z.core.$strip>>;
|
|
78
82
|
/** Maximum logical toolsets one daemon may advertise as locally configured. */
|
|
@@ -127,6 +131,7 @@ export declare const ConnHelloPayloadSchema: z.ZodObject<{
|
|
|
127
131
|
resume: z.ZodOptional<z.ZodBoolean>;
|
|
128
132
|
approvalInteractive: z.ZodOptional<z.ZodBoolean>;
|
|
129
133
|
mcpToolsets: z.ZodOptional<z.ZodBoolean>;
|
|
134
|
+
messageDraft: z.ZodOptional<z.ZodBoolean>;
|
|
130
135
|
}, z.core.$strip>>;
|
|
131
136
|
}, z.core.$strip>>>;
|
|
132
137
|
harnesses: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -137,6 +142,7 @@ export declare const ConnHelloPayloadSchema: z.ZodObject<{
|
|
|
137
142
|
resume: z.ZodOptional<z.ZodBoolean>;
|
|
138
143
|
approvalInteractive: z.ZodOptional<z.ZodBoolean>;
|
|
139
144
|
mcpToolsets: z.ZodOptional<z.ZodBoolean>;
|
|
145
|
+
messageDraft: z.ZodOptional<z.ZodBoolean>;
|
|
140
146
|
}, z.core.$strip>;
|
|
141
147
|
}, z.core.$strip>>>;
|
|
142
148
|
configuredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -735,6 +741,18 @@ export declare const AgentEgressAckPayloadSchema: z.ZodObject<{
|
|
|
735
741
|
}, z.core.$strict>;
|
|
736
742
|
export type AgentEgressAckPayload = z.infer<typeof AgentEgressAckPayloadSchema>;
|
|
737
743
|
/** Daemon -> server: one Agent-authored message, independent from task activity. */
|
|
744
|
+
/** Display-only text. Offsets count UTF-8 bytes within one revision. */
|
|
745
|
+
export declare const AgentMessageDraftPayloadSchema: z.ZodObject<{
|
|
746
|
+
agentRef: z.ZodObject<{
|
|
747
|
+
agentId: z.ZodString;
|
|
748
|
+
profileRevision: z.ZodString;
|
|
749
|
+
}, z.core.$strict>;
|
|
750
|
+
revision: z.ZodNumber;
|
|
751
|
+
offset: z.ZodNumber;
|
|
752
|
+
text: z.ZodString;
|
|
753
|
+
overflow: z.ZodOptional<z.ZodLiteral<true>>;
|
|
754
|
+
}, z.core.$strict>;
|
|
755
|
+
export type AgentMessageDraftPayload = z.infer<typeof AgentMessageDraftPayloadSchema>;
|
|
738
756
|
export declare const AgentMessagePublishPayloadSchema: z.ZodObject<{
|
|
739
757
|
agentRef: z.ZodObject<{
|
|
740
758
|
agentId: z.ZodString;
|
|
@@ -1208,6 +1226,7 @@ export declare const TaskClaimPayloadSchema: z.ZodObject<{
|
|
|
1208
1226
|
resume: z.ZodOptional<z.ZodBoolean>;
|
|
1209
1227
|
approvalInteractive: z.ZodOptional<z.ZodBoolean>;
|
|
1210
1228
|
mcpToolsets: z.ZodOptional<z.ZodBoolean>;
|
|
1229
|
+
messageDraft: z.ZodOptional<z.ZodBoolean>;
|
|
1211
1230
|
}, z.core.$strip>>;
|
|
1212
1231
|
}, z.core.$strip>;
|
|
1213
1232
|
export type TaskClaimPayload = z.infer<typeof TaskClaimPayloadSchema>;
|
|
@@ -2716,6 +2735,7 @@ export declare const MESSAGE_PAYLOAD_SCHEMAS: {
|
|
|
2716
2735
|
resume: z.ZodOptional<z.ZodBoolean>;
|
|
2717
2736
|
approvalInteractive: z.ZodOptional<z.ZodBoolean>;
|
|
2718
2737
|
mcpToolsets: z.ZodOptional<z.ZodBoolean>;
|
|
2738
|
+
messageDraft: z.ZodOptional<z.ZodBoolean>;
|
|
2719
2739
|
}, z.core.$strip>>;
|
|
2720
2740
|
}, z.core.$strip>>>;
|
|
2721
2741
|
harnesses: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -2726,6 +2746,7 @@ export declare const MESSAGE_PAYLOAD_SCHEMAS: {
|
|
|
2726
2746
|
resume: z.ZodOptional<z.ZodBoolean>;
|
|
2727
2747
|
approvalInteractive: z.ZodOptional<z.ZodBoolean>;
|
|
2728
2748
|
mcpToolsets: z.ZodOptional<z.ZodBoolean>;
|
|
2749
|
+
messageDraft: z.ZodOptional<z.ZodBoolean>;
|
|
2729
2750
|
}, z.core.$strip>;
|
|
2730
2751
|
}, z.core.$strip>>>;
|
|
2731
2752
|
configuredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -2760,6 +2781,16 @@ export declare const MESSAGE_PAYLOAD_SCHEMAS: {
|
|
|
2760
2781
|
cursor: z.ZodNumber;
|
|
2761
2782
|
receiptId: z.ZodUUID;
|
|
2762
2783
|
}, z.core.$strict>;
|
|
2784
|
+
readonly 'agent.message.draft': z.ZodObject<{
|
|
2785
|
+
agentRef: z.ZodObject<{
|
|
2786
|
+
agentId: z.ZodString;
|
|
2787
|
+
profileRevision: z.ZodString;
|
|
2788
|
+
}, z.core.$strict>;
|
|
2789
|
+
revision: z.ZodNumber;
|
|
2790
|
+
offset: z.ZodNumber;
|
|
2791
|
+
text: z.ZodString;
|
|
2792
|
+
overflow: z.ZodOptional<z.ZodLiteral<true>>;
|
|
2793
|
+
}, z.core.$strict>;
|
|
2763
2794
|
readonly 'agent.message.publish': z.ZodObject<{
|
|
2764
2795
|
agentRef: z.ZodObject<{
|
|
2765
2796
|
agentId: z.ZodString;
|
|
@@ -3104,6 +3135,7 @@ export declare const MESSAGE_PAYLOAD_SCHEMAS: {
|
|
|
3104
3135
|
resume: z.ZodOptional<z.ZodBoolean>;
|
|
3105
3136
|
approvalInteractive: z.ZodOptional<z.ZodBoolean>;
|
|
3106
3137
|
mcpToolsets: z.ZodOptional<z.ZodBoolean>;
|
|
3138
|
+
messageDraft: z.ZodOptional<z.ZodBoolean>;
|
|
3107
3139
|
}, z.core.$strip>>;
|
|
3108
3140
|
}, z.core.$strip>;
|
|
3109
3141
|
readonly 'task.started': z.ZodObject<{}, z.core.$strip>;
|
|
@@ -3382,5 +3414,5 @@ export declare const SERVER_TO_DAEMON_TYPES: readonly ["conn.ack", "task.offer",
|
|
|
3382
3414
|
* or anything unrecognized — is rejected before it's dispatched to any
|
|
3383
3415
|
* handler or counted `accepted` on the `/byok/messages` wire.
|
|
3384
3416
|
*/
|
|
3385
|
-
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.publish", "agent.content.receipt"];
|
|
3417
|
+
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"];
|
|
3386
3418
|
export {};
|
package/dist/result-schema.d.ts
CHANGED
|
@@ -92,4 +92,11 @@ export declare function checkResultSchema(schema: unknown): ResultSchemaCheck;
|
|
|
92
92
|
* a sender stages and puts on the wire.
|
|
93
93
|
*/
|
|
94
94
|
export declare function validateResultOutcome(schema: unknown, outcome: unknown): ResultOutcomeCheck;
|
|
95
|
+
/**
|
|
96
|
+
* Conservative canonical UTF-8 bound, or null for an invalid or unbounded schema.
|
|
97
|
+
* Strings cost at most 6 bytes per code point. Number costs 25; integer costs
|
|
98
|
+
* 24, tightened only when both ends have magnitude below 1e21. A bound need
|
|
99
|
+
* not be attainable when constraints intersect or oneOf branches overlap.
|
|
100
|
+
*/
|
|
101
|
+
export declare function resultOutcomeMaxBytes(schema: ResultSchema): number | null;
|
|
95
102
|
export {};
|
package/dist/version.d.ts
CHANGED
|
@@ -100,5 +100,5 @@ export declare const AGENT_HOME_READERS_CAPABILITY: 'agent-home-readers';
|
|
|
100
100
|
* cannot accidentally execute the instruction without the required tools.
|
|
101
101
|
*/
|
|
102
102
|
export declare const CUSTOM_HARNESS_CAPABILITY: 'custom-harness';
|
|
103
|
-
export declare const CAPABILITY_FLAGS: readonly ['steer', 'blob-upload', 'interactive-approval', 'approval_resolved', 'approval-targeting', 'dispatch-selection', "provider-profile-binding", 'toolset-selection', 'agent-home-contract', "agent-home-readers", "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", "agent-input-preparation-v9", "terminal-projection-selection", "host-mcp-task-context", "custom-harness", "mailbox-read-ahead", "provider-provisioning.v1", "agent-memory-intent.v1"];
|
|
103
|
+
export declare const CAPABILITY_FLAGS: readonly ['steer', 'blob-upload', 'interactive-approval', 'approval_resolved', 'approval-targeting', 'dispatch-selection', "provider-profile-binding", 'toolset-selection', 'agent-home-contract', "agent-home-readers", "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", "agent-input-preparation-v9", "terminal-projection-selection", "host-mcp-task-context", "custom-harness", "mailbox-read-ahead", "provider-provisioning.v1", "agent-memory-intent.v1", 'agent-message-draft'];
|
|
104
104
|
export type CapabilityFlag = (typeof CAPABILITY_FLAGS)[number];
|
package/dist/wire-additions.d.ts
CHANGED
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
* configured for them (Agent home, egress, input preparation, provisioning,
|
|
21
21
|
* memory intents and so on): they gate on the receiver's configuration. The
|
|
22
22
|
* server-advertised `approval_resolved` gate is kept as the daemon's sending
|
|
23
|
-
* condition for `task.approval_resolved`.
|
|
24
|
-
*
|
|
25
|
-
* (`src/__tests__/compat.test.ts`).
|
|
23
|
+
* condition for `task.approval_resolved`. The first stable v3 decoder is
|
|
24
|
+
* 0.27.0. Cross-release checks use its actual registry tarball
|
|
25
|
+
* (`src/__tests__/published-compat.test.ts`).
|
|
26
26
|
*
|
|
27
27
|
* Senders derive their admission flags from {@link requiredReceiverCapabilities}
|
|
28
28
|
* and nowhere else, so a gate cannot exist in one place and be missing in
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byok-sdk/protocol",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"description": "BYOK SDK wire protocol: envelope schema, message types, and codec helpers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"zod": "^4.4.3"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
+
"byok-protocol-floor": "https://registry.npmjs.org/@byok-sdk/protocol/-/protocol-0.27.0.tgz",
|
|
55
56
|
"byok-protocol-previous": "https://registry.npmjs.org/@byok-sdk/protocol/-/protocol-0.26.1.tgz"
|
|
56
57
|
}
|
|
57
58
|
}
|