@opencode/ai 0.0.0-dev-416 → 0.0.0-dev-425
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/README.md +2 -0
- package/dist/image.d.ts +336 -400
- package/dist/providers/alibaba.d.ts +1 -1
- package/dist/providers/anthropic-compatible.d.ts +2 -2
- package/dist/providers/anthropic-compatible.js +2 -5
- package/dist/providers/anthropic.d.ts +2 -2
- package/dist/providers/anthropic.js +2 -7
- package/dist/providers/assemblyai.d.ts +1 -1
- package/dist/providers/assemblyai.js +2 -7
- package/dist/providers/azure.d.ts +1 -1
- package/dist/providers/azure.js +2 -4
- package/dist/providers/baseten.d.ts +1 -1
- package/dist/providers/cerebras.d.ts +1 -1
- package/dist/providers/cloudflare-ai-gateway.d.ts +2 -2
- package/dist/providers/cloudflare-ai-gateway.js +4 -5
- package/dist/providers/cloudflare-workers-ai.d.ts +1 -1
- package/dist/providers/cohere.d.ts +1 -1
- package/dist/providers/deepgram.d.ts +1 -1
- package/dist/providers/deepgram.js +2 -7
- package/dist/providers/deepinfra.d.ts +1 -1
- package/dist/providers/deepseek.d.ts +1 -1
- package/dist/providers/digitalocean.d.ts +1 -1
- package/dist/providers/elevenlabs.d.ts +1 -1
- package/dist/providers/elevenlabs.js +2 -7
- package/dist/providers/fireworks.d.ts +1 -1
- package/dist/providers/google/interactions.d.ts +1 -1
- package/dist/providers/google.d.ts +2 -2
- package/dist/providers/google.js +2 -7
- package/dist/providers/groq.d.ts +1 -1
- package/dist/providers/meta.d.ts +1 -1
- package/dist/providers/minimax.d.ts +1 -1
- package/dist/providers/mistral.d.ts +1 -1
- package/dist/providers/moonshot.d.ts +1 -1
- package/dist/providers/openai-compatible-responses.d.ts +1 -1
- package/dist/providers/openai-compatible.d.ts +1 -1
- package/dist/providers/openai.d.ts +1 -1
- package/dist/providers/opencode.d.ts +1 -1
- package/dist/providers/openrouter.d.ts +1 -1
- package/dist/providers/togetherai.d.ts +1 -1
- package/dist/providers/typesafe-ai.d.ts +1 -1
- package/dist/providers/venice.d.ts +1 -1
- package/dist/providers/vercel-ai-gateway.d.ts +1 -1
- package/dist/providers/xai.d.ts +1 -1
- package/dist/providers/zai-coding-plan.d.ts +1 -1
- package/dist/providers/zai.d.ts +1 -1
- package/dist/route/auth-options.d.ts +9 -5
- package/dist/route/auth-options.js +10 -7
- package/dist/schema/events.d.ts +2456 -2168
- package/dist/speech.d.ts +290 -294
- package/dist/transcription.d.ts +298 -242
- package/dist/video.d.ts +252 -264
- package/package.json +5 -5
package/dist/video.d.ts
CHANGED
|
@@ -700,71 +700,76 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
700
700
|
};
|
|
701
701
|
};
|
|
702
702
|
readonly match: {
|
|
703
|
-
<
|
|
704
|
-
readonly
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
readonly type: Schema.tag<"video">;
|
|
713
|
-
readonly index: Schema.Number;
|
|
714
|
-
readonly video: Schema.decodeTo<Schema.declare<Media.Asset, Media.Asset>, Schema.Struct<{
|
|
715
|
-
readonly source: Schema.Union<readonly [Schema.Struct<{
|
|
716
|
-
readonly type: Schema.Literal<"bytes">;
|
|
717
|
-
readonly data: Schema.Uint8Array;
|
|
718
|
-
readonly mediaType: Schema.String;
|
|
703
|
+
<Handlers extends { [K in "finish" | "generation-progress" | "generation-queued" | "video"]: (value: {
|
|
704
|
+
readonly finish: Schema.Struct<{
|
|
705
|
+
readonly type: Schema.tag<"finish">;
|
|
706
|
+
readonly usage: Schema.optional<Schema.Union<readonly [Schema.Struct<{
|
|
707
|
+
readonly type: Schema.Literal<"tokens">;
|
|
708
|
+
readonly input: Schema.optional<Schema.Number>;
|
|
709
|
+
readonly output: Schema.optional<Schema.Number>;
|
|
710
|
+
readonly total: Schema.optional<Schema.Number>;
|
|
711
|
+
readonly details: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
719
712
|
}>, Schema.Struct<{
|
|
720
|
-
readonly type: Schema.Literal<"
|
|
721
|
-
readonly
|
|
722
|
-
readonly mediaType: Schema.String;
|
|
713
|
+
readonly type: Schema.Literal<"seconds">;
|
|
714
|
+
readonly seconds: Schema.Number;
|
|
723
715
|
}>, Schema.Struct<{
|
|
724
|
-
readonly type: Schema.Literal<"
|
|
725
|
-
readonly
|
|
726
|
-
readonly mediaType: Schema.optional<Schema.String>;
|
|
727
|
-
readonly expiresAt: Schema.optional<Schema.Number>;
|
|
716
|
+
readonly type: Schema.Literal<"characters">;
|
|
717
|
+
readonly characters: Schema.Number;
|
|
728
718
|
}>, Schema.Struct<{
|
|
729
|
-
readonly type: Schema.Literal<"
|
|
730
|
-
readonly
|
|
731
|
-
|
|
732
|
-
readonly
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
readonly width: Schema.optional<Schema.Number>;
|
|
736
|
-
readonly height: Schema.optional<Schema.Number>;
|
|
737
|
-
readonly durationSeconds: Schema.optional<Schema.Number>;
|
|
738
|
-
readonly sampleRate: Schema.optional<Schema.Number>;
|
|
739
|
-
readonly channels: Schema.optional<Schema.Number>;
|
|
740
|
-
readonly encoding: Schema.optional<Schema.String>;
|
|
741
|
-
readonly format: Schema.optional<Schema.String>;
|
|
742
|
-
}>>;
|
|
719
|
+
readonly type: Schema.Literal<"credits">;
|
|
720
|
+
readonly credits: Schema.Number;
|
|
721
|
+
}>, Schema.Struct<{
|
|
722
|
+
readonly type: Schema.Literal<"compute">;
|
|
723
|
+
readonly seconds: Schema.Number;
|
|
724
|
+
}>]>>;
|
|
743
725
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
readonly
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
readonly
|
|
752
|
-
readonly
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
readonly
|
|
758
|
-
readonly
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
726
|
+
}>;
|
|
727
|
+
readonly "generation-progress": Schema.Struct<{
|
|
728
|
+
readonly type: Schema.tag<"generation-progress">;
|
|
729
|
+
readonly id: Schema.String;
|
|
730
|
+
readonly progress: Schema.optional<Schema.Number>;
|
|
731
|
+
}>;
|
|
732
|
+
readonly "generation-queued": Schema.Struct<{
|
|
733
|
+
readonly type: Schema.tag<"generation-queued">;
|
|
734
|
+
readonly id: Schema.String;
|
|
735
|
+
readonly position: Schema.optional<Schema.Number>;
|
|
736
|
+
}>;
|
|
737
|
+
readonly video: Schema.Struct<{
|
|
738
|
+
readonly type: Schema.tag<"video">;
|
|
739
|
+
readonly index: Schema.Number;
|
|
740
|
+
readonly video: Schema.decodeTo<Schema.declare<Media.Asset, Media.Asset>, Schema.Struct<{
|
|
741
|
+
readonly source: Schema.Union<readonly [Schema.Struct<{
|
|
742
|
+
readonly type: Schema.Literal<"bytes">;
|
|
743
|
+
readonly data: Schema.Uint8Array;
|
|
744
|
+
readonly mediaType: Schema.String;
|
|
745
|
+
}>, Schema.Struct<{
|
|
746
|
+
readonly type: Schema.Literal<"base64">;
|
|
747
|
+
readonly data: Schema.String;
|
|
748
|
+
readonly mediaType: Schema.String;
|
|
749
|
+
}>, Schema.Struct<{
|
|
750
|
+
readonly type: Schema.Literal<"url">;
|
|
751
|
+
readonly url: Schema.String;
|
|
752
|
+
readonly mediaType: Schema.optional<Schema.String>;
|
|
753
|
+
readonly expiresAt: Schema.optional<Schema.Number>;
|
|
754
|
+
}>, Schema.Struct<{
|
|
755
|
+
readonly type: Schema.Literal<"ref">;
|
|
756
|
+
readonly provider: Schema.brand<Schema.String, "AI.ProviderID">;
|
|
757
|
+
readonly id: Schema.String;
|
|
758
|
+
readonly mediaType: Schema.optional<Schema.String>;
|
|
759
|
+
}>]>;
|
|
760
|
+
readonly info: Schema.optional<Schema.Struct<{
|
|
761
|
+
readonly width: Schema.optional<Schema.Number>;
|
|
762
|
+
readonly height: Schema.optional<Schema.Number>;
|
|
763
|
+
readonly durationSeconds: Schema.optional<Schema.Number>;
|
|
764
|
+
readonly sampleRate: Schema.optional<Schema.Number>;
|
|
765
|
+
readonly channels: Schema.optional<Schema.Number>;
|
|
766
|
+
readonly encoding: Schema.optional<Schema.String>;
|
|
767
|
+
readonly format: Schema.optional<Schema.String>;
|
|
768
|
+
}>>;
|
|
769
|
+
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
770
|
+
}>, never, never>;
|
|
771
|
+
}>;
|
|
772
|
+
}[K]["Type"]) => any; }>(value: {
|
|
768
773
|
readonly type: "video";
|
|
769
774
|
readonly index: number;
|
|
770
775
|
readonly video: Media.Asset;
|
|
@@ -804,72 +809,77 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
804
809
|
readonly [x: string]: unknown;
|
|
805
810
|
};
|
|
806
811
|
} | undefined;
|
|
807
|
-
}, cases:
|
|
808
|
-
<
|
|
809
|
-
readonly
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
readonly type: Schema.tag<"video">;
|
|
818
|
-
readonly index: Schema.Number;
|
|
819
|
-
readonly video: Schema.decodeTo<Schema.declare<Media.Asset, Media.Asset>, Schema.Struct<{
|
|
820
|
-
readonly source: Schema.Union<readonly [Schema.Struct<{
|
|
821
|
-
readonly type: Schema.Literal<"bytes">;
|
|
822
|
-
readonly data: Schema.Uint8Array;
|
|
823
|
-
readonly mediaType: Schema.String;
|
|
812
|
+
}, cases: Handlers): import("effect/Unify").Unify<ReturnType<Handlers["finish" | "generation-progress" | "generation-queued" | "video"]>>;
|
|
813
|
+
<Handlers extends { [K in "finish" | "generation-progress" | "generation-queued" | "video"]: (value: {
|
|
814
|
+
readonly finish: Schema.Struct<{
|
|
815
|
+
readonly type: Schema.tag<"finish">;
|
|
816
|
+
readonly usage: Schema.optional<Schema.Union<readonly [Schema.Struct<{
|
|
817
|
+
readonly type: Schema.Literal<"tokens">;
|
|
818
|
+
readonly input: Schema.optional<Schema.Number>;
|
|
819
|
+
readonly output: Schema.optional<Schema.Number>;
|
|
820
|
+
readonly total: Schema.optional<Schema.Number>;
|
|
821
|
+
readonly details: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
824
822
|
}>, Schema.Struct<{
|
|
825
|
-
readonly type: Schema.Literal<"
|
|
826
|
-
readonly
|
|
827
|
-
readonly mediaType: Schema.String;
|
|
823
|
+
readonly type: Schema.Literal<"seconds">;
|
|
824
|
+
readonly seconds: Schema.Number;
|
|
828
825
|
}>, Schema.Struct<{
|
|
829
|
-
readonly type: Schema.Literal<"
|
|
830
|
-
readonly
|
|
831
|
-
readonly mediaType: Schema.optional<Schema.String>;
|
|
832
|
-
readonly expiresAt: Schema.optional<Schema.Number>;
|
|
826
|
+
readonly type: Schema.Literal<"characters">;
|
|
827
|
+
readonly characters: Schema.Number;
|
|
833
828
|
}>, Schema.Struct<{
|
|
834
|
-
readonly type: Schema.Literal<"
|
|
835
|
-
readonly
|
|
836
|
-
|
|
837
|
-
readonly
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
readonly width: Schema.optional<Schema.Number>;
|
|
841
|
-
readonly height: Schema.optional<Schema.Number>;
|
|
842
|
-
readonly durationSeconds: Schema.optional<Schema.Number>;
|
|
843
|
-
readonly sampleRate: Schema.optional<Schema.Number>;
|
|
844
|
-
readonly channels: Schema.optional<Schema.Number>;
|
|
845
|
-
readonly encoding: Schema.optional<Schema.String>;
|
|
846
|
-
readonly format: Schema.optional<Schema.String>;
|
|
847
|
-
}>>;
|
|
829
|
+
readonly type: Schema.Literal<"credits">;
|
|
830
|
+
readonly credits: Schema.Number;
|
|
831
|
+
}>, Schema.Struct<{
|
|
832
|
+
readonly type: Schema.Literal<"compute">;
|
|
833
|
+
readonly seconds: Schema.Number;
|
|
834
|
+
}>]>>;
|
|
848
835
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
849
|
-
}
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
readonly
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
readonly
|
|
857
|
-
readonly
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
readonly
|
|
863
|
-
readonly
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
836
|
+
}>;
|
|
837
|
+
readonly "generation-progress": Schema.Struct<{
|
|
838
|
+
readonly type: Schema.tag<"generation-progress">;
|
|
839
|
+
readonly id: Schema.String;
|
|
840
|
+
readonly progress: Schema.optional<Schema.Number>;
|
|
841
|
+
}>;
|
|
842
|
+
readonly "generation-queued": Schema.Struct<{
|
|
843
|
+
readonly type: Schema.tag<"generation-queued">;
|
|
844
|
+
readonly id: Schema.String;
|
|
845
|
+
readonly position: Schema.optional<Schema.Number>;
|
|
846
|
+
}>;
|
|
847
|
+
readonly video: Schema.Struct<{
|
|
848
|
+
readonly type: Schema.tag<"video">;
|
|
849
|
+
readonly index: Schema.Number;
|
|
850
|
+
readonly video: Schema.decodeTo<Schema.declare<Media.Asset, Media.Asset>, Schema.Struct<{
|
|
851
|
+
readonly source: Schema.Union<readonly [Schema.Struct<{
|
|
852
|
+
readonly type: Schema.Literal<"bytes">;
|
|
853
|
+
readonly data: Schema.Uint8Array;
|
|
854
|
+
readonly mediaType: Schema.String;
|
|
855
|
+
}>, Schema.Struct<{
|
|
856
|
+
readonly type: Schema.Literal<"base64">;
|
|
857
|
+
readonly data: Schema.String;
|
|
858
|
+
readonly mediaType: Schema.String;
|
|
859
|
+
}>, Schema.Struct<{
|
|
860
|
+
readonly type: Schema.Literal<"url">;
|
|
861
|
+
readonly url: Schema.String;
|
|
862
|
+
readonly mediaType: Schema.optional<Schema.String>;
|
|
863
|
+
readonly expiresAt: Schema.optional<Schema.Number>;
|
|
864
|
+
}>, Schema.Struct<{
|
|
865
|
+
readonly type: Schema.Literal<"ref">;
|
|
866
|
+
readonly provider: Schema.brand<Schema.String, "AI.ProviderID">;
|
|
867
|
+
readonly id: Schema.String;
|
|
868
|
+
readonly mediaType: Schema.optional<Schema.String>;
|
|
869
|
+
}>]>;
|
|
870
|
+
readonly info: Schema.optional<Schema.Struct<{
|
|
871
|
+
readonly width: Schema.optional<Schema.Number>;
|
|
872
|
+
readonly height: Schema.optional<Schema.Number>;
|
|
873
|
+
readonly durationSeconds: Schema.optional<Schema.Number>;
|
|
874
|
+
readonly sampleRate: Schema.optional<Schema.Number>;
|
|
875
|
+
readonly channels: Schema.optional<Schema.Number>;
|
|
876
|
+
readonly encoding: Schema.optional<Schema.String>;
|
|
877
|
+
readonly format: Schema.optional<Schema.String>;
|
|
878
|
+
}>>;
|
|
879
|
+
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
880
|
+
}>, never, never>;
|
|
881
|
+
}>;
|
|
882
|
+
}[K]["Type"]) => any; }>(cases: Handlers): (value: {
|
|
873
883
|
readonly type: "video";
|
|
874
884
|
readonly index: number;
|
|
875
885
|
readonly video: Media.Asset;
|
|
@@ -909,74 +919,10 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
909
919
|
readonly [x: string]: unknown;
|
|
910
920
|
};
|
|
911
921
|
} | undefined;
|
|
912
|
-
}) =>
|
|
922
|
+
}) => import("effect/Unify").Unify<ReturnType<Handlers["finish" | "generation-progress" | "generation-queued" | "video"]>>;
|
|
913
923
|
};
|
|
914
924
|
readonly matchOrElse: {
|
|
915
|
-
<
|
|
916
|
-
readonly type: Schema.tag<"generation-queued">;
|
|
917
|
-
readonly id: Schema.String;
|
|
918
|
-
readonly position: Schema.optional<Schema.Number>;
|
|
919
|
-
}> | Schema.Struct<{
|
|
920
|
-
readonly type: Schema.tag<"generation-progress">;
|
|
921
|
-
readonly id: Schema.String;
|
|
922
|
-
readonly progress: Schema.optional<Schema.Number>;
|
|
923
|
-
}> | Schema.Struct<{
|
|
924
|
-
readonly type: Schema.tag<"video">;
|
|
925
|
-
readonly index: Schema.Number;
|
|
926
|
-
readonly video: Schema.decodeTo<Schema.declare<Media.Asset, Media.Asset>, Schema.Struct<{
|
|
927
|
-
readonly source: Schema.Union<readonly [Schema.Struct<{
|
|
928
|
-
readonly type: Schema.Literal<"bytes">;
|
|
929
|
-
readonly data: Schema.Uint8Array;
|
|
930
|
-
readonly mediaType: Schema.String;
|
|
931
|
-
}>, Schema.Struct<{
|
|
932
|
-
readonly type: Schema.Literal<"base64">;
|
|
933
|
-
readonly data: Schema.String;
|
|
934
|
-
readonly mediaType: Schema.String;
|
|
935
|
-
}>, Schema.Struct<{
|
|
936
|
-
readonly type: Schema.Literal<"url">;
|
|
937
|
-
readonly url: Schema.String;
|
|
938
|
-
readonly mediaType: Schema.optional<Schema.String>;
|
|
939
|
-
readonly expiresAt: Schema.optional<Schema.Number>;
|
|
940
|
-
}>, Schema.Struct<{
|
|
941
|
-
readonly type: Schema.Literal<"ref">;
|
|
942
|
-
readonly provider: Schema.brand<Schema.String, "AI.ProviderID">;
|
|
943
|
-
readonly id: Schema.String;
|
|
944
|
-
readonly mediaType: Schema.optional<Schema.String>;
|
|
945
|
-
}>]>;
|
|
946
|
-
readonly info: Schema.optional<Schema.Struct<{
|
|
947
|
-
readonly width: Schema.optional<Schema.Number>;
|
|
948
|
-
readonly height: Schema.optional<Schema.Number>;
|
|
949
|
-
readonly durationSeconds: Schema.optional<Schema.Number>;
|
|
950
|
-
readonly sampleRate: Schema.optional<Schema.Number>;
|
|
951
|
-
readonly channels: Schema.optional<Schema.Number>;
|
|
952
|
-
readonly encoding: Schema.optional<Schema.String>;
|
|
953
|
-
readonly format: Schema.optional<Schema.String>;
|
|
954
|
-
}>>;
|
|
955
|
-
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
956
|
-
}>, never, never>;
|
|
957
|
-
}> | Schema.Struct<{
|
|
958
|
-
readonly type: Schema.tag<"finish">;
|
|
959
|
-
readonly usage: Schema.optional<Schema.Union<readonly [Schema.Struct<{
|
|
960
|
-
readonly type: Schema.Literal<"tokens">;
|
|
961
|
-
readonly input: Schema.optional<Schema.Number>;
|
|
962
|
-
readonly output: Schema.optional<Schema.Number>;
|
|
963
|
-
readonly total: Schema.optional<Schema.Number>;
|
|
964
|
-
readonly details: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
965
|
-
}>, Schema.Struct<{
|
|
966
|
-
readonly type: Schema.Literal<"seconds">;
|
|
967
|
-
readonly seconds: Schema.Number;
|
|
968
|
-
}>, Schema.Struct<{
|
|
969
|
-
readonly type: Schema.Literal<"characters">;
|
|
970
|
-
readonly characters: Schema.Number;
|
|
971
|
-
}>, Schema.Struct<{
|
|
972
|
-
readonly type: Schema.Literal<"credits">;
|
|
973
|
-
readonly credits: Schema.Number;
|
|
974
|
-
}>, Schema.Struct<{
|
|
975
|
-
readonly type: Schema.Literal<"compute">;
|
|
976
|
-
readonly seconds: Schema.Number;
|
|
977
|
-
}>]>>;
|
|
978
|
-
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
979
|
-
}> as M["Type"]["type"]]+?: (value: M["Type"]) => any; } & { [K in Exclude<keyof Cases, "finish" | "generation-progress" | "generation-queued" | "video">]: never; }, OrElse extends (value: Exclude<{
|
|
925
|
+
<Handlers, OrElse>(value: {
|
|
980
926
|
readonly type: "video";
|
|
981
927
|
readonly index: number;
|
|
982
928
|
readonly video: Media.Asset;
|
|
@@ -1016,19 +962,70 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1016
962
|
readonly [x: string]: unknown;
|
|
1017
963
|
};
|
|
1018
964
|
} | undefined;
|
|
1019
|
-
},
|
|
965
|
+
}, cases: Handlers & {
|
|
966
|
+
readonly finish?: ((value: {
|
|
967
|
+
readonly type: "finish";
|
|
968
|
+
readonly usage?: {
|
|
969
|
+
readonly type: "seconds";
|
|
970
|
+
readonly seconds: number;
|
|
971
|
+
} | {
|
|
972
|
+
readonly type: "characters";
|
|
973
|
+
readonly characters: number;
|
|
974
|
+
} | {
|
|
975
|
+
readonly type: "credits";
|
|
976
|
+
readonly credits: number;
|
|
977
|
+
} | {
|
|
978
|
+
readonly type: "compute";
|
|
979
|
+
readonly seconds: number;
|
|
980
|
+
} | {
|
|
981
|
+
readonly type: "tokens";
|
|
982
|
+
readonly input?: number | undefined;
|
|
983
|
+
readonly output?: number | undefined;
|
|
984
|
+
readonly total?: number | undefined;
|
|
985
|
+
readonly details?: {
|
|
986
|
+
readonly [x: string]: unknown;
|
|
987
|
+
} | undefined;
|
|
988
|
+
} | undefined;
|
|
989
|
+
readonly providerMetadata?: {
|
|
990
|
+
readonly [x: string]: {
|
|
991
|
+
readonly [x: string]: unknown;
|
|
992
|
+
};
|
|
993
|
+
} | undefined;
|
|
994
|
+
}) => any) | undefined;
|
|
995
|
+
readonly "generation-progress"?: ((value: {
|
|
996
|
+
readonly type: "generation-progress";
|
|
997
|
+
readonly id: string;
|
|
998
|
+
readonly progress?: number | undefined;
|
|
999
|
+
}) => any) | undefined;
|
|
1000
|
+
readonly "generation-queued"?: ((value: {
|
|
1001
|
+
readonly type: "generation-queued";
|
|
1002
|
+
readonly id: string;
|
|
1003
|
+
readonly position?: number | undefined;
|
|
1004
|
+
}) => any) | undefined;
|
|
1005
|
+
readonly video?: ((value: {
|
|
1006
|
+
readonly type: "video";
|
|
1007
|
+
readonly index: number;
|
|
1008
|
+
readonly video: Media.Asset;
|
|
1009
|
+
}) => any) | undefined;
|
|
1010
|
+
} & (Exclude<keyof Handlers, "finish" | "generation-progress" | "generation-queued" | "video"> extends never ? unknown : never), orElse: OrElse & ((value: Exclude<{
|
|
1020
1011
|
readonly type: "video";
|
|
1021
1012
|
readonly index: number;
|
|
1022
1013
|
readonly video: Media.Asset;
|
|
1023
|
-
}
|
|
1014
|
+
}, {
|
|
1015
|
+
readonly type: keyof Handlers;
|
|
1016
|
+
}> | Exclude<{
|
|
1024
1017
|
readonly type: "generation-queued";
|
|
1025
1018
|
readonly id: string;
|
|
1026
1019
|
readonly position?: number | undefined;
|
|
1027
|
-
}
|
|
1020
|
+
}, {
|
|
1021
|
+
readonly type: keyof Handlers;
|
|
1022
|
+
}> | Exclude<{
|
|
1028
1023
|
readonly type: "generation-progress";
|
|
1029
1024
|
readonly id: string;
|
|
1030
1025
|
readonly progress?: number | undefined;
|
|
1031
|
-
}
|
|
1026
|
+
}, {
|
|
1027
|
+
readonly type: keyof Handlers;
|
|
1028
|
+
}> | Exclude<{
|
|
1032
1029
|
readonly type: "finish";
|
|
1033
1030
|
readonly usage?: {
|
|
1034
1031
|
readonly type: "seconds";
|
|
@@ -1056,84 +1053,73 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1056
1053
|
readonly [x: string]: unknown;
|
|
1057
1054
|
};
|
|
1058
1055
|
} | undefined;
|
|
1059
|
-
},
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
readonly
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
readonly
|
|
1074
|
-
|
|
1075
|
-
readonly
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
readonly
|
|
1079
|
-
readonly
|
|
1080
|
-
|
|
1081
|
-
readonly
|
|
1082
|
-
readonly
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
|
-
readonly
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
}
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
readonly
|
|
1101
|
-
}
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
readonly
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
readonly total: Schema.optional<Schema.Number>;
|
|
1109
|
-
readonly details: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
1110
|
-
}>, Schema.Struct<{
|
|
1111
|
-
readonly type: Schema.Literal<"seconds">;
|
|
1112
|
-
readonly seconds: Schema.Number;
|
|
1113
|
-
}>, Schema.Struct<{
|
|
1114
|
-
readonly type: Schema.Literal<"characters">;
|
|
1115
|
-
readonly characters: Schema.Number;
|
|
1116
|
-
}>, Schema.Struct<{
|
|
1117
|
-
readonly type: Schema.Literal<"credits">;
|
|
1118
|
-
readonly credits: Schema.Number;
|
|
1119
|
-
}>, Schema.Struct<{
|
|
1120
|
-
readonly type: Schema.Literal<"compute">;
|
|
1121
|
-
readonly seconds: Schema.Number;
|
|
1122
|
-
}>]>>;
|
|
1123
|
-
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
1124
|
-
}> as M["Type"]["type"]]+?: (value: M["Type"]) => any; } & { [K in Exclude<keyof Cases, "finish" | "generation-progress" | "generation-queued" | "video">]: never; }, OrElse extends (value: Exclude<{
|
|
1056
|
+
}, {
|
|
1057
|
+
readonly type: keyof Handlers;
|
|
1058
|
+
}>) => any)): import("effect/Unify").Unify<{ [K in keyof Handlers]-?: NonNullable<Handlers[K]> extends (...args: Array<any>) => infer R ? R : never; }[keyof Handlers] | (OrElse extends (...args: Array<any>) => infer R ? R : never)>;
|
|
1059
|
+
<Handlers, OrElse>(cases: Handlers & {
|
|
1060
|
+
readonly finish?: ((value: {
|
|
1061
|
+
readonly type: "finish";
|
|
1062
|
+
readonly usage?: {
|
|
1063
|
+
readonly type: "seconds";
|
|
1064
|
+
readonly seconds: number;
|
|
1065
|
+
} | {
|
|
1066
|
+
readonly type: "characters";
|
|
1067
|
+
readonly characters: number;
|
|
1068
|
+
} | {
|
|
1069
|
+
readonly type: "credits";
|
|
1070
|
+
readonly credits: number;
|
|
1071
|
+
} | {
|
|
1072
|
+
readonly type: "compute";
|
|
1073
|
+
readonly seconds: number;
|
|
1074
|
+
} | {
|
|
1075
|
+
readonly type: "tokens";
|
|
1076
|
+
readonly input?: number | undefined;
|
|
1077
|
+
readonly output?: number | undefined;
|
|
1078
|
+
readonly total?: number | undefined;
|
|
1079
|
+
readonly details?: {
|
|
1080
|
+
readonly [x: string]: unknown;
|
|
1081
|
+
} | undefined;
|
|
1082
|
+
} | undefined;
|
|
1083
|
+
readonly providerMetadata?: {
|
|
1084
|
+
readonly [x: string]: {
|
|
1085
|
+
readonly [x: string]: unknown;
|
|
1086
|
+
};
|
|
1087
|
+
} | undefined;
|
|
1088
|
+
}) => any) | undefined;
|
|
1089
|
+
readonly "generation-progress"?: ((value: {
|
|
1090
|
+
readonly type: "generation-progress";
|
|
1091
|
+
readonly id: string;
|
|
1092
|
+
readonly progress?: number | undefined;
|
|
1093
|
+
}) => any) | undefined;
|
|
1094
|
+
readonly "generation-queued"?: ((value: {
|
|
1095
|
+
readonly type: "generation-queued";
|
|
1096
|
+
readonly id: string;
|
|
1097
|
+
readonly position?: number | undefined;
|
|
1098
|
+
}) => any) | undefined;
|
|
1099
|
+
readonly video?: ((value: {
|
|
1100
|
+
readonly type: "video";
|
|
1101
|
+
readonly index: number;
|
|
1102
|
+
readonly video: Media.Asset;
|
|
1103
|
+
}) => any) | undefined;
|
|
1104
|
+
} & (Exclude<keyof Handlers, "finish" | "generation-progress" | "generation-queued" | "video"> extends never ? unknown : never), orElse: OrElse & ((value: Exclude<{
|
|
1125
1105
|
readonly type: "video";
|
|
1126
1106
|
readonly index: number;
|
|
1127
1107
|
readonly video: Media.Asset;
|
|
1128
|
-
}
|
|
1108
|
+
}, {
|
|
1109
|
+
readonly type: keyof Handlers;
|
|
1110
|
+
}> | Exclude<{
|
|
1129
1111
|
readonly type: "generation-queued";
|
|
1130
1112
|
readonly id: string;
|
|
1131
1113
|
readonly position?: number | undefined;
|
|
1132
|
-
}
|
|
1114
|
+
}, {
|
|
1115
|
+
readonly type: keyof Handlers;
|
|
1116
|
+
}> | Exclude<{
|
|
1133
1117
|
readonly type: "generation-progress";
|
|
1134
1118
|
readonly id: string;
|
|
1135
1119
|
readonly progress?: number | undefined;
|
|
1136
|
-
}
|
|
1120
|
+
}, {
|
|
1121
|
+
readonly type: keyof Handlers;
|
|
1122
|
+
}> | Exclude<{
|
|
1137
1123
|
readonly type: "finish";
|
|
1138
1124
|
readonly usage?: {
|
|
1139
1125
|
readonly type: "seconds";
|
|
@@ -1161,7 +1147,9 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1161
1147
|
readonly [x: string]: unknown;
|
|
1162
1148
|
};
|
|
1163
1149
|
} | undefined;
|
|
1164
|
-
}, {
|
|
1150
|
+
}, {
|
|
1151
|
+
readonly type: keyof Handlers;
|
|
1152
|
+
}>) => any)): (value: {
|
|
1165
1153
|
readonly type: "video";
|
|
1166
1154
|
readonly index: number;
|
|
1167
1155
|
readonly video: Media.Asset;
|
|
@@ -1201,7 +1189,7 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1201
1189
|
readonly [x: string]: unknown;
|
|
1202
1190
|
};
|
|
1203
1191
|
} | undefined;
|
|
1204
|
-
}) => import("effect/Unify").Unify<{ [K in keyof
|
|
1192
|
+
}) => import("effect/Unify").Unify<{ [K in keyof Handlers]-?: NonNullable<Handlers[K]> extends (...args: Array<any>) => infer R ? R : never; }[keyof Handlers] | (OrElse extends (...args: Array<any>) => infer R ? R : never)>;
|
|
1205
1193
|
};
|
|
1206
1194
|
} & {
|
|
1207
1195
|
is: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-425",
|
|
4
4
|
"name": "@opencode/ai",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -519,8 +519,8 @@
|
|
|
519
519
|
},
|
|
520
520
|
"devDependencies": {
|
|
521
521
|
"@clack/prompts": "1.0.0-alpha.1",
|
|
522
|
-
"@effect/platform-node": "4.0
|
|
523
|
-
"@opencode/http-recorder": "0.0.0-dev-
|
|
522
|
+
"@effect/platform-node": "4.1.0",
|
|
523
|
+
"@opencode/http-recorder": "0.0.0-dev-425",
|
|
524
524
|
"@tsconfig/bun": "1.0.9",
|
|
525
525
|
"@types/bun": "1.4.3",
|
|
526
526
|
"@typescript/native": "npm:typescript@7.1.0-beta",
|
|
@@ -530,9 +530,9 @@
|
|
|
530
530
|
"@aws-sdk/credential-providers": "3.1057.0",
|
|
531
531
|
"@smithy/eventstream-codec": "4.2.14",
|
|
532
532
|
"@smithy/util-utf8": "4.2.2",
|
|
533
|
-
"@opencode/schema": "0.0.0-dev-
|
|
533
|
+
"@opencode/schema": "0.0.0-dev-425",
|
|
534
534
|
"aws4fetch": "1.0.20",
|
|
535
|
-
"effect": "4.0
|
|
535
|
+
"effect": "4.1.0",
|
|
536
536
|
"google-auth-library": "10.5.0"
|
|
537
537
|
},
|
|
538
538
|
"repository": {
|