@opencode/ai 0.0.0-dev-20283 → 0.0.0-dev-20285
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/cache-policy.js +6 -0
- package/dist/llm.d.ts +1 -1
- package/dist/promise.d.ts +2 -2
- package/dist/protocols/alibaba-responses.d.ts +1 -1
- package/dist/protocols/meta-messages.d.ts +5 -1
- package/dist/protocols/meta-messages.js +11 -4
- package/dist/protocols/meta-responses.d.ts +1 -1
- package/dist/protocols/open-responses.d.ts +3 -3
- package/dist/protocols/openai-responses.d.ts +1 -1
- package/dist/protocols/utils/tool-stream.d.ts +3 -3
- package/dist/protocols/xai-responses.d.ts +1 -1
- package/dist/providers/meta.d.ts +5 -1
- package/dist/route/client.d.ts +1 -1
- package/dist/schema/events.d.ts +30 -30
- package/dist/testing.d.ts +8 -8
- package/package.json +3 -3
package/dist/cache-policy.js
CHANGED
|
@@ -36,9 +36,15 @@ const resolve = (policy) => {
|
|
|
36
36
|
// prefix caching, Gemini's implicit + out-of-band CachedContent). Skip the
|
|
37
37
|
// whole policy pass for these — emitting hints would be harmless but pointless.
|
|
38
38
|
const RESPECTS_INLINE_HINTS = new Set([
|
|
39
|
+
"alibaba-messages",
|
|
39
40
|
"anthropic-messages",
|
|
40
41
|
"anthropic-compatible-messages",
|
|
42
|
+
"cloudflare-ai-gateway-messages",
|
|
41
43
|
"google-vertex-messages",
|
|
44
|
+
"meta-messages",
|
|
45
|
+
"minimax-messages",
|
|
46
|
+
"moonshot-messages",
|
|
47
|
+
"zai-coding-messages",
|
|
42
48
|
"bedrock-converse",
|
|
43
49
|
"openrouter",
|
|
44
50
|
]);
|
package/dist/llm.d.ts
CHANGED
|
@@ -184,8 +184,8 @@ export declare class GenerateObjectResponse<T> {
|
|
|
184
184
|
} | {
|
|
185
185
|
readonly id: string;
|
|
186
186
|
readonly type: "tool-error";
|
|
187
|
-
readonly name: string;
|
|
188
187
|
readonly message: string;
|
|
188
|
+
readonly name: string;
|
|
189
189
|
readonly error?: unknown;
|
|
190
190
|
readonly providerMetadata?: {
|
|
191
191
|
readonly [x: string]: {
|
package/dist/promise.d.ts
CHANGED
|
@@ -211,8 +211,8 @@ export declare const make: (options?: Options) => {
|
|
|
211
211
|
} | {
|
|
212
212
|
readonly id: string;
|
|
213
213
|
readonly type: "tool-error";
|
|
214
|
-
readonly name: string;
|
|
215
214
|
readonly message: string;
|
|
215
|
+
readonly name: string;
|
|
216
216
|
readonly error?: unknown;
|
|
217
217
|
readonly providerMetadata?: {
|
|
218
218
|
readonly [x: string]: {
|
|
@@ -698,8 +698,8 @@ export declare const ai: {
|
|
|
698
698
|
} | {
|
|
699
699
|
readonly id: string;
|
|
700
700
|
readonly type: "tool-error";
|
|
701
|
-
readonly name: string;
|
|
702
701
|
readonly message: string;
|
|
702
|
+
readonly name: string;
|
|
703
703
|
readonly error?: unknown;
|
|
704
704
|
readonly providerMetadata?: {
|
|
705
705
|
readonly [x: string]: {
|
|
@@ -190,8 +190,8 @@ export declare const protocol: Protocol<{
|
|
|
190
190
|
readonly [x: string]: unknown;
|
|
191
191
|
readonly type: string;
|
|
192
192
|
readonly status?: unknown;
|
|
193
|
-
readonly code?: unknown;
|
|
194
193
|
readonly message?: unknown;
|
|
194
|
+
readonly code?: unknown;
|
|
195
195
|
readonly text?: string | undefined;
|
|
196
196
|
readonly error?: unknown;
|
|
197
197
|
readonly item?: {
|
|
@@ -203,11 +203,15 @@ export declare const protocol: Protocol<{
|
|
|
203
203
|
readonly timezone?: string | undefined;
|
|
204
204
|
} | undefined;
|
|
205
205
|
} | {
|
|
206
|
-
readonly name: string;
|
|
207
206
|
readonly description: string;
|
|
207
|
+
readonly name: string;
|
|
208
208
|
readonly input_schema: {
|
|
209
209
|
readonly [x: string]: unknown;
|
|
210
210
|
};
|
|
211
|
+
readonly cache_control?: {
|
|
212
|
+
readonly type: "ephemeral";
|
|
213
|
+
readonly ttl?: "1h" | "5m" | undefined;
|
|
214
|
+
} | undefined;
|
|
211
215
|
})[] | undefined;
|
|
212
216
|
readonly system?: readonly {
|
|
213
217
|
readonly type: "text";
|
|
@@ -8,12 +8,19 @@ const WebSearch = Schema.Struct({
|
|
|
8
8
|
name: Schema.Literal("web_search"),
|
|
9
9
|
user_location: MetaResponses.WebSearch.fields.user_location,
|
|
10
10
|
});
|
|
11
|
+
const MetaCacheControl = Schema.Struct({
|
|
12
|
+
type: Schema.tag("ephemeral"),
|
|
13
|
+
ttl: Schema.optional(Schema.Literals(["5m", "1h"])),
|
|
14
|
+
});
|
|
15
|
+
const FunctionTool = Schema.Struct({
|
|
16
|
+
name: Schema.String,
|
|
17
|
+
description: Schema.String,
|
|
18
|
+
input_schema: JsonObject,
|
|
19
|
+
cache_control: Schema.optional(MetaCacheControl),
|
|
20
|
+
});
|
|
11
21
|
const Body = Schema.Struct({
|
|
12
22
|
...AnthropicMessages.AnthropicMessagesBody.fields,
|
|
13
|
-
tools: optionalArray(Schema.Union([
|
|
14
|
-
Schema.Struct({ name: Schema.String, description: Schema.String, input_schema: JsonObject }),
|
|
15
|
-
WebSearch,
|
|
16
|
-
])),
|
|
23
|
+
tools: optionalArray(Schema.Union([FunctionTool, WebSearch])),
|
|
17
24
|
});
|
|
18
25
|
const fromRequest = Effect.fn("MetaMessages.fromRequest")(function* (request) {
|
|
19
26
|
const projected = ProviderShared.flattenToolRequest(request);
|
|
@@ -219,8 +219,8 @@ export declare const protocol: Protocol<{
|
|
|
219
219
|
readonly [x: string]: unknown;
|
|
220
220
|
readonly type: string;
|
|
221
221
|
readonly status?: unknown;
|
|
222
|
-
readonly code?: unknown;
|
|
223
222
|
readonly message?: unknown;
|
|
223
|
+
readonly code?: unknown;
|
|
224
224
|
readonly text?: string | undefined;
|
|
225
225
|
readonly error?: unknown;
|
|
226
226
|
readonly item?: {
|
|
@@ -629,8 +629,8 @@ export declare const decodeChannelEvent: (frame: string) => Effect.Effect<{
|
|
|
629
629
|
readonly [x: string]: unknown;
|
|
630
630
|
readonly type: string;
|
|
631
631
|
readonly status?: unknown;
|
|
632
|
-
readonly code?: unknown;
|
|
633
632
|
readonly message?: unknown;
|
|
633
|
+
readonly code?: unknown;
|
|
634
634
|
readonly text?: string | undefined;
|
|
635
635
|
readonly error?: unknown;
|
|
636
636
|
readonly item?: {
|
|
@@ -1169,8 +1169,8 @@ export declare const step: (state: ParserState, event: NormalizedEvent) => AIErr
|
|
|
1169
1169
|
} | {
|
|
1170
1170
|
readonly id: string;
|
|
1171
1171
|
readonly type: "tool-error";
|
|
1172
|
-
readonly name: string;
|
|
1173
1172
|
readonly message: string;
|
|
1173
|
+
readonly name: string;
|
|
1174
1174
|
readonly error?: unknown;
|
|
1175
1175
|
readonly providerMetadata?: {
|
|
1176
1176
|
readonly [x: string]: {
|
|
@@ -1395,8 +1395,8 @@ export declare const protocol: Protocol<{
|
|
|
1395
1395
|
readonly [x: string]: unknown;
|
|
1396
1396
|
readonly type: string;
|
|
1397
1397
|
readonly status?: unknown;
|
|
1398
|
-
readonly code?: unknown;
|
|
1399
1398
|
readonly message?: unknown;
|
|
1399
|
+
readonly code?: unknown;
|
|
1400
1400
|
readonly text?: string | undefined;
|
|
1401
1401
|
readonly error?: unknown;
|
|
1402
1402
|
readonly item?: {
|
|
@@ -450,8 +450,8 @@ export declare const protocol: Protocol<{
|
|
|
450
450
|
readonly [x: string]: unknown;
|
|
451
451
|
readonly type: string;
|
|
452
452
|
readonly status?: unknown;
|
|
453
|
-
readonly code?: unknown;
|
|
454
453
|
readonly message?: unknown;
|
|
454
|
+
readonly code?: unknown;
|
|
455
455
|
readonly text?: string | undefined;
|
|
456
456
|
readonly error?: unknown;
|
|
457
457
|
readonly item?: {
|
|
@@ -236,8 +236,8 @@ export declare const finish: <K extends StreamKey>(route: string, tools: State<K
|
|
|
236
236
|
} | {
|
|
237
237
|
readonly id: string;
|
|
238
238
|
readonly type: "tool-error";
|
|
239
|
-
readonly name: string;
|
|
240
239
|
readonly message: string;
|
|
240
|
+
readonly name: string;
|
|
241
241
|
readonly error?: unknown;
|
|
242
242
|
readonly providerMetadata?: {
|
|
243
243
|
readonly [x: string]: {
|
|
@@ -459,8 +459,8 @@ export declare const finishWithInput: <K extends StreamKey>(route: string, tools
|
|
|
459
459
|
} | {
|
|
460
460
|
readonly id: string;
|
|
461
461
|
readonly type: "tool-error";
|
|
462
|
-
readonly name: string;
|
|
463
462
|
readonly message: string;
|
|
463
|
+
readonly name: string;
|
|
464
464
|
readonly error?: unknown;
|
|
465
465
|
readonly providerMetadata?: {
|
|
466
466
|
readonly [x: string]: {
|
|
@@ -679,8 +679,8 @@ export declare const finishAll: <K extends StreamKey>(route: string, tools: Stat
|
|
|
679
679
|
} | {
|
|
680
680
|
readonly id: string;
|
|
681
681
|
readonly type: "tool-error";
|
|
682
|
-
readonly name: string;
|
|
683
682
|
readonly message: string;
|
|
683
|
+
readonly name: string;
|
|
684
684
|
readonly error?: unknown;
|
|
685
685
|
readonly providerMetadata?: {
|
|
686
686
|
readonly [x: string]: {
|
|
@@ -184,8 +184,8 @@ export declare const protocol: Protocol<{
|
|
|
184
184
|
readonly [x: string]: unknown;
|
|
185
185
|
readonly type: string;
|
|
186
186
|
readonly status?: unknown;
|
|
187
|
-
readonly code?: unknown;
|
|
188
187
|
readonly message?: unknown;
|
|
188
|
+
readonly code?: unknown;
|
|
189
189
|
readonly text?: string | undefined;
|
|
190
190
|
readonly error?: unknown;
|
|
191
191
|
readonly item?: {
|
package/dist/providers/meta.d.ts
CHANGED
|
@@ -547,11 +547,15 @@ export declare const routes: (Route<{
|
|
|
547
547
|
readonly timezone?: string | undefined;
|
|
548
548
|
} | undefined;
|
|
549
549
|
} | {
|
|
550
|
-
readonly name: string;
|
|
551
550
|
readonly description: string;
|
|
551
|
+
readonly name: string;
|
|
552
552
|
readonly input_schema: {
|
|
553
553
|
readonly [x: string]: unknown;
|
|
554
554
|
};
|
|
555
|
+
readonly cache_control?: {
|
|
556
|
+
readonly type: "ephemeral";
|
|
557
|
+
readonly ttl?: "1h" | "5m" | undefined;
|
|
558
|
+
} | undefined;
|
|
555
559
|
})[] | undefined;
|
|
556
560
|
readonly system?: readonly {
|
|
557
561
|
readonly type: "text";
|
package/dist/route/client.d.ts
CHANGED
|
@@ -374,8 +374,8 @@ export declare const streamRequest: (request: LLMRequest, options?: StreamOption
|
|
|
374
374
|
} | {
|
|
375
375
|
readonly id: string;
|
|
376
376
|
readonly type: "tool-error";
|
|
377
|
-
readonly name: string;
|
|
378
377
|
readonly message: string;
|
|
378
|
+
readonly name: string;
|
|
379
379
|
readonly error?: unknown;
|
|
380
380
|
readonly providerMetadata?: {
|
|
381
381
|
readonly [x: string]: {
|
package/dist/schema/events.d.ts
CHANGED
|
@@ -1266,8 +1266,8 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.refine<{
|
|
|
1266
1266
|
} | {
|
|
1267
1267
|
readonly id: string;
|
|
1268
1268
|
readonly type: "tool-error";
|
|
1269
|
-
readonly name: string;
|
|
1270
1269
|
readonly message: string;
|
|
1270
|
+
readonly name: string;
|
|
1271
1271
|
readonly error?: unknown;
|
|
1272
1272
|
readonly providerMetadata?: {
|
|
1273
1273
|
readonly [x: string]: {
|
|
@@ -1513,8 +1513,8 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.refine<{
|
|
|
1513
1513
|
}> | Extract<{
|
|
1514
1514
|
readonly id: string;
|
|
1515
1515
|
readonly type: "tool-error";
|
|
1516
|
-
readonly name: string;
|
|
1517
1516
|
readonly message: string;
|
|
1517
|
+
readonly name: string;
|
|
1518
1518
|
readonly error?: unknown;
|
|
1519
1519
|
readonly providerMetadata?: {
|
|
1520
1520
|
readonly [x: string]: {
|
|
@@ -1750,8 +1750,8 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.refine<{
|
|
|
1750
1750
|
"tool-error": (u: unknown) => u is {
|
|
1751
1751
|
readonly id: string;
|
|
1752
1752
|
readonly type: "tool-error";
|
|
1753
|
-
readonly name: string;
|
|
1754
1753
|
readonly message: string;
|
|
1754
|
+
readonly name: string;
|
|
1755
1755
|
readonly error?: unknown;
|
|
1756
1756
|
readonly providerMetadata?: {
|
|
1757
1757
|
readonly [x: string]: {
|
|
@@ -1983,8 +1983,8 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.refine<{
|
|
|
1983
1983
|
"tool-error": (value: {
|
|
1984
1984
|
readonly id: string;
|
|
1985
1985
|
readonly type: "tool-error";
|
|
1986
|
-
readonly name: string;
|
|
1987
1986
|
readonly message: string;
|
|
1987
|
+
readonly name: string;
|
|
1988
1988
|
readonly error?: unknown;
|
|
1989
1989
|
readonly providerMetadata?: {
|
|
1990
1990
|
readonly [x: string]: {
|
|
@@ -2199,8 +2199,8 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.refine<{
|
|
|
2199
2199
|
} | {
|
|
2200
2200
|
readonly id: string;
|
|
2201
2201
|
readonly type: "tool-error";
|
|
2202
|
-
readonly name: string;
|
|
2203
2202
|
readonly message: string;
|
|
2203
|
+
readonly name: string;
|
|
2204
2204
|
readonly error?: unknown;
|
|
2205
2205
|
readonly providerMetadata?: {
|
|
2206
2206
|
readonly [x: string]: {
|
|
@@ -2426,8 +2426,8 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.refine<{
|
|
|
2426
2426
|
"tool-error": (value: {
|
|
2427
2427
|
readonly id: string;
|
|
2428
2428
|
readonly type: "tool-error";
|
|
2429
|
-
readonly name: string;
|
|
2430
2429
|
readonly message: string;
|
|
2430
|
+
readonly name: string;
|
|
2431
2431
|
readonly error?: unknown;
|
|
2432
2432
|
readonly providerMetadata?: {
|
|
2433
2433
|
readonly [x: string]: {
|
|
@@ -2642,8 +2642,8 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.refine<{
|
|
|
2642
2642
|
} | {
|
|
2643
2643
|
readonly id: string;
|
|
2644
2644
|
readonly type: "tool-error";
|
|
2645
|
-
readonly name: string;
|
|
2646
2645
|
readonly message: string;
|
|
2646
|
+
readonly name: string;
|
|
2647
2647
|
readonly error?: unknown;
|
|
2648
2648
|
readonly providerMetadata?: {
|
|
2649
2649
|
readonly [x: string]: {
|
|
@@ -2871,8 +2871,8 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.refine<{
|
|
|
2871
2871
|
"tool-error"?: ((value: {
|
|
2872
2872
|
readonly id: string;
|
|
2873
2873
|
readonly type: "tool-error";
|
|
2874
|
-
readonly name: string;
|
|
2875
2874
|
readonly message: string;
|
|
2875
|
+
readonly name: string;
|
|
2876
2876
|
readonly error?: unknown;
|
|
2877
2877
|
readonly providerMetadata?: {
|
|
2878
2878
|
readonly [x: string]: {
|
|
@@ -3123,8 +3123,8 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.refine<{
|
|
|
3123
3123
|
}> | Exclude<{
|
|
3124
3124
|
readonly id: string;
|
|
3125
3125
|
readonly type: "tool-error";
|
|
3126
|
-
readonly name: string;
|
|
3127
3126
|
readonly message: string;
|
|
3127
|
+
readonly name: string;
|
|
3128
3128
|
readonly error?: unknown;
|
|
3129
3129
|
readonly providerMetadata?: {
|
|
3130
3130
|
readonly [x: string]: {
|
|
@@ -3344,8 +3344,8 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.refine<{
|
|
|
3344
3344
|
} | {
|
|
3345
3345
|
readonly id: string;
|
|
3346
3346
|
readonly type: "tool-error";
|
|
3347
|
-
readonly name: string;
|
|
3348
3347
|
readonly message: string;
|
|
3348
|
+
readonly name: string;
|
|
3349
3349
|
readonly error?: unknown;
|
|
3350
3350
|
readonly providerMetadata?: {
|
|
3351
3351
|
readonly [x: string]: {
|
|
@@ -3571,8 +3571,8 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.refine<{
|
|
|
3571
3571
|
"tool-error"?: ((value: {
|
|
3572
3572
|
readonly id: string;
|
|
3573
3573
|
readonly type: "tool-error";
|
|
3574
|
-
readonly name: string;
|
|
3575
3574
|
readonly message: string;
|
|
3575
|
+
readonly name: string;
|
|
3576
3576
|
readonly error?: unknown;
|
|
3577
3577
|
readonly providerMetadata?: {
|
|
3578
3578
|
readonly [x: string]: {
|
|
@@ -3823,8 +3823,8 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.refine<{
|
|
|
3823
3823
|
}> | Exclude<{
|
|
3824
3824
|
readonly id: string;
|
|
3825
3825
|
readonly type: "tool-error";
|
|
3826
|
-
readonly name: string;
|
|
3827
3826
|
readonly message: string;
|
|
3827
|
+
readonly name: string;
|
|
3828
3828
|
readonly error?: unknown;
|
|
3829
3829
|
readonly providerMetadata?: {
|
|
3830
3830
|
readonly [x: string]: {
|
|
@@ -4044,8 +4044,8 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.refine<{
|
|
|
4044
4044
|
} | {
|
|
4045
4045
|
readonly id: string;
|
|
4046
4046
|
readonly type: "tool-error";
|
|
4047
|
-
readonly name: string;
|
|
4048
4047
|
readonly message: string;
|
|
4048
|
+
readonly name: string;
|
|
4049
4049
|
readonly error?: unknown;
|
|
4050
4050
|
readonly providerMetadata?: {
|
|
4051
4051
|
readonly [x: string]: {
|
|
@@ -4287,8 +4287,8 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.refine<{
|
|
|
4287
4287
|
toolError: (input: WithID<ToolError, ToolCallID>) => {
|
|
4288
4288
|
readonly id: string;
|
|
4289
4289
|
readonly type: "tool-error";
|
|
4290
|
-
readonly name: string;
|
|
4291
4290
|
readonly message: string;
|
|
4291
|
+
readonly name: string;
|
|
4292
4292
|
readonly error?: unknown;
|
|
4293
4293
|
readonly providerMetadata?: {
|
|
4294
4294
|
readonly [x: string]: {
|
|
@@ -4535,8 +4535,8 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.refine<{
|
|
|
4535
4535
|
toolError: (u: unknown) => u is {
|
|
4536
4536
|
readonly id: string;
|
|
4537
4537
|
readonly type: "tool-error";
|
|
4538
|
-
readonly name: string;
|
|
4539
4538
|
readonly message: string;
|
|
4539
|
+
readonly name: string;
|
|
4540
4540
|
readonly error?: unknown;
|
|
4541
4541
|
readonly providerMetadata?: {
|
|
4542
4542
|
readonly [x: string]: {
|
|
@@ -5249,8 +5249,8 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
|
|
|
5249
5249
|
} | {
|
|
5250
5250
|
readonly id: string;
|
|
5251
5251
|
readonly type: "tool-error";
|
|
5252
|
-
readonly name: string;
|
|
5253
5252
|
readonly message: string;
|
|
5253
|
+
readonly name: string;
|
|
5254
5254
|
readonly error?: unknown;
|
|
5255
5255
|
readonly providerMetadata?: {
|
|
5256
5256
|
readonly [x: string]: {
|
|
@@ -5496,8 +5496,8 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
|
|
|
5496
5496
|
}> | Extract<{
|
|
5497
5497
|
readonly id: string;
|
|
5498
5498
|
readonly type: "tool-error";
|
|
5499
|
-
readonly name: string;
|
|
5500
5499
|
readonly message: string;
|
|
5500
|
+
readonly name: string;
|
|
5501
5501
|
readonly error?: unknown;
|
|
5502
5502
|
readonly providerMetadata?: {
|
|
5503
5503
|
readonly [x: string]: {
|
|
@@ -5733,8 +5733,8 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
|
|
|
5733
5733
|
"tool-error": (u: unknown) => u is {
|
|
5734
5734
|
readonly id: string;
|
|
5735
5735
|
readonly type: "tool-error";
|
|
5736
|
-
readonly name: string;
|
|
5737
5736
|
readonly message: string;
|
|
5737
|
+
readonly name: string;
|
|
5738
5738
|
readonly error?: unknown;
|
|
5739
5739
|
readonly providerMetadata?: {
|
|
5740
5740
|
readonly [x: string]: {
|
|
@@ -5966,8 +5966,8 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
|
|
|
5966
5966
|
"tool-error": (value: {
|
|
5967
5967
|
readonly id: string;
|
|
5968
5968
|
readonly type: "tool-error";
|
|
5969
|
-
readonly name: string;
|
|
5970
5969
|
readonly message: string;
|
|
5970
|
+
readonly name: string;
|
|
5971
5971
|
readonly error?: unknown;
|
|
5972
5972
|
readonly providerMetadata?: {
|
|
5973
5973
|
readonly [x: string]: {
|
|
@@ -6182,8 +6182,8 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
|
|
|
6182
6182
|
} | {
|
|
6183
6183
|
readonly id: string;
|
|
6184
6184
|
readonly type: "tool-error";
|
|
6185
|
-
readonly name: string;
|
|
6186
6185
|
readonly message: string;
|
|
6186
|
+
readonly name: string;
|
|
6187
6187
|
readonly error?: unknown;
|
|
6188
6188
|
readonly providerMetadata?: {
|
|
6189
6189
|
readonly [x: string]: {
|
|
@@ -6409,8 +6409,8 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
|
|
|
6409
6409
|
"tool-error": (value: {
|
|
6410
6410
|
readonly id: string;
|
|
6411
6411
|
readonly type: "tool-error";
|
|
6412
|
-
readonly name: string;
|
|
6413
6412
|
readonly message: string;
|
|
6413
|
+
readonly name: string;
|
|
6414
6414
|
readonly error?: unknown;
|
|
6415
6415
|
readonly providerMetadata?: {
|
|
6416
6416
|
readonly [x: string]: {
|
|
@@ -6625,8 +6625,8 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
|
|
|
6625
6625
|
} | {
|
|
6626
6626
|
readonly id: string;
|
|
6627
6627
|
readonly type: "tool-error";
|
|
6628
|
-
readonly name: string;
|
|
6629
6628
|
readonly message: string;
|
|
6629
|
+
readonly name: string;
|
|
6630
6630
|
readonly error?: unknown;
|
|
6631
6631
|
readonly providerMetadata?: {
|
|
6632
6632
|
readonly [x: string]: {
|
|
@@ -6854,8 +6854,8 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
|
|
|
6854
6854
|
"tool-error"?: ((value: {
|
|
6855
6855
|
readonly id: string;
|
|
6856
6856
|
readonly type: "tool-error";
|
|
6857
|
-
readonly name: string;
|
|
6858
6857
|
readonly message: string;
|
|
6858
|
+
readonly name: string;
|
|
6859
6859
|
readonly error?: unknown;
|
|
6860
6860
|
readonly providerMetadata?: {
|
|
6861
6861
|
readonly [x: string]: {
|
|
@@ -7106,8 +7106,8 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
|
|
|
7106
7106
|
}> | Exclude<{
|
|
7107
7107
|
readonly id: string;
|
|
7108
7108
|
readonly type: "tool-error";
|
|
7109
|
-
readonly name: string;
|
|
7110
7109
|
readonly message: string;
|
|
7110
|
+
readonly name: string;
|
|
7111
7111
|
readonly error?: unknown;
|
|
7112
7112
|
readonly providerMetadata?: {
|
|
7113
7113
|
readonly [x: string]: {
|
|
@@ -7327,8 +7327,8 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
|
|
|
7327
7327
|
} | {
|
|
7328
7328
|
readonly id: string;
|
|
7329
7329
|
readonly type: "tool-error";
|
|
7330
|
-
readonly name: string;
|
|
7331
7330
|
readonly message: string;
|
|
7331
|
+
readonly name: string;
|
|
7332
7332
|
readonly error?: unknown;
|
|
7333
7333
|
readonly providerMetadata?: {
|
|
7334
7334
|
readonly [x: string]: {
|
|
@@ -7554,8 +7554,8 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
|
|
|
7554
7554
|
"tool-error"?: ((value: {
|
|
7555
7555
|
readonly id: string;
|
|
7556
7556
|
readonly type: "tool-error";
|
|
7557
|
-
readonly name: string;
|
|
7558
7557
|
readonly message: string;
|
|
7558
|
+
readonly name: string;
|
|
7559
7559
|
readonly error?: unknown;
|
|
7560
7560
|
readonly providerMetadata?: {
|
|
7561
7561
|
readonly [x: string]: {
|
|
@@ -7806,8 +7806,8 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
|
|
|
7806
7806
|
}> | Exclude<{
|
|
7807
7807
|
readonly id: string;
|
|
7808
7808
|
readonly type: "tool-error";
|
|
7809
|
-
readonly name: string;
|
|
7810
7809
|
readonly message: string;
|
|
7810
|
+
readonly name: string;
|
|
7811
7811
|
readonly error?: unknown;
|
|
7812
7812
|
readonly providerMetadata?: {
|
|
7813
7813
|
readonly [x: string]: {
|
|
@@ -8027,8 +8027,8 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
|
|
|
8027
8027
|
} | {
|
|
8028
8028
|
readonly id: string;
|
|
8029
8029
|
readonly type: "tool-error";
|
|
8030
|
-
readonly name: string;
|
|
8031
8030
|
readonly message: string;
|
|
8031
|
+
readonly name: string;
|
|
8032
8032
|
readonly error?: unknown;
|
|
8033
8033
|
readonly providerMetadata?: {
|
|
8034
8034
|
readonly [x: string]: {
|
|
@@ -8270,8 +8270,8 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
|
|
|
8270
8270
|
toolError: (input: WithID<ToolError, ToolCallID>) => {
|
|
8271
8271
|
readonly id: string;
|
|
8272
8272
|
readonly type: "tool-error";
|
|
8273
|
-
readonly name: string;
|
|
8274
8273
|
readonly message: string;
|
|
8274
|
+
readonly name: string;
|
|
8275
8275
|
readonly error?: unknown;
|
|
8276
8276
|
readonly providerMetadata?: {
|
|
8277
8277
|
readonly [x: string]: {
|
|
@@ -8518,8 +8518,8 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
|
|
|
8518
8518
|
toolError: (u: unknown) => u is {
|
|
8519
8519
|
readonly id: string;
|
|
8520
8520
|
readonly type: "tool-error";
|
|
8521
|
-
readonly name: string;
|
|
8522
8521
|
readonly message: string;
|
|
8522
|
+
readonly name: string;
|
|
8523
8523
|
readonly error?: unknown;
|
|
8524
8524
|
readonly providerMetadata?: {
|
|
8525
8525
|
readonly [x: string]: {
|
package/dist/testing.d.ts
CHANGED
|
@@ -206,8 +206,8 @@ export declare const complete: (options: {
|
|
|
206
206
|
} | {
|
|
207
207
|
readonly id: string;
|
|
208
208
|
readonly type: "tool-error";
|
|
209
|
-
readonly name: string;
|
|
210
209
|
readonly message: string;
|
|
210
|
+
readonly name: string;
|
|
211
211
|
readonly error?: unknown;
|
|
212
212
|
readonly providerMetadata?: {
|
|
213
213
|
readonly [x: string]: {
|
|
@@ -418,8 +418,8 @@ export declare const stop: (...events: readonly LLMEvent[]) => (({
|
|
|
418
418
|
} | {
|
|
419
419
|
readonly id: string;
|
|
420
420
|
readonly type: "tool-error";
|
|
421
|
-
readonly name: string;
|
|
422
421
|
readonly message: string;
|
|
422
|
+
readonly name: string;
|
|
423
423
|
readonly error?: unknown;
|
|
424
424
|
readonly providerMetadata?: {
|
|
425
425
|
readonly [x: string]: {
|
|
@@ -630,8 +630,8 @@ export declare const toolCalls: (...events: readonly LLMEvent[]) => (({
|
|
|
630
630
|
} | {
|
|
631
631
|
readonly id: string;
|
|
632
632
|
readonly type: "tool-error";
|
|
633
|
-
readonly name: string;
|
|
634
633
|
readonly message: string;
|
|
634
|
+
readonly name: string;
|
|
635
635
|
readonly error?: unknown;
|
|
636
636
|
readonly providerMetadata?: {
|
|
637
637
|
readonly [x: string]: {
|
|
@@ -842,8 +842,8 @@ export declare const text: (value: string, id: string) => (({
|
|
|
842
842
|
} | {
|
|
843
843
|
readonly id: string;
|
|
844
844
|
readonly type: "tool-error";
|
|
845
|
-
readonly name: string;
|
|
846
845
|
readonly message: string;
|
|
846
|
+
readonly name: string;
|
|
847
847
|
readonly error?: unknown;
|
|
848
848
|
readonly providerMetadata?: {
|
|
849
849
|
readonly [x: string]: {
|
|
@@ -1054,8 +1054,8 @@ export declare const textWithUsage: (value: string, id: string, inputTokens: num
|
|
|
1054
1054
|
} | {
|
|
1055
1055
|
readonly id: string;
|
|
1056
1056
|
readonly type: "tool-error";
|
|
1057
|
-
readonly name: string;
|
|
1058
1057
|
readonly message: string;
|
|
1058
|
+
readonly name: string;
|
|
1059
1059
|
readonly error?: unknown;
|
|
1060
1060
|
readonly providerMetadata?: {
|
|
1061
1061
|
readonly [x: string]: {
|
|
@@ -1266,8 +1266,8 @@ export declare const tool: (id: string, name: string, input: unknown) => (({
|
|
|
1266
1266
|
} | {
|
|
1267
1267
|
readonly id: string;
|
|
1268
1268
|
readonly type: "tool-error";
|
|
1269
|
-
readonly name: string;
|
|
1270
1269
|
readonly message: string;
|
|
1270
|
+
readonly name: string;
|
|
1271
1271
|
readonly error?: unknown;
|
|
1272
1272
|
readonly providerMetadata?: {
|
|
1273
1273
|
readonly [x: string]: {
|
|
@@ -1478,8 +1478,8 @@ export declare const failAfter: (error: AIError, ...events: readonly LLMEvent[])
|
|
|
1478
1478
|
} | {
|
|
1479
1479
|
readonly id: string;
|
|
1480
1480
|
readonly type: "tool-error";
|
|
1481
|
-
readonly name: string;
|
|
1482
1481
|
readonly message: string;
|
|
1482
|
+
readonly name: string;
|
|
1483
1483
|
readonly error?: unknown;
|
|
1484
1484
|
readonly providerMetadata?: {
|
|
1485
1485
|
readonly [x: string]: {
|
|
@@ -1690,8 +1690,8 @@ export declare const hangAfter: (...events: readonly LLMEvent[]) => Stream.Strea
|
|
|
1690
1690
|
} | {
|
|
1691
1691
|
readonly id: string;
|
|
1692
1692
|
readonly type: "tool-error";
|
|
1693
|
-
readonly name: string;
|
|
1694
1693
|
readonly message: string;
|
|
1694
|
+
readonly name: string;
|
|
1695
1695
|
readonly error?: unknown;
|
|
1696
1696
|
readonly providerMetadata?: {
|
|
1697
1697
|
readonly [x: string]: {
|
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-
|
|
3
|
+
"version": "0.0.0-dev-20285",
|
|
4
4
|
"name": "@opencode/ai",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@clack/prompts": "1.0.0-alpha.1",
|
|
36
36
|
"@effect/platform-node": "4.0.0-rc.112",
|
|
37
|
-
"@opencode/http-recorder": "0.0.0-dev-
|
|
37
|
+
"@opencode/http-recorder": "0.0.0-dev-20285",
|
|
38
38
|
"@tsconfig/bun": "1.0.9",
|
|
39
39
|
"@types/bun": "1.4.0",
|
|
40
40
|
"@typescript/native-preview": "7.0.0-dev.20251207.1",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@aws-sdk/credential-providers": "3.1057.0",
|
|
45
45
|
"@smithy/eventstream-codec": "4.2.14",
|
|
46
46
|
"@smithy/util-utf8": "4.2.2",
|
|
47
|
-
"@opencode/schema": "0.0.0-dev-
|
|
47
|
+
"@opencode/schema": "0.0.0-dev-20285",
|
|
48
48
|
"aws4fetch": "1.0.20",
|
|
49
49
|
"effect": "4.0.0-rc.112",
|
|
50
50
|
"google-auth-library": "10.5.0"
|