@byok-sdk/protocol 0.18.0 → 0.20.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/codec.d.ts +8 -0
- package/dist/envelope.d.ts +210 -0
- package/dist/http-api.d.ts +801 -0
- package/dist/index.d.ts +7 -4
- package/dist/index.js +466 -10
- package/dist/index.js.map +1 -1
- package/dist/input-preparation.d.ts +977 -0
- package/dist/messages.d.ts +534 -1
- package/dist/task-assertion.d.ts +30 -0
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/codec.d.ts
CHANGED
|
@@ -46,6 +46,10 @@ interface EnvelopeShapeOptions {
|
|
|
46
46
|
taskId: string;
|
|
47
47
|
seq: number;
|
|
48
48
|
};
|
|
49
|
+
'task.offer_prepared': {
|
|
50
|
+
taskId: string;
|
|
51
|
+
seq: number;
|
|
52
|
+
};
|
|
49
53
|
'agent.egress.reliable': {
|
|
50
54
|
taskId?: string;
|
|
51
55
|
seq?: number;
|
|
@@ -70,6 +74,10 @@ interface EnvelopeShapeOptions {
|
|
|
70
74
|
taskId?: never;
|
|
71
75
|
seq: number;
|
|
72
76
|
};
|
|
77
|
+
'agent.input.preparation': {
|
|
78
|
+
taskId?: never;
|
|
79
|
+
seq: number;
|
|
80
|
+
};
|
|
73
81
|
'agent.content.receipt': {
|
|
74
82
|
taskId?: string;
|
|
75
83
|
seq?: number;
|
package/dist/envelope.d.ts
CHANGED
|
@@ -528,6 +528,80 @@ export declare const EnvelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
528
528
|
maxBytes: z.ZodNumber;
|
|
529
529
|
}, z.core.$strict>>;
|
|
530
530
|
}, z.core.$strict>;
|
|
531
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
532
|
+
v: z.ZodNumber;
|
|
533
|
+
id: z.ZodUUID;
|
|
534
|
+
ts: z.ZodISODateTime;
|
|
535
|
+
type: z.ZodLiteral<"task.offer_prepared">;
|
|
536
|
+
task_id: z.ZodString;
|
|
537
|
+
session_ref: z.ZodOptional<z.ZodString>;
|
|
538
|
+
seq: z.ZodNumber;
|
|
539
|
+
payload: z.ZodObject<{
|
|
540
|
+
policy: z.ZodObject<{
|
|
541
|
+
mode: z.ZodEnum<{
|
|
542
|
+
auto: "auto";
|
|
543
|
+
confirm: "confirm";
|
|
544
|
+
plan: "plan";
|
|
545
|
+
readonly: "readonly";
|
|
546
|
+
}>;
|
|
547
|
+
allowTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
548
|
+
denyTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
549
|
+
workspaceRoot: z.ZodOptional<z.ZodString>;
|
|
550
|
+
network: z.ZodOptional<z.ZodBoolean>;
|
|
551
|
+
}, z.core.$strict>;
|
|
552
|
+
agentRef: z.ZodObject<{
|
|
553
|
+
agentId: z.ZodString;
|
|
554
|
+
profileRevision: z.ZodString;
|
|
555
|
+
}, z.core.$strict>;
|
|
556
|
+
requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
557
|
+
runtime: z.ZodOptional<z.ZodEnum<{
|
|
558
|
+
claude: "claude";
|
|
559
|
+
codex: "codex";
|
|
560
|
+
pi: "pi";
|
|
561
|
+
}>>;
|
|
562
|
+
harnessId: z.ZodOptional<z.ZodString>;
|
|
563
|
+
dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
564
|
+
lane: z.ZodLiteral<"subscription">;
|
|
565
|
+
runtimeId: z.ZodEnum<{
|
|
566
|
+
claude: "claude";
|
|
567
|
+
codex: "codex";
|
|
568
|
+
}>;
|
|
569
|
+
providerId: z.ZodNull;
|
|
570
|
+
modelId: z.ZodString;
|
|
571
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
572
|
+
lane: z.ZodLiteral<"byok">;
|
|
573
|
+
runtimeId: z.ZodLiteral<"pi">;
|
|
574
|
+
providerId: z.ZodString;
|
|
575
|
+
modelId: z.ZodString;
|
|
576
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
577
|
+
lane: z.ZodLiteral<"byok-profile">;
|
|
578
|
+
runtimeId: z.ZodLiteral<"pi">;
|
|
579
|
+
providerProfile: z.ZodObject<{
|
|
580
|
+
profileRef: z.ZodString;
|
|
581
|
+
profileRevision: z.ZodString;
|
|
582
|
+
profileHash: z.ZodString;
|
|
583
|
+
modelId: z.ZodString;
|
|
584
|
+
requiredCapabilities: z.ZodArray<z.ZodEnum<{
|
|
585
|
+
"image-input": "image-input";
|
|
586
|
+
}>>;
|
|
587
|
+
}, z.core.$strict>;
|
|
588
|
+
}, z.core.$strict>], "lane">>;
|
|
589
|
+
terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
590
|
+
mode: z.ZodLiteral<"none">;
|
|
591
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
592
|
+
mode: z.ZodLiteral<"result-document">;
|
|
593
|
+
contract: z.ZodString;
|
|
594
|
+
}, z.core.$strict>], "mode">>;
|
|
595
|
+
limits: z.ZodOptional<z.ZodObject<{
|
|
596
|
+
maxDurationMs: z.ZodOptional<z.ZodNumber>;
|
|
597
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
598
|
+
}, z.core.$strip>>;
|
|
599
|
+
preparation: z.ZodObject<{
|
|
600
|
+
reference: z.ZodString;
|
|
601
|
+
requestDigest: z.ZodString;
|
|
602
|
+
artifactDigest: z.ZodOptional<z.ZodString>;
|
|
603
|
+
}, z.core.$strict>;
|
|
604
|
+
}, z.core.$strict>;
|
|
531
605
|
}, z.core.$strip>, z.ZodObject<{
|
|
532
606
|
v: z.ZodNumber;
|
|
533
607
|
id: z.ZodUUID;
|
|
@@ -636,6 +710,132 @@ export declare const EnvelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
636
710
|
projectionHash: z.ZodString;
|
|
637
711
|
projection: z.ZodType<import("./agent-home-projection").AgentHomeProjectionValue, unknown, z.core.$ZodTypeInternals<import("./agent-home-projection").AgentHomeProjectionValue, unknown>>;
|
|
638
712
|
}, z.core.$strict>;
|
|
713
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
714
|
+
v: z.ZodNumber;
|
|
715
|
+
id: z.ZodUUID;
|
|
716
|
+
ts: z.ZodISODateTime;
|
|
717
|
+
type: z.ZodLiteral<"agent.input.preparation">;
|
|
718
|
+
task_id: z.ZodOptional<z.ZodNever>;
|
|
719
|
+
session_ref: z.ZodOptional<z.ZodString>;
|
|
720
|
+
seq: z.ZodNumber;
|
|
721
|
+
payload: z.ZodObject<{
|
|
722
|
+
requestId: z.ZodUUID;
|
|
723
|
+
agentRef: z.ZodObject<{
|
|
724
|
+
agentId: z.ZodString;
|
|
725
|
+
profileRevision: z.ZodString;
|
|
726
|
+
}, z.core.$strict>;
|
|
727
|
+
profileId: z.ZodString;
|
|
728
|
+
policyRevision: z.ZodString;
|
|
729
|
+
source: z.ZodObject<{
|
|
730
|
+
revision: z.ZodString;
|
|
731
|
+
digest: z.ZodString;
|
|
732
|
+
}, z.core.$strict>;
|
|
733
|
+
selection: z.ZodObject<{
|
|
734
|
+
model: z.ZodObject<{
|
|
735
|
+
id: z.ZodString;
|
|
736
|
+
name: z.ZodString;
|
|
737
|
+
api: z.ZodLiteral<"openai-completions">;
|
|
738
|
+
provider: z.ZodString;
|
|
739
|
+
baseUrl: z.ZodString;
|
|
740
|
+
reasoning: z.ZodBoolean;
|
|
741
|
+
input: z.ZodArray<z.ZodEnum<{
|
|
742
|
+
image: "image";
|
|
743
|
+
text: "text";
|
|
744
|
+
}>>;
|
|
745
|
+
cost: z.ZodObject<{
|
|
746
|
+
input: z.ZodNumber;
|
|
747
|
+
output: z.ZodNumber;
|
|
748
|
+
cacheRead: z.ZodNumber;
|
|
749
|
+
cacheWrite: z.ZodNumber;
|
|
750
|
+
}, z.core.$strict>;
|
|
751
|
+
contextWindow: z.ZodNumber;
|
|
752
|
+
maxTokens: z.ZodNumber;
|
|
753
|
+
thinkingLevelMap: z.ZodOptional<z.ZodObject<{
|
|
754
|
+
off: z.ZodNullable<z.ZodString>;
|
|
755
|
+
minimal: z.ZodNullable<z.ZodString>;
|
|
756
|
+
low: z.ZodNullable<z.ZodString>;
|
|
757
|
+
medium: z.ZodNullable<z.ZodString>;
|
|
758
|
+
high: z.ZodNullable<z.ZodString>;
|
|
759
|
+
xhigh: z.ZodNullable<z.ZodString>;
|
|
760
|
+
max: z.ZodNullable<z.ZodString>;
|
|
761
|
+
}, z.core.$strict>>;
|
|
762
|
+
compat: z.ZodOptional<z.ZodObject<{
|
|
763
|
+
supportsStore: z.ZodOptional<z.ZodBoolean>;
|
|
764
|
+
supportsDeveloperRole: z.ZodOptional<z.ZodBoolean>;
|
|
765
|
+
supportsReasoningEffort: z.ZodOptional<z.ZodBoolean>;
|
|
766
|
+
supportsUsageInStreaming: z.ZodOptional<z.ZodBoolean>;
|
|
767
|
+
maxTokensField: z.ZodOptional<z.ZodEnum<{
|
|
768
|
+
max_completion_tokens: "max_completion_tokens";
|
|
769
|
+
max_tokens: "max_tokens";
|
|
770
|
+
}>>;
|
|
771
|
+
thinkingFormat: z.ZodOptional<z.ZodEnum<{
|
|
772
|
+
"ant-ling": "ant-ling";
|
|
773
|
+
baseten: "baseten";
|
|
774
|
+
"chat-template": "chat-template";
|
|
775
|
+
deepseek: "deepseek";
|
|
776
|
+
openai: "openai";
|
|
777
|
+
openrouter: "openrouter";
|
|
778
|
+
qwen: "qwen";
|
|
779
|
+
"qwen-chat-template": "qwen-chat-template";
|
|
780
|
+
"string-thinking": "string-thinking";
|
|
781
|
+
together: "together";
|
|
782
|
+
zai: "zai";
|
|
783
|
+
}>>;
|
|
784
|
+
zaiToolStream: z.ZodOptional<z.ZodBoolean>;
|
|
785
|
+
}, z.core.$strict>>;
|
|
786
|
+
}, z.core.$strict>;
|
|
787
|
+
options: z.ZodObject<{
|
|
788
|
+
cacheRetention: z.ZodEnum<{
|
|
789
|
+
long: "long";
|
|
790
|
+
none: "none";
|
|
791
|
+
short: "short";
|
|
792
|
+
}>;
|
|
793
|
+
maxTokens: z.ZodNumber;
|
|
794
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
795
|
+
toolChoice: z.ZodOptional<z.ZodEnum<{
|
|
796
|
+
auto: "auto";
|
|
797
|
+
none: "none";
|
|
798
|
+
}>>;
|
|
799
|
+
reasoningEffort: z.ZodOptional<z.ZodEnum<{
|
|
800
|
+
high: "high";
|
|
801
|
+
low: "low";
|
|
802
|
+
max: "max";
|
|
803
|
+
medium: "medium";
|
|
804
|
+
minimal: "minimal";
|
|
805
|
+
xhigh: "xhigh";
|
|
806
|
+
}>>;
|
|
807
|
+
}, z.core.$strict>;
|
|
808
|
+
}, z.core.$strict>;
|
|
809
|
+
deadlineAt: z.ZodISODateTime;
|
|
810
|
+
context: z.ZodUnion<readonly [z.ZodObject<{
|
|
811
|
+
inline: z.ZodString;
|
|
812
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
813
|
+
blobRef: z.ZodObject<{
|
|
814
|
+
blobId: z.ZodString;
|
|
815
|
+
contentHash: z.ZodString;
|
|
816
|
+
size: z.ZodNumber;
|
|
817
|
+
contentType: z.ZodString;
|
|
818
|
+
url: z.ZodOptional<z.ZodString>;
|
|
819
|
+
}, z.core.$strip>;
|
|
820
|
+
contentHash: z.ZodString;
|
|
821
|
+
}, z.core.$strict>]>;
|
|
822
|
+
requiredToolsets: z.ZodArray<z.ZodString>;
|
|
823
|
+
permissionMode: z.ZodEnum<{
|
|
824
|
+
auto: "auto";
|
|
825
|
+
confirm: "confirm";
|
|
826
|
+
plan: "plan";
|
|
827
|
+
readonly: "readonly";
|
|
828
|
+
}>;
|
|
829
|
+
accountingPolicyRef: z.ZodOptional<z.ZodObject<{
|
|
830
|
+
revision: z.ZodString;
|
|
831
|
+
ruledRuntime: z.ZodString;
|
|
832
|
+
ruledTarget: z.ZodObject<{
|
|
833
|
+
endpoint: z.ZodString;
|
|
834
|
+
modelId: z.ZodString;
|
|
835
|
+
}, z.core.$strict>;
|
|
836
|
+
ruledResidualKeys: z.ZodArray<z.ZodString>;
|
|
837
|
+
}, z.core.$strict>>;
|
|
838
|
+
}, z.core.$strict>;
|
|
639
839
|
}, z.core.$strip>, z.ZodObject<{
|
|
640
840
|
v: z.ZodNumber;
|
|
641
841
|
id: z.ZodUUID;
|
|
@@ -882,6 +1082,11 @@ export declare const EnvelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
882
1082
|
clientVersion: z.ZodString;
|
|
883
1083
|
reportedAt: z.ZodISODateTime;
|
|
884
1084
|
}, z.core.$strip>>;
|
|
1085
|
+
preparedObservation: z.ZodOptional<z.ZodObject<{
|
|
1086
|
+
requestDigest: z.ZodString;
|
|
1087
|
+
initialPromptTokens: z.ZodNumber;
|
|
1088
|
+
maxPromptTokens: z.ZodNumber;
|
|
1089
|
+
}, z.core.$strict>>;
|
|
885
1090
|
agentRef: z.ZodOptional<z.ZodObject<{
|
|
886
1091
|
agentId: z.ZodString;
|
|
887
1092
|
profileRevision: z.ZodString;
|
|
@@ -917,6 +1122,11 @@ export declare const EnvelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
917
1122
|
clientVersion: z.ZodString;
|
|
918
1123
|
reportedAt: z.ZodISODateTime;
|
|
919
1124
|
}, z.core.$strip>>;
|
|
1125
|
+
preparedObservation: z.ZodOptional<z.ZodObject<{
|
|
1126
|
+
requestDigest: z.ZodString;
|
|
1127
|
+
initialPromptTokens: z.ZodNumber;
|
|
1128
|
+
maxPromptTokens: z.ZodNumber;
|
|
1129
|
+
}, z.core.$strict>>;
|
|
920
1130
|
agentRef: z.ZodOptional<z.ZodObject<{
|
|
921
1131
|
agentId: z.ZodString;
|
|
922
1132
|
profileRevision: z.ZodString;
|