@opencode-ai/ai 0.0.0-next-15811 → 0.0.0-next-15813
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 +6 -12
- package/dist/protocols/utils/tool-stream.d.ts +18 -36
- package/dist/protocols/utils/tool-stream.js +0 -2
- package/dist/route/client.d.ts +6 -12
- package/dist/schema/events.d.ts +109 -229
- package/dist/schema/events.js +1 -3
- package/package.json +3 -3
package/dist/llm.d.ts
CHANGED
|
@@ -104,18 +104,12 @@ export declare class GenerateObjectResponse<T> {
|
|
|
104
104
|
readonly [x: string]: unknown;
|
|
105
105
|
};
|
|
106
106
|
} | undefined;
|
|
107
|
-
} | {
|
|
108
|
-
readonly type: "tool-input-error"
|
|
109
|
-
readonly
|
|
110
|
-
readonly
|
|
111
|
-
readonly
|
|
112
|
-
|
|
113
|
-
readonly providerMetadata?: {
|
|
114
|
-
readonly [x: string]: {
|
|
115
|
-
readonly [x: string]: unknown;
|
|
116
|
-
};
|
|
117
|
-
} | undefined;
|
|
118
|
-
} | {
|
|
107
|
+
} | Schema.Struct.ReadonlySide<{
|
|
108
|
+
readonly type: Schema.tag<"tool-input-error">;
|
|
109
|
+
readonly id: Schema.String;
|
|
110
|
+
readonly name: Schema.String;
|
|
111
|
+
readonly raw: Schema.String;
|
|
112
|
+
}, "Type"> | {
|
|
119
113
|
readonly type: "tool-call";
|
|
120
114
|
readonly name: string;
|
|
121
115
|
readonly id: string;
|
|
@@ -147,18 +147,12 @@ export declare const finish: <K extends StreamKey>(route: string, tools: State<K
|
|
|
147
147
|
readonly [x: string]: unknown;
|
|
148
148
|
};
|
|
149
149
|
} | undefined;
|
|
150
|
-
} | {
|
|
151
|
-
readonly type: "tool-input-error"
|
|
152
|
-
readonly
|
|
153
|
-
readonly
|
|
154
|
-
readonly
|
|
155
|
-
|
|
156
|
-
readonly providerMetadata?: {
|
|
157
|
-
readonly [x: string]: {
|
|
158
|
-
readonly [x: string]: unknown;
|
|
159
|
-
};
|
|
160
|
-
} | undefined;
|
|
161
|
-
} | {
|
|
150
|
+
} | import("effect/Schema").Struct.ReadonlySide<{
|
|
151
|
+
readonly type: import("effect/Schema").tag<"tool-input-error">;
|
|
152
|
+
readonly id: import("effect/Schema").String;
|
|
153
|
+
readonly name: import("effect/Schema").String;
|
|
154
|
+
readonly raw: import("effect/Schema").String;
|
|
155
|
+
}, "Type"> | {
|
|
162
156
|
readonly type: "tool-call";
|
|
163
157
|
readonly name: string;
|
|
164
158
|
readonly id: string;
|
|
@@ -340,18 +334,12 @@ export declare const finishWithInput: <K extends StreamKey>(route: string, tools
|
|
|
340
334
|
readonly [x: string]: unknown;
|
|
341
335
|
};
|
|
342
336
|
} | undefined;
|
|
343
|
-
} | {
|
|
344
|
-
readonly type: "tool-input-error"
|
|
345
|
-
readonly
|
|
346
|
-
readonly
|
|
347
|
-
readonly
|
|
348
|
-
|
|
349
|
-
readonly providerMetadata?: {
|
|
350
|
-
readonly [x: string]: {
|
|
351
|
-
readonly [x: string]: unknown;
|
|
352
|
-
};
|
|
353
|
-
} | undefined;
|
|
354
|
-
} | {
|
|
337
|
+
} | import("effect/Schema").Struct.ReadonlySide<{
|
|
338
|
+
readonly type: import("effect/Schema").tag<"tool-input-error">;
|
|
339
|
+
readonly id: import("effect/Schema").String;
|
|
340
|
+
readonly name: import("effect/Schema").String;
|
|
341
|
+
readonly raw: import("effect/Schema").String;
|
|
342
|
+
}, "Type"> | {
|
|
355
343
|
readonly type: "tool-call";
|
|
356
344
|
readonly name: string;
|
|
357
345
|
readonly id: string;
|
|
@@ -530,18 +518,12 @@ export declare const finishAll: <K extends StreamKey>(route: string, tools: Stat
|
|
|
530
518
|
readonly [x: string]: unknown;
|
|
531
519
|
};
|
|
532
520
|
} | undefined;
|
|
533
|
-
} | {
|
|
534
|
-
readonly type: "tool-input-error"
|
|
535
|
-
readonly
|
|
536
|
-
readonly
|
|
537
|
-
readonly
|
|
538
|
-
|
|
539
|
-
readonly providerMetadata?: {
|
|
540
|
-
readonly [x: string]: {
|
|
541
|
-
readonly [x: string]: unknown;
|
|
542
|
-
};
|
|
543
|
-
} | undefined;
|
|
544
|
-
} | {
|
|
521
|
+
} | import("effect/Schema").Struct.ReadonlySide<{
|
|
522
|
+
readonly type: import("effect/Schema").tag<"tool-input-error">;
|
|
523
|
+
readonly id: import("effect/Schema").String;
|
|
524
|
+
readonly name: import("effect/Schema").String;
|
|
525
|
+
readonly raw: import("effect/Schema").String;
|
|
526
|
+
}, "Type"> | {
|
|
545
527
|
readonly type: "tool-call";
|
|
546
528
|
readonly name: string;
|
|
547
529
|
readonly id: string;
|
|
@@ -36,8 +36,6 @@ const toolCall = (route, tool, inputOverride) => {
|
|
|
36
36
|
id: tool.id,
|
|
37
37
|
name: tool.name,
|
|
38
38
|
raw,
|
|
39
|
-
message: error.reason.message,
|
|
40
|
-
providerMetadata: tool.providerMetadata,
|
|
41
39
|
}))));
|
|
42
40
|
};
|
|
43
41
|
const finishEvents = (tool, event) => event.type === "tool-input-error"
|
package/dist/route/client.d.ts
CHANGED
|
@@ -223,18 +223,12 @@ export declare const streamRequest: (request: LLMRequest) => Stream.Stream<Schem
|
|
|
223
223
|
readonly [x: string]: unknown;
|
|
224
224
|
};
|
|
225
225
|
} | undefined;
|
|
226
|
-
} | {
|
|
227
|
-
readonly type: "tool-input-error"
|
|
228
|
-
readonly
|
|
229
|
-
readonly
|
|
230
|
-
readonly
|
|
231
|
-
|
|
232
|
-
readonly providerMetadata?: {
|
|
233
|
-
readonly [x: string]: {
|
|
234
|
-
readonly [x: string]: unknown;
|
|
235
|
-
};
|
|
236
|
-
} | undefined;
|
|
237
|
-
} | {
|
|
226
|
+
} | Schema.Struct.ReadonlySide<{
|
|
227
|
+
readonly type: Schema.tag<"tool-input-error">;
|
|
228
|
+
readonly id: Schema.String;
|
|
229
|
+
readonly name: Schema.String;
|
|
230
|
+
readonly raw: Schema.String;
|
|
231
|
+
}, "Type"> | {
|
|
238
232
|
readonly type: "tool-call";
|
|
239
233
|
readonly name: string;
|
|
240
234
|
readonly id: string;
|
package/dist/schema/events.d.ts
CHANGED
|
@@ -131,14 +131,12 @@ export declare const ToolInputEnd: Schema.Struct<{
|
|
|
131
131
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
132
132
|
}>;
|
|
133
133
|
export type ToolInputEnd = Schema.Schema.Type<typeof ToolInputEnd>;
|
|
134
|
-
/** A local tool call
|
|
134
|
+
/** A local tool call whose final input could not be decoded. */
|
|
135
135
|
export declare const ToolInputError: Schema.Struct<{
|
|
136
136
|
readonly type: Schema.tag<"tool-input-error">;
|
|
137
137
|
readonly id: Schema.String;
|
|
138
138
|
readonly name: Schema.String;
|
|
139
139
|
readonly raw: Schema.String;
|
|
140
|
-
readonly message: Schema.String;
|
|
141
|
-
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
142
140
|
}>;
|
|
143
141
|
export type ToolInputError = Schema.Schema.Type<typeof ToolInputError>;
|
|
144
142
|
export declare const ToolCall: Schema.Struct<{
|
|
@@ -279,8 +277,6 @@ declare const llmEventTagged: Schema.toTaggedUnion<"type", readonly [Schema.Stru
|
|
|
279
277
|
readonly id: Schema.String;
|
|
280
278
|
readonly name: Schema.String;
|
|
281
279
|
readonly raw: Schema.String;
|
|
282
|
-
readonly message: Schema.String;
|
|
283
|
-
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
284
280
|
}>, Schema.Struct<{
|
|
285
281
|
readonly type: Schema.tag<"tool-call">;
|
|
286
282
|
readonly id: Schema.String;
|
|
@@ -423,8 +419,6 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
423
419
|
readonly id: Schema.String;
|
|
424
420
|
readonly name: Schema.String;
|
|
425
421
|
readonly raw: Schema.String;
|
|
426
|
-
readonly message: Schema.String;
|
|
427
|
-
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
428
422
|
}>, Schema.Struct<{
|
|
429
423
|
readonly type: Schema.tag<"tool-call">;
|
|
430
424
|
readonly id: Schema.String;
|
|
@@ -563,8 +557,6 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
563
557
|
readonly id: Schema.String;
|
|
564
558
|
readonly name: Schema.String;
|
|
565
559
|
readonly raw: Schema.String;
|
|
566
|
-
readonly message: Schema.String;
|
|
567
|
-
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
568
560
|
}>;
|
|
569
561
|
"tool-call": Schema.Struct<{
|
|
570
562
|
readonly type: Schema.tag<"tool-call">;
|
|
@@ -726,18 +718,12 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
726
718
|
readonly [x: string]: unknown;
|
|
727
719
|
};
|
|
728
720
|
} | undefined;
|
|
729
|
-
} | {
|
|
730
|
-
readonly type: "tool-input-error"
|
|
731
|
-
readonly
|
|
732
|
-
readonly
|
|
733
|
-
readonly
|
|
734
|
-
|
|
735
|
-
readonly providerMetadata?: {
|
|
736
|
-
readonly [x: string]: {
|
|
737
|
-
readonly [x: string]: unknown;
|
|
738
|
-
};
|
|
739
|
-
} | undefined;
|
|
740
|
-
} | {
|
|
721
|
+
} | Schema.Struct.ReadonlySide<{
|
|
722
|
+
readonly type: Schema.tag<"tool-input-error">;
|
|
723
|
+
readonly id: Schema.String;
|
|
724
|
+
readonly name: Schema.String;
|
|
725
|
+
readonly raw: Schema.String;
|
|
726
|
+
}, "Type"> | {
|
|
741
727
|
readonly type: "tool-call";
|
|
742
728
|
readonly name: string;
|
|
743
729
|
readonly id: string;
|
|
@@ -927,18 +913,12 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
927
913
|
} | undefined;
|
|
928
914
|
}, {
|
|
929
915
|
readonly type: Keys;
|
|
930
|
-
}> | Extract<{
|
|
931
|
-
readonly type: "tool-input-error"
|
|
932
|
-
readonly
|
|
933
|
-
readonly
|
|
934
|
-
readonly
|
|
935
|
-
|
|
936
|
-
readonly providerMetadata?: {
|
|
937
|
-
readonly [x: string]: {
|
|
938
|
-
readonly [x: string]: unknown;
|
|
939
|
-
};
|
|
940
|
-
} | undefined;
|
|
941
|
-
}, {
|
|
916
|
+
}> | Extract<Schema.Struct.ReadonlySide<{
|
|
917
|
+
readonly type: Schema.tag<"tool-input-error">;
|
|
918
|
+
readonly id: Schema.String;
|
|
919
|
+
readonly name: Schema.String;
|
|
920
|
+
readonly raw: Schema.String;
|
|
921
|
+
}, "Type">, {
|
|
942
922
|
readonly type: Keys;
|
|
943
923
|
}> | Extract<{
|
|
944
924
|
readonly type: "tool-call";
|
|
@@ -1134,18 +1114,12 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1134
1114
|
};
|
|
1135
1115
|
} | undefined;
|
|
1136
1116
|
};
|
|
1137
|
-
"tool-input-error": (u: unknown) => u is {
|
|
1138
|
-
readonly type: "tool-input-error"
|
|
1139
|
-
readonly
|
|
1140
|
-
readonly
|
|
1141
|
-
readonly
|
|
1142
|
-
|
|
1143
|
-
readonly providerMetadata?: {
|
|
1144
|
-
readonly [x: string]: {
|
|
1145
|
-
readonly [x: string]: unknown;
|
|
1146
|
-
};
|
|
1147
|
-
} | undefined;
|
|
1148
|
-
};
|
|
1117
|
+
"tool-input-error": (u: unknown) => u is Schema.Struct.ReadonlySide<{
|
|
1118
|
+
readonly type: Schema.tag<"tool-input-error">;
|
|
1119
|
+
readonly id: Schema.String;
|
|
1120
|
+
readonly name: Schema.String;
|
|
1121
|
+
readonly raw: Schema.String;
|
|
1122
|
+
}, "Type">;
|
|
1149
1123
|
"tool-call": (u: unknown) => u is {
|
|
1150
1124
|
readonly type: "tool-call";
|
|
1151
1125
|
readonly name: string;
|
|
@@ -1335,18 +1309,12 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1335
1309
|
};
|
|
1336
1310
|
} | undefined;
|
|
1337
1311
|
}) => any;
|
|
1338
|
-
"tool-input-error": (value: {
|
|
1339
|
-
readonly type: "tool-input-error"
|
|
1340
|
-
readonly
|
|
1341
|
-
readonly
|
|
1342
|
-
readonly
|
|
1343
|
-
|
|
1344
|
-
readonly providerMetadata?: {
|
|
1345
|
-
readonly [x: string]: {
|
|
1346
|
-
readonly [x: string]: unknown;
|
|
1347
|
-
};
|
|
1348
|
-
} | undefined;
|
|
1349
|
-
}) => any;
|
|
1312
|
+
"tool-input-error": (value: Schema.Struct.ReadonlySide<{
|
|
1313
|
+
readonly type: Schema.tag<"tool-input-error">;
|
|
1314
|
+
readonly id: Schema.String;
|
|
1315
|
+
readonly name: Schema.String;
|
|
1316
|
+
readonly raw: Schema.String;
|
|
1317
|
+
}, "Type">) => any;
|
|
1350
1318
|
"tool-call": (value: {
|
|
1351
1319
|
readonly type: "tool-call";
|
|
1352
1320
|
readonly name: string;
|
|
@@ -1523,18 +1491,12 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1523
1491
|
readonly [x: string]: unknown;
|
|
1524
1492
|
};
|
|
1525
1493
|
} | undefined;
|
|
1526
|
-
} | {
|
|
1527
|
-
readonly type: "tool-input-error"
|
|
1528
|
-
readonly
|
|
1529
|
-
readonly
|
|
1530
|
-
readonly
|
|
1531
|
-
|
|
1532
|
-
readonly providerMetadata?: {
|
|
1533
|
-
readonly [x: string]: {
|
|
1534
|
-
readonly [x: string]: unknown;
|
|
1535
|
-
};
|
|
1536
|
-
} | undefined;
|
|
1537
|
-
} | {
|
|
1494
|
+
} | Schema.Struct.ReadonlySide<{
|
|
1495
|
+
readonly type: Schema.tag<"tool-input-error">;
|
|
1496
|
+
readonly id: Schema.String;
|
|
1497
|
+
readonly name: Schema.String;
|
|
1498
|
+
readonly raw: Schema.String;
|
|
1499
|
+
}, "Type"> | {
|
|
1538
1500
|
readonly type: "tool-call";
|
|
1539
1501
|
readonly name: string;
|
|
1540
1502
|
readonly id: string;
|
|
@@ -1716,18 +1678,12 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1716
1678
|
};
|
|
1717
1679
|
} | undefined;
|
|
1718
1680
|
}) => any;
|
|
1719
|
-
"tool-input-error": (value: {
|
|
1720
|
-
readonly type: "tool-input-error"
|
|
1721
|
-
readonly
|
|
1722
|
-
readonly
|
|
1723
|
-
readonly
|
|
1724
|
-
|
|
1725
|
-
readonly providerMetadata?: {
|
|
1726
|
-
readonly [x: string]: {
|
|
1727
|
-
readonly [x: string]: unknown;
|
|
1728
|
-
};
|
|
1729
|
-
} | undefined;
|
|
1730
|
-
}) => any;
|
|
1681
|
+
"tool-input-error": (value: Schema.Struct.ReadonlySide<{
|
|
1682
|
+
readonly type: Schema.tag<"tool-input-error">;
|
|
1683
|
+
readonly id: Schema.String;
|
|
1684
|
+
readonly name: Schema.String;
|
|
1685
|
+
readonly raw: Schema.String;
|
|
1686
|
+
}, "Type">) => any;
|
|
1731
1687
|
"tool-call": (value: {
|
|
1732
1688
|
readonly type: "tool-call";
|
|
1733
1689
|
readonly name: string;
|
|
@@ -1904,18 +1860,12 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1904
1860
|
readonly [x: string]: unknown;
|
|
1905
1861
|
};
|
|
1906
1862
|
} | undefined;
|
|
1907
|
-
} | {
|
|
1908
|
-
readonly type: "tool-input-error"
|
|
1909
|
-
readonly
|
|
1910
|
-
readonly
|
|
1911
|
-
readonly
|
|
1912
|
-
|
|
1913
|
-
readonly providerMetadata?: {
|
|
1914
|
-
readonly [x: string]: {
|
|
1915
|
-
readonly [x: string]: unknown;
|
|
1916
|
-
};
|
|
1917
|
-
} | undefined;
|
|
1918
|
-
} | {
|
|
1863
|
+
} | Schema.Struct.ReadonlySide<{
|
|
1864
|
+
readonly type: Schema.tag<"tool-input-error">;
|
|
1865
|
+
readonly id: Schema.String;
|
|
1866
|
+
readonly name: Schema.String;
|
|
1867
|
+
readonly raw: Schema.String;
|
|
1868
|
+
}, "Type"> | {
|
|
1919
1869
|
readonly type: "tool-call";
|
|
1920
1870
|
readonly name: string;
|
|
1921
1871
|
readonly id: string;
|
|
@@ -2101,18 +2051,12 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
2101
2051
|
};
|
|
2102
2052
|
} | undefined;
|
|
2103
2053
|
};
|
|
2104
|
-
toolInputError: (input: WithID<ToolInputError, ToolCallID>) => {
|
|
2105
|
-
readonly type: "tool-input-error"
|
|
2106
|
-
readonly
|
|
2107
|
-
readonly
|
|
2108
|
-
readonly
|
|
2109
|
-
|
|
2110
|
-
readonly providerMetadata?: {
|
|
2111
|
-
readonly [x: string]: {
|
|
2112
|
-
readonly [x: string]: unknown;
|
|
2113
|
-
};
|
|
2114
|
-
} | undefined;
|
|
2115
|
-
};
|
|
2054
|
+
toolInputError: (input: WithID<ToolInputError, ToolCallID>) => Schema.Struct.ReadonlySide<{
|
|
2055
|
+
readonly type: Schema.tag<"tool-input-error">;
|
|
2056
|
+
readonly id: Schema.String;
|
|
2057
|
+
readonly name: Schema.String;
|
|
2058
|
+
readonly raw: Schema.String;
|
|
2059
|
+
}, "Type">;
|
|
2116
2060
|
toolCall: (input: WithID<ToolCall, ToolCallID>) => {
|
|
2117
2061
|
readonly type: "tool-call";
|
|
2118
2062
|
readonly name: string;
|
|
@@ -2309,18 +2253,12 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
2309
2253
|
};
|
|
2310
2254
|
} | undefined;
|
|
2311
2255
|
};
|
|
2312
|
-
toolInputError: (u: unknown) => u is {
|
|
2313
|
-
readonly type: "tool-input-error"
|
|
2314
|
-
readonly
|
|
2315
|
-
readonly
|
|
2316
|
-
readonly
|
|
2317
|
-
|
|
2318
|
-
readonly providerMetadata?: {
|
|
2319
|
-
readonly [x: string]: {
|
|
2320
|
-
readonly [x: string]: unknown;
|
|
2321
|
-
};
|
|
2322
|
-
} | undefined;
|
|
2323
|
-
};
|
|
2256
|
+
toolInputError: (u: unknown) => u is Schema.Struct.ReadonlySide<{
|
|
2257
|
+
readonly type: Schema.tag<"tool-input-error">;
|
|
2258
|
+
readonly id: Schema.String;
|
|
2259
|
+
readonly name: Schema.String;
|
|
2260
|
+
readonly raw: Schema.String;
|
|
2261
|
+
}, "Type">;
|
|
2324
2262
|
toolCall: (u: unknown) => u is {
|
|
2325
2263
|
readonly type: "tool-call";
|
|
2326
2264
|
readonly name: string;
|
|
@@ -2517,8 +2455,6 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
|
|
|
2517
2455
|
readonly id: Schema.String;
|
|
2518
2456
|
readonly name: Schema.String;
|
|
2519
2457
|
readonly raw: Schema.String;
|
|
2520
|
-
readonly message: Schema.String;
|
|
2521
|
-
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
2522
2458
|
}>, Schema.Struct<{
|
|
2523
2459
|
readonly type: Schema.tag<"tool-call">;
|
|
2524
2460
|
readonly id: Schema.String;
|
|
@@ -2657,8 +2593,6 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
|
|
|
2657
2593
|
readonly id: Schema.String;
|
|
2658
2594
|
readonly name: Schema.String;
|
|
2659
2595
|
readonly raw: Schema.String;
|
|
2660
|
-
readonly message: Schema.String;
|
|
2661
|
-
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
2662
2596
|
}>;
|
|
2663
2597
|
"tool-call": Schema.Struct<{
|
|
2664
2598
|
readonly type: Schema.tag<"tool-call">;
|
|
@@ -2820,18 +2754,12 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
|
|
|
2820
2754
|
readonly [x: string]: unknown;
|
|
2821
2755
|
};
|
|
2822
2756
|
} | undefined;
|
|
2823
|
-
} | {
|
|
2824
|
-
readonly type: "tool-input-error"
|
|
2825
|
-
readonly
|
|
2826
|
-
readonly
|
|
2827
|
-
readonly
|
|
2828
|
-
|
|
2829
|
-
readonly providerMetadata?: {
|
|
2830
|
-
readonly [x: string]: {
|
|
2831
|
-
readonly [x: string]: unknown;
|
|
2832
|
-
};
|
|
2833
|
-
} | undefined;
|
|
2834
|
-
} | {
|
|
2757
|
+
} | Schema.Struct.ReadonlySide<{
|
|
2758
|
+
readonly type: Schema.tag<"tool-input-error">;
|
|
2759
|
+
readonly id: Schema.String;
|
|
2760
|
+
readonly name: Schema.String;
|
|
2761
|
+
readonly raw: Schema.String;
|
|
2762
|
+
}, "Type"> | {
|
|
2835
2763
|
readonly type: "tool-call";
|
|
2836
2764
|
readonly name: string;
|
|
2837
2765
|
readonly id: string;
|
|
@@ -3021,18 +2949,12 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
|
|
|
3021
2949
|
} | undefined;
|
|
3022
2950
|
}, {
|
|
3023
2951
|
readonly type: Keys;
|
|
3024
|
-
}> | Extract<{
|
|
3025
|
-
readonly type: "tool-input-error"
|
|
3026
|
-
readonly
|
|
3027
|
-
readonly
|
|
3028
|
-
readonly
|
|
3029
|
-
|
|
3030
|
-
readonly providerMetadata?: {
|
|
3031
|
-
readonly [x: string]: {
|
|
3032
|
-
readonly [x: string]: unknown;
|
|
3033
|
-
};
|
|
3034
|
-
} | undefined;
|
|
3035
|
-
}, {
|
|
2952
|
+
}> | Extract<Schema.Struct.ReadonlySide<{
|
|
2953
|
+
readonly type: Schema.tag<"tool-input-error">;
|
|
2954
|
+
readonly id: Schema.String;
|
|
2955
|
+
readonly name: Schema.String;
|
|
2956
|
+
readonly raw: Schema.String;
|
|
2957
|
+
}, "Type">, {
|
|
3036
2958
|
readonly type: Keys;
|
|
3037
2959
|
}> | Extract<{
|
|
3038
2960
|
readonly type: "tool-call";
|
|
@@ -3228,18 +3150,12 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
|
|
|
3228
3150
|
};
|
|
3229
3151
|
} | undefined;
|
|
3230
3152
|
};
|
|
3231
|
-
"tool-input-error": (u: unknown) => u is {
|
|
3232
|
-
readonly type: "tool-input-error"
|
|
3233
|
-
readonly
|
|
3234
|
-
readonly
|
|
3235
|
-
readonly
|
|
3236
|
-
|
|
3237
|
-
readonly providerMetadata?: {
|
|
3238
|
-
readonly [x: string]: {
|
|
3239
|
-
readonly [x: string]: unknown;
|
|
3240
|
-
};
|
|
3241
|
-
} | undefined;
|
|
3242
|
-
};
|
|
3153
|
+
"tool-input-error": (u: unknown) => u is Schema.Struct.ReadonlySide<{
|
|
3154
|
+
readonly type: Schema.tag<"tool-input-error">;
|
|
3155
|
+
readonly id: Schema.String;
|
|
3156
|
+
readonly name: Schema.String;
|
|
3157
|
+
readonly raw: Schema.String;
|
|
3158
|
+
}, "Type">;
|
|
3243
3159
|
"tool-call": (u: unknown) => u is {
|
|
3244
3160
|
readonly type: "tool-call";
|
|
3245
3161
|
readonly name: string;
|
|
@@ -3429,18 +3345,12 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
|
|
|
3429
3345
|
};
|
|
3430
3346
|
} | undefined;
|
|
3431
3347
|
}) => any;
|
|
3432
|
-
"tool-input-error": (value: {
|
|
3433
|
-
readonly type: "tool-input-error"
|
|
3434
|
-
readonly
|
|
3435
|
-
readonly
|
|
3436
|
-
readonly
|
|
3437
|
-
|
|
3438
|
-
readonly providerMetadata?: {
|
|
3439
|
-
readonly [x: string]: {
|
|
3440
|
-
readonly [x: string]: unknown;
|
|
3441
|
-
};
|
|
3442
|
-
} | undefined;
|
|
3443
|
-
}) => any;
|
|
3348
|
+
"tool-input-error": (value: Schema.Struct.ReadonlySide<{
|
|
3349
|
+
readonly type: Schema.tag<"tool-input-error">;
|
|
3350
|
+
readonly id: Schema.String;
|
|
3351
|
+
readonly name: Schema.String;
|
|
3352
|
+
readonly raw: Schema.String;
|
|
3353
|
+
}, "Type">) => any;
|
|
3444
3354
|
"tool-call": (value: {
|
|
3445
3355
|
readonly type: "tool-call";
|
|
3446
3356
|
readonly name: string;
|
|
@@ -3617,18 +3527,12 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
|
|
|
3617
3527
|
readonly [x: string]: unknown;
|
|
3618
3528
|
};
|
|
3619
3529
|
} | undefined;
|
|
3620
|
-
} | {
|
|
3621
|
-
readonly type: "tool-input-error"
|
|
3622
|
-
readonly
|
|
3623
|
-
readonly
|
|
3624
|
-
readonly
|
|
3625
|
-
|
|
3626
|
-
readonly providerMetadata?: {
|
|
3627
|
-
readonly [x: string]: {
|
|
3628
|
-
readonly [x: string]: unknown;
|
|
3629
|
-
};
|
|
3630
|
-
} | undefined;
|
|
3631
|
-
} | {
|
|
3530
|
+
} | Schema.Struct.ReadonlySide<{
|
|
3531
|
+
readonly type: Schema.tag<"tool-input-error">;
|
|
3532
|
+
readonly id: Schema.String;
|
|
3533
|
+
readonly name: Schema.String;
|
|
3534
|
+
readonly raw: Schema.String;
|
|
3535
|
+
}, "Type"> | {
|
|
3632
3536
|
readonly type: "tool-call";
|
|
3633
3537
|
readonly name: string;
|
|
3634
3538
|
readonly id: string;
|
|
@@ -3810,18 +3714,12 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
|
|
|
3810
3714
|
};
|
|
3811
3715
|
} | undefined;
|
|
3812
3716
|
}) => any;
|
|
3813
|
-
"tool-input-error": (value: {
|
|
3814
|
-
readonly type: "tool-input-error"
|
|
3815
|
-
readonly
|
|
3816
|
-
readonly
|
|
3817
|
-
readonly
|
|
3818
|
-
|
|
3819
|
-
readonly providerMetadata?: {
|
|
3820
|
-
readonly [x: string]: {
|
|
3821
|
-
readonly [x: string]: unknown;
|
|
3822
|
-
};
|
|
3823
|
-
} | undefined;
|
|
3824
|
-
}) => any;
|
|
3717
|
+
"tool-input-error": (value: Schema.Struct.ReadonlySide<{
|
|
3718
|
+
readonly type: Schema.tag<"tool-input-error">;
|
|
3719
|
+
readonly id: Schema.String;
|
|
3720
|
+
readonly name: Schema.String;
|
|
3721
|
+
readonly raw: Schema.String;
|
|
3722
|
+
}, "Type">) => any;
|
|
3825
3723
|
"tool-call": (value: {
|
|
3826
3724
|
readonly type: "tool-call";
|
|
3827
3725
|
readonly name: string;
|
|
@@ -3998,18 +3896,12 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
|
|
|
3998
3896
|
readonly [x: string]: unknown;
|
|
3999
3897
|
};
|
|
4000
3898
|
} | undefined;
|
|
4001
|
-
} | {
|
|
4002
|
-
readonly type: "tool-input-error"
|
|
4003
|
-
readonly
|
|
4004
|
-
readonly
|
|
4005
|
-
readonly
|
|
4006
|
-
|
|
4007
|
-
readonly providerMetadata?: {
|
|
4008
|
-
readonly [x: string]: {
|
|
4009
|
-
readonly [x: string]: unknown;
|
|
4010
|
-
};
|
|
4011
|
-
} | undefined;
|
|
4012
|
-
} | {
|
|
3899
|
+
} | Schema.Struct.ReadonlySide<{
|
|
3900
|
+
readonly type: Schema.tag<"tool-input-error">;
|
|
3901
|
+
readonly id: Schema.String;
|
|
3902
|
+
readonly name: Schema.String;
|
|
3903
|
+
readonly raw: Schema.String;
|
|
3904
|
+
}, "Type"> | {
|
|
4013
3905
|
readonly type: "tool-call";
|
|
4014
3906
|
readonly name: string;
|
|
4015
3907
|
readonly id: string;
|
|
@@ -4195,18 +4087,12 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
|
|
|
4195
4087
|
};
|
|
4196
4088
|
} | undefined;
|
|
4197
4089
|
};
|
|
4198
|
-
toolInputError: (input: WithID<ToolInputError, ToolCallID>) => {
|
|
4199
|
-
readonly type: "tool-input-error"
|
|
4200
|
-
readonly
|
|
4201
|
-
readonly
|
|
4202
|
-
readonly
|
|
4203
|
-
|
|
4204
|
-
readonly providerMetadata?: {
|
|
4205
|
-
readonly [x: string]: {
|
|
4206
|
-
readonly [x: string]: unknown;
|
|
4207
|
-
};
|
|
4208
|
-
} | undefined;
|
|
4209
|
-
};
|
|
4090
|
+
toolInputError: (input: WithID<ToolInputError, ToolCallID>) => Schema.Struct.ReadonlySide<{
|
|
4091
|
+
readonly type: Schema.tag<"tool-input-error">;
|
|
4092
|
+
readonly id: Schema.String;
|
|
4093
|
+
readonly name: Schema.String;
|
|
4094
|
+
readonly raw: Schema.String;
|
|
4095
|
+
}, "Type">;
|
|
4210
4096
|
toolCall: (input: WithID<ToolCall, ToolCallID>) => {
|
|
4211
4097
|
readonly type: "tool-call";
|
|
4212
4098
|
readonly name: string;
|
|
@@ -4403,18 +4289,12 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
|
|
|
4403
4289
|
};
|
|
4404
4290
|
} | undefined;
|
|
4405
4291
|
};
|
|
4406
|
-
toolInputError: (u: unknown) => u is {
|
|
4407
|
-
readonly type: "tool-input-error"
|
|
4408
|
-
readonly
|
|
4409
|
-
readonly
|
|
4410
|
-
readonly
|
|
4411
|
-
|
|
4412
|
-
readonly providerMetadata?: {
|
|
4413
|
-
readonly [x: string]: {
|
|
4414
|
-
readonly [x: string]: unknown;
|
|
4415
|
-
};
|
|
4416
|
-
} | undefined;
|
|
4417
|
-
};
|
|
4292
|
+
toolInputError: (u: unknown) => u is Schema.Struct.ReadonlySide<{
|
|
4293
|
+
readonly type: Schema.tag<"tool-input-error">;
|
|
4294
|
+
readonly id: Schema.String;
|
|
4295
|
+
readonly name: Schema.String;
|
|
4296
|
+
readonly raw: Schema.String;
|
|
4297
|
+
}, "Type">;
|
|
4418
4298
|
toolCall: (u: unknown) => u is {
|
|
4419
4299
|
readonly type: "tool-call";
|
|
4420
4300
|
readonly name: string;
|
package/dist/schema/events.js
CHANGED
|
@@ -125,14 +125,12 @@ export const ToolInputEnd = Schema.Struct({
|
|
|
125
125
|
name: Schema.String,
|
|
126
126
|
providerMetadata: Schema.optional(ProviderMetadata),
|
|
127
127
|
}).annotate({ identifier: "LLM.Event.ToolInputEnd" });
|
|
128
|
-
/** A local tool call
|
|
128
|
+
/** A local tool call whose final input could not be decoded. */
|
|
129
129
|
export const ToolInputError = Schema.Struct({
|
|
130
130
|
type: Schema.tag("tool-input-error"),
|
|
131
131
|
id: ToolCallID,
|
|
132
132
|
name: Schema.String,
|
|
133
133
|
raw: Schema.String,
|
|
134
|
-
message: Schema.String,
|
|
135
|
-
providerMetadata: Schema.optional(ProviderMetadata),
|
|
136
134
|
}).annotate({ identifier: "LLM.Event.ToolInputError" });
|
|
137
135
|
export const ToolCall = Schema.Struct({
|
|
138
136
|
type: Schema.tag("tool-call"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
|
-
"version": "0.0.0-next-
|
|
3
|
+
"version": "0.0.0-next-15813",
|
|
4
4
|
"name": "@opencode-ai/ai",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@clack/prompts": "1.0.0-alpha.1",
|
|
28
28
|
"@effect/platform-node": "4.0.0-beta.98",
|
|
29
|
-
"@opencode-ai/http-recorder": "0.0.0-next-
|
|
29
|
+
"@opencode-ai/http-recorder": "0.0.0-next-15813",
|
|
30
30
|
"@tsconfig/bun": "1.0.9",
|
|
31
31
|
"@types/bun": "1.3.13",
|
|
32
32
|
"@typescript/native-preview": "7.0.0-dev.20251207.1",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@smithy/eventstream-codec": "4.2.14",
|
|
37
37
|
"@smithy/util-utf8": "4.2.2",
|
|
38
|
-
"@opencode-ai/schema": "0.0.0-next-
|
|
38
|
+
"@opencode-ai/schema": "0.0.0-next-15813",
|
|
39
39
|
"aws4fetch": "1.0.20",
|
|
40
40
|
"effect": "4.0.0-beta.98",
|
|
41
41
|
"google-auth-library": "10.5.0"
|