@opencode/ai 2.1.3 → 2.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/experimental/evaluation.js +3 -10
- package/dist/image-client.d.ts +8 -8
- package/dist/image.d.ts +148 -148
- package/dist/promise.d.ts +120 -120
- package/dist/protocols/alibaba-chat.d.ts +12 -12
- package/dist/protocols/alibaba-messages.d.ts +11 -11
- package/dist/protocols/alibaba-responses.d.ts +35 -35
- package/dist/protocols/anthropic-messages.d.ts +40 -44
- package/dist/protocols/anthropic-messages.js +3 -3
- package/dist/protocols/bedrock-converse.d.ts +30 -32
- package/dist/protocols/bedrock-converse.js +2 -3
- package/dist/protocols/cartesia-speech.d.ts +32 -32
- package/dist/protocols/cohere-chat.d.ts +7 -8
- package/dist/protocols/deepgram-speech.d.ts +32 -32
- package/dist/protocols/elevenlabs-speech.d.ts +32 -32
- package/dist/protocols/gemini.d.ts +34 -34
- package/dist/protocols/gemini.js +2 -2
- package/dist/protocols/google-interactions.d.ts +14 -14
- package/dist/protocols/google-interactions.js +2 -2
- package/dist/protocols/google-speech.d.ts +32 -32
- package/dist/protocols/google-transcription.d.ts +32 -32
- package/dist/protocols/meta-messages.d.ts +23 -23
- package/dist/protocols/meta-responses.d.ts +78 -78
- package/dist/protocols/mistral-chat.d.ts +81 -78
- package/dist/protocols/mistral-chat.js +2 -1
- package/dist/protocols/open-responses-channel.js +47 -46
- package/dist/protocols/open-responses-continuation.d.ts +8 -2
- package/dist/protocols/open-responses-continuation.js +3 -1
- package/dist/protocols/open-responses.d.ts +398 -398
- package/dist/protocols/open-responses.js +8 -7
- package/dist/protocols/openai-chat.d.ts +60 -60
- package/dist/protocols/openai-chat.js +3 -3
- package/dist/protocols/openai-compatible-chat.d.ts +13 -14
- package/dist/protocols/openai-compatible-responses.d.ts +36 -37
- package/dist/protocols/openai-images.d.ts +32 -32
- package/dist/protocols/openai-responses.d.ts +235 -235
- package/dist/protocols/openai-responses.js +1 -1
- package/dist/protocols/openai-speech.d.ts +32 -32
- package/dist/protocols/openai-transcription.d.ts +32 -32
- package/dist/protocols/openai-transcription.js +12 -7
- package/dist/protocols/utils/partial-json-options.d.ts +0 -1
- package/dist/protocols/utils/partial-json-options.js +0 -1
- package/dist/protocols/utils/tool-stream.d.ts +1 -1
- package/dist/protocols/venice-chat.d.ts +52 -53
- package/dist/protocols/venice-chat.js +6 -5
- package/dist/protocols/xai-responses.d.ts +78 -78
- package/dist/protocols/zai-chat.d.ts +33 -30
- package/dist/protocols/zai-chat.js +8 -3
- package/dist/protocols/zai-messages.d.ts +21 -19
- package/dist/protocols/zai-messages.js +3 -2
- package/dist/provider-error.js +5 -3
- package/dist/providers/alibaba.d.ts +69 -69
- package/dist/providers/amazon-bedrock-mantle.d.ts +202 -202
- package/dist/providers/amazon-bedrock.d.ts +15 -15
- package/dist/providers/anthropic-compatible.d.ts +13 -13
- package/dist/providers/anthropic.d.ts +13 -13
- package/dist/providers/azure.d.ts +106 -106
- package/dist/providers/baseten.d.ts +24 -24
- package/dist/providers/cerebras.d.ts +24 -24
- package/dist/providers/cloudflare-ai-gateway.d.ts +230 -227
- package/dist/providers/cloudflare-ai-gateway.js +1 -2
- package/dist/providers/cloudflare-workers-ai.d.ts +24 -24
- package/dist/providers/cohere.d.ts +75 -75
- package/dist/providers/deepinfra.d.ts +24 -24
- package/dist/providers/deepseek.d.ts +24 -24
- package/dist/providers/digitalocean.d.ts +36 -36
- package/dist/providers/fireworks.d.ts +24 -24
- package/dist/providers/google-vertex-chat.d.ts +12 -12
- package/dist/providers/google-vertex-messages.d.ts +13 -13
- package/dist/providers/google-vertex-mistral.d.ts +17 -17
- package/dist/providers/google-vertex-responses.d.ts +35 -35
- package/dist/providers/google-vertex.d.ts +17 -17
- package/dist/providers/google-vertex.js +2 -2
- package/dist/providers/google.d.ts +17 -17
- package/dist/providers/groq.d.ts +24 -24
- package/dist/providers/meta.d.ts +179 -179
- package/dist/providers/minimax.d.ts +71 -71
- package/dist/providers/mistral.d.ts +28 -28
- package/dist/providers/moonshot.d.ts +202 -202
- package/dist/providers/open-responses-options.d.ts +0 -1
- package/dist/providers/open-responses-options.js +1 -1
- package/dist/providers/openai-compatible-responses.d.ts +35 -35
- package/dist/providers/openai-compatible.d.ts +12 -12
- package/dist/providers/openai-compatible.js +1 -1
- package/dist/providers/openai-options.d.ts +0 -1
- package/dist/providers/openai-options.js +0 -1
- package/dist/providers/openai.d.ts +100 -100
- package/dist/providers/openrouter.d.ts +36 -36
- package/dist/providers/togetherai.d.ts +24 -24
- package/dist/providers/venice.d.ts +195 -20
- package/dist/providers/xai.d.ts +12 -12
- package/dist/providers/zai-coding-plan.d.ts +149 -69
- package/dist/providers/zai.d.ts +84 -19
- package/dist/route/auth-options.d.ts +0 -3
- package/dist/route/auth.d.ts +0 -2
- package/dist/route/auth.js +0 -2
- package/dist/route/client.d.ts +0 -2
- package/dist/route/client.js +3 -4
- package/dist/route/executor-service.js +1 -1
- package/dist/speech-client.d.ts +8 -8
- package/dist/speech.d.ts +148 -148
- package/dist/transcription-client.d.ts +8 -8
- package/dist/transcription.d.ts +148 -148
- package/dist/video-client.d.ts +8 -8
- package/dist/video.d.ts +114 -114
- package/package.json +6 -5
package/dist/video.d.ts
CHANGED
|
@@ -589,6 +589,10 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
589
589
|
}>;
|
|
590
590
|
};
|
|
591
591
|
readonly isAnyOf: <const Keys>(keys: readonly Keys[]) => (value: {
|
|
592
|
+
readonly type: "video";
|
|
593
|
+
readonly index: number;
|
|
594
|
+
readonly video: Media.Asset;
|
|
595
|
+
} | {
|
|
592
596
|
readonly type: "generation-queued";
|
|
593
597
|
readonly id: string;
|
|
594
598
|
readonly position?: number | undefined;
|
|
@@ -596,21 +600,9 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
596
600
|
readonly type: "generation-progress";
|
|
597
601
|
readonly id: string;
|
|
598
602
|
readonly progress?: number | undefined;
|
|
599
|
-
} | {
|
|
600
|
-
readonly type: "video";
|
|
601
|
-
readonly index: number;
|
|
602
|
-
readonly video: Media.Asset;
|
|
603
603
|
} | {
|
|
604
604
|
readonly type: "finish";
|
|
605
605
|
readonly usage?: {
|
|
606
|
-
readonly type: "tokens";
|
|
607
|
-
readonly input?: number | undefined;
|
|
608
|
-
readonly output?: number | undefined;
|
|
609
|
-
readonly total?: number | undefined;
|
|
610
|
-
readonly details?: {
|
|
611
|
-
readonly [x: string]: unknown;
|
|
612
|
-
} | undefined;
|
|
613
|
-
} | {
|
|
614
606
|
readonly type: "seconds";
|
|
615
607
|
readonly seconds: number;
|
|
616
608
|
} | {
|
|
@@ -622,6 +614,14 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
622
614
|
} | {
|
|
623
615
|
readonly type: "compute";
|
|
624
616
|
readonly seconds: number;
|
|
617
|
+
} | {
|
|
618
|
+
readonly type: "tokens";
|
|
619
|
+
readonly input?: number | undefined;
|
|
620
|
+
readonly output?: number | undefined;
|
|
621
|
+
readonly total?: number | undefined;
|
|
622
|
+
readonly details?: {
|
|
623
|
+
readonly [x: string]: unknown;
|
|
624
|
+
} | undefined;
|
|
625
625
|
} | undefined;
|
|
626
626
|
readonly notices?: readonly {
|
|
627
627
|
readonly type: "filtered" | "moderated" | "other";
|
|
@@ -638,6 +638,12 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
638
638
|
};
|
|
639
639
|
} | undefined;
|
|
640
640
|
}) => value is Extract<{
|
|
641
|
+
readonly type: "video";
|
|
642
|
+
readonly index: number;
|
|
643
|
+
readonly video: Media.Asset;
|
|
644
|
+
}, {
|
|
645
|
+
readonly type: Keys;
|
|
646
|
+
}> | Extract<{
|
|
641
647
|
readonly type: "generation-queued";
|
|
642
648
|
readonly id: string;
|
|
643
649
|
readonly position?: number | undefined;
|
|
@@ -649,23 +655,9 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
649
655
|
readonly progress?: number | undefined;
|
|
650
656
|
}, {
|
|
651
657
|
readonly type: Keys;
|
|
652
|
-
}> | Extract<{
|
|
653
|
-
readonly type: "video";
|
|
654
|
-
readonly index: number;
|
|
655
|
-
readonly video: Media.Asset;
|
|
656
|
-
}, {
|
|
657
|
-
readonly type: Keys;
|
|
658
658
|
}> | Extract<{
|
|
659
659
|
readonly type: "finish";
|
|
660
660
|
readonly usage?: {
|
|
661
|
-
readonly type: "tokens";
|
|
662
|
-
readonly input?: number | undefined;
|
|
663
|
-
readonly output?: number | undefined;
|
|
664
|
-
readonly total?: number | undefined;
|
|
665
|
-
readonly details?: {
|
|
666
|
-
readonly [x: string]: unknown;
|
|
667
|
-
} | undefined;
|
|
668
|
-
} | {
|
|
669
661
|
readonly type: "seconds";
|
|
670
662
|
readonly seconds: number;
|
|
671
663
|
} | {
|
|
@@ -677,6 +669,14 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
677
669
|
} | {
|
|
678
670
|
readonly type: "compute";
|
|
679
671
|
readonly seconds: number;
|
|
672
|
+
} | {
|
|
673
|
+
readonly type: "tokens";
|
|
674
|
+
readonly input?: number | undefined;
|
|
675
|
+
readonly output?: number | undefined;
|
|
676
|
+
readonly total?: number | undefined;
|
|
677
|
+
readonly details?: {
|
|
678
|
+
readonly [x: string]: unknown;
|
|
679
|
+
} | undefined;
|
|
680
680
|
} | undefined;
|
|
681
681
|
readonly notices?: readonly {
|
|
682
682
|
readonly type: "filtered" | "moderated" | "other";
|
|
@@ -699,14 +699,6 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
699
699
|
finish: (u: unknown) => u is {
|
|
700
700
|
readonly type: "finish";
|
|
701
701
|
readonly usage?: {
|
|
702
|
-
readonly type: "tokens";
|
|
703
|
-
readonly input?: number | undefined;
|
|
704
|
-
readonly output?: number | undefined;
|
|
705
|
-
readonly total?: number | undefined;
|
|
706
|
-
readonly details?: {
|
|
707
|
-
readonly [x: string]: unknown;
|
|
708
|
-
} | undefined;
|
|
709
|
-
} | {
|
|
710
702
|
readonly type: "seconds";
|
|
711
703
|
readonly seconds: number;
|
|
712
704
|
} | {
|
|
@@ -718,6 +710,14 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
718
710
|
} | {
|
|
719
711
|
readonly type: "compute";
|
|
720
712
|
readonly seconds: number;
|
|
713
|
+
} | {
|
|
714
|
+
readonly type: "tokens";
|
|
715
|
+
readonly input?: number | undefined;
|
|
716
|
+
readonly output?: number | undefined;
|
|
717
|
+
readonly total?: number | undefined;
|
|
718
|
+
readonly details?: {
|
|
719
|
+
readonly [x: string]: unknown;
|
|
720
|
+
} | undefined;
|
|
721
721
|
} | undefined;
|
|
722
722
|
readonly notices?: readonly {
|
|
723
723
|
readonly type: "filtered" | "moderated" | "other";
|
|
@@ -821,6 +821,10 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
821
821
|
}>>>;
|
|
822
822
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
823
823
|
}> as M["Type"]["type"]]: (value: M["Type"]) => any; }>(value: {
|
|
824
|
+
readonly type: "video";
|
|
825
|
+
readonly index: number;
|
|
826
|
+
readonly video: Media.Asset;
|
|
827
|
+
} | {
|
|
824
828
|
readonly type: "generation-queued";
|
|
825
829
|
readonly id: string;
|
|
826
830
|
readonly position?: number | undefined;
|
|
@@ -828,21 +832,9 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
828
832
|
readonly type: "generation-progress";
|
|
829
833
|
readonly id: string;
|
|
830
834
|
readonly progress?: number | undefined;
|
|
831
|
-
} | {
|
|
832
|
-
readonly type: "video";
|
|
833
|
-
readonly index: number;
|
|
834
|
-
readonly video: Media.Asset;
|
|
835
835
|
} | {
|
|
836
836
|
readonly type: "finish";
|
|
837
837
|
readonly usage?: {
|
|
838
|
-
readonly type: "tokens";
|
|
839
|
-
readonly input?: number | undefined;
|
|
840
|
-
readonly output?: number | undefined;
|
|
841
|
-
readonly total?: number | undefined;
|
|
842
|
-
readonly details?: {
|
|
843
|
-
readonly [x: string]: unknown;
|
|
844
|
-
} | undefined;
|
|
845
|
-
} | {
|
|
846
838
|
readonly type: "seconds";
|
|
847
839
|
readonly seconds: number;
|
|
848
840
|
} | {
|
|
@@ -854,6 +846,14 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
854
846
|
} | {
|
|
855
847
|
readonly type: "compute";
|
|
856
848
|
readonly seconds: number;
|
|
849
|
+
} | {
|
|
850
|
+
readonly type: "tokens";
|
|
851
|
+
readonly input?: number | undefined;
|
|
852
|
+
readonly output?: number | undefined;
|
|
853
|
+
readonly total?: number | undefined;
|
|
854
|
+
readonly details?: {
|
|
855
|
+
readonly [x: string]: unknown;
|
|
856
|
+
} | undefined;
|
|
857
857
|
} | undefined;
|
|
858
858
|
readonly notices?: readonly {
|
|
859
859
|
readonly type: "filtered" | "moderated" | "other";
|
|
@@ -940,6 +940,10 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
940
940
|
}>>>;
|
|
941
941
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
942
942
|
}> as M["Type"]["type"]]: (value: M["Type"]) => any; }>(cases: Cases): (value: {
|
|
943
|
+
readonly type: "video";
|
|
944
|
+
readonly index: number;
|
|
945
|
+
readonly video: Media.Asset;
|
|
946
|
+
} | {
|
|
943
947
|
readonly type: "generation-queued";
|
|
944
948
|
readonly id: string;
|
|
945
949
|
readonly position?: number | undefined;
|
|
@@ -947,21 +951,9 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
947
951
|
readonly type: "generation-progress";
|
|
948
952
|
readonly id: string;
|
|
949
953
|
readonly progress?: number | undefined;
|
|
950
|
-
} | {
|
|
951
|
-
readonly type: "video";
|
|
952
|
-
readonly index: number;
|
|
953
|
-
readonly video: Media.Asset;
|
|
954
954
|
} | {
|
|
955
955
|
readonly type: "finish";
|
|
956
956
|
readonly usage?: {
|
|
957
|
-
readonly type: "tokens";
|
|
958
|
-
readonly input?: number | undefined;
|
|
959
|
-
readonly output?: number | undefined;
|
|
960
|
-
readonly total?: number | undefined;
|
|
961
|
-
readonly details?: {
|
|
962
|
-
readonly [x: string]: unknown;
|
|
963
|
-
} | undefined;
|
|
964
|
-
} | {
|
|
965
957
|
readonly type: "seconds";
|
|
966
958
|
readonly seconds: number;
|
|
967
959
|
} | {
|
|
@@ -973,6 +965,14 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
973
965
|
} | {
|
|
974
966
|
readonly type: "compute";
|
|
975
967
|
readonly seconds: number;
|
|
968
|
+
} | {
|
|
969
|
+
readonly type: "tokens";
|
|
970
|
+
readonly input?: number | undefined;
|
|
971
|
+
readonly output?: number | undefined;
|
|
972
|
+
readonly total?: number | undefined;
|
|
973
|
+
readonly details?: {
|
|
974
|
+
readonly [x: string]: unknown;
|
|
975
|
+
} | undefined;
|
|
976
976
|
} | undefined;
|
|
977
977
|
readonly notices?: readonly {
|
|
978
978
|
readonly type: "filtered" | "moderated" | "other";
|
|
@@ -1061,6 +1061,10 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1061
1061
|
}>>>;
|
|
1062
1062
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
1063
1063
|
}> as M["Type"]["type"]]+?: (value: M["Type"]) => any; } & { [K in Exclude<keyof Cases, "finish" | "generation-progress" | "generation-queued" | "video">]: never; }, OrElse extends (value: Exclude<{
|
|
1064
|
+
readonly type: "video";
|
|
1065
|
+
readonly index: number;
|
|
1066
|
+
readonly video: Media.Asset;
|
|
1067
|
+
} | {
|
|
1064
1068
|
readonly type: "generation-queued";
|
|
1065
1069
|
readonly id: string;
|
|
1066
1070
|
readonly position?: number | undefined;
|
|
@@ -1068,21 +1072,9 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1068
1072
|
readonly type: "generation-progress";
|
|
1069
1073
|
readonly id: string;
|
|
1070
1074
|
readonly progress?: number | undefined;
|
|
1071
|
-
} | {
|
|
1072
|
-
readonly type: "video";
|
|
1073
|
-
readonly index: number;
|
|
1074
|
-
readonly video: Media.Asset;
|
|
1075
1075
|
} | {
|
|
1076
1076
|
readonly type: "finish";
|
|
1077
1077
|
readonly usage?: {
|
|
1078
|
-
readonly type: "tokens";
|
|
1079
|
-
readonly input?: number | undefined;
|
|
1080
|
-
readonly output?: number | undefined;
|
|
1081
|
-
readonly total?: number | undefined;
|
|
1082
|
-
readonly details?: {
|
|
1083
|
-
readonly [x: string]: unknown;
|
|
1084
|
-
} | undefined;
|
|
1085
|
-
} | {
|
|
1086
1078
|
readonly type: "seconds";
|
|
1087
1079
|
readonly seconds: number;
|
|
1088
1080
|
} | {
|
|
@@ -1094,6 +1086,14 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1094
1086
|
} | {
|
|
1095
1087
|
readonly type: "compute";
|
|
1096
1088
|
readonly seconds: number;
|
|
1089
|
+
} | {
|
|
1090
|
+
readonly type: "tokens";
|
|
1091
|
+
readonly input?: number | undefined;
|
|
1092
|
+
readonly output?: number | undefined;
|
|
1093
|
+
readonly total?: number | undefined;
|
|
1094
|
+
readonly details?: {
|
|
1095
|
+
readonly [x: string]: unknown;
|
|
1096
|
+
} | undefined;
|
|
1097
1097
|
} | undefined;
|
|
1098
1098
|
readonly notices?: readonly {
|
|
1099
1099
|
readonly type: "filtered" | "moderated" | "other";
|
|
@@ -1110,6 +1110,10 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1110
1110
|
};
|
|
1111
1111
|
} | undefined;
|
|
1112
1112
|
}, { readonly [K in "type"]: keyof Cases; }>) => any>(value: {
|
|
1113
|
+
readonly type: "video";
|
|
1114
|
+
readonly index: number;
|
|
1115
|
+
readonly video: Media.Asset;
|
|
1116
|
+
} | {
|
|
1113
1117
|
readonly type: "generation-queued";
|
|
1114
1118
|
readonly id: string;
|
|
1115
1119
|
readonly position?: number | undefined;
|
|
@@ -1117,21 +1121,9 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1117
1121
|
readonly type: "generation-progress";
|
|
1118
1122
|
readonly id: string;
|
|
1119
1123
|
readonly progress?: number | undefined;
|
|
1120
|
-
} | {
|
|
1121
|
-
readonly type: "video";
|
|
1122
|
-
readonly index: number;
|
|
1123
|
-
readonly video: Media.Asset;
|
|
1124
1124
|
} | {
|
|
1125
1125
|
readonly type: "finish";
|
|
1126
1126
|
readonly usage?: {
|
|
1127
|
-
readonly type: "tokens";
|
|
1128
|
-
readonly input?: number | undefined;
|
|
1129
|
-
readonly output?: number | undefined;
|
|
1130
|
-
readonly total?: number | undefined;
|
|
1131
|
-
readonly details?: {
|
|
1132
|
-
readonly [x: string]: unknown;
|
|
1133
|
-
} | undefined;
|
|
1134
|
-
} | {
|
|
1135
1127
|
readonly type: "seconds";
|
|
1136
1128
|
readonly seconds: number;
|
|
1137
1129
|
} | {
|
|
@@ -1143,6 +1135,14 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1143
1135
|
} | {
|
|
1144
1136
|
readonly type: "compute";
|
|
1145
1137
|
readonly seconds: number;
|
|
1138
|
+
} | {
|
|
1139
|
+
readonly type: "tokens";
|
|
1140
|
+
readonly input?: number | undefined;
|
|
1141
|
+
readonly output?: number | undefined;
|
|
1142
|
+
readonly total?: number | undefined;
|
|
1143
|
+
readonly details?: {
|
|
1144
|
+
readonly [x: string]: unknown;
|
|
1145
|
+
} | undefined;
|
|
1146
1146
|
} | undefined;
|
|
1147
1147
|
readonly notices?: readonly {
|
|
1148
1148
|
readonly type: "filtered" | "moderated" | "other";
|
|
@@ -1229,6 +1229,10 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1229
1229
|
}>>>;
|
|
1230
1230
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
1231
1231
|
}> as M["Type"]["type"]]+?: (value: M["Type"]) => any; } & { [K in Exclude<keyof Cases, "finish" | "generation-progress" | "generation-queued" | "video">]: never; }, OrElse extends (value: Exclude<{
|
|
1232
|
+
readonly type: "video";
|
|
1233
|
+
readonly index: number;
|
|
1234
|
+
readonly video: Media.Asset;
|
|
1235
|
+
} | {
|
|
1232
1236
|
readonly type: "generation-queued";
|
|
1233
1237
|
readonly id: string;
|
|
1234
1238
|
readonly position?: number | undefined;
|
|
@@ -1236,21 +1240,9 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1236
1240
|
readonly type: "generation-progress";
|
|
1237
1241
|
readonly id: string;
|
|
1238
1242
|
readonly progress?: number | undefined;
|
|
1239
|
-
} | {
|
|
1240
|
-
readonly type: "video";
|
|
1241
|
-
readonly index: number;
|
|
1242
|
-
readonly video: Media.Asset;
|
|
1243
1243
|
} | {
|
|
1244
1244
|
readonly type: "finish";
|
|
1245
1245
|
readonly usage?: {
|
|
1246
|
-
readonly type: "tokens";
|
|
1247
|
-
readonly input?: number | undefined;
|
|
1248
|
-
readonly output?: number | undefined;
|
|
1249
|
-
readonly total?: number | undefined;
|
|
1250
|
-
readonly details?: {
|
|
1251
|
-
readonly [x: string]: unknown;
|
|
1252
|
-
} | undefined;
|
|
1253
|
-
} | {
|
|
1254
1246
|
readonly type: "seconds";
|
|
1255
1247
|
readonly seconds: number;
|
|
1256
1248
|
} | {
|
|
@@ -1262,6 +1254,14 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1262
1254
|
} | {
|
|
1263
1255
|
readonly type: "compute";
|
|
1264
1256
|
readonly seconds: number;
|
|
1257
|
+
} | {
|
|
1258
|
+
readonly type: "tokens";
|
|
1259
|
+
readonly input?: number | undefined;
|
|
1260
|
+
readonly output?: number | undefined;
|
|
1261
|
+
readonly total?: number | undefined;
|
|
1262
|
+
readonly details?: {
|
|
1263
|
+
readonly [x: string]: unknown;
|
|
1264
|
+
} | undefined;
|
|
1265
1265
|
} | undefined;
|
|
1266
1266
|
readonly notices?: readonly {
|
|
1267
1267
|
readonly type: "filtered" | "moderated" | "other";
|
|
@@ -1278,6 +1278,10 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1278
1278
|
};
|
|
1279
1279
|
} | undefined;
|
|
1280
1280
|
}, { readonly [K in "type"]: keyof Cases; }>) => any>(cases: Cases, orElse: OrElse): (value: {
|
|
1281
|
+
readonly type: "video";
|
|
1282
|
+
readonly index: number;
|
|
1283
|
+
readonly video: Media.Asset;
|
|
1284
|
+
} | {
|
|
1281
1285
|
readonly type: "generation-queued";
|
|
1282
1286
|
readonly id: string;
|
|
1283
1287
|
readonly position?: number | undefined;
|
|
@@ -1285,21 +1289,9 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1285
1289
|
readonly type: "generation-progress";
|
|
1286
1290
|
readonly id: string;
|
|
1287
1291
|
readonly progress?: number | undefined;
|
|
1288
|
-
} | {
|
|
1289
|
-
readonly type: "video";
|
|
1290
|
-
readonly index: number;
|
|
1291
|
-
readonly video: Media.Asset;
|
|
1292
1292
|
} | {
|
|
1293
1293
|
readonly type: "finish";
|
|
1294
1294
|
readonly usage?: {
|
|
1295
|
-
readonly type: "tokens";
|
|
1296
|
-
readonly input?: number | undefined;
|
|
1297
|
-
readonly output?: number | undefined;
|
|
1298
|
-
readonly total?: number | undefined;
|
|
1299
|
-
readonly details?: {
|
|
1300
|
-
readonly [x: string]: unknown;
|
|
1301
|
-
} | undefined;
|
|
1302
|
-
} | {
|
|
1303
1295
|
readonly type: "seconds";
|
|
1304
1296
|
readonly seconds: number;
|
|
1305
1297
|
} | {
|
|
@@ -1311,6 +1303,14 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1311
1303
|
} | {
|
|
1312
1304
|
readonly type: "compute";
|
|
1313
1305
|
readonly seconds: number;
|
|
1306
|
+
} | {
|
|
1307
|
+
readonly type: "tokens";
|
|
1308
|
+
readonly input?: number | undefined;
|
|
1309
|
+
readonly output?: number | undefined;
|
|
1310
|
+
readonly total?: number | undefined;
|
|
1311
|
+
readonly details?: {
|
|
1312
|
+
readonly [x: string]: unknown;
|
|
1313
|
+
} | undefined;
|
|
1314
1314
|
} | undefined;
|
|
1315
1315
|
readonly notices?: readonly {
|
|
1316
1316
|
readonly type: "filtered" | "moderated" | "other";
|
|
@@ -1348,14 +1348,6 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1348
1348
|
finish: (u: unknown) => u is {
|
|
1349
1349
|
readonly type: "finish";
|
|
1350
1350
|
readonly usage?: {
|
|
1351
|
-
readonly type: "tokens";
|
|
1352
|
-
readonly input?: number | undefined;
|
|
1353
|
-
readonly output?: number | undefined;
|
|
1354
|
-
readonly total?: number | undefined;
|
|
1355
|
-
readonly details?: {
|
|
1356
|
-
readonly [x: string]: unknown;
|
|
1357
|
-
} | undefined;
|
|
1358
|
-
} | {
|
|
1359
1351
|
readonly type: "seconds";
|
|
1360
1352
|
readonly seconds: number;
|
|
1361
1353
|
} | {
|
|
@@ -1367,6 +1359,14 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1367
1359
|
} | {
|
|
1368
1360
|
readonly type: "compute";
|
|
1369
1361
|
readonly seconds: number;
|
|
1362
|
+
} | {
|
|
1363
|
+
readonly type: "tokens";
|
|
1364
|
+
readonly input?: number | undefined;
|
|
1365
|
+
readonly output?: number | undefined;
|
|
1366
|
+
readonly total?: number | undefined;
|
|
1367
|
+
readonly details?: {
|
|
1368
|
+
readonly [x: string]: unknown;
|
|
1369
|
+
} | undefined;
|
|
1370
1370
|
} | undefined;
|
|
1371
1371
|
readonly notices?: readonly {
|
|
1372
1372
|
readonly type: "filtered" | "moderated" | "other";
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.4",
|
|
4
4
|
"name": "@opencode/ai",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"setup:recording-env": "bun run script/setup-recording-env.ts",
|
|
9
9
|
"test": "bun test --timeout 30000 --only-failures",
|
|
10
|
-
"typecheck": "
|
|
10
|
+
"typecheck": "bun check --no-script && bun check --no-script -p tsconfig.types.json",
|
|
11
|
+
"typecheck:tsc": "tsc --noEmit && tsc --noEmit -p tsconfig.types.json",
|
|
11
12
|
"build": "tsc -p tsconfig.build.json"
|
|
12
13
|
},
|
|
13
14
|
"files": [
|
|
@@ -34,17 +35,17 @@
|
|
|
34
35
|
"devDependencies": {
|
|
35
36
|
"@clack/prompts": "1.0.0-alpha.1",
|
|
36
37
|
"@effect/platform-node": "4.0.1",
|
|
37
|
-
"@opencode/http-recorder": "2.1.
|
|
38
|
+
"@opencode/http-recorder": "2.1.4",
|
|
38
39
|
"@tsconfig/bun": "1.0.9",
|
|
39
40
|
"@types/bun": "1.4.3",
|
|
40
|
-
"@typescript/native": "npm:typescript@7.0
|
|
41
|
+
"@typescript/native": "npm:typescript@7.1.0-beta",
|
|
41
42
|
"typescript": "npm:@typescript/typescript6@6.0.2"
|
|
42
43
|
},
|
|
43
44
|
"dependencies": {
|
|
44
45
|
"@aws-sdk/credential-providers": "3.1057.0",
|
|
45
46
|
"@smithy/eventstream-codec": "4.2.14",
|
|
46
47
|
"@smithy/util-utf8": "4.2.2",
|
|
47
|
-
"@opencode/schema": "2.1.
|
|
48
|
+
"@opencode/schema": "2.1.4",
|
|
48
49
|
"aws4fetch": "1.0.20",
|
|
49
50
|
"effect": "4.0.1",
|
|
50
51
|
"google-auth-library": "10.5.0"
|