@opencode/ai 0.0.0-dev-21627 → 0.0.0-dev-21631
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/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 -40
- package/dist/protocols/bedrock-converse.d.ts +30 -30
- 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/google-interactions.d.ts +14 -14
- 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 +68 -68
- package/dist/protocols/open-responses.d.ts +396 -396
- package/dist/protocols/openai-chat.d.ts +60 -60
- package/dist/protocols/openai-compatible-chat.d.ts +12 -12
- package/dist/protocols/openai-compatible-responses.d.ts +35 -35
- package/dist/protocols/openai-images.d.ts +32 -32
- package/dist/protocols/openai-responses.d.ts +235 -235
- package/dist/protocols/openai-speech.d.ts +32 -32
- package/dist/protocols/openai-transcription.d.ts +32 -32
- package/dist/protocols/utils/tool-stream.d.ts +1 -1
- package/dist/protocols/venice-chat.d.ts +12 -12
- package/dist/protocols/xai-responses.d.ts +78 -78
- package/dist/protocols/zai-chat.d.ts +12 -12
- package/dist/protocols/zai-messages.d.ts +11 -11
- 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-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.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/openai-compatible-responses.d.ts +35 -35
- package/dist/providers/openai-compatible.d.ts +12 -12
- 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 +12 -12
- package/dist/providers/xai.d.ts +12 -12
- package/dist/providers/zai-coding-plan.d.ts +58 -58
- package/dist/providers/zai.d.ts +12 -12
- 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
|
@@ -16,14 +16,6 @@ interface State extends SpeechStream.Audio {
|
|
|
16
16
|
readonly usage?: MediaUsage;
|
|
17
17
|
}
|
|
18
18
|
export declare const protocol: MediaProtocol.Streamed<Request, {
|
|
19
|
-
readonly type: "generation-queued";
|
|
20
|
-
readonly id: string;
|
|
21
|
-
readonly position?: number | undefined;
|
|
22
|
-
} | {
|
|
23
|
-
readonly type: "generation-progress";
|
|
24
|
-
readonly id: string;
|
|
25
|
-
readonly progress?: number | undefined;
|
|
26
|
-
} | {
|
|
27
19
|
readonly type: "audio-delta";
|
|
28
20
|
readonly chunk: Uint8Array<ArrayBufferLike>;
|
|
29
21
|
} | {
|
|
@@ -33,18 +25,18 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
|
|
|
33
25
|
readonly startSeconds: number;
|
|
34
26
|
readonly endSeconds: number;
|
|
35
27
|
}[];
|
|
28
|
+
} | {
|
|
29
|
+
readonly type: "generation-queued";
|
|
30
|
+
readonly id: string;
|
|
31
|
+
readonly position?: number | undefined;
|
|
32
|
+
} | {
|
|
33
|
+
readonly type: "generation-progress";
|
|
34
|
+
readonly id: string;
|
|
35
|
+
readonly progress?: number | undefined;
|
|
36
36
|
} | {
|
|
37
37
|
readonly type: "finish";
|
|
38
38
|
readonly audio: import("../media.js").Asset;
|
|
39
39
|
readonly usage?: {
|
|
40
|
-
readonly type: "tokens";
|
|
41
|
-
readonly input?: number | undefined;
|
|
42
|
-
readonly output?: number | undefined;
|
|
43
|
-
readonly total?: number | undefined;
|
|
44
|
-
readonly details?: {
|
|
45
|
-
readonly [x: string]: unknown;
|
|
46
|
-
} | undefined;
|
|
47
|
-
} | {
|
|
48
40
|
readonly type: "seconds";
|
|
49
41
|
readonly seconds: number;
|
|
50
42
|
} | {
|
|
@@ -56,6 +48,14 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
|
|
|
56
48
|
} | {
|
|
57
49
|
readonly type: "compute";
|
|
58
50
|
readonly seconds: number;
|
|
51
|
+
} | {
|
|
52
|
+
readonly type: "tokens";
|
|
53
|
+
readonly input?: number | undefined;
|
|
54
|
+
readonly output?: number | undefined;
|
|
55
|
+
readonly total?: number | undefined;
|
|
56
|
+
readonly details?: {
|
|
57
|
+
readonly [x: string]: unknown;
|
|
58
|
+
} | undefined;
|
|
59
59
|
} | undefined;
|
|
60
60
|
readonly notices?: readonly {
|
|
61
61
|
readonly type: "filtered" | "moderated" | "other";
|
|
@@ -75,14 +75,6 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
|
|
|
75
75
|
export declare const model: (input: MediaRoute.ModelInput) => SpeechModel<OpenAISpeechOptions>;
|
|
76
76
|
export declare const OpenAISpeech: {
|
|
77
77
|
readonly protocol: MediaProtocol.Streamed<Request, {
|
|
78
|
-
readonly type: "generation-queued";
|
|
79
|
-
readonly id: string;
|
|
80
|
-
readonly position?: number | undefined;
|
|
81
|
-
} | {
|
|
82
|
-
readonly type: "generation-progress";
|
|
83
|
-
readonly id: string;
|
|
84
|
-
readonly progress?: number | undefined;
|
|
85
|
-
} | {
|
|
86
78
|
readonly type: "audio-delta";
|
|
87
79
|
readonly chunk: Uint8Array<ArrayBufferLike>;
|
|
88
80
|
} | {
|
|
@@ -92,18 +84,18 @@ export declare const OpenAISpeech: {
|
|
|
92
84
|
readonly startSeconds: number;
|
|
93
85
|
readonly endSeconds: number;
|
|
94
86
|
}[];
|
|
87
|
+
} | {
|
|
88
|
+
readonly type: "generation-queued";
|
|
89
|
+
readonly id: string;
|
|
90
|
+
readonly position?: number | undefined;
|
|
91
|
+
} | {
|
|
92
|
+
readonly type: "generation-progress";
|
|
93
|
+
readonly id: string;
|
|
94
|
+
readonly progress?: number | undefined;
|
|
95
95
|
} | {
|
|
96
96
|
readonly type: "finish";
|
|
97
97
|
readonly audio: import("../media.js").Asset;
|
|
98
98
|
readonly usage?: {
|
|
99
|
-
readonly type: "tokens";
|
|
100
|
-
readonly input?: number | undefined;
|
|
101
|
-
readonly output?: number | undefined;
|
|
102
|
-
readonly total?: number | undefined;
|
|
103
|
-
readonly details?: {
|
|
104
|
-
readonly [x: string]: unknown;
|
|
105
|
-
} | undefined;
|
|
106
|
-
} | {
|
|
107
99
|
readonly type: "seconds";
|
|
108
100
|
readonly seconds: number;
|
|
109
101
|
} | {
|
|
@@ -115,6 +107,14 @@ export declare const OpenAISpeech: {
|
|
|
115
107
|
} | {
|
|
116
108
|
readonly type: "compute";
|
|
117
109
|
readonly seconds: number;
|
|
110
|
+
} | {
|
|
111
|
+
readonly type: "tokens";
|
|
112
|
+
readonly input?: number | undefined;
|
|
113
|
+
readonly output?: number | undefined;
|
|
114
|
+
readonly total?: number | undefined;
|
|
115
|
+
readonly details?: {
|
|
116
|
+
readonly [x: string]: unknown;
|
|
117
|
+
} | undefined;
|
|
118
118
|
} | undefined;
|
|
119
119
|
readonly notices?: readonly {
|
|
120
120
|
readonly type: "filtered" | "moderated" | "other";
|
|
@@ -59,14 +59,6 @@ interface State {
|
|
|
59
59
|
readonly transcript?: Transcript;
|
|
60
60
|
}
|
|
61
61
|
export declare const protocol: MediaProtocol.Streamed<Request, {
|
|
62
|
-
readonly type: "generation-queued";
|
|
63
|
-
readonly id: string;
|
|
64
|
-
readonly position?: number | undefined;
|
|
65
|
-
} | {
|
|
66
|
-
readonly type: "generation-progress";
|
|
67
|
-
readonly id: string;
|
|
68
|
-
readonly progress?: number | undefined;
|
|
69
|
-
} | {
|
|
70
62
|
readonly type: "text-delta";
|
|
71
63
|
readonly delta: string;
|
|
72
64
|
} | {
|
|
@@ -77,6 +69,14 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
|
|
|
77
69
|
readonly endSeconds: number;
|
|
78
70
|
readonly speaker?: string | undefined;
|
|
79
71
|
};
|
|
72
|
+
} | {
|
|
73
|
+
readonly type: "generation-queued";
|
|
74
|
+
readonly id: string;
|
|
75
|
+
readonly position?: number | undefined;
|
|
76
|
+
} | {
|
|
77
|
+
readonly type: "generation-progress";
|
|
78
|
+
readonly id: string;
|
|
79
|
+
readonly progress?: number | undefined;
|
|
80
80
|
} | {
|
|
81
81
|
readonly text: string;
|
|
82
82
|
readonly segments?: readonly {
|
|
@@ -95,14 +95,6 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
|
|
|
95
95
|
readonly language?: string | undefined;
|
|
96
96
|
readonly durationSeconds?: number | undefined;
|
|
97
97
|
readonly usage?: {
|
|
98
|
-
readonly type: "tokens";
|
|
99
|
-
readonly input?: number | undefined;
|
|
100
|
-
readonly output?: number | undefined;
|
|
101
|
-
readonly total?: number | undefined;
|
|
102
|
-
readonly details?: {
|
|
103
|
-
readonly [x: string]: unknown;
|
|
104
|
-
} | undefined;
|
|
105
|
-
} | {
|
|
106
98
|
readonly type: "seconds";
|
|
107
99
|
readonly seconds: number;
|
|
108
100
|
} | {
|
|
@@ -114,6 +106,14 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
|
|
|
114
106
|
} | {
|
|
115
107
|
readonly type: "compute";
|
|
116
108
|
readonly seconds: number;
|
|
109
|
+
} | {
|
|
110
|
+
readonly type: "tokens";
|
|
111
|
+
readonly input?: number | undefined;
|
|
112
|
+
readonly output?: number | undefined;
|
|
113
|
+
readonly total?: number | undefined;
|
|
114
|
+
readonly details?: {
|
|
115
|
+
readonly [x: string]: unknown;
|
|
116
|
+
} | undefined;
|
|
117
117
|
} | undefined;
|
|
118
118
|
readonly notices?: readonly {
|
|
119
119
|
readonly type: "filtered" | "moderated" | "other";
|
|
@@ -134,14 +134,6 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
|
|
|
134
134
|
export declare const model: (input: MediaRoute.ModelInput) => TranscriptionModel<OpenAITranscriptionOptions>;
|
|
135
135
|
export declare const OpenAITranscription: {
|
|
136
136
|
readonly protocol: MediaProtocol.Streamed<Request, {
|
|
137
|
-
readonly type: "generation-queued";
|
|
138
|
-
readonly id: string;
|
|
139
|
-
readonly position?: number | undefined;
|
|
140
|
-
} | {
|
|
141
|
-
readonly type: "generation-progress";
|
|
142
|
-
readonly id: string;
|
|
143
|
-
readonly progress?: number | undefined;
|
|
144
|
-
} | {
|
|
145
137
|
readonly type: "text-delta";
|
|
146
138
|
readonly delta: string;
|
|
147
139
|
} | {
|
|
@@ -152,6 +144,14 @@ export declare const OpenAITranscription: {
|
|
|
152
144
|
readonly endSeconds: number;
|
|
153
145
|
readonly speaker?: string | undefined;
|
|
154
146
|
};
|
|
147
|
+
} | {
|
|
148
|
+
readonly type: "generation-queued";
|
|
149
|
+
readonly id: string;
|
|
150
|
+
readonly position?: number | undefined;
|
|
151
|
+
} | {
|
|
152
|
+
readonly type: "generation-progress";
|
|
153
|
+
readonly id: string;
|
|
154
|
+
readonly progress?: number | undefined;
|
|
155
155
|
} | {
|
|
156
156
|
readonly text: string;
|
|
157
157
|
readonly segments?: readonly {
|
|
@@ -170,14 +170,6 @@ export declare const OpenAITranscription: {
|
|
|
170
170
|
readonly language?: string | undefined;
|
|
171
171
|
readonly durationSeconds?: number | undefined;
|
|
172
172
|
readonly usage?: {
|
|
173
|
-
readonly type: "tokens";
|
|
174
|
-
readonly input?: number | undefined;
|
|
175
|
-
readonly output?: number | undefined;
|
|
176
|
-
readonly total?: number | undefined;
|
|
177
|
-
readonly details?: {
|
|
178
|
-
readonly [x: string]: unknown;
|
|
179
|
-
} | undefined;
|
|
180
|
-
} | {
|
|
181
173
|
readonly type: "seconds";
|
|
182
174
|
readonly seconds: number;
|
|
183
175
|
} | {
|
|
@@ -189,6 +181,14 @@ export declare const OpenAITranscription: {
|
|
|
189
181
|
} | {
|
|
190
182
|
readonly type: "compute";
|
|
191
183
|
readonly seconds: number;
|
|
184
|
+
} | {
|
|
185
|
+
readonly type: "tokens";
|
|
186
|
+
readonly input?: number | undefined;
|
|
187
|
+
readonly output?: number | undefined;
|
|
188
|
+
readonly total?: number | undefined;
|
|
189
|
+
readonly details?: {
|
|
190
|
+
readonly [x: string]: unknown;
|
|
191
|
+
} | undefined;
|
|
192
192
|
} | undefined;
|
|
193
193
|
readonly notices?: readonly {
|
|
194
194
|
readonly type: "filtered" | "moderated" | "other";
|
|
@@ -299,8 +299,8 @@ export declare const finish: <K extends StreamKey>(route: string, tools: State<K
|
|
|
299
299
|
* arguments on `response.output_item.done`; the final value wins.
|
|
300
300
|
*/
|
|
301
301
|
export declare const finishWithInput: <K extends StreamKey>(route: string, tools: State<K>, key: K, input: string) => Effect.Effect<{
|
|
302
|
-
events?: undefined;
|
|
303
302
|
tools: Partial<Record<K, PendingTool>>;
|
|
303
|
+
events?: undefined;
|
|
304
304
|
} | {
|
|
305
305
|
tools: Partial<Record<K, PendingTool>>;
|
|
306
306
|
events: readonly ({
|
|
@@ -93,13 +93,6 @@ export declare const protocol: Protocol<{
|
|
|
93
93
|
readonly messages: readonly ({
|
|
94
94
|
readonly role: "system";
|
|
95
95
|
readonly content: string | readonly ({
|
|
96
|
-
readonly type: "text";
|
|
97
|
-
readonly text: string;
|
|
98
|
-
readonly cache_control?: {
|
|
99
|
-
readonly type: "ephemeral";
|
|
100
|
-
readonly ttl?: string | undefined;
|
|
101
|
-
} | undefined;
|
|
102
|
-
} | {
|
|
103
96
|
readonly type: "image_url";
|
|
104
97
|
readonly image_url: {
|
|
105
98
|
readonly url: string;
|
|
@@ -110,17 +103,17 @@ export declare const protocol: Protocol<{
|
|
|
110
103
|
readonly filename: string;
|
|
111
104
|
readonly file_data: string;
|
|
112
105
|
};
|
|
113
|
-
}
|
|
114
|
-
} | {
|
|
115
|
-
readonly role: "user";
|
|
116
|
-
readonly content: string | readonly ({
|
|
106
|
+
} | {
|
|
117
107
|
readonly type: "text";
|
|
118
108
|
readonly text: string;
|
|
119
109
|
readonly cache_control?: {
|
|
120
110
|
readonly type: "ephemeral";
|
|
121
111
|
readonly ttl?: string | undefined;
|
|
122
112
|
} | undefined;
|
|
123
|
-
}
|
|
113
|
+
})[];
|
|
114
|
+
} | {
|
|
115
|
+
readonly role: "user";
|
|
116
|
+
readonly content: string | readonly ({
|
|
124
117
|
readonly type: "image_url";
|
|
125
118
|
readonly image_url: {
|
|
126
119
|
readonly url: string;
|
|
@@ -131,6 +124,13 @@ export declare const protocol: Protocol<{
|
|
|
131
124
|
readonly filename: string;
|
|
132
125
|
readonly file_data: string;
|
|
133
126
|
};
|
|
127
|
+
} | {
|
|
128
|
+
readonly type: "text";
|
|
129
|
+
readonly text: string;
|
|
130
|
+
readonly cache_control?: {
|
|
131
|
+
readonly type: "ephemeral";
|
|
132
|
+
readonly ttl?: string | undefined;
|
|
133
|
+
} | undefined;
|
|
134
134
|
})[];
|
|
135
135
|
} | {
|
|
136
136
|
readonly role: "tool";
|
|
@@ -3,55 +3,10 @@ import { OpenResponses } from "./open-responses.js";
|
|
|
3
3
|
export declare const protocol: Protocol<{
|
|
4
4
|
readonly model: string;
|
|
5
5
|
readonly input: readonly ({
|
|
6
|
-
readonly [x: string]: unknown;
|
|
7
|
-
readonly type: "web_search_call";
|
|
8
|
-
readonly id: string;
|
|
9
|
-
readonly status?: string | undefined;
|
|
10
|
-
readonly action?: {
|
|
11
|
-
readonly [x: string]: unknown;
|
|
12
|
-
} | null | undefined;
|
|
13
|
-
} | {
|
|
14
|
-
readonly [x: string]: unknown;
|
|
15
|
-
readonly type: "file_search_call";
|
|
16
|
-
readonly id: string;
|
|
17
|
-
readonly status?: string | undefined;
|
|
18
|
-
readonly queries?: readonly string[] | undefined;
|
|
19
|
-
readonly results?: readonly {
|
|
20
|
-
readonly [x: string]: unknown;
|
|
21
|
-
}[] | null | undefined;
|
|
22
|
-
} | {
|
|
23
|
-
readonly [x: string]: unknown;
|
|
24
|
-
readonly type: "code_interpreter_call";
|
|
25
|
-
readonly id: string;
|
|
26
|
-
readonly status?: string | undefined;
|
|
27
|
-
readonly code?: string | null | undefined;
|
|
28
|
-
readonly container_id?: string | null | undefined;
|
|
29
|
-
readonly outputs?: readonly {
|
|
30
|
-
readonly [x: string]: unknown;
|
|
31
|
-
}[] | null | undefined;
|
|
32
|
-
} | {
|
|
33
|
-
readonly [x: string]: unknown;
|
|
34
|
-
readonly type: "mcp_call";
|
|
35
|
-
readonly id: string;
|
|
36
|
-
readonly status?: string | undefined;
|
|
37
|
-
readonly server_label?: string | undefined;
|
|
38
|
-
readonly name?: string | undefined;
|
|
39
|
-
readonly arguments?: string | undefined;
|
|
40
|
-
readonly output?: string | null | undefined;
|
|
41
|
-
readonly error?: unknown;
|
|
42
|
-
} | {
|
|
43
6
|
readonly type: "configuration_update";
|
|
44
7
|
readonly reasoning: {
|
|
45
8
|
readonly effort: import("../schema/options.js").ReasoningEffort;
|
|
46
9
|
};
|
|
47
|
-
} | {
|
|
48
|
-
readonly [x: string]: unknown;
|
|
49
|
-
readonly type: string;
|
|
50
|
-
readonly id: string;
|
|
51
|
-
} | {
|
|
52
|
-
readonly type: "compaction";
|
|
53
|
-
readonly id?: string | null | undefined;
|
|
54
|
-
readonly encrypted_content: string;
|
|
55
10
|
} | {
|
|
56
11
|
readonly type: "message";
|
|
57
12
|
readonly role: "system";
|
|
@@ -60,10 +15,45 @@ export declare const protocol: Protocol<{
|
|
|
60
15
|
readonly type: "message";
|
|
61
16
|
readonly role: "developer";
|
|
62
17
|
readonly content: string;
|
|
18
|
+
} | {
|
|
19
|
+
readonly type: "function_call_output";
|
|
20
|
+
readonly call_id: string;
|
|
21
|
+
readonly output: string | readonly ({
|
|
22
|
+
readonly type: "input_text";
|
|
23
|
+
readonly text: string;
|
|
24
|
+
} | {
|
|
25
|
+
readonly type: "input_video";
|
|
26
|
+
readonly video_url: string;
|
|
27
|
+
} | {
|
|
28
|
+
readonly type: "input_image";
|
|
29
|
+
readonly image_url: string;
|
|
30
|
+
readonly detail?: string | undefined;
|
|
31
|
+
} | {
|
|
32
|
+
readonly type: "input_file";
|
|
33
|
+
readonly filename: string;
|
|
34
|
+
readonly detail?: string | undefined;
|
|
35
|
+
readonly file_data?: string | undefined;
|
|
36
|
+
readonly file_url?: string | undefined;
|
|
37
|
+
})[];
|
|
38
|
+
} | {
|
|
39
|
+
readonly type: "reasoning";
|
|
40
|
+
readonly id?: string | undefined;
|
|
41
|
+
readonly summary: readonly {
|
|
42
|
+
readonly type: "summary_text";
|
|
43
|
+
readonly text: string;
|
|
44
|
+
}[];
|
|
45
|
+
readonly encrypted_content?: string | null | undefined;
|
|
46
|
+
} | {
|
|
47
|
+
readonly type: "compaction";
|
|
48
|
+
readonly id?: string | null | undefined;
|
|
49
|
+
readonly encrypted_content: string;
|
|
63
50
|
} | {
|
|
64
51
|
readonly type: "message";
|
|
65
52
|
readonly role: "user";
|
|
66
53
|
readonly content: readonly ({
|
|
54
|
+
readonly type: "input_text";
|
|
55
|
+
readonly text: string;
|
|
56
|
+
} | {
|
|
67
57
|
readonly type: "input_image";
|
|
68
58
|
readonly image_url: string;
|
|
69
59
|
readonly detail?: string | undefined;
|
|
@@ -73,9 +63,6 @@ export declare const protocol: Protocol<{
|
|
|
73
63
|
readonly detail?: string | undefined;
|
|
74
64
|
readonly file_data?: string | undefined;
|
|
75
65
|
readonly file_url?: string | undefined;
|
|
76
|
-
} | {
|
|
77
|
-
readonly type: "input_text";
|
|
78
|
-
readonly text: string;
|
|
79
66
|
})[];
|
|
80
67
|
readonly id?: string | undefined;
|
|
81
68
|
readonly status?: string | undefined;
|
|
@@ -89,14 +76,6 @@ export declare const protocol: Protocol<{
|
|
|
89
76
|
}[];
|
|
90
77
|
readonly phase?: "commentary" | "final_answer" | null | undefined;
|
|
91
78
|
readonly status?: string | undefined;
|
|
92
|
-
} | {
|
|
93
|
-
readonly type: "reasoning";
|
|
94
|
-
readonly id?: string | undefined;
|
|
95
|
-
readonly summary: readonly {
|
|
96
|
-
readonly type: "summary_text";
|
|
97
|
-
readonly text: string;
|
|
98
|
-
}[];
|
|
99
|
-
readonly encrypted_content?: string | null | undefined;
|
|
100
79
|
} | {
|
|
101
80
|
readonly type: "function_call";
|
|
102
81
|
readonly id?: string | undefined;
|
|
@@ -105,31 +84,49 @@ export declare const protocol: Protocol<{
|
|
|
105
84
|
readonly namespace?: string | undefined;
|
|
106
85
|
readonly arguments: string;
|
|
107
86
|
} | {
|
|
108
|
-
readonly
|
|
109
|
-
readonly
|
|
110
|
-
readonly
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
readonly
|
|
114
|
-
} |
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
readonly
|
|
123
|
-
} |
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
87
|
+
readonly [x: string]: unknown;
|
|
88
|
+
readonly type: "web_search_call";
|
|
89
|
+
readonly id: string;
|
|
90
|
+
readonly status?: string | undefined;
|
|
91
|
+
readonly action?: {
|
|
92
|
+
readonly [x: string]: unknown;
|
|
93
|
+
} | null | undefined;
|
|
94
|
+
} | {
|
|
95
|
+
readonly [x: string]: unknown;
|
|
96
|
+
readonly type: "file_search_call";
|
|
97
|
+
readonly id: string;
|
|
98
|
+
readonly status?: string | undefined;
|
|
99
|
+
readonly queries?: readonly string[] | undefined;
|
|
100
|
+
readonly results?: readonly {
|
|
101
|
+
readonly [x: string]: unknown;
|
|
102
|
+
}[] | null | undefined;
|
|
103
|
+
} | {
|
|
104
|
+
readonly [x: string]: unknown;
|
|
105
|
+
readonly type: "code_interpreter_call";
|
|
106
|
+
readonly id: string;
|
|
107
|
+
readonly status?: string | undefined;
|
|
108
|
+
readonly code?: string | null | undefined;
|
|
109
|
+
readonly container_id?: string | null | undefined;
|
|
110
|
+
readonly outputs?: readonly {
|
|
111
|
+
readonly [x: string]: unknown;
|
|
112
|
+
}[] | null | undefined;
|
|
113
|
+
} | {
|
|
114
|
+
readonly [x: string]: unknown;
|
|
115
|
+
readonly type: "mcp_call";
|
|
116
|
+
readonly id: string;
|
|
117
|
+
readonly status?: string | undefined;
|
|
118
|
+
readonly server_label?: string | undefined;
|
|
119
|
+
readonly name?: string | undefined;
|
|
120
|
+
readonly arguments?: string | undefined;
|
|
121
|
+
readonly output?: string | null | undefined;
|
|
122
|
+
readonly error?: unknown;
|
|
123
|
+
} | {
|
|
124
|
+
readonly [x: string]: unknown;
|
|
125
|
+
readonly type: string;
|
|
126
|
+
readonly id: string;
|
|
127
127
|
})[];
|
|
128
128
|
readonly instructions?: string | undefined;
|
|
129
129
|
readonly tools?: readonly ({
|
|
130
|
-
readonly [x: string]: unknown;
|
|
131
|
-
readonly type: string;
|
|
132
|
-
} | {
|
|
133
130
|
readonly type: "function";
|
|
134
131
|
readonly name: string;
|
|
135
132
|
readonly description: string;
|
|
@@ -137,6 +134,9 @@ export declare const protocol: Protocol<{
|
|
|
137
134
|
readonly [x: string]: unknown;
|
|
138
135
|
};
|
|
139
136
|
readonly strict?: boolean | undefined;
|
|
137
|
+
} | {
|
|
138
|
+
readonly [x: string]: unknown;
|
|
139
|
+
readonly type: string;
|
|
140
140
|
})[] | undefined;
|
|
141
141
|
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
142
142
|
readonly type: "function";
|
|
@@ -27,13 +27,6 @@ export declare const protocol: Protocol<{
|
|
|
27
27
|
readonly messages: readonly ({
|
|
28
28
|
readonly role: "system";
|
|
29
29
|
readonly content: string | readonly ({
|
|
30
|
-
readonly type: "text";
|
|
31
|
-
readonly text: string;
|
|
32
|
-
readonly cache_control?: {
|
|
33
|
-
readonly type: "ephemeral";
|
|
34
|
-
readonly ttl?: string | undefined;
|
|
35
|
-
} | undefined;
|
|
36
|
-
} | {
|
|
37
30
|
readonly type: "image_url";
|
|
38
31
|
readonly image_url: {
|
|
39
32
|
readonly url: string;
|
|
@@ -44,17 +37,17 @@ export declare const protocol: Protocol<{
|
|
|
44
37
|
readonly filename: string;
|
|
45
38
|
readonly file_data: string;
|
|
46
39
|
};
|
|
47
|
-
}
|
|
48
|
-
} | {
|
|
49
|
-
readonly role: "user";
|
|
50
|
-
readonly content: string | readonly ({
|
|
40
|
+
} | {
|
|
51
41
|
readonly type: "text";
|
|
52
42
|
readonly text: string;
|
|
53
43
|
readonly cache_control?: {
|
|
54
44
|
readonly type: "ephemeral";
|
|
55
45
|
readonly ttl?: string | undefined;
|
|
56
46
|
} | undefined;
|
|
57
|
-
}
|
|
47
|
+
})[];
|
|
48
|
+
} | {
|
|
49
|
+
readonly role: "user";
|
|
50
|
+
readonly content: string | readonly ({
|
|
58
51
|
readonly type: "image_url";
|
|
59
52
|
readonly image_url: {
|
|
60
53
|
readonly url: string;
|
|
@@ -65,6 +58,13 @@ export declare const protocol: Protocol<{
|
|
|
65
58
|
readonly filename: string;
|
|
66
59
|
readonly file_data: string;
|
|
67
60
|
};
|
|
61
|
+
} | {
|
|
62
|
+
readonly type: "text";
|
|
63
|
+
readonly text: string;
|
|
64
|
+
readonly cache_control?: {
|
|
65
|
+
readonly type: "ephemeral";
|
|
66
|
+
readonly ttl?: string | undefined;
|
|
67
|
+
} | undefined;
|
|
68
68
|
})[];
|
|
69
69
|
} | {
|
|
70
70
|
readonly role: "tool";
|
|
@@ -148,23 +148,15 @@ export declare const protocol: Protocol<{
|
|
|
148
148
|
} | {
|
|
149
149
|
readonly role: "assistant";
|
|
150
150
|
readonly content: readonly ({
|
|
151
|
+
readonly type: "compaction";
|
|
152
|
+
readonly content: string | null;
|
|
153
|
+
} | {
|
|
151
154
|
readonly type: "text";
|
|
152
155
|
readonly text: string;
|
|
153
156
|
readonly cache_control?: {
|
|
154
157
|
readonly type: "ephemeral";
|
|
155
158
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
156
159
|
} | undefined;
|
|
157
|
-
} | {
|
|
158
|
-
readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
|
|
159
|
-
readonly tool_use_id: string;
|
|
160
|
-
readonly content: unknown;
|
|
161
|
-
readonly cache_control?: {
|
|
162
|
-
readonly type: "ephemeral";
|
|
163
|
-
readonly ttl?: "1h" | "5m" | undefined;
|
|
164
|
-
} | undefined;
|
|
165
|
-
} | {
|
|
166
|
-
readonly type: "compaction";
|
|
167
|
-
readonly content: string | null;
|
|
168
160
|
} | {
|
|
169
161
|
readonly type: "thinking";
|
|
170
162
|
readonly thinking: string;
|
|
@@ -198,6 +190,14 @@ export declare const protocol: Protocol<{
|
|
|
198
190
|
readonly type: "ephemeral";
|
|
199
191
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
200
192
|
} | undefined;
|
|
193
|
+
} | {
|
|
194
|
+
readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
|
|
195
|
+
readonly tool_use_id: string;
|
|
196
|
+
readonly content: unknown;
|
|
197
|
+
readonly cache_control?: {
|
|
198
|
+
readonly type: "ephemeral";
|
|
199
|
+
readonly ttl?: "1h" | "5m" | undefined;
|
|
200
|
+
} | undefined;
|
|
201
201
|
})[];
|
|
202
202
|
} | {
|
|
203
203
|
readonly role: "system";
|