@opencode-ai/ai 0.0.0-next-15809 → 0.0.0-next-15811

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.
@@ -113,6 +113,7 @@ export declare const ToolInputStart: Schema.Struct<{
113
113
  readonly type: Schema.tag<"tool-input-start">;
114
114
  readonly id: Schema.String;
115
115
  readonly name: Schema.String;
116
+ readonly providerExecuted: Schema.optional<Schema.Boolean>;
116
117
  readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
117
118
  }>;
118
119
  export type ToolInputStart = Schema.Schema.Type<typeof ToolInputStart>;
@@ -130,6 +131,16 @@ export declare const ToolInputEnd: Schema.Struct<{
130
131
  readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
131
132
  }>;
132
133
  export type ToolInputEnd = Schema.Schema.Type<typeof ToolInputEnd>;
134
+ /** A local tool call that could not be decoded. `raw` is diagnostic-only. */
135
+ export declare const ToolInputError: Schema.Struct<{
136
+ readonly type: Schema.tag<"tool-input-error">;
137
+ readonly id: Schema.String;
138
+ readonly name: Schema.String;
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
+ }>;
143
+ export type ToolInputError = Schema.Schema.Type<typeof ToolInputError>;
133
144
  export declare const ToolCall: Schema.Struct<{
134
145
  readonly type: Schema.tag<"tool-call">;
135
146
  readonly id: Schema.String;
@@ -251,6 +262,7 @@ declare const llmEventTagged: Schema.toTaggedUnion<"type", readonly [Schema.Stru
251
262
  readonly type: Schema.tag<"tool-input-start">;
252
263
  readonly id: Schema.String;
253
264
  readonly name: Schema.String;
265
+ readonly providerExecuted: Schema.optional<Schema.Boolean>;
254
266
  readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
255
267
  }>, Schema.Struct<{
256
268
  readonly type: Schema.tag<"tool-input-delta">;
@@ -262,6 +274,13 @@ declare const llmEventTagged: Schema.toTaggedUnion<"type", readonly [Schema.Stru
262
274
  readonly id: Schema.String;
263
275
  readonly name: Schema.String;
264
276
  readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
277
+ }>, Schema.Struct<{
278
+ readonly type: Schema.tag<"tool-input-error">;
279
+ readonly id: Schema.String;
280
+ readonly name: Schema.String;
281
+ readonly raw: Schema.String;
282
+ readonly message: Schema.String;
283
+ readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
265
284
  }>, Schema.Struct<{
266
285
  readonly type: Schema.tag<"tool-call">;
267
286
  readonly id: Schema.String;
@@ -387,6 +406,7 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
387
406
  readonly type: Schema.tag<"tool-input-start">;
388
407
  readonly id: Schema.String;
389
408
  readonly name: Schema.String;
409
+ readonly providerExecuted: Schema.optional<Schema.Boolean>;
390
410
  readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
391
411
  }>, Schema.Struct<{
392
412
  readonly type: Schema.tag<"tool-input-delta">;
@@ -398,6 +418,13 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
398
418
  readonly id: Schema.String;
399
419
  readonly name: Schema.String;
400
420
  readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
421
+ }>, Schema.Struct<{
422
+ readonly type: Schema.tag<"tool-input-error">;
423
+ readonly id: Schema.String;
424
+ readonly name: Schema.String;
425
+ readonly raw: Schema.String;
426
+ readonly message: Schema.String;
427
+ readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
401
428
  }>, Schema.Struct<{
402
429
  readonly type: Schema.tag<"tool-call">;
403
430
  readonly id: Schema.String;
@@ -516,6 +543,7 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
516
543
  readonly type: Schema.tag<"tool-input-start">;
517
544
  readonly id: Schema.String;
518
545
  readonly name: Schema.String;
546
+ readonly providerExecuted: Schema.optional<Schema.Boolean>;
519
547
  readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
520
548
  }>;
521
549
  "tool-input-delta": Schema.Struct<{
@@ -530,6 +558,14 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
530
558
  readonly name: Schema.String;
531
559
  readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
532
560
  }>;
561
+ "tool-input-error": Schema.Struct<{
562
+ readonly type: Schema.tag<"tool-input-error">;
563
+ readonly id: Schema.String;
564
+ readonly name: Schema.String;
565
+ 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
+ }>;
533
569
  "tool-call": Schema.Struct<{
534
570
  readonly type: Schema.tag<"tool-call">;
535
571
  readonly id: Schema.String;
@@ -675,6 +711,7 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
675
711
  readonly [x: string]: unknown;
676
712
  };
677
713
  } | undefined;
714
+ readonly providerExecuted?: boolean | undefined;
678
715
  } | Schema.Struct.ReadonlySide<{
679
716
  readonly type: Schema.tag<"tool-input-delta">;
680
717
  readonly id: Schema.String;
@@ -689,6 +726,17 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
689
726
  readonly [x: string]: unknown;
690
727
  };
691
728
  } | undefined;
729
+ } | {
730
+ readonly type: "tool-input-error";
731
+ readonly name: string;
732
+ readonly id: string;
733
+ readonly message: string;
734
+ readonly raw: string;
735
+ readonly providerMetadata?: {
736
+ readonly [x: string]: {
737
+ readonly [x: string]: unknown;
738
+ };
739
+ } | undefined;
692
740
  } | {
693
741
  readonly type: "tool-call";
694
742
  readonly name: string;
@@ -858,6 +906,7 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
858
906
  readonly [x: string]: unknown;
859
907
  };
860
908
  } | undefined;
909
+ readonly providerExecuted?: boolean | undefined;
861
910
  }, {
862
911
  readonly type: Keys;
863
912
  }> | Extract<Schema.Struct.ReadonlySide<{
@@ -878,6 +927,19 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
878
927
  } | undefined;
879
928
  }, {
880
929
  readonly type: Keys;
930
+ }> | Extract<{
931
+ readonly type: "tool-input-error";
932
+ readonly name: string;
933
+ readonly id: string;
934
+ readonly message: string;
935
+ readonly raw: string;
936
+ readonly providerMetadata?: {
937
+ readonly [x: string]: {
938
+ readonly [x: string]: unknown;
939
+ };
940
+ } | undefined;
941
+ }, {
942
+ readonly type: Keys;
881
943
  }> | Extract<{
882
944
  readonly type: "tool-call";
883
945
  readonly name: string;
@@ -1054,6 +1116,7 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1054
1116
  readonly [x: string]: unknown;
1055
1117
  };
1056
1118
  } | undefined;
1119
+ readonly providerExecuted?: boolean | undefined;
1057
1120
  };
1058
1121
  "tool-input-delta": (u: unknown) => u is Schema.Struct.ReadonlySide<{
1059
1122
  readonly type: Schema.tag<"tool-input-delta">;
@@ -1071,6 +1134,18 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1071
1134
  };
1072
1135
  } | undefined;
1073
1136
  };
1137
+ "tool-input-error": (u: unknown) => u is {
1138
+ readonly type: "tool-input-error";
1139
+ readonly name: string;
1140
+ readonly id: string;
1141
+ readonly message: string;
1142
+ readonly raw: string;
1143
+ readonly providerMetadata?: {
1144
+ readonly [x: string]: {
1145
+ readonly [x: string]: unknown;
1146
+ };
1147
+ } | undefined;
1148
+ };
1074
1149
  "tool-call": (u: unknown) => u is {
1075
1150
  readonly type: "tool-call";
1076
1151
  readonly name: string;
@@ -1242,6 +1317,7 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1242
1317
  readonly [x: string]: unknown;
1243
1318
  };
1244
1319
  } | undefined;
1320
+ readonly providerExecuted?: boolean | undefined;
1245
1321
  }) => any;
1246
1322
  "tool-input-delta": (value: Schema.Struct.ReadonlySide<{
1247
1323
  readonly type: Schema.tag<"tool-input-delta">;
@@ -1259,6 +1335,18 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1259
1335
  };
1260
1336
  } | undefined;
1261
1337
  }) => any;
1338
+ "tool-input-error": (value: {
1339
+ readonly type: "tool-input-error";
1340
+ readonly name: string;
1341
+ readonly id: string;
1342
+ readonly message: string;
1343
+ readonly raw: string;
1344
+ readonly providerMetadata?: {
1345
+ readonly [x: string]: {
1346
+ readonly [x: string]: unknown;
1347
+ };
1348
+ } | undefined;
1349
+ }) => any;
1262
1350
  "tool-call": (value: {
1263
1351
  readonly type: "tool-call";
1264
1352
  readonly name: string;
@@ -1420,6 +1508,7 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1420
1508
  readonly [x: string]: unknown;
1421
1509
  };
1422
1510
  } | undefined;
1511
+ readonly providerExecuted?: boolean | undefined;
1423
1512
  } | Schema.Struct.ReadonlySide<{
1424
1513
  readonly type: Schema.tag<"tool-input-delta">;
1425
1514
  readonly id: Schema.String;
@@ -1434,6 +1523,17 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1434
1523
  readonly [x: string]: unknown;
1435
1524
  };
1436
1525
  } | undefined;
1526
+ } | {
1527
+ readonly type: "tool-input-error";
1528
+ readonly name: string;
1529
+ readonly id: string;
1530
+ readonly message: string;
1531
+ readonly raw: string;
1532
+ readonly providerMetadata?: {
1533
+ readonly [x: string]: {
1534
+ readonly [x: string]: unknown;
1535
+ };
1536
+ } | undefined;
1437
1537
  } | {
1438
1538
  readonly type: "tool-call";
1439
1539
  readonly name: string;
@@ -1598,6 +1698,7 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1598
1698
  readonly [x: string]: unknown;
1599
1699
  };
1600
1700
  } | undefined;
1701
+ readonly providerExecuted?: boolean | undefined;
1601
1702
  }) => any;
1602
1703
  "tool-input-delta": (value: Schema.Struct.ReadonlySide<{
1603
1704
  readonly type: Schema.tag<"tool-input-delta">;
@@ -1615,6 +1716,18 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1615
1716
  };
1616
1717
  } | undefined;
1617
1718
  }) => any;
1719
+ "tool-input-error": (value: {
1720
+ readonly type: "tool-input-error";
1721
+ readonly name: string;
1722
+ readonly id: string;
1723
+ readonly message: string;
1724
+ readonly raw: string;
1725
+ readonly providerMetadata?: {
1726
+ readonly [x: string]: {
1727
+ readonly [x: string]: unknown;
1728
+ };
1729
+ } | undefined;
1730
+ }) => any;
1618
1731
  "tool-call": (value: {
1619
1732
  readonly type: "tool-call";
1620
1733
  readonly name: string;
@@ -1776,6 +1889,7 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1776
1889
  readonly [x: string]: unknown;
1777
1890
  };
1778
1891
  } | undefined;
1892
+ readonly providerExecuted?: boolean | undefined;
1779
1893
  } | Schema.Struct.ReadonlySide<{
1780
1894
  readonly type: Schema.tag<"tool-input-delta">;
1781
1895
  readonly id: Schema.String;
@@ -1790,6 +1904,17 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1790
1904
  readonly [x: string]: unknown;
1791
1905
  };
1792
1906
  } | undefined;
1907
+ } | {
1908
+ readonly type: "tool-input-error";
1909
+ readonly name: string;
1910
+ readonly id: string;
1911
+ readonly message: string;
1912
+ readonly raw: string;
1913
+ readonly providerMetadata?: {
1914
+ readonly [x: string]: {
1915
+ readonly [x: string]: unknown;
1916
+ };
1917
+ } | undefined;
1793
1918
  } | {
1794
1919
  readonly type: "tool-call";
1795
1920
  readonly name: string;
@@ -1958,6 +2083,7 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1958
2083
  readonly [x: string]: unknown;
1959
2084
  };
1960
2085
  } | undefined;
2086
+ readonly providerExecuted?: boolean | undefined;
1961
2087
  };
1962
2088
  toolInputDelta: (input: WithID<ToolInputDelta, ToolCallID>) => Schema.Struct.ReadonlySide<{
1963
2089
  readonly type: Schema.tag<"tool-input-delta">;
@@ -1975,6 +2101,18 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
1975
2101
  };
1976
2102
  } | undefined;
1977
2103
  };
2104
+ toolInputError: (input: WithID<ToolInputError, ToolCallID>) => {
2105
+ readonly type: "tool-input-error";
2106
+ readonly name: string;
2107
+ readonly id: string;
2108
+ readonly message: string;
2109
+ readonly raw: string;
2110
+ readonly providerMetadata?: {
2111
+ readonly [x: string]: {
2112
+ readonly [x: string]: unknown;
2113
+ };
2114
+ } | undefined;
2115
+ };
1978
2116
  toolCall: (input: WithID<ToolCall, ToolCallID>) => {
1979
2117
  readonly type: "tool-call";
1980
2118
  readonly name: string;
@@ -2153,6 +2291,7 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
2153
2291
  readonly [x: string]: unknown;
2154
2292
  };
2155
2293
  } | undefined;
2294
+ readonly providerExecuted?: boolean | undefined;
2156
2295
  };
2157
2296
  toolInputDelta: (u: unknown) => u is Schema.Struct.ReadonlySide<{
2158
2297
  readonly type: Schema.tag<"tool-input-delta">;
@@ -2170,6 +2309,18 @@ export declare const LLMEvent: Schema.Union<readonly [Schema.Struct<{
2170
2309
  };
2171
2310
  } | undefined;
2172
2311
  };
2312
+ toolInputError: (u: unknown) => u is {
2313
+ readonly type: "tool-input-error";
2314
+ readonly name: string;
2315
+ readonly id: string;
2316
+ readonly message: string;
2317
+ readonly raw: string;
2318
+ readonly providerMetadata?: {
2319
+ readonly [x: string]: {
2320
+ readonly [x: string]: unknown;
2321
+ };
2322
+ } | undefined;
2323
+ };
2173
2324
  toolCall: (u: unknown) => u is {
2174
2325
  readonly type: "tool-call";
2175
2326
  readonly name: string;
@@ -2349,6 +2500,7 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
2349
2500
  readonly type: Schema.tag<"tool-input-start">;
2350
2501
  readonly id: Schema.String;
2351
2502
  readonly name: Schema.String;
2503
+ readonly providerExecuted: Schema.optional<Schema.Boolean>;
2352
2504
  readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
2353
2505
  }>, Schema.Struct<{
2354
2506
  readonly type: Schema.tag<"tool-input-delta">;
@@ -2360,6 +2512,13 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
2360
2512
  readonly id: Schema.String;
2361
2513
  readonly name: Schema.String;
2362
2514
  readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
2515
+ }>, Schema.Struct<{
2516
+ readonly type: Schema.tag<"tool-input-error">;
2517
+ readonly id: Schema.String;
2518
+ readonly name: Schema.String;
2519
+ readonly raw: Schema.String;
2520
+ readonly message: Schema.String;
2521
+ readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
2363
2522
  }>, Schema.Struct<{
2364
2523
  readonly type: Schema.tag<"tool-call">;
2365
2524
  readonly id: Schema.String;
@@ -2478,6 +2637,7 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
2478
2637
  readonly type: Schema.tag<"tool-input-start">;
2479
2638
  readonly id: Schema.String;
2480
2639
  readonly name: Schema.String;
2640
+ readonly providerExecuted: Schema.optional<Schema.Boolean>;
2481
2641
  readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
2482
2642
  }>;
2483
2643
  "tool-input-delta": Schema.Struct<{
@@ -2492,6 +2652,14 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
2492
2652
  readonly name: Schema.String;
2493
2653
  readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
2494
2654
  }>;
2655
+ "tool-input-error": Schema.Struct<{
2656
+ readonly type: Schema.tag<"tool-input-error">;
2657
+ readonly id: Schema.String;
2658
+ readonly name: Schema.String;
2659
+ 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
+ }>;
2495
2663
  "tool-call": Schema.Struct<{
2496
2664
  readonly type: Schema.tag<"tool-call">;
2497
2665
  readonly id: Schema.String;
@@ -2637,6 +2805,7 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
2637
2805
  readonly [x: string]: unknown;
2638
2806
  };
2639
2807
  } | undefined;
2808
+ readonly providerExecuted?: boolean | undefined;
2640
2809
  } | Schema.Struct.ReadonlySide<{
2641
2810
  readonly type: Schema.tag<"tool-input-delta">;
2642
2811
  readonly id: Schema.String;
@@ -2651,6 +2820,17 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
2651
2820
  readonly [x: string]: unknown;
2652
2821
  };
2653
2822
  } | undefined;
2823
+ } | {
2824
+ readonly type: "tool-input-error";
2825
+ readonly name: string;
2826
+ readonly id: string;
2827
+ readonly message: string;
2828
+ readonly raw: string;
2829
+ readonly providerMetadata?: {
2830
+ readonly [x: string]: {
2831
+ readonly [x: string]: unknown;
2832
+ };
2833
+ } | undefined;
2654
2834
  } | {
2655
2835
  readonly type: "tool-call";
2656
2836
  readonly name: string;
@@ -2820,6 +3000,7 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
2820
3000
  readonly [x: string]: unknown;
2821
3001
  };
2822
3002
  } | undefined;
3003
+ readonly providerExecuted?: boolean | undefined;
2823
3004
  }, {
2824
3005
  readonly type: Keys;
2825
3006
  }> | Extract<Schema.Struct.ReadonlySide<{
@@ -2840,6 +3021,19 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
2840
3021
  } | undefined;
2841
3022
  }, {
2842
3023
  readonly type: Keys;
3024
+ }> | Extract<{
3025
+ readonly type: "tool-input-error";
3026
+ readonly name: string;
3027
+ readonly id: string;
3028
+ readonly message: string;
3029
+ readonly raw: string;
3030
+ readonly providerMetadata?: {
3031
+ readonly [x: string]: {
3032
+ readonly [x: string]: unknown;
3033
+ };
3034
+ } | undefined;
3035
+ }, {
3036
+ readonly type: Keys;
2843
3037
  }> | Extract<{
2844
3038
  readonly type: "tool-call";
2845
3039
  readonly name: string;
@@ -3016,6 +3210,7 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3016
3210
  readonly [x: string]: unknown;
3017
3211
  };
3018
3212
  } | undefined;
3213
+ readonly providerExecuted?: boolean | undefined;
3019
3214
  };
3020
3215
  "tool-input-delta": (u: unknown) => u is Schema.Struct.ReadonlySide<{
3021
3216
  readonly type: Schema.tag<"tool-input-delta">;
@@ -3033,6 +3228,18 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3033
3228
  };
3034
3229
  } | undefined;
3035
3230
  };
3231
+ "tool-input-error": (u: unknown) => u is {
3232
+ readonly type: "tool-input-error";
3233
+ readonly name: string;
3234
+ readonly id: string;
3235
+ readonly message: string;
3236
+ readonly raw: string;
3237
+ readonly providerMetadata?: {
3238
+ readonly [x: string]: {
3239
+ readonly [x: string]: unknown;
3240
+ };
3241
+ } | undefined;
3242
+ };
3036
3243
  "tool-call": (u: unknown) => u is {
3037
3244
  readonly type: "tool-call";
3038
3245
  readonly name: string;
@@ -3204,6 +3411,7 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3204
3411
  readonly [x: string]: unknown;
3205
3412
  };
3206
3413
  } | undefined;
3414
+ readonly providerExecuted?: boolean | undefined;
3207
3415
  }) => any;
3208
3416
  "tool-input-delta": (value: Schema.Struct.ReadonlySide<{
3209
3417
  readonly type: Schema.tag<"tool-input-delta">;
@@ -3221,6 +3429,18 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3221
3429
  };
3222
3430
  } | undefined;
3223
3431
  }) => any;
3432
+ "tool-input-error": (value: {
3433
+ readonly type: "tool-input-error";
3434
+ readonly name: string;
3435
+ readonly id: string;
3436
+ readonly message: string;
3437
+ readonly raw: string;
3438
+ readonly providerMetadata?: {
3439
+ readonly [x: string]: {
3440
+ readonly [x: string]: unknown;
3441
+ };
3442
+ } | undefined;
3443
+ }) => any;
3224
3444
  "tool-call": (value: {
3225
3445
  readonly type: "tool-call";
3226
3446
  readonly name: string;
@@ -3382,6 +3602,7 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3382
3602
  readonly [x: string]: unknown;
3383
3603
  };
3384
3604
  } | undefined;
3605
+ readonly providerExecuted?: boolean | undefined;
3385
3606
  } | Schema.Struct.ReadonlySide<{
3386
3607
  readonly type: Schema.tag<"tool-input-delta">;
3387
3608
  readonly id: Schema.String;
@@ -3396,6 +3617,17 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3396
3617
  readonly [x: string]: unknown;
3397
3618
  };
3398
3619
  } | undefined;
3620
+ } | {
3621
+ readonly type: "tool-input-error";
3622
+ readonly name: string;
3623
+ readonly id: string;
3624
+ readonly message: string;
3625
+ readonly raw: string;
3626
+ readonly providerMetadata?: {
3627
+ readonly [x: string]: {
3628
+ readonly [x: string]: unknown;
3629
+ };
3630
+ } | undefined;
3399
3631
  } | {
3400
3632
  readonly type: "tool-call";
3401
3633
  readonly name: string;
@@ -3560,6 +3792,7 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3560
3792
  readonly [x: string]: unknown;
3561
3793
  };
3562
3794
  } | undefined;
3795
+ readonly providerExecuted?: boolean | undefined;
3563
3796
  }) => any;
3564
3797
  "tool-input-delta": (value: Schema.Struct.ReadonlySide<{
3565
3798
  readonly type: Schema.tag<"tool-input-delta">;
@@ -3577,6 +3810,18 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3577
3810
  };
3578
3811
  } | undefined;
3579
3812
  }) => any;
3813
+ "tool-input-error": (value: {
3814
+ readonly type: "tool-input-error";
3815
+ readonly name: string;
3816
+ readonly id: string;
3817
+ readonly message: string;
3818
+ readonly raw: string;
3819
+ readonly providerMetadata?: {
3820
+ readonly [x: string]: {
3821
+ readonly [x: string]: unknown;
3822
+ };
3823
+ } | undefined;
3824
+ }) => any;
3580
3825
  "tool-call": (value: {
3581
3826
  readonly type: "tool-call";
3582
3827
  readonly name: string;
@@ -3738,6 +3983,7 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3738
3983
  readonly [x: string]: unknown;
3739
3984
  };
3740
3985
  } | undefined;
3986
+ readonly providerExecuted?: boolean | undefined;
3741
3987
  } | Schema.Struct.ReadonlySide<{
3742
3988
  readonly type: Schema.tag<"tool-input-delta">;
3743
3989
  readonly id: Schema.String;
@@ -3752,6 +3998,17 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3752
3998
  readonly [x: string]: unknown;
3753
3999
  };
3754
4000
  } | undefined;
4001
+ } | {
4002
+ readonly type: "tool-input-error";
4003
+ readonly name: string;
4004
+ readonly id: string;
4005
+ readonly message: string;
4006
+ readonly raw: string;
4007
+ readonly providerMetadata?: {
4008
+ readonly [x: string]: {
4009
+ readonly [x: string]: unknown;
4010
+ };
4011
+ } | undefined;
3755
4012
  } | {
3756
4013
  readonly type: "tool-call";
3757
4014
  readonly name: string;
@@ -3920,6 +4177,7 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3920
4177
  readonly [x: string]: unknown;
3921
4178
  };
3922
4179
  } | undefined;
4180
+ readonly providerExecuted?: boolean | undefined;
3923
4181
  };
3924
4182
  toolInputDelta: (input: WithID<ToolInputDelta, ToolCallID>) => Schema.Struct.ReadonlySide<{
3925
4183
  readonly type: Schema.tag<"tool-input-delta">;
@@ -3937,6 +4195,18 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
3937
4195
  };
3938
4196
  } | undefined;
3939
4197
  };
4198
+ toolInputError: (input: WithID<ToolInputError, ToolCallID>) => {
4199
+ readonly type: "tool-input-error";
4200
+ readonly name: string;
4201
+ readonly id: string;
4202
+ readonly message: string;
4203
+ readonly raw: string;
4204
+ readonly providerMetadata?: {
4205
+ readonly [x: string]: {
4206
+ readonly [x: string]: unknown;
4207
+ };
4208
+ } | undefined;
4209
+ };
3940
4210
  toolCall: (input: WithID<ToolCall, ToolCallID>) => {
3941
4211
  readonly type: "tool-call";
3942
4212
  readonly name: string;
@@ -4115,6 +4385,7 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
4115
4385
  readonly [x: string]: unknown;
4116
4386
  };
4117
4387
  } | undefined;
4388
+ readonly providerExecuted?: boolean | undefined;
4118
4389
  };
4119
4390
  toolInputDelta: (u: unknown) => u is Schema.Struct.ReadonlySide<{
4120
4391
  readonly type: Schema.tag<"tool-input-delta">;
@@ -4132,6 +4403,18 @@ declare const LLMResponse_base: Schema.Class<LLMResponse, Schema.Struct<{
4132
4403
  };
4133
4404
  } | undefined;
4134
4405
  };
4406
+ toolInputError: (u: unknown) => u is {
4407
+ readonly type: "tool-input-error";
4408
+ readonly name: string;
4409
+ readonly id: string;
4410
+ readonly message: string;
4411
+ readonly raw: string;
4412
+ readonly providerMetadata?: {
4413
+ readonly [x: string]: {
4414
+ readonly [x: string]: unknown;
4415
+ };
4416
+ } | undefined;
4417
+ };
4135
4418
  toolCall: (u: unknown) => u is {
4136
4419
  readonly type: "tool-call";
4137
4420
  readonly name: string;
@@ -110,6 +110,7 @@ export const ToolInputStart = Schema.Struct({
110
110
  type: Schema.tag("tool-input-start"),
111
111
  id: ToolCallID,
112
112
  name: Schema.String,
113
+ providerExecuted: Schema.optional(Schema.Boolean),
113
114
  providerMetadata: Schema.optional(ProviderMetadata),
114
115
  }).annotate({ identifier: "LLM.Event.ToolInputStart" });
115
116
  export const ToolInputDelta = Schema.Struct({
@@ -124,6 +125,15 @@ export const ToolInputEnd = Schema.Struct({
124
125
  name: Schema.String,
125
126
  providerMetadata: Schema.optional(ProviderMetadata),
126
127
  }).annotate({ identifier: "LLM.Event.ToolInputEnd" });
128
+ /** A local tool call that could not be decoded. `raw` is diagnostic-only. */
129
+ export const ToolInputError = Schema.Struct({
130
+ type: Schema.tag("tool-input-error"),
131
+ id: ToolCallID,
132
+ name: Schema.String,
133
+ raw: Schema.String,
134
+ message: Schema.String,
135
+ providerMetadata: Schema.optional(ProviderMetadata),
136
+ }).annotate({ identifier: "LLM.Event.ToolInputError" });
127
137
  export const ToolCall = Schema.Struct({
128
138
  type: Schema.tag("tool-call"),
129
139
  id: ToolCallID,
@@ -179,6 +189,7 @@ const llmEventTagged = Schema.Union([
179
189
  ToolInputStart,
180
190
  ToolInputDelta,
181
191
  ToolInputEnd,
192
+ ToolInputError,
182
193
  ToolCall,
183
194
  ToolResult,
184
195
  ToolError,
@@ -204,6 +215,7 @@ export const LLMEvent = Object.assign(llmEventTagged, {
204
215
  toolInputStart: (input) => ToolInputStart.make({ ...input, id: toolCallID(input.id) }),
205
216
  toolInputDelta: (input) => ToolInputDelta.make({ ...input, id: toolCallID(input.id) }),
206
217
  toolInputEnd: (input) => ToolInputEnd.make({ ...input, id: toolCallID(input.id) }),
218
+ toolInputError: (input) => ToolInputError.make({ ...input, id: toolCallID(input.id) }),
207
219
  toolCall: (input) => ToolCall.make({ ...input, id: toolCallID(input.id) }),
208
220
  toolResult: (input) => ToolResult.make({
209
221
  ...input,
@@ -231,6 +243,7 @@ export const LLMEvent = Object.assign(llmEventTagged, {
231
243
  toolInputStart: llmEventTagged.guards["tool-input-start"],
232
244
  toolInputDelta: llmEventTagged.guards["tool-input-delta"],
233
245
  toolInputEnd: llmEventTagged.guards["tool-input-end"],
246
+ toolInputError: llmEventTagged.guards["tool-input-error"],
234
247
  toolCall: llmEventTagged.guards["tool-call"],
235
248
  toolResult: llmEventTagged.guards["tool-result"],
236
249
  toolError: llmEventTagged.guards["tool-error"],
@@ -428,6 +441,10 @@ const reduceResponseState = (state, event) => {
428
441
  return reduceToolInputDelta(next, event);
429
442
  case "tool-input-end":
430
443
  return reduceToolInputEnd(next, event);
444
+ case "tool-input-error": {
445
+ const { [event.id]: _finished, ...toolInputs } = next.toolInputs;
446
+ return { ...next, toolInputs };
447
+ }
431
448
  case "tool-call":
432
449
  return reduceToolCall(next, event);
433
450
  case "tool-result":
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-15809",
3
+ "version": "0.0.0-next-15811",
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-15809",
29
+ "@opencode-ai/http-recorder": "0.0.0-next-15811",
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-15809",
38
+ "@opencode-ai/schema": "0.0.0-next-15811",
39
39
  "aws4fetch": "1.0.20",
40
40
  "effect": "4.0.0-beta.98",
41
41
  "google-auth-library": "10.5.0"