@byok-sdk/protocol 0.23.0 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/agent-event.d.ts +12 -0
- package/dist/agent-memory-intent.d.ts +717 -0
- package/dist/codec.d.ts +4 -0
- package/dist/envelope.d.ts +21 -0
- package/dist/http-api.d.ts +42 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +213 -37
- package/dist/index.js.map +1 -1
- package/dist/messages.d.ts +38 -1
- package/dist/version.d.ts +1 -1
- package/package.json +2 -2
package/dist/messages.d.ts
CHANGED
|
@@ -1013,6 +1013,24 @@ export declare const AgentHomeProjectionPayloadSchema: z.ZodObject<{
|
|
|
1013
1013
|
projection: z.ZodType<import("./agent-home-projection").AgentHomeProjectionValue, unknown, z.core.$ZodTypeInternals<import("./agent-home-projection").AgentHomeProjectionValue, unknown>>;
|
|
1014
1014
|
}, z.core.$strict>;
|
|
1015
1015
|
export type AgentHomeProjectionPayload = z.infer<typeof AgentHomeProjectionPayloadSchema>;
|
|
1016
|
+
/**
|
|
1017
|
+
* Server -> daemon: a Host-approved Agent memory intent is waiting for this
|
|
1018
|
+
* device (capability `agent-memory-intent.v1`, see `agent-memory-intent.ts`).
|
|
1019
|
+
*
|
|
1020
|
+
* `.strict()` and exactly two fields. There is deliberately no path, operation,
|
|
1021
|
+
* revision or content: the device fetches the immutable intent from the Host
|
|
1022
|
+
* under its own device authentication, so a mailbox row or journal line never
|
|
1023
|
+
* holds memory content. `agentRef` routes the home lease and the local ledger
|
|
1024
|
+
* and must equal the fetched intent's `agentRef`.
|
|
1025
|
+
*/
|
|
1026
|
+
export declare const AgentMemoryIntentAvailablePayloadSchema: z.ZodObject<{
|
|
1027
|
+
intentId: z.ZodUUID;
|
|
1028
|
+
agentRef: z.ZodObject<{
|
|
1029
|
+
agentId: z.ZodString;
|
|
1030
|
+
profileRevision: z.ZodString;
|
|
1031
|
+
}, z.core.$strict>;
|
|
1032
|
+
}, z.core.$strict>;
|
|
1033
|
+
export type AgentMemoryIntentAvailablePayload = z.infer<typeof AgentMemoryIntentAvailablePayloadSchema>;
|
|
1016
1034
|
/**
|
|
1017
1035
|
* Server -> daemon: one task-free, exact-device remote input preparation.
|
|
1018
1036
|
*
|
|
@@ -1398,6 +1416,12 @@ export declare const TaskProgressPayloadSchema: z.ZodObject<{
|
|
|
1398
1416
|
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
1399
1417
|
reasoningTokens: z.ZodOptional<z.ZodNumber>;
|
|
1400
1418
|
totalTokens: z.ZodOptional<z.ZodNumber>;
|
|
1419
|
+
contextTokens: z.ZodOptional<z.ZodNumber>;
|
|
1420
|
+
contextWindow: z.ZodOptional<z.ZodNumber>;
|
|
1421
|
+
contextSource: z.ZodOptional<z.ZodEnum<{
|
|
1422
|
+
estimate: "estimate";
|
|
1423
|
+
provider: "provider";
|
|
1424
|
+
}>>;
|
|
1401
1425
|
}, z.core.$strip>], "type">, z.ZodObject<{
|
|
1402
1426
|
type: z.ZodString;
|
|
1403
1427
|
}, z.core.$loose>]>>;
|
|
@@ -3212,6 +3236,13 @@ export declare const MESSAGE_PAYLOAD_SCHEMAS: {
|
|
|
3212
3236
|
readonly 'provider.provisioning.available': z.ZodObject<{
|
|
3213
3237
|
requestId: z.ZodUUID;
|
|
3214
3238
|
}, z.core.$strict>;
|
|
3239
|
+
readonly 'agent.memory.intent.available': z.ZodObject<{
|
|
3240
|
+
intentId: z.ZodUUID;
|
|
3241
|
+
agentRef: z.ZodObject<{
|
|
3242
|
+
agentId: z.ZodString;
|
|
3243
|
+
profileRevision: z.ZodString;
|
|
3244
|
+
}, z.core.$strict>;
|
|
3245
|
+
}, z.core.$strict>;
|
|
3215
3246
|
readonly 'task.approve': z.ZodObject<{
|
|
3216
3247
|
approvalId: z.ZodOptional<z.ZodString>;
|
|
3217
3248
|
}, z.core.$strip>;
|
|
@@ -3324,6 +3355,12 @@ export declare const MESSAGE_PAYLOAD_SCHEMAS: {
|
|
|
3324
3355
|
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
3325
3356
|
reasoningTokens: z.ZodOptional<z.ZodNumber>;
|
|
3326
3357
|
totalTokens: z.ZodOptional<z.ZodNumber>;
|
|
3358
|
+
contextTokens: z.ZodOptional<z.ZodNumber>;
|
|
3359
|
+
contextWindow: z.ZodOptional<z.ZodNumber>;
|
|
3360
|
+
contextSource: z.ZodOptional<z.ZodEnum<{
|
|
3361
|
+
estimate: "estimate";
|
|
3362
|
+
provider: "provider";
|
|
3363
|
+
}>>;
|
|
3327
3364
|
}, z.core.$strip>], "type">, z.ZodObject<{
|
|
3328
3365
|
type: z.ZodString;
|
|
3329
3366
|
}, z.core.$loose>]>>;
|
|
@@ -3453,7 +3490,7 @@ export declare const MESSAGE_TYPES: MessageType[];
|
|
|
3453
3490
|
* (`envelope.ts`) to decide which branches require envelope `seq` (M1
|
|
3454
3491
|
* redelivery cursor).
|
|
3455
3492
|
*/
|
|
3456
|
-
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", "task.approve", "task.reject", "task.cancel", "task.steer"];
|
|
3493
|
+
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"];
|
|
3457
3494
|
/**
|
|
3458
3495
|
* Message types the daemon sends to the server — the flip side of
|
|
3459
3496
|
* {@link SERVER_TO_DAEMON_TYPES}. `conn.hello` is deliberately excluded: it's
|
package/dist/version.d.ts
CHANGED
|
@@ -107,5 +107,5 @@ export declare const STRICT_AGENT_ONLY_CAPABILITY: 'strict-agent-only';
|
|
|
107
107
|
* cannot accidentally execute the instruction without the required tools.
|
|
108
108
|
*/
|
|
109
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", "agent-input-preparation-v8", "terminal-projection-selection", "host-mcp-task-context", "custom-harness", "mailbox-read-ahead", "provider-provisioning.v1"];
|
|
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", "agent-input-preparation-v8", "terminal-projection-selection", "host-mcp-task-context", "custom-harness", "mailbox-read-ahead", "provider-provisioning.v1", "agent-memory-intent.v1"];
|
|
111
111
|
export type CapabilityFlag = (typeof CAPABILITY_FLAGS)[number];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byok-sdk/protocol",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"description": "BYOK SDK wire protocol: envelope schema, message types, and codec helpers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"homepage": "https://github.com/Ancienttwo/byok-sdk#readme",
|
|
16
16
|
"engines": {
|
|
17
|
-
"node": ">=
|
|
17
|
+
"node": ">=24.15.0"
|
|
18
18
|
},
|
|
19
19
|
"sideEffects": false,
|
|
20
20
|
"main": "./dist/index.js",
|