@opencode/ai 2.0.20 → 2.0.21

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.
@@ -58,15 +58,18 @@ export declare const route: Route<{
58
58
  })[];
59
59
  } | {
60
60
  readonly [x: string]: unknown;
61
- readonly content: string | null;
61
+ readonly content: string | readonly {
62
+ readonly type: "text";
63
+ readonly text: string;
64
+ readonly cache_control?: {
65
+ readonly type: "ephemeral";
66
+ readonly ttl?: string | undefined;
67
+ } | undefined;
68
+ }[] | null;
62
69
  readonly role: "assistant";
63
70
  readonly reasoning?: string | undefined;
64
71
  readonly reasoning_content?: string | undefined;
65
72
  readonly reasoning_text?: string | undefined;
66
- readonly cache_control?: {
67
- readonly type: "ephemeral";
68
- readonly ttl?: string | undefined;
69
- } | undefined;
70
73
  readonly tool_calls?: readonly {
71
74
  readonly function: {
72
75
  readonly name: string;
@@ -82,13 +85,16 @@ export declare const route: Route<{
82
85
  }[] | undefined;
83
86
  readonly reasoning_details?: unknown;
84
87
  } | {
85
- readonly content: string;
86
88
  readonly role: "tool";
87
89
  readonly tool_call_id: string;
88
- readonly cache_control?: {
89
- readonly type: "ephemeral";
90
- readonly ttl?: string | undefined;
91
- } | undefined;
90
+ readonly content: string | readonly {
91
+ readonly type: "text";
92
+ readonly text: string;
93
+ readonly cache_control?: {
94
+ readonly type: "ephemeral";
95
+ readonly ttl?: string | undefined;
96
+ } | undefined;
97
+ }[];
92
98
  })[];
93
99
  readonly stream: true;
94
100
  readonly max_completion_tokens?: number | undefined;
@@ -174,15 +180,18 @@ export declare const routes: Route<{
174
180
  })[];
175
181
  } | {
176
182
  readonly [x: string]: unknown;
177
- readonly content: string | null;
183
+ readonly content: string | readonly {
184
+ readonly type: "text";
185
+ readonly text: string;
186
+ readonly cache_control?: {
187
+ readonly type: "ephemeral";
188
+ readonly ttl?: string | undefined;
189
+ } | undefined;
190
+ }[] | null;
178
191
  readonly role: "assistant";
179
192
  readonly reasoning?: string | undefined;
180
193
  readonly reasoning_content?: string | undefined;
181
194
  readonly reasoning_text?: string | undefined;
182
- readonly cache_control?: {
183
- readonly type: "ephemeral";
184
- readonly ttl?: string | undefined;
185
- } | undefined;
186
195
  readonly tool_calls?: readonly {
187
196
  readonly function: {
188
197
  readonly name: string;
@@ -198,13 +207,16 @@ export declare const routes: Route<{
198
207
  }[] | undefined;
199
208
  readonly reasoning_details?: unknown;
200
209
  } | {
201
- readonly content: string;
202
210
  readonly role: "tool";
203
211
  readonly tool_call_id: string;
204
- readonly cache_control?: {
205
- readonly type: "ephemeral";
206
- readonly ttl?: string | undefined;
207
- } | undefined;
212
+ readonly content: string | readonly {
213
+ readonly type: "text";
214
+ readonly text: string;
215
+ readonly cache_control?: {
216
+ readonly type: "ephemeral";
217
+ readonly ttl?: string | undefined;
218
+ } | undefined;
219
+ }[];
208
220
  })[];
209
221
  readonly stream: true;
210
222
  readonly max_completion_tokens?: number | undefined;
@@ -58,15 +58,18 @@ export declare const route: Route<{
58
58
  })[];
59
59
  } | {
60
60
  readonly [x: string]: unknown;
61
- readonly content: string | null;
61
+ readonly content: string | readonly {
62
+ readonly type: "text";
63
+ readonly text: string;
64
+ readonly cache_control?: {
65
+ readonly type: "ephemeral";
66
+ readonly ttl?: string | undefined;
67
+ } | undefined;
68
+ }[] | null;
62
69
  readonly role: "assistant";
63
70
  readonly reasoning?: string | undefined;
64
71
  readonly reasoning_content?: string | undefined;
65
72
  readonly reasoning_text?: string | undefined;
66
- readonly cache_control?: {
67
- readonly type: "ephemeral";
68
- readonly ttl?: string | undefined;
69
- } | undefined;
70
73
  readonly tool_calls?: readonly {
71
74
  readonly function: {
72
75
  readonly name: string;
@@ -82,13 +85,16 @@ export declare const route: Route<{
82
85
  }[] | undefined;
83
86
  readonly reasoning_details?: unknown;
84
87
  } | {
85
- readonly content: string;
86
88
  readonly role: "tool";
87
89
  readonly tool_call_id: string;
88
- readonly cache_control?: {
89
- readonly type: "ephemeral";
90
- readonly ttl?: string | undefined;
91
- } | undefined;
90
+ readonly content: string | readonly {
91
+ readonly type: "text";
92
+ readonly text: string;
93
+ readonly cache_control?: {
94
+ readonly type: "ephemeral";
95
+ readonly ttl?: string | undefined;
96
+ } | undefined;
97
+ }[];
92
98
  })[];
93
99
  readonly stream: true;
94
100
  readonly max_completion_tokens?: number | undefined;
@@ -174,15 +180,18 @@ export declare const routes: Route<{
174
180
  })[];
175
181
  } | {
176
182
  readonly [x: string]: unknown;
177
- readonly content: string | null;
183
+ readonly content: string | readonly {
184
+ readonly type: "text";
185
+ readonly text: string;
186
+ readonly cache_control?: {
187
+ readonly type: "ephemeral";
188
+ readonly ttl?: string | undefined;
189
+ } | undefined;
190
+ }[] | null;
178
191
  readonly role: "assistant";
179
192
  readonly reasoning?: string | undefined;
180
193
  readonly reasoning_content?: string | undefined;
181
194
  readonly reasoning_text?: string | undefined;
182
- readonly cache_control?: {
183
- readonly type: "ephemeral";
184
- readonly ttl?: string | undefined;
185
- } | undefined;
186
195
  readonly tool_calls?: readonly {
187
196
  readonly function: {
188
197
  readonly name: string;
@@ -198,13 +207,16 @@ export declare const routes: Route<{
198
207
  }[] | undefined;
199
208
  readonly reasoning_details?: unknown;
200
209
  } | {
201
- readonly content: string;
202
210
  readonly role: "tool";
203
211
  readonly tool_call_id: string;
204
- readonly cache_control?: {
205
- readonly type: "ephemeral";
206
- readonly ttl?: string | undefined;
207
- } | undefined;
212
+ readonly content: string | readonly {
213
+ readonly type: "text";
214
+ readonly text: string;
215
+ readonly cache_control?: {
216
+ readonly type: "ephemeral";
217
+ readonly ttl?: string | undefined;
218
+ } | undefined;
219
+ }[];
208
220
  })[];
209
221
  readonly stream: true;
210
222
  readonly max_completion_tokens?: number | undefined;
@@ -58,15 +58,18 @@ export declare const route: Route<{
58
58
  })[];
59
59
  } | {
60
60
  readonly [x: string]: unknown;
61
- readonly content: string | null;
61
+ readonly content: string | readonly {
62
+ readonly type: "text";
63
+ readonly text: string;
64
+ readonly cache_control?: {
65
+ readonly type: "ephemeral";
66
+ readonly ttl?: string | undefined;
67
+ } | undefined;
68
+ }[] | null;
62
69
  readonly role: "assistant";
63
70
  readonly reasoning?: string | undefined;
64
71
  readonly reasoning_content?: string | undefined;
65
72
  readonly reasoning_text?: string | undefined;
66
- readonly cache_control?: {
67
- readonly type: "ephemeral";
68
- readonly ttl?: string | undefined;
69
- } | undefined;
70
73
  readonly tool_calls?: readonly {
71
74
  readonly function: {
72
75
  readonly name: string;
@@ -82,13 +85,16 @@ export declare const route: Route<{
82
85
  }[] | undefined;
83
86
  readonly reasoning_details?: unknown;
84
87
  } | {
85
- readonly content: string;
86
88
  readonly role: "tool";
87
89
  readonly tool_call_id: string;
88
- readonly cache_control?: {
89
- readonly type: "ephemeral";
90
- readonly ttl?: string | undefined;
91
- } | undefined;
90
+ readonly content: string | readonly {
91
+ readonly type: "text";
92
+ readonly text: string;
93
+ readonly cache_control?: {
94
+ readonly type: "ephemeral";
95
+ readonly ttl?: string | undefined;
96
+ } | undefined;
97
+ }[];
92
98
  })[];
93
99
  readonly stream: true;
94
100
  readonly max_completion_tokens?: number | undefined;
@@ -174,15 +180,18 @@ export declare const routes: Route<{
174
180
  })[];
175
181
  } | {
176
182
  readonly [x: string]: unknown;
177
- readonly content: string | null;
183
+ readonly content: string | readonly {
184
+ readonly type: "text";
185
+ readonly text: string;
186
+ readonly cache_control?: {
187
+ readonly type: "ephemeral";
188
+ readonly ttl?: string | undefined;
189
+ } | undefined;
190
+ }[] | null;
178
191
  readonly role: "assistant";
179
192
  readonly reasoning?: string | undefined;
180
193
  readonly reasoning_content?: string | undefined;
181
194
  readonly reasoning_text?: string | undefined;
182
- readonly cache_control?: {
183
- readonly type: "ephemeral";
184
- readonly ttl?: string | undefined;
185
- } | undefined;
186
195
  readonly tool_calls?: readonly {
187
196
  readonly function: {
188
197
  readonly name: string;
@@ -198,13 +207,16 @@ export declare const routes: Route<{
198
207
  }[] | undefined;
199
208
  readonly reasoning_details?: unknown;
200
209
  } | {
201
- readonly content: string;
202
210
  readonly role: "tool";
203
211
  readonly tool_call_id: string;
204
- readonly cache_control?: {
205
- readonly type: "ephemeral";
206
- readonly ttl?: string | undefined;
207
- } | undefined;
212
+ readonly content: string | readonly {
213
+ readonly type: "text";
214
+ readonly text: string;
215
+ readonly cache_control?: {
216
+ readonly type: "ephemeral";
217
+ readonly ttl?: string | undefined;
218
+ } | undefined;
219
+ }[];
208
220
  })[];
209
221
  readonly stream: true;
210
222
  readonly max_completion_tokens?: number | undefined;
@@ -63,15 +63,18 @@ export declare const routes: Route<{
63
63
  })[];
64
64
  } | {
65
65
  readonly [x: string]: unknown;
66
- readonly content: string | null;
66
+ readonly content: string | readonly {
67
+ readonly type: "text";
68
+ readonly text: string;
69
+ readonly cache_control?: {
70
+ readonly type: "ephemeral";
71
+ readonly ttl?: string | undefined;
72
+ } | undefined;
73
+ }[] | null;
67
74
  readonly role: "assistant";
68
75
  readonly reasoning?: string | undefined;
69
76
  readonly reasoning_content?: string | undefined;
70
77
  readonly reasoning_text?: string | undefined;
71
- readonly cache_control?: {
72
- readonly type: "ephemeral";
73
- readonly ttl?: string | undefined;
74
- } | undefined;
75
78
  readonly tool_calls?: readonly {
76
79
  readonly function: {
77
80
  readonly name: string;
@@ -87,13 +90,16 @@ export declare const routes: Route<{
87
90
  }[] | undefined;
88
91
  readonly reasoning_details?: unknown;
89
92
  } | {
90
- readonly content: string;
91
93
  readonly role: "tool";
92
94
  readonly tool_call_id: string;
93
- readonly cache_control?: {
94
- readonly type: "ephemeral";
95
- readonly ttl?: string | undefined;
96
- } | undefined;
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
+ }[];
97
103
  })[];
98
104
  readonly stream: true;
99
105
  readonly max_completion_tokens?: number | undefined;
@@ -67,15 +67,18 @@ export declare const protocol: Protocol<{
67
67
  })[];
68
68
  } | {
69
69
  readonly [x: string]: unknown;
70
- readonly content: string | null;
70
+ readonly content: string | readonly {
71
+ readonly type: "text";
72
+ readonly text: string;
73
+ readonly cache_control?: {
74
+ readonly type: "ephemeral";
75
+ readonly ttl?: string | undefined;
76
+ } | undefined;
77
+ }[] | null;
71
78
  readonly role: "assistant";
72
79
  readonly reasoning?: string | undefined;
73
80
  readonly reasoning_content?: string | undefined;
74
81
  readonly reasoning_text?: string | undefined;
75
- readonly cache_control?: {
76
- readonly type: "ephemeral";
77
- readonly ttl?: string | undefined;
78
- } | undefined;
79
82
  readonly tool_calls?: readonly {
80
83
  readonly function: {
81
84
  readonly name: string;
@@ -91,13 +94,16 @@ export declare const protocol: Protocol<{
91
94
  }[] | undefined;
92
95
  readonly reasoning_details?: unknown;
93
96
  } | {
94
- readonly content: string;
95
97
  readonly role: "tool";
96
98
  readonly tool_call_id: string;
97
- readonly cache_control?: {
98
- readonly type: "ephemeral";
99
- readonly ttl?: string | undefined;
100
- } | undefined;
99
+ readonly content: string | readonly {
100
+ readonly type: "text";
101
+ readonly text: string;
102
+ readonly cache_control?: {
103
+ readonly type: "ephemeral";
104
+ readonly ttl?: string | undefined;
105
+ } | undefined;
106
+ }[];
101
107
  })[];
102
108
  readonly stream: true;
103
109
  readonly max_completion_tokens?: number | undefined;
@@ -256,15 +262,18 @@ export declare const route: Route<{
256
262
  })[];
257
263
  } | {
258
264
  readonly [x: string]: unknown;
259
- readonly content: string | null;
265
+ readonly content: string | readonly {
266
+ readonly type: "text";
267
+ readonly text: string;
268
+ readonly cache_control?: {
269
+ readonly type: "ephemeral";
270
+ readonly ttl?: string | undefined;
271
+ } | undefined;
272
+ }[] | null;
260
273
  readonly role: "assistant";
261
274
  readonly reasoning?: string | undefined;
262
275
  readonly reasoning_content?: string | undefined;
263
276
  readonly reasoning_text?: string | undefined;
264
- readonly cache_control?: {
265
- readonly type: "ephemeral";
266
- readonly ttl?: string | undefined;
267
- } | undefined;
268
277
  readonly tool_calls?: readonly {
269
278
  readonly function: {
270
279
  readonly name: string;
@@ -280,13 +289,16 @@ export declare const route: Route<{
280
289
  }[] | undefined;
281
290
  readonly reasoning_details?: unknown;
282
291
  } | {
283
- readonly content: string;
284
292
  readonly role: "tool";
285
293
  readonly tool_call_id: string;
286
- readonly cache_control?: {
287
- readonly type: "ephemeral";
288
- readonly ttl?: string | undefined;
289
- } | undefined;
294
+ readonly content: string | readonly {
295
+ readonly type: "text";
296
+ readonly text: string;
297
+ readonly cache_control?: {
298
+ readonly type: "ephemeral";
299
+ readonly ttl?: string | undefined;
300
+ } | undefined;
301
+ }[];
290
302
  })[];
291
303
  readonly stream: true;
292
304
  readonly max_completion_tokens?: number | undefined;
@@ -84,15 +84,18 @@ export declare const routes: (Route<{
84
84
  })[];
85
85
  } | {
86
86
  readonly [x: string]: unknown;
87
- readonly content: string | null;
87
+ readonly content: string | readonly {
88
+ readonly type: "text";
89
+ readonly text: string;
90
+ readonly cache_control?: {
91
+ readonly type: "ephemeral";
92
+ readonly ttl?: string | undefined;
93
+ } | undefined;
94
+ }[] | null;
88
95
  readonly role: "assistant";
89
96
  readonly reasoning?: string | undefined;
90
97
  readonly reasoning_content?: string | undefined;
91
98
  readonly reasoning_text?: string | undefined;
92
- readonly cache_control?: {
93
- readonly type: "ephemeral";
94
- readonly ttl?: string | undefined;
95
- } | undefined;
96
99
  readonly tool_calls?: readonly {
97
100
  readonly function: {
98
101
  readonly name: string;
@@ -108,13 +111,16 @@ export declare const routes: (Route<{
108
111
  }[] | undefined;
109
112
  readonly reasoning_details?: unknown;
110
113
  } | {
111
- readonly content: string;
112
114
  readonly role: "tool";
113
115
  readonly tool_call_id: string;
114
- readonly cache_control?: {
115
- readonly type: "ephemeral";
116
- readonly ttl?: string | undefined;
117
- } | undefined;
116
+ readonly content: string | readonly {
117
+ readonly type: "text";
118
+ readonly text: string;
119
+ readonly cache_control?: {
120
+ readonly type: "ephemeral";
121
+ readonly ttl?: string | undefined;
122
+ } | undefined;
123
+ }[];
118
124
  })[];
119
125
  readonly stream: true;
120
126
  readonly max_completion_tokens?: number | undefined;
@@ -516,15 +516,18 @@ export declare const routes: (Route<{
516
516
  })[];
517
517
  } | {
518
518
  readonly [x: string]: unknown;
519
- readonly content: string | null;
519
+ readonly content: string | readonly {
520
+ readonly type: "text";
521
+ readonly text: string;
522
+ readonly cache_control?: {
523
+ readonly type: "ephemeral";
524
+ readonly ttl?: string | undefined;
525
+ } | undefined;
526
+ }[] | null;
520
527
  readonly role: "assistant";
521
528
  readonly reasoning?: string | undefined;
522
529
  readonly reasoning_content?: string | undefined;
523
530
  readonly reasoning_text?: string | undefined;
524
- readonly cache_control?: {
525
- readonly type: "ephemeral";
526
- readonly ttl?: string | undefined;
527
- } | undefined;
528
531
  readonly tool_calls?: readonly {
529
532
  readonly function: {
530
533
  readonly name: string;
@@ -540,13 +543,16 @@ export declare const routes: (Route<{
540
543
  }[] | undefined;
541
544
  readonly reasoning_details?: unknown;
542
545
  } | {
543
- readonly content: string;
544
546
  readonly role: "tool";
545
547
  readonly tool_call_id: string;
546
- readonly cache_control?: {
547
- readonly type: "ephemeral";
548
- readonly ttl?: string | undefined;
549
- } | undefined;
548
+ readonly content: string | readonly {
549
+ readonly type: "text";
550
+ readonly text: string;
551
+ readonly cache_control?: {
552
+ readonly type: "ephemeral";
553
+ readonly ttl?: string | undefined;
554
+ } | undefined;
555
+ }[];
550
556
  })[];
551
557
  readonly stream: true;
552
558
  readonly reasoning_split: boolean;
@@ -514,15 +514,18 @@ export declare const routes: (Route<{
514
514
  })[];
515
515
  } | {
516
516
  readonly [x: string]: unknown;
517
- readonly content: string | null;
517
+ readonly content: string | readonly {
518
+ readonly type: "text";
519
+ readonly text: string;
520
+ readonly cache_control?: {
521
+ readonly type: "ephemeral";
522
+ readonly ttl?: string | undefined;
523
+ } | undefined;
524
+ }[] | null;
518
525
  readonly role: "assistant";
519
526
  readonly reasoning?: string | undefined;
520
527
  readonly reasoning_content?: string | undefined;
521
528
  readonly reasoning_text?: string | undefined;
522
- readonly cache_control?: {
523
- readonly type: "ephemeral";
524
- readonly ttl?: string | undefined;
525
- } | undefined;
526
529
  readonly tool_calls?: readonly {
527
530
  readonly function: {
528
531
  readonly name: string;
@@ -538,13 +541,16 @@ export declare const routes: (Route<{
538
541
  }[] | undefined;
539
542
  readonly reasoning_details?: unknown;
540
543
  } | {
541
- readonly content: string;
542
544
  readonly role: "tool";
543
545
  readonly tool_call_id: string;
544
- readonly cache_control?: {
545
- readonly type: "ephemeral";
546
- readonly ttl?: string | undefined;
547
- } | undefined;
546
+ readonly content: string | readonly {
547
+ readonly type: "text";
548
+ readonly text: string;
549
+ readonly cache_control?: {
550
+ readonly type: "ephemeral";
551
+ readonly ttl?: string | undefined;
552
+ } | undefined;
553
+ }[];
548
554
  })[];
549
555
  readonly stream: true;
550
556
  readonly max_completion_tokens?: number | undefined;
@@ -60,15 +60,18 @@ export declare const routes: import("../route/client.js").Route<{
60
60
  })[];
61
61
  } | {
62
62
  readonly [x: string]: unknown;
63
- readonly content: string | null;
63
+ readonly content: string | readonly {
64
+ readonly type: "text";
65
+ readonly text: string;
66
+ readonly cache_control?: {
67
+ readonly type: "ephemeral";
68
+ readonly ttl?: string | undefined;
69
+ } | undefined;
70
+ }[] | null;
64
71
  readonly role: "assistant";
65
72
  readonly reasoning?: string | undefined;
66
73
  readonly reasoning_content?: string | undefined;
67
74
  readonly reasoning_text?: string | undefined;
68
- readonly cache_control?: {
69
- readonly type: "ephemeral";
70
- readonly ttl?: string | undefined;
71
- } | undefined;
72
75
  readonly tool_calls?: readonly {
73
76
  readonly function: {
74
77
  readonly name: string;
@@ -84,13 +87,16 @@ export declare const routes: import("../route/client.js").Route<{
84
87
  }[] | undefined;
85
88
  readonly reasoning_details?: unknown;
86
89
  } | {
87
- readonly content: string;
88
90
  readonly role: "tool";
89
91
  readonly tool_call_id: string;
90
- readonly cache_control?: {
91
- readonly type: "ephemeral";
92
- readonly ttl?: string | undefined;
93
- } | undefined;
92
+ readonly content: string | readonly {
93
+ readonly type: "text";
94
+ readonly text: string;
95
+ readonly cache_control?: {
96
+ readonly type: "ephemeral";
97
+ readonly ttl?: string | undefined;
98
+ } | undefined;
99
+ }[];
94
100
  })[];
95
101
  readonly stream: true;
96
102
  readonly max_completion_tokens?: number | undefined;
@@ -55,15 +55,18 @@ export declare const routes: (Route<{
55
55
  })[];
56
56
  } | {
57
57
  readonly [x: string]: unknown;
58
- readonly content: string | null;
58
+ readonly content: string | readonly {
59
+ readonly type: "text";
60
+ readonly text: string;
61
+ readonly cache_control?: {
62
+ readonly type: "ephemeral";
63
+ readonly ttl?: string | undefined;
64
+ } | undefined;
65
+ }[] | null;
59
66
  readonly role: "assistant";
60
67
  readonly reasoning?: string | undefined;
61
68
  readonly reasoning_content?: string | undefined;
62
69
  readonly reasoning_text?: string | undefined;
63
- readonly cache_control?: {
64
- readonly type: "ephemeral";
65
- readonly ttl?: string | undefined;
66
- } | undefined;
67
70
  readonly tool_calls?: readonly {
68
71
  readonly function: {
69
72
  readonly name: string;
@@ -79,13 +82,16 @@ export declare const routes: (Route<{
79
82
  }[] | undefined;
80
83
  readonly reasoning_details?: unknown;
81
84
  } | {
82
- readonly content: string;
83
85
  readonly role: "tool";
84
86
  readonly tool_call_id: string;
85
- readonly cache_control?: {
86
- readonly type: "ephemeral";
87
- readonly ttl?: string | undefined;
88
- } | undefined;
87
+ readonly content: string | readonly {
88
+ readonly type: "text";
89
+ readonly text: string;
90
+ readonly cache_control?: {
91
+ readonly type: "ephemeral";
92
+ readonly ttl?: string | undefined;
93
+ } | undefined;
94
+ }[];
89
95
  })[];
90
96
  readonly stream: true;
91
97
  readonly max_completion_tokens?: number | undefined;