@opencode/ai 0.0.0-dev-21800 → 0.0.0-dev-21802

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 (35) hide show
  1. package/README.md +45 -37
  2. package/dist/effect.d.ts +39 -0
  3. package/dist/effect.js +28 -0
  4. package/dist/effort-updates.d.ts +2 -2
  5. package/dist/image-client.d.ts +4 -4
  6. package/dist/index.d.ts +1030 -39
  7. package/dist/index.js +106 -28
  8. package/dist/protocols/alibaba-responses.d.ts +6 -3
  9. package/dist/protocols/meta-responses.d.ts +6 -0
  10. package/dist/protocols/meta-responses.js +29 -1
  11. package/dist/protocols/open-responses.d.ts +27 -0
  12. package/dist/protocols/open-responses.js +7 -18
  13. package/dist/protocols/openai-compatible-chat.d.ts +1 -1
  14. package/dist/protocols/openai-compatible-responses.d.ts +8 -5
  15. package/dist/protocols/openai-responses.d.ts +18 -0
  16. package/dist/protocols/utils/image-sizing.d.ts +1 -1
  17. package/dist/protocols/xai-responses.d.ts +3 -0
  18. package/dist/protocols/xai-responses.js +9 -0
  19. package/dist/providers/alibaba.d.ts +3 -0
  20. package/dist/providers/amazon-bedrock-mantle.d.ts +3 -0
  21. package/dist/providers/azure.d.ts +6 -0
  22. package/dist/providers/cloudflare-ai-gateway.d.ts +6 -0
  23. package/dist/providers/google-vertex-responses.d.ts +3 -0
  24. package/dist/providers/meta.d.ts +3 -0
  25. package/dist/providers/minimax.d.ts +3 -0
  26. package/dist/providers/moonshot.d.ts +3 -0
  27. package/dist/providers/openai-compatible-responses.d.ts +3 -0
  28. package/dist/providers/openai.d.ts +3 -0
  29. package/dist/providers/zai-coding-plan.d.ts +3 -0
  30. package/dist/speech-client.d.ts +4 -4
  31. package/dist/transcription-client.d.ts +4 -4
  32. package/dist/video-client.d.ts +4 -4
  33. package/package.json +6 -6
  34. package/dist/promise.d.ts +0 -1030
  35. package/dist/promise.js +0 -106
@@ -390,6 +390,9 @@ export declare const routes: (Route<{
390
390
  readonly content: readonly ({
391
391
  readonly type: "input_text";
392
392
  readonly text: string;
393
+ } | {
394
+ readonly type: "input_video";
395
+ readonly video_url: string;
393
396
  } | {
394
397
  readonly type: "input_image";
395
398
  readonly image_url: string;
@@ -68,6 +68,9 @@ export declare const routes: import("../route/client.js").Route<{
68
68
  readonly content: readonly ({
69
69
  readonly type: "input_text";
70
70
  readonly text: string;
71
+ } | {
72
+ readonly type: "input_video";
73
+ readonly video_url: string;
71
74
  } | {
72
75
  readonly type: "input_image";
73
76
  readonly image_url: string;
@@ -195,6 +195,9 @@ export declare const routes: (Route<{
195
195
  readonly content: readonly ({
196
196
  readonly type: "input_text";
197
197
  readonly text: string;
198
+ } | {
199
+ readonly type: "input_video";
200
+ readonly video_url: string;
198
201
  } | {
199
202
  readonly type: "input_image";
200
203
  readonly image_url: string;
@@ -72,6 +72,9 @@ export declare const routes: (Route<{
72
72
  readonly content: readonly ({
73
73
  readonly type: "input_text";
74
74
  readonly text: string;
75
+ } | {
76
+ readonly type: "input_video";
77
+ readonly video_url: string;
75
78
  } | {
76
79
  readonly type: "input_image";
77
80
  readonly image_url: string;
@@ -9,7 +9,7 @@ export declare const Service: typeof SpeechClientService;
9
9
  export type Service = SpeechClientService;
10
10
  export declare const SpeechClient: {
11
11
  readonly layer: import("effect/Layer").Layer<SpeechClientService, never, import("./route/executor-service.js").RequestExecutorService>;
12
- readonly generate: (request: SpeechRequestFor, options?: import("./generation.js").AwaitOptions) => import("effect/Effect").Effect<SpeechResponse, import("./index.js").AIError, SpeechClientService>;
12
+ readonly generate: (request: SpeechRequestFor, options?: import("./generation.js").AwaitOptions) => import("effect/Effect").Effect<SpeechResponse, import("./effect.js").AIError, SpeechClientService>;
13
13
  readonly stream: (request: SpeechRequestFor, options?: import("./generation.js").AwaitOptions) => import("effect/Stream").Stream<{
14
14
  readonly type: "audio-delta";
15
15
  readonly chunk: Uint8Array<ArrayBufferLike>;
@@ -58,11 +58,11 @@ export declare const SpeechClient: {
58
58
  readonly [x: string]: unknown;
59
59
  };
60
60
  } | undefined;
61
- } | import("./generation.js").Observation, import("./index.js").AIError, SpeechClientService>;
62
- readonly start: (request: SpeechRequestFor) => import("effect/Effect").Effect<import("./generation.js").Generation<SpeechResponse>, import("./index.js").AIError, SpeechClientService>;
61
+ } | import("./generation.js").Observation, import("./effect.js").AIError, SpeechClientService>;
62
+ readonly start: (request: SpeechRequestFor) => import("effect/Effect").Effect<import("./generation.js").Generation<SpeechResponse>, import("./effect.js").AIError, SpeechClientService>;
63
63
  readonly resume: (model: import("./speech.js").SpeechModel<{
64
64
  readonly [x: string]: unknown;
65
- }>, token: unknown) => import("effect/Effect").Effect<import("./generation.js").Generation<SpeechResponse>, import("./index.js").AIError, SpeechClientService>;
65
+ }>, token: unknown) => import("effect/Effect").Effect<import("./generation.js").Generation<SpeechResponse>, import("./effect.js").AIError, SpeechClientService>;
66
66
  readonly Service: typeof SpeechClientService;
67
67
  };
68
68
  export {};
@@ -9,7 +9,7 @@ export declare const Service: typeof TranscriptionClientService;
9
9
  export type Service = TranscriptionClientService;
10
10
  export declare const TranscriptionClient: {
11
11
  readonly layer: import("effect/Layer").Layer<TranscriptionClientService, never, import("./route/executor-service.js").RequestExecutorService>;
12
- readonly generate: (request: TranscriptionRequestFor, options?: import("./generation.js").AwaitOptions) => import("effect/Effect").Effect<TranscriptionResponse, import("./index.js").AIError, TranscriptionClientService>;
12
+ readonly generate: (request: TranscriptionRequestFor, options?: import("./generation.js").AwaitOptions) => import("effect/Effect").Effect<TranscriptionResponse, import("./effect.js").AIError, TranscriptionClientService>;
13
13
  readonly stream: (request: TranscriptionRequestFor, options?: import("./generation.js").AwaitOptions) => import("effect/Stream").Stream<{
14
14
  readonly type: "text-delta";
15
15
  readonly delta: string;
@@ -74,11 +74,11 @@ export declare const TranscriptionClient: {
74
74
  };
75
75
  } | undefined;
76
76
  readonly type: "finish";
77
- } | import("./generation.js").Observation, import("./index.js").AIError, TranscriptionClientService>;
78
- readonly start: (request: TranscriptionRequestFor) => import("effect/Effect").Effect<import("./generation.js").Generation<TranscriptionResponse>, import("./index.js").AIError, TranscriptionClientService>;
77
+ } | import("./generation.js").Observation, import("./effect.js").AIError, TranscriptionClientService>;
78
+ readonly start: (request: TranscriptionRequestFor) => import("effect/Effect").Effect<import("./generation.js").Generation<TranscriptionResponse>, import("./effect.js").AIError, TranscriptionClientService>;
79
79
  readonly resume: (model: import("./transcription.js").TranscriptionModel<{
80
80
  readonly [x: string]: unknown;
81
- }>, token: unknown) => import("effect/Effect").Effect<import("./generation.js").Generation<TranscriptionResponse>, import("./index.js").AIError, TranscriptionClientService>;
81
+ }>, token: unknown) => import("effect/Effect").Effect<import("./generation.js").Generation<TranscriptionResponse>, import("./effect.js").AIError, TranscriptionClientService>;
82
82
  readonly Service: typeof TranscriptionClientService;
83
83
  };
84
84
  export {};
@@ -9,7 +9,7 @@ export declare const Service: typeof VideoClientService;
9
9
  export type Service = VideoClientService;
10
10
  export declare const VideoClient: {
11
11
  readonly layer: import("effect/Layer").Layer<VideoClientService, never, import("./route/executor-service.js").RequestExecutorService>;
12
- readonly generate: (request: VideoRequestFor, options?: import("./generation.js").AwaitOptions) => import("effect/Effect").Effect<VideoResponse, import("./index.js").AIError, VideoClientService>;
12
+ readonly generate: (request: VideoRequestFor, options?: import("./generation.js").AwaitOptions) => import("effect/Effect").Effect<VideoResponse, import("./effect.js").AIError, VideoClientService>;
13
13
  readonly stream: (request: VideoRequestFor, options?: import("./generation.js").AwaitOptions) => import("effect/Stream").Stream<{
14
14
  readonly type: "video";
15
15
  readonly index: number;
@@ -51,11 +51,11 @@ export declare const VideoClient: {
51
51
  readonly [x: string]: unknown;
52
52
  };
53
53
  } | undefined;
54
- } | import("./generation.js").Observation, import("./index.js").AIError, VideoClientService>;
55
- readonly start: (request: VideoRequestFor) => import("effect/Effect").Effect<import("./generation.js").Generation<VideoResponse>, import("./index.js").AIError, VideoClientService>;
54
+ } | import("./generation.js").Observation, import("./effect.js").AIError, VideoClientService>;
55
+ readonly start: (request: VideoRequestFor) => import("effect/Effect").Effect<import("./generation.js").Generation<VideoResponse>, import("./effect.js").AIError, VideoClientService>;
56
56
  readonly resume: (model: import("./video.js").VideoModel<{
57
57
  readonly [x: string]: unknown;
58
- }>, token: unknown) => import("effect/Effect").Effect<import("./generation.js").Generation<VideoResponse>, import("./index.js").AIError, VideoClientService>;
58
+ }>, token: unknown) => import("effect/Effect").Effect<import("./generation.js").Generation<VideoResponse>, import("./effect.js").AIError, VideoClientService>;
59
59
  readonly Service: typeof VideoClientService;
60
60
  };
61
61
  export {};
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-21800",
3
+ "version": "0.0.0-dev-21802",
4
4
  "name": "@opencode/ai",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -19,9 +19,9 @@
19
19
  "import": "./dist/index.js",
20
20
  "types": "./dist/index.d.ts"
21
21
  },
22
- "./promise": {
23
- "import": "./dist/promise.js",
24
- "types": "./dist/promise.d.ts"
22
+ "./effect": {
23
+ "import": "./dist/effect.js",
24
+ "types": "./dist/effect.d.ts"
25
25
  },
26
26
  "./testing": {
27
27
  "import": "./dist/testing.js",
@@ -35,7 +35,7 @@
35
35
  "devDependencies": {
36
36
  "@clack/prompts": "1.0.0-alpha.1",
37
37
  "@effect/platform-node": "4.0.1",
38
- "@opencode/http-recorder": "0.0.0-dev-21800",
38
+ "@opencode/http-recorder": "0.0.0-dev-21802",
39
39
  "@tsconfig/bun": "1.0.9",
40
40
  "@types/bun": "1.4.3",
41
41
  "@typescript/native": "npm:typescript@7.1.0-beta",
@@ -45,7 +45,7 @@
45
45
  "@aws-sdk/credential-providers": "3.1057.0",
46
46
  "@smithy/eventstream-codec": "4.2.14",
47
47
  "@smithy/util-utf8": "4.2.2",
48
- "@opencode/schema": "0.0.0-dev-21800",
48
+ "@opencode/schema": "0.0.0-dev-21802",
49
49
  "aws4fetch": "1.0.20",
50
50
  "effect": "4.0.1",
51
51
  "google-auth-library": "10.5.0"