@opencode-ai/ai 0.0.0-next-16255 → 0.0.0-next-16274

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.
Files changed (42) hide show
  1. package/dist/llm.d.ts +60 -60
  2. package/dist/protocols/anthropic-messages.d.ts +303 -303
  3. package/dist/protocols/anthropic-messages.js +1 -0
  4. package/dist/protocols/bedrock-converse.d.ts +246 -242
  5. package/dist/protocols/gemini.d.ts +136 -132
  6. package/dist/protocols/gemini.js +1 -0
  7. package/dist/protocols/open-responses.d.ts +232 -232
  8. package/dist/protocols/openai-chat.d.ts +147 -141
  9. package/dist/protocols/openai-chat.js +1 -0
  10. package/dist/protocols/openai-compatible-chat.d.ts +48 -46
  11. package/dist/protocols/openai-compatible-responses.d.ts +56 -56
  12. package/dist/protocols/openai-responses.d.ts +388 -388
  13. package/dist/protocols/shared.d.ts +5 -4
  14. package/dist/protocols/shared.js +1 -0
  15. package/dist/protocols/utils/bedrock-media.d.ts +10 -10
  16. package/dist/protocols/utils/tool-stream.d.ts +180 -180
  17. package/dist/providers/amazon-bedrock.d.ts +109 -107
  18. package/dist/providers/anthropic-compatible.d.ts +145 -145
  19. package/dist/providers/anthropic.d.ts +145 -145
  20. package/dist/providers/azure.d.ts +112 -110
  21. package/dist/providers/cloudflare.d.ts +144 -138
  22. package/dist/providers/github-copilot.d.ts +112 -110
  23. package/dist/providers/google-vertex-chat.d.ts +48 -46
  24. package/dist/providers/google-vertex-messages.d.ts +145 -146
  25. package/dist/providers/google-vertex-responses.d.ts +56 -56
  26. package/dist/providers/google-vertex.d.ts +52 -50
  27. package/dist/providers/google.d.ts +52 -50
  28. package/dist/providers/openai-compatible-responses.d.ts +56 -56
  29. package/dist/providers/openai-compatible.d.ts +48 -46
  30. package/dist/providers/openai.d.ts +176 -174
  31. package/dist/providers/openrouter.d.ts +147 -141
  32. package/dist/providers/xai.d.ts +112 -110
  33. package/dist/route/client.d.ts +60 -60
  34. package/dist/schema/errors.d.ts +2 -6
  35. package/dist/schema/errors.js +2 -5
  36. package/dist/schema/events.d.ts +1117 -1115
  37. package/dist/schema/messages.d.ts +9 -9
  38. package/dist/schema/messages.js +3 -4
  39. package/dist/tool-runtime.js +1 -1
  40. package/dist/tool.d.ts +5 -4
  41. package/dist/tool.js +1 -0
  42. package/package.json +5 -5
@@ -171,7 +171,7 @@ export declare const ToolResult: Schema.Struct<{
171
171
  readonly type: Schema.Literal<"file">;
172
172
  readonly uri: Schema.String;
173
173
  readonly mime: Schema.String;
174
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
174
+ readonly name: Schema.optional<Schema.String>;
175
175
  }>]>>;
176
176
  }>]> & {
177
177
  is: (value: unknown) => value is ToolResultValue;
@@ -186,10 +186,10 @@ export declare const ToolResult: Schema.Struct<{
186
186
  readonly type: Schema.Literal<"file">;
187
187
  readonly uri: Schema.String;
188
188
  readonly mime: Schema.String;
189
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
189
+ readonly name: Schema.optional<Schema.String>;
190
190
  }>]>>;
191
191
  }> & {
192
- make: (structured: unknown, content?: ReadonlyArray<import("@opencode-ai/schema/llm").ToolContent>) => ToolOutput;
192
+ make: (structured: unknown, content?: ReadonlyArray<import("@opencode-ai/schema/tool").Content>) => ToolOutput;
193
193
  fromResultValue: (result: ToolResultValue) => ToolOutput | undefined;
194
194
  toResultValue: (output: ToolOutput) => ToolResultValue;
195
195
  }>;
@@ -318,7 +318,7 @@ declare const llmEventTagged: Schema.toTaggedUnion<"type", readonly [Schema.Stru
318
318
  readonly type: Schema.Literal<"file">;
319
319
  readonly uri: Schema.String;
320
320
  readonly mime: Schema.String;
321
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
321
+ readonly name: Schema.optional<Schema.String>;
322
322
  }>]>>;
323
323
  }>]> & {
324
324
  is: (value: unknown) => value is ToolResultValue;
@@ -333,10 +333,10 @@ declare const llmEventTagged: Schema.toTaggedUnion<"type", readonly [Schema.Stru
333
333
  readonly type: Schema.Literal<"file">;
334
334
  readonly uri: Schema.String;
335
335
  readonly mime: Schema.String;
336
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
336
+ readonly name: Schema.optional<Schema.String>;
337
337
  }>]>>;
338
338
  }> & {
339
- make: (structured: unknown, content?: ReadonlyArray<import("@opencode-ai/schema/llm").ToolContent>) => ToolOutput;
339
+ make: (structured: unknown, content?: ReadonlyArray<import("@opencode-ai/schema/tool").Content>) => ToolOutput;
340
340
  fromResultValue: (result: ToolResultValue) => ToolOutput | undefined;
341
341
  toResultValue: (output: ToolOutput) => ToolResultValue;
342
342
  }>;
@@ -466,7 +466,7 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
466
466
  readonly type: Schema.Literal<"file">;
467
467
  readonly uri: Schema.String;
468
468
  readonly mime: Schema.String;
469
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
469
+ readonly name: Schema.optional<Schema.String>;
470
470
  }>]>>;
471
471
  }>]> & {
472
472
  is: (value: unknown) => value is ToolResultValue;
@@ -481,10 +481,10 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
481
481
  readonly type: Schema.Literal<"file">;
482
482
  readonly uri: Schema.String;
483
483
  readonly mime: Schema.String;
484
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
484
+ readonly name: Schema.optional<Schema.String>;
485
485
  }>]>>;
486
486
  }> & {
487
- make: (structured: unknown, content?: ReadonlyArray<import("@opencode-ai/schema/llm").ToolContent>) => ToolOutput;
487
+ make: (structured: unknown, content?: ReadonlyArray<import("@opencode-ai/schema/tool").Content>) => ToolOutput;
488
488
  fromResultValue: (result: ToolResultValue) => ToolOutput | undefined;
489
489
  toResultValue: (output: ToolOutput) => ToolResultValue;
490
490
  }>;
@@ -520,6 +520,7 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
520
520
  readonly classification: Schema.optional<Schema.Literal<"context-overflow">>;
521
521
  readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
522
522
  }>]> & {
523
+ readonly discriminants: readonly ["step-start", "text-start", "text-delta", "text-end", "reasoning-start", "reasoning-delta", "reasoning-end", "tool-input-start", "tool-input-delta", "tool-input-end", "tool-input-error", "tool-call", "tool-result", "tool-error", "step-finish", "finish", "provider-error"];
523
524
  readonly cases: {
524
525
  "step-start": Schema.Struct<{
525
526
  readonly type: Schema.tag<"step-start">;
@@ -612,7 +613,7 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
612
613
  readonly type: Schema.Literal<"file">;
613
614
  readonly uri: Schema.String;
614
615
  readonly mime: Schema.String;
615
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
616
+ readonly name: Schema.optional<Schema.String>;
616
617
  }>]>>;
617
618
  }>]> & {
618
619
  is: (value: unknown) => value is ToolResultValue;
@@ -627,10 +628,10 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
627
628
  readonly type: Schema.Literal<"file">;
628
629
  readonly uri: Schema.String;
629
630
  readonly mime: Schema.String;
630
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
631
+ readonly name: Schema.optional<Schema.String>;
631
632
  }>]>>;
632
633
  }> & {
633
- make: (structured: unknown, content?: ReadonlyArray<import("@opencode-ai/schema/llm").ToolContent>) => ToolOutput;
634
+ make: (structured: unknown, content?: ReadonlyArray<import("@opencode-ai/schema/tool").Content>) => ToolOutput;
634
635
  fromResultValue: (result: ToolResultValue) => ToolOutput | undefined;
635
636
  toResultValue: (output: ToolOutput) => ToolResultValue;
636
637
  }>;
@@ -671,92 +672,92 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
671
672
  readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
672
673
  }>;
673
674
  };
674
- readonly isAnyOf: <const Keys>(keys: readonly Keys[]) => (value: Schema.Struct.ReadonlySide<{
675
- readonly type: Schema.tag<"step-start">;
676
- readonly index: Schema.Number;
677
- }, "Type"> | {
678
- readonly type: "text-start";
675
+ readonly isAnyOf: <const Keys>(keys: readonly Keys[]) => (value: {
676
+ readonly type: "step-start";
677
+ readonly index: number;
678
+ } | {
679
679
  readonly id: string;
680
+ readonly type: "text-start";
680
681
  readonly providerMetadata?: {
681
682
  readonly [x: string]: {
682
683
  readonly [x: string]: unknown;
683
684
  };
684
685
  } | undefined;
685
686
  } | {
687
+ readonly id: string;
686
688
  readonly type: "text-delta";
687
689
  readonly text: string;
688
- readonly id: string;
689
690
  readonly providerMetadata?: {
690
691
  readonly [x: string]: {
691
692
  readonly [x: string]: unknown;
692
693
  };
693
694
  } | undefined;
694
695
  } | {
695
- readonly type: "text-end";
696
696
  readonly id: string;
697
+ readonly type: "text-end";
697
698
  readonly providerMetadata?: {
698
699
  readonly [x: string]: {
699
700
  readonly [x: string]: unknown;
700
701
  };
701
702
  } | undefined;
702
703
  } | {
703
- readonly type: "reasoning-start";
704
704
  readonly id: string;
705
+ readonly type: "reasoning-start";
705
706
  readonly providerMetadata?: {
706
707
  readonly [x: string]: {
707
708
  readonly [x: string]: unknown;
708
709
  };
709
710
  } | undefined;
710
711
  } | {
712
+ readonly id: string;
711
713
  readonly type: "reasoning-delta";
712
714
  readonly text: string;
713
- readonly id: string;
714
715
  readonly providerMetadata?: {
715
716
  readonly [x: string]: {
716
717
  readonly [x: string]: unknown;
717
718
  };
718
719
  } | undefined;
719
720
  } | {
720
- readonly type: "reasoning-end";
721
721
  readonly id: string;
722
+ readonly type: "reasoning-end";
722
723
  readonly providerMetadata?: {
723
724
  readonly [x: string]: {
724
725
  readonly [x: string]: unknown;
725
726
  };
726
727
  } | undefined;
727
728
  } | {
729
+ readonly id: string;
728
730
  readonly type: "tool-input-start";
729
731
  readonly name: string;
730
- readonly id: string;
731
732
  readonly providerMetadata?: {
732
733
  readonly [x: string]: {
733
734
  readonly [x: string]: unknown;
734
735
  };
735
736
  } | undefined;
736
737
  readonly providerExecuted?: boolean | undefined;
737
- } | Schema.Struct.ReadonlySide<{
738
- readonly type: Schema.tag<"tool-input-delta">;
739
- readonly id: Schema.String;
740
- readonly name: Schema.String;
741
- readonly text: Schema.String;
742
- }, "Type"> | {
743
- readonly type: "tool-input-end";
738
+ } | {
739
+ readonly type: "tool-input-delta";
740
+ readonly id: string;
744
741
  readonly name: string;
742
+ readonly text: string;
743
+ } | {
745
744
  readonly id: string;
745
+ readonly type: "tool-input-end";
746
+ readonly name: string;
746
747
  readonly providerMetadata?: {
747
748
  readonly [x: string]: {
748
749
  readonly [x: string]: unknown;
749
750
  };
750
751
  } | undefined;
751
- } | Schema.Struct.ReadonlySide<{
752
- readonly type: Schema.tag<"tool-input-error">;
753
- readonly id: Schema.String;
754
- readonly name: Schema.String;
755
- readonly raw: Schema.String;
756
- }, "Type"> | {
757
- readonly type: "tool-call";
752
+ } | {
753
+ readonly type: "tool-input-error";
754
+ readonly id: string;
758
755
  readonly name: string;
756
+ readonly raw: string;
757
+ } | {
759
758
  readonly id: string;
759
+ readonly type: "tool-call";
760
+ readonly name: string;
760
761
  readonly input: unknown;
761
762
  readonly providerMetadata?: {
762
763
  readonly [x: string]: {
@@ -765,52 +766,52 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
765
766
  } | undefined;
766
767
  readonly providerExecuted?: boolean | undefined;
767
768
  } | {
769
+ readonly id: string;
768
770
  readonly type: "tool-result";
769
771
  readonly name: string;
770
- readonly id: string;
771
- readonly result: Schema.Struct.ReadonlySide<{
772
- readonly type: Schema.Literal<"json">;
773
- readonly value: Schema.Unknown;
774
- }, "Type"> | Schema.Struct.ReadonlySide<{
775
- readonly type: Schema.Literal<"text">;
776
- readonly value: Schema.Unknown;
777
- }, "Type"> | Schema.Struct.ReadonlySide<{
778
- readonly type: Schema.Literal<"error">;
779
- readonly value: Schema.Unknown;
780
- }, "Type"> | Schema.Struct.ReadonlySide<{
781
- readonly type: Schema.Literal<"content">;
782
- readonly value: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
783
- readonly type: Schema.Literal<"text">;
784
- readonly text: Schema.String;
785
- }>, Schema.Struct<{
786
- readonly type: Schema.Literal<"file">;
787
- readonly uri: Schema.String;
788
- readonly mime: Schema.String;
789
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
790
- }>]>>;
791
- }, "Type">;
772
+ readonly result: {
773
+ readonly type: "json";
774
+ readonly value: unknown;
775
+ } | {
776
+ readonly type: "text";
777
+ readonly value: unknown;
778
+ } | {
779
+ readonly type: "error";
780
+ readonly value: unknown;
781
+ } | {
782
+ readonly type: "content";
783
+ readonly value: readonly ({
784
+ readonly type: "text";
785
+ readonly text: string;
786
+ } | {
787
+ readonly type: "file";
788
+ readonly uri: string;
789
+ readonly mime: string;
790
+ readonly name?: string | undefined;
791
+ })[];
792
+ };
793
+ readonly output?: {
794
+ readonly structured: unknown;
795
+ readonly content: readonly ({
796
+ readonly type: "text";
797
+ readonly text: string;
798
+ } | {
799
+ readonly type: "file";
800
+ readonly uri: string;
801
+ readonly mime: string;
802
+ readonly name?: string | undefined;
803
+ })[];
804
+ } | undefined;
792
805
  readonly providerMetadata?: {
793
806
  readonly [x: string]: {
794
807
  readonly [x: string]: unknown;
795
808
  };
796
809
  } | undefined;
797
810
  readonly providerExecuted?: boolean | undefined;
798
- readonly output?: Schema.Struct.ReadonlySide<{
799
- readonly structured: Schema.Unknown;
800
- readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
801
- readonly type: Schema.Literal<"text">;
802
- readonly text: Schema.String;
803
- }>, Schema.Struct<{
804
- readonly type: Schema.Literal<"file">;
805
- readonly uri: Schema.String;
806
- readonly mime: Schema.String;
807
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
808
- }>]>>;
809
- }, "Type"> | undefined;
810
811
  } | {
812
+ readonly id: string;
811
813
  readonly type: "tool-error";
812
814
  readonly name: string;
813
- readonly id: string;
814
815
  readonly message: string;
815
816
  readonly error?: unknown;
816
817
  readonly providerMetadata?: {
@@ -852,14 +853,14 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
852
853
  };
853
854
  } | undefined;
854
855
  readonly classification?: "context-overflow" | undefined;
855
- }) => value is Extract<Schema.Struct.ReadonlySide<{
856
- readonly type: Schema.tag<"step-start">;
857
- readonly index: Schema.Number;
858
- }, "Type">, {
856
+ }) => value is Extract<{
857
+ readonly type: "step-start";
858
+ readonly index: number;
859
+ }, {
859
860
  readonly type: Keys;
860
861
  }> | Extract<{
861
- readonly type: "text-start";
862
862
  readonly id: string;
863
+ readonly type: "text-start";
863
864
  readonly providerMetadata?: {
864
865
  readonly [x: string]: {
865
866
  readonly [x: string]: unknown;
@@ -868,9 +869,9 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
868
869
  }, {
869
870
  readonly type: Keys;
870
871
  }> | Extract<{
872
+ readonly id: string;
871
873
  readonly type: "text-delta";
872
874
  readonly text: string;
873
- readonly id: string;
874
875
  readonly providerMetadata?: {
875
876
  readonly [x: string]: {
876
877
  readonly [x: string]: unknown;
@@ -879,8 +880,8 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
879
880
  }, {
880
881
  readonly type: Keys;
881
882
  }> | Extract<{
882
- readonly type: "text-end";
883
883
  readonly id: string;
884
+ readonly type: "text-end";
884
885
  readonly providerMetadata?: {
885
886
  readonly [x: string]: {
886
887
  readonly [x: string]: unknown;
@@ -889,8 +890,8 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
889
890
  }, {
890
891
  readonly type: Keys;
891
892
  }> | Extract<{
892
- readonly type: "reasoning-start";
893
893
  readonly id: string;
894
+ readonly type: "reasoning-start";
894
895
  readonly providerMetadata?: {
895
896
  readonly [x: string]: {
896
897
  readonly [x: string]: unknown;
@@ -899,9 +900,9 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
899
900
  }, {
900
901
  readonly type: Keys;
901
902
  }> | Extract<{
903
+ readonly id: string;
902
904
  readonly type: "reasoning-delta";
903
905
  readonly text: string;
904
- readonly id: string;
905
906
  readonly providerMetadata?: {
906
907
  readonly [x: string]: {
907
908
  readonly [x: string]: unknown;
@@ -910,8 +911,8 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
910
911
  }, {
911
912
  readonly type: Keys;
912
913
  }> | Extract<{
913
- readonly type: "reasoning-end";
914
914
  readonly id: string;
915
+ readonly type: "reasoning-end";
915
916
  readonly providerMetadata?: {
916
917
  readonly [x: string]: {
917
918
  readonly [x: string]: unknown;
@@ -920,9 +921,9 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
920
921
  }, {
921
922
  readonly type: Keys;
922
923
  }> | Extract<{
924
+ readonly id: string;
923
925
  readonly type: "tool-input-start";
924
926
  readonly name: string;
925
- readonly id: string;
926
927
  readonly providerMetadata?: {
927
928
  readonly [x: string]: {
928
929
  readonly [x: string]: unknown;
@@ -931,17 +932,17 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
931
932
  readonly providerExecuted?: boolean | undefined;
932
933
  }, {
933
934
  readonly type: Keys;
934
- }> | Extract<Schema.Struct.ReadonlySide<{
935
- readonly type: Schema.tag<"tool-input-delta">;
936
- readonly id: Schema.String;
937
- readonly name: Schema.String;
938
- readonly text: Schema.String;
939
- }, "Type">, {
935
+ }> | Extract<{
936
+ readonly type: "tool-input-delta";
937
+ readonly id: string;
938
+ readonly name: string;
939
+ readonly text: string;
940
+ }, {
940
941
  readonly type: Keys;
941
942
  }> | Extract<{
943
+ readonly id: string;
942
944
  readonly type: "tool-input-end";
943
945
  readonly name: string;
944
- readonly id: string;
945
946
  readonly providerMetadata?: {
946
947
  readonly [x: string]: {
947
948
  readonly [x: string]: unknown;
@@ -949,17 +950,17 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
949
950
  } | undefined;
950
951
  }, {
951
952
  readonly type: Keys;
952
- }> | Extract<Schema.Struct.ReadonlySide<{
953
- readonly type: Schema.tag<"tool-input-error">;
954
- readonly id: Schema.String;
955
- readonly name: Schema.String;
956
- readonly raw: Schema.String;
957
- }, "Type">, {
953
+ }> | Extract<{
954
+ readonly type: "tool-input-error";
955
+ readonly id: string;
956
+ readonly name: string;
957
+ readonly raw: string;
958
+ }, {
958
959
  readonly type: Keys;
959
960
  }> | Extract<{
961
+ readonly id: string;
960
962
  readonly type: "tool-call";
961
963
  readonly name: string;
962
- readonly id: string;
963
964
  readonly input: unknown;
964
965
  readonly providerMetadata?: {
965
966
  readonly [x: string]: {
@@ -970,54 +971,54 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
970
971
  }, {
971
972
  readonly type: Keys;
972
973
  }> | Extract<{
974
+ readonly id: string;
973
975
  readonly type: "tool-result";
974
976
  readonly name: string;
975
- readonly id: string;
976
- readonly result: Schema.Struct.ReadonlySide<{
977
- readonly type: Schema.Literal<"json">;
978
- readonly value: Schema.Unknown;
979
- }, "Type"> | Schema.Struct.ReadonlySide<{
980
- readonly type: Schema.Literal<"text">;
981
- readonly value: Schema.Unknown;
982
- }, "Type"> | Schema.Struct.ReadonlySide<{
983
- readonly type: Schema.Literal<"error">;
984
- readonly value: Schema.Unknown;
985
- }, "Type"> | Schema.Struct.ReadonlySide<{
986
- readonly type: Schema.Literal<"content">;
987
- readonly value: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
988
- readonly type: Schema.Literal<"text">;
989
- readonly text: Schema.String;
990
- }>, Schema.Struct<{
991
- readonly type: Schema.Literal<"file">;
992
- readonly uri: Schema.String;
993
- readonly mime: Schema.String;
994
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
995
- }>]>>;
996
- }, "Type">;
977
+ readonly result: {
978
+ readonly type: "json";
979
+ readonly value: unknown;
980
+ } | {
981
+ readonly type: "text";
982
+ readonly value: unknown;
983
+ } | {
984
+ readonly type: "error";
985
+ readonly value: unknown;
986
+ } | {
987
+ readonly type: "content";
988
+ readonly value: readonly ({
989
+ readonly type: "text";
990
+ readonly text: string;
991
+ } | {
992
+ readonly type: "file";
993
+ readonly uri: string;
994
+ readonly mime: string;
995
+ readonly name?: string | undefined;
996
+ })[];
997
+ };
998
+ readonly output?: {
999
+ readonly structured: unknown;
1000
+ readonly content: readonly ({
1001
+ readonly type: "text";
1002
+ readonly text: string;
1003
+ } | {
1004
+ readonly type: "file";
1005
+ readonly uri: string;
1006
+ readonly mime: string;
1007
+ readonly name?: string | undefined;
1008
+ })[];
1009
+ } | undefined;
997
1010
  readonly providerMetadata?: {
998
1011
  readonly [x: string]: {
999
1012
  readonly [x: string]: unknown;
1000
1013
  };
1001
1014
  } | undefined;
1002
1015
  readonly providerExecuted?: boolean | undefined;
1003
- readonly output?: Schema.Struct.ReadonlySide<{
1004
- readonly structured: Schema.Unknown;
1005
- readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
1006
- readonly type: Schema.Literal<"text">;
1007
- readonly text: Schema.String;
1008
- }>, Schema.Struct<{
1009
- readonly type: Schema.Literal<"file">;
1010
- readonly uri: Schema.String;
1011
- readonly mime: Schema.String;
1012
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
1013
- }>]>>;
1014
- }, "Type"> | undefined;
1015
1016
  }, {
1016
1017
  readonly type: Keys;
1017
1018
  }> | Extract<{
1019
+ readonly id: string;
1018
1020
  readonly type: "tool-error";
1019
1021
  readonly name: string;
1020
- readonly id: string;
1021
1022
  readonly message: string;
1022
1023
  readonly error?: unknown;
1023
1024
  readonly providerMetadata?: {
@@ -1069,13 +1070,13 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1069
1070
  readonly type: Keys;
1070
1071
  }>;
1071
1072
  readonly guards: {
1072
- "step-start": (u: unknown) => u is Schema.Struct.ReadonlySide<{
1073
- readonly type: Schema.tag<"step-start">;
1074
- readonly index: Schema.Number;
1075
- }, "Type">;
1073
+ "step-start": (u: unknown) => u is {
1074
+ readonly type: "step-start";
1075
+ readonly index: number;
1076
+ };
1076
1077
  "text-start": (u: unknown) => u is {
1077
- readonly type: "text-start";
1078
1078
  readonly id: string;
1079
+ readonly type: "text-start";
1079
1080
  readonly providerMetadata?: {
1080
1081
  readonly [x: string]: {
1081
1082
  readonly [x: string]: unknown;
@@ -1083,9 +1084,9 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1083
1084
  } | undefined;
1084
1085
  };
1085
1086
  "text-delta": (u: unknown) => u is {
1087
+ readonly id: string;
1086
1088
  readonly type: "text-delta";
1087
1089
  readonly text: string;
1088
- readonly id: string;
1089
1090
  readonly providerMetadata?: {
1090
1091
  readonly [x: string]: {
1091
1092
  readonly [x: string]: unknown;
@@ -1093,8 +1094,8 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1093
1094
  } | undefined;
1094
1095
  };
1095
1096
  "text-end": (u: unknown) => u is {
1096
- readonly type: "text-end";
1097
1097
  readonly id: string;
1098
+ readonly type: "text-end";
1098
1099
  readonly providerMetadata?: {
1099
1100
  readonly [x: string]: {
1100
1101
  readonly [x: string]: unknown;
@@ -1102,8 +1103,8 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1102
1103
  } | undefined;
1103
1104
  };
1104
1105
  "reasoning-start": (u: unknown) => u is {
1105
- readonly type: "reasoning-start";
1106
1106
  readonly id: string;
1107
+ readonly type: "reasoning-start";
1107
1108
  readonly providerMetadata?: {
1108
1109
  readonly [x: string]: {
1109
1110
  readonly [x: string]: unknown;
@@ -1111,9 +1112,9 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1111
1112
  } | undefined;
1112
1113
  };
1113
1114
  "reasoning-delta": (u: unknown) => u is {
1115
+ readonly id: string;
1114
1116
  readonly type: "reasoning-delta";
1115
1117
  readonly text: string;
1116
- readonly id: string;
1117
1118
  readonly providerMetadata?: {
1118
1119
  readonly [x: string]: {
1119
1120
  readonly [x: string]: unknown;
@@ -1121,8 +1122,8 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1121
1122
  } | undefined;
1122
1123
  };
1123
1124
  "reasoning-end": (u: unknown) => u is {
1124
- readonly type: "reasoning-end";
1125
1125
  readonly id: string;
1126
+ readonly type: "reasoning-end";
1126
1127
  readonly providerMetadata?: {
1127
1128
  readonly [x: string]: {
1128
1129
  readonly [x: string]: unknown;
@@ -1130,9 +1131,9 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1130
1131
  } | undefined;
1131
1132
  };
1132
1133
  "tool-input-start": (u: unknown) => u is {
1134
+ readonly id: string;
1133
1135
  readonly type: "tool-input-start";
1134
1136
  readonly name: string;
1135
- readonly id: string;
1136
1137
  readonly providerMetadata?: {
1137
1138
  readonly [x: string]: {
1138
1139
  readonly [x: string]: unknown;
@@ -1140,32 +1141,32 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1140
1141
  } | undefined;
1141
1142
  readonly providerExecuted?: boolean | undefined;
1142
1143
  };
1143
- "tool-input-delta": (u: unknown) => u is Schema.Struct.ReadonlySide<{
1144
- readonly type: Schema.tag<"tool-input-delta">;
1145
- readonly id: Schema.String;
1146
- readonly name: Schema.String;
1147
- readonly text: Schema.String;
1148
- }, "Type">;
1144
+ "tool-input-delta": (u: unknown) => u is {
1145
+ readonly type: "tool-input-delta";
1146
+ readonly id: string;
1147
+ readonly name: string;
1148
+ readonly text: string;
1149
+ };
1149
1150
  "tool-input-end": (u: unknown) => u is {
1151
+ readonly id: string;
1150
1152
  readonly type: "tool-input-end";
1151
1153
  readonly name: string;
1152
- readonly id: string;
1153
1154
  readonly providerMetadata?: {
1154
1155
  readonly [x: string]: {
1155
1156
  readonly [x: string]: unknown;
1156
1157
  };
1157
1158
  } | undefined;
1158
1159
  };
1159
- "tool-input-error": (u: unknown) => u is Schema.Struct.ReadonlySide<{
1160
- readonly type: Schema.tag<"tool-input-error">;
1161
- readonly id: Schema.String;
1162
- readonly name: Schema.String;
1163
- readonly raw: Schema.String;
1164
- }, "Type">;
1160
+ "tool-input-error": (u: unknown) => u is {
1161
+ readonly type: "tool-input-error";
1162
+ readonly id: string;
1163
+ readonly name: string;
1164
+ readonly raw: string;
1165
+ };
1165
1166
  "tool-call": (u: unknown) => u is {
1167
+ readonly id: string;
1166
1168
  readonly type: "tool-call";
1167
1169
  readonly name: string;
1168
- readonly id: string;
1169
1170
  readonly input: unknown;
1170
1171
  readonly providerMetadata?: {
1171
1172
  readonly [x: string]: {
@@ -1175,53 +1176,53 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1175
1176
  readonly providerExecuted?: boolean | undefined;
1176
1177
  };
1177
1178
  "tool-result": (u: unknown) => u is {
1179
+ readonly id: string;
1178
1180
  readonly type: "tool-result";
1179
1181
  readonly name: string;
1180
- readonly id: string;
1181
- readonly result: Schema.Struct.ReadonlySide<{
1182
- readonly type: Schema.Literal<"json">;
1183
- readonly value: Schema.Unknown;
1184
- }, "Type"> | Schema.Struct.ReadonlySide<{
1185
- readonly type: Schema.Literal<"text">;
1186
- readonly value: Schema.Unknown;
1187
- }, "Type"> | Schema.Struct.ReadonlySide<{
1188
- readonly type: Schema.Literal<"error">;
1189
- readonly value: Schema.Unknown;
1190
- }, "Type"> | Schema.Struct.ReadonlySide<{
1191
- readonly type: Schema.Literal<"content">;
1192
- readonly value: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
1193
- readonly type: Schema.Literal<"text">;
1194
- readonly text: Schema.String;
1195
- }>, Schema.Struct<{
1196
- readonly type: Schema.Literal<"file">;
1197
- readonly uri: Schema.String;
1198
- readonly mime: Schema.String;
1199
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
1200
- }>]>>;
1201
- }, "Type">;
1182
+ readonly result: {
1183
+ readonly type: "json";
1184
+ readonly value: unknown;
1185
+ } | {
1186
+ readonly type: "text";
1187
+ readonly value: unknown;
1188
+ } | {
1189
+ readonly type: "error";
1190
+ readonly value: unknown;
1191
+ } | {
1192
+ readonly type: "content";
1193
+ readonly value: readonly ({
1194
+ readonly type: "text";
1195
+ readonly text: string;
1196
+ } | {
1197
+ readonly type: "file";
1198
+ readonly uri: string;
1199
+ readonly mime: string;
1200
+ readonly name?: string | undefined;
1201
+ })[];
1202
+ };
1203
+ readonly output?: {
1204
+ readonly structured: unknown;
1205
+ readonly content: readonly ({
1206
+ readonly type: "text";
1207
+ readonly text: string;
1208
+ } | {
1209
+ readonly type: "file";
1210
+ readonly uri: string;
1211
+ readonly mime: string;
1212
+ readonly name?: string | undefined;
1213
+ })[];
1214
+ } | undefined;
1202
1215
  readonly providerMetadata?: {
1203
1216
  readonly [x: string]: {
1204
1217
  readonly [x: string]: unknown;
1205
1218
  };
1206
1219
  } | undefined;
1207
1220
  readonly providerExecuted?: boolean | undefined;
1208
- readonly output?: Schema.Struct.ReadonlySide<{
1209
- readonly structured: Schema.Unknown;
1210
- readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
1211
- readonly type: Schema.Literal<"text">;
1212
- readonly text: Schema.String;
1213
- }>, Schema.Struct<{
1214
- readonly type: Schema.Literal<"file">;
1215
- readonly uri: Schema.String;
1216
- readonly mime: Schema.String;
1217
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
1218
- }>]>>;
1219
- }, "Type"> | undefined;
1220
1221
  };
1221
1222
  "tool-error": (u: unknown) => u is {
1223
+ readonly id: string;
1222
1224
  readonly type: "tool-error";
1223
1225
  readonly name: string;
1224
- readonly id: string;
1225
1226
  readonly message: string;
1226
1227
  readonly error?: unknown;
1227
1228
  readonly providerMetadata?: {
@@ -1270,13 +1271,13 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1270
1271
  };
1271
1272
  readonly match: {
1272
1273
  <Cases extends {
1273
- "step-start": (value: Schema.Struct.ReadonlySide<{
1274
- readonly type: Schema.tag<"step-start">;
1275
- readonly index: Schema.Number;
1276
- }, "Type">) => any;
1274
+ "step-start": (value: {
1275
+ readonly type: "step-start";
1276
+ readonly index: number;
1277
+ }) => any;
1277
1278
  "text-start": (value: {
1278
- readonly type: "text-start";
1279
1279
  readonly id: string;
1280
+ readonly type: "text-start";
1280
1281
  readonly providerMetadata?: {
1281
1282
  readonly [x: string]: {
1282
1283
  readonly [x: string]: unknown;
@@ -1284,9 +1285,9 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1284
1285
  } | undefined;
1285
1286
  }) => any;
1286
1287
  "text-delta": (value: {
1288
+ readonly id: string;
1287
1289
  readonly type: "text-delta";
1288
1290
  readonly text: string;
1289
- readonly id: string;
1290
1291
  readonly providerMetadata?: {
1291
1292
  readonly [x: string]: {
1292
1293
  readonly [x: string]: unknown;
@@ -1294,8 +1295,8 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1294
1295
  } | undefined;
1295
1296
  }) => any;
1296
1297
  "text-end": (value: {
1297
- readonly type: "text-end";
1298
1298
  readonly id: string;
1299
+ readonly type: "text-end";
1299
1300
  readonly providerMetadata?: {
1300
1301
  readonly [x: string]: {
1301
1302
  readonly [x: string]: unknown;
@@ -1303,8 +1304,8 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1303
1304
  } | undefined;
1304
1305
  }) => any;
1305
1306
  "reasoning-start": (value: {
1306
- readonly type: "reasoning-start";
1307
1307
  readonly id: string;
1308
+ readonly type: "reasoning-start";
1308
1309
  readonly providerMetadata?: {
1309
1310
  readonly [x: string]: {
1310
1311
  readonly [x: string]: unknown;
@@ -1312,9 +1313,9 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1312
1313
  } | undefined;
1313
1314
  }) => any;
1314
1315
  "reasoning-delta": (value: {
1316
+ readonly id: string;
1315
1317
  readonly type: "reasoning-delta";
1316
1318
  readonly text: string;
1317
- readonly id: string;
1318
1319
  readonly providerMetadata?: {
1319
1320
  readonly [x: string]: {
1320
1321
  readonly [x: string]: unknown;
@@ -1322,8 +1323,8 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1322
1323
  } | undefined;
1323
1324
  }) => any;
1324
1325
  "reasoning-end": (value: {
1325
- readonly type: "reasoning-end";
1326
1326
  readonly id: string;
1327
+ readonly type: "reasoning-end";
1327
1328
  readonly providerMetadata?: {
1328
1329
  readonly [x: string]: {
1329
1330
  readonly [x: string]: unknown;
@@ -1331,9 +1332,9 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1331
1332
  } | undefined;
1332
1333
  }) => any;
1333
1334
  "tool-input-start": (value: {
1335
+ readonly id: string;
1334
1336
  readonly type: "tool-input-start";
1335
1337
  readonly name: string;
1336
- readonly id: string;
1337
1338
  readonly providerMetadata?: {
1338
1339
  readonly [x: string]: {
1339
1340
  readonly [x: string]: unknown;
@@ -1341,32 +1342,32 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1341
1342
  } | undefined;
1342
1343
  readonly providerExecuted?: boolean | undefined;
1343
1344
  }) => any;
1344
- "tool-input-delta": (value: Schema.Struct.ReadonlySide<{
1345
- readonly type: Schema.tag<"tool-input-delta">;
1346
- readonly id: Schema.String;
1347
- readonly name: Schema.String;
1348
- readonly text: Schema.String;
1349
- }, "Type">) => any;
1345
+ "tool-input-delta": (value: {
1346
+ readonly type: "tool-input-delta";
1347
+ readonly id: string;
1348
+ readonly name: string;
1349
+ readonly text: string;
1350
+ }) => any;
1350
1351
  "tool-input-end": (value: {
1352
+ readonly id: string;
1351
1353
  readonly type: "tool-input-end";
1352
1354
  readonly name: string;
1353
- readonly id: string;
1354
1355
  readonly providerMetadata?: {
1355
1356
  readonly [x: string]: {
1356
1357
  readonly [x: string]: unknown;
1357
1358
  };
1358
1359
  } | undefined;
1359
1360
  }) => any;
1360
- "tool-input-error": (value: Schema.Struct.ReadonlySide<{
1361
- readonly type: Schema.tag<"tool-input-error">;
1362
- readonly id: Schema.String;
1363
- readonly name: Schema.String;
1364
- readonly raw: Schema.String;
1365
- }, "Type">) => any;
1361
+ "tool-input-error": (value: {
1362
+ readonly type: "tool-input-error";
1363
+ readonly id: string;
1364
+ readonly name: string;
1365
+ readonly raw: string;
1366
+ }) => any;
1366
1367
  "tool-call": (value: {
1368
+ readonly id: string;
1367
1369
  readonly type: "tool-call";
1368
1370
  readonly name: string;
1369
- readonly id: string;
1370
1371
  readonly input: unknown;
1371
1372
  readonly providerMetadata?: {
1372
1373
  readonly [x: string]: {
@@ -1376,53 +1377,53 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1376
1377
  readonly providerExecuted?: boolean | undefined;
1377
1378
  }) => any;
1378
1379
  "tool-result": (value: {
1380
+ readonly id: string;
1379
1381
  readonly type: "tool-result";
1380
1382
  readonly name: string;
1381
- readonly id: string;
1382
- readonly result: Schema.Struct.ReadonlySide<{
1383
- readonly type: Schema.Literal<"json">;
1384
- readonly value: Schema.Unknown;
1385
- }, "Type"> | Schema.Struct.ReadonlySide<{
1386
- readonly type: Schema.Literal<"text">;
1387
- readonly value: Schema.Unknown;
1388
- }, "Type"> | Schema.Struct.ReadonlySide<{
1389
- readonly type: Schema.Literal<"error">;
1390
- readonly value: Schema.Unknown;
1391
- }, "Type"> | Schema.Struct.ReadonlySide<{
1392
- readonly type: Schema.Literal<"content">;
1393
- readonly value: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
1394
- readonly type: Schema.Literal<"text">;
1395
- readonly text: Schema.String;
1396
- }>, Schema.Struct<{
1397
- readonly type: Schema.Literal<"file">;
1398
- readonly uri: Schema.String;
1399
- readonly mime: Schema.String;
1400
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
1401
- }>]>>;
1402
- }, "Type">;
1383
+ readonly result: {
1384
+ readonly type: "json";
1385
+ readonly value: unknown;
1386
+ } | {
1387
+ readonly type: "text";
1388
+ readonly value: unknown;
1389
+ } | {
1390
+ readonly type: "error";
1391
+ readonly value: unknown;
1392
+ } | {
1393
+ readonly type: "content";
1394
+ readonly value: readonly ({
1395
+ readonly type: "text";
1396
+ readonly text: string;
1397
+ } | {
1398
+ readonly type: "file";
1399
+ readonly uri: string;
1400
+ readonly mime: string;
1401
+ readonly name?: string | undefined;
1402
+ })[];
1403
+ };
1404
+ readonly output?: {
1405
+ readonly structured: unknown;
1406
+ readonly content: readonly ({
1407
+ readonly type: "text";
1408
+ readonly text: string;
1409
+ } | {
1410
+ readonly type: "file";
1411
+ readonly uri: string;
1412
+ readonly mime: string;
1413
+ readonly name?: string | undefined;
1414
+ })[];
1415
+ } | undefined;
1403
1416
  readonly providerMetadata?: {
1404
1417
  readonly [x: string]: {
1405
1418
  readonly [x: string]: unknown;
1406
1419
  };
1407
1420
  } | undefined;
1408
1421
  readonly providerExecuted?: boolean | undefined;
1409
- readonly output?: Schema.Struct.ReadonlySide<{
1410
- readonly structured: Schema.Unknown;
1411
- readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
1412
- readonly type: Schema.Literal<"text">;
1413
- readonly text: Schema.String;
1414
- }>, Schema.Struct<{
1415
- readonly type: Schema.Literal<"file">;
1416
- readonly uri: Schema.String;
1417
- readonly mime: Schema.String;
1418
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
1419
- }>]>>;
1420
- }, "Type"> | undefined;
1421
1422
  }) => any;
1422
1423
  "tool-error": (value: {
1424
+ readonly id: string;
1423
1425
  readonly type: "tool-error";
1424
1426
  readonly name: string;
1425
- readonly id: string;
1426
1427
  readonly message: string;
1427
1428
  readonly error?: unknown;
1428
1429
  readonly providerMetadata?: {
@@ -1468,92 +1469,92 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1468
1469
  } | undefined;
1469
1470
  readonly classification?: "context-overflow" | undefined;
1470
1471
  }) => any;
1471
- }>(value: Schema.Struct.ReadonlySide<{
1472
- readonly type: Schema.tag<"step-start">;
1473
- readonly index: Schema.Number;
1474
- }, "Type"> | {
1475
- readonly type: "text-start";
1472
+ }>(value: {
1473
+ readonly type: "step-start";
1474
+ readonly index: number;
1475
+ } | {
1476
1476
  readonly id: string;
1477
+ readonly type: "text-start";
1477
1478
  readonly providerMetadata?: {
1478
1479
  readonly [x: string]: {
1479
1480
  readonly [x: string]: unknown;
1480
1481
  };
1481
1482
  } | undefined;
1482
1483
  } | {
1484
+ readonly id: string;
1483
1485
  readonly type: "text-delta";
1484
1486
  readonly text: string;
1485
- readonly id: string;
1486
1487
  readonly providerMetadata?: {
1487
1488
  readonly [x: string]: {
1488
1489
  readonly [x: string]: unknown;
1489
1490
  };
1490
1491
  } | undefined;
1491
1492
  } | {
1492
- readonly type: "text-end";
1493
1493
  readonly id: string;
1494
+ readonly type: "text-end";
1494
1495
  readonly providerMetadata?: {
1495
1496
  readonly [x: string]: {
1496
1497
  readonly [x: string]: unknown;
1497
1498
  };
1498
1499
  } | undefined;
1499
1500
  } | {
1500
- readonly type: "reasoning-start";
1501
1501
  readonly id: string;
1502
+ readonly type: "reasoning-start";
1502
1503
  readonly providerMetadata?: {
1503
1504
  readonly [x: string]: {
1504
1505
  readonly [x: string]: unknown;
1505
1506
  };
1506
1507
  } | undefined;
1507
1508
  } | {
1509
+ readonly id: string;
1508
1510
  readonly type: "reasoning-delta";
1509
1511
  readonly text: string;
1510
- readonly id: string;
1511
1512
  readonly providerMetadata?: {
1512
1513
  readonly [x: string]: {
1513
1514
  readonly [x: string]: unknown;
1514
1515
  };
1515
1516
  } | undefined;
1516
1517
  } | {
1517
- readonly type: "reasoning-end";
1518
1518
  readonly id: string;
1519
+ readonly type: "reasoning-end";
1519
1520
  readonly providerMetadata?: {
1520
1521
  readonly [x: string]: {
1521
1522
  readonly [x: string]: unknown;
1522
1523
  };
1523
1524
  } | undefined;
1524
1525
  } | {
1526
+ readonly id: string;
1525
1527
  readonly type: "tool-input-start";
1526
1528
  readonly name: string;
1527
- readonly id: string;
1528
1529
  readonly providerMetadata?: {
1529
1530
  readonly [x: string]: {
1530
1531
  readonly [x: string]: unknown;
1531
1532
  };
1532
1533
  } | undefined;
1533
1534
  readonly providerExecuted?: boolean | undefined;
1534
- } | Schema.Struct.ReadonlySide<{
1535
- readonly type: Schema.tag<"tool-input-delta">;
1536
- readonly id: Schema.String;
1537
- readonly name: Schema.String;
1538
- readonly text: Schema.String;
1539
- }, "Type"> | {
1540
- readonly type: "tool-input-end";
1535
+ } | {
1536
+ readonly type: "tool-input-delta";
1537
+ readonly id: string;
1541
1538
  readonly name: string;
1539
+ readonly text: string;
1540
+ } | {
1542
1541
  readonly id: string;
1542
+ readonly type: "tool-input-end";
1543
+ readonly name: string;
1543
1544
  readonly providerMetadata?: {
1544
1545
  readonly [x: string]: {
1545
1546
  readonly [x: string]: unknown;
1546
1547
  };
1547
1548
  } | undefined;
1548
- } | Schema.Struct.ReadonlySide<{
1549
- readonly type: Schema.tag<"tool-input-error">;
1550
- readonly id: Schema.String;
1551
- readonly name: Schema.String;
1552
- readonly raw: Schema.String;
1553
- }, "Type"> | {
1554
- readonly type: "tool-call";
1549
+ } | {
1550
+ readonly type: "tool-input-error";
1551
+ readonly id: string;
1555
1552
  readonly name: string;
1553
+ readonly raw: string;
1554
+ } | {
1556
1555
  readonly id: string;
1556
+ readonly type: "tool-call";
1557
+ readonly name: string;
1557
1558
  readonly input: unknown;
1558
1559
  readonly providerMetadata?: {
1559
1560
  readonly [x: string]: {
@@ -1562,52 +1563,52 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1562
1563
  } | undefined;
1563
1564
  readonly providerExecuted?: boolean | undefined;
1564
1565
  } | {
1566
+ readonly id: string;
1565
1567
  readonly type: "tool-result";
1566
1568
  readonly name: string;
1567
- readonly id: string;
1568
- readonly result: Schema.Struct.ReadonlySide<{
1569
- readonly type: Schema.Literal<"json">;
1570
- readonly value: Schema.Unknown;
1571
- }, "Type"> | Schema.Struct.ReadonlySide<{
1572
- readonly type: Schema.Literal<"text">;
1573
- readonly value: Schema.Unknown;
1574
- }, "Type"> | Schema.Struct.ReadonlySide<{
1575
- readonly type: Schema.Literal<"error">;
1576
- readonly value: Schema.Unknown;
1577
- }, "Type"> | Schema.Struct.ReadonlySide<{
1578
- readonly type: Schema.Literal<"content">;
1579
- readonly value: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
1580
- readonly type: Schema.Literal<"text">;
1581
- readonly text: Schema.String;
1582
- }>, Schema.Struct<{
1583
- readonly type: Schema.Literal<"file">;
1584
- readonly uri: Schema.String;
1585
- readonly mime: Schema.String;
1586
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
1587
- }>]>>;
1588
- }, "Type">;
1569
+ readonly result: {
1570
+ readonly type: "json";
1571
+ readonly value: unknown;
1572
+ } | {
1573
+ readonly type: "text";
1574
+ readonly value: unknown;
1575
+ } | {
1576
+ readonly type: "error";
1577
+ readonly value: unknown;
1578
+ } | {
1579
+ readonly type: "content";
1580
+ readonly value: readonly ({
1581
+ readonly type: "text";
1582
+ readonly text: string;
1583
+ } | {
1584
+ readonly type: "file";
1585
+ readonly uri: string;
1586
+ readonly mime: string;
1587
+ readonly name?: string | undefined;
1588
+ })[];
1589
+ };
1590
+ readonly output?: {
1591
+ readonly structured: unknown;
1592
+ readonly content: readonly ({
1593
+ readonly type: "text";
1594
+ readonly text: string;
1595
+ } | {
1596
+ readonly type: "file";
1597
+ readonly uri: string;
1598
+ readonly mime: string;
1599
+ readonly name?: string | undefined;
1600
+ })[];
1601
+ } | undefined;
1589
1602
  readonly providerMetadata?: {
1590
1603
  readonly [x: string]: {
1591
1604
  readonly [x: string]: unknown;
1592
1605
  };
1593
1606
  } | undefined;
1594
1607
  readonly providerExecuted?: boolean | undefined;
1595
- readonly output?: Schema.Struct.ReadonlySide<{
1596
- readonly structured: Schema.Unknown;
1597
- readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
1598
- readonly type: Schema.Literal<"text">;
1599
- readonly text: Schema.String;
1600
- }>, Schema.Struct<{
1601
- readonly type: Schema.Literal<"file">;
1602
- readonly uri: Schema.String;
1603
- readonly mime: Schema.String;
1604
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
1605
- }>]>>;
1606
- }, "Type"> | undefined;
1607
1608
  } | {
1609
+ readonly id: string;
1608
1610
  readonly type: "tool-error";
1609
1611
  readonly name: string;
1610
- readonly id: string;
1611
1612
  readonly message: string;
1612
1613
  readonly error?: unknown;
1613
1614
  readonly providerMetadata?: {
@@ -1651,13 +1652,13 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1651
1652
  readonly classification?: "context-overflow" | undefined;
1652
1653
  }, cases: Cases): Cases[keyof Cases] extends (value: any) => infer R ? import("effect/Unify").Unify<R> : never;
1653
1654
  <Cases extends {
1654
- "step-start": (value: Schema.Struct.ReadonlySide<{
1655
- readonly type: Schema.tag<"step-start">;
1656
- readonly index: Schema.Number;
1657
- }, "Type">) => any;
1655
+ "step-start": (value: {
1656
+ readonly type: "step-start";
1657
+ readonly index: number;
1658
+ }) => any;
1658
1659
  "text-start": (value: {
1659
- readonly type: "text-start";
1660
1660
  readonly id: string;
1661
+ readonly type: "text-start";
1661
1662
  readonly providerMetadata?: {
1662
1663
  readonly [x: string]: {
1663
1664
  readonly [x: string]: unknown;
@@ -1665,9 +1666,9 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1665
1666
  } | undefined;
1666
1667
  }) => any;
1667
1668
  "text-delta": (value: {
1669
+ readonly id: string;
1668
1670
  readonly type: "text-delta";
1669
1671
  readonly text: string;
1670
- readonly id: string;
1671
1672
  readonly providerMetadata?: {
1672
1673
  readonly [x: string]: {
1673
1674
  readonly [x: string]: unknown;
@@ -1675,8 +1676,8 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1675
1676
  } | undefined;
1676
1677
  }) => any;
1677
1678
  "text-end": (value: {
1678
- readonly type: "text-end";
1679
1679
  readonly id: string;
1680
+ readonly type: "text-end";
1680
1681
  readonly providerMetadata?: {
1681
1682
  readonly [x: string]: {
1682
1683
  readonly [x: string]: unknown;
@@ -1684,8 +1685,8 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1684
1685
  } | undefined;
1685
1686
  }) => any;
1686
1687
  "reasoning-start": (value: {
1687
- readonly type: "reasoning-start";
1688
1688
  readonly id: string;
1689
+ readonly type: "reasoning-start";
1689
1690
  readonly providerMetadata?: {
1690
1691
  readonly [x: string]: {
1691
1692
  readonly [x: string]: unknown;
@@ -1693,9 +1694,9 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1693
1694
  } | undefined;
1694
1695
  }) => any;
1695
1696
  "reasoning-delta": (value: {
1697
+ readonly id: string;
1696
1698
  readonly type: "reasoning-delta";
1697
1699
  readonly text: string;
1698
- readonly id: string;
1699
1700
  readonly providerMetadata?: {
1700
1701
  readonly [x: string]: {
1701
1702
  readonly [x: string]: unknown;
@@ -1703,8 +1704,8 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1703
1704
  } | undefined;
1704
1705
  }) => any;
1705
1706
  "reasoning-end": (value: {
1706
- readonly type: "reasoning-end";
1707
1707
  readonly id: string;
1708
+ readonly type: "reasoning-end";
1708
1709
  readonly providerMetadata?: {
1709
1710
  readonly [x: string]: {
1710
1711
  readonly [x: string]: unknown;
@@ -1712,9 +1713,9 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1712
1713
  } | undefined;
1713
1714
  }) => any;
1714
1715
  "tool-input-start": (value: {
1716
+ readonly id: string;
1715
1717
  readonly type: "tool-input-start";
1716
1718
  readonly name: string;
1717
- readonly id: string;
1718
1719
  readonly providerMetadata?: {
1719
1720
  readonly [x: string]: {
1720
1721
  readonly [x: string]: unknown;
@@ -1722,32 +1723,32 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1722
1723
  } | undefined;
1723
1724
  readonly providerExecuted?: boolean | undefined;
1724
1725
  }) => any;
1725
- "tool-input-delta": (value: Schema.Struct.ReadonlySide<{
1726
- readonly type: Schema.tag<"tool-input-delta">;
1727
- readonly id: Schema.String;
1728
- readonly name: Schema.String;
1729
- readonly text: Schema.String;
1730
- }, "Type">) => any;
1726
+ "tool-input-delta": (value: {
1727
+ readonly type: "tool-input-delta";
1728
+ readonly id: string;
1729
+ readonly name: string;
1730
+ readonly text: string;
1731
+ }) => any;
1731
1732
  "tool-input-end": (value: {
1733
+ readonly id: string;
1732
1734
  readonly type: "tool-input-end";
1733
1735
  readonly name: string;
1734
- readonly id: string;
1735
1736
  readonly providerMetadata?: {
1736
1737
  readonly [x: string]: {
1737
1738
  readonly [x: string]: unknown;
1738
1739
  };
1739
1740
  } | undefined;
1740
1741
  }) => any;
1741
- "tool-input-error": (value: Schema.Struct.ReadonlySide<{
1742
- readonly type: Schema.tag<"tool-input-error">;
1743
- readonly id: Schema.String;
1744
- readonly name: Schema.String;
1745
- readonly raw: Schema.String;
1746
- }, "Type">) => any;
1742
+ "tool-input-error": (value: {
1743
+ readonly type: "tool-input-error";
1744
+ readonly id: string;
1745
+ readonly name: string;
1746
+ readonly raw: string;
1747
+ }) => any;
1747
1748
  "tool-call": (value: {
1749
+ readonly id: string;
1748
1750
  readonly type: "tool-call";
1749
1751
  readonly name: string;
1750
- readonly id: string;
1751
1752
  readonly input: unknown;
1752
1753
  readonly providerMetadata?: {
1753
1754
  readonly [x: string]: {
@@ -1757,53 +1758,53 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1757
1758
  readonly providerExecuted?: boolean | undefined;
1758
1759
  }) => any;
1759
1760
  "tool-result": (value: {
1761
+ readonly id: string;
1760
1762
  readonly type: "tool-result";
1761
1763
  readonly name: string;
1762
- readonly id: string;
1763
- readonly result: Schema.Struct.ReadonlySide<{
1764
- readonly type: Schema.Literal<"json">;
1765
- readonly value: Schema.Unknown;
1766
- }, "Type"> | Schema.Struct.ReadonlySide<{
1767
- readonly type: Schema.Literal<"text">;
1768
- readonly value: Schema.Unknown;
1769
- }, "Type"> | Schema.Struct.ReadonlySide<{
1770
- readonly type: Schema.Literal<"error">;
1771
- readonly value: Schema.Unknown;
1772
- }, "Type"> | Schema.Struct.ReadonlySide<{
1773
- readonly type: Schema.Literal<"content">;
1774
- readonly value: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
1775
- readonly type: Schema.Literal<"text">;
1776
- readonly text: Schema.String;
1777
- }>, Schema.Struct<{
1778
- readonly type: Schema.Literal<"file">;
1779
- readonly uri: Schema.String;
1780
- readonly mime: Schema.String;
1781
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
1782
- }>]>>;
1783
- }, "Type">;
1764
+ readonly result: {
1765
+ readonly type: "json";
1766
+ readonly value: unknown;
1767
+ } | {
1768
+ readonly type: "text";
1769
+ readonly value: unknown;
1770
+ } | {
1771
+ readonly type: "error";
1772
+ readonly value: unknown;
1773
+ } | {
1774
+ readonly type: "content";
1775
+ readonly value: readonly ({
1776
+ readonly type: "text";
1777
+ readonly text: string;
1778
+ } | {
1779
+ readonly type: "file";
1780
+ readonly uri: string;
1781
+ readonly mime: string;
1782
+ readonly name?: string | undefined;
1783
+ })[];
1784
+ };
1785
+ readonly output?: {
1786
+ readonly structured: unknown;
1787
+ readonly content: readonly ({
1788
+ readonly type: "text";
1789
+ readonly text: string;
1790
+ } | {
1791
+ readonly type: "file";
1792
+ readonly uri: string;
1793
+ readonly mime: string;
1794
+ readonly name?: string | undefined;
1795
+ })[];
1796
+ } | undefined;
1784
1797
  readonly providerMetadata?: {
1785
1798
  readonly [x: string]: {
1786
1799
  readonly [x: string]: unknown;
1787
1800
  };
1788
1801
  } | undefined;
1789
1802
  readonly providerExecuted?: boolean | undefined;
1790
- readonly output?: Schema.Struct.ReadonlySide<{
1791
- readonly structured: Schema.Unknown;
1792
- readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
1793
- readonly type: Schema.Literal<"text">;
1794
- readonly text: Schema.String;
1795
- }>, Schema.Struct<{
1796
- readonly type: Schema.Literal<"file">;
1797
- readonly uri: Schema.String;
1798
- readonly mime: Schema.String;
1799
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
1800
- }>]>>;
1801
- }, "Type"> | undefined;
1802
1803
  }) => any;
1803
1804
  "tool-error": (value: {
1805
+ readonly id: string;
1804
1806
  readonly type: "tool-error";
1805
1807
  readonly name: string;
1806
- readonly id: string;
1807
1808
  readonly message: string;
1808
1809
  readonly error?: unknown;
1809
1810
  readonly providerMetadata?: {
@@ -1849,146 +1850,146 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1849
1850
  } | undefined;
1850
1851
  readonly classification?: "context-overflow" | undefined;
1851
1852
  }) => any;
1852
- }>(cases: Cases): (value: Schema.Struct.ReadonlySide<{
1853
- readonly type: Schema.tag<"step-start">;
1854
- readonly index: Schema.Number;
1855
- }, "Type"> | {
1856
- readonly type: "text-start";
1853
+ }>(cases: Cases): (value: {
1854
+ readonly type: "step-start";
1855
+ readonly index: number;
1856
+ } | {
1857
1857
  readonly id: string;
1858
+ readonly type: "text-start";
1858
1859
  readonly providerMetadata?: {
1859
1860
  readonly [x: string]: {
1860
1861
  readonly [x: string]: unknown;
1861
1862
  };
1862
1863
  } | undefined;
1863
1864
  } | {
1865
+ readonly id: string;
1864
1866
  readonly type: "text-delta";
1865
1867
  readonly text: string;
1866
- readonly id: string;
1867
1868
  readonly providerMetadata?: {
1868
1869
  readonly [x: string]: {
1869
1870
  readonly [x: string]: unknown;
1870
1871
  };
1871
1872
  } | undefined;
1872
1873
  } | {
1873
- readonly type: "text-end";
1874
1874
  readonly id: string;
1875
+ readonly type: "text-end";
1875
1876
  readonly providerMetadata?: {
1876
1877
  readonly [x: string]: {
1877
1878
  readonly [x: string]: unknown;
1878
1879
  };
1879
1880
  } | undefined;
1880
1881
  } | {
1881
- readonly type: "reasoning-start";
1882
1882
  readonly id: string;
1883
+ readonly type: "reasoning-start";
1883
1884
  readonly providerMetadata?: {
1884
1885
  readonly [x: string]: {
1885
1886
  readonly [x: string]: unknown;
1886
1887
  };
1887
1888
  } | undefined;
1888
1889
  } | {
1890
+ readonly id: string;
1889
1891
  readonly type: "reasoning-delta";
1890
1892
  readonly text: string;
1891
- readonly id: string;
1892
1893
  readonly providerMetadata?: {
1893
1894
  readonly [x: string]: {
1894
1895
  readonly [x: string]: unknown;
1895
1896
  };
1896
1897
  } | undefined;
1897
1898
  } | {
1898
- readonly type: "reasoning-end";
1899
1899
  readonly id: string;
1900
+ readonly type: "reasoning-end";
1900
1901
  readonly providerMetadata?: {
1901
1902
  readonly [x: string]: {
1902
1903
  readonly [x: string]: unknown;
1903
1904
  };
1904
1905
  } | undefined;
1905
1906
  } | {
1907
+ readonly id: string;
1906
1908
  readonly type: "tool-input-start";
1907
1909
  readonly name: string;
1908
- readonly id: string;
1909
1910
  readonly providerMetadata?: {
1910
1911
  readonly [x: string]: {
1911
1912
  readonly [x: string]: unknown;
1912
1913
  };
1913
1914
  } | undefined;
1914
1915
  readonly providerExecuted?: boolean | undefined;
1915
- } | Schema.Struct.ReadonlySide<{
1916
- readonly type: Schema.tag<"tool-input-delta">;
1917
- readonly id: Schema.String;
1918
- readonly name: Schema.String;
1919
- readonly text: Schema.String;
1920
- }, "Type"> | {
1921
- readonly type: "tool-input-end";
1916
+ } | {
1917
+ readonly type: "tool-input-delta";
1918
+ readonly id: string;
1922
1919
  readonly name: string;
1920
+ readonly text: string;
1921
+ } | {
1923
1922
  readonly id: string;
1923
+ readonly type: "tool-input-end";
1924
+ readonly name: string;
1924
1925
  readonly providerMetadata?: {
1925
1926
  readonly [x: string]: {
1926
1927
  readonly [x: string]: unknown;
1927
1928
  };
1928
1929
  } | undefined;
1929
- } | Schema.Struct.ReadonlySide<{
1930
- readonly type: Schema.tag<"tool-input-error">;
1931
- readonly id: Schema.String;
1932
- readonly name: Schema.String;
1933
- readonly raw: Schema.String;
1934
- }, "Type"> | {
1935
- readonly type: "tool-call";
1930
+ } | {
1931
+ readonly type: "tool-input-error";
1932
+ readonly id: string;
1936
1933
  readonly name: string;
1934
+ readonly raw: string;
1935
+ } | {
1937
1936
  readonly id: string;
1937
+ readonly type: "tool-call";
1938
+ readonly name: string;
1938
1939
  readonly input: unknown;
1939
1940
  readonly providerMetadata?: {
1940
1941
  readonly [x: string]: {
1941
1942
  readonly [x: string]: unknown;
1942
1943
  };
1943
1944
  } | undefined;
1944
- readonly providerExecuted?: boolean | undefined;
1945
- } | {
1946
- readonly type: "tool-result";
1947
- readonly name: string;
1948
- readonly id: string;
1949
- readonly result: Schema.Struct.ReadonlySide<{
1950
- readonly type: Schema.Literal<"json">;
1951
- readonly value: Schema.Unknown;
1952
- }, "Type"> | Schema.Struct.ReadonlySide<{
1953
- readonly type: Schema.Literal<"text">;
1954
- readonly value: Schema.Unknown;
1955
- }, "Type"> | Schema.Struct.ReadonlySide<{
1956
- readonly type: Schema.Literal<"error">;
1957
- readonly value: Schema.Unknown;
1958
- }, "Type"> | Schema.Struct.ReadonlySide<{
1959
- readonly type: Schema.Literal<"content">;
1960
- readonly value: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
1961
- readonly type: Schema.Literal<"text">;
1962
- readonly text: Schema.String;
1963
- }>, Schema.Struct<{
1964
- readonly type: Schema.Literal<"file">;
1965
- readonly uri: Schema.String;
1966
- readonly mime: Schema.String;
1967
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
1968
- }>]>>;
1969
- }, "Type">;
1945
+ readonly providerExecuted?: boolean | undefined;
1946
+ } | {
1947
+ readonly id: string;
1948
+ readonly type: "tool-result";
1949
+ readonly name: string;
1950
+ readonly result: {
1951
+ readonly type: "json";
1952
+ readonly value: unknown;
1953
+ } | {
1954
+ readonly type: "text";
1955
+ readonly value: unknown;
1956
+ } | {
1957
+ readonly type: "error";
1958
+ readonly value: unknown;
1959
+ } | {
1960
+ readonly type: "content";
1961
+ readonly value: readonly ({
1962
+ readonly type: "text";
1963
+ readonly text: string;
1964
+ } | {
1965
+ readonly type: "file";
1966
+ readonly uri: string;
1967
+ readonly mime: string;
1968
+ readonly name?: string | undefined;
1969
+ })[];
1970
+ };
1971
+ readonly output?: {
1972
+ readonly structured: unknown;
1973
+ readonly content: readonly ({
1974
+ readonly type: "text";
1975
+ readonly text: string;
1976
+ } | {
1977
+ readonly type: "file";
1978
+ readonly uri: string;
1979
+ readonly mime: string;
1980
+ readonly name?: string | undefined;
1981
+ })[];
1982
+ } | undefined;
1970
1983
  readonly providerMetadata?: {
1971
1984
  readonly [x: string]: {
1972
1985
  readonly [x: string]: unknown;
1973
1986
  };
1974
1987
  } | undefined;
1975
1988
  readonly providerExecuted?: boolean | undefined;
1976
- readonly output?: Schema.Struct.ReadonlySide<{
1977
- readonly structured: Schema.Unknown;
1978
- readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
1979
- readonly type: Schema.Literal<"text">;
1980
- readonly text: Schema.String;
1981
- }>, Schema.Struct<{
1982
- readonly type: Schema.Literal<"file">;
1983
- readonly uri: Schema.String;
1984
- readonly mime: Schema.String;
1985
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
1986
- }>]>>;
1987
- }, "Type"> | undefined;
1988
1989
  } | {
1990
+ readonly id: string;
1989
1991
  readonly type: "tool-error";
1990
1992
  readonly name: string;
1991
- readonly id: string;
1992
1993
  readonly message: string;
1993
1994
  readonly error?: unknown;
1994
1995
  readonly providerMetadata?: {
@@ -2036,13 +2037,13 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
2036
2037
  stepStart: (input: {
2037
2038
  readonly index: number;
2038
2039
  readonly type?: "step-start" | undefined;
2039
- }, options?: Schema.MakeOptions) => Schema.Struct.ReadonlySide<{
2040
- readonly type: Schema.tag<"step-start">;
2041
- readonly index: Schema.Number;
2042
- }, "Type">;
2040
+ }, options?: Schema.MakeOptions) => {
2041
+ readonly type: "step-start";
2042
+ readonly index: number;
2043
+ };
2043
2044
  textStart: (input: WithID<TextStart, ContentBlockID>) => {
2044
- readonly type: "text-start";
2045
2045
  readonly id: string;
2046
+ readonly type: "text-start";
2046
2047
  readonly providerMetadata?: {
2047
2048
  readonly [x: string]: {
2048
2049
  readonly [x: string]: unknown;
@@ -2050,9 +2051,9 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
2050
2051
  } | undefined;
2051
2052
  };
2052
2053
  textDelta: (input: WithID<TextDelta, ContentBlockID>) => {
2054
+ readonly id: string;
2053
2055
  readonly type: "text-delta";
2054
2056
  readonly text: string;
2055
- readonly id: string;
2056
2057
  readonly providerMetadata?: {
2057
2058
  readonly [x: string]: {
2058
2059
  readonly [x: string]: unknown;
@@ -2060,8 +2061,8 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
2060
2061
  } | undefined;
2061
2062
  };
2062
2063
  textEnd: (input: WithID<TextEnd, ContentBlockID>) => {
2063
- readonly type: "text-end";
2064
2064
  readonly id: string;
2065
+ readonly type: "text-end";
2065
2066
  readonly providerMetadata?: {
2066
2067
  readonly [x: string]: {
2067
2068
  readonly [x: string]: unknown;
@@ -2069,8 +2070,8 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
2069
2070
  } | undefined;
2070
2071
  };
2071
2072
  reasoningStart: (input: WithID<ReasoningStart, ContentBlockID>) => {
2072
- readonly type: "reasoning-start";
2073
2073
  readonly id: string;
2074
+ readonly type: "reasoning-start";
2074
2075
  readonly providerMetadata?: {
2075
2076
  readonly [x: string]: {
2076
2077
  readonly [x: string]: unknown;
@@ -2078,9 +2079,9 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
2078
2079
  } | undefined;
2079
2080
  };
2080
2081
  reasoningDelta: (input: WithID<ReasoningDelta, ContentBlockID>) => {
2082
+ readonly id: string;
2081
2083
  readonly type: "reasoning-delta";
2082
2084
  readonly text: string;
2083
- readonly id: string;
2084
2085
  readonly providerMetadata?: {
2085
2086
  readonly [x: string]: {
2086
2087
  readonly [x: string]: unknown;
@@ -2088,8 +2089,8 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
2088
2089
  } | undefined;
2089
2090
  };
2090
2091
  reasoningEnd: (input: WithID<ReasoningEnd, ContentBlockID>) => {
2091
- readonly type: "reasoning-end";
2092
2092
  readonly id: string;
2093
+ readonly type: "reasoning-end";
2093
2094
  readonly providerMetadata?: {
2094
2095
  readonly [x: string]: {
2095
2096
  readonly [x: string]: unknown;
@@ -2097,9 +2098,9 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
2097
2098
  } | undefined;
2098
2099
  };
2099
2100
  toolInputStart: (input: WithID<ToolInputStart, ToolCallID>) => {
2101
+ readonly id: string;
2100
2102
  readonly type: "tool-input-start";
2101
2103
  readonly name: string;
2102
- readonly id: string;
2103
2104
  readonly providerMetadata?: {
2104
2105
  readonly [x: string]: {
2105
2106
  readonly [x: string]: unknown;
@@ -2107,32 +2108,32 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
2107
2108
  } | undefined;
2108
2109
  readonly providerExecuted?: boolean | undefined;
2109
2110
  };
2110
- toolInputDelta: (input: WithID<ToolInputDelta, ToolCallID>) => Schema.Struct.ReadonlySide<{
2111
- readonly type: Schema.tag<"tool-input-delta">;
2112
- readonly id: Schema.String;
2113
- readonly name: Schema.String;
2114
- readonly text: Schema.String;
2115
- }, "Type">;
2111
+ toolInputDelta: (input: WithID<ToolInputDelta, ToolCallID>) => {
2112
+ readonly type: "tool-input-delta";
2113
+ readonly id: string;
2114
+ readonly name: string;
2115
+ readonly text: string;
2116
+ };
2116
2117
  toolInputEnd: (input: WithID<ToolInputEnd, ToolCallID>) => {
2118
+ readonly id: string;
2117
2119
  readonly type: "tool-input-end";
2118
2120
  readonly name: string;
2119
- readonly id: string;
2120
2121
  readonly providerMetadata?: {
2121
2122
  readonly [x: string]: {
2122
2123
  readonly [x: string]: unknown;
2123
2124
  };
2124
2125
  } | undefined;
2125
2126
  };
2126
- toolInputError: (input: WithID<ToolInputError, ToolCallID>) => Schema.Struct.ReadonlySide<{
2127
- readonly type: Schema.tag<"tool-input-error">;
2128
- readonly id: Schema.String;
2129
- readonly name: Schema.String;
2130
- readonly raw: Schema.String;
2131
- }, "Type">;
2127
+ toolInputError: (input: WithID<ToolInputError, ToolCallID>) => {
2128
+ readonly type: "tool-input-error";
2129
+ readonly id: string;
2130
+ readonly name: string;
2131
+ readonly raw: string;
2132
+ };
2132
2133
  toolCall: (input: WithID<ToolCall, ToolCallID>) => {
2134
+ readonly id: string;
2133
2135
  readonly type: "tool-call";
2134
2136
  readonly name: string;
2135
- readonly id: string;
2136
2137
  readonly input: unknown;
2137
2138
  readonly providerMetadata?: {
2138
2139
  readonly [x: string]: {
@@ -2142,53 +2143,53 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
2142
2143
  readonly providerExecuted?: boolean | undefined;
2143
2144
  };
2144
2145
  toolResult: (input: WithID<ToolResult, ToolCallID>) => {
2146
+ readonly id: string;
2145
2147
  readonly type: "tool-result";
2146
2148
  readonly name: string;
2147
- readonly id: string;
2148
- readonly result: Schema.Struct.ReadonlySide<{
2149
- readonly type: Schema.Literal<"json">;
2150
- readonly value: Schema.Unknown;
2151
- }, "Type"> | Schema.Struct.ReadonlySide<{
2152
- readonly type: Schema.Literal<"text">;
2153
- readonly value: Schema.Unknown;
2154
- }, "Type"> | Schema.Struct.ReadonlySide<{
2155
- readonly type: Schema.Literal<"error">;
2156
- readonly value: Schema.Unknown;
2157
- }, "Type"> | Schema.Struct.ReadonlySide<{
2158
- readonly type: Schema.Literal<"content">;
2159
- readonly value: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
2160
- readonly type: Schema.Literal<"text">;
2161
- readonly text: Schema.String;
2162
- }>, Schema.Struct<{
2163
- readonly type: Schema.Literal<"file">;
2164
- readonly uri: Schema.String;
2165
- readonly mime: Schema.String;
2166
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2167
- }>]>>;
2168
- }, "Type">;
2149
+ readonly result: {
2150
+ readonly type: "json";
2151
+ readonly value: unknown;
2152
+ } | {
2153
+ readonly type: "text";
2154
+ readonly value: unknown;
2155
+ } | {
2156
+ readonly type: "error";
2157
+ readonly value: unknown;
2158
+ } | {
2159
+ readonly type: "content";
2160
+ readonly value: readonly ({
2161
+ readonly type: "text";
2162
+ readonly text: string;
2163
+ } | {
2164
+ readonly type: "file";
2165
+ readonly uri: string;
2166
+ readonly mime: string;
2167
+ readonly name?: string | undefined;
2168
+ })[];
2169
+ };
2170
+ readonly output?: {
2171
+ readonly structured: unknown;
2172
+ readonly content: readonly ({
2173
+ readonly type: "text";
2174
+ readonly text: string;
2175
+ } | {
2176
+ readonly type: "file";
2177
+ readonly uri: string;
2178
+ readonly mime: string;
2179
+ readonly name?: string | undefined;
2180
+ })[];
2181
+ } | undefined;
2169
2182
  readonly providerMetadata?: {
2170
2183
  readonly [x: string]: {
2171
2184
  readonly [x: string]: unknown;
2172
2185
  };
2173
2186
  } | undefined;
2174
2187
  readonly providerExecuted?: boolean | undefined;
2175
- readonly output?: Schema.Struct.ReadonlySide<{
2176
- readonly structured: Schema.Unknown;
2177
- readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
2178
- readonly type: Schema.Literal<"text">;
2179
- readonly text: Schema.String;
2180
- }>, Schema.Struct<{
2181
- readonly type: Schema.Literal<"file">;
2182
- readonly uri: Schema.String;
2183
- readonly mime: Schema.String;
2184
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2185
- }>]>>;
2186
- }, "Type"> | undefined;
2187
2188
  };
2188
2189
  toolError: (input: WithID<ToolError, ToolCallID>) => {
2190
+ readonly id: string;
2189
2191
  readonly type: "tool-error";
2190
2192
  readonly name: string;
2191
- readonly id: string;
2192
2193
  readonly message: string;
2193
2194
  readonly error?: unknown;
2194
2195
  readonly providerMetadata?: {
@@ -2244,13 +2245,13 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
2244
2245
  readonly classification?: "context-overflow" | undefined;
2245
2246
  };
2246
2247
  is: {
2247
- stepStart: (u: unknown) => u is Schema.Struct.ReadonlySide<{
2248
- readonly type: Schema.tag<"step-start">;
2249
- readonly index: Schema.Number;
2250
- }, "Type">;
2248
+ stepStart: (u: unknown) => u is {
2249
+ readonly type: "step-start";
2250
+ readonly index: number;
2251
+ };
2251
2252
  textStart: (u: unknown) => u is {
2252
- readonly type: "text-start";
2253
2253
  readonly id: string;
2254
+ readonly type: "text-start";
2254
2255
  readonly providerMetadata?: {
2255
2256
  readonly [x: string]: {
2256
2257
  readonly [x: string]: unknown;
@@ -2258,9 +2259,9 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
2258
2259
  } | undefined;
2259
2260
  };
2260
2261
  textDelta: (u: unknown) => u is {
2262
+ readonly id: string;
2261
2263
  readonly type: "text-delta";
2262
2264
  readonly text: string;
2263
- readonly id: string;
2264
2265
  readonly providerMetadata?: {
2265
2266
  readonly [x: string]: {
2266
2267
  readonly [x: string]: unknown;
@@ -2268,8 +2269,8 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
2268
2269
  } | undefined;
2269
2270
  };
2270
2271
  textEnd: (u: unknown) => u is {
2271
- readonly type: "text-end";
2272
2272
  readonly id: string;
2273
+ readonly type: "text-end";
2273
2274
  readonly providerMetadata?: {
2274
2275
  readonly [x: string]: {
2275
2276
  readonly [x: string]: unknown;
@@ -2277,8 +2278,8 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
2277
2278
  } | undefined;
2278
2279
  };
2279
2280
  reasoningStart: (u: unknown) => u is {
2280
- readonly type: "reasoning-start";
2281
2281
  readonly id: string;
2282
+ readonly type: "reasoning-start";
2282
2283
  readonly providerMetadata?: {
2283
2284
  readonly [x: string]: {
2284
2285
  readonly [x: string]: unknown;
@@ -2286,9 +2287,9 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
2286
2287
  } | undefined;
2287
2288
  };
2288
2289
  reasoningDelta: (u: unknown) => u is {
2290
+ readonly id: string;
2289
2291
  readonly type: "reasoning-delta";
2290
2292
  readonly text: string;
2291
- readonly id: string;
2292
2293
  readonly providerMetadata?: {
2293
2294
  readonly [x: string]: {
2294
2295
  readonly [x: string]: unknown;
@@ -2296,8 +2297,8 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
2296
2297
  } | undefined;
2297
2298
  };
2298
2299
  reasoningEnd: (u: unknown) => u is {
2299
- readonly type: "reasoning-end";
2300
2300
  readonly id: string;
2301
+ readonly type: "reasoning-end";
2301
2302
  readonly providerMetadata?: {
2302
2303
  readonly [x: string]: {
2303
2304
  readonly [x: string]: unknown;
@@ -2305,9 +2306,9 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
2305
2306
  } | undefined;
2306
2307
  };
2307
2308
  toolInputStart: (u: unknown) => u is {
2309
+ readonly id: string;
2308
2310
  readonly type: "tool-input-start";
2309
2311
  readonly name: string;
2310
- readonly id: string;
2311
2312
  readonly providerMetadata?: {
2312
2313
  readonly [x: string]: {
2313
2314
  readonly [x: string]: unknown;
@@ -2315,32 +2316,32 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
2315
2316
  } | undefined;
2316
2317
  readonly providerExecuted?: boolean | undefined;
2317
2318
  };
2318
- toolInputDelta: (u: unknown) => u is Schema.Struct.ReadonlySide<{
2319
- readonly type: Schema.tag<"tool-input-delta">;
2320
- readonly id: Schema.String;
2321
- readonly name: Schema.String;
2322
- readonly text: Schema.String;
2323
- }, "Type">;
2319
+ toolInputDelta: (u: unknown) => u is {
2320
+ readonly type: "tool-input-delta";
2321
+ readonly id: string;
2322
+ readonly name: string;
2323
+ readonly text: string;
2324
+ };
2324
2325
  toolInputEnd: (u: unknown) => u is {
2326
+ readonly id: string;
2325
2327
  readonly type: "tool-input-end";
2326
2328
  readonly name: string;
2327
- readonly id: string;
2328
2329
  readonly providerMetadata?: {
2329
2330
  readonly [x: string]: {
2330
2331
  readonly [x: string]: unknown;
2331
2332
  };
2332
2333
  } | undefined;
2333
2334
  };
2334
- toolInputError: (u: unknown) => u is Schema.Struct.ReadonlySide<{
2335
- readonly type: Schema.tag<"tool-input-error">;
2336
- readonly id: Schema.String;
2337
- readonly name: Schema.String;
2338
- readonly raw: Schema.String;
2339
- }, "Type">;
2335
+ toolInputError: (u: unknown) => u is {
2336
+ readonly type: "tool-input-error";
2337
+ readonly id: string;
2338
+ readonly name: string;
2339
+ readonly raw: string;
2340
+ };
2340
2341
  toolCall: (u: unknown) => u is {
2342
+ readonly id: string;
2341
2343
  readonly type: "tool-call";
2342
2344
  readonly name: string;
2343
- readonly id: string;
2344
2345
  readonly input: unknown;
2345
2346
  readonly providerMetadata?: {
2346
2347
  readonly [x: string]: {
@@ -2350,53 +2351,53 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
2350
2351
  readonly providerExecuted?: boolean | undefined;
2351
2352
  };
2352
2353
  toolResult: (u: unknown) => u is {
2354
+ readonly id: string;
2353
2355
  readonly type: "tool-result";
2354
2356
  readonly name: string;
2355
- readonly id: string;
2356
- readonly result: Schema.Struct.ReadonlySide<{
2357
- readonly type: Schema.Literal<"json">;
2358
- readonly value: Schema.Unknown;
2359
- }, "Type"> | Schema.Struct.ReadonlySide<{
2360
- readonly type: Schema.Literal<"text">;
2361
- readonly value: Schema.Unknown;
2362
- }, "Type"> | Schema.Struct.ReadonlySide<{
2363
- readonly type: Schema.Literal<"error">;
2364
- readonly value: Schema.Unknown;
2365
- }, "Type"> | Schema.Struct.ReadonlySide<{
2366
- readonly type: Schema.Literal<"content">;
2367
- readonly value: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
2368
- readonly type: Schema.Literal<"text">;
2369
- readonly text: Schema.String;
2370
- }>, Schema.Struct<{
2371
- readonly type: Schema.Literal<"file">;
2372
- readonly uri: Schema.String;
2373
- readonly mime: Schema.String;
2374
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2375
- }>]>>;
2376
- }, "Type">;
2357
+ readonly result: {
2358
+ readonly type: "json";
2359
+ readonly value: unknown;
2360
+ } | {
2361
+ readonly type: "text";
2362
+ readonly value: unknown;
2363
+ } | {
2364
+ readonly type: "error";
2365
+ readonly value: unknown;
2366
+ } | {
2367
+ readonly type: "content";
2368
+ readonly value: readonly ({
2369
+ readonly type: "text";
2370
+ readonly text: string;
2371
+ } | {
2372
+ readonly type: "file";
2373
+ readonly uri: string;
2374
+ readonly mime: string;
2375
+ readonly name?: string | undefined;
2376
+ })[];
2377
+ };
2378
+ readonly output?: {
2379
+ readonly structured: unknown;
2380
+ readonly content: readonly ({
2381
+ readonly type: "text";
2382
+ readonly text: string;
2383
+ } | {
2384
+ readonly type: "file";
2385
+ readonly uri: string;
2386
+ readonly mime: string;
2387
+ readonly name?: string | undefined;
2388
+ })[];
2389
+ } | undefined;
2377
2390
  readonly providerMetadata?: {
2378
2391
  readonly [x: string]: {
2379
2392
  readonly [x: string]: unknown;
2380
2393
  };
2381
2394
  } | undefined;
2382
2395
  readonly providerExecuted?: boolean | undefined;
2383
- readonly output?: Schema.Struct.ReadonlySide<{
2384
- readonly structured: Schema.Unknown;
2385
- readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
2386
- readonly type: Schema.Literal<"text">;
2387
- readonly text: Schema.String;
2388
- }>, Schema.Struct<{
2389
- readonly type: Schema.Literal<"file">;
2390
- readonly uri: Schema.String;
2391
- readonly mime: Schema.String;
2392
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2393
- }>]>>;
2394
- }, "Type"> | undefined;
2395
2396
  };
2396
2397
  toolError: (u: unknown) => u is {
2398
+ readonly id: string;
2397
2399
  readonly type: "tool-error";
2398
2400
  readonly name: string;
2399
- readonly id: string;
2400
2401
  readonly message: string;
2401
2402
  readonly error?: unknown;
2402
2403
  readonly providerMetadata?: {
@@ -2568,7 +2569,7 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
2568
2569
  readonly type: Schema.Literal<"file">;
2569
2570
  readonly uri: Schema.String;
2570
2571
  readonly mime: Schema.String;
2571
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2572
+ readonly name: Schema.optional<Schema.String>;
2572
2573
  }>]>>;
2573
2574
  }>]> & {
2574
2575
  is: (value: unknown) => value is ToolResultValue;
@@ -2583,10 +2584,10 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
2583
2584
  readonly type: Schema.Literal<"file">;
2584
2585
  readonly uri: Schema.String;
2585
2586
  readonly mime: Schema.String;
2586
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2587
+ readonly name: Schema.optional<Schema.String>;
2587
2588
  }>]>>;
2588
2589
  }> & {
2589
- make: (structured: unknown, content?: ReadonlyArray<import("@opencode-ai/schema/llm").ToolContent>) => ToolOutput;
2590
+ make: (structured: unknown, content?: ReadonlyArray<import("@opencode-ai/schema/tool").Content>) => ToolOutput;
2590
2591
  fromResultValue: (result: ToolResultValue) => ToolOutput | undefined;
2591
2592
  toResultValue: (output: ToolOutput) => ToolResultValue;
2592
2593
  }>;
@@ -2622,6 +2623,7 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
2622
2623
  readonly classification: Schema.optional<Schema.Literal<"context-overflow">>;
2623
2624
  readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
2624
2625
  }>]> & {
2626
+ readonly discriminants: readonly ["step-start", "text-start", "text-delta", "text-end", "reasoning-start", "reasoning-delta", "reasoning-end", "tool-input-start", "tool-input-delta", "tool-input-end", "tool-input-error", "tool-call", "tool-result", "tool-error", "step-finish", "finish", "provider-error"];
2625
2627
  readonly cases: {
2626
2628
  "step-start": Schema.Struct<{
2627
2629
  readonly type: Schema.tag<"step-start">;
@@ -2714,7 +2716,7 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
2714
2716
  readonly type: Schema.Literal<"file">;
2715
2717
  readonly uri: Schema.String;
2716
2718
  readonly mime: Schema.String;
2717
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2719
+ readonly name: Schema.optional<Schema.String>;
2718
2720
  }>]>>;
2719
2721
  }>]> & {
2720
2722
  is: (value: unknown) => value is ToolResultValue;
@@ -2729,10 +2731,10 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
2729
2731
  readonly type: Schema.Literal<"file">;
2730
2732
  readonly uri: Schema.String;
2731
2733
  readonly mime: Schema.String;
2732
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2734
+ readonly name: Schema.optional<Schema.String>;
2733
2735
  }>]>>;
2734
2736
  }> & {
2735
- make: (structured: unknown, content?: ReadonlyArray<import("@opencode-ai/schema/llm").ToolContent>) => ToolOutput;
2737
+ make: (structured: unknown, content?: ReadonlyArray<import("@opencode-ai/schema/tool").Content>) => ToolOutput;
2736
2738
  fromResultValue: (result: ToolResultValue) => ToolOutput | undefined;
2737
2739
  toResultValue: (output: ToolOutput) => ToolResultValue;
2738
2740
  }>;
@@ -2773,92 +2775,92 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
2773
2775
  readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
2774
2776
  }>;
2775
2777
  };
2776
- readonly isAnyOf: <const Keys>(keys: readonly Keys[]) => (value: Schema.Struct.ReadonlySide<{
2777
- readonly type: Schema.tag<"step-start">;
2778
- readonly index: Schema.Number;
2779
- }, "Type"> | {
2780
- readonly type: "text-start";
2778
+ readonly isAnyOf: <const Keys>(keys: readonly Keys[]) => (value: {
2779
+ readonly type: "step-start";
2780
+ readonly index: number;
2781
+ } | {
2781
2782
  readonly id: string;
2783
+ readonly type: "text-start";
2782
2784
  readonly providerMetadata?: {
2783
2785
  readonly [x: string]: {
2784
2786
  readonly [x: string]: unknown;
2785
2787
  };
2786
2788
  } | undefined;
2787
2789
  } | {
2790
+ readonly id: string;
2788
2791
  readonly type: "text-delta";
2789
2792
  readonly text: string;
2790
- readonly id: string;
2791
2793
  readonly providerMetadata?: {
2792
2794
  readonly [x: string]: {
2793
2795
  readonly [x: string]: unknown;
2794
2796
  };
2795
2797
  } | undefined;
2796
2798
  } | {
2797
- readonly type: "text-end";
2798
2799
  readonly id: string;
2800
+ readonly type: "text-end";
2799
2801
  readonly providerMetadata?: {
2800
2802
  readonly [x: string]: {
2801
2803
  readonly [x: string]: unknown;
2802
2804
  };
2803
2805
  } | undefined;
2804
2806
  } | {
2805
- readonly type: "reasoning-start";
2806
2807
  readonly id: string;
2808
+ readonly type: "reasoning-start";
2807
2809
  readonly providerMetadata?: {
2808
2810
  readonly [x: string]: {
2809
2811
  readonly [x: string]: unknown;
2810
2812
  };
2811
2813
  } | undefined;
2812
2814
  } | {
2815
+ readonly id: string;
2813
2816
  readonly type: "reasoning-delta";
2814
2817
  readonly text: string;
2815
- readonly id: string;
2816
2818
  readonly providerMetadata?: {
2817
2819
  readonly [x: string]: {
2818
2820
  readonly [x: string]: unknown;
2819
2821
  };
2820
2822
  } | undefined;
2821
2823
  } | {
2822
- readonly type: "reasoning-end";
2823
2824
  readonly id: string;
2825
+ readonly type: "reasoning-end";
2824
2826
  readonly providerMetadata?: {
2825
2827
  readonly [x: string]: {
2826
2828
  readonly [x: string]: unknown;
2827
2829
  };
2828
2830
  } | undefined;
2829
2831
  } | {
2832
+ readonly id: string;
2830
2833
  readonly type: "tool-input-start";
2831
2834
  readonly name: string;
2832
- readonly id: string;
2833
2835
  readonly providerMetadata?: {
2834
2836
  readonly [x: string]: {
2835
2837
  readonly [x: string]: unknown;
2836
2838
  };
2837
2839
  } | undefined;
2838
2840
  readonly providerExecuted?: boolean | undefined;
2839
- } | Schema.Struct.ReadonlySide<{
2840
- readonly type: Schema.tag<"tool-input-delta">;
2841
- readonly id: Schema.String;
2842
- readonly name: Schema.String;
2843
- readonly text: Schema.String;
2844
- }, "Type"> | {
2845
- readonly type: "tool-input-end";
2841
+ } | {
2842
+ readonly type: "tool-input-delta";
2843
+ readonly id: string;
2846
2844
  readonly name: string;
2845
+ readonly text: string;
2846
+ } | {
2847
2847
  readonly id: string;
2848
+ readonly type: "tool-input-end";
2849
+ readonly name: string;
2848
2850
  readonly providerMetadata?: {
2849
2851
  readonly [x: string]: {
2850
2852
  readonly [x: string]: unknown;
2851
2853
  };
2852
2854
  } | undefined;
2853
- } | Schema.Struct.ReadonlySide<{
2854
- readonly type: Schema.tag<"tool-input-error">;
2855
- readonly id: Schema.String;
2856
- readonly name: Schema.String;
2857
- readonly raw: Schema.String;
2858
- }, "Type"> | {
2859
- readonly type: "tool-call";
2855
+ } | {
2856
+ readonly type: "tool-input-error";
2857
+ readonly id: string;
2860
2858
  readonly name: string;
2859
+ readonly raw: string;
2860
+ } | {
2861
2861
  readonly id: string;
2862
+ readonly type: "tool-call";
2863
+ readonly name: string;
2862
2864
  readonly input: unknown;
2863
2865
  readonly providerMetadata?: {
2864
2866
  readonly [x: string]: {
@@ -2867,52 +2869,52 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
2867
2869
  } | undefined;
2868
2870
  readonly providerExecuted?: boolean | undefined;
2869
2871
  } | {
2872
+ readonly id: string;
2870
2873
  readonly type: "tool-result";
2871
2874
  readonly name: string;
2872
- readonly id: string;
2873
- readonly result: Schema.Struct.ReadonlySide<{
2874
- readonly type: Schema.Literal<"json">;
2875
- readonly value: Schema.Unknown;
2876
- }, "Type"> | Schema.Struct.ReadonlySide<{
2877
- readonly type: Schema.Literal<"text">;
2878
- readonly value: Schema.Unknown;
2879
- }, "Type"> | Schema.Struct.ReadonlySide<{
2880
- readonly type: Schema.Literal<"error">;
2881
- readonly value: Schema.Unknown;
2882
- }, "Type"> | Schema.Struct.ReadonlySide<{
2883
- readonly type: Schema.Literal<"content">;
2884
- readonly value: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
2885
- readonly type: Schema.Literal<"text">;
2886
- readonly text: Schema.String;
2887
- }>, Schema.Struct<{
2888
- readonly type: Schema.Literal<"file">;
2889
- readonly uri: Schema.String;
2890
- readonly mime: Schema.String;
2891
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2892
- }>]>>;
2893
- }, "Type">;
2894
- readonly providerMetadata?: {
2895
- readonly [x: string]: {
2896
- readonly [x: string]: unknown;
2897
- };
2898
- } | undefined;
2899
- readonly providerExecuted?: boolean | undefined;
2900
- readonly output?: Schema.Struct.ReadonlySide<{
2901
- readonly structured: Schema.Unknown;
2902
- readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
2903
- readonly type: Schema.Literal<"text">;
2904
- readonly text: Schema.String;
2905
- }>, Schema.Struct<{
2906
- readonly type: Schema.Literal<"file">;
2907
- readonly uri: Schema.String;
2908
- readonly mime: Schema.String;
2909
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2910
- }>]>>;
2911
- }, "Type"> | undefined;
2875
+ readonly result: {
2876
+ readonly type: "json";
2877
+ readonly value: unknown;
2878
+ } | {
2879
+ readonly type: "text";
2880
+ readonly value: unknown;
2881
+ } | {
2882
+ readonly type: "error";
2883
+ readonly value: unknown;
2884
+ } | {
2885
+ readonly type: "content";
2886
+ readonly value: readonly ({
2887
+ readonly type: "text";
2888
+ readonly text: string;
2889
+ } | {
2890
+ readonly type: "file";
2891
+ readonly uri: string;
2892
+ readonly mime: string;
2893
+ readonly name?: string | undefined;
2894
+ })[];
2895
+ };
2896
+ readonly output?: {
2897
+ readonly structured: unknown;
2898
+ readonly content: readonly ({
2899
+ readonly type: "text";
2900
+ readonly text: string;
2901
+ } | {
2902
+ readonly type: "file";
2903
+ readonly uri: string;
2904
+ readonly mime: string;
2905
+ readonly name?: string | undefined;
2906
+ })[];
2907
+ } | undefined;
2908
+ readonly providerMetadata?: {
2909
+ readonly [x: string]: {
2910
+ readonly [x: string]: unknown;
2911
+ };
2912
+ } | undefined;
2913
+ readonly providerExecuted?: boolean | undefined;
2912
2914
  } | {
2915
+ readonly id: string;
2913
2916
  readonly type: "tool-error";
2914
2917
  readonly name: string;
2915
- readonly id: string;
2916
2918
  readonly message: string;
2917
2919
  readonly error?: unknown;
2918
2920
  readonly providerMetadata?: {
@@ -2954,14 +2956,14 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
2954
2956
  };
2955
2957
  } | undefined;
2956
2958
  readonly classification?: "context-overflow" | undefined;
2957
- }) => value is Extract<Schema.Struct.ReadonlySide<{
2958
- readonly type: Schema.tag<"step-start">;
2959
- readonly index: Schema.Number;
2960
- }, "Type">, {
2959
+ }) => value is Extract<{
2960
+ readonly type: "step-start";
2961
+ readonly index: number;
2962
+ }, {
2961
2963
  readonly type: Keys;
2962
2964
  }> | Extract<{
2963
- readonly type: "text-start";
2964
2965
  readonly id: string;
2966
+ readonly type: "text-start";
2965
2967
  readonly providerMetadata?: {
2966
2968
  readonly [x: string]: {
2967
2969
  readonly [x: string]: unknown;
@@ -2970,9 +2972,9 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
2970
2972
  }, {
2971
2973
  readonly type: Keys;
2972
2974
  }> | Extract<{
2975
+ readonly id: string;
2973
2976
  readonly type: "text-delta";
2974
2977
  readonly text: string;
2975
- readonly id: string;
2976
2978
  readonly providerMetadata?: {
2977
2979
  readonly [x: string]: {
2978
2980
  readonly [x: string]: unknown;
@@ -2981,8 +2983,8 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
2981
2983
  }, {
2982
2984
  readonly type: Keys;
2983
2985
  }> | Extract<{
2984
- readonly type: "text-end";
2985
2986
  readonly id: string;
2987
+ readonly type: "text-end";
2986
2988
  readonly providerMetadata?: {
2987
2989
  readonly [x: string]: {
2988
2990
  readonly [x: string]: unknown;
@@ -2991,8 +2993,8 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
2991
2993
  }, {
2992
2994
  readonly type: Keys;
2993
2995
  }> | Extract<{
2994
- readonly type: "reasoning-start";
2995
2996
  readonly id: string;
2997
+ readonly type: "reasoning-start";
2996
2998
  readonly providerMetadata?: {
2997
2999
  readonly [x: string]: {
2998
3000
  readonly [x: string]: unknown;
@@ -3001,9 +3003,9 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3001
3003
  }, {
3002
3004
  readonly type: Keys;
3003
3005
  }> | Extract<{
3006
+ readonly id: string;
3004
3007
  readonly type: "reasoning-delta";
3005
3008
  readonly text: string;
3006
- readonly id: string;
3007
3009
  readonly providerMetadata?: {
3008
3010
  readonly [x: string]: {
3009
3011
  readonly [x: string]: unknown;
@@ -3012,8 +3014,8 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3012
3014
  }, {
3013
3015
  readonly type: Keys;
3014
3016
  }> | Extract<{
3015
- readonly type: "reasoning-end";
3016
3017
  readonly id: string;
3018
+ readonly type: "reasoning-end";
3017
3019
  readonly providerMetadata?: {
3018
3020
  readonly [x: string]: {
3019
3021
  readonly [x: string]: unknown;
@@ -3022,9 +3024,9 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3022
3024
  }, {
3023
3025
  readonly type: Keys;
3024
3026
  }> | Extract<{
3027
+ readonly id: string;
3025
3028
  readonly type: "tool-input-start";
3026
3029
  readonly name: string;
3027
- readonly id: string;
3028
3030
  readonly providerMetadata?: {
3029
3031
  readonly [x: string]: {
3030
3032
  readonly [x: string]: unknown;
@@ -3033,17 +3035,17 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3033
3035
  readonly providerExecuted?: boolean | undefined;
3034
3036
  }, {
3035
3037
  readonly type: Keys;
3036
- }> | Extract<Schema.Struct.ReadonlySide<{
3037
- readonly type: Schema.tag<"tool-input-delta">;
3038
- readonly id: Schema.String;
3039
- readonly name: Schema.String;
3040
- readonly text: Schema.String;
3041
- }, "Type">, {
3038
+ }> | Extract<{
3039
+ readonly type: "tool-input-delta";
3040
+ readonly id: string;
3041
+ readonly name: string;
3042
+ readonly text: string;
3043
+ }, {
3042
3044
  readonly type: Keys;
3043
3045
  }> | Extract<{
3046
+ readonly id: string;
3044
3047
  readonly type: "tool-input-end";
3045
3048
  readonly name: string;
3046
- readonly id: string;
3047
3049
  readonly providerMetadata?: {
3048
3050
  readonly [x: string]: {
3049
3051
  readonly [x: string]: unknown;
@@ -3051,17 +3053,17 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3051
3053
  } | undefined;
3052
3054
  }, {
3053
3055
  readonly type: Keys;
3054
- }> | Extract<Schema.Struct.ReadonlySide<{
3055
- readonly type: Schema.tag<"tool-input-error">;
3056
- readonly id: Schema.String;
3057
- readonly name: Schema.String;
3058
- readonly raw: Schema.String;
3059
- }, "Type">, {
3056
+ }> | Extract<{
3057
+ readonly type: "tool-input-error";
3058
+ readonly id: string;
3059
+ readonly name: string;
3060
+ readonly raw: string;
3061
+ }, {
3060
3062
  readonly type: Keys;
3061
3063
  }> | Extract<{
3064
+ readonly id: string;
3062
3065
  readonly type: "tool-call";
3063
3066
  readonly name: string;
3064
- readonly id: string;
3065
3067
  readonly input: unknown;
3066
3068
  readonly providerMetadata?: {
3067
3069
  readonly [x: string]: {
@@ -3072,54 +3074,54 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3072
3074
  }, {
3073
3075
  readonly type: Keys;
3074
3076
  }> | Extract<{
3077
+ readonly id: string;
3075
3078
  readonly type: "tool-result";
3076
3079
  readonly name: string;
3077
- readonly id: string;
3078
- readonly result: Schema.Struct.ReadonlySide<{
3079
- readonly type: Schema.Literal<"json">;
3080
- readonly value: Schema.Unknown;
3081
- }, "Type"> | Schema.Struct.ReadonlySide<{
3082
- readonly type: Schema.Literal<"text">;
3083
- readonly value: Schema.Unknown;
3084
- }, "Type"> | Schema.Struct.ReadonlySide<{
3085
- readonly type: Schema.Literal<"error">;
3086
- readonly value: Schema.Unknown;
3087
- }, "Type"> | Schema.Struct.ReadonlySide<{
3088
- readonly type: Schema.Literal<"content">;
3089
- readonly value: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
3090
- readonly type: Schema.Literal<"text">;
3091
- readonly text: Schema.String;
3092
- }>, Schema.Struct<{
3093
- readonly type: Schema.Literal<"file">;
3094
- readonly uri: Schema.String;
3095
- readonly mime: Schema.String;
3096
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
3097
- }>]>>;
3098
- }, "Type">;
3080
+ readonly result: {
3081
+ readonly type: "json";
3082
+ readonly value: unknown;
3083
+ } | {
3084
+ readonly type: "text";
3085
+ readonly value: unknown;
3086
+ } | {
3087
+ readonly type: "error";
3088
+ readonly value: unknown;
3089
+ } | {
3090
+ readonly type: "content";
3091
+ readonly value: readonly ({
3092
+ readonly type: "text";
3093
+ readonly text: string;
3094
+ } | {
3095
+ readonly type: "file";
3096
+ readonly uri: string;
3097
+ readonly mime: string;
3098
+ readonly name?: string | undefined;
3099
+ })[];
3100
+ };
3101
+ readonly output?: {
3102
+ readonly structured: unknown;
3103
+ readonly content: readonly ({
3104
+ readonly type: "text";
3105
+ readonly text: string;
3106
+ } | {
3107
+ readonly type: "file";
3108
+ readonly uri: string;
3109
+ readonly mime: string;
3110
+ readonly name?: string | undefined;
3111
+ })[];
3112
+ } | undefined;
3099
3113
  readonly providerMetadata?: {
3100
3114
  readonly [x: string]: {
3101
3115
  readonly [x: string]: unknown;
3102
3116
  };
3103
3117
  } | undefined;
3104
3118
  readonly providerExecuted?: boolean | undefined;
3105
- readonly output?: Schema.Struct.ReadonlySide<{
3106
- readonly structured: Schema.Unknown;
3107
- readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
3108
- readonly type: Schema.Literal<"text">;
3109
- readonly text: Schema.String;
3110
- }>, Schema.Struct<{
3111
- readonly type: Schema.Literal<"file">;
3112
- readonly uri: Schema.String;
3113
- readonly mime: Schema.String;
3114
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
3115
- }>]>>;
3116
- }, "Type"> | undefined;
3117
3119
  }, {
3118
3120
  readonly type: Keys;
3119
3121
  }> | Extract<{
3122
+ readonly id: string;
3120
3123
  readonly type: "tool-error";
3121
3124
  readonly name: string;
3122
- readonly id: string;
3123
3125
  readonly message: string;
3124
3126
  readonly error?: unknown;
3125
3127
  readonly providerMetadata?: {
@@ -3171,13 +3173,13 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3171
3173
  readonly type: Keys;
3172
3174
  }>;
3173
3175
  readonly guards: {
3174
- "step-start": (u: unknown) => u is Schema.Struct.ReadonlySide<{
3175
- readonly type: Schema.tag<"step-start">;
3176
- readonly index: Schema.Number;
3177
- }, "Type">;
3176
+ "step-start": (u: unknown) => u is {
3177
+ readonly type: "step-start";
3178
+ readonly index: number;
3179
+ };
3178
3180
  "text-start": (u: unknown) => u is {
3179
- readonly type: "text-start";
3180
3181
  readonly id: string;
3182
+ readonly type: "text-start";
3181
3183
  readonly providerMetadata?: {
3182
3184
  readonly [x: string]: {
3183
3185
  readonly [x: string]: unknown;
@@ -3185,9 +3187,9 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3185
3187
  } | undefined;
3186
3188
  };
3187
3189
  "text-delta": (u: unknown) => u is {
3190
+ readonly id: string;
3188
3191
  readonly type: "text-delta";
3189
3192
  readonly text: string;
3190
- readonly id: string;
3191
3193
  readonly providerMetadata?: {
3192
3194
  readonly [x: string]: {
3193
3195
  readonly [x: string]: unknown;
@@ -3195,8 +3197,8 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3195
3197
  } | undefined;
3196
3198
  };
3197
3199
  "text-end": (u: unknown) => u is {
3198
- readonly type: "text-end";
3199
3200
  readonly id: string;
3201
+ readonly type: "text-end";
3200
3202
  readonly providerMetadata?: {
3201
3203
  readonly [x: string]: {
3202
3204
  readonly [x: string]: unknown;
@@ -3204,8 +3206,8 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3204
3206
  } | undefined;
3205
3207
  };
3206
3208
  "reasoning-start": (u: unknown) => u is {
3207
- readonly type: "reasoning-start";
3208
3209
  readonly id: string;
3210
+ readonly type: "reasoning-start";
3209
3211
  readonly providerMetadata?: {
3210
3212
  readonly [x: string]: {
3211
3213
  readonly [x: string]: unknown;
@@ -3213,9 +3215,9 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3213
3215
  } | undefined;
3214
3216
  };
3215
3217
  "reasoning-delta": (u: unknown) => u is {
3218
+ readonly id: string;
3216
3219
  readonly type: "reasoning-delta";
3217
3220
  readonly text: string;
3218
- readonly id: string;
3219
3221
  readonly providerMetadata?: {
3220
3222
  readonly [x: string]: {
3221
3223
  readonly [x: string]: unknown;
@@ -3223,8 +3225,8 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3223
3225
  } | undefined;
3224
3226
  };
3225
3227
  "reasoning-end": (u: unknown) => u is {
3226
- readonly type: "reasoning-end";
3227
3228
  readonly id: string;
3229
+ readonly type: "reasoning-end";
3228
3230
  readonly providerMetadata?: {
3229
3231
  readonly [x: string]: {
3230
3232
  readonly [x: string]: unknown;
@@ -3232,9 +3234,9 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3232
3234
  } | undefined;
3233
3235
  };
3234
3236
  "tool-input-start": (u: unknown) => u is {
3237
+ readonly id: string;
3235
3238
  readonly type: "tool-input-start";
3236
3239
  readonly name: string;
3237
- readonly id: string;
3238
3240
  readonly providerMetadata?: {
3239
3241
  readonly [x: string]: {
3240
3242
  readonly [x: string]: unknown;
@@ -3242,32 +3244,32 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3242
3244
  } | undefined;
3243
3245
  readonly providerExecuted?: boolean | undefined;
3244
3246
  };
3245
- "tool-input-delta": (u: unknown) => u is Schema.Struct.ReadonlySide<{
3246
- readonly type: Schema.tag<"tool-input-delta">;
3247
- readonly id: Schema.String;
3248
- readonly name: Schema.String;
3249
- readonly text: Schema.String;
3250
- }, "Type">;
3247
+ "tool-input-delta": (u: unknown) => u is {
3248
+ readonly type: "tool-input-delta";
3249
+ readonly id: string;
3250
+ readonly name: string;
3251
+ readonly text: string;
3252
+ };
3251
3253
  "tool-input-end": (u: unknown) => u is {
3254
+ readonly id: string;
3252
3255
  readonly type: "tool-input-end";
3253
3256
  readonly name: string;
3254
- readonly id: string;
3255
3257
  readonly providerMetadata?: {
3256
3258
  readonly [x: string]: {
3257
3259
  readonly [x: string]: unknown;
3258
3260
  };
3259
3261
  } | undefined;
3260
3262
  };
3261
- "tool-input-error": (u: unknown) => u is Schema.Struct.ReadonlySide<{
3262
- readonly type: Schema.tag<"tool-input-error">;
3263
- readonly id: Schema.String;
3264
- readonly name: Schema.String;
3265
- readonly raw: Schema.String;
3266
- }, "Type">;
3263
+ "tool-input-error": (u: unknown) => u is {
3264
+ readonly type: "tool-input-error";
3265
+ readonly id: string;
3266
+ readonly name: string;
3267
+ readonly raw: string;
3268
+ };
3267
3269
  "tool-call": (u: unknown) => u is {
3270
+ readonly id: string;
3268
3271
  readonly type: "tool-call";
3269
3272
  readonly name: string;
3270
- readonly id: string;
3271
3273
  readonly input: unknown;
3272
3274
  readonly providerMetadata?: {
3273
3275
  readonly [x: string]: {
@@ -3277,53 +3279,53 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3277
3279
  readonly providerExecuted?: boolean | undefined;
3278
3280
  };
3279
3281
  "tool-result": (u: unknown) => u is {
3282
+ readonly id: string;
3280
3283
  readonly type: "tool-result";
3281
3284
  readonly name: string;
3282
- readonly id: string;
3283
- readonly result: Schema.Struct.ReadonlySide<{
3284
- readonly type: Schema.Literal<"json">;
3285
- readonly value: Schema.Unknown;
3286
- }, "Type"> | Schema.Struct.ReadonlySide<{
3287
- readonly type: Schema.Literal<"text">;
3288
- readonly value: Schema.Unknown;
3289
- }, "Type"> | Schema.Struct.ReadonlySide<{
3290
- readonly type: Schema.Literal<"error">;
3291
- readonly value: Schema.Unknown;
3292
- }, "Type"> | Schema.Struct.ReadonlySide<{
3293
- readonly type: Schema.Literal<"content">;
3294
- readonly value: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
3295
- readonly type: Schema.Literal<"text">;
3296
- readonly text: Schema.String;
3297
- }>, Schema.Struct<{
3298
- readonly type: Schema.Literal<"file">;
3299
- readonly uri: Schema.String;
3300
- readonly mime: Schema.String;
3301
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
3302
- }>]>>;
3303
- }, "Type">;
3285
+ readonly result: {
3286
+ readonly type: "json";
3287
+ readonly value: unknown;
3288
+ } | {
3289
+ readonly type: "text";
3290
+ readonly value: unknown;
3291
+ } | {
3292
+ readonly type: "error";
3293
+ readonly value: unknown;
3294
+ } | {
3295
+ readonly type: "content";
3296
+ readonly value: readonly ({
3297
+ readonly type: "text";
3298
+ readonly text: string;
3299
+ } | {
3300
+ readonly type: "file";
3301
+ readonly uri: string;
3302
+ readonly mime: string;
3303
+ readonly name?: string | undefined;
3304
+ })[];
3305
+ };
3306
+ readonly output?: {
3307
+ readonly structured: unknown;
3308
+ readonly content: readonly ({
3309
+ readonly type: "text";
3310
+ readonly text: string;
3311
+ } | {
3312
+ readonly type: "file";
3313
+ readonly uri: string;
3314
+ readonly mime: string;
3315
+ readonly name?: string | undefined;
3316
+ })[];
3317
+ } | undefined;
3304
3318
  readonly providerMetadata?: {
3305
3319
  readonly [x: string]: {
3306
3320
  readonly [x: string]: unknown;
3307
3321
  };
3308
3322
  } | undefined;
3309
3323
  readonly providerExecuted?: boolean | undefined;
3310
- readonly output?: Schema.Struct.ReadonlySide<{
3311
- readonly structured: Schema.Unknown;
3312
- readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
3313
- readonly type: Schema.Literal<"text">;
3314
- readonly text: Schema.String;
3315
- }>, Schema.Struct<{
3316
- readonly type: Schema.Literal<"file">;
3317
- readonly uri: Schema.String;
3318
- readonly mime: Schema.String;
3319
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
3320
- }>]>>;
3321
- }, "Type"> | undefined;
3322
3324
  };
3323
3325
  "tool-error": (u: unknown) => u is {
3326
+ readonly id: string;
3324
3327
  readonly type: "tool-error";
3325
3328
  readonly name: string;
3326
- readonly id: string;
3327
3329
  readonly message: string;
3328
3330
  readonly error?: unknown;
3329
3331
  readonly providerMetadata?: {
@@ -3372,13 +3374,13 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3372
3374
  };
3373
3375
  readonly match: {
3374
3376
  <Cases extends {
3375
- "step-start": (value: Schema.Struct.ReadonlySide<{
3376
- readonly type: Schema.tag<"step-start">;
3377
- readonly index: Schema.Number;
3378
- }, "Type">) => any;
3377
+ "step-start": (value: {
3378
+ readonly type: "step-start";
3379
+ readonly index: number;
3380
+ }) => any;
3379
3381
  "text-start": (value: {
3380
- readonly type: "text-start";
3381
3382
  readonly id: string;
3383
+ readonly type: "text-start";
3382
3384
  readonly providerMetadata?: {
3383
3385
  readonly [x: string]: {
3384
3386
  readonly [x: string]: unknown;
@@ -3386,9 +3388,9 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3386
3388
  } | undefined;
3387
3389
  }) => any;
3388
3390
  "text-delta": (value: {
3391
+ readonly id: string;
3389
3392
  readonly type: "text-delta";
3390
3393
  readonly text: string;
3391
- readonly id: string;
3392
3394
  readonly providerMetadata?: {
3393
3395
  readonly [x: string]: {
3394
3396
  readonly [x: string]: unknown;
@@ -3396,8 +3398,8 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3396
3398
  } | undefined;
3397
3399
  }) => any;
3398
3400
  "text-end": (value: {
3399
- readonly type: "text-end";
3400
3401
  readonly id: string;
3402
+ readonly type: "text-end";
3401
3403
  readonly providerMetadata?: {
3402
3404
  readonly [x: string]: {
3403
3405
  readonly [x: string]: unknown;
@@ -3405,8 +3407,8 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3405
3407
  } | undefined;
3406
3408
  }) => any;
3407
3409
  "reasoning-start": (value: {
3408
- readonly type: "reasoning-start";
3409
3410
  readonly id: string;
3411
+ readonly type: "reasoning-start";
3410
3412
  readonly providerMetadata?: {
3411
3413
  readonly [x: string]: {
3412
3414
  readonly [x: string]: unknown;
@@ -3414,9 +3416,9 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3414
3416
  } | undefined;
3415
3417
  }) => any;
3416
3418
  "reasoning-delta": (value: {
3419
+ readonly id: string;
3417
3420
  readonly type: "reasoning-delta";
3418
3421
  readonly text: string;
3419
- readonly id: string;
3420
3422
  readonly providerMetadata?: {
3421
3423
  readonly [x: string]: {
3422
3424
  readonly [x: string]: unknown;
@@ -3424,8 +3426,8 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3424
3426
  } | undefined;
3425
3427
  }) => any;
3426
3428
  "reasoning-end": (value: {
3427
- readonly type: "reasoning-end";
3428
3429
  readonly id: string;
3430
+ readonly type: "reasoning-end";
3429
3431
  readonly providerMetadata?: {
3430
3432
  readonly [x: string]: {
3431
3433
  readonly [x: string]: unknown;
@@ -3433,9 +3435,9 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3433
3435
  } | undefined;
3434
3436
  }) => any;
3435
3437
  "tool-input-start": (value: {
3438
+ readonly id: string;
3436
3439
  readonly type: "tool-input-start";
3437
3440
  readonly name: string;
3438
- readonly id: string;
3439
3441
  readonly providerMetadata?: {
3440
3442
  readonly [x: string]: {
3441
3443
  readonly [x: string]: unknown;
@@ -3443,32 +3445,32 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3443
3445
  } | undefined;
3444
3446
  readonly providerExecuted?: boolean | undefined;
3445
3447
  }) => any;
3446
- "tool-input-delta": (value: Schema.Struct.ReadonlySide<{
3447
- readonly type: Schema.tag<"tool-input-delta">;
3448
- readonly id: Schema.String;
3449
- readonly name: Schema.String;
3450
- readonly text: Schema.String;
3451
- }, "Type">) => any;
3448
+ "tool-input-delta": (value: {
3449
+ readonly type: "tool-input-delta";
3450
+ readonly id: string;
3451
+ readonly name: string;
3452
+ readonly text: string;
3453
+ }) => any;
3452
3454
  "tool-input-end": (value: {
3455
+ readonly id: string;
3453
3456
  readonly type: "tool-input-end";
3454
3457
  readonly name: string;
3455
- readonly id: string;
3456
3458
  readonly providerMetadata?: {
3457
3459
  readonly [x: string]: {
3458
3460
  readonly [x: string]: unknown;
3459
3461
  };
3460
3462
  } | undefined;
3461
3463
  }) => any;
3462
- "tool-input-error": (value: Schema.Struct.ReadonlySide<{
3463
- readonly type: Schema.tag<"tool-input-error">;
3464
- readonly id: Schema.String;
3465
- readonly name: Schema.String;
3466
- readonly raw: Schema.String;
3467
- }, "Type">) => any;
3464
+ "tool-input-error": (value: {
3465
+ readonly type: "tool-input-error";
3466
+ readonly id: string;
3467
+ readonly name: string;
3468
+ readonly raw: string;
3469
+ }) => any;
3468
3470
  "tool-call": (value: {
3471
+ readonly id: string;
3469
3472
  readonly type: "tool-call";
3470
3473
  readonly name: string;
3471
- readonly id: string;
3472
3474
  readonly input: unknown;
3473
3475
  readonly providerMetadata?: {
3474
3476
  readonly [x: string]: {
@@ -3478,53 +3480,53 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3478
3480
  readonly providerExecuted?: boolean | undefined;
3479
3481
  }) => any;
3480
3482
  "tool-result": (value: {
3483
+ readonly id: string;
3481
3484
  readonly type: "tool-result";
3482
3485
  readonly name: string;
3483
- readonly id: string;
3484
- readonly result: Schema.Struct.ReadonlySide<{
3485
- readonly type: Schema.Literal<"json">;
3486
- readonly value: Schema.Unknown;
3487
- }, "Type"> | Schema.Struct.ReadonlySide<{
3488
- readonly type: Schema.Literal<"text">;
3489
- readonly value: Schema.Unknown;
3490
- }, "Type"> | Schema.Struct.ReadonlySide<{
3491
- readonly type: Schema.Literal<"error">;
3492
- readonly value: Schema.Unknown;
3493
- }, "Type"> | Schema.Struct.ReadonlySide<{
3494
- readonly type: Schema.Literal<"content">;
3495
- readonly value: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
3496
- readonly type: Schema.Literal<"text">;
3497
- readonly text: Schema.String;
3498
- }>, Schema.Struct<{
3499
- readonly type: Schema.Literal<"file">;
3500
- readonly uri: Schema.String;
3501
- readonly mime: Schema.String;
3502
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
3503
- }>]>>;
3504
- }, "Type">;
3486
+ readonly result: {
3487
+ readonly type: "json";
3488
+ readonly value: unknown;
3489
+ } | {
3490
+ readonly type: "text";
3491
+ readonly value: unknown;
3492
+ } | {
3493
+ readonly type: "error";
3494
+ readonly value: unknown;
3495
+ } | {
3496
+ readonly type: "content";
3497
+ readonly value: readonly ({
3498
+ readonly type: "text";
3499
+ readonly text: string;
3500
+ } | {
3501
+ readonly type: "file";
3502
+ readonly uri: string;
3503
+ readonly mime: string;
3504
+ readonly name?: string | undefined;
3505
+ })[];
3506
+ };
3507
+ readonly output?: {
3508
+ readonly structured: unknown;
3509
+ readonly content: readonly ({
3510
+ readonly type: "text";
3511
+ readonly text: string;
3512
+ } | {
3513
+ readonly type: "file";
3514
+ readonly uri: string;
3515
+ readonly mime: string;
3516
+ readonly name?: string | undefined;
3517
+ })[];
3518
+ } | undefined;
3505
3519
  readonly providerMetadata?: {
3506
3520
  readonly [x: string]: {
3507
3521
  readonly [x: string]: unknown;
3508
3522
  };
3509
3523
  } | undefined;
3510
3524
  readonly providerExecuted?: boolean | undefined;
3511
- readonly output?: Schema.Struct.ReadonlySide<{
3512
- readonly structured: Schema.Unknown;
3513
- readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
3514
- readonly type: Schema.Literal<"text">;
3515
- readonly text: Schema.String;
3516
- }>, Schema.Struct<{
3517
- readonly type: Schema.Literal<"file">;
3518
- readonly uri: Schema.String;
3519
- readonly mime: Schema.String;
3520
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
3521
- }>]>>;
3522
- }, "Type"> | undefined;
3523
3525
  }) => any;
3524
3526
  "tool-error": (value: {
3527
+ readonly id: string;
3525
3528
  readonly type: "tool-error";
3526
3529
  readonly name: string;
3527
- readonly id: string;
3528
3530
  readonly message: string;
3529
3531
  readonly error?: unknown;
3530
3532
  readonly providerMetadata?: {
@@ -3570,92 +3572,92 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3570
3572
  } | undefined;
3571
3573
  readonly classification?: "context-overflow" | undefined;
3572
3574
  }) => any;
3573
- }>(value: Schema.Struct.ReadonlySide<{
3574
- readonly type: Schema.tag<"step-start">;
3575
- readonly index: Schema.Number;
3576
- }, "Type"> | {
3577
- readonly type: "text-start";
3575
+ }>(value: {
3576
+ readonly type: "step-start";
3577
+ readonly index: number;
3578
+ } | {
3578
3579
  readonly id: string;
3580
+ readonly type: "text-start";
3579
3581
  readonly providerMetadata?: {
3580
3582
  readonly [x: string]: {
3581
3583
  readonly [x: string]: unknown;
3582
3584
  };
3583
3585
  } | undefined;
3584
3586
  } | {
3587
+ readonly id: string;
3585
3588
  readonly type: "text-delta";
3586
3589
  readonly text: string;
3587
- readonly id: string;
3588
3590
  readonly providerMetadata?: {
3589
3591
  readonly [x: string]: {
3590
3592
  readonly [x: string]: unknown;
3591
3593
  };
3592
3594
  } | undefined;
3593
3595
  } | {
3594
- readonly type: "text-end";
3595
3596
  readonly id: string;
3597
+ readonly type: "text-end";
3596
3598
  readonly providerMetadata?: {
3597
3599
  readonly [x: string]: {
3598
3600
  readonly [x: string]: unknown;
3599
3601
  };
3600
3602
  } | undefined;
3601
3603
  } | {
3602
- readonly type: "reasoning-start";
3603
3604
  readonly id: string;
3605
+ readonly type: "reasoning-start";
3604
3606
  readonly providerMetadata?: {
3605
3607
  readonly [x: string]: {
3606
3608
  readonly [x: string]: unknown;
3607
3609
  };
3608
3610
  } | undefined;
3609
3611
  } | {
3612
+ readonly id: string;
3610
3613
  readonly type: "reasoning-delta";
3611
3614
  readonly text: string;
3612
- readonly id: string;
3613
3615
  readonly providerMetadata?: {
3614
3616
  readonly [x: string]: {
3615
3617
  readonly [x: string]: unknown;
3616
3618
  };
3617
3619
  } | undefined;
3618
3620
  } | {
3619
- readonly type: "reasoning-end";
3620
3621
  readonly id: string;
3622
+ readonly type: "reasoning-end";
3621
3623
  readonly providerMetadata?: {
3622
3624
  readonly [x: string]: {
3623
3625
  readonly [x: string]: unknown;
3624
3626
  };
3625
3627
  } | undefined;
3626
3628
  } | {
3629
+ readonly id: string;
3627
3630
  readonly type: "tool-input-start";
3628
3631
  readonly name: string;
3629
- readonly id: string;
3630
3632
  readonly providerMetadata?: {
3631
3633
  readonly [x: string]: {
3632
3634
  readonly [x: string]: unknown;
3633
3635
  };
3634
3636
  } | undefined;
3635
3637
  readonly providerExecuted?: boolean | undefined;
3636
- } | Schema.Struct.ReadonlySide<{
3637
- readonly type: Schema.tag<"tool-input-delta">;
3638
- readonly id: Schema.String;
3639
- readonly name: Schema.String;
3640
- readonly text: Schema.String;
3641
- }, "Type"> | {
3642
- readonly type: "tool-input-end";
3638
+ } | {
3639
+ readonly type: "tool-input-delta";
3640
+ readonly id: string;
3643
3641
  readonly name: string;
3642
+ readonly text: string;
3643
+ } | {
3644
3644
  readonly id: string;
3645
+ readonly type: "tool-input-end";
3646
+ readonly name: string;
3645
3647
  readonly providerMetadata?: {
3646
3648
  readonly [x: string]: {
3647
3649
  readonly [x: string]: unknown;
3648
3650
  };
3649
3651
  } | undefined;
3650
- } | Schema.Struct.ReadonlySide<{
3651
- readonly type: Schema.tag<"tool-input-error">;
3652
- readonly id: Schema.String;
3653
- readonly name: Schema.String;
3654
- readonly raw: Schema.String;
3655
- }, "Type"> | {
3656
- readonly type: "tool-call";
3652
+ } | {
3653
+ readonly type: "tool-input-error";
3654
+ readonly id: string;
3657
3655
  readonly name: string;
3656
+ readonly raw: string;
3657
+ } | {
3658
3658
  readonly id: string;
3659
+ readonly type: "tool-call";
3660
+ readonly name: string;
3659
3661
  readonly input: unknown;
3660
3662
  readonly providerMetadata?: {
3661
3663
  readonly [x: string]: {
@@ -3664,52 +3666,52 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3664
3666
  } | undefined;
3665
3667
  readonly providerExecuted?: boolean | undefined;
3666
3668
  } | {
3669
+ readonly id: string;
3667
3670
  readonly type: "tool-result";
3668
3671
  readonly name: string;
3669
- readonly id: string;
3670
- readonly result: Schema.Struct.ReadonlySide<{
3671
- readonly type: Schema.Literal<"json">;
3672
- readonly value: Schema.Unknown;
3673
- }, "Type"> | Schema.Struct.ReadonlySide<{
3674
- readonly type: Schema.Literal<"text">;
3675
- readonly value: Schema.Unknown;
3676
- }, "Type"> | Schema.Struct.ReadonlySide<{
3677
- readonly type: Schema.Literal<"error">;
3678
- readonly value: Schema.Unknown;
3679
- }, "Type"> | Schema.Struct.ReadonlySide<{
3680
- readonly type: Schema.Literal<"content">;
3681
- readonly value: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
3682
- readonly type: Schema.Literal<"text">;
3683
- readonly text: Schema.String;
3684
- }>, Schema.Struct<{
3685
- readonly type: Schema.Literal<"file">;
3686
- readonly uri: Schema.String;
3687
- readonly mime: Schema.String;
3688
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
3689
- }>]>>;
3690
- }, "Type">;
3691
- readonly providerMetadata?: {
3692
- readonly [x: string]: {
3693
- readonly [x: string]: unknown;
3694
- };
3672
+ readonly result: {
3673
+ readonly type: "json";
3674
+ readonly value: unknown;
3675
+ } | {
3676
+ readonly type: "text";
3677
+ readonly value: unknown;
3678
+ } | {
3679
+ readonly type: "error";
3680
+ readonly value: unknown;
3681
+ } | {
3682
+ readonly type: "content";
3683
+ readonly value: readonly ({
3684
+ readonly type: "text";
3685
+ readonly text: string;
3686
+ } | {
3687
+ readonly type: "file";
3688
+ readonly uri: string;
3689
+ readonly mime: string;
3690
+ readonly name?: string | undefined;
3691
+ })[];
3692
+ };
3693
+ readonly output?: {
3694
+ readonly structured: unknown;
3695
+ readonly content: readonly ({
3696
+ readonly type: "text";
3697
+ readonly text: string;
3698
+ } | {
3699
+ readonly type: "file";
3700
+ readonly uri: string;
3701
+ readonly mime: string;
3702
+ readonly name?: string | undefined;
3703
+ })[];
3695
3704
  } | undefined;
3696
- readonly providerExecuted?: boolean | undefined;
3697
- readonly output?: Schema.Struct.ReadonlySide<{
3698
- readonly structured: Schema.Unknown;
3699
- readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
3700
- readonly type: Schema.Literal<"text">;
3701
- readonly text: Schema.String;
3702
- }>, Schema.Struct<{
3703
- readonly type: Schema.Literal<"file">;
3704
- readonly uri: Schema.String;
3705
- readonly mime: Schema.String;
3706
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
3707
- }>]>>;
3708
- }, "Type"> | undefined;
3705
+ readonly providerMetadata?: {
3706
+ readonly [x: string]: {
3707
+ readonly [x: string]: unknown;
3708
+ };
3709
+ } | undefined;
3710
+ readonly providerExecuted?: boolean | undefined;
3709
3711
  } | {
3712
+ readonly id: string;
3710
3713
  readonly type: "tool-error";
3711
3714
  readonly name: string;
3712
- readonly id: string;
3713
3715
  readonly message: string;
3714
3716
  readonly error?: unknown;
3715
3717
  readonly providerMetadata?: {
@@ -3753,13 +3755,13 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3753
3755
  readonly classification?: "context-overflow" | undefined;
3754
3756
  }, cases: Cases): Cases[keyof Cases] extends (value: any) => infer R ? import("effect/Unify").Unify<R> : never;
3755
3757
  <Cases extends {
3756
- "step-start": (value: Schema.Struct.ReadonlySide<{
3757
- readonly type: Schema.tag<"step-start">;
3758
- readonly index: Schema.Number;
3759
- }, "Type">) => any;
3758
+ "step-start": (value: {
3759
+ readonly type: "step-start";
3760
+ readonly index: number;
3761
+ }) => any;
3760
3762
  "text-start": (value: {
3761
- readonly type: "text-start";
3762
3763
  readonly id: string;
3764
+ readonly type: "text-start";
3763
3765
  readonly providerMetadata?: {
3764
3766
  readonly [x: string]: {
3765
3767
  readonly [x: string]: unknown;
@@ -3767,9 +3769,9 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3767
3769
  } | undefined;
3768
3770
  }) => any;
3769
3771
  "text-delta": (value: {
3772
+ readonly id: string;
3770
3773
  readonly type: "text-delta";
3771
3774
  readonly text: string;
3772
- readonly id: string;
3773
3775
  readonly providerMetadata?: {
3774
3776
  readonly [x: string]: {
3775
3777
  readonly [x: string]: unknown;
@@ -3777,8 +3779,8 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3777
3779
  } | undefined;
3778
3780
  }) => any;
3779
3781
  "text-end": (value: {
3780
- readonly type: "text-end";
3781
3782
  readonly id: string;
3783
+ readonly type: "text-end";
3782
3784
  readonly providerMetadata?: {
3783
3785
  readonly [x: string]: {
3784
3786
  readonly [x: string]: unknown;
@@ -3786,8 +3788,8 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3786
3788
  } | undefined;
3787
3789
  }) => any;
3788
3790
  "reasoning-start": (value: {
3789
- readonly type: "reasoning-start";
3790
3791
  readonly id: string;
3792
+ readonly type: "reasoning-start";
3791
3793
  readonly providerMetadata?: {
3792
3794
  readonly [x: string]: {
3793
3795
  readonly [x: string]: unknown;
@@ -3795,9 +3797,9 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3795
3797
  } | undefined;
3796
3798
  }) => any;
3797
3799
  "reasoning-delta": (value: {
3800
+ readonly id: string;
3798
3801
  readonly type: "reasoning-delta";
3799
3802
  readonly text: string;
3800
- readonly id: string;
3801
3803
  readonly providerMetadata?: {
3802
3804
  readonly [x: string]: {
3803
3805
  readonly [x: string]: unknown;
@@ -3805,8 +3807,8 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3805
3807
  } | undefined;
3806
3808
  }) => any;
3807
3809
  "reasoning-end": (value: {
3808
- readonly type: "reasoning-end";
3809
3810
  readonly id: string;
3811
+ readonly type: "reasoning-end";
3810
3812
  readonly providerMetadata?: {
3811
3813
  readonly [x: string]: {
3812
3814
  readonly [x: string]: unknown;
@@ -3814,9 +3816,9 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3814
3816
  } | undefined;
3815
3817
  }) => any;
3816
3818
  "tool-input-start": (value: {
3819
+ readonly id: string;
3817
3820
  readonly type: "tool-input-start";
3818
3821
  readonly name: string;
3819
- readonly id: string;
3820
3822
  readonly providerMetadata?: {
3821
3823
  readonly [x: string]: {
3822
3824
  readonly [x: string]: unknown;
@@ -3824,32 +3826,32 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3824
3826
  } | undefined;
3825
3827
  readonly providerExecuted?: boolean | undefined;
3826
3828
  }) => any;
3827
- "tool-input-delta": (value: Schema.Struct.ReadonlySide<{
3828
- readonly type: Schema.tag<"tool-input-delta">;
3829
- readonly id: Schema.String;
3830
- readonly name: Schema.String;
3831
- readonly text: Schema.String;
3832
- }, "Type">) => any;
3829
+ "tool-input-delta": (value: {
3830
+ readonly type: "tool-input-delta";
3831
+ readonly id: string;
3832
+ readonly name: string;
3833
+ readonly text: string;
3834
+ }) => any;
3833
3835
  "tool-input-end": (value: {
3836
+ readonly id: string;
3834
3837
  readonly type: "tool-input-end";
3835
3838
  readonly name: string;
3836
- readonly id: string;
3837
3839
  readonly providerMetadata?: {
3838
3840
  readonly [x: string]: {
3839
3841
  readonly [x: string]: unknown;
3840
3842
  };
3841
3843
  } | undefined;
3842
3844
  }) => any;
3843
- "tool-input-error": (value: Schema.Struct.ReadonlySide<{
3844
- readonly type: Schema.tag<"tool-input-error">;
3845
- readonly id: Schema.String;
3846
- readonly name: Schema.String;
3847
- readonly raw: Schema.String;
3848
- }, "Type">) => any;
3845
+ "tool-input-error": (value: {
3846
+ readonly type: "tool-input-error";
3847
+ readonly id: string;
3848
+ readonly name: string;
3849
+ readonly raw: string;
3850
+ }) => any;
3849
3851
  "tool-call": (value: {
3852
+ readonly id: string;
3850
3853
  readonly type: "tool-call";
3851
3854
  readonly name: string;
3852
- readonly id: string;
3853
3855
  readonly input: unknown;
3854
3856
  readonly providerMetadata?: {
3855
3857
  readonly [x: string]: {
@@ -3859,53 +3861,53 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3859
3861
  readonly providerExecuted?: boolean | undefined;
3860
3862
  }) => any;
3861
3863
  "tool-result": (value: {
3864
+ readonly id: string;
3862
3865
  readonly type: "tool-result";
3863
3866
  readonly name: string;
3864
- readonly id: string;
3865
- readonly result: Schema.Struct.ReadonlySide<{
3866
- readonly type: Schema.Literal<"json">;
3867
- readonly value: Schema.Unknown;
3868
- }, "Type"> | Schema.Struct.ReadonlySide<{
3869
- readonly type: Schema.Literal<"text">;
3870
- readonly value: Schema.Unknown;
3871
- }, "Type"> | Schema.Struct.ReadonlySide<{
3872
- readonly type: Schema.Literal<"error">;
3873
- readonly value: Schema.Unknown;
3874
- }, "Type"> | Schema.Struct.ReadonlySide<{
3875
- readonly type: Schema.Literal<"content">;
3876
- readonly value: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
3877
- readonly type: Schema.Literal<"text">;
3878
- readonly text: Schema.String;
3879
- }>, Schema.Struct<{
3880
- readonly type: Schema.Literal<"file">;
3881
- readonly uri: Schema.String;
3882
- readonly mime: Schema.String;
3883
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
3884
- }>]>>;
3885
- }, "Type">;
3867
+ readonly result: {
3868
+ readonly type: "json";
3869
+ readonly value: unknown;
3870
+ } | {
3871
+ readonly type: "text";
3872
+ readonly value: unknown;
3873
+ } | {
3874
+ readonly type: "error";
3875
+ readonly value: unknown;
3876
+ } | {
3877
+ readonly type: "content";
3878
+ readonly value: readonly ({
3879
+ readonly type: "text";
3880
+ readonly text: string;
3881
+ } | {
3882
+ readonly type: "file";
3883
+ readonly uri: string;
3884
+ readonly mime: string;
3885
+ readonly name?: string | undefined;
3886
+ })[];
3887
+ };
3888
+ readonly output?: {
3889
+ readonly structured: unknown;
3890
+ readonly content: readonly ({
3891
+ readonly type: "text";
3892
+ readonly text: string;
3893
+ } | {
3894
+ readonly type: "file";
3895
+ readonly uri: string;
3896
+ readonly mime: string;
3897
+ readonly name?: string | undefined;
3898
+ })[];
3899
+ } | undefined;
3886
3900
  readonly providerMetadata?: {
3887
3901
  readonly [x: string]: {
3888
3902
  readonly [x: string]: unknown;
3889
3903
  };
3890
3904
  } | undefined;
3891
3905
  readonly providerExecuted?: boolean | undefined;
3892
- readonly output?: Schema.Struct.ReadonlySide<{
3893
- readonly structured: Schema.Unknown;
3894
- readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
3895
- readonly type: Schema.Literal<"text">;
3896
- readonly text: Schema.String;
3897
- }>, Schema.Struct<{
3898
- readonly type: Schema.Literal<"file">;
3899
- readonly uri: Schema.String;
3900
- readonly mime: Schema.String;
3901
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
3902
- }>]>>;
3903
- }, "Type"> | undefined;
3904
3906
  }) => any;
3905
3907
  "tool-error": (value: {
3908
+ readonly id: string;
3906
3909
  readonly type: "tool-error";
3907
3910
  readonly name: string;
3908
- readonly id: string;
3909
3911
  readonly message: string;
3910
3912
  readonly error?: unknown;
3911
3913
  readonly providerMetadata?: {
@@ -3951,92 +3953,92 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3951
3953
  } | undefined;
3952
3954
  readonly classification?: "context-overflow" | undefined;
3953
3955
  }) => any;
3954
- }>(cases: Cases): (value: Schema.Struct.ReadonlySide<{
3955
- readonly type: Schema.tag<"step-start">;
3956
- readonly index: Schema.Number;
3957
- }, "Type"> | {
3958
- readonly type: "text-start";
3956
+ }>(cases: Cases): (value: {
3957
+ readonly type: "step-start";
3958
+ readonly index: number;
3959
+ } | {
3959
3960
  readonly id: string;
3961
+ readonly type: "text-start";
3960
3962
  readonly providerMetadata?: {
3961
3963
  readonly [x: string]: {
3962
3964
  readonly [x: string]: unknown;
3963
3965
  };
3964
3966
  } | undefined;
3965
3967
  } | {
3968
+ readonly id: string;
3966
3969
  readonly type: "text-delta";
3967
3970
  readonly text: string;
3968
- readonly id: string;
3969
3971
  readonly providerMetadata?: {
3970
3972
  readonly [x: string]: {
3971
3973
  readonly [x: string]: unknown;
3972
3974
  };
3973
3975
  } | undefined;
3974
3976
  } | {
3975
- readonly type: "text-end";
3976
3977
  readonly id: string;
3978
+ readonly type: "text-end";
3977
3979
  readonly providerMetadata?: {
3978
3980
  readonly [x: string]: {
3979
3981
  readonly [x: string]: unknown;
3980
3982
  };
3981
3983
  } | undefined;
3982
3984
  } | {
3983
- readonly type: "reasoning-start";
3984
3985
  readonly id: string;
3986
+ readonly type: "reasoning-start";
3985
3987
  readonly providerMetadata?: {
3986
3988
  readonly [x: string]: {
3987
3989
  readonly [x: string]: unknown;
3988
3990
  };
3989
3991
  } | undefined;
3990
3992
  } | {
3993
+ readonly id: string;
3991
3994
  readonly type: "reasoning-delta";
3992
3995
  readonly text: string;
3993
- readonly id: string;
3994
3996
  readonly providerMetadata?: {
3995
3997
  readonly [x: string]: {
3996
3998
  readonly [x: string]: unknown;
3997
3999
  };
3998
4000
  } | undefined;
3999
4001
  } | {
4000
- readonly type: "reasoning-end";
4001
4002
  readonly id: string;
4003
+ readonly type: "reasoning-end";
4002
4004
  readonly providerMetadata?: {
4003
4005
  readonly [x: string]: {
4004
4006
  readonly [x: string]: unknown;
4005
4007
  };
4006
4008
  } | undefined;
4007
4009
  } | {
4010
+ readonly id: string;
4008
4011
  readonly type: "tool-input-start";
4009
4012
  readonly name: string;
4010
- readonly id: string;
4011
4013
  readonly providerMetadata?: {
4012
4014
  readonly [x: string]: {
4013
4015
  readonly [x: string]: unknown;
4014
4016
  };
4015
4017
  } | undefined;
4016
4018
  readonly providerExecuted?: boolean | undefined;
4017
- } | Schema.Struct.ReadonlySide<{
4018
- readonly type: Schema.tag<"tool-input-delta">;
4019
- readonly id: Schema.String;
4020
- readonly name: Schema.String;
4021
- readonly text: Schema.String;
4022
- }, "Type"> | {
4023
- readonly type: "tool-input-end";
4019
+ } | {
4020
+ readonly type: "tool-input-delta";
4021
+ readonly id: string;
4024
4022
  readonly name: string;
4023
+ readonly text: string;
4024
+ } | {
4025
4025
  readonly id: string;
4026
+ readonly type: "tool-input-end";
4027
+ readonly name: string;
4026
4028
  readonly providerMetadata?: {
4027
4029
  readonly [x: string]: {
4028
4030
  readonly [x: string]: unknown;
4029
4031
  };
4030
4032
  } | undefined;
4031
- } | Schema.Struct.ReadonlySide<{
4032
- readonly type: Schema.tag<"tool-input-error">;
4033
- readonly id: Schema.String;
4034
- readonly name: Schema.String;
4035
- readonly raw: Schema.String;
4036
- }, "Type"> | {
4037
- readonly type: "tool-call";
4033
+ } | {
4034
+ readonly type: "tool-input-error";
4035
+ readonly id: string;
4038
4036
  readonly name: string;
4037
+ readonly raw: string;
4038
+ } | {
4039
4039
  readonly id: string;
4040
+ readonly type: "tool-call";
4041
+ readonly name: string;
4040
4042
  readonly input: unknown;
4041
4043
  readonly providerMetadata?: {
4042
4044
  readonly [x: string]: {
@@ -4045,52 +4047,52 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
4045
4047
  } | undefined;
4046
4048
  readonly providerExecuted?: boolean | undefined;
4047
4049
  } | {
4050
+ readonly id: string;
4048
4051
  readonly type: "tool-result";
4049
4052
  readonly name: string;
4050
- readonly id: string;
4051
- readonly result: Schema.Struct.ReadonlySide<{
4052
- readonly type: Schema.Literal<"json">;
4053
- readonly value: Schema.Unknown;
4054
- }, "Type"> | Schema.Struct.ReadonlySide<{
4055
- readonly type: Schema.Literal<"text">;
4056
- readonly value: Schema.Unknown;
4057
- }, "Type"> | Schema.Struct.ReadonlySide<{
4058
- readonly type: Schema.Literal<"error">;
4059
- readonly value: Schema.Unknown;
4060
- }, "Type"> | Schema.Struct.ReadonlySide<{
4061
- readonly type: Schema.Literal<"content">;
4062
- readonly value: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
4063
- readonly type: Schema.Literal<"text">;
4064
- readonly text: Schema.String;
4065
- }>, Schema.Struct<{
4066
- readonly type: Schema.Literal<"file">;
4067
- readonly uri: Schema.String;
4068
- readonly mime: Schema.String;
4069
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
4070
- }>]>>;
4071
- }, "Type">;
4053
+ readonly result: {
4054
+ readonly type: "json";
4055
+ readonly value: unknown;
4056
+ } | {
4057
+ readonly type: "text";
4058
+ readonly value: unknown;
4059
+ } | {
4060
+ readonly type: "error";
4061
+ readonly value: unknown;
4062
+ } | {
4063
+ readonly type: "content";
4064
+ readonly value: readonly ({
4065
+ readonly type: "text";
4066
+ readonly text: string;
4067
+ } | {
4068
+ readonly type: "file";
4069
+ readonly uri: string;
4070
+ readonly mime: string;
4071
+ readonly name?: string | undefined;
4072
+ })[];
4073
+ };
4074
+ readonly output?: {
4075
+ readonly structured: unknown;
4076
+ readonly content: readonly ({
4077
+ readonly type: "text";
4078
+ readonly text: string;
4079
+ } | {
4080
+ readonly type: "file";
4081
+ readonly uri: string;
4082
+ readonly mime: string;
4083
+ readonly name?: string | undefined;
4084
+ })[];
4085
+ } | undefined;
4072
4086
  readonly providerMetadata?: {
4073
4087
  readonly [x: string]: {
4074
4088
  readonly [x: string]: unknown;
4075
4089
  };
4076
4090
  } | undefined;
4077
4091
  readonly providerExecuted?: boolean | undefined;
4078
- readonly output?: Schema.Struct.ReadonlySide<{
4079
- readonly structured: Schema.Unknown;
4080
- readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
4081
- readonly type: Schema.Literal<"text">;
4082
- readonly text: Schema.String;
4083
- }>, Schema.Struct<{
4084
- readonly type: Schema.Literal<"file">;
4085
- readonly uri: Schema.String;
4086
- readonly mime: Schema.String;
4087
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
4088
- }>]>>;
4089
- }, "Type"> | undefined;
4090
4092
  } | {
4093
+ readonly id: string;
4091
4094
  readonly type: "tool-error";
4092
4095
  readonly name: string;
4093
- readonly id: string;
4094
4096
  readonly message: string;
4095
4097
  readonly error?: unknown;
4096
4098
  readonly providerMetadata?: {
@@ -4138,13 +4140,13 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
4138
4140
  stepStart: (input: {
4139
4141
  readonly index: number;
4140
4142
  readonly type?: "step-start" | undefined;
4141
- }, options?: Schema.MakeOptions) => Schema.Struct.ReadonlySide<{
4142
- readonly type: Schema.tag<"step-start">;
4143
- readonly index: Schema.Number;
4144
- }, "Type">;
4143
+ }, options?: Schema.MakeOptions) => {
4144
+ readonly type: "step-start";
4145
+ readonly index: number;
4146
+ };
4145
4147
  textStart: (input: WithID<TextStart, ContentBlockID>) => {
4146
- readonly type: "text-start";
4147
4148
  readonly id: string;
4149
+ readonly type: "text-start";
4148
4150
  readonly providerMetadata?: {
4149
4151
  readonly [x: string]: {
4150
4152
  readonly [x: string]: unknown;
@@ -4152,9 +4154,9 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
4152
4154
  } | undefined;
4153
4155
  };
4154
4156
  textDelta: (input: WithID<TextDelta, ContentBlockID>) => {
4157
+ readonly id: string;
4155
4158
  readonly type: "text-delta";
4156
4159
  readonly text: string;
4157
- readonly id: string;
4158
4160
  readonly providerMetadata?: {
4159
4161
  readonly [x: string]: {
4160
4162
  readonly [x: string]: unknown;
@@ -4162,8 +4164,8 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
4162
4164
  } | undefined;
4163
4165
  };
4164
4166
  textEnd: (input: WithID<TextEnd, ContentBlockID>) => {
4165
- readonly type: "text-end";
4166
4167
  readonly id: string;
4168
+ readonly type: "text-end";
4167
4169
  readonly providerMetadata?: {
4168
4170
  readonly [x: string]: {
4169
4171
  readonly [x: string]: unknown;
@@ -4171,8 +4173,8 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
4171
4173
  } | undefined;
4172
4174
  };
4173
4175
  reasoningStart: (input: WithID<ReasoningStart, ContentBlockID>) => {
4174
- readonly type: "reasoning-start";
4175
4176
  readonly id: string;
4177
+ readonly type: "reasoning-start";
4176
4178
  readonly providerMetadata?: {
4177
4179
  readonly [x: string]: {
4178
4180
  readonly [x: string]: unknown;
@@ -4180,9 +4182,9 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
4180
4182
  } | undefined;
4181
4183
  };
4182
4184
  reasoningDelta: (input: WithID<ReasoningDelta, ContentBlockID>) => {
4185
+ readonly id: string;
4183
4186
  readonly type: "reasoning-delta";
4184
4187
  readonly text: string;
4185
- readonly id: string;
4186
4188
  readonly providerMetadata?: {
4187
4189
  readonly [x: string]: {
4188
4190
  readonly [x: string]: unknown;
@@ -4190,8 +4192,8 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
4190
4192
  } | undefined;
4191
4193
  };
4192
4194
  reasoningEnd: (input: WithID<ReasoningEnd, ContentBlockID>) => {
4193
- readonly type: "reasoning-end";
4194
4195
  readonly id: string;
4196
+ readonly type: "reasoning-end";
4195
4197
  readonly providerMetadata?: {
4196
4198
  readonly [x: string]: {
4197
4199
  readonly [x: string]: unknown;
@@ -4199,9 +4201,9 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
4199
4201
  } | undefined;
4200
4202
  };
4201
4203
  toolInputStart: (input: WithID<ToolInputStart, ToolCallID>) => {
4204
+ readonly id: string;
4202
4205
  readonly type: "tool-input-start";
4203
4206
  readonly name: string;
4204
- readonly id: string;
4205
4207
  readonly providerMetadata?: {
4206
4208
  readonly [x: string]: {
4207
4209
  readonly [x: string]: unknown;
@@ -4209,32 +4211,32 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
4209
4211
  } | undefined;
4210
4212
  readonly providerExecuted?: boolean | undefined;
4211
4213
  };
4212
- toolInputDelta: (input: WithID<ToolInputDelta, ToolCallID>) => Schema.Struct.ReadonlySide<{
4213
- readonly type: Schema.tag<"tool-input-delta">;
4214
- readonly id: Schema.String;
4215
- readonly name: Schema.String;
4216
- readonly text: Schema.String;
4217
- }, "Type">;
4214
+ toolInputDelta: (input: WithID<ToolInputDelta, ToolCallID>) => {
4215
+ readonly type: "tool-input-delta";
4216
+ readonly id: string;
4217
+ readonly name: string;
4218
+ readonly text: string;
4219
+ };
4218
4220
  toolInputEnd: (input: WithID<ToolInputEnd, ToolCallID>) => {
4221
+ readonly id: string;
4219
4222
  readonly type: "tool-input-end";
4220
4223
  readonly name: string;
4221
- readonly id: string;
4222
4224
  readonly providerMetadata?: {
4223
4225
  readonly [x: string]: {
4224
4226
  readonly [x: string]: unknown;
4225
4227
  };
4226
4228
  } | undefined;
4227
4229
  };
4228
- toolInputError: (input: WithID<ToolInputError, ToolCallID>) => Schema.Struct.ReadonlySide<{
4229
- readonly type: Schema.tag<"tool-input-error">;
4230
- readonly id: Schema.String;
4231
- readonly name: Schema.String;
4232
- readonly raw: Schema.String;
4233
- }, "Type">;
4230
+ toolInputError: (input: WithID<ToolInputError, ToolCallID>) => {
4231
+ readonly type: "tool-input-error";
4232
+ readonly id: string;
4233
+ readonly name: string;
4234
+ readonly raw: string;
4235
+ };
4234
4236
  toolCall: (input: WithID<ToolCall, ToolCallID>) => {
4237
+ readonly id: string;
4235
4238
  readonly type: "tool-call";
4236
4239
  readonly name: string;
4237
- readonly id: string;
4238
4240
  readonly input: unknown;
4239
4241
  readonly providerMetadata?: {
4240
4242
  readonly [x: string]: {
@@ -4244,53 +4246,53 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
4244
4246
  readonly providerExecuted?: boolean | undefined;
4245
4247
  };
4246
4248
  toolResult: (input: WithID<ToolResult, ToolCallID>) => {
4249
+ readonly id: string;
4247
4250
  readonly type: "tool-result";
4248
4251
  readonly name: string;
4249
- readonly id: string;
4250
- readonly result: Schema.Struct.ReadonlySide<{
4251
- readonly type: Schema.Literal<"json">;
4252
- readonly value: Schema.Unknown;
4253
- }, "Type"> | Schema.Struct.ReadonlySide<{
4254
- readonly type: Schema.Literal<"text">;
4255
- readonly value: Schema.Unknown;
4256
- }, "Type"> | Schema.Struct.ReadonlySide<{
4257
- readonly type: Schema.Literal<"error">;
4258
- readonly value: Schema.Unknown;
4259
- }, "Type"> | Schema.Struct.ReadonlySide<{
4260
- readonly type: Schema.Literal<"content">;
4261
- readonly value: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
4262
- readonly type: Schema.Literal<"text">;
4263
- readonly text: Schema.String;
4264
- }>, Schema.Struct<{
4265
- readonly type: Schema.Literal<"file">;
4266
- readonly uri: Schema.String;
4267
- readonly mime: Schema.String;
4268
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
4269
- }>]>>;
4270
- }, "Type">;
4252
+ readonly result: {
4253
+ readonly type: "json";
4254
+ readonly value: unknown;
4255
+ } | {
4256
+ readonly type: "text";
4257
+ readonly value: unknown;
4258
+ } | {
4259
+ readonly type: "error";
4260
+ readonly value: unknown;
4261
+ } | {
4262
+ readonly type: "content";
4263
+ readonly value: readonly ({
4264
+ readonly type: "text";
4265
+ readonly text: string;
4266
+ } | {
4267
+ readonly type: "file";
4268
+ readonly uri: string;
4269
+ readonly mime: string;
4270
+ readonly name?: string | undefined;
4271
+ })[];
4272
+ };
4273
+ readonly output?: {
4274
+ readonly structured: unknown;
4275
+ readonly content: readonly ({
4276
+ readonly type: "text";
4277
+ readonly text: string;
4278
+ } | {
4279
+ readonly type: "file";
4280
+ readonly uri: string;
4281
+ readonly mime: string;
4282
+ readonly name?: string | undefined;
4283
+ })[];
4284
+ } | undefined;
4271
4285
  readonly providerMetadata?: {
4272
4286
  readonly [x: string]: {
4273
4287
  readonly [x: string]: unknown;
4274
4288
  };
4275
4289
  } | undefined;
4276
4290
  readonly providerExecuted?: boolean | undefined;
4277
- readonly output?: Schema.Struct.ReadonlySide<{
4278
- readonly structured: Schema.Unknown;
4279
- readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
4280
- readonly type: Schema.Literal<"text">;
4281
- readonly text: Schema.String;
4282
- }>, Schema.Struct<{
4283
- readonly type: Schema.Literal<"file">;
4284
- readonly uri: Schema.String;
4285
- readonly mime: Schema.String;
4286
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
4287
- }>]>>;
4288
- }, "Type"> | undefined;
4289
4291
  };
4290
4292
  toolError: (input: WithID<ToolError, ToolCallID>) => {
4293
+ readonly id: string;
4291
4294
  readonly type: "tool-error";
4292
4295
  readonly name: string;
4293
- readonly id: string;
4294
4296
  readonly message: string;
4295
4297
  readonly error?: unknown;
4296
4298
  readonly providerMetadata?: {
@@ -4346,13 +4348,13 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
4346
4348
  readonly classification?: "context-overflow" | undefined;
4347
4349
  };
4348
4350
  is: {
4349
- stepStart: (u: unknown) => u is Schema.Struct.ReadonlySide<{
4350
- readonly type: Schema.tag<"step-start">;
4351
- readonly index: Schema.Number;
4352
- }, "Type">;
4351
+ stepStart: (u: unknown) => u is {
4352
+ readonly type: "step-start";
4353
+ readonly index: number;
4354
+ };
4353
4355
  textStart: (u: unknown) => u is {
4354
- readonly type: "text-start";
4355
4356
  readonly id: string;
4357
+ readonly type: "text-start";
4356
4358
  readonly providerMetadata?: {
4357
4359
  readonly [x: string]: {
4358
4360
  readonly [x: string]: unknown;
@@ -4360,9 +4362,9 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
4360
4362
  } | undefined;
4361
4363
  };
4362
4364
  textDelta: (u: unknown) => u is {
4365
+ readonly id: string;
4363
4366
  readonly type: "text-delta";
4364
4367
  readonly text: string;
4365
- readonly id: string;
4366
4368
  readonly providerMetadata?: {
4367
4369
  readonly [x: string]: {
4368
4370
  readonly [x: string]: unknown;
@@ -4370,8 +4372,8 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
4370
4372
  } | undefined;
4371
4373
  };
4372
4374
  textEnd: (u: unknown) => u is {
4373
- readonly type: "text-end";
4374
4375
  readonly id: string;
4376
+ readonly type: "text-end";
4375
4377
  readonly providerMetadata?: {
4376
4378
  readonly [x: string]: {
4377
4379
  readonly [x: string]: unknown;
@@ -4379,8 +4381,8 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
4379
4381
  } | undefined;
4380
4382
  };
4381
4383
  reasoningStart: (u: unknown) => u is {
4382
- readonly type: "reasoning-start";
4383
4384
  readonly id: string;
4385
+ readonly type: "reasoning-start";
4384
4386
  readonly providerMetadata?: {
4385
4387
  readonly [x: string]: {
4386
4388
  readonly [x: string]: unknown;
@@ -4388,9 +4390,9 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
4388
4390
  } | undefined;
4389
4391
  };
4390
4392
  reasoningDelta: (u: unknown) => u is {
4393
+ readonly id: string;
4391
4394
  readonly type: "reasoning-delta";
4392
4395
  readonly text: string;
4393
- readonly id: string;
4394
4396
  readonly providerMetadata?: {
4395
4397
  readonly [x: string]: {
4396
4398
  readonly [x: string]: unknown;
@@ -4398,8 +4400,8 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
4398
4400
  } | undefined;
4399
4401
  };
4400
4402
  reasoningEnd: (u: unknown) => u is {
4401
- readonly type: "reasoning-end";
4402
4403
  readonly id: string;
4404
+ readonly type: "reasoning-end";
4403
4405
  readonly providerMetadata?: {
4404
4406
  readonly [x: string]: {
4405
4407
  readonly [x: string]: unknown;
@@ -4407,9 +4409,9 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
4407
4409
  } | undefined;
4408
4410
  };
4409
4411
  toolInputStart: (u: unknown) => u is {
4412
+ readonly id: string;
4410
4413
  readonly type: "tool-input-start";
4411
4414
  readonly name: string;
4412
- readonly id: string;
4413
4415
  readonly providerMetadata?: {
4414
4416
  readonly [x: string]: {
4415
4417
  readonly [x: string]: unknown;
@@ -4417,32 +4419,32 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
4417
4419
  } | undefined;
4418
4420
  readonly providerExecuted?: boolean | undefined;
4419
4421
  };
4420
- toolInputDelta: (u: unknown) => u is Schema.Struct.ReadonlySide<{
4421
- readonly type: Schema.tag<"tool-input-delta">;
4422
- readonly id: Schema.String;
4423
- readonly name: Schema.String;
4424
- readonly text: Schema.String;
4425
- }, "Type">;
4422
+ toolInputDelta: (u: unknown) => u is {
4423
+ readonly type: "tool-input-delta";
4424
+ readonly id: string;
4425
+ readonly name: string;
4426
+ readonly text: string;
4427
+ };
4426
4428
  toolInputEnd: (u: unknown) => u is {
4429
+ readonly id: string;
4427
4430
  readonly type: "tool-input-end";
4428
4431
  readonly name: string;
4429
- readonly id: string;
4430
4432
  readonly providerMetadata?: {
4431
4433
  readonly [x: string]: {
4432
4434
  readonly [x: string]: unknown;
4433
4435
  };
4434
4436
  } | undefined;
4435
4437
  };
4436
- toolInputError: (u: unknown) => u is Schema.Struct.ReadonlySide<{
4437
- readonly type: Schema.tag<"tool-input-error">;
4438
- readonly id: Schema.String;
4439
- readonly name: Schema.String;
4440
- readonly raw: Schema.String;
4441
- }, "Type">;
4438
+ toolInputError: (u: unknown) => u is {
4439
+ readonly type: "tool-input-error";
4440
+ readonly id: string;
4441
+ readonly name: string;
4442
+ readonly raw: string;
4443
+ };
4442
4444
  toolCall: (u: unknown) => u is {
4445
+ readonly id: string;
4443
4446
  readonly type: "tool-call";
4444
4447
  readonly name: string;
4445
- readonly id: string;
4446
4448
  readonly input: unknown;
4447
4449
  readonly providerMetadata?: {
4448
4450
  readonly [x: string]: {
@@ -4452,53 +4454,53 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
4452
4454
  readonly providerExecuted?: boolean | undefined;
4453
4455
  };
4454
4456
  toolResult: (u: unknown) => u is {
4457
+ readonly id: string;
4455
4458
  readonly type: "tool-result";
4456
4459
  readonly name: string;
4457
- readonly id: string;
4458
- readonly result: Schema.Struct.ReadonlySide<{
4459
- readonly type: Schema.Literal<"json">;
4460
- readonly value: Schema.Unknown;
4461
- }, "Type"> | Schema.Struct.ReadonlySide<{
4462
- readonly type: Schema.Literal<"text">;
4463
- readonly value: Schema.Unknown;
4464
- }, "Type"> | Schema.Struct.ReadonlySide<{
4465
- readonly type: Schema.Literal<"error">;
4466
- readonly value: Schema.Unknown;
4467
- }, "Type"> | Schema.Struct.ReadonlySide<{
4468
- readonly type: Schema.Literal<"content">;
4469
- readonly value: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
4470
- readonly type: Schema.Literal<"text">;
4471
- readonly text: Schema.String;
4472
- }>, Schema.Struct<{
4473
- readonly type: Schema.Literal<"file">;
4474
- readonly uri: Schema.String;
4475
- readonly mime: Schema.String;
4476
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
4477
- }>]>>;
4478
- }, "Type">;
4460
+ readonly result: {
4461
+ readonly type: "json";
4462
+ readonly value: unknown;
4463
+ } | {
4464
+ readonly type: "text";
4465
+ readonly value: unknown;
4466
+ } | {
4467
+ readonly type: "error";
4468
+ readonly value: unknown;
4469
+ } | {
4470
+ readonly type: "content";
4471
+ readonly value: readonly ({
4472
+ readonly type: "text";
4473
+ readonly text: string;
4474
+ } | {
4475
+ readonly type: "file";
4476
+ readonly uri: string;
4477
+ readonly mime: string;
4478
+ readonly name?: string | undefined;
4479
+ })[];
4480
+ };
4481
+ readonly output?: {
4482
+ readonly structured: unknown;
4483
+ readonly content: readonly ({
4484
+ readonly type: "text";
4485
+ readonly text: string;
4486
+ } | {
4487
+ readonly type: "file";
4488
+ readonly uri: string;
4489
+ readonly mime: string;
4490
+ readonly name?: string | undefined;
4491
+ })[];
4492
+ } | undefined;
4479
4493
  readonly providerMetadata?: {
4480
4494
  readonly [x: string]: {
4481
4495
  readonly [x: string]: unknown;
4482
4496
  };
4483
4497
  } | undefined;
4484
4498
  readonly providerExecuted?: boolean | undefined;
4485
- readonly output?: Schema.Struct.ReadonlySide<{
4486
- readonly structured: Schema.Unknown;
4487
- readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
4488
- readonly type: Schema.Literal<"text">;
4489
- readonly text: Schema.String;
4490
- }>, Schema.Struct<{
4491
- readonly type: Schema.Literal<"file">;
4492
- readonly uri: Schema.String;
4493
- readonly mime: Schema.String;
4494
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
4495
- }>]>>;
4496
- }, "Type"> | undefined;
4497
4499
  };
4498
4500
  toolError: (u: unknown) => u is {
4501
+ readonly id: string;
4499
4502
  readonly type: "tool-error";
4500
4503
  readonly name: string;
4501
- readonly id: string;
4502
4504
  readonly message: string;
4503
4505
  readonly error?: unknown;
4504
4506
  readonly providerMetadata?: {
@@ -4559,9 +4561,9 @@ export declare class LLMResponse extends LLMResponse_base {
4559
4561
  get reasoning(): string;
4560
4562
  /** Completed tool calls emitted by the provider. */
4561
4563
  get toolCalls(): {
4564
+ readonly id: string;
4562
4565
  readonly type: "tool-call";
4563
4566
  readonly name: string;
4564
- readonly id: string;
4565
4567
  readonly input: unknown;
4566
4568
  readonly providerMetadata?: {
4567
4569
  readonly [x: string]: {
@@ -4591,9 +4593,9 @@ export declare namespace LLMResponse {
4591
4593
  const usage: (response: Output) => Usage | undefined;
4592
4594
  /** Return completed tool calls from a response or collected event list. */
4593
4595
  const toolCalls: (response: Output) => {
4596
+ readonly id: string;
4594
4597
  readonly type: "tool-call";
4595
4598
  readonly name: string;
4596
- readonly id: string;
4597
4599
  readonly input: unknown;
4598
4600
  readonly providerMetadata?: {
4599
4601
  readonly [x: string]: {