@byok-sdk/protocol 0.21.0 → 0.22.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.
@@ -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: 6;
39
+ export declare const INPUT_PREPARATION_WIRE_VERSION: 7;
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: 6;
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-v6";
62
+ export declare const AGENT_INPUT_PREPARATION_CAPABILITY: "agent-input-preparation-v7";
63
63
  /** The preparation surface uses the package-wide lowercase `sha256:<hex>` transport form. */
64
64
  export declare const InputPreparationContentHashSchema: z.ZodString;
65
65
  /**
@@ -296,77 +296,9 @@ export declare const InputPreparationSelectionSchema: z.ZodObject<{
296
296
  }, z.core.$strict>;
297
297
  }, z.core.$strict>;
298
298
  export type InputPreparationSelection = z.infer<typeof InputPreparationSelectionSchema>;
299
- export declare const InputPreparationContextFileSchema: z.ZodObject<{
300
- path: z.ZodString;
301
- content: z.ZodString;
302
- }, z.core.$strict>;
303
- /**
304
- * The three documentation locations the native prompt renderer names.
305
- *
306
- * The wire field names are this SDK's own and do not track upstream Pi's
307
- * (`readme`/`docs`/`examples`): the contract a Host integrates against is this
308
- * one, and renaming a frozen wire field because a runtime renamed a parameter
309
- * would be a breaking change to every Host for no gain. The device adapter maps
310
- * these onto whatever the pinned runtime calls them.
311
- */
312
- export declare const InputPreparationDocsPathsSchema: z.ZodObject<{
313
- readmePath: z.ZodString;
314
- docsPath: z.ZodString;
315
- examplesPath: z.ZodString;
316
- }, z.core.$strict>;
317
- /**
318
- * One skill the system prompt renders, stated as the closed set of fields the
319
- * renderer actually reads.
320
- *
321
- * Not a preformatted string: the native renderer owns the skill block's
322
- * markup, and a Host-rendered one would be a second renderer that could drift
323
- * from what a live session emits. Loader bookkeeping the prompt never reads
324
- * (`baseDir`, source info) is deliberately absent — the Host cannot know it and
325
- * the device must never invent it.
326
- */
327
- export declare const InputPreparationSkillSchema: z.ZodObject<{
328
- name: z.ZodString;
329
- description: z.ZodString;
330
- filePath: z.ZodString;
331
- disableModelInvocation: z.ZodBoolean;
332
- }, z.core.$strict>;
333
- export type InputPreparationSkill = z.infer<typeof InputPreparationSkillSchema>;
334
- /**
335
- * Explicit, already-authorized inputs for the native system prompt renderer.
336
- *
337
- * `toolSnippets` is PROMPT TEXT the Host authored — it is not the
338
- * model-visible tool schemas, which the device observes locally and the Host
339
- * never states (see this module's rule 1). `toolGuidelines` is the same kind of
340
- * value one level down: the guideline bullets a tool contributes, keyed by tool
341
- * name and bounded exactly like `toolSnippets` and `promptGuidelines`.
342
- *
343
- * `selectedTools` is deliberately absent for the same reason one level up: the
344
- * native contract requires that list to equal the model-visible manifest
345
- * exactly, so a Host stating it would be stating the manifest. The device
346
- * fills it from its own assembled tool surface.
347
- */
299
+ /** Complete Host-authored prompt. No Pi renderer or device-local input is consulted. */
348
300
  export declare const InputPreparationPromptSnapshotSchema: z.ZodObject<{
349
- customPrompt: z.ZodOptional<z.ZodString>;
350
- appendSystemPrompt: z.ZodOptional<z.ZodString>;
351
- cwd: z.ZodString;
352
- toolSnippets: z.ZodRecord<z.ZodString, z.ZodString>;
353
- toolGuidelines: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
354
- promptGuidelines: z.ZodArray<z.ZodString>;
355
- contextFiles: z.ZodArray<z.ZodObject<{
356
- path: z.ZodString;
357
- content: z.ZodString;
358
- }, z.core.$strict>>;
359
- skills: z.ZodArray<z.ZodObject<{
360
- name: z.ZodString;
361
- description: z.ZodString;
362
- filePath: z.ZodString;
363
- disableModelInvocation: z.ZodBoolean;
364
- }, z.core.$strict>>;
365
- docsPaths: z.ZodObject<{
366
- readmePath: z.ZodString;
367
- docsPath: z.ZodString;
368
- examplesPath: z.ZodString;
369
- }, z.core.$strict>;
301
+ systemPrompt: z.ZodString;
370
302
  }, z.core.$strict>;
371
303
  /**
372
304
  * One model-visible user message. Text-only: multimodal content and any extra
@@ -423,27 +355,7 @@ export type InputPreparationMessage = z.infer<typeof InputPreparationMessageSche
423
355
  */
424
356
  export declare const InputPreparationContextDocumentSchema: z.ZodObject<{
425
357
  prompt: z.ZodObject<{
426
- customPrompt: z.ZodOptional<z.ZodString>;
427
- appendSystemPrompt: z.ZodOptional<z.ZodString>;
428
- cwd: z.ZodString;
429
- toolSnippets: z.ZodRecord<z.ZodString, z.ZodString>;
430
- toolGuidelines: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
431
- promptGuidelines: z.ZodArray<z.ZodString>;
432
- contextFiles: z.ZodArray<z.ZodObject<{
433
- path: z.ZodString;
434
- content: z.ZodString;
435
- }, z.core.$strict>>;
436
- skills: z.ZodArray<z.ZodObject<{
437
- name: z.ZodString;
438
- description: z.ZodString;
439
- filePath: z.ZodString;
440
- disableModelInvocation: z.ZodBoolean;
441
- }, z.core.$strict>>;
442
- docsPaths: z.ZodObject<{
443
- readmePath: z.ZodString;
444
- docsPath: z.ZodString;
445
- examplesPath: z.ZodString;
446
- }, z.core.$strict>;
358
+ systemPrompt: z.ZodString;
447
359
  }, z.core.$strict>;
448
360
  messages: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
449
361
  role: z.ZodLiteral<"user">;
@@ -513,9 +425,10 @@ export type InputPreparationReadinessReason = z.infer<typeof InputPreparationRea
513
425
  export declare const InputPreparationRuntimeIdentitySchema: z.ZodObject<{
514
426
  packageName: z.ZodString;
515
427
  packageVersion: z.ZodString;
516
- upstreamBase: z.ZodString;
428
+ tarballIntegrity: z.ZodString;
429
+ provenanceDigest: z.ZodString;
430
+ closureDigest: z.ZodString;
517
431
  upstreamCommit: z.ZodString;
518
- forkBuild: z.ZodNumber;
519
432
  envelopeFormat: z.ZodString;
520
433
  requestFormat: z.ZodString;
521
434
  compilerVersion: z.ZodNumber;
@@ -751,9 +664,10 @@ export declare const InputPreparationBindingSchema: z.ZodObject<{
751
664
  runtime: z.ZodObject<{
752
665
  packageName: z.ZodString;
753
666
  packageVersion: z.ZodString;
754
- upstreamBase: z.ZodString;
667
+ tarballIntegrity: z.ZodString;
668
+ provenanceDigest: z.ZodString;
669
+ closureDigest: z.ZodString;
755
670
  upstreamCommit: z.ZodString;
756
- forkBuild: z.ZodNumber;
757
671
  envelopeFormat: z.ZodString;
758
672
  requestFormat: z.ZodString;
759
673
  compilerVersion: z.ZodNumber;
@@ -810,9 +724,10 @@ export declare const InputPreparationReceiptSummarySchema: z.ZodObject<{
810
724
  runtime: z.ZodObject<{
811
725
  packageName: z.ZodString;
812
726
  packageVersion: z.ZodString;
813
- upstreamBase: z.ZodString;
727
+ tarballIntegrity: z.ZodString;
728
+ provenanceDigest: z.ZodString;
729
+ closureDigest: z.ZodString;
814
730
  upstreamCommit: z.ZodString;
815
- forkBuild: z.ZodNumber;
816
731
  envelopeFormat: z.ZodString;
817
732
  requestFormat: z.ZodString;
818
733
  compilerVersion: z.ZodNumber;
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-v6", "terminal-projection-selection", "host-mcp-task-context", "custom-harness", "mailbox-read-ahead"];
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-v7", "terminal-projection-selection", "host-mcp-task-context", "custom-harness", "mailbox-read-ahead"];
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.21.0",
3
+ "version": "0.22.0",
4
4
  "description": "BYOK SDK wire protocol: envelope schema, message types, and codec helpers",
5
5
  "type": "module",
6
6
  "license": "MIT",