@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.
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
@@ -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 ToolFileContent, type ToolResultPart } from "../schema";
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: ToolFileContent, supportedMimes: ReadonlySet<string>) => Effect.Effect<{
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;
@@ -1,4 +1,5 @@
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 * as Sse from "effect/unstable/encoding/Sse";
4
5
  import { Headers, HttpClientRequest } from "effect/unstable/http";
@@ -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<Schema.Struct.ReadonlySide<{
34
- readonly document: Schema.Struct<{
35
- readonly format: Schema.Literals<readonly ["pdf", "csv", "doc", "docx", "xls", "xlsx", "html", "txt", "md"]>;
36
- readonly name: Schema.String;
37
- readonly source: Schema.Struct<{
38
- readonly bytes: Schema.String;
39
- }>;
40
- }>;
41
- }, "Type"> | {
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: {