@opencode-ai/ai 0.0.0-next-16255 → 0.0.0-next-16273
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/llm.d.ts +60 -60
- package/dist/protocols/anthropic-messages.d.ts +303 -303
- package/dist/protocols/anthropic-messages.js +1 -0
- package/dist/protocols/bedrock-converse.d.ts +246 -242
- package/dist/protocols/gemini.d.ts +136 -132
- package/dist/protocols/gemini.js +1 -0
- package/dist/protocols/open-responses.d.ts +232 -232
- package/dist/protocols/openai-chat.d.ts +147 -141
- package/dist/protocols/openai-chat.js +1 -0
- package/dist/protocols/openai-compatible-chat.d.ts +48 -46
- package/dist/protocols/openai-compatible-responses.d.ts +56 -56
- package/dist/protocols/openai-responses.d.ts +388 -388
- package/dist/protocols/shared.d.ts +5 -4
- package/dist/protocols/shared.js +1 -0
- package/dist/protocols/utils/bedrock-media.d.ts +10 -10
- package/dist/protocols/utils/tool-stream.d.ts +180 -180
- package/dist/providers/amazon-bedrock.d.ts +109 -107
- package/dist/providers/anthropic-compatible.d.ts +145 -145
- package/dist/providers/anthropic.d.ts +145 -145
- package/dist/providers/azure.d.ts +112 -110
- package/dist/providers/cloudflare.d.ts +144 -138
- package/dist/providers/github-copilot.d.ts +112 -110
- package/dist/providers/google-vertex-chat.d.ts +48 -46
- package/dist/providers/google-vertex-messages.d.ts +145 -146
- package/dist/providers/google-vertex-responses.d.ts +56 -56
- package/dist/providers/google-vertex.d.ts +52 -50
- package/dist/providers/google.d.ts +52 -50
- package/dist/providers/openai-compatible-responses.d.ts +56 -56
- package/dist/providers/openai-compatible.d.ts +48 -46
- package/dist/providers/openai.d.ts +176 -174
- package/dist/providers/openrouter.d.ts +147 -141
- package/dist/providers/xai.d.ts +112 -110
- package/dist/route/client.d.ts +60 -60
- package/dist/schema/errors.d.ts +2 -6
- package/dist/schema/errors.js +2 -5
- package/dist/schema/events.d.ts +1117 -1115
- package/dist/schema/messages.d.ts +9 -9
- package/dist/schema/messages.js +3 -4
- package/dist/tool-runtime.js +1 -1
- package/dist/tool.d.ts +5 -4
- package/dist/tool.js +1 -0
- package/package.json +5 -5
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Buffer } from "node:buffer";
|
|
2
|
+
import { Tool } from "@opencode-ai/schema/tool";
|
|
2
3
|
import { Effect, Schema, Stream } from "effect";
|
|
3
4
|
import { Headers, HttpClientRequest } from "effect/unstable/http";
|
|
4
|
-
import { LLMError, type ContentPart, type LLMRequest, type
|
|
5
|
+
import { LLMError, type ContentPart, type LLMRequest, type ToolResultPart } from "../schema";
|
|
5
6
|
import { isRecord } from "../utils/record";
|
|
6
7
|
export { isRecord };
|
|
7
8
|
export declare const Json: Schema.fromJsonString<Schema.Unknown>;
|
|
@@ -82,10 +83,10 @@ export declare const wrapSystemUpdate: (parts: ReadonlyArray<{
|
|
|
82
83
|
export declare const systemUpdateText: (route: string, message: import("..").Message) => Effect.Effect<{
|
|
83
84
|
readonly type: "text";
|
|
84
85
|
readonly text: string;
|
|
85
|
-
readonly cache?: import("..").CacheHint | undefined;
|
|
86
86
|
readonly metadata?: {
|
|
87
87
|
readonly [x: string]: unknown;
|
|
88
88
|
} | undefined;
|
|
89
|
+
readonly cache?: import("..").CacheHint | undefined;
|
|
89
90
|
readonly providerMetadata?: {
|
|
90
91
|
readonly [x: string]: {
|
|
91
92
|
readonly [x: string]: unknown;
|
|
@@ -119,8 +120,8 @@ export interface ValidatedMedia {
|
|
|
119
120
|
readonly bytes: Uint8Array;
|
|
120
121
|
}
|
|
121
122
|
export declare const validateMedia: (route: string, part: {
|
|
122
|
-
readonly type: "media";
|
|
123
123
|
readonly data: string | Uint8Array<ArrayBufferLike>;
|
|
124
|
+
readonly type: "media";
|
|
124
125
|
readonly mediaType: string;
|
|
125
126
|
readonly metadata?: {
|
|
126
127
|
readonly [x: string]: unknown;
|
|
@@ -132,7 +133,7 @@ export declare const validateMedia: (route: string, part: {
|
|
|
132
133
|
dataUrl: string;
|
|
133
134
|
bytes: Buffer<ArrayBuffer>;
|
|
134
135
|
}, LLMError, never>;
|
|
135
|
-
export declare const validateToolFile: (route: string, part:
|
|
136
|
+
export declare const validateToolFile: (route: string, part: Tool.FileContent, supportedMimes: ReadonlySet<string>) => Effect.Effect<{
|
|
136
137
|
mime: string;
|
|
137
138
|
base64: string;
|
|
138
139
|
dataUrl: string;
|
package/dist/protocols/shared.js
CHANGED
|
@@ -23,22 +23,22 @@ export declare const DocumentBlock: Schema.Struct<{
|
|
|
23
23
|
}>;
|
|
24
24
|
export type DocumentBlock = Schema.Schema.Type<typeof DocumentBlock>;
|
|
25
25
|
export declare const lower: (part: {
|
|
26
|
-
readonly type: "media";
|
|
27
26
|
readonly data: string | Uint8Array<ArrayBufferLike>;
|
|
27
|
+
readonly type: "media";
|
|
28
28
|
readonly mediaType: string;
|
|
29
29
|
readonly metadata?: {
|
|
30
30
|
readonly [x: string]: unknown;
|
|
31
31
|
} | undefined;
|
|
32
32
|
readonly filename?: string | undefined;
|
|
33
|
-
}) => Effect.Effect<
|
|
34
|
-
readonly document:
|
|
35
|
-
readonly format:
|
|
36
|
-
readonly name:
|
|
37
|
-
readonly source:
|
|
38
|
-
readonly bytes:
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
33
|
+
}) => Effect.Effect<{
|
|
34
|
+
readonly document: {
|
|
35
|
+
readonly format: "pdf" | "csv" | "doc" | "docx" | "xls" | "xlsx" | "html" | "txt" | "md";
|
|
36
|
+
readonly name: string;
|
|
37
|
+
readonly source: {
|
|
38
|
+
readonly bytes: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
} | {
|
|
42
42
|
image: {
|
|
43
43
|
format: "png" | "jpeg" | "gif" | "webp";
|
|
44
44
|
source: {
|