@codeworksh/aikit 0.12.1 → 0.13.0-canary.100.1.g71d09a02

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.
Files changed (50) hide show
  1. package/cli.mjs +5 -5
  2. package/{codex-CLDBTrFm.mjs → codex-DvULd3EJ.mjs} +2 -56
  3. package/codex-DvULd3EJ.mjs.map +1 -0
  4. package/{copilot-DvUXC6Kx.mjs → copilot-D9T1jbpu.mjs} +13 -3
  5. package/copilot-D9T1jbpu.mjs.map +1 -0
  6. package/{copilot-headers-BLnBaJyp.mjs → copilot-headers-I-AOoDed.mjs} +2 -2
  7. package/{copilot-headers-BLnBaJyp.mjs.map → copilot-headers-I-AOoDed.mjs.map} +1 -1
  8. package/{failure-5Wjd-qFH.d.mts → failure-CCCRfhCf.d.mts} +6 -3
  9. package/{failure-DFQNKc-O.mjs → failure-D0qEqOsO.mjs} +37 -5
  10. package/failure-D0qEqOsO.mjs.map +1 -0
  11. package/github-copilot-C75m0xwW.mjs +3 -0
  12. package/{github-copilot-BcmOr0jd.mjs → github-copilot-CdkIxdQS.mjs} +31 -15
  13. package/github-copilot-CdkIxdQS.mjs.map +1 -0
  14. package/index.d.mts +540 -237
  15. package/index.mjs +566 -103
  16. package/index.mjs.map +1 -1
  17. package/interactive-c0deRdi7.mjs +115 -0
  18. package/interactive-c0deRdi7.mjs.map +1 -0
  19. package/llm/failure.d.mts +2 -2
  20. package/llm/failure.mjs +2 -2
  21. package/{model-Cjp-Dr8V.mjs → model-BZZZAySN.mjs} +564 -617
  22. package/{model-Cjp-Dr8V.mjs.map → model-BZZZAySN.mjs.map} +1 -1
  23. package/{model-D3wc9-u4.d.mts → model-Dgf7E5gc.d.mts} +20 -1
  24. package/{openai-codex-C1Yb02kM.mjs → model-av44O6GQ.mjs} +340 -355
  25. package/model-av44O6GQ.mjs.map +1 -0
  26. package/{modelgen-DXMmI80T.mjs → modelgen-f3yv7FiK.mjs} +50 -17
  27. package/modelgen-f3yv7FiK.mjs.map +1 -0
  28. package/modelgen.d.mts +1 -1
  29. package/modelgen.mjs +2 -2
  30. package/oauth/github/copilot.d.mts +10 -0
  31. package/oauth/github/copilot.mjs +2 -2
  32. package/oauth/interactive.d.mts +6 -1
  33. package/oauth/interactive.mjs +2 -2
  34. package/oauth/openai/codex.mjs +1 -1
  35. package/openai-codex-BGNrJzTb.mjs +2 -0
  36. package/openai-codex-DL0lqVuN.mjs +117 -0
  37. package/openai-codex-DL0lqVuN.mjs.map +1 -0
  38. package/package.json +1 -1
  39. package/{registry-u49t0S4S.mjs → registry-BULNTLAP.mjs} +10 -6
  40. package/{registry-u49t0S4S.mjs.map → registry-BULNTLAP.mjs.map} +1 -1
  41. package/codex-CLDBTrFm.mjs.map +0 -1
  42. package/copilot-DvUXC6Kx.mjs.map +0 -1
  43. package/failure-DFQNKc-O.mjs.map +0 -1
  44. package/github-copilot-BcmOr0jd.mjs.map +0 -1
  45. package/github-copilot-llyP2NK4.mjs +0 -3
  46. package/interactive-eoNnscGB.mjs +0 -57
  47. package/interactive-eoNnscGB.mjs.map +0 -1
  48. package/modelgen-DXMmI80T.mjs.map +0 -1
  49. package/openai-codex-C1Yb02kM.mjs.map +0 -1
  50. package/openai-codex-CHxShIN3.mjs +0 -2
package/index.d.mts CHANGED
@@ -1,13 +1,13 @@
1
- import { a as ProviderToProtocol, c as getModel, d as model_d_exports, f as modelsAreEqual, i as KnownProviderEnum, l as getModels, n as ActiveThinkingLevel, o as TModel, p as registry, r as Info, s as ThinkingBudgets$1, t as APIMethodEnum, u as getProviders } from "./model-D3wc9-u4.mjs";
2
- import { t as failure_d_exports } from "./failure-5Wjd-qFH.mjs";
1
+ import { a as ProviderToProtocol, c as getModel, d as model_d_exports, f as modelsAreEqual, i as KnownProviderEnum, l as getModels, n as ActiveThinkingLevel, o as TModel, p as registry, r as Info, s as ThinkingBudgets$1, t as APIMethodEnum, u as getProviders } from "./model-Dgf7E5gc.mjs";
2
+ import { t as failure_d_exports } from "./failure-CCCRfhCf.mjs";
3
3
  import Type$2, { Static, Static as Static$1, TSchema, TSchema as TSchema$1, Type, Type as Type$1 } from "typebox";
4
- import { APICallError, LanguageModelV3, LanguageModelV4, ProviderV3, ProviderV4 } from "@ai-sdk/provider";
4
+ import { LanguageModelV3, LanguageModelV4, ProviderV3, ProviderV4 } from "@ai-sdk/provider";
5
5
  import { AnthropicLanguageModelOptions, AnthropicProviderSettings } from "@ai-sdk/anthropic";
6
- import { OpenAILanguageModelChatOptions, OpenAILanguageModelCompletionOptions, OpenAILanguageModelResponsesOptions, OpenAIProviderSettings } from "@ai-sdk/openai";
7
6
  import { OpenAICompatibleLanguageModelChatOptions, OpenAICompatibleLanguageModelCompletionOptions, OpenAICompatibleProviderSettings } from "@ai-sdk/openai-compatible";
8
7
  import { GoogleGenerativeAIProviderSettings, GoogleLanguageModelOptions } from "@ai-sdk/google";
9
8
  import { GoogleVertexProviderSettings } from "@ai-sdk/google-vertex";
10
9
  import { GoogleVertexAnthropicProviderSettings } from "@ai-sdk/google-vertex/anthropic";
10
+ import { OpenAILanguageModelChatOptions, OpenAILanguageModelCompletionOptions, OpenAILanguageModelResponsesOptions, OpenAIProviderSettings } from "@ai-sdk/openai";
11
11
  import { XaiLanguageModelResponsesOptions, XaiProviderSettings } from "@ai-sdk/xai";
12
12
  import { OpenRouterProviderOptions, OpenRouterProviderSettings } from "@openrouter/ai-sdk-provider";
13
13
  declare namespace event_d_exports {
@@ -177,6 +177,17 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
177
177
  retryAfterMs: Type$2.TOptional<Type$2.TNumber>;
178
178
  _tag: Type$2.TLiteral<"Unknown">;
179
179
  }>]>>;
180
+ diagnostics: Type$2.TOptional<Type$2.TArray<Type$2.TObject<{
181
+ type: Type$2.TString;
182
+ timestamp: Type$2.TNumber;
183
+ error: Type$2.TOptional<Type$2.TObject<{
184
+ name: Type$2.TOptional<Type$2.TString>;
185
+ message: Type$2.TString;
186
+ stack: Type$2.TOptional<Type$2.TString>;
187
+ code: Type$2.TOptional<Type$2.TUnion<[Type$2.TString, Type$2.TNumber]>>;
188
+ }>>;
189
+ details: Type$2.TOptional<Type$2.TRecord<"^.*$", Type$2.TUnknown>>;
190
+ }>>>;
180
191
  time: Type$2.TObject<{
181
192
  created: Type$2.TNumber;
182
193
  completed: Type$2.TNumber;
@@ -201,7 +212,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
201
212
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
202
213
  thoughtSignature: Type$2.TOptional<Type$2.TString>;
203
214
  namespace: Type$2.TOptional<Type$2.TString>;
204
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
205
215
  time: Type$2.TObject<{
206
216
  start: Type$2.TNumber;
207
217
  end: Type$2.TNumber;
@@ -209,7 +219,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
209
219
  }>, Type$2.TObject<{
210
220
  status: Type$2.TLiteral<"pending">;
211
221
  }>]>, Type$2.TObject<{
212
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
213
222
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
214
223
  callID: Type$2.TString;
215
224
  name: Type$2.TString;
@@ -234,7 +243,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
234
243
  }>;
235
244
  type: Type$2.TLiteral<"toolCall">;
236
245
  }>, Type$2.TUnion<[Type$2.TObject<{
237
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
238
246
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
239
247
  callID: Type$2.TString;
240
248
  name: Type$2.TString;
@@ -260,7 +268,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
260
268
  }>;
261
269
  type: Type$2.TLiteral<"toolCall">;
262
270
  }>, Type$2.TObject<{
263
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
264
271
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
265
272
  callID: Type$2.TString;
266
273
  name: Type$2.TString;
@@ -286,7 +293,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
286
293
  }>;
287
294
  type: Type$2.TLiteral<"toolCall">;
288
295
  }>, Type$2.TObject<{
289
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
290
296
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
291
297
  callID: Type$2.TString;
292
298
  name: Type$2.TString;
@@ -312,7 +318,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
312
318
  }>;
313
319
  type: Type$2.TLiteral<"toolCall">;
314
320
  }>, Type$2.TObject<{
315
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
316
321
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
317
322
  callID: Type$2.TString;
318
323
  name: Type$2.TString;
@@ -483,6 +488,17 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
483
488
  retryAfterMs: Type$2.TOptional<Type$2.TNumber>;
484
489
  _tag: Type$2.TLiteral<"Unknown">;
485
490
  }>]>>;
491
+ diagnostics: Type$2.TOptional<Type$2.TArray<Type$2.TObject<{
492
+ type: Type$2.TString;
493
+ timestamp: Type$2.TNumber;
494
+ error: Type$2.TOptional<Type$2.TObject<{
495
+ name: Type$2.TOptional<Type$2.TString>;
496
+ message: Type$2.TString;
497
+ stack: Type$2.TOptional<Type$2.TString>;
498
+ code: Type$2.TOptional<Type$2.TUnion<[Type$2.TString, Type$2.TNumber]>>;
499
+ }>>;
500
+ details: Type$2.TOptional<Type$2.TRecord<"^.*$", Type$2.TUnknown>>;
501
+ }>>>;
486
502
  time: Type$2.TObject<{
487
503
  created: Type$2.TNumber;
488
504
  completed: Type$2.TNumber;
@@ -507,7 +523,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
507
523
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
508
524
  thoughtSignature: Type$2.TOptional<Type$2.TString>;
509
525
  namespace: Type$2.TOptional<Type$2.TString>;
510
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
511
526
  time: Type$2.TObject<{
512
527
  start: Type$2.TNumber;
513
528
  end: Type$2.TNumber;
@@ -515,7 +530,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
515
530
  }>, Type$2.TObject<{
516
531
  status: Type$2.TLiteral<"pending">;
517
532
  }>]>, Type$2.TObject<{
518
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
519
533
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
520
534
  callID: Type$2.TString;
521
535
  name: Type$2.TString;
@@ -540,7 +554,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
540
554
  }>;
541
555
  type: Type$2.TLiteral<"toolCall">;
542
556
  }>, Type$2.TUnion<[Type$2.TObject<{
543
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
544
557
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
545
558
  callID: Type$2.TString;
546
559
  name: Type$2.TString;
@@ -566,7 +579,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
566
579
  }>;
567
580
  type: Type$2.TLiteral<"toolCall">;
568
581
  }>, Type$2.TObject<{
569
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
570
582
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
571
583
  callID: Type$2.TString;
572
584
  name: Type$2.TString;
@@ -592,7 +604,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
592
604
  }>;
593
605
  type: Type$2.TLiteral<"toolCall">;
594
606
  }>, Type$2.TObject<{
595
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
596
607
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
597
608
  callID: Type$2.TString;
598
609
  name: Type$2.TString;
@@ -618,7 +629,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
618
629
  }>;
619
630
  type: Type$2.TLiteral<"toolCall">;
620
631
  }>, Type$2.TObject<{
621
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
622
632
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
623
633
  callID: Type$2.TString;
624
634
  name: Type$2.TString;
@@ -790,6 +800,17 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
790
800
  retryAfterMs: Type$2.TOptional<Type$2.TNumber>;
791
801
  _tag: Type$2.TLiteral<"Unknown">;
792
802
  }>]>>;
803
+ diagnostics: Type$2.TOptional<Type$2.TArray<Type$2.TObject<{
804
+ type: Type$2.TString;
805
+ timestamp: Type$2.TNumber;
806
+ error: Type$2.TOptional<Type$2.TObject<{
807
+ name: Type$2.TOptional<Type$2.TString>;
808
+ message: Type$2.TString;
809
+ stack: Type$2.TOptional<Type$2.TString>;
810
+ code: Type$2.TOptional<Type$2.TUnion<[Type$2.TString, Type$2.TNumber]>>;
811
+ }>>;
812
+ details: Type$2.TOptional<Type$2.TRecord<"^.*$", Type$2.TUnknown>>;
813
+ }>>>;
793
814
  time: Type$2.TObject<{
794
815
  created: Type$2.TNumber;
795
816
  completed: Type$2.TNumber;
@@ -814,7 +835,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
814
835
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
815
836
  thoughtSignature: Type$2.TOptional<Type$2.TString>;
816
837
  namespace: Type$2.TOptional<Type$2.TString>;
817
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
818
838
  time: Type$2.TObject<{
819
839
  start: Type$2.TNumber;
820
840
  end: Type$2.TNumber;
@@ -822,7 +842,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
822
842
  }>, Type$2.TObject<{
823
843
  status: Type$2.TLiteral<"pending">;
824
844
  }>]>, Type$2.TObject<{
825
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
826
845
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
827
846
  callID: Type$2.TString;
828
847
  name: Type$2.TString;
@@ -847,7 +866,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
847
866
  }>;
848
867
  type: Type$2.TLiteral<"toolCall">;
849
868
  }>, Type$2.TUnion<[Type$2.TObject<{
850
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
851
869
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
852
870
  callID: Type$2.TString;
853
871
  name: Type$2.TString;
@@ -873,7 +891,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
873
891
  }>;
874
892
  type: Type$2.TLiteral<"toolCall">;
875
893
  }>, Type$2.TObject<{
876
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
877
894
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
878
895
  callID: Type$2.TString;
879
896
  name: Type$2.TString;
@@ -899,7 +916,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
899
916
  }>;
900
917
  type: Type$2.TLiteral<"toolCall">;
901
918
  }>, Type$2.TObject<{
902
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
903
919
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
904
920
  callID: Type$2.TString;
905
921
  name: Type$2.TString;
@@ -925,7 +941,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
925
941
  }>;
926
942
  type: Type$2.TLiteral<"toolCall">;
927
943
  }>, Type$2.TObject<{
928
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
929
944
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
930
945
  callID: Type$2.TString;
931
946
  name: Type$2.TString;
@@ -1097,6 +1112,17 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
1097
1112
  retryAfterMs: Type$2.TOptional<Type$2.TNumber>;
1098
1113
  _tag: Type$2.TLiteral<"Unknown">;
1099
1114
  }>]>>;
1115
+ diagnostics: Type$2.TOptional<Type$2.TArray<Type$2.TObject<{
1116
+ type: Type$2.TString;
1117
+ timestamp: Type$2.TNumber;
1118
+ error: Type$2.TOptional<Type$2.TObject<{
1119
+ name: Type$2.TOptional<Type$2.TString>;
1120
+ message: Type$2.TString;
1121
+ stack: Type$2.TOptional<Type$2.TString>;
1122
+ code: Type$2.TOptional<Type$2.TUnion<[Type$2.TString, Type$2.TNumber]>>;
1123
+ }>>;
1124
+ details: Type$2.TOptional<Type$2.TRecord<"^.*$", Type$2.TUnknown>>;
1125
+ }>>>;
1100
1126
  time: Type$2.TObject<{
1101
1127
  created: Type$2.TNumber;
1102
1128
  completed: Type$2.TNumber;
@@ -1121,7 +1147,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
1121
1147
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
1122
1148
  thoughtSignature: Type$2.TOptional<Type$2.TString>;
1123
1149
  namespace: Type$2.TOptional<Type$2.TString>;
1124
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
1125
1150
  time: Type$2.TObject<{
1126
1151
  start: Type$2.TNumber;
1127
1152
  end: Type$2.TNumber;
@@ -1129,7 +1154,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
1129
1154
  }>, Type$2.TObject<{
1130
1155
  status: Type$2.TLiteral<"pending">;
1131
1156
  }>]>, Type$2.TObject<{
1132
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
1133
1157
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
1134
1158
  callID: Type$2.TString;
1135
1159
  name: Type$2.TString;
@@ -1154,7 +1178,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
1154
1178
  }>;
1155
1179
  type: Type$2.TLiteral<"toolCall">;
1156
1180
  }>, Type$2.TUnion<[Type$2.TObject<{
1157
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
1158
1181
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
1159
1182
  callID: Type$2.TString;
1160
1183
  name: Type$2.TString;
@@ -1180,7 +1203,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
1180
1203
  }>;
1181
1204
  type: Type$2.TLiteral<"toolCall">;
1182
1205
  }>, Type$2.TObject<{
1183
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
1184
1206
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
1185
1207
  callID: Type$2.TString;
1186
1208
  name: Type$2.TString;
@@ -1206,7 +1228,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
1206
1228
  }>;
1207
1229
  type: Type$2.TLiteral<"toolCall">;
1208
1230
  }>, Type$2.TObject<{
1209
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
1210
1231
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
1211
1232
  callID: Type$2.TString;
1212
1233
  name: Type$2.TString;
@@ -1232,7 +1253,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
1232
1253
  }>;
1233
1254
  type: Type$2.TLiteral<"toolCall">;
1234
1255
  }>, Type$2.TObject<{
1235
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
1236
1256
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
1237
1257
  callID: Type$2.TString;
1238
1258
  name: Type$2.TString;
@@ -1403,6 +1423,17 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
1403
1423
  retryAfterMs: Type$2.TOptional<Type$2.TNumber>;
1404
1424
  _tag: Type$2.TLiteral<"Unknown">;
1405
1425
  }>]>>;
1426
+ diagnostics: Type$2.TOptional<Type$2.TArray<Type$2.TObject<{
1427
+ type: Type$2.TString;
1428
+ timestamp: Type$2.TNumber;
1429
+ error: Type$2.TOptional<Type$2.TObject<{
1430
+ name: Type$2.TOptional<Type$2.TString>;
1431
+ message: Type$2.TString;
1432
+ stack: Type$2.TOptional<Type$2.TString>;
1433
+ code: Type$2.TOptional<Type$2.TUnion<[Type$2.TString, Type$2.TNumber]>>;
1434
+ }>>;
1435
+ details: Type$2.TOptional<Type$2.TRecord<"^.*$", Type$2.TUnknown>>;
1436
+ }>>>;
1406
1437
  time: Type$2.TObject<{
1407
1438
  created: Type$2.TNumber;
1408
1439
  completed: Type$2.TNumber;
@@ -1427,7 +1458,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
1427
1458
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
1428
1459
  thoughtSignature: Type$2.TOptional<Type$2.TString>;
1429
1460
  namespace: Type$2.TOptional<Type$2.TString>;
1430
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
1431
1461
  time: Type$2.TObject<{
1432
1462
  start: Type$2.TNumber;
1433
1463
  end: Type$2.TNumber;
@@ -1435,7 +1465,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
1435
1465
  }>, Type$2.TObject<{
1436
1466
  status: Type$2.TLiteral<"pending">;
1437
1467
  }>]>, Type$2.TObject<{
1438
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
1439
1468
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
1440
1469
  callID: Type$2.TString;
1441
1470
  name: Type$2.TString;
@@ -1460,7 +1489,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
1460
1489
  }>;
1461
1490
  type: Type$2.TLiteral<"toolCall">;
1462
1491
  }>, Type$2.TUnion<[Type$2.TObject<{
1463
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
1464
1492
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
1465
1493
  callID: Type$2.TString;
1466
1494
  name: Type$2.TString;
@@ -1486,7 +1514,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
1486
1514
  }>;
1487
1515
  type: Type$2.TLiteral<"toolCall">;
1488
1516
  }>, Type$2.TObject<{
1489
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
1490
1517
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
1491
1518
  callID: Type$2.TString;
1492
1519
  name: Type$2.TString;
@@ -1512,7 +1539,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
1512
1539
  }>;
1513
1540
  type: Type$2.TLiteral<"toolCall">;
1514
1541
  }>, Type$2.TObject<{
1515
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
1516
1542
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
1517
1543
  callID: Type$2.TString;
1518
1544
  name: Type$2.TString;
@@ -1538,7 +1564,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
1538
1564
  }>;
1539
1565
  type: Type$2.TLiteral<"toolCall">;
1540
1566
  }>, Type$2.TObject<{
1541
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
1542
1567
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
1543
1568
  callID: Type$2.TString;
1544
1569
  name: Type$2.TString;
@@ -1710,6 +1735,17 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
1710
1735
  retryAfterMs: Type$2.TOptional<Type$2.TNumber>;
1711
1736
  _tag: Type$2.TLiteral<"Unknown">;
1712
1737
  }>]>>;
1738
+ diagnostics: Type$2.TOptional<Type$2.TArray<Type$2.TObject<{
1739
+ type: Type$2.TString;
1740
+ timestamp: Type$2.TNumber;
1741
+ error: Type$2.TOptional<Type$2.TObject<{
1742
+ name: Type$2.TOptional<Type$2.TString>;
1743
+ message: Type$2.TString;
1744
+ stack: Type$2.TOptional<Type$2.TString>;
1745
+ code: Type$2.TOptional<Type$2.TUnion<[Type$2.TString, Type$2.TNumber]>>;
1746
+ }>>;
1747
+ details: Type$2.TOptional<Type$2.TRecord<"^.*$", Type$2.TUnknown>>;
1748
+ }>>>;
1713
1749
  time: Type$2.TObject<{
1714
1750
  created: Type$2.TNumber;
1715
1751
  completed: Type$2.TNumber;
@@ -1734,7 +1770,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
1734
1770
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
1735
1771
  thoughtSignature: Type$2.TOptional<Type$2.TString>;
1736
1772
  namespace: Type$2.TOptional<Type$2.TString>;
1737
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
1738
1773
  time: Type$2.TObject<{
1739
1774
  start: Type$2.TNumber;
1740
1775
  end: Type$2.TNumber;
@@ -1742,7 +1777,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
1742
1777
  }>, Type$2.TObject<{
1743
1778
  status: Type$2.TLiteral<"pending">;
1744
1779
  }>]>, Type$2.TObject<{
1745
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
1746
1780
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
1747
1781
  callID: Type$2.TString;
1748
1782
  name: Type$2.TString;
@@ -1767,7 +1801,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
1767
1801
  }>;
1768
1802
  type: Type$2.TLiteral<"toolCall">;
1769
1803
  }>, Type$2.TUnion<[Type$2.TObject<{
1770
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
1771
1804
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
1772
1805
  callID: Type$2.TString;
1773
1806
  name: Type$2.TString;
@@ -1793,7 +1826,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
1793
1826
  }>;
1794
1827
  type: Type$2.TLiteral<"toolCall">;
1795
1828
  }>, Type$2.TObject<{
1796
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
1797
1829
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
1798
1830
  callID: Type$2.TString;
1799
1831
  name: Type$2.TString;
@@ -1819,7 +1851,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
1819
1851
  }>;
1820
1852
  type: Type$2.TLiteral<"toolCall">;
1821
1853
  }>, Type$2.TObject<{
1822
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
1823
1854
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
1824
1855
  callID: Type$2.TString;
1825
1856
  name: Type$2.TString;
@@ -1845,7 +1876,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
1845
1876
  }>;
1846
1877
  type: Type$2.TLiteral<"toolCall">;
1847
1878
  }>, Type$2.TObject<{
1848
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
1849
1879
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
1850
1880
  callID: Type$2.TString;
1851
1881
  name: Type$2.TString;
@@ -2017,6 +2047,17 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
2017
2047
  retryAfterMs: Type$2.TOptional<Type$2.TNumber>;
2018
2048
  _tag: Type$2.TLiteral<"Unknown">;
2019
2049
  }>]>>;
2050
+ diagnostics: Type$2.TOptional<Type$2.TArray<Type$2.TObject<{
2051
+ type: Type$2.TString;
2052
+ timestamp: Type$2.TNumber;
2053
+ error: Type$2.TOptional<Type$2.TObject<{
2054
+ name: Type$2.TOptional<Type$2.TString>;
2055
+ message: Type$2.TString;
2056
+ stack: Type$2.TOptional<Type$2.TString>;
2057
+ code: Type$2.TOptional<Type$2.TUnion<[Type$2.TString, Type$2.TNumber]>>;
2058
+ }>>;
2059
+ details: Type$2.TOptional<Type$2.TRecord<"^.*$", Type$2.TUnknown>>;
2060
+ }>>>;
2020
2061
  time: Type$2.TObject<{
2021
2062
  created: Type$2.TNumber;
2022
2063
  completed: Type$2.TNumber;
@@ -2041,7 +2082,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
2041
2082
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
2042
2083
  thoughtSignature: Type$2.TOptional<Type$2.TString>;
2043
2084
  namespace: Type$2.TOptional<Type$2.TString>;
2044
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
2045
2085
  time: Type$2.TObject<{
2046
2086
  start: Type$2.TNumber;
2047
2087
  end: Type$2.TNumber;
@@ -2049,7 +2089,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
2049
2089
  }>, Type$2.TObject<{
2050
2090
  status: Type$2.TLiteral<"pending">;
2051
2091
  }>]>, Type$2.TObject<{
2052
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
2053
2092
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
2054
2093
  callID: Type$2.TString;
2055
2094
  name: Type$2.TString;
@@ -2074,7 +2113,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
2074
2113
  }>;
2075
2114
  type: Type$2.TLiteral<"toolCall">;
2076
2115
  }>, Type$2.TUnion<[Type$2.TObject<{
2077
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
2078
2116
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
2079
2117
  callID: Type$2.TString;
2080
2118
  name: Type$2.TString;
@@ -2100,7 +2138,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
2100
2138
  }>;
2101
2139
  type: Type$2.TLiteral<"toolCall">;
2102
2140
  }>, Type$2.TObject<{
2103
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
2104
2141
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
2105
2142
  callID: Type$2.TString;
2106
2143
  name: Type$2.TString;
@@ -2126,7 +2163,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
2126
2163
  }>;
2127
2164
  type: Type$2.TLiteral<"toolCall">;
2128
2165
  }>, Type$2.TObject<{
2129
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
2130
2166
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
2131
2167
  callID: Type$2.TString;
2132
2168
  name: Type$2.TString;
@@ -2152,7 +2188,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
2152
2188
  }>;
2153
2189
  type: Type$2.TLiteral<"toolCall">;
2154
2190
  }>, Type$2.TObject<{
2155
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
2156
2191
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
2157
2192
  callID: Type$2.TString;
2158
2193
  name: Type$2.TString;
@@ -2323,6 +2358,17 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
2323
2358
  retryAfterMs: Type$2.TOptional<Type$2.TNumber>;
2324
2359
  _tag: Type$2.TLiteral<"Unknown">;
2325
2360
  }>]>>;
2361
+ diagnostics: Type$2.TOptional<Type$2.TArray<Type$2.TObject<{
2362
+ type: Type$2.TString;
2363
+ timestamp: Type$2.TNumber;
2364
+ error: Type$2.TOptional<Type$2.TObject<{
2365
+ name: Type$2.TOptional<Type$2.TString>;
2366
+ message: Type$2.TString;
2367
+ stack: Type$2.TOptional<Type$2.TString>;
2368
+ code: Type$2.TOptional<Type$2.TUnion<[Type$2.TString, Type$2.TNumber]>>;
2369
+ }>>;
2370
+ details: Type$2.TOptional<Type$2.TRecord<"^.*$", Type$2.TUnknown>>;
2371
+ }>>>;
2326
2372
  time: Type$2.TObject<{
2327
2373
  created: Type$2.TNumber;
2328
2374
  completed: Type$2.TNumber;
@@ -2347,7 +2393,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
2347
2393
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
2348
2394
  thoughtSignature: Type$2.TOptional<Type$2.TString>;
2349
2395
  namespace: Type$2.TOptional<Type$2.TString>;
2350
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
2351
2396
  time: Type$2.TObject<{
2352
2397
  start: Type$2.TNumber;
2353
2398
  end: Type$2.TNumber;
@@ -2355,7 +2400,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
2355
2400
  }>, Type$2.TObject<{
2356
2401
  status: Type$2.TLiteral<"pending">;
2357
2402
  }>]>, Type$2.TObject<{
2358
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
2359
2403
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
2360
2404
  callID: Type$2.TString;
2361
2405
  name: Type$2.TString;
@@ -2380,7 +2424,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
2380
2424
  }>;
2381
2425
  type: Type$2.TLiteral<"toolCall">;
2382
2426
  }>, Type$2.TUnion<[Type$2.TObject<{
2383
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
2384
2427
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
2385
2428
  callID: Type$2.TString;
2386
2429
  name: Type$2.TString;
@@ -2406,7 +2449,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
2406
2449
  }>;
2407
2450
  type: Type$2.TLiteral<"toolCall">;
2408
2451
  }>, Type$2.TObject<{
2409
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
2410
2452
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
2411
2453
  callID: Type$2.TString;
2412
2454
  name: Type$2.TString;
@@ -2432,7 +2474,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
2432
2474
  }>;
2433
2475
  type: Type$2.TLiteral<"toolCall">;
2434
2476
  }>, Type$2.TObject<{
2435
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
2436
2477
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
2437
2478
  callID: Type$2.TString;
2438
2479
  name: Type$2.TString;
@@ -2458,7 +2499,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
2458
2499
  }>;
2459
2500
  type: Type$2.TLiteral<"toolCall">;
2460
2501
  }>, Type$2.TObject<{
2461
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
2462
2502
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
2463
2503
  callID: Type$2.TString;
2464
2504
  name: Type$2.TString;
@@ -2630,6 +2670,17 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
2630
2670
  retryAfterMs: Type$2.TOptional<Type$2.TNumber>;
2631
2671
  _tag: Type$2.TLiteral<"Unknown">;
2632
2672
  }>]>>;
2673
+ diagnostics: Type$2.TOptional<Type$2.TArray<Type$2.TObject<{
2674
+ type: Type$2.TString;
2675
+ timestamp: Type$2.TNumber;
2676
+ error: Type$2.TOptional<Type$2.TObject<{
2677
+ name: Type$2.TOptional<Type$2.TString>;
2678
+ message: Type$2.TString;
2679
+ stack: Type$2.TOptional<Type$2.TString>;
2680
+ code: Type$2.TOptional<Type$2.TUnion<[Type$2.TString, Type$2.TNumber]>>;
2681
+ }>>;
2682
+ details: Type$2.TOptional<Type$2.TRecord<"^.*$", Type$2.TUnknown>>;
2683
+ }>>>;
2633
2684
  time: Type$2.TObject<{
2634
2685
  created: Type$2.TNumber;
2635
2686
  completed: Type$2.TNumber;
@@ -2654,7 +2705,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
2654
2705
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
2655
2706
  thoughtSignature: Type$2.TOptional<Type$2.TString>;
2656
2707
  namespace: Type$2.TOptional<Type$2.TString>;
2657
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
2658
2708
  time: Type$2.TObject<{
2659
2709
  start: Type$2.TNumber;
2660
2710
  end: Type$2.TNumber;
@@ -2662,7 +2712,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
2662
2712
  }>, Type$2.TObject<{
2663
2713
  status: Type$2.TLiteral<"pending">;
2664
2714
  }>]>, Type$2.TObject<{
2665
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
2666
2715
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
2667
2716
  callID: Type$2.TString;
2668
2717
  name: Type$2.TString;
@@ -2687,7 +2736,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
2687
2736
  }>;
2688
2737
  type: Type$2.TLiteral<"toolCall">;
2689
2738
  }>, Type$2.TUnion<[Type$2.TObject<{
2690
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
2691
2739
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
2692
2740
  callID: Type$2.TString;
2693
2741
  name: Type$2.TString;
@@ -2713,7 +2761,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
2713
2761
  }>;
2714
2762
  type: Type$2.TLiteral<"toolCall">;
2715
2763
  }>, Type$2.TObject<{
2716
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
2717
2764
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
2718
2765
  callID: Type$2.TString;
2719
2766
  name: Type$2.TString;
@@ -2739,7 +2786,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
2739
2786
  }>;
2740
2787
  type: Type$2.TLiteral<"toolCall">;
2741
2788
  }>, Type$2.TObject<{
2742
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
2743
2789
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
2744
2790
  callID: Type$2.TString;
2745
2791
  name: Type$2.TString;
@@ -2765,7 +2811,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
2765
2811
  }>;
2766
2812
  type: Type$2.TLiteral<"toolCall">;
2767
2813
  }>, Type$2.TObject<{
2768
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
2769
2814
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
2770
2815
  callID: Type$2.TString;
2771
2816
  name: Type$2.TString;
@@ -2805,7 +2850,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
2805
2850
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
2806
2851
  thoughtSignature: Type$2.TOptional<Type$2.TString>;
2807
2852
  namespace: Type$2.TOptional<Type$2.TString>;
2808
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
2809
2853
  time: Type$2.TObject<{
2810
2854
  start: Type$2.TNumber;
2811
2855
  end: Type$2.TNumber;
@@ -2813,7 +2857,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
2813
2857
  }>, Type$2.TObject<{
2814
2858
  status: Type$2.TLiteral<"pending">;
2815
2859
  }>]>, Type$2.TObject<{
2816
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
2817
2860
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
2818
2861
  callID: Type$2.TString;
2819
2862
  name: Type$2.TString;
@@ -2838,7 +2881,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
2838
2881
  }>;
2839
2882
  type: Type$2.TLiteral<"toolCall">;
2840
2883
  }>, Type$2.TUnion<[Type$2.TObject<{
2841
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
2842
2884
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
2843
2885
  callID: Type$2.TString;
2844
2886
  name: Type$2.TString;
@@ -2864,7 +2906,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
2864
2906
  }>;
2865
2907
  type: Type$2.TLiteral<"toolCall">;
2866
2908
  }>, Type$2.TObject<{
2867
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
2868
2909
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
2869
2910
  callID: Type$2.TString;
2870
2911
  name: Type$2.TString;
@@ -2890,7 +2931,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
2890
2931
  }>;
2891
2932
  type: Type$2.TLiteral<"toolCall">;
2892
2933
  }>, Type$2.TObject<{
2893
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
2894
2934
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
2895
2935
  callID: Type$2.TString;
2896
2936
  name: Type$2.TString;
@@ -2916,7 +2956,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
2916
2956
  }>;
2917
2957
  type: Type$2.TLiteral<"toolCall">;
2918
2958
  }>, Type$2.TObject<{
2919
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
2920
2959
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
2921
2960
  callID: Type$2.TString;
2922
2961
  name: Type$2.TString;
@@ -3080,6 +3119,17 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
3080
3119
  retryAfterMs: Type$2.TOptional<Type$2.TNumber>;
3081
3120
  _tag: Type$2.TLiteral<"Unknown">;
3082
3121
  }>]>>;
3122
+ diagnostics: Type$2.TOptional<Type$2.TArray<Type$2.TObject<{
3123
+ type: Type$2.TString;
3124
+ timestamp: Type$2.TNumber;
3125
+ error: Type$2.TOptional<Type$2.TObject<{
3126
+ name: Type$2.TOptional<Type$2.TString>;
3127
+ message: Type$2.TString;
3128
+ stack: Type$2.TOptional<Type$2.TString>;
3129
+ code: Type$2.TOptional<Type$2.TUnion<[Type$2.TString, Type$2.TNumber]>>;
3130
+ }>>;
3131
+ details: Type$2.TOptional<Type$2.TRecord<"^.*$", Type$2.TUnknown>>;
3132
+ }>>>;
3083
3133
  time: Type$2.TObject<{
3084
3134
  created: Type$2.TNumber;
3085
3135
  completed: Type$2.TNumber;
@@ -3104,7 +3154,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
3104
3154
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
3105
3155
  thoughtSignature: Type$2.TOptional<Type$2.TString>;
3106
3156
  namespace: Type$2.TOptional<Type$2.TString>;
3107
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
3108
3157
  time: Type$2.TObject<{
3109
3158
  start: Type$2.TNumber;
3110
3159
  end: Type$2.TNumber;
@@ -3112,7 +3161,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
3112
3161
  }>, Type$2.TObject<{
3113
3162
  status: Type$2.TLiteral<"pending">;
3114
3163
  }>]>, Type$2.TObject<{
3115
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
3116
3164
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
3117
3165
  callID: Type$2.TString;
3118
3166
  name: Type$2.TString;
@@ -3137,7 +3185,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
3137
3185
  }>;
3138
3186
  type: Type$2.TLiteral<"toolCall">;
3139
3187
  }>, Type$2.TUnion<[Type$2.TObject<{
3140
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
3141
3188
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
3142
3189
  callID: Type$2.TString;
3143
3190
  name: Type$2.TString;
@@ -3163,7 +3210,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
3163
3210
  }>;
3164
3211
  type: Type$2.TLiteral<"toolCall">;
3165
3212
  }>, Type$2.TObject<{
3166
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
3167
3213
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
3168
3214
  callID: Type$2.TString;
3169
3215
  name: Type$2.TString;
@@ -3189,7 +3235,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
3189
3235
  }>;
3190
3236
  type: Type$2.TLiteral<"toolCall">;
3191
3237
  }>, Type$2.TObject<{
3192
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
3193
3238
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
3194
3239
  callID: Type$2.TString;
3195
3240
  name: Type$2.TString;
@@ -3215,7 +3260,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
3215
3260
  }>;
3216
3261
  type: Type$2.TLiteral<"toolCall">;
3217
3262
  }>, Type$2.TObject<{
3218
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
3219
3263
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
3220
3264
  callID: Type$2.TString;
3221
3265
  name: Type$2.TString;
@@ -3255,7 +3299,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
3255
3299
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
3256
3300
  thoughtSignature: Type$2.TOptional<Type$2.TString>;
3257
3301
  namespace: Type$2.TOptional<Type$2.TString>;
3258
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
3259
3302
  time: Type$2.TObject<{
3260
3303
  start: Type$2.TNumber;
3261
3304
  end: Type$2.TNumber;
@@ -3263,7 +3306,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
3263
3306
  }>, Type$2.TObject<{
3264
3307
  status: Type$2.TLiteral<"pending">;
3265
3308
  }>]>, Type$2.TObject<{
3266
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
3267
3309
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
3268
3310
  callID: Type$2.TString;
3269
3311
  name: Type$2.TString;
@@ -3288,7 +3330,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
3288
3330
  }>;
3289
3331
  type: Type$2.TLiteral<"toolCall">;
3290
3332
  }>, Type$2.TUnion<[Type$2.TObject<{
3291
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
3292
3333
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
3293
3334
  callID: Type$2.TString;
3294
3335
  name: Type$2.TString;
@@ -3314,7 +3355,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
3314
3355
  }>;
3315
3356
  type: Type$2.TLiteral<"toolCall">;
3316
3357
  }>, Type$2.TObject<{
3317
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
3318
3358
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
3319
3359
  callID: Type$2.TString;
3320
3360
  name: Type$2.TString;
@@ -3340,7 +3380,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
3340
3380
  }>;
3341
3381
  type: Type$2.TLiteral<"toolCall">;
3342
3382
  }>, Type$2.TObject<{
3343
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
3344
3383
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
3345
3384
  callID: Type$2.TString;
3346
3385
  name: Type$2.TString;
@@ -3366,7 +3405,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
3366
3405
  }>;
3367
3406
  type: Type$2.TLiteral<"toolCall">;
3368
3407
  }>, Type$2.TObject<{
3369
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
3370
3408
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
3371
3409
  callID: Type$2.TString;
3372
3410
  name: Type$2.TString;
@@ -3530,6 +3568,17 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
3530
3568
  retryAfterMs: Type$2.TOptional<Type$2.TNumber>;
3531
3569
  _tag: Type$2.TLiteral<"Unknown">;
3532
3570
  }>]>>;
3571
+ diagnostics: Type$2.TOptional<Type$2.TArray<Type$2.TObject<{
3572
+ type: Type$2.TString;
3573
+ timestamp: Type$2.TNumber;
3574
+ error: Type$2.TOptional<Type$2.TObject<{
3575
+ name: Type$2.TOptional<Type$2.TString>;
3576
+ message: Type$2.TString;
3577
+ stack: Type$2.TOptional<Type$2.TString>;
3578
+ code: Type$2.TOptional<Type$2.TUnion<[Type$2.TString, Type$2.TNumber]>>;
3579
+ }>>;
3580
+ details: Type$2.TOptional<Type$2.TRecord<"^.*$", Type$2.TUnknown>>;
3581
+ }>>>;
3533
3582
  time: Type$2.TObject<{
3534
3583
  created: Type$2.TNumber;
3535
3584
  completed: Type$2.TNumber;
@@ -3554,7 +3603,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
3554
3603
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
3555
3604
  thoughtSignature: Type$2.TOptional<Type$2.TString>;
3556
3605
  namespace: Type$2.TOptional<Type$2.TString>;
3557
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
3558
3606
  time: Type$2.TObject<{
3559
3607
  start: Type$2.TNumber;
3560
3608
  end: Type$2.TNumber;
@@ -3562,7 +3610,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
3562
3610
  }>, Type$2.TObject<{
3563
3611
  status: Type$2.TLiteral<"pending">;
3564
3612
  }>]>, Type$2.TObject<{
3565
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
3566
3613
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
3567
3614
  callID: Type$2.TString;
3568
3615
  name: Type$2.TString;
@@ -3587,7 +3634,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
3587
3634
  }>;
3588
3635
  type: Type$2.TLiteral<"toolCall">;
3589
3636
  }>, Type$2.TUnion<[Type$2.TObject<{
3590
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
3591
3637
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
3592
3638
  callID: Type$2.TString;
3593
3639
  name: Type$2.TString;
@@ -3613,7 +3659,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
3613
3659
  }>;
3614
3660
  type: Type$2.TLiteral<"toolCall">;
3615
3661
  }>, Type$2.TObject<{
3616
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
3617
3662
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
3618
3663
  callID: Type$2.TString;
3619
3664
  name: Type$2.TString;
@@ -3639,7 +3684,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
3639
3684
  }>;
3640
3685
  type: Type$2.TLiteral<"toolCall">;
3641
3686
  }>, Type$2.TObject<{
3642
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
3643
3687
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
3644
3688
  callID: Type$2.TString;
3645
3689
  name: Type$2.TString;
@@ -3665,7 +3709,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
3665
3709
  }>;
3666
3710
  type: Type$2.TLiteral<"toolCall">;
3667
3711
  }>, Type$2.TObject<{
3668
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
3669
3712
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
3670
3713
  callID: Type$2.TString;
3671
3714
  name: Type$2.TString;
@@ -3836,6 +3879,17 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
3836
3879
  retryAfterMs: Type$2.TOptional<Type$2.TNumber>;
3837
3880
  _tag: Type$2.TLiteral<"Unknown">;
3838
3881
  }>]>>;
3882
+ diagnostics: Type$2.TOptional<Type$2.TArray<Type$2.TObject<{
3883
+ type: Type$2.TString;
3884
+ timestamp: Type$2.TNumber;
3885
+ error: Type$2.TOptional<Type$2.TObject<{
3886
+ name: Type$2.TOptional<Type$2.TString>;
3887
+ message: Type$2.TString;
3888
+ stack: Type$2.TOptional<Type$2.TString>;
3889
+ code: Type$2.TOptional<Type$2.TUnion<[Type$2.TString, Type$2.TNumber]>>;
3890
+ }>>;
3891
+ details: Type$2.TOptional<Type$2.TRecord<"^.*$", Type$2.TUnknown>>;
3892
+ }>>>;
3839
3893
  time: Type$2.TObject<{
3840
3894
  created: Type$2.TNumber;
3841
3895
  completed: Type$2.TNumber;
@@ -3860,7 +3914,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
3860
3914
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
3861
3915
  thoughtSignature: Type$2.TOptional<Type$2.TString>;
3862
3916
  namespace: Type$2.TOptional<Type$2.TString>;
3863
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
3864
3917
  time: Type$2.TObject<{
3865
3918
  start: Type$2.TNumber;
3866
3919
  end: Type$2.TNumber;
@@ -3868,7 +3921,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
3868
3921
  }>, Type$2.TObject<{
3869
3922
  status: Type$2.TLiteral<"pending">;
3870
3923
  }>]>, Type$2.TObject<{
3871
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
3872
3924
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
3873
3925
  callID: Type$2.TString;
3874
3926
  name: Type$2.TString;
@@ -3893,7 +3945,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
3893
3945
  }>;
3894
3946
  type: Type$2.TLiteral<"toolCall">;
3895
3947
  }>, Type$2.TUnion<[Type$2.TObject<{
3896
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
3897
3948
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
3898
3949
  callID: Type$2.TString;
3899
3950
  name: Type$2.TString;
@@ -3919,7 +3970,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
3919
3970
  }>;
3920
3971
  type: Type$2.TLiteral<"toolCall">;
3921
3972
  }>, Type$2.TObject<{
3922
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
3923
3973
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
3924
3974
  callID: Type$2.TString;
3925
3975
  name: Type$2.TString;
@@ -3945,7 +3995,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
3945
3995
  }>;
3946
3996
  type: Type$2.TLiteral<"toolCall">;
3947
3997
  }>, Type$2.TObject<{
3948
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
3949
3998
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
3950
3999
  callID: Type$2.TString;
3951
4000
  name: Type$2.TString;
@@ -3971,7 +4020,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
3971
4020
  }>;
3972
4021
  type: Type$2.TLiteral<"toolCall">;
3973
4022
  }>, Type$2.TObject<{
3974
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
3975
4023
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
3976
4024
  callID: Type$2.TString;
3977
4025
  name: Type$2.TString;
@@ -4142,6 +4190,17 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
4142
4190
  retryAfterMs: Type$2.TOptional<Type$2.TNumber>;
4143
4191
  _tag: Type$2.TLiteral<"Unknown">;
4144
4192
  }>]>>;
4193
+ diagnostics: Type$2.TOptional<Type$2.TArray<Type$2.TObject<{
4194
+ type: Type$2.TString;
4195
+ timestamp: Type$2.TNumber;
4196
+ error: Type$2.TOptional<Type$2.TObject<{
4197
+ name: Type$2.TOptional<Type$2.TString>;
4198
+ message: Type$2.TString;
4199
+ stack: Type$2.TOptional<Type$2.TString>;
4200
+ code: Type$2.TOptional<Type$2.TUnion<[Type$2.TString, Type$2.TNumber]>>;
4201
+ }>>;
4202
+ details: Type$2.TOptional<Type$2.TRecord<"^.*$", Type$2.TUnknown>>;
4203
+ }>>>;
4145
4204
  time: Type$2.TObject<{
4146
4205
  created: Type$2.TNumber;
4147
4206
  completed: Type$2.TNumber;
@@ -4166,7 +4225,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
4166
4225
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
4167
4226
  thoughtSignature: Type$2.TOptional<Type$2.TString>;
4168
4227
  namespace: Type$2.TOptional<Type$2.TString>;
4169
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
4170
4228
  time: Type$2.TObject<{
4171
4229
  start: Type$2.TNumber;
4172
4230
  end: Type$2.TNumber;
@@ -4174,7 +4232,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
4174
4232
  }>, Type$2.TObject<{
4175
4233
  status: Type$2.TLiteral<"pending">;
4176
4234
  }>]>, Type$2.TObject<{
4177
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
4178
4235
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
4179
4236
  callID: Type$2.TString;
4180
4237
  name: Type$2.TString;
@@ -4199,7 +4256,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
4199
4256
  }>;
4200
4257
  type: Type$2.TLiteral<"toolCall">;
4201
4258
  }>, Type$2.TUnion<[Type$2.TObject<{
4202
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
4203
4259
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
4204
4260
  callID: Type$2.TString;
4205
4261
  name: Type$2.TString;
@@ -4225,7 +4281,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
4225
4281
  }>;
4226
4282
  type: Type$2.TLiteral<"toolCall">;
4227
4283
  }>, Type$2.TObject<{
4228
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
4229
4284
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
4230
4285
  callID: Type$2.TString;
4231
4286
  name: Type$2.TString;
@@ -4251,7 +4306,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
4251
4306
  }>;
4252
4307
  type: Type$2.TLiteral<"toolCall">;
4253
4308
  }>, Type$2.TObject<{
4254
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
4255
4309
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
4256
4310
  callID: Type$2.TString;
4257
4311
  name: Type$2.TString;
@@ -4277,7 +4331,6 @@ declare const LLMMessageEventSchema: Type$2.TUnion<[Type$2.TObject<{
4277
4331
  }>;
4278
4332
  type: Type$2.TLiteral<"toolCall">;
4279
4333
  }>, Type$2.TObject<{
4280
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
4281
4334
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
4282
4335
  callID: Type$2.TString;
4283
4336
  name: Type$2.TString;
@@ -4327,7 +4380,7 @@ type LLM = {
4327
4380
  };
4328
4381
  export declare const llm: LLM;
4329
4382
  declare namespace message_d_exports {
4330
- export { AssistantMessage, AssistantMessageSchema, ConstrainedSampling, ConstrainedSamplingSchema, Context, ContextSchema, GrammarVariants, GrammarVariantsSchema, ImageContent, ImageContentSchema, Message, MessageSchema, StopReason, StopReasonSchema, TextContent, TextContentSchema, ThinkingContent, ThinkingContentSchema, Tool, ToolAbortedSchema, ToolArguments, ToolCall, ToolCallAbortedPart, ToolCallAbortedPartSchema, ToolCallBaseSchema, ToolCallCompletedPart, ToolCallCompletedPartSchema, ToolCallErrorPart, ToolCallErrorPartSchema, ToolCallInFlight, ToolCallInFlightSchema, ToolCallPendingPart, ToolCallPendingPartSchema, ToolCallRunningPart, ToolCallRunningPartSchema, ToolCallSchema, ToolCallSkippedPart, ToolCallSkippedPartSchema, ToolCallTerminalPart, ToolCallTerminalPartSchema, ToolCompletedSchema, ToolErrorResult, ToolErrorSchema, ToolRunningPartial, ToolRunningSchema, ToolSchema, ToolSkippedSchema, ToolStatusEnum, ToolSuccessResult, Usage, UsageSchema, UserMessage, UserMessageSchema, createAssistantMessage, createMessageId, createUserMessage, defineTool, transformMessages };
4383
+ export { AssistantMessage, AssistantMessageDiagnostic, AssistantMessageDiagnosticSchema, AssistantMessageSchema, ConstrainedSampling, ConstrainedSamplingSchema, Context, ContextSchema, GrammarVariants, GrammarVariantsSchema, ImageContent, ImageContentSchema, Message, MessageSchema, StopReason, StopReasonSchema, SystemMessage, SystemMessageSchema, TextContent, TextContentSchema, ThinkingContent, ThinkingContentSchema, Tool, ToolAbortedSchema, ToolArguments, ToolCall, ToolCallAbortedPart, ToolCallAbortedPartSchema, ToolCallBaseSchema, ToolCallCompletedPart, ToolCallCompletedPartSchema, ToolCallErrorPart, ToolCallErrorPartSchema, ToolCallInFlight, ToolCallInFlightSchema, ToolCallPendingPart, ToolCallPendingPartSchema, ToolCallRunningPart, ToolCallRunningPartSchema, ToolCallSchema, ToolCallSkippedPart, ToolCallSkippedPartSchema, ToolCallTerminalPart, ToolCallTerminalPartSchema, ToolCompletedSchema, ToolErrorResult, ToolErrorSchema, ToolReference, ToolReferenceSchema, ToolRunningPartial, ToolRunningSchema, ToolSchema, ToolSkippedSchema, ToolStatusEnum, ToolSuccessResult, Usage, UsageSchema, UserMessage, UserMessageSchema, createAssistantMessage, createMessageId, createSystemMessage, createUserMessage, defineTool, omitImages, transformMessages };
4331
4384
  }
4332
4385
  declare const TextContentSchema: Type$2.TObject<{
4333
4386
  type: Type$2.TLiteral<"text">;
@@ -4358,8 +4411,6 @@ declare const ToolCallBaseSchema: Type$2.TObject<{
4358
4411
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
4359
4412
  thoughtSignature: Type$2.TOptional<Type$2.TString>;
4360
4413
  namespace: Type$2.TOptional<Type$2.TString>;
4361
- /** Names from Context.tools that became available after this tool result. */
4362
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
4363
4414
  time: Type$2.TObject<{
4364
4415
  start: Type$2.TNumber;
4365
4416
  end: Type$2.TNumber;
@@ -4497,8 +4548,6 @@ declare const ToolCallPendingPartSchema: Type$2.TIntersect<[Type$2.TObject<{
4497
4548
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
4498
4549
  thoughtSignature: Type$2.TOptional<Type$2.TString>;
4499
4550
  namespace: Type$2.TOptional<Type$2.TString>;
4500
- /** Names from Context.tools that became available after this tool result. */
4501
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
4502
4551
  time: Type$2.TObject<{
4503
4552
  start: Type$2.TNumber;
4504
4553
  end: Type$2.TNumber;
@@ -4507,7 +4556,6 @@ declare const ToolCallPendingPartSchema: Type$2.TIntersect<[Type$2.TObject<{
4507
4556
  status: Type$2.TLiteral<"pending">;
4508
4557
  }>]>;
4509
4558
  declare const ToolCallRunningPartSchema: Type$2.TObject<{
4510
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
4511
4559
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
4512
4560
  callID: Type$2.TString;
4513
4561
  name: Type$2.TString;
@@ -4533,7 +4581,6 @@ declare const ToolCallRunningPartSchema: Type$2.TObject<{
4533
4581
  type: Type$2.TLiteral<"toolCall">;
4534
4582
  }>;
4535
4583
  declare const ToolCallCompletedPartSchema: Type$2.TObject<{
4536
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
4537
4584
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
4538
4585
  callID: Type$2.TString;
4539
4586
  name: Type$2.TString;
@@ -4560,7 +4607,6 @@ declare const ToolCallCompletedPartSchema: Type$2.TObject<{
4560
4607
  type: Type$2.TLiteral<"toolCall">;
4561
4608
  }>;
4562
4609
  declare const ToolCallErrorPartSchema: Type$2.TObject<{
4563
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
4564
4610
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
4565
4611
  callID: Type$2.TString;
4566
4612
  name: Type$2.TString;
@@ -4587,7 +4633,6 @@ declare const ToolCallErrorPartSchema: Type$2.TObject<{
4587
4633
  type: Type$2.TLiteral<"toolCall">;
4588
4634
  }>;
4589
4635
  declare const ToolCallSkippedPartSchema: Type$2.TObject<{
4590
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
4591
4636
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
4592
4637
  callID: Type$2.TString;
4593
4638
  name: Type$2.TString;
@@ -4614,7 +4659,6 @@ declare const ToolCallSkippedPartSchema: Type$2.TObject<{
4614
4659
  type: Type$2.TLiteral<"toolCall">;
4615
4660
  }>;
4616
4661
  declare const ToolCallAbortedPartSchema: Type$2.TObject<{
4617
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
4618
4662
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
4619
4663
  callID: Type$2.TString;
4620
4664
  name: Type$2.TString;
@@ -4641,7 +4685,6 @@ declare const ToolCallAbortedPartSchema: Type$2.TObject<{
4641
4685
  type: Type$2.TLiteral<"toolCall">;
4642
4686
  }>;
4643
4687
  declare const ToolCallTerminalPartSchema: Type$2.TUnion<[Type$2.TObject<{
4644
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
4645
4688
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
4646
4689
  callID: Type$2.TString;
4647
4690
  name: Type$2.TString;
@@ -4667,7 +4710,6 @@ declare const ToolCallTerminalPartSchema: Type$2.TUnion<[Type$2.TObject<{
4667
4710
  }>;
4668
4711
  type: Type$2.TLiteral<"toolCall">;
4669
4712
  }>, Type$2.TObject<{
4670
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
4671
4713
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
4672
4714
  callID: Type$2.TString;
4673
4715
  name: Type$2.TString;
@@ -4693,7 +4735,6 @@ declare const ToolCallTerminalPartSchema: Type$2.TUnion<[Type$2.TObject<{
4693
4735
  }>;
4694
4736
  type: Type$2.TLiteral<"toolCall">;
4695
4737
  }>, Type$2.TObject<{
4696
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
4697
4738
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
4698
4739
  callID: Type$2.TString;
4699
4740
  name: Type$2.TString;
@@ -4719,7 +4760,6 @@ declare const ToolCallTerminalPartSchema: Type$2.TUnion<[Type$2.TObject<{
4719
4760
  }>;
4720
4761
  type: Type$2.TLiteral<"toolCall">;
4721
4762
  }>, Type$2.TObject<{
4722
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
4723
4763
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
4724
4764
  callID: Type$2.TString;
4725
4765
  name: Type$2.TString;
@@ -4759,8 +4799,6 @@ declare const ToolCallSchema: Type$2.TUnion<[Type$2.TIntersect<[Type$2.TObject<{
4759
4799
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
4760
4800
  thoughtSignature: Type$2.TOptional<Type$2.TString>;
4761
4801
  namespace: Type$2.TOptional<Type$2.TString>;
4762
- /** Names from Context.tools that became available after this tool result. */
4763
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
4764
4802
  time: Type$2.TObject<{
4765
4803
  start: Type$2.TNumber;
4766
4804
  end: Type$2.TNumber;
@@ -4768,7 +4806,6 @@ declare const ToolCallSchema: Type$2.TUnion<[Type$2.TIntersect<[Type$2.TObject<{
4768
4806
  }>, Type$2.TObject<{
4769
4807
  status: Type$2.TLiteral<"pending">;
4770
4808
  }>]>, Type$2.TObject<{
4771
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
4772
4809
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
4773
4810
  callID: Type$2.TString;
4774
4811
  name: Type$2.TString;
@@ -4793,7 +4830,6 @@ declare const ToolCallSchema: Type$2.TUnion<[Type$2.TIntersect<[Type$2.TObject<{
4793
4830
  }>;
4794
4831
  type: Type$2.TLiteral<"toolCall">;
4795
4832
  }>, Type$2.TUnion<[Type$2.TObject<{
4796
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
4797
4833
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
4798
4834
  callID: Type$2.TString;
4799
4835
  name: Type$2.TString;
@@ -4819,7 +4855,6 @@ declare const ToolCallSchema: Type$2.TUnion<[Type$2.TIntersect<[Type$2.TObject<{
4819
4855
  }>;
4820
4856
  type: Type$2.TLiteral<"toolCall">;
4821
4857
  }>, Type$2.TObject<{
4822
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
4823
4858
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
4824
4859
  callID: Type$2.TString;
4825
4860
  name: Type$2.TString;
@@ -4845,7 +4880,6 @@ declare const ToolCallSchema: Type$2.TUnion<[Type$2.TIntersect<[Type$2.TObject<{
4845
4880
  }>;
4846
4881
  type: Type$2.TLiteral<"toolCall">;
4847
4882
  }>, Type$2.TObject<{
4848
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
4849
4883
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
4850
4884
  callID: Type$2.TString;
4851
4885
  name: Type$2.TString;
@@ -4871,7 +4905,6 @@ declare const ToolCallSchema: Type$2.TUnion<[Type$2.TIntersect<[Type$2.TObject<{
4871
4905
  }>;
4872
4906
  type: Type$2.TLiteral<"toolCall">;
4873
4907
  }>, Type$2.TObject<{
4874
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
4875
4908
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
4876
4909
  callID: Type$2.TString;
4877
4910
  name: Type$2.TString;
@@ -4942,6 +4975,19 @@ declare const UserMessageSchema: Type$2.TObject<{
4942
4975
  }>]>>;
4943
4976
  }>;
4944
4977
  type UserMessage = Static$1<typeof UserMessageSchema>;
4978
+ /** Something aikit did on the caller's behalf while producing a message, such as a request retried in another shape. */
4979
+ declare const AssistantMessageDiagnosticSchema: Type$2.TObject<{
4980
+ type: Type$2.TString;
4981
+ timestamp: Type$2.TNumber;
4982
+ error: Type$2.TOptional<Type$2.TObject<{
4983
+ name: Type$2.TOptional<Type$2.TString>;
4984
+ message: Type$2.TString;
4985
+ stack: Type$2.TOptional<Type$2.TString>;
4986
+ code: Type$2.TOptional<Type$2.TUnion<[Type$2.TString, Type$2.TNumber]>>;
4987
+ }>>;
4988
+ details: Type$2.TOptional<Type$2.TRecord<"^.*$", Type$2.TUnknown>>;
4989
+ }>;
4990
+ type AssistantMessageDiagnostic = Static$1<typeof AssistantMessageDiagnosticSchema>;
4945
4991
  declare const AssistantMessageSchema: Type$2.TObject<{
4946
4992
  role: Type$2.TLiteral<"assistant">;
4947
4993
  protocol: Type$2.TUnion<[Type$2.TLiteral<"anthropic">, Type$2.TLiteral<"google">, Type$2.TLiteral<"google-vertex">, Type$2.TLiteral<"google-vertex-anthropic">, Type$2.TLiteral<"github-copilot">, Type$2.TLiteral<"openai">, Type$2.TLiteral<"openai-compatible">, Type$2.TLiteral<"openai-codex">, Type$2.TLiteral<"openrouter">, Type$2.TLiteral<"xai">]>;
@@ -5088,6 +5134,17 @@ declare const AssistantMessageSchema: Type$2.TObject<{
5088
5134
  retryAfterMs: Type$2.TOptional<Type$2.TNumber>;
5089
5135
  _tag: Type$2.TLiteral<"Unknown">;
5090
5136
  }>]>>;
5137
+ diagnostics: Type$2.TOptional<Type$2.TArray<Type$2.TObject<{
5138
+ type: Type$2.TString;
5139
+ timestamp: Type$2.TNumber;
5140
+ error: Type$2.TOptional<Type$2.TObject<{
5141
+ name: Type$2.TOptional<Type$2.TString>;
5142
+ message: Type$2.TString;
5143
+ stack: Type$2.TOptional<Type$2.TString>;
5144
+ code: Type$2.TOptional<Type$2.TUnion<[Type$2.TString, Type$2.TNumber]>>;
5145
+ }>>;
5146
+ details: Type$2.TOptional<Type$2.TRecord<"^.*$", Type$2.TUnknown>>;
5147
+ }>>>;
5091
5148
  time: Type$2.TObject<{
5092
5149
  created: Type$2.TNumber;
5093
5150
  completed: Type$2.TNumber;
@@ -5115,8 +5172,6 @@ declare const AssistantMessageSchema: Type$2.TObject<{
5115
5172
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
5116
5173
  thoughtSignature: Type$2.TOptional<Type$2.TString>;
5117
5174
  namespace: Type$2.TOptional<Type$2.TString>;
5118
- /** Names from Context.tools that became available after this tool result. */
5119
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
5120
5175
  time: Type$2.TObject<{
5121
5176
  start: Type$2.TNumber;
5122
5177
  end: Type$2.TNumber;
@@ -5124,7 +5179,6 @@ declare const AssistantMessageSchema: Type$2.TObject<{
5124
5179
  }>, Type$2.TObject<{
5125
5180
  status: Type$2.TLiteral<"pending">;
5126
5181
  }>]>, Type$2.TObject<{
5127
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
5128
5182
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
5129
5183
  callID: Type$2.TString;
5130
5184
  name: Type$2.TString;
@@ -5149,7 +5203,6 @@ declare const AssistantMessageSchema: Type$2.TObject<{
5149
5203
  }>;
5150
5204
  type: Type$2.TLiteral<"toolCall">;
5151
5205
  }>, Type$2.TUnion<[Type$2.TObject<{
5152
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
5153
5206
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
5154
5207
  callID: Type$2.TString;
5155
5208
  name: Type$2.TString;
@@ -5175,7 +5228,6 @@ declare const AssistantMessageSchema: Type$2.TObject<{
5175
5228
  }>;
5176
5229
  type: Type$2.TLiteral<"toolCall">;
5177
5230
  }>, Type$2.TObject<{
5178
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
5179
5231
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
5180
5232
  callID: Type$2.TString;
5181
5233
  name: Type$2.TString;
@@ -5201,7 +5253,6 @@ declare const AssistantMessageSchema: Type$2.TObject<{
5201
5253
  }>;
5202
5254
  type: Type$2.TLiteral<"toolCall">;
5203
5255
  }>, Type$2.TObject<{
5204
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
5205
5256
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
5206
5257
  callID: Type$2.TString;
5207
5258
  name: Type$2.TString;
@@ -5227,7 +5278,6 @@ declare const AssistantMessageSchema: Type$2.TObject<{
5227
5278
  }>;
5228
5279
  type: Type$2.TLiteral<"toolCall">;
5229
5280
  }>, Type$2.TObject<{
5230
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
5231
5281
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
5232
5282
  callID: Type$2.TString;
5233
5283
  name: Type$2.TString;
@@ -5258,7 +5308,159 @@ declare const AssistantMessageSchema: Type$2.TObject<{
5258
5308
  messageId: Type$2.TString;
5259
5309
  }>;
5260
5310
  type AssistantMessage = Static$1<typeof AssistantMessageSchema>;
5311
+ type UserMessageInit = Omit<UserMessage, "messageId"> & {
5312
+ messageId?: string;
5313
+ };
5314
+ type AssistantMessageInit = Omit<AssistantMessage, "messageId"> & {
5315
+ messageId?: string;
5316
+ };
5317
+ declare function createMessageId(): string;
5318
+ declare function createUserMessage(message: UserMessageInit): UserMessage;
5319
+ declare function createAssistantMessage(message: AssistantMessageInit): AssistantMessage;
5320
+ declare const GrammarVariantsSchema: Type$2.TObject<{
5321
+ openai_lark: Type$2.TOptional<Type$2.TString>;
5322
+ openai_regex: Type$2.TOptional<Type$2.TString>;
5323
+ }>;
5324
+ type GrammarVariants = Static$1<typeof GrammarVariantsSchema>;
5325
+ declare const ConstrainedSamplingSchema: Type$2.TUnion<[Type$2.TObject<{
5326
+ type: Type$2.TLiteral<"json_schema">;
5327
+ strict: Type$2.TUnion<[Type$2.TLiteral<"prefer">, Type$2.TLiteral<"require">]>;
5328
+ }>, Type$2.TObject<{
5329
+ type: Type$2.TLiteral<"grammar">;
5330
+ variants: Type$2.TObject<{
5331
+ openai_lark: Type$2.TOptional<Type$2.TString>;
5332
+ openai_regex: Type$2.TOptional<Type$2.TString>;
5333
+ }>;
5334
+ }>]>;
5335
+ type ConstrainedSampling = Static$1<typeof ConstrainedSamplingSchema>;
5336
+ /**
5337
+ * Generic tool definition with typed parameter schema.
5338
+ * Usage:
5339
+ *
5340
+ * const search = Message.defineTool({
5341
+ * name: "search",
5342
+ * description: "Search documents",
5343
+ * parameters: Type.Object({
5344
+ * query: Type.String(),
5345
+ * limit: Type.Optional(Type.Number()),
5346
+ * }),
5347
+ * });
5348
+ *
5349
+ * type SearchParams = Static<typeof search.parameters>;
5350
+ */
5351
+ declare const ToolSchema: Type$2.TObject<{
5352
+ name: Type$2.TString;
5353
+ description: Type$2.TString;
5354
+ parameters: Type$2.TUnsafe<TSchema$1>;
5355
+ constrainedSampling: Type$2.TOptional<Type$2.TUnion<[Type$2.TLiteral<false>, Type$2.TUnion<[Type$2.TObject<{
5356
+ type: Type$2.TLiteral<"json_schema">;
5357
+ strict: Type$2.TUnion<[Type$2.TLiteral<"prefer">, Type$2.TLiteral<"require">]>;
5358
+ }>, Type$2.TObject<{
5359
+ type: Type$2.TLiteral<"grammar">;
5360
+ variants: Type$2.TObject<{
5361
+ openai_lark: Type$2.TOptional<Type$2.TString>;
5362
+ openai_regex: Type$2.TOptional<Type$2.TString>;
5363
+ }>;
5364
+ }>]>]>>;
5365
+ }>;
5366
+ interface Tool<TParameters extends TSchema$1 = TSchema$1> {
5367
+ name: string;
5368
+ description: string;
5369
+ parameters: TParameters;
5370
+ /** How the provider constrains generated tool-call arguments (strict JSON schema or grammar).
5371
+ * used by convert tool.
5372
+ * */
5373
+ constrainedSampling?: false | ConstrainedSampling;
5374
+ }
5375
+ type ToolArguments<T extends Tool> = Static$1<T["parameters"]>;
5376
+ declare function defineTool<TParameters extends TSchema$1>(tool: Tool<TParameters>): Tool<TParameters>;
5377
+ declare const ToolReferenceSchema: Type$2.TObject<{
5378
+ name: Type$2.TString;
5379
+ }>;
5380
+ type ToolReference = Static$1<typeof ToolReferenceSchema>;
5381
+ /**
5382
+ * A change to the system prompt and tool set at one point in the transcript.
5383
+ *
5384
+ * `Context.systemPrompt` and `Context.tools` hold the prompt and tools at the start of the
5385
+ * conversation; each system message changes them from its position on. Replaying them in
5386
+ * order yields the current prompt and tools. A redefinition is a removal plus an addition of
5387
+ * the same name.
5388
+ */
5389
+ declare const SystemMessageSchema: Type$2.TObject<{
5390
+ messageId: Type$2.TString;
5391
+ role: Type$2.TLiteral<"system">;
5392
+ time: Type$2.TObject<{
5393
+ created: Type$2.TNumber;
5394
+ }>;
5395
+ /** Instructions that apply from this point on, after the earlier ones. */
5396
+ content: Type$2.TOptional<Type$2.TString>;
5397
+ /**
5398
+ * Named prompt sections rendered after the content. A later message replaces a section by
5399
+ * name, and `null` removes it. Keep each section self-delimiting (a tag) so the model can
5400
+ * relate an update to the original, and avoid integer-like names, which JSON reorders.
5401
+ */
5402
+ sections: Type$2.TOptional<Type$2.TRecord<"^.*$", Type$2.TUnion<[Type$2.TString, Type$2.TNull]>>>;
5403
+ /** Complete definitions of tools that become available at this point. */
5404
+ toolsAdded: Type$2.TOptional<Type$2.TArray<Type$2.TObject<{
5405
+ name: Type$2.TString;
5406
+ description: Type$2.TString;
5407
+ parameters: Type$2.TUnsafe<TSchema$1>;
5408
+ constrainedSampling: Type$2.TOptional<Type$2.TUnion<[Type$2.TLiteral<false>, Type$2.TUnion<[Type$2.TObject<{
5409
+ type: Type$2.TLiteral<"json_schema">;
5410
+ strict: Type$2.TUnion<[Type$2.TLiteral<"prefer">, Type$2.TLiteral<"require">]>;
5411
+ }>, Type$2.TObject<{
5412
+ type: Type$2.TLiteral<"grammar">;
5413
+ variants: Type$2.TObject<{
5414
+ openai_lark: Type$2.TOptional<Type$2.TString>;
5415
+ openai_regex: Type$2.TOptional<Type$2.TString>;
5416
+ }>;
5417
+ }>]>]>>;
5418
+ }>>>;
5419
+ /** Tools that stop being available at this point. */
5420
+ toolsRemoved: Type$2.TOptional<Type$2.TArray<Type$2.TObject<{
5421
+ name: Type$2.TString;
5422
+ }>>>;
5423
+ /** Caller data kept with the message; never sent to a provider. */
5424
+ metadata: Type$2.TOptional<Type$2.TRecord<"^.*$", Type$2.TUnknown>>;
5425
+ }>;
5426
+ type SystemMessage = Static$1<typeof SystemMessageSchema>;
5261
5427
  declare const MessageSchema: Type$2.TUnion<[Type$2.TObject<{
5428
+ messageId: Type$2.TString;
5429
+ role: Type$2.TLiteral<"system">;
5430
+ time: Type$2.TObject<{
5431
+ created: Type$2.TNumber;
5432
+ }>;
5433
+ /** Instructions that apply from this point on, after the earlier ones. */
5434
+ content: Type$2.TOptional<Type$2.TString>;
5435
+ /**
5436
+ * Named prompt sections rendered after the content. A later message replaces a section by
5437
+ * name, and `null` removes it. Keep each section self-delimiting (a tag) so the model can
5438
+ * relate an update to the original, and avoid integer-like names, which JSON reorders.
5439
+ */
5440
+ sections: Type$2.TOptional<Type$2.TRecord<"^.*$", Type$2.TUnion<[Type$2.TString, Type$2.TNull]>>>;
5441
+ /** Complete definitions of tools that become available at this point. */
5442
+ toolsAdded: Type$2.TOptional<Type$2.TArray<Type$2.TObject<{
5443
+ name: Type$2.TString;
5444
+ description: Type$2.TString;
5445
+ parameters: Type$2.TUnsafe<TSchema$1>;
5446
+ constrainedSampling: Type$2.TOptional<Type$2.TUnion<[Type$2.TLiteral<false>, Type$2.TUnion<[Type$2.TObject<{
5447
+ type: Type$2.TLiteral<"json_schema">;
5448
+ strict: Type$2.TUnion<[Type$2.TLiteral<"prefer">, Type$2.TLiteral<"require">]>;
5449
+ }>, Type$2.TObject<{
5450
+ type: Type$2.TLiteral<"grammar">;
5451
+ variants: Type$2.TObject<{
5452
+ openai_lark: Type$2.TOptional<Type$2.TString>;
5453
+ openai_regex: Type$2.TOptional<Type$2.TString>;
5454
+ }>;
5455
+ }>]>]>>;
5456
+ }>>>;
5457
+ /** Tools that stop being available at this point. */
5458
+ toolsRemoved: Type$2.TOptional<Type$2.TArray<Type$2.TObject<{
5459
+ name: Type$2.TString;
5460
+ }>>>;
5461
+ /** Caller data kept with the message; never sent to a provider. */
5462
+ metadata: Type$2.TOptional<Type$2.TRecord<"^.*$", Type$2.TUnknown>>;
5463
+ }>, Type$2.TObject<{
5262
5464
  messageId: Type$2.TString;
5263
5465
  role: Type$2.TLiteral<"user">;
5264
5466
  time: Type$2.TObject<{
@@ -5419,6 +5621,17 @@ declare const MessageSchema: Type$2.TUnion<[Type$2.TObject<{
5419
5621
  retryAfterMs: Type$2.TOptional<Type$2.TNumber>;
5420
5622
  _tag: Type$2.TLiteral<"Unknown">;
5421
5623
  }>]>>;
5624
+ diagnostics: Type$2.TOptional<Type$2.TArray<Type$2.TObject<{
5625
+ type: Type$2.TString;
5626
+ timestamp: Type$2.TNumber;
5627
+ error: Type$2.TOptional<Type$2.TObject<{
5628
+ name: Type$2.TOptional<Type$2.TString>;
5629
+ message: Type$2.TString;
5630
+ stack: Type$2.TOptional<Type$2.TString>;
5631
+ code: Type$2.TOptional<Type$2.TUnion<[Type$2.TString, Type$2.TNumber]>>;
5632
+ }>>;
5633
+ details: Type$2.TOptional<Type$2.TRecord<"^.*$", Type$2.TUnknown>>;
5634
+ }>>>;
5422
5635
  time: Type$2.TObject<{
5423
5636
  created: Type$2.TNumber;
5424
5637
  completed: Type$2.TNumber;
@@ -5446,8 +5659,6 @@ declare const MessageSchema: Type$2.TUnion<[Type$2.TObject<{
5446
5659
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
5447
5660
  thoughtSignature: Type$2.TOptional<Type$2.TString>;
5448
5661
  namespace: Type$2.TOptional<Type$2.TString>;
5449
- /** Names from Context.tools that became available after this tool result. */
5450
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
5451
5662
  time: Type$2.TObject<{
5452
5663
  start: Type$2.TNumber;
5453
5664
  end: Type$2.TNumber;
@@ -5455,7 +5666,6 @@ declare const MessageSchema: Type$2.TUnion<[Type$2.TObject<{
5455
5666
  }>, Type$2.TObject<{
5456
5667
  status: Type$2.TLiteral<"pending">;
5457
5668
  }>]>, Type$2.TObject<{
5458
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
5459
5669
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
5460
5670
  callID: Type$2.TString;
5461
5671
  name: Type$2.TString;
@@ -5480,7 +5690,6 @@ declare const MessageSchema: Type$2.TUnion<[Type$2.TObject<{
5480
5690
  }>;
5481
5691
  type: Type$2.TLiteral<"toolCall">;
5482
5692
  }>, Type$2.TUnion<[Type$2.TObject<{
5483
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
5484
5693
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
5485
5694
  callID: Type$2.TString;
5486
5695
  name: Type$2.TString;
@@ -5506,7 +5715,6 @@ declare const MessageSchema: Type$2.TUnion<[Type$2.TObject<{
5506
5715
  }>;
5507
5716
  type: Type$2.TLiteral<"toolCall">;
5508
5717
  }>, Type$2.TObject<{
5509
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
5510
5718
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
5511
5719
  callID: Type$2.TString;
5512
5720
  name: Type$2.TString;
@@ -5532,7 +5740,6 @@ declare const MessageSchema: Type$2.TUnion<[Type$2.TObject<{
5532
5740
  }>;
5533
5741
  type: Type$2.TLiteral<"toolCall">;
5534
5742
  }>, Type$2.TObject<{
5535
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
5536
5743
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
5537
5744
  callID: Type$2.TString;
5538
5745
  name: Type$2.TString;
@@ -5558,7 +5765,6 @@ declare const MessageSchema: Type$2.TUnion<[Type$2.TObject<{
5558
5765
  }>;
5559
5766
  type: Type$2.TLiteral<"toolCall">;
5560
5767
  }>, Type$2.TObject<{
5561
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
5562
5768
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
5563
5769
  callID: Type$2.TString;
5564
5770
  name: Type$2.TString;
@@ -5589,75 +5795,50 @@ declare const MessageSchema: Type$2.TUnion<[Type$2.TObject<{
5589
5795
  messageId: Type$2.TString;
5590
5796
  }>]>;
5591
5797
  type Message = Static$1<typeof MessageSchema>;
5592
- type UserMessageInit = Omit<UserMessage, "messageId"> & {
5593
- messageId?: string;
5594
- };
5595
- type AssistantMessageInit = Omit<AssistantMessage, "messageId"> & {
5798
+ type SystemMessageInit = Omit<SystemMessage, "messageId" | "role" | "time"> & {
5596
5799
  messageId?: string;
5800
+ time?: SystemMessage["time"];
5597
5801
  };
5598
- declare function createMessageId(): string;
5599
- declare function createUserMessage(message: UserMessageInit): UserMessage;
5600
- declare function createAssistantMessage(message: AssistantMessageInit): AssistantMessage;
5601
- declare const GrammarVariantsSchema: Type$2.TObject<{
5602
- openai_lark: Type$2.TOptional<Type$2.TString>;
5603
- openai_regex: Type$2.TOptional<Type$2.TString>;
5604
- }>;
5605
- type GrammarVariants = Static$1<typeof GrammarVariantsSchema>;
5606
- declare const ConstrainedSamplingSchema: Type$2.TUnion<[Type$2.TObject<{
5607
- type: Type$2.TLiteral<"json_schema">;
5608
- strict: Type$2.TUnion<[Type$2.TLiteral<"prefer">, Type$2.TLiteral<"require">]>;
5609
- }>, Type$2.TObject<{
5610
- type: Type$2.TLiteral<"grammar">;
5611
- variants: Type$2.TObject<{
5612
- openai_lark: Type$2.TOptional<Type$2.TString>;
5613
- openai_regex: Type$2.TOptional<Type$2.TString>;
5614
- }>;
5615
- }>]>;
5616
- type ConstrainedSampling = Static$1<typeof ConstrainedSamplingSchema>;
5617
- /**
5618
- * Generic tool definition with typed parameter schema.
5619
- * Usage:
5620
- *
5621
- * const search = Message.defineTool({
5622
- * name: "search",
5623
- * description: "Search documents",
5624
- * parameters: Type.Object({
5625
- * query: Type.String(),
5626
- * limit: Type.Optional(Type.Number()),
5627
- * }),
5628
- * });
5629
- *
5630
- * type SearchParams = Static<typeof search.parameters>;
5631
- */
5632
- declare const ToolSchema: Type$2.TObject<{
5633
- name: Type$2.TString;
5634
- description: Type$2.TString;
5635
- parameters: Type$2.TUnsafe<TSchema$1>;
5636
- constrainedSampling: Type$2.TOptional<Type$2.TUnion<[Type$2.TLiteral<false>, Type$2.TUnion<[Type$2.TObject<{
5637
- type: Type$2.TLiteral<"json_schema">;
5638
- strict: Type$2.TUnion<[Type$2.TLiteral<"prefer">, Type$2.TLiteral<"require">]>;
5639
- }>, Type$2.TObject<{
5640
- type: Type$2.TLiteral<"grammar">;
5641
- variants: Type$2.TObject<{
5642
- openai_lark: Type$2.TOptional<Type$2.TString>;
5643
- openai_regex: Type$2.TOptional<Type$2.TString>;
5644
- }>;
5645
- }>]>]>>;
5646
- }>;
5647
- interface Tool<TParameters extends TSchema$1 = TSchema$1> {
5648
- name: string;
5649
- description: string;
5650
- parameters: TParameters;
5651
- /** How the provider constrains generated tool-call arguments (strict JSON schema or grammar).
5652
- * used by convert tool.
5653
- * */
5654
- constrainedSampling?: false | ConstrainedSampling;
5655
- }
5656
- type ToolArguments<T extends Tool> = Static$1<T["parameters"]>;
5657
- declare function defineTool<TParameters extends TSchema$1>(tool: Tool<TParameters>): Tool<TParameters>;
5802
+ declare function createSystemMessage(message: SystemMessageInit): SystemMessage;
5658
5803
  declare const ContextSchema: Type$2.TObject<{
5659
5804
  systemPrompt: Type$2.TOptional<Type$2.TString>;
5660
5805
  messages: Type$2.TArray<Type$2.TUnion<[Type$2.TObject<{
5806
+ messageId: Type$2.TString;
5807
+ role: Type$2.TLiteral<"system">;
5808
+ time: Type$2.TObject<{
5809
+ created: Type$2.TNumber;
5810
+ }>;
5811
+ /** Instructions that apply from this point on, after the earlier ones. */
5812
+ content: Type$2.TOptional<Type$2.TString>;
5813
+ /**
5814
+ * Named prompt sections rendered after the content. A later message replaces a section by
5815
+ * name, and `null` removes it. Keep each section self-delimiting (a tag) so the model can
5816
+ * relate an update to the original, and avoid integer-like names, which JSON reorders.
5817
+ */
5818
+ sections: Type$2.TOptional<Type$2.TRecord<"^.*$", Type$2.TUnion<[Type$2.TString, Type$2.TNull]>>>;
5819
+ /** Complete definitions of tools that become available at this point. */
5820
+ toolsAdded: Type$2.TOptional<Type$2.TArray<Type$2.TObject<{
5821
+ name: Type$2.TString;
5822
+ description: Type$2.TString;
5823
+ parameters: Type$2.TUnsafe<TSchema$1>;
5824
+ constrainedSampling: Type$2.TOptional<Type$2.TUnion<[Type$2.TLiteral<false>, Type$2.TUnion<[Type$2.TObject<{
5825
+ type: Type$2.TLiteral<"json_schema">;
5826
+ strict: Type$2.TUnion<[Type$2.TLiteral<"prefer">, Type$2.TLiteral<"require">]>;
5827
+ }>, Type$2.TObject<{
5828
+ type: Type$2.TLiteral<"grammar">;
5829
+ variants: Type$2.TObject<{
5830
+ openai_lark: Type$2.TOptional<Type$2.TString>;
5831
+ openai_regex: Type$2.TOptional<Type$2.TString>;
5832
+ }>;
5833
+ }>]>]>>;
5834
+ }>>>;
5835
+ /** Tools that stop being available at this point. */
5836
+ toolsRemoved: Type$2.TOptional<Type$2.TArray<Type$2.TObject<{
5837
+ name: Type$2.TString;
5838
+ }>>>;
5839
+ /** Caller data kept with the message; never sent to a provider. */
5840
+ metadata: Type$2.TOptional<Type$2.TRecord<"^.*$", Type$2.TUnknown>>;
5841
+ }>, Type$2.TObject<{
5661
5842
  messageId: Type$2.TString;
5662
5843
  role: Type$2.TLiteral<"user">;
5663
5844
  time: Type$2.TObject<{
@@ -5818,6 +5999,17 @@ declare const ContextSchema: Type$2.TObject<{
5818
5999
  retryAfterMs: Type$2.TOptional<Type$2.TNumber>;
5819
6000
  _tag: Type$2.TLiteral<"Unknown">;
5820
6001
  }>]>>;
6002
+ diagnostics: Type$2.TOptional<Type$2.TArray<Type$2.TObject<{
6003
+ type: Type$2.TString;
6004
+ timestamp: Type$2.TNumber;
6005
+ error: Type$2.TOptional<Type$2.TObject<{
6006
+ name: Type$2.TOptional<Type$2.TString>;
6007
+ message: Type$2.TString;
6008
+ stack: Type$2.TOptional<Type$2.TString>;
6009
+ code: Type$2.TOptional<Type$2.TUnion<[Type$2.TString, Type$2.TNumber]>>;
6010
+ }>>;
6011
+ details: Type$2.TOptional<Type$2.TRecord<"^.*$", Type$2.TUnknown>>;
6012
+ }>>>;
5821
6013
  time: Type$2.TObject<{
5822
6014
  created: Type$2.TNumber;
5823
6015
  completed: Type$2.TNumber;
@@ -5845,8 +6037,6 @@ declare const ContextSchema: Type$2.TObject<{
5845
6037
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
5846
6038
  thoughtSignature: Type$2.TOptional<Type$2.TString>;
5847
6039
  namespace: Type$2.TOptional<Type$2.TString>;
5848
- /** Names from Context.tools that became available after this tool result. */
5849
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
5850
6040
  time: Type$2.TObject<{
5851
6041
  start: Type$2.TNumber;
5852
6042
  end: Type$2.TNumber;
@@ -5854,7 +6044,6 @@ declare const ContextSchema: Type$2.TObject<{
5854
6044
  }>, Type$2.TObject<{
5855
6045
  status: Type$2.TLiteral<"pending">;
5856
6046
  }>]>, Type$2.TObject<{
5857
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
5858
6047
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
5859
6048
  callID: Type$2.TString;
5860
6049
  name: Type$2.TString;
@@ -5879,7 +6068,6 @@ declare const ContextSchema: Type$2.TObject<{
5879
6068
  }>;
5880
6069
  type: Type$2.TLiteral<"toolCall">;
5881
6070
  }>, Type$2.TUnion<[Type$2.TObject<{
5882
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
5883
6071
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
5884
6072
  callID: Type$2.TString;
5885
6073
  name: Type$2.TString;
@@ -5905,7 +6093,6 @@ declare const ContextSchema: Type$2.TObject<{
5905
6093
  }>;
5906
6094
  type: Type$2.TLiteral<"toolCall">;
5907
6095
  }>, Type$2.TObject<{
5908
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
5909
6096
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
5910
6097
  callID: Type$2.TString;
5911
6098
  name: Type$2.TString;
@@ -5931,7 +6118,6 @@ declare const ContextSchema: Type$2.TObject<{
5931
6118
  }>;
5932
6119
  type: Type$2.TLiteral<"toolCall">;
5933
6120
  }>, Type$2.TObject<{
5934
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
5935
6121
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
5936
6122
  callID: Type$2.TString;
5937
6123
  name: Type$2.TString;
@@ -5957,7 +6143,6 @@ declare const ContextSchema: Type$2.TObject<{
5957
6143
  }>;
5958
6144
  type: Type$2.TLiteral<"toolCall">;
5959
6145
  }>, Type$2.TObject<{
5960
- addedToolNames: Type$2.TOptional<Type$2.TArray<Type$2.TString>>;
5961
6146
  arguments: Type$2.TRecord<"^.*$", Type$2.TAny>;
5962
6147
  callID: Type$2.TString;
5963
6148
  name: Type$2.TString;
@@ -6002,8 +6187,25 @@ declare const ContextSchema: Type$2.TObject<{
6002
6187
  }>;
6003
6188
  }>]>]>>;
6004
6189
  }>>>;
6190
+ /** Tools a later system message may add, for transports that must declare every tool up front. */
6191
+ deferredTools: Type$2.TOptional<Type$2.TArray<Type$2.TObject<{
6192
+ name: Type$2.TString;
6193
+ description: Type$2.TString;
6194
+ parameters: Type$2.TUnsafe<TSchema$1>;
6195
+ constrainedSampling: Type$2.TOptional<Type$2.TUnion<[Type$2.TLiteral<false>, Type$2.TUnion<[Type$2.TObject<{
6196
+ type: Type$2.TLiteral<"json_schema">;
6197
+ strict: Type$2.TUnion<[Type$2.TLiteral<"prefer">, Type$2.TLiteral<"require">]>;
6198
+ }>, Type$2.TObject<{
6199
+ type: Type$2.TLiteral<"grammar">;
6200
+ variants: Type$2.TObject<{
6201
+ openai_lark: Type$2.TOptional<Type$2.TString>;
6202
+ openai_regex: Type$2.TOptional<Type$2.TString>;
6203
+ }>;
6204
+ }>]>]>>;
6205
+ }>>>;
6005
6206
  }>;
6006
6207
  type Context = Static$1<typeof ContextSchema>;
6208
+ declare function omitImages(content: (TextContent | ImageContent)[], placeholder: string): TextContent[];
6007
6209
  declare function transformMessages<TProtocol extends KnownProviderEnum>(messages: Message[], model: TModel<TProtocol>, normalizeToolCallId?: (id: string, model: TModel<TProtocol>, source: AssistantMessage) => string): Message[];
6008
6210
  //#endregion
6009
6211
  //#region src/utils/eventstream.d.ts
@@ -6027,6 +6229,30 @@ declare class AssistantMessageEventStream extends EventStream<LLMMessageEvent, A
6027
6229
  /** Factory function for AssistantMessageEventStream (for use in extensions) */
6028
6230
  export declare function createAssistantMessageEventStream(): AssistantMessageEventStream;
6029
6231
  //#endregion
6232
+ //#region src/providers/responses/model.d.ts
6233
+ type ResponsesServiceTier = "auto" | "default" | "flex" | "scale" | "priority";
6234
+ type ResponsesCompatibility = {
6235
+ /** Internal transport capability derived from the model's input modalities. */
6236
+ supportsImages?: boolean;
6237
+ };
6238
+ /**
6239
+ * Per-call options, passed via `providerOptions[<provider>]`.
6240
+ */
6241
+ type ResponsesLanguageModelOptions = {
6242
+ /** Reasoning effort forwarded as `reasoning.effort`. */
6243
+ reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | (string & {});
6244
+ /** Reasoning summary verbosity; defaults to `auto` when an effort is set. */
6245
+ reasoningSummary?: "auto" | "concise" | "detailed" | "off" | "on" | null;
6246
+ /** Output text verbosity; defaults to the backend's `request.textVerbosity`. */
6247
+ textVerbosity?: "low" | "medium" | "high";
6248
+ serviceTier?: ResponsesServiceTier;
6249
+ /**
6250
+ * The string input property of each grammar tool the conversation declared, including tools
6251
+ * since removed, so their earlier calls replay as grammar calls. The current tools win.
6252
+ */
6253
+ grammarToolInputProperties?: Record<string, string>;
6254
+ };
6255
+ //#endregion
6030
6256
  //#region src/providers/github-copilot/copilot-headers.d.ts
6031
6257
  /** `X-Interaction-Type` is `conversation-{type}`; only `agent` is wired today. */
6032
6258
  type GitHubCopilotInteractionType = "agent" | "subagent" | "background" | "compaction";
@@ -6042,7 +6268,7 @@ interface GitHubCopilotProvider extends ProviderV4 {
6042
6268
  /** `POST /chat/completions` — Gemini, Kimi, and other third-party models. */
6043
6269
  chat(modelId: string): LanguageModelV4;
6044
6270
  /** `POST /responses` — GPT, Grok, OSWE, and MAI models. */
6045
- responses(modelId: string): LanguageModelV4;
6271
+ responses(modelId: string): LanguageModelV3;
6046
6272
  /** `POST /v1/messages` — Claude models. */
6047
6273
  messages(modelId: string): LanguageModelV4;
6048
6274
  }
@@ -6066,41 +6292,18 @@ interface GitHubCopilotProviderSettings {
6066
6292
  interactionType?: GitHubCopilotInteractionType;
6067
6293
  /** Forwarded to the Chat Completions adapter only. */
6068
6294
  transformRequestBody?: (body: Record<string, unknown>) => Record<string, unknown>;
6295
+ /** Sent as `prompt_cache_key` on Responses requests. */
6296
+ promptCacheKey?: string;
6297
+ /** Responses model capabilities supplied by aikit; absent flags are disabled. */
6298
+ compat?: ResponsesCompatibility;
6069
6299
  }
6070
6300
  export declare function createGitHubCopilot(options?: GitHubCopilotProviderSettings): GitHubCopilotProvider;
6071
6301
  export declare const githubCopilot: GitHubCopilotProvider;
6072
6302
  //#endregion
6073
- //#region src/providers/openai-codex/codex-language-model.d.ts
6303
+ //#region src/providers/openai-codex/codex-provider.d.ts
6074
6304
  type OpenAICodexModelId = "gpt-5.3-codex-spark" | "gpt-5.4" | "gpt-5.4-mini" | "gpt-5.5" | "gpt-5.6-luna" | "gpt-5.6-sol" | "gpt-5.6-terra" | (string & {});
6075
- type OpenAICodexServiceTier = "auto" | "default" | "flex" | "scale" | "priority";
6076
- type OpenAICodexCompatibility = {
6077
- supportsToolSearch?: boolean;
6078
- supportsAdditionalTools?: boolean;
6079
- supportsStrictMode?: boolean;
6080
- supportsOpenAIGrammarTools?: boolean;
6081
- /** Internal transport capability derived from the model's input modalities. */
6082
- supportsImages?: boolean;
6083
- };
6084
- /**
6085
- * Per-call options, passed via `providerOptions["openai-codex"]`.
6086
- */
6087
- type OpenAICodexLanguageModelOptions = {
6088
- /** Reasoning effort forwarded as `reasoning.effort`. */
6089
- reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | (string & {});
6090
- /** Reasoning summary verbosity; defaults to `auto` when an effort is set. */
6091
- reasoningSummary?: "auto" | "concise" | "detailed" | "off" | "on" | null;
6092
- /** Output text verbosity; defaults to `low`. */
6093
- textVerbosity?: "low" | "medium" | "high";
6094
- serviceTier?: OpenAICodexServiceTier;
6095
- };
6096
- //#endregion
6097
- //#region src/providers/openai-codex/codex-tools.d.ts
6098
- type OpenAICodexGrammarConstraint = {
6099
- type: "grammar";
6100
- format: "lark" | "regex";
6101
- definition: string;
6102
- inputProperty: string;
6103
- };
6305
+ type OpenAICodexCompatibility = ResponsesCompatibility;
6306
+ /** Tool helpers for Responses-only tool kinds. */
6104
6307
  export declare const openAICodexTools: {
6105
6308
  custom<TParameters extends TSchema$1>(args: {
6106
6309
  name: string;
@@ -6113,8 +6316,6 @@ export declare const openAICodexTools: {
6113
6316
  };
6114
6317
  }): Tool<TParameters>;
6115
6318
  };
6116
- //#endregion
6117
- //#region src/providers/openai-codex/codex-provider.d.ts
6118
6319
  interface OpenAICodexProvider extends ProviderV3 {
6119
6320
  (modelId: OpenAICodexModelId): LanguageModelV3;
6120
6321
  languageModel(modelId: OpenAICodexModelId): LanguageModelV3;
@@ -6145,7 +6346,7 @@ interface OpenAICodexProviderSettings {
6145
6346
  /** Session id used for request identity, the `session-id` header, and prompt cache affinity. */
6146
6347
  sessionId?: string;
6147
6348
  /** Default service tier for requests. */
6148
- serviceTier?: OpenAICodexServiceTier;
6349
+ serviceTier?: ResponsesServiceTier;
6149
6350
  /** `originator` header value; defaults to `codework`. */
6150
6351
  originator?: string;
6151
6352
  /** Model capabilities supplied by aikit or the direct caller; absent flags are disabled. */
@@ -6157,6 +6358,14 @@ export declare function createOpenAICodex(options?: OpenAICodexProviderSettings)
6157
6358
  */
6158
6359
  export declare const openaiCodex: OpenAICodexProvider;
6159
6360
  //#endregion
6361
+ //#region src/providers/responses/tools.d.ts
6362
+ type ResponsesGrammarConstraint = {
6363
+ type: "grammar";
6364
+ format: "lark" | "regex";
6365
+ definition: string;
6366
+ inputProperty: string;
6367
+ };
6368
+ //#endregion
6160
6369
  //#region src/llm/options.d.ts
6161
6370
  type ProviderOptionBag = Record<string, Record<string, unknown> | undefined>;
6162
6371
  type AISDKOptions<TFactoryOptions, TProviderOptions extends ProviderOptionBag = ProviderOptionBag> = CommonOptions & {
@@ -6171,7 +6380,7 @@ type AISDKOptions<TFactoryOptions, TProviderOptions extends ProviderOptionBag =
6171
6380
  type OpenAILanguageOptions = OpenAILanguageModelResponsesOptions | OpenAILanguageModelChatOptions | OpenAILanguageModelCompletionOptions;
6172
6381
  type OpenAICompatibleLanguageOptions = OpenAICompatibleLanguageModelChatOptions | OpenAICompatibleLanguageModelCompletionOptions;
6173
6382
  type XaiLanguageOptions = XaiLanguageModelResponsesOptions;
6174
- type GitHubCopilotLanguageOptions = AnthropicLanguageModelOptions | OpenAILanguageModelResponsesOptions | OpenAICompatibleLanguageModelChatOptions;
6383
+ type GitHubCopilotLanguageOptions = AnthropicLanguageModelOptions | ResponsesLanguageModelOptions | OpenAICompatibleLanguageModelChatOptions;
6175
6384
  type OpenAIOptions = AISDKOptions<OpenAIProviderSettings, {
6176
6385
  openai?: OpenAILanguageOptions;
6177
6386
  }>;
@@ -6187,7 +6396,7 @@ type OpenAICompatibleOptions = AISDKOptions<OpenAICompatibleProviderSettings, {
6187
6396
  "openai-compatible"?: OpenAICompatibleLanguageOptions;
6188
6397
  }>;
6189
6398
  type OpenAICodexOptions = AISDKOptions<OpenAICodexProviderSettings, {
6190
- "openai-codex"?: OpenAICodexLanguageModelOptions;
6399
+ "openai-codex"?: ResponsesLanguageModelOptions;
6191
6400
  }>;
6192
6401
  type GitHubCopilotOptions = AISDKOptions<GitHubCopilotProviderSettings, {
6193
6402
  "github-copilot"?: GitHubCopilotLanguageOptions;
@@ -7456,6 +7665,100 @@ type ApiKeyProvider = {
7456
7665
  };
7457
7666
  /** The provider's API key from the environment, checking its `key` then each `env` name. */
7458
7667
  export declare function getEnvApiKey(provider: ApiKeyProvider): string | undefined;
7668
+ declare namespace transcript_d_exports {
7669
+ export { ToolStateChanges, TranscriptPrompt, TranscriptToolSupport, TranscriptTools, declarationsEqual, diffSections, getCurrentSections, getCurrentSystemPrompt, getCurrentTools, getDeclaredTools, getToolStateChanges, renderSystemPrompt, renderSystemPromptUpdate, resolveTranscriptPrompt, resolveTranscriptTools, toToolDeclaration };
7670
+ }
7671
+ type Transcript = Pick<Context, "systemPrompt" | "tools" | "messages">;
7672
+ type PromptChange = Pick<SystemMessage, "content" | "sections">;
7673
+ /** Render a system message as a complete prompt: its content followed by its sections. */
7674
+ declare function renderSystemPrompt(message: PromptChange): string;
7675
+ /**
7676
+ * Render a later system message sent in place. Section changes are framed by name so the
7677
+ * model can relate them to the leading prompt.
7678
+ */
7679
+ declare function renderSystemPromptUpdate(message: PromptChange): string;
7680
+ /**
7681
+ * The sections after every transcript change in order: replaced by name, removed by `null`, and
7682
+ * a removed section added again goes last.
7683
+ */
7684
+ declare function getCurrentSections(messages: readonly Message[]): Record<string, string>;
7685
+ /**
7686
+ * The patch that brings `previous` sections to `current`, `null` removing one; `undefined` when
7687
+ * they match.
7688
+ */
7689
+ declare function diffSections(previous: Readonly<Record<string, string>>, current: Readonly<Record<string, string>>): Record<string, string | null> | undefined;
7690
+ /** The prompt after every transcript change in order: content accumulates, sections as {@link getCurrentSections}. */
7691
+ declare function getCurrentSystemPrompt(context: Pick<Context, "systemPrompt" | "messages">): string;
7692
+ interface TranscriptPrompt {
7693
+ /** The prompt sent at the head of the request. */
7694
+ systemPrompt: string;
7695
+ /**
7696
+ * Number of leading transcript system messages whose prompt changes `systemPrompt` already
7697
+ * holds. Every later system message sends its changes in place.
7698
+ */
7699
+ foldedSystemMessages: number;
7700
+ }
7701
+ /**
7702
+ * Split the prompt between the head of the request and in-place updates.
7703
+ *
7704
+ * In place, `Context.systemPrompt` leads; without one (and without initial tools), a leading
7705
+ * system message is the prompt. Every other system message is an update. Otherwise the head
7706
+ * holds the current prompt and no update is sent, which costs the cached prefix on a change.
7707
+ */
7708
+ declare function resolveTranscriptPrompt(context: Transcript, inPlace: boolean): TranscriptPrompt;
7709
+ /** The tools available after applying every transcript change in order. */
7710
+ declare function getCurrentTools(context: Transcript): Tool[];
7711
+ /**
7712
+ * Every tool the transcript ever declared, the latest definition of each name winning. Removals
7713
+ * are ignored: a removed tool's earlier calls still replay in the form it was called in.
7714
+ */
7715
+ declare function getDeclaredTools(context: Transcript): Tool[];
7716
+ /** Strip a tool to what the model sees, for comparison and persistence. */
7717
+ declare function toToolDeclaration(tool: Tool): Tool;
7718
+ /**
7719
+ * Whether two tools declare the same interface to the model. The JSON round trip in
7720
+ * {@link toToolDeclaration} drops typebox symbol keys and `undefined` fields and fixes the key
7721
+ * order, so comparing the serialized declarations is exact.
7722
+ */
7723
+ declare function declarationsEqual(left: Tool, right: Tool): boolean;
7724
+ interface ToolStateChanges {
7725
+ toolsAdded: Tool[];
7726
+ toolsRemoved: ToolReference[];
7727
+ }
7728
+ /** Compare two complete tool states. A changed definition is a removal followed by an addition. */
7729
+ declare function getToolStateChanges(previous: readonly Tool[], current: readonly Tool[]): ToolStateChanges;
7730
+ /**
7731
+ * How a transport can express tool changes after the first request.
7732
+ *
7733
+ * - `"none"`: only the top-level tool list exists; it always holds the current tools.
7734
+ * - `"additions"`: tools can be added at a later message, but not removed or redefined.
7735
+ * - `"changes"`: every tool, including the initial ones, is declared in place, and a later
7736
+ * declaration under the same name replaces the earlier one. Removals are not expressible on
7737
+ * the wire, so the transport announces them as text and the removed tools stay declared.
7738
+ */
7739
+ type TranscriptToolSupport = "none" | "additions" | "changes";
7740
+ interface TranscriptTools {
7741
+ /** Tools sent in the top-level request field. */
7742
+ requestTools: Tool[];
7743
+ /** Whether `Context.tools` is declared in place at the head of the input instead of top-level. */
7744
+ initialToolsInPlace: boolean;
7745
+ /**
7746
+ * Number of leading transcript system messages whose changes `requestTools` already holds.
7747
+ * Every later system message declares its changes in place.
7748
+ */
7749
+ foldedSystemMessages: number;
7750
+ }
7751
+ /**
7752
+ * Split tool declarations between the top-level request field and in-place changes.
7753
+ *
7754
+ * With `"changes"`, the top-level list stays empty and every declaration, including
7755
+ * `Context.tools`, goes in place: an in-place declaration can replace an earlier in-place one,
7756
+ * but not a top-level one. With `"additions"`, a removal or redefinition cannot be expressed in
7757
+ * place, so the top-level list becomes the tool state after the last such change; later
7758
+ * additions stay in place, and the cached prefix is invalidated once per removal instead of on
7759
+ * every later addition. With `"none"`, the top-level list is the current tool set.
7760
+ */
7761
+ declare function resolveTranscriptTools(context: Transcript, support: TranscriptToolSupport): TranscriptTools;
7459
7762
  //#endregion
7460
7763
  //#region src/stream.d.ts
7461
7764
  /**
@@ -7518,5 +7821,5 @@ export declare function validateToolCall<T extends Tool>(tools: T[], toolExecuti
7518
7821
  */
7519
7822
  export declare function validateToolArguments<T extends Tool>(tool: T, toolExecution: ToolCallInFlight): ToolArguments<T>;
7520
7823
  //#endregion
7521
- export { type AnthropicOptions, type AssistantMessageEventStream, event_d_exports as Event, failure_d_exports as Failure, type GitHubCopilotApiKey, type GitHubCopilotInteractionType, type GitHubCopilotOptions, type GitHubCopilotProvider, type GitHubCopilotProviderSettings, type GoogleOptions, type GoogleVertexAnthropicOptions, type GoogleVertexOptions, message_d_exports as Message, model_d_exports as Model, type OpenAICodexGrammarConstraint, type OpenAICodexOptions, type OpenAICodexProvider, type OpenAICodexProviderSettings, type OpenAICompatibleOptions, type OpenAIOptions, type OpenRouterOptions, protocol_d_exports as Protocol, type Static, type TSchema, Type, type XaiOptions };
7824
+ export { type AnthropicOptions, type AssistantMessageEventStream, event_d_exports as Event, failure_d_exports as Failure, type GitHubCopilotApiKey, type GitHubCopilotInteractionType, type GitHubCopilotOptions, type GitHubCopilotProvider, type GitHubCopilotProviderSettings, type GoogleOptions, type GoogleVertexAnthropicOptions, type GoogleVertexOptions, message_d_exports as Message, model_d_exports as Model, type ResponsesGrammarConstraint as OpenAICodexGrammarConstraint, type OpenAICodexOptions, type OpenAICodexProvider, type OpenAICodexProviderSettings, type OpenAICompatibleOptions, type OpenAIOptions, type OpenRouterOptions, protocol_d_exports as Protocol, type Static, type TSchema, transcript_d_exports as Transcript, Type, type XaiOptions };
7522
7825
  //# sourceMappingURL=index.d.mts.map