@byok-sdk/protocol 0.25.0-rc.1 → 0.25.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.
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ONE version of the input-preparation contract, shared by this relay wire
|
|
3
|
+
* (the `agent.input.preparation` payload and the completion receipt summary)
|
|
4
|
+
* and by the device-local request, receipt and artifact
|
|
5
|
+
* (`@byok-sdk/client`'s `INPUT_PREPARATION_VERSION`, which is this value).
|
|
6
|
+
*
|
|
7
|
+
* The relay wire carries no version field of its own, so a version change is
|
|
8
|
+
* made visible where admission actually happens: in the capability token
|
|
9
|
+
* below. See `INPUT_PREPARATION_VERSION` in the client for what each version
|
|
10
|
+
* changed.
|
|
11
|
+
*/
|
|
12
|
+
export declare const INPUT_PREPARATION_WIRE_VERSION: 9;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/input-preparation-version.ts"],"names":[],"mappings":";AAWO,IAAM,8BAAA,GAAiC","file":"input-preparation-version.js","sourcesContent":["/**\n * The ONE version of the input-preparation contract, shared by this relay wire\n * (the `agent.input.preparation` payload and the completion receipt summary)\n * and by the device-local request, receipt and artifact\n * (`@byok-sdk/client`'s `INPUT_PREPARATION_VERSION`, which is this value).\n *\n * The relay wire carries no version field of its own, so a version change is\n * made visible where admission actually happens: in the capability token\n * below. See `INPUT_PREPARATION_VERSION` in the client for what each version\n * changed.\n */\nexport const INPUT_PREPARATION_WIRE_VERSION = 9 as const;\n"]}
|
|
@@ -1,42 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
* Remote authenticated runtime input preparation — the wire half of
|
|
4
|
-
* `docs/researches/runtime-input-preparation-contract.md` §19 (channel shape)
|
|
5
|
-
* and the C07 G4 design decision §17 B.
|
|
6
|
-
*
|
|
7
|
-
* This module owns ONLY the leaf shapes. The server -> device payload lives in
|
|
8
|
-
* `messages.ts` beside every other message payload (so the one inline byte
|
|
9
|
-
* bound `MAX_INLINE_BYTES` stays a single module-local authority), and the two
|
|
10
|
-
* authenticated HTTP bodies live in `http-api.ts`.
|
|
11
|
-
*
|
|
12
|
-
* Three structural rules this surface exists to hold:
|
|
13
|
-
*
|
|
14
|
-
* 1. The request carries NO tools, NO tool executors and NO runtime identity.
|
|
15
|
-
* Those are LOCAL observations: only the device can honestly say which MCP
|
|
16
|
-
* toolsets it has, what schemas their servers publish, and which native
|
|
17
|
-
* package closure is installed. A Host that could state them would be
|
|
18
|
-
* stating an identity it cannot verify.
|
|
19
|
-
* 2. The receipt summary discloses identities, digests, sizes, counter
|
|
20
|
-
* evidence and readiness — never D, never P(D), never the snapshot. A
|
|
21
|
-
* digest proves content identity; it is not a disclosure channel and not a
|
|
22
|
-
* bearer token (§10.3.4).
|
|
23
|
-
* 3. Every shape here is `.strict()`. This is control data: an unrecognized
|
|
24
|
-
* field must be REJECTED, not silently stripped, per docs/protocol.md's
|
|
25
|
-
* freeze-rule asymmetry. Adding a field post-freeze is therefore a
|
|
26
|
-
* breaking change.
|
|
27
|
-
*/
|
|
28
|
-
/**
|
|
29
|
-
* The ONE version of the input-preparation contract, shared by this relay wire
|
|
30
|
-
* (the `agent.input.preparation` payload and the completion receipt summary)
|
|
31
|
-
* and by the device-local request, receipt and artifact
|
|
32
|
-
* (`@byok-sdk/client`'s `INPUT_PREPARATION_VERSION`, which is this value).
|
|
33
|
-
*
|
|
34
|
-
* The relay wire carries no version field of its own, so a version change is
|
|
35
|
-
* made visible where admission actually happens: in the capability token
|
|
36
|
-
* below. See `INPUT_PREPARATION_VERSION` in the client for what each version
|
|
37
|
-
* changed.
|
|
38
|
-
*/
|
|
39
|
-
export declare const INPUT_PREPARATION_WIRE_VERSION: 9;
|
|
2
|
+
export { INPUT_PREPARATION_WIRE_VERSION } from './input-preparation-version';
|
|
40
3
|
/**
|
|
41
4
|
* Capability required before a task-free remote input preparation — or a
|
|
42
5
|
* prepared Execution — is admitted: `agent-input-preparation-v<N>`, where
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byok-sdk/protocol",
|
|
3
|
-
"version": "0.25.0
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"description": "BYOK SDK wire protocol: envelope schema, message types, and codec helpers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,7 +25,11 @@
|
|
|
25
25
|
"types": "./dist/index.d.ts",
|
|
26
26
|
"import": "./dist/index.js"
|
|
27
27
|
},
|
|
28
|
-
"./package.json": "./package.json"
|
|
28
|
+
"./package.json": "./package.json",
|
|
29
|
+
"./input-preparation-version": {
|
|
30
|
+
"types": "./dist/input-preparation-version.d.ts",
|
|
31
|
+
"import": "./dist/input-preparation-version.js"
|
|
32
|
+
}
|
|
29
33
|
},
|
|
30
34
|
"files": [
|
|
31
35
|
"dist",
|