@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.
@@ -622,6 +622,80 @@ export declare const EventsPollResponseSchema: z.ZodObject<{
622
622
  maxBytes: z.ZodNumber;
623
623
  }, z.core.$strict>>;
624
624
  }, z.core.$strict>;
625
+ }, z.core.$strip>, z.ZodObject<{
626
+ v: z.ZodNumber;
627
+ id: z.ZodUUID;
628
+ ts: z.ZodISODateTime;
629
+ type: z.ZodLiteral<"task.offer_prepared">;
630
+ task_id: z.ZodString;
631
+ session_ref: z.ZodOptional<z.ZodString>;
632
+ seq: z.ZodNumber;
633
+ payload: z.ZodObject<{
634
+ policy: z.ZodObject<{
635
+ mode: z.ZodEnum<{
636
+ auto: "auto";
637
+ confirm: "confirm";
638
+ plan: "plan";
639
+ readonly: "readonly";
640
+ }>;
641
+ allowTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
642
+ denyTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
643
+ workspaceRoot: z.ZodOptional<z.ZodString>;
644
+ network: z.ZodOptional<z.ZodBoolean>;
645
+ }, z.core.$strict>;
646
+ agentRef: z.ZodObject<{
647
+ agentId: z.ZodString;
648
+ profileRevision: z.ZodString;
649
+ }, z.core.$strict>;
650
+ requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
651
+ runtime: z.ZodOptional<z.ZodEnum<{
652
+ claude: "claude";
653
+ codex: "codex";
654
+ pi: "pi";
655
+ }>>;
656
+ harnessId: z.ZodOptional<z.ZodString>;
657
+ dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
658
+ lane: z.ZodLiteral<"subscription">;
659
+ runtimeId: z.ZodEnum<{
660
+ claude: "claude";
661
+ codex: "codex";
662
+ }>;
663
+ providerId: z.ZodNull;
664
+ modelId: z.ZodString;
665
+ }, z.core.$strict>, z.ZodObject<{
666
+ lane: z.ZodLiteral<"byok">;
667
+ runtimeId: z.ZodLiteral<"pi">;
668
+ providerId: z.ZodString;
669
+ modelId: z.ZodString;
670
+ }, z.core.$strict>, z.ZodObject<{
671
+ lane: z.ZodLiteral<"byok-profile">;
672
+ runtimeId: z.ZodLiteral<"pi">;
673
+ providerProfile: z.ZodObject<{
674
+ profileRef: z.ZodString;
675
+ profileRevision: z.ZodString;
676
+ profileHash: z.ZodString;
677
+ modelId: z.ZodString;
678
+ requiredCapabilities: z.ZodArray<z.ZodEnum<{
679
+ "image-input": "image-input";
680
+ }>>;
681
+ }, z.core.$strict>;
682
+ }, z.core.$strict>], "lane">>;
683
+ terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
684
+ mode: z.ZodLiteral<"none">;
685
+ }, z.core.$strict>, z.ZodObject<{
686
+ mode: z.ZodLiteral<"result-document">;
687
+ contract: z.ZodString;
688
+ }, z.core.$strict>], "mode">>;
689
+ limits: z.ZodOptional<z.ZodObject<{
690
+ maxDurationMs: z.ZodOptional<z.ZodNumber>;
691
+ maxTokens: z.ZodOptional<z.ZodNumber>;
692
+ }, z.core.$strip>>;
693
+ preparation: z.ZodObject<{
694
+ reference: z.ZodString;
695
+ requestDigest: z.ZodString;
696
+ artifactDigest: z.ZodOptional<z.ZodString>;
697
+ }, z.core.$strict>;
698
+ }, z.core.$strict>;
625
699
  }, z.core.$strip>, z.ZodObject<{
626
700
  v: z.ZodNumber;
627
701
  id: z.ZodUUID;
@@ -730,6 +804,132 @@ export declare const EventsPollResponseSchema: z.ZodObject<{
730
804
  projectionHash: z.ZodString;
731
805
  projection: z.ZodType<import("./agent-home-projection").AgentHomeProjectionValue, unknown, z.core.$ZodTypeInternals<import("./agent-home-projection").AgentHomeProjectionValue, unknown>>;
732
806
  }, z.core.$strict>;
807
+ }, z.core.$strip>, z.ZodObject<{
808
+ v: z.ZodNumber;
809
+ id: z.ZodUUID;
810
+ ts: z.ZodISODateTime;
811
+ type: z.ZodLiteral<"agent.input.preparation">;
812
+ task_id: z.ZodOptional<z.ZodNever>;
813
+ session_ref: z.ZodOptional<z.ZodString>;
814
+ seq: z.ZodNumber;
815
+ payload: z.ZodObject<{
816
+ requestId: z.ZodUUID;
817
+ agentRef: z.ZodObject<{
818
+ agentId: z.ZodString;
819
+ profileRevision: z.ZodString;
820
+ }, z.core.$strict>;
821
+ profileId: z.ZodString;
822
+ policyRevision: z.ZodString;
823
+ source: z.ZodObject<{
824
+ revision: z.ZodString;
825
+ digest: z.ZodString;
826
+ }, z.core.$strict>;
827
+ selection: z.ZodObject<{
828
+ model: z.ZodObject<{
829
+ id: z.ZodString;
830
+ name: z.ZodString;
831
+ api: z.ZodLiteral<"openai-completions">;
832
+ provider: z.ZodString;
833
+ baseUrl: z.ZodString;
834
+ reasoning: z.ZodBoolean;
835
+ input: z.ZodArray<z.ZodEnum<{
836
+ image: "image";
837
+ text: "text";
838
+ }>>;
839
+ cost: z.ZodObject<{
840
+ input: z.ZodNumber;
841
+ output: z.ZodNumber;
842
+ cacheRead: z.ZodNumber;
843
+ cacheWrite: z.ZodNumber;
844
+ }, z.core.$strict>;
845
+ contextWindow: z.ZodNumber;
846
+ maxTokens: z.ZodNumber;
847
+ thinkingLevelMap: z.ZodOptional<z.ZodObject<{
848
+ off: z.ZodNullable<z.ZodString>;
849
+ minimal: z.ZodNullable<z.ZodString>;
850
+ low: z.ZodNullable<z.ZodString>;
851
+ medium: z.ZodNullable<z.ZodString>;
852
+ high: z.ZodNullable<z.ZodString>;
853
+ xhigh: z.ZodNullable<z.ZodString>;
854
+ max: z.ZodNullable<z.ZodString>;
855
+ }, z.core.$strict>>;
856
+ compat: z.ZodOptional<z.ZodObject<{
857
+ supportsStore: z.ZodOptional<z.ZodBoolean>;
858
+ supportsDeveloperRole: z.ZodOptional<z.ZodBoolean>;
859
+ supportsReasoningEffort: z.ZodOptional<z.ZodBoolean>;
860
+ supportsUsageInStreaming: z.ZodOptional<z.ZodBoolean>;
861
+ maxTokensField: z.ZodOptional<z.ZodEnum<{
862
+ max_completion_tokens: "max_completion_tokens";
863
+ max_tokens: "max_tokens";
864
+ }>>;
865
+ thinkingFormat: z.ZodOptional<z.ZodEnum<{
866
+ "ant-ling": "ant-ling";
867
+ baseten: "baseten";
868
+ "chat-template": "chat-template";
869
+ deepseek: "deepseek";
870
+ openai: "openai";
871
+ openrouter: "openrouter";
872
+ qwen: "qwen";
873
+ "qwen-chat-template": "qwen-chat-template";
874
+ "string-thinking": "string-thinking";
875
+ together: "together";
876
+ zai: "zai";
877
+ }>>;
878
+ zaiToolStream: z.ZodOptional<z.ZodBoolean>;
879
+ }, z.core.$strict>>;
880
+ }, z.core.$strict>;
881
+ options: z.ZodObject<{
882
+ cacheRetention: z.ZodEnum<{
883
+ long: "long";
884
+ none: "none";
885
+ short: "short";
886
+ }>;
887
+ maxTokens: z.ZodNumber;
888
+ temperature: z.ZodOptional<z.ZodNumber>;
889
+ toolChoice: z.ZodOptional<z.ZodEnum<{
890
+ auto: "auto";
891
+ none: "none";
892
+ }>>;
893
+ reasoningEffort: z.ZodOptional<z.ZodEnum<{
894
+ high: "high";
895
+ low: "low";
896
+ max: "max";
897
+ medium: "medium";
898
+ minimal: "minimal";
899
+ xhigh: "xhigh";
900
+ }>>;
901
+ }, z.core.$strict>;
902
+ }, z.core.$strict>;
903
+ deadlineAt: z.ZodISODateTime;
904
+ context: z.ZodUnion<readonly [z.ZodObject<{
905
+ inline: z.ZodString;
906
+ }, z.core.$strict>, z.ZodObject<{
907
+ blobRef: z.ZodObject<{
908
+ blobId: z.ZodString;
909
+ contentHash: z.ZodString;
910
+ size: z.ZodNumber;
911
+ contentType: z.ZodString;
912
+ url: z.ZodOptional<z.ZodString>;
913
+ }, z.core.$strip>;
914
+ contentHash: z.ZodString;
915
+ }, z.core.$strict>]>;
916
+ requiredToolsets: z.ZodArray<z.ZodString>;
917
+ permissionMode: z.ZodEnum<{
918
+ auto: "auto";
919
+ confirm: "confirm";
920
+ plan: "plan";
921
+ readonly: "readonly";
922
+ }>;
923
+ accountingPolicyRef: z.ZodOptional<z.ZodObject<{
924
+ revision: z.ZodString;
925
+ ruledRuntime: z.ZodString;
926
+ ruledTarget: z.ZodObject<{
927
+ endpoint: z.ZodString;
928
+ modelId: z.ZodString;
929
+ }, z.core.$strict>;
930
+ ruledResidualKeys: z.ZodArray<z.ZodString>;
931
+ }, z.core.$strict>>;
932
+ }, z.core.$strict>;
733
933
  }, z.core.$strip>, z.ZodObject<{
734
934
  v: z.ZodNumber;
735
935
  id: z.ZodUUID;
@@ -976,6 +1176,11 @@ export declare const EventsPollResponseSchema: z.ZodObject<{
976
1176
  clientVersion: z.ZodString;
977
1177
  reportedAt: z.ZodISODateTime;
978
1178
  }, z.core.$strip>>;
1179
+ preparedObservation: z.ZodOptional<z.ZodObject<{
1180
+ requestDigest: z.ZodString;
1181
+ initialPromptTokens: z.ZodNumber;
1182
+ maxPromptTokens: z.ZodNumber;
1183
+ }, z.core.$strict>>;
979
1184
  agentRef: z.ZodOptional<z.ZodObject<{
980
1185
  agentId: z.ZodString;
981
1186
  profileRevision: z.ZodString;
@@ -1011,6 +1216,11 @@ export declare const EventsPollResponseSchema: z.ZodObject<{
1011
1216
  clientVersion: z.ZodString;
1012
1217
  reportedAt: z.ZodISODateTime;
1013
1218
  }, z.core.$strip>>;
1219
+ preparedObservation: z.ZodOptional<z.ZodObject<{
1220
+ requestDigest: z.ZodString;
1221
+ initialPromptTokens: z.ZodNumber;
1222
+ maxPromptTokens: z.ZodNumber;
1223
+ }, z.core.$strict>>;
1014
1224
  agentRef: z.ZodOptional<z.ZodObject<{
1015
1225
  agentId: z.ZodString;
1016
1226
  profileRevision: z.ZodString;
@@ -1750,6 +1960,80 @@ export declare const MessagesSendRequestSchema: z.ZodObject<{
1750
1960
  maxBytes: z.ZodNumber;
1751
1961
  }, z.core.$strict>>;
1752
1962
  }, z.core.$strict>;
1963
+ }, z.core.$strip>, z.ZodObject<{
1964
+ v: z.ZodNumber;
1965
+ id: z.ZodUUID;
1966
+ ts: z.ZodISODateTime;
1967
+ type: z.ZodLiteral<"task.offer_prepared">;
1968
+ task_id: z.ZodString;
1969
+ session_ref: z.ZodOptional<z.ZodString>;
1970
+ seq: z.ZodNumber;
1971
+ payload: z.ZodObject<{
1972
+ policy: z.ZodObject<{
1973
+ mode: z.ZodEnum<{
1974
+ auto: "auto";
1975
+ confirm: "confirm";
1976
+ plan: "plan";
1977
+ readonly: "readonly";
1978
+ }>;
1979
+ allowTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1980
+ denyTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1981
+ workspaceRoot: z.ZodOptional<z.ZodString>;
1982
+ network: z.ZodOptional<z.ZodBoolean>;
1983
+ }, z.core.$strict>;
1984
+ agentRef: z.ZodObject<{
1985
+ agentId: z.ZodString;
1986
+ profileRevision: z.ZodString;
1987
+ }, z.core.$strict>;
1988
+ requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
1989
+ runtime: z.ZodOptional<z.ZodEnum<{
1990
+ claude: "claude";
1991
+ codex: "codex";
1992
+ pi: "pi";
1993
+ }>>;
1994
+ harnessId: z.ZodOptional<z.ZodString>;
1995
+ dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1996
+ lane: z.ZodLiteral<"subscription">;
1997
+ runtimeId: z.ZodEnum<{
1998
+ claude: "claude";
1999
+ codex: "codex";
2000
+ }>;
2001
+ providerId: z.ZodNull;
2002
+ modelId: z.ZodString;
2003
+ }, z.core.$strict>, z.ZodObject<{
2004
+ lane: z.ZodLiteral<"byok">;
2005
+ runtimeId: z.ZodLiteral<"pi">;
2006
+ providerId: z.ZodString;
2007
+ modelId: z.ZodString;
2008
+ }, z.core.$strict>, z.ZodObject<{
2009
+ lane: z.ZodLiteral<"byok-profile">;
2010
+ runtimeId: z.ZodLiteral<"pi">;
2011
+ providerProfile: z.ZodObject<{
2012
+ profileRef: z.ZodString;
2013
+ profileRevision: z.ZodString;
2014
+ profileHash: z.ZodString;
2015
+ modelId: z.ZodString;
2016
+ requiredCapabilities: z.ZodArray<z.ZodEnum<{
2017
+ "image-input": "image-input";
2018
+ }>>;
2019
+ }, z.core.$strict>;
2020
+ }, z.core.$strict>], "lane">>;
2021
+ terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2022
+ mode: z.ZodLiteral<"none">;
2023
+ }, z.core.$strict>, z.ZodObject<{
2024
+ mode: z.ZodLiteral<"result-document">;
2025
+ contract: z.ZodString;
2026
+ }, z.core.$strict>], "mode">>;
2027
+ limits: z.ZodOptional<z.ZodObject<{
2028
+ maxDurationMs: z.ZodOptional<z.ZodNumber>;
2029
+ maxTokens: z.ZodOptional<z.ZodNumber>;
2030
+ }, z.core.$strip>>;
2031
+ preparation: z.ZodObject<{
2032
+ reference: z.ZodString;
2033
+ requestDigest: z.ZodString;
2034
+ artifactDigest: z.ZodOptional<z.ZodString>;
2035
+ }, z.core.$strict>;
2036
+ }, z.core.$strict>;
1753
2037
  }, z.core.$strip>, z.ZodObject<{
1754
2038
  v: z.ZodNumber;
1755
2039
  id: z.ZodUUID;
@@ -1858,6 +2142,132 @@ export declare const MessagesSendRequestSchema: z.ZodObject<{
1858
2142
  projectionHash: z.ZodString;
1859
2143
  projection: z.ZodType<import("./agent-home-projection").AgentHomeProjectionValue, unknown, z.core.$ZodTypeInternals<import("./agent-home-projection").AgentHomeProjectionValue, unknown>>;
1860
2144
  }, z.core.$strict>;
2145
+ }, z.core.$strip>, z.ZodObject<{
2146
+ v: z.ZodNumber;
2147
+ id: z.ZodUUID;
2148
+ ts: z.ZodISODateTime;
2149
+ type: z.ZodLiteral<"agent.input.preparation">;
2150
+ task_id: z.ZodOptional<z.ZodNever>;
2151
+ session_ref: z.ZodOptional<z.ZodString>;
2152
+ seq: z.ZodNumber;
2153
+ payload: z.ZodObject<{
2154
+ requestId: z.ZodUUID;
2155
+ agentRef: z.ZodObject<{
2156
+ agentId: z.ZodString;
2157
+ profileRevision: z.ZodString;
2158
+ }, z.core.$strict>;
2159
+ profileId: z.ZodString;
2160
+ policyRevision: z.ZodString;
2161
+ source: z.ZodObject<{
2162
+ revision: z.ZodString;
2163
+ digest: z.ZodString;
2164
+ }, z.core.$strict>;
2165
+ selection: z.ZodObject<{
2166
+ model: z.ZodObject<{
2167
+ id: z.ZodString;
2168
+ name: z.ZodString;
2169
+ api: z.ZodLiteral<"openai-completions">;
2170
+ provider: z.ZodString;
2171
+ baseUrl: z.ZodString;
2172
+ reasoning: z.ZodBoolean;
2173
+ input: z.ZodArray<z.ZodEnum<{
2174
+ image: "image";
2175
+ text: "text";
2176
+ }>>;
2177
+ cost: z.ZodObject<{
2178
+ input: z.ZodNumber;
2179
+ output: z.ZodNumber;
2180
+ cacheRead: z.ZodNumber;
2181
+ cacheWrite: z.ZodNumber;
2182
+ }, z.core.$strict>;
2183
+ contextWindow: z.ZodNumber;
2184
+ maxTokens: z.ZodNumber;
2185
+ thinkingLevelMap: z.ZodOptional<z.ZodObject<{
2186
+ off: z.ZodNullable<z.ZodString>;
2187
+ minimal: z.ZodNullable<z.ZodString>;
2188
+ low: z.ZodNullable<z.ZodString>;
2189
+ medium: z.ZodNullable<z.ZodString>;
2190
+ high: z.ZodNullable<z.ZodString>;
2191
+ xhigh: z.ZodNullable<z.ZodString>;
2192
+ max: z.ZodNullable<z.ZodString>;
2193
+ }, z.core.$strict>>;
2194
+ compat: z.ZodOptional<z.ZodObject<{
2195
+ supportsStore: z.ZodOptional<z.ZodBoolean>;
2196
+ supportsDeveloperRole: z.ZodOptional<z.ZodBoolean>;
2197
+ supportsReasoningEffort: z.ZodOptional<z.ZodBoolean>;
2198
+ supportsUsageInStreaming: z.ZodOptional<z.ZodBoolean>;
2199
+ maxTokensField: z.ZodOptional<z.ZodEnum<{
2200
+ max_completion_tokens: "max_completion_tokens";
2201
+ max_tokens: "max_tokens";
2202
+ }>>;
2203
+ thinkingFormat: z.ZodOptional<z.ZodEnum<{
2204
+ "ant-ling": "ant-ling";
2205
+ baseten: "baseten";
2206
+ "chat-template": "chat-template";
2207
+ deepseek: "deepseek";
2208
+ openai: "openai";
2209
+ openrouter: "openrouter";
2210
+ qwen: "qwen";
2211
+ "qwen-chat-template": "qwen-chat-template";
2212
+ "string-thinking": "string-thinking";
2213
+ together: "together";
2214
+ zai: "zai";
2215
+ }>>;
2216
+ zaiToolStream: z.ZodOptional<z.ZodBoolean>;
2217
+ }, z.core.$strict>>;
2218
+ }, z.core.$strict>;
2219
+ options: z.ZodObject<{
2220
+ cacheRetention: z.ZodEnum<{
2221
+ long: "long";
2222
+ none: "none";
2223
+ short: "short";
2224
+ }>;
2225
+ maxTokens: z.ZodNumber;
2226
+ temperature: z.ZodOptional<z.ZodNumber>;
2227
+ toolChoice: z.ZodOptional<z.ZodEnum<{
2228
+ auto: "auto";
2229
+ none: "none";
2230
+ }>>;
2231
+ reasoningEffort: z.ZodOptional<z.ZodEnum<{
2232
+ high: "high";
2233
+ low: "low";
2234
+ max: "max";
2235
+ medium: "medium";
2236
+ minimal: "minimal";
2237
+ xhigh: "xhigh";
2238
+ }>>;
2239
+ }, z.core.$strict>;
2240
+ }, z.core.$strict>;
2241
+ deadlineAt: z.ZodISODateTime;
2242
+ context: z.ZodUnion<readonly [z.ZodObject<{
2243
+ inline: z.ZodString;
2244
+ }, z.core.$strict>, z.ZodObject<{
2245
+ blobRef: z.ZodObject<{
2246
+ blobId: z.ZodString;
2247
+ contentHash: z.ZodString;
2248
+ size: z.ZodNumber;
2249
+ contentType: z.ZodString;
2250
+ url: z.ZodOptional<z.ZodString>;
2251
+ }, z.core.$strip>;
2252
+ contentHash: z.ZodString;
2253
+ }, z.core.$strict>]>;
2254
+ requiredToolsets: z.ZodArray<z.ZodString>;
2255
+ permissionMode: z.ZodEnum<{
2256
+ auto: "auto";
2257
+ confirm: "confirm";
2258
+ plan: "plan";
2259
+ readonly: "readonly";
2260
+ }>;
2261
+ accountingPolicyRef: z.ZodOptional<z.ZodObject<{
2262
+ revision: z.ZodString;
2263
+ ruledRuntime: z.ZodString;
2264
+ ruledTarget: z.ZodObject<{
2265
+ endpoint: z.ZodString;
2266
+ modelId: z.ZodString;
2267
+ }, z.core.$strict>;
2268
+ ruledResidualKeys: z.ZodArray<z.ZodString>;
2269
+ }, z.core.$strict>>;
2270
+ }, z.core.$strict>;
1861
2271
  }, z.core.$strip>, z.ZodObject<{
1862
2272
  v: z.ZodNumber;
1863
2273
  id: z.ZodUUID;
@@ -2104,6 +2514,11 @@ export declare const MessagesSendRequestSchema: z.ZodObject<{
2104
2514
  clientVersion: z.ZodString;
2105
2515
  reportedAt: z.ZodISODateTime;
2106
2516
  }, z.core.$strip>>;
2517
+ preparedObservation: z.ZodOptional<z.ZodObject<{
2518
+ requestDigest: z.ZodString;
2519
+ initialPromptTokens: z.ZodNumber;
2520
+ maxPromptTokens: z.ZodNumber;
2521
+ }, z.core.$strict>>;
2107
2522
  agentRef: z.ZodOptional<z.ZodObject<{
2108
2523
  agentId: z.ZodString;
2109
2524
  profileRevision: z.ZodString;
@@ -2139,6 +2554,11 @@ export declare const MessagesSendRequestSchema: z.ZodObject<{
2139
2554
  clientVersion: z.ZodString;
2140
2555
  reportedAt: z.ZodISODateTime;
2141
2556
  }, z.core.$strip>>;
2557
+ preparedObservation: z.ZodOptional<z.ZodObject<{
2558
+ requestDigest: z.ZodString;
2559
+ initialPromptTokens: z.ZodNumber;
2560
+ maxPromptTokens: z.ZodNumber;
2561
+ }, z.core.$strict>>;
2142
2562
  agentRef: z.ZodOptional<z.ZodObject<{
2143
2563
  agentId: z.ZodString;
2144
2564
  profileRevision: z.ZodString;
@@ -2408,6 +2828,381 @@ export declare const AgentHomeProjectionReadbackSchema: z.ZodObject<{
2408
2828
  completedAt: z.ZodOptional<z.ZodISODateTime>;
2409
2829
  }, z.core.$strict>;
2410
2830
  export type AgentHomeProjectionReadback = z.infer<typeof AgentHomeProjectionReadbackSchema>;
2831
+ export declare const InputPreparationCompletionRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2832
+ outcome: z.ZodLiteral<"prepared">;
2833
+ requestId: z.ZodUUID;
2834
+ agentRef: z.ZodObject<{
2835
+ agentId: z.ZodString;
2836
+ profileRevision: z.ZodString;
2837
+ }, z.core.$strict>;
2838
+ profileId: z.ZodString;
2839
+ policyRevision: z.ZodString;
2840
+ receipt: z.ZodObject<{
2841
+ reference: z.ZodString;
2842
+ state: z.ZodEnum<{
2843
+ cancelled: "cancelled";
2844
+ counter_interrupted: "counter_interrupted";
2845
+ counting: "counting";
2846
+ failed: "failed";
2847
+ prepared: "prepared";
2848
+ reserved: "reserved";
2849
+ }>;
2850
+ binding: z.ZodObject<{
2851
+ scopeId: z.ZodString;
2852
+ deviceId: z.ZodString;
2853
+ agentRef: z.ZodString;
2854
+ profileId: z.ZodString;
2855
+ profileRevision: z.ZodString;
2856
+ source: z.ZodObject<{
2857
+ revision: z.ZodString;
2858
+ digest: z.ZodString;
2859
+ }, z.core.$strict>;
2860
+ target: z.ZodObject<{
2861
+ endpoint: z.ZodString;
2862
+ modelId: z.ZodString;
2863
+ }, z.core.$strict>;
2864
+ policyRevision: z.ZodString;
2865
+ permissionMode: z.ZodEnum<{
2866
+ auto: "auto";
2867
+ confirm: "confirm";
2868
+ plan: "plan";
2869
+ readonly: "readonly";
2870
+ }>;
2871
+ runtime: z.ZodObject<{
2872
+ packageName: z.ZodString;
2873
+ packageVersion: z.ZodString;
2874
+ upstreamBase: z.ZodString;
2875
+ upstreamCommit: z.ZodString;
2876
+ forkBuild: z.ZodNumber;
2877
+ envelopeFormat: z.ZodString;
2878
+ requestFormat: z.ZodString;
2879
+ compilerVersion: z.ZodNumber;
2880
+ }, z.core.$strict>;
2881
+ requestDigest: z.ZodString;
2882
+ accountingPolicyRef: z.ZodOptional<z.ZodObject<{
2883
+ revision: z.ZodString;
2884
+ ruledRuntime: z.ZodString;
2885
+ ruledTarget: z.ZodObject<{
2886
+ endpoint: z.ZodString;
2887
+ modelId: z.ZodString;
2888
+ }, z.core.$strict>;
2889
+ ruledResidualKeys: z.ZodArray<z.ZodString>;
2890
+ }, z.core.$strict>>;
2891
+ }, z.core.$strict>;
2892
+ artifact: z.ZodOptional<z.ZodObject<{
2893
+ requestDigest: z.ZodString;
2894
+ envelopeDigest: z.ZodString;
2895
+ toolManifestDigest: z.ZodString;
2896
+ requestBytes: z.ZodNumber;
2897
+ projectionBytes: z.ZodNumber;
2898
+ projection: z.ZodObject<{
2899
+ version: z.ZodLiteral<3>;
2900
+ kind: z.ZodEnum<{
2901
+ content_complete: "content_complete";
2902
+ unknown: "unknown";
2903
+ }>;
2904
+ digest: z.ZodString;
2905
+ }, z.core.$strict>;
2906
+ residual: z.ZodArray<z.ZodObject<{
2907
+ key: z.ZodString;
2908
+ valueClass: z.ZodEnum<{
2909
+ boolean: "boolean";
2910
+ bounded_integer: "bounded_integer";
2911
+ bounded_number: "bounded_number";
2912
+ closed_enum: "closed_enum";
2913
+ constant: "constant";
2914
+ finite_number: "finite_number";
2915
+ nonempty_string: "nonempty_string";
2916
+ object_shape: "object_shape";
2917
+ }>;
2918
+ }, z.core.$strict>>;
2919
+ observationDigest: z.ZodString;
2920
+ toolBindingDigest: z.ZodString;
2921
+ toolImplementationKinds: z.ZodRecord<z.ZodString, z.ZodString>;
2922
+ }, z.core.$strict>>;
2923
+ counter: z.ZodOptional<z.ZodObject<{
2924
+ method: z.ZodString;
2925
+ methodVersion: z.ZodString;
2926
+ authority: z.ZodEnum<{
2927
+ provider: "provider";
2928
+ test_fixture: "test_fixture";
2929
+ }>;
2930
+ value: z.ZodNumber;
2931
+ coverage: z.ZodObject<{
2932
+ covered: z.ZodBoolean;
2933
+ reason: z.ZodOptional<z.ZodString>;
2934
+ }, z.core.$strict>;
2935
+ providerEvidence: z.ZodObject<{
2936
+ projectionDigest: z.ZodString;
2937
+ endpoint: z.ZodString;
2938
+ modelId: z.ZodString;
2939
+ asserted: z.ZodObject<{
2940
+ httpStatus: z.ZodNumber;
2941
+ usageFields: z.ZodRecord<z.ZodString, z.ZodNumber>;
2942
+ responseDigest: z.ZodString;
2943
+ }, z.core.$strict>;
2944
+ }, z.core.$strict>;
2945
+ target: z.ZodObject<{
2946
+ endpoint: z.ZodString;
2947
+ modelId: z.ZodString;
2948
+ }, z.core.$strict>;
2949
+ calledAt: z.ZodISODateTime;
2950
+ completedAt: z.ZodISODateTime;
2951
+ }, z.core.$strict>>;
2952
+ ready: z.ZodBoolean;
2953
+ readinessReasons: z.ZodArray<z.ZodEnum<{
2954
+ accounting_policy_inapplicable: "accounting_policy_inapplicable";
2955
+ accounting_policy_missing: "accounting_policy_missing";
2956
+ artifact_expired: "artifact_expired";
2957
+ cancelled: "cancelled";
2958
+ counter_authority_not_production: "counter_authority_not_production";
2959
+ counter_coverage_incomplete: "counter_coverage_incomplete";
2960
+ counter_interrupted: "counter_interrupted";
2961
+ executor_identity_unproven: "executor_identity_unproven";
2962
+ failed: "failed";
2963
+ not_prepared: "not_prepared";
2964
+ projection_unknown: "projection_unknown";
2965
+ request_content_not_text: "request_content_not_text";
2966
+ residual_not_ruled: "residual_not_ruled";
2967
+ runtime_contract_superseded: "runtime_contract_superseded";
2968
+ }>>;
2969
+ detail: z.ZodOptional<z.ZodString>;
2970
+ artifactExpiresAt: z.ZodISODateTime;
2971
+ }, z.core.$strict>;
2972
+ }, z.core.$strict>, z.ZodObject<{
2973
+ outcome: z.ZodLiteral<"rejected">;
2974
+ requestId: z.ZodUUID;
2975
+ agentRef: z.ZodObject<{
2976
+ agentId: z.ZodString;
2977
+ profileRevision: z.ZodString;
2978
+ }, z.core.$strict>;
2979
+ profileId: z.ZodString;
2980
+ policyRevision: z.ZodString;
2981
+ reason: z.ZodEnum<{
2982
+ authority_unavailable: "authority_unavailable";
2983
+ bad_request: "bad_request";
2984
+ cancelled: "cancelled";
2985
+ context_hash_mismatch: "context_hash_mismatch";
2986
+ context_unresolvable: "context_unresolvable";
2987
+ counter_interrupted: "counter_interrupted";
2988
+ counter_unavailable: "counter_unavailable";
2989
+ deadline_elapsed: "deadline_elapsed";
2990
+ durable_write_failed: "durable_write_failed";
2991
+ input_preparation_record_log_unsupported: "input_preparation_record_log_unsupported";
2992
+ input_preparation_unconfigured: "input_preparation_unconfigured";
2993
+ launch_boundary_unavailable: "launch_boundary_unavailable";
2994
+ limit_exceeded: "limit_exceeded";
2995
+ not_found: "not_found";
2996
+ observation_drift: "observation_drift";
2997
+ permission_mode_denied: "permission_mode_denied";
2998
+ policy_revision_mismatch: "policy_revision_mismatch";
2999
+ request_conflict: "request_conflict";
3000
+ rpc_frame_too_large: "rpc_frame_too_large";
3001
+ runtime_identity_unavailable: "runtime_identity_unavailable";
3002
+ scope_denied: "scope_denied";
3003
+ toolsets_unobservable: "toolsets_unobservable";
3004
+ unsupported_input: "unsupported_input";
3005
+ }>;
3006
+ }, z.core.$strict>], "outcome">;
3007
+ export type InputPreparationCompletionRequest = z.infer<typeof InputPreparationCompletionRequestSchema>;
3008
+ /** `pending` until the device records a terminal fact; the other two are terminal. */
3009
+ export declare const InputPreparationStatusSchema: z.ZodEnum<{
3010
+ pending: "pending";
3011
+ prepared: "prepared";
3012
+ rejected: "rejected";
3013
+ }>;
3014
+ export type InputPreparationStatus = z.infer<typeof InputPreparationStatusSchema>;
3015
+ /**
3016
+ * Tenant/device/request-bound durable readback. `receipt` and `reason` are
3017
+ * present only on their own terminal status, never together and never on
3018
+ * `pending`.
3019
+ */
3020
+ export declare const InputPreparationReadbackSchema: z.ZodObject<{
3021
+ tenantId: z.ZodString;
3022
+ deviceId: z.ZodString;
3023
+ requestId: z.ZodUUID;
3024
+ agentRef: z.ZodObject<{
3025
+ agentId: z.ZodString;
3026
+ profileRevision: z.ZodString;
3027
+ }, z.core.$strict>;
3028
+ profileId: z.ZodString;
3029
+ policyRevision: z.ZodString;
3030
+ status: z.ZodEnum<{
3031
+ pending: "pending";
3032
+ prepared: "prepared";
3033
+ rejected: "rejected";
3034
+ }>;
3035
+ receipt: z.ZodOptional<z.ZodObject<{
3036
+ reference: z.ZodString;
3037
+ state: z.ZodEnum<{
3038
+ cancelled: "cancelled";
3039
+ counter_interrupted: "counter_interrupted";
3040
+ counting: "counting";
3041
+ failed: "failed";
3042
+ prepared: "prepared";
3043
+ reserved: "reserved";
3044
+ }>;
3045
+ binding: z.ZodObject<{
3046
+ scopeId: z.ZodString;
3047
+ deviceId: z.ZodString;
3048
+ agentRef: z.ZodString;
3049
+ profileId: z.ZodString;
3050
+ profileRevision: z.ZodString;
3051
+ source: z.ZodObject<{
3052
+ revision: z.ZodString;
3053
+ digest: z.ZodString;
3054
+ }, z.core.$strict>;
3055
+ target: z.ZodObject<{
3056
+ endpoint: z.ZodString;
3057
+ modelId: z.ZodString;
3058
+ }, z.core.$strict>;
3059
+ policyRevision: z.ZodString;
3060
+ permissionMode: z.ZodEnum<{
3061
+ auto: "auto";
3062
+ confirm: "confirm";
3063
+ plan: "plan";
3064
+ readonly: "readonly";
3065
+ }>;
3066
+ runtime: z.ZodObject<{
3067
+ packageName: z.ZodString;
3068
+ packageVersion: z.ZodString;
3069
+ upstreamBase: z.ZodString;
3070
+ upstreamCommit: z.ZodString;
3071
+ forkBuild: z.ZodNumber;
3072
+ envelopeFormat: z.ZodString;
3073
+ requestFormat: z.ZodString;
3074
+ compilerVersion: z.ZodNumber;
3075
+ }, z.core.$strict>;
3076
+ requestDigest: z.ZodString;
3077
+ accountingPolicyRef: z.ZodOptional<z.ZodObject<{
3078
+ revision: z.ZodString;
3079
+ ruledRuntime: z.ZodString;
3080
+ ruledTarget: z.ZodObject<{
3081
+ endpoint: z.ZodString;
3082
+ modelId: z.ZodString;
3083
+ }, z.core.$strict>;
3084
+ ruledResidualKeys: z.ZodArray<z.ZodString>;
3085
+ }, z.core.$strict>>;
3086
+ }, z.core.$strict>;
3087
+ artifact: z.ZodOptional<z.ZodObject<{
3088
+ requestDigest: z.ZodString;
3089
+ envelopeDigest: z.ZodString;
3090
+ toolManifestDigest: z.ZodString;
3091
+ requestBytes: z.ZodNumber;
3092
+ projectionBytes: z.ZodNumber;
3093
+ projection: z.ZodObject<{
3094
+ version: z.ZodLiteral<3>;
3095
+ kind: z.ZodEnum<{
3096
+ content_complete: "content_complete";
3097
+ unknown: "unknown";
3098
+ }>;
3099
+ digest: z.ZodString;
3100
+ }, z.core.$strict>;
3101
+ residual: z.ZodArray<z.ZodObject<{
3102
+ key: z.ZodString;
3103
+ valueClass: z.ZodEnum<{
3104
+ boolean: "boolean";
3105
+ bounded_integer: "bounded_integer";
3106
+ bounded_number: "bounded_number";
3107
+ closed_enum: "closed_enum";
3108
+ constant: "constant";
3109
+ finite_number: "finite_number";
3110
+ nonempty_string: "nonempty_string";
3111
+ object_shape: "object_shape";
3112
+ }>;
3113
+ }, z.core.$strict>>;
3114
+ observationDigest: z.ZodString;
3115
+ toolBindingDigest: z.ZodString;
3116
+ toolImplementationKinds: z.ZodRecord<z.ZodString, z.ZodString>;
3117
+ }, z.core.$strict>>;
3118
+ counter: z.ZodOptional<z.ZodObject<{
3119
+ method: z.ZodString;
3120
+ methodVersion: z.ZodString;
3121
+ authority: z.ZodEnum<{
3122
+ provider: "provider";
3123
+ test_fixture: "test_fixture";
3124
+ }>;
3125
+ value: z.ZodNumber;
3126
+ coverage: z.ZodObject<{
3127
+ covered: z.ZodBoolean;
3128
+ reason: z.ZodOptional<z.ZodString>;
3129
+ }, z.core.$strict>;
3130
+ providerEvidence: z.ZodObject<{
3131
+ projectionDigest: z.ZodString;
3132
+ endpoint: z.ZodString;
3133
+ modelId: z.ZodString;
3134
+ asserted: z.ZodObject<{
3135
+ httpStatus: z.ZodNumber;
3136
+ usageFields: z.ZodRecord<z.ZodString, z.ZodNumber>;
3137
+ responseDigest: z.ZodString;
3138
+ }, z.core.$strict>;
3139
+ }, z.core.$strict>;
3140
+ target: z.ZodObject<{
3141
+ endpoint: z.ZodString;
3142
+ modelId: z.ZodString;
3143
+ }, z.core.$strict>;
3144
+ calledAt: z.ZodISODateTime;
3145
+ completedAt: z.ZodISODateTime;
3146
+ }, z.core.$strict>>;
3147
+ ready: z.ZodBoolean;
3148
+ readinessReasons: z.ZodArray<z.ZodEnum<{
3149
+ accounting_policy_inapplicable: "accounting_policy_inapplicable";
3150
+ accounting_policy_missing: "accounting_policy_missing";
3151
+ artifact_expired: "artifact_expired";
3152
+ cancelled: "cancelled";
3153
+ counter_authority_not_production: "counter_authority_not_production";
3154
+ counter_coverage_incomplete: "counter_coverage_incomplete";
3155
+ counter_interrupted: "counter_interrupted";
3156
+ executor_identity_unproven: "executor_identity_unproven";
3157
+ failed: "failed";
3158
+ not_prepared: "not_prepared";
3159
+ projection_unknown: "projection_unknown";
3160
+ request_content_not_text: "request_content_not_text";
3161
+ residual_not_ruled: "residual_not_ruled";
3162
+ runtime_contract_superseded: "runtime_contract_superseded";
3163
+ }>>;
3164
+ detail: z.ZodOptional<z.ZodString>;
3165
+ artifactExpiresAt: z.ZodISODateTime;
3166
+ }, z.core.$strict>>;
3167
+ reason: z.ZodOptional<z.ZodEnum<{
3168
+ authority_unavailable: "authority_unavailable";
3169
+ bad_request: "bad_request";
3170
+ cancelled: "cancelled";
3171
+ context_hash_mismatch: "context_hash_mismatch";
3172
+ context_unresolvable: "context_unresolvable";
3173
+ counter_interrupted: "counter_interrupted";
3174
+ counter_unavailable: "counter_unavailable";
3175
+ deadline_elapsed: "deadline_elapsed";
3176
+ durable_write_failed: "durable_write_failed";
3177
+ input_preparation_record_log_unsupported: "input_preparation_record_log_unsupported";
3178
+ input_preparation_unconfigured: "input_preparation_unconfigured";
3179
+ launch_boundary_unavailable: "launch_boundary_unavailable";
3180
+ limit_exceeded: "limit_exceeded";
3181
+ not_found: "not_found";
3182
+ observation_drift: "observation_drift";
3183
+ permission_mode_denied: "permission_mode_denied";
3184
+ policy_revision_mismatch: "policy_revision_mismatch";
3185
+ request_conflict: "request_conflict";
3186
+ rpc_frame_too_large: "rpc_frame_too_large";
3187
+ runtime_identity_unavailable: "runtime_identity_unavailable";
3188
+ scope_denied: "scope_denied";
3189
+ toolsets_unobservable: "toolsets_unobservable";
3190
+ unsupported_input: "unsupported_input";
3191
+ }>>;
3192
+ completedAt: z.ZodOptional<z.ZodISODateTime>;
3193
+ }, z.core.$strict>;
3194
+ export type InputPreparationReadback = z.infer<typeof InputPreparationReadbackSchema>;
3195
+ /**
3196
+ * Query identity for the status GET. The request key is
3197
+ * `(deviceId, agentRef, requestId)`; `deviceId` comes from bearer auth, the
3198
+ * path carries `requestId`, so only the AgentRef halves travel as query
3199
+ * parameters.
3200
+ */
3201
+ export declare const InputPreparationStatusQuerySchema: z.ZodObject<{
3202
+ agentId: z.ZodString;
3203
+ profileRevision: z.ZodString;
3204
+ }, z.core.$strict>;
3205
+ export type InputPreparationStatusQuery = z.infer<typeof InputPreparationStatusQuerySchema>;
2411
3206
  export declare const AgentMemoryProjectionCommitRequestSchema: z.ZodObject<{
2412
3207
  taskId: z.ZodString;
2413
3208
  agentRef: z.ZodObject<{
@@ -2480,6 +3275,12 @@ export declare const BYOK_MESSAGES_PATH = "/byok/messages";
2480
3275
  export declare const BYOK_AGENT_HOME_PROJECTIONS_PATH = "/byok/agent-home-projections";
2481
3276
  export declare const BYOK_AGENT_HOME_PROJECTION_COMPLETION_ROUTE = "/byok/agent-home-projections/:requestId/completion";
2482
3277
  export declare function byokAgentHomeProjectionCompletionPath(requestId: string): string;
3278
+ /** `PUT /byok/input-preparations/:requestId/completion` and `GET /byok/input-preparations/:requestId`. */
3279
+ export declare const BYOK_INPUT_PREPARATIONS_PATH = "/byok/input-preparations";
3280
+ export declare const BYOK_INPUT_PREPARATION_COMPLETION_ROUTE = "/byok/input-preparations/:requestId/completion";
3281
+ export declare const BYOK_INPUT_PREPARATION_STATUS_ROUTE = "/byok/input-preparations/:requestId";
3282
+ export declare function byokInputPreparationCompletionPath(requestId: string): string;
3283
+ export declare function byokInputPreparationStatusPath(requestId: string): string;
2483
3284
  /** `POST /byok/agent-memory-projections` — optional local-to-hosted redacted snapshot commit. */
2484
3285
  export declare const BYOK_AGENT_MEMORY_PROJECTIONS_PATH = "/byok/agent-memory-projections";
2485
3286
  /** `PUT /byok/presence` — presence heartbeat. */