@byok-sdk/protocol 0.24.0 → 0.25.0-rc.1
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 +13 -16
- package/dist/agent-event.d.ts +1 -1
- package/dist/envelope.d.ts +6 -99
- package/dist/http-api.d.ts +14 -218
- package/dist/index.d.ts +2 -4
- package/dist/index.js +12 -62
- package/dist/index.js.map +1 -1
- package/dist/input-preparation.d.ts +15 -64
- package/dist/messages.d.ts +20 -313
- package/dist/version.d.ts +20 -11
- package/package.json +1 -1
- package/dist/permission.d.ts +0 -39
|
@@ -23,7 +23,7 @@ import { z } from 'zod';
|
|
|
23
23
|
* 3. Every shape here is `.strict()`. This is control data: an unrecognized
|
|
24
24
|
* field must be REJECTED, not silently stripped, per docs/protocol.md's
|
|
25
25
|
* freeze-rule asymmetry. Adding a field post-freeze is therefore a
|
|
26
|
-
* breaking change
|
|
26
|
+
* breaking change.
|
|
27
27
|
*/
|
|
28
28
|
/**
|
|
29
29
|
* The ONE version of the input-preparation contract, shared by this relay wire
|
|
@@ -36,7 +36,7 @@ import { z } from 'zod';
|
|
|
36
36
|
* below. See `INPUT_PREPARATION_VERSION` in the client for what each version
|
|
37
37
|
* changed.
|
|
38
38
|
*/
|
|
39
|
-
export declare const INPUT_PREPARATION_WIRE_VERSION:
|
|
39
|
+
export declare const INPUT_PREPARATION_WIRE_VERSION: 9;
|
|
40
40
|
/**
|
|
41
41
|
* Capability required before a task-free remote input preparation — or a
|
|
42
42
|
* prepared Execution — is admitted: `agent-input-preparation-v<N>`, where
|
|
@@ -59,7 +59,7 @@ export declare const INPUT_PREPARATION_WIRE_VERSION: 8;
|
|
|
59
59
|
* devices as a pair is the operator precondition for the cut (`docs/spec.md`,
|
|
60
60
|
* bounded admission); nothing here parses an older receipt.
|
|
61
61
|
*/
|
|
62
|
-
export declare const AGENT_INPUT_PREPARATION_CAPABILITY: "agent-input-preparation-
|
|
62
|
+
export declare const AGENT_INPUT_PREPARATION_CAPABILITY: "agent-input-preparation-v9";
|
|
63
63
|
/** The preparation surface uses the package-wide lowercase `sha256:<hex>` transport form. */
|
|
64
64
|
export declare const InputPreparationContentHashSchema: z.ZodString;
|
|
65
65
|
/**
|
|
@@ -78,26 +78,6 @@ export declare const InputPreparationPolicyRevisionSchema: z.ZodString;
|
|
|
78
78
|
* anything is compiled.
|
|
79
79
|
*/
|
|
80
80
|
export declare const InputPreparationProfileIdSchema: z.ZodString;
|
|
81
|
-
/**
|
|
82
|
-
* The permission mode a preparation is compiled FOR.
|
|
83
|
-
*
|
|
84
|
-
* It is the same closed set every task policy uses (`permission.ts`'s
|
|
85
|
-
* `PERMISSION_MODES`), spelled here as its own schema because a preparation
|
|
86
|
-
* carries a mode without carrying a policy: there is no task, no grant and no
|
|
87
|
-
* approval seam on this wire. The mode selects which tools the device's own
|
|
88
|
-
* observation projects into the counted manifest, and nothing else.
|
|
89
|
-
*
|
|
90
|
-
* Declared by the requester rather than inferred by the device: a device that
|
|
91
|
-
* guessed would be counting a manifest the requester never asked for, and a
|
|
92
|
-
* device that defaulted would silently count the widest one.
|
|
93
|
-
*/
|
|
94
|
-
export declare const InputPreparationPermissionModeSchema: z.ZodEnum<{
|
|
95
|
-
auto: "auto";
|
|
96
|
-
confirm: "confirm";
|
|
97
|
-
plan: "plan";
|
|
98
|
-
readonly: "readonly";
|
|
99
|
-
}>;
|
|
100
|
-
export type InputPreparationPermissionMode = z.infer<typeof InputPreparationPermissionModeSchema>;
|
|
101
81
|
/** Explicit prepared SDK memory selection; never defaulted. */
|
|
102
82
|
export declare const PreparedAgentMemoryModeSchema: z.ZodEnum<{
|
|
103
83
|
none: "none";
|
|
@@ -400,7 +380,7 @@ export type InputPreparationState = z.infer<typeof InputPreparationStateSchema>;
|
|
|
400
380
|
* `ready` means the preparation CAN BE CONSUMED — the artifact is intact and
|
|
401
381
|
* unexpired, the native compiler's projection is content-complete, every
|
|
402
382
|
* residual key is ruled by an applicable Host accounting policy, D is text
|
|
403
|
-
* only,
|
|
383
|
+
* only, and — only when the device has an
|
|
404
384
|
* optional counter configured — that count is provider-authoritative and
|
|
405
385
|
* covered. No count is required: the size evidence is
|
|
406
386
|
* `artifact.requestBytes`, the exact byte length of the frozen D. It is
|
|
@@ -416,7 +396,6 @@ export declare const InputPreparationReadinessReasonSchema: z.ZodEnum<{
|
|
|
416
396
|
counter_authority_not_production: "counter_authority_not_production";
|
|
417
397
|
counter_coverage_incomplete: "counter_coverage_incomplete";
|
|
418
398
|
counter_interrupted: "counter_interrupted";
|
|
419
|
-
executor_identity_unproven: "executor_identity_unproven";
|
|
420
399
|
failed: "failed";
|
|
421
400
|
not_prepared: "not_prepared";
|
|
422
401
|
projection_unknown: "projection_unknown";
|
|
@@ -529,16 +508,6 @@ export declare const InputPreparationCounterEvidenceSchema: z.ZodObject<{
|
|
|
529
508
|
calledAt: z.ZodISODateTime;
|
|
530
509
|
completedAt: z.ZodISODateTime;
|
|
531
510
|
}, z.core.$strict>;
|
|
532
|
-
/**
|
|
533
|
-
* What the device established about the implementation behind ONE
|
|
534
|
-
* model-visible tool: `attested`, or `unavailable:<reason>` naming which of
|
|
535
|
-
* the SDK's closed unavailable reasons applies.
|
|
536
|
-
*
|
|
537
|
-
* A kind, never the identity itself: an install path, a closure digest or a
|
|
538
|
-
* stat tuple is device-local filesystem detail, and a receipt discloses
|
|
539
|
-
* identity facts, not the machine's layout.
|
|
540
|
-
*/
|
|
541
|
-
export declare const InputPreparationToolImplementationKindSchema: z.ZodString;
|
|
542
511
|
/**
|
|
543
512
|
* What the native compiler proved about ONE top-level key of D that lies
|
|
544
513
|
* outside P(D).
|
|
@@ -601,19 +570,16 @@ export declare const InputPreparationProjectionSchema: z.ZodObject<{
|
|
|
601
570
|
* launch checkable rather than assumed:
|
|
602
571
|
*
|
|
603
572
|
* - `observationDigest` binds everything the device OBSERVED — the projected
|
|
604
|
-
* tools
|
|
605
|
-
*
|
|
606
|
-
* a different manifest, whatever the schemas say.
|
|
573
|
+
* tools and their executor fingerprints — so a launch whose live
|
|
574
|
+
* observation differs is a different manifest, whatever the schemas say.
|
|
607
575
|
* - `toolBindingDigest` binds only the facts that can be re-derived WITHOUT
|
|
608
|
-
* spawning a server: the
|
|
609
|
-
*
|
|
610
|
-
*
|
|
611
|
-
*
|
|
612
|
-
*
|
|
613
|
-
*
|
|
614
|
-
*
|
|
615
|
-
* `executor_identity_unproven`, so a reader does not have to take that
|
|
616
|
-
* readiness reason on trust.
|
|
576
|
+
* spawning a server: the toolset definition revisions and the configured
|
|
577
|
+
* argv. It is what a replay of an already-recorded requestId compares
|
|
578
|
+
* against, because re-probing to detect drift would be the second executor
|
|
579
|
+
* fact the idempotency key exists to prevent.
|
|
580
|
+
* - `toolNames` lists the counted model-visible tool names, sorted. A launch
|
|
581
|
+
* that registers a different set can name the tool that appeared or
|
|
582
|
+
* vanished.
|
|
617
583
|
*/
|
|
618
584
|
export declare const InputPreparationArtifactSummarySchema: z.ZodObject<{
|
|
619
585
|
requestDigest: z.ZodString;
|
|
@@ -644,7 +610,7 @@ export declare const InputPreparationArtifactSummarySchema: z.ZodObject<{
|
|
|
644
610
|
}, z.core.$strict>>;
|
|
645
611
|
observationDigest: z.ZodString;
|
|
646
612
|
toolBindingDigest: z.ZodString;
|
|
647
|
-
|
|
613
|
+
toolNames: z.ZodArray<z.ZodString>;
|
|
648
614
|
}, z.core.$strict>;
|
|
649
615
|
/** The immutable binding a receipt carries and a later consumer must re-present. */
|
|
650
616
|
export declare const InputPreparationBindingSchema: z.ZodObject<{
|
|
@@ -667,12 +633,6 @@ export declare const InputPreparationBindingSchema: z.ZodObject<{
|
|
|
667
633
|
modelId: z.ZodString;
|
|
668
634
|
}, z.core.$strict>;
|
|
669
635
|
policyRevision: z.ZodString;
|
|
670
|
-
permissionMode: z.ZodEnum<{
|
|
671
|
-
auto: "auto";
|
|
672
|
-
confirm: "confirm";
|
|
673
|
-
plan: "plan";
|
|
674
|
-
readonly: "readonly";
|
|
675
|
-
}>;
|
|
676
636
|
runtime: z.ZodObject<{
|
|
677
637
|
packageName: z.ZodString;
|
|
678
638
|
packageVersion: z.ZodString;
|
|
@@ -732,12 +692,6 @@ export declare const InputPreparationReceiptSummarySchema: z.ZodObject<{
|
|
|
732
692
|
modelId: z.ZodString;
|
|
733
693
|
}, z.core.$strict>;
|
|
734
694
|
policyRevision: z.ZodString;
|
|
735
|
-
permissionMode: z.ZodEnum<{
|
|
736
|
-
auto: "auto";
|
|
737
|
-
confirm: "confirm";
|
|
738
|
-
plan: "plan";
|
|
739
|
-
readonly: "readonly";
|
|
740
|
-
}>;
|
|
741
695
|
runtime: z.ZodObject<{
|
|
742
696
|
packageName: z.ZodString;
|
|
743
697
|
packageVersion: z.ZodString;
|
|
@@ -789,7 +743,7 @@ export declare const InputPreparationReceiptSummarySchema: z.ZodObject<{
|
|
|
789
743
|
}, z.core.$strict>>;
|
|
790
744
|
observationDigest: z.ZodString;
|
|
791
745
|
toolBindingDigest: z.ZodString;
|
|
792
|
-
|
|
746
|
+
toolNames: z.ZodArray<z.ZodString>;
|
|
793
747
|
}, z.core.$strict>>;
|
|
794
748
|
counter: z.ZodOptional<z.ZodObject<{
|
|
795
749
|
method: z.ZodString;
|
|
@@ -829,7 +783,6 @@ export declare const InputPreparationReceiptSummarySchema: z.ZodObject<{
|
|
|
829
783
|
counter_authority_not_production: "counter_authority_not_production";
|
|
830
784
|
counter_coverage_incomplete: "counter_coverage_incomplete";
|
|
831
785
|
counter_interrupted: "counter_interrupted";
|
|
832
|
-
executor_identity_unproven: "executor_identity_unproven";
|
|
833
786
|
failed: "failed";
|
|
834
787
|
not_prepared: "not_prepared";
|
|
835
788
|
projection_unknown: "projection_unknown";
|
|
@@ -893,11 +846,9 @@ export declare const InputPreparationRejectionReasonSchema: z.ZodEnum<{
|
|
|
893
846
|
durable_write_failed: "durable_write_failed";
|
|
894
847
|
input_preparation_record_log_unsupported: "input_preparation_record_log_unsupported";
|
|
895
848
|
input_preparation_unconfigured: "input_preparation_unconfigured";
|
|
896
|
-
launch_boundary_unavailable: "launch_boundary_unavailable";
|
|
897
849
|
limit_exceeded: "limit_exceeded";
|
|
898
850
|
not_found: "not_found";
|
|
899
851
|
observation_drift: "observation_drift";
|
|
900
|
-
permission_mode_denied: "permission_mode_denied";
|
|
901
852
|
policy_revision_mismatch: "policy_revision_mismatch";
|
|
902
853
|
request_conflict: "request_conflict";
|
|
903
854
|
rpc_frame_too_large: "rpc_frame_too_large";
|