@byok-sdk/protocol 0.20.0 → 0.21.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/envelope.d.ts +40 -0
- package/dist/http-api.d.ts +80 -0
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/input-preparation.d.ts +2 -2
- package/dist/messages.d.ts +135 -14
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/envelope.d.ts
CHANGED
|
@@ -601,6 +601,46 @@ export declare const EnvelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
601
601
|
requestDigest: z.ZodString;
|
|
602
602
|
artifactDigest: z.ZodOptional<z.ZodString>;
|
|
603
603
|
}, z.core.$strict>;
|
|
604
|
+
egressPolicy: z.ZodObject<{
|
|
605
|
+
policyRevision: z.ZodString;
|
|
606
|
+
activity: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
607
|
+
mode: z.ZodLiteral<"metadata-status">;
|
|
608
|
+
delivery: z.ZodLiteral<"latest-value">;
|
|
609
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
610
|
+
mode: z.ZodLiteral<"contentful-trajectory">;
|
|
611
|
+
delivery: z.ZodLiteral<"latest-value">;
|
|
612
|
+
maxCoalesceMs: z.ZodNumber;
|
|
613
|
+
maxEventBytes: z.ZodNumber;
|
|
614
|
+
}, z.core.$strict>], "mode">;
|
|
615
|
+
reliable: z.ZodObject<{
|
|
616
|
+
maxPendingEventsPerAgent: z.ZodNumber;
|
|
617
|
+
maxPendingBytesPerAgent: z.ZodNumber;
|
|
618
|
+
maxPendingBytesPerTenant: z.ZodNumber;
|
|
619
|
+
}, z.core.$strict>;
|
|
620
|
+
transfers: z.ZodObject<{
|
|
621
|
+
workspace: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
|
|
622
|
+
maxBytes: z.ZodNumber;
|
|
623
|
+
allowedMimeTypes: z.ZodArray<z.ZodString>;
|
|
624
|
+
}, z.core.$strict>]>;
|
|
625
|
+
transcript: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
|
|
626
|
+
maxBytes: z.ZodNumber;
|
|
627
|
+
allowedMimeTypes: z.ZodArray<z.ZodString>;
|
|
628
|
+
}, z.core.$strict>]>;
|
|
629
|
+
artifact: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
|
|
630
|
+
maxBytes: z.ZodNumber;
|
|
631
|
+
allowedMimeTypes: z.ZodArray<z.ZodString>;
|
|
632
|
+
}, z.core.$strict>]>;
|
|
633
|
+
}, z.core.$strict>;
|
|
634
|
+
}, z.core.$strict>;
|
|
635
|
+
messageEgress: z.ZodOptional<z.ZodObject<{
|
|
636
|
+
mode: z.ZodLiteral<"required">;
|
|
637
|
+
contract: z.ZodString;
|
|
638
|
+
contentType: z.ZodEnum<{
|
|
639
|
+
"text/markdown": "text/markdown";
|
|
640
|
+
"text/plain": "text/plain";
|
|
641
|
+
}>;
|
|
642
|
+
maxBytes: z.ZodNumber;
|
|
643
|
+
}, z.core.$strict>>;
|
|
604
644
|
}, z.core.$strict>;
|
|
605
645
|
}, z.core.$strip>, z.ZodObject<{
|
|
606
646
|
v: z.ZodNumber;
|
package/dist/http-api.d.ts
CHANGED
|
@@ -695,6 +695,46 @@ export declare const EventsPollResponseSchema: z.ZodObject<{
|
|
|
695
695
|
requestDigest: z.ZodString;
|
|
696
696
|
artifactDigest: z.ZodOptional<z.ZodString>;
|
|
697
697
|
}, z.core.$strict>;
|
|
698
|
+
egressPolicy: z.ZodObject<{
|
|
699
|
+
policyRevision: z.ZodString;
|
|
700
|
+
activity: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
701
|
+
mode: z.ZodLiteral<"metadata-status">;
|
|
702
|
+
delivery: z.ZodLiteral<"latest-value">;
|
|
703
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
704
|
+
mode: z.ZodLiteral<"contentful-trajectory">;
|
|
705
|
+
delivery: z.ZodLiteral<"latest-value">;
|
|
706
|
+
maxCoalesceMs: z.ZodNumber;
|
|
707
|
+
maxEventBytes: z.ZodNumber;
|
|
708
|
+
}, z.core.$strict>], "mode">;
|
|
709
|
+
reliable: z.ZodObject<{
|
|
710
|
+
maxPendingEventsPerAgent: z.ZodNumber;
|
|
711
|
+
maxPendingBytesPerAgent: z.ZodNumber;
|
|
712
|
+
maxPendingBytesPerTenant: z.ZodNumber;
|
|
713
|
+
}, z.core.$strict>;
|
|
714
|
+
transfers: z.ZodObject<{
|
|
715
|
+
workspace: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
|
|
716
|
+
maxBytes: z.ZodNumber;
|
|
717
|
+
allowedMimeTypes: z.ZodArray<z.ZodString>;
|
|
718
|
+
}, z.core.$strict>]>;
|
|
719
|
+
transcript: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
|
|
720
|
+
maxBytes: z.ZodNumber;
|
|
721
|
+
allowedMimeTypes: z.ZodArray<z.ZodString>;
|
|
722
|
+
}, z.core.$strict>]>;
|
|
723
|
+
artifact: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
|
|
724
|
+
maxBytes: z.ZodNumber;
|
|
725
|
+
allowedMimeTypes: z.ZodArray<z.ZodString>;
|
|
726
|
+
}, z.core.$strict>]>;
|
|
727
|
+
}, z.core.$strict>;
|
|
728
|
+
}, z.core.$strict>;
|
|
729
|
+
messageEgress: z.ZodOptional<z.ZodObject<{
|
|
730
|
+
mode: z.ZodLiteral<"required">;
|
|
731
|
+
contract: z.ZodString;
|
|
732
|
+
contentType: z.ZodEnum<{
|
|
733
|
+
"text/markdown": "text/markdown";
|
|
734
|
+
"text/plain": "text/plain";
|
|
735
|
+
}>;
|
|
736
|
+
maxBytes: z.ZodNumber;
|
|
737
|
+
}, z.core.$strict>>;
|
|
698
738
|
}, z.core.$strict>;
|
|
699
739
|
}, z.core.$strip>, z.ZodObject<{
|
|
700
740
|
v: z.ZodNumber;
|
|
@@ -2033,6 +2073,46 @@ export declare const MessagesSendRequestSchema: z.ZodObject<{
|
|
|
2033
2073
|
requestDigest: z.ZodString;
|
|
2034
2074
|
artifactDigest: z.ZodOptional<z.ZodString>;
|
|
2035
2075
|
}, z.core.$strict>;
|
|
2076
|
+
egressPolicy: z.ZodObject<{
|
|
2077
|
+
policyRevision: z.ZodString;
|
|
2078
|
+
activity: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2079
|
+
mode: z.ZodLiteral<"metadata-status">;
|
|
2080
|
+
delivery: z.ZodLiteral<"latest-value">;
|
|
2081
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
2082
|
+
mode: z.ZodLiteral<"contentful-trajectory">;
|
|
2083
|
+
delivery: z.ZodLiteral<"latest-value">;
|
|
2084
|
+
maxCoalesceMs: z.ZodNumber;
|
|
2085
|
+
maxEventBytes: z.ZodNumber;
|
|
2086
|
+
}, z.core.$strict>], "mode">;
|
|
2087
|
+
reliable: z.ZodObject<{
|
|
2088
|
+
maxPendingEventsPerAgent: z.ZodNumber;
|
|
2089
|
+
maxPendingBytesPerAgent: z.ZodNumber;
|
|
2090
|
+
maxPendingBytesPerTenant: z.ZodNumber;
|
|
2091
|
+
}, z.core.$strict>;
|
|
2092
|
+
transfers: z.ZodObject<{
|
|
2093
|
+
workspace: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
|
|
2094
|
+
maxBytes: z.ZodNumber;
|
|
2095
|
+
allowedMimeTypes: z.ZodArray<z.ZodString>;
|
|
2096
|
+
}, z.core.$strict>]>;
|
|
2097
|
+
transcript: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
|
|
2098
|
+
maxBytes: z.ZodNumber;
|
|
2099
|
+
allowedMimeTypes: z.ZodArray<z.ZodString>;
|
|
2100
|
+
}, z.core.$strict>]>;
|
|
2101
|
+
artifact: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
|
|
2102
|
+
maxBytes: z.ZodNumber;
|
|
2103
|
+
allowedMimeTypes: z.ZodArray<z.ZodString>;
|
|
2104
|
+
}, z.core.$strict>]>;
|
|
2105
|
+
}, z.core.$strict>;
|
|
2106
|
+
}, z.core.$strict>;
|
|
2107
|
+
messageEgress: z.ZodOptional<z.ZodObject<{
|
|
2108
|
+
mode: z.ZodLiteral<"required">;
|
|
2109
|
+
contract: z.ZodString;
|
|
2110
|
+
contentType: z.ZodEnum<{
|
|
2111
|
+
"text/markdown": "text/markdown";
|
|
2112
|
+
"text/plain": "text/plain";
|
|
2113
|
+
}>;
|
|
2114
|
+
maxBytes: z.ZodNumber;
|
|
2115
|
+
}, z.core.$strict>>;
|
|
2036
2116
|
}, z.core.$strict>;
|
|
2037
2117
|
}, z.core.$strip>, z.ZodObject<{
|
|
2038
2118
|
v: z.ZodNumber;
|
package/dist/index.js
CHANGED
|
@@ -123,7 +123,7 @@ var PermissionPolicySchema = z.object({
|
|
|
123
123
|
}).strict();
|
|
124
124
|
|
|
125
125
|
// src/input-preparation.ts
|
|
126
|
-
var INPUT_PREPARATION_WIRE_VERSION =
|
|
126
|
+
var INPUT_PREPARATION_WIRE_VERSION = 6;
|
|
127
127
|
var AGENT_INPUT_PREPARATION_CAPABILITY = `agent-input-preparation-v${INPUT_PREPARATION_WIRE_VERSION}`;
|
|
128
128
|
var InputPreparationContentHashSchema = AgentEgressContentHashSchema;
|
|
129
129
|
var OPAQUE_ID = z.string().min(1).max(512).regex(/^[^\u0000-\u001f\u007f]+$/u, "control identifiers must not contain control characters");
|
|
@@ -760,7 +760,11 @@ var TaskOfferForAgentWithEgressFreshPayloadSchema = TaskOfferForAgentPayloadSche
|
|
|
760
760
|
var TaskOfferPreparedPayloadSchema = TaskOfferForAgentPayloadSchema.omit({
|
|
761
761
|
instruction: true,
|
|
762
762
|
sessionRef: true
|
|
763
|
-
}).extend({
|
|
763
|
+
}).extend({
|
|
764
|
+
preparation: InputPreparationOfferBindingSchema,
|
|
765
|
+
egressPolicy: AgentEgressPolicySchema,
|
|
766
|
+
messageEgress: AgentMessageEgressRequirementSchema.optional()
|
|
767
|
+
}).strict();
|
|
764
768
|
var EGRESS_SAFE_VALUE = z.json().refine(
|
|
765
769
|
(value) => new TextEncoder().encode(JSON.stringify(value)).byteLength <= 256 * 1024,
|
|
766
770
|
"sanitized egress payload exceeds 256KiB"
|