@opencode-ai/ai 0.0.0-dev-17724 → 0.0.0-dev-17729

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.
@@ -40,6 +40,8 @@ export declare const InputItem: Schema.Union<readonly [Schema.Struct<{
40
40
  readonly mime_type: Schema.optional<Schema.String>;
41
41
  }>]>]>>;
42
42
  }>, Schema.Struct<{
43
+ readonly type: Schema.tag<"message">;
44
+ readonly id: Schema.optionalKey<Schema.String>;
43
45
  readonly role: Schema.tag<"assistant">;
44
46
  readonly content: Schema.$Array<Schema.Struct<{
45
47
  readonly type: Schema.tag<"output_text">;
@@ -59,6 +61,7 @@ export declare const InputItem: Schema.Union<readonly [Schema.Struct<{
59
61
  readonly id: Schema.String;
60
62
  }>, Schema.Struct<{
61
63
  readonly type: Schema.tag<"function_call">;
64
+ readonly id: Schema.optionalKey<Schema.String>;
62
65
  readonly call_id: Schema.String;
63
66
  readonly name: Schema.String;
64
67
  readonly arguments: Schema.String;
@@ -80,6 +83,8 @@ export declare const InputItem: Schema.Union<readonly [Schema.Struct<{
80
83
  }>]>;
81
84
  type OpenResponsesInputItem = Schema.Schema.Type<typeof InputItem>;
82
85
  type LoweredInputItem = OpenResponsesInputItem | {
86
+ readonly type: "message";
87
+ readonly id?: string;
83
88
  readonly role: "assistant";
84
89
  readonly content: ReadonlyArray<{
85
90
  readonly type: "output_text";
@@ -128,6 +133,8 @@ export declare const coreFields: {
128
133
  readonly mime_type: Schema.optional<Schema.String>;
129
134
  }>]>]>>;
130
135
  }>, Schema.Struct<{
136
+ readonly type: Schema.tag<"message">;
137
+ readonly id: Schema.optionalKey<Schema.String>;
131
138
  readonly role: Schema.tag<"assistant">;
132
139
  readonly content: Schema.$Array<Schema.Struct<{
133
140
  readonly type: Schema.tag<"output_text">;
@@ -147,6 +154,7 @@ export declare const coreFields: {
147
154
  readonly id: Schema.String;
148
155
  }>, Schema.Struct<{
149
156
  readonly type: Schema.tag<"function_call">;
157
+ readonly id: Schema.optionalKey<Schema.String>;
150
158
  readonly call_id: Schema.String;
151
159
  readonly name: Schema.String;
152
160
  readonly arguments: Schema.String;
@@ -235,6 +243,8 @@ declare const OpenResponsesBody: Schema.Struct<{
235
243
  readonly mime_type: Schema.optional<Schema.String>;
236
244
  }>]>]>>;
237
245
  }>, Schema.Struct<{
246
+ readonly type: Schema.tag<"message">;
247
+ readonly id: Schema.optionalKey<Schema.String>;
238
248
  readonly role: Schema.tag<"assistant">;
239
249
  readonly content: Schema.$Array<Schema.Struct<{
240
250
  readonly type: Schema.tag<"output_text">;
@@ -254,6 +264,7 @@ declare const OpenResponsesBody: Schema.Struct<{
254
264
  readonly id: Schema.String;
255
265
  }>, Schema.Struct<{
256
266
  readonly type: Schema.tag<"function_call">;
267
+ readonly id: Schema.optionalKey<Schema.String>;
257
268
  readonly call_id: Schema.String;
258
269
  readonly name: Schema.String;
259
270
  readonly arguments: Schema.String;
@@ -543,17 +554,20 @@ export declare const fromRequest: (request: LLMRequest) => Effect.Effect<{
543
554
  readonly text: string;
544
555
  })[];
545
556
  } | {
557
+ readonly type: "message";
546
558
  readonly content: readonly {
547
559
  readonly type: "output_text";
548
560
  readonly text: string;
549
561
  }[];
550
562
  readonly role: "assistant";
563
+ readonly id?: string | undefined;
551
564
  readonly phase?: "commentary" | "final_answer" | undefined;
552
565
  } | {
553
566
  readonly type: "function_call";
554
- readonly call_id: string;
555
567
  readonly name: string;
556
568
  readonly arguments: string;
569
+ readonly call_id: string;
570
+ readonly id?: string | undefined;
557
571
  } | {
558
572
  readonly type: "function_call_output";
559
573
  readonly call_id: string;
@@ -847,17 +861,20 @@ export declare const protocol: Protocol<{
847
861
  readonly text: string;
848
862
  })[];
849
863
  } | {
864
+ readonly type: "message";
850
865
  readonly content: readonly {
851
866
  readonly type: "output_text";
852
867
  readonly text: string;
853
868
  }[];
854
869
  readonly role: "assistant";
870
+ readonly id?: string | undefined;
855
871
  readonly phase?: "commentary" | "final_answer" | undefined;
856
872
  } | {
857
873
  readonly type: "function_call";
858
- readonly call_id: string;
859
874
  readonly name: string;
860
875
  readonly arguments: string;
876
+ readonly call_id: string;
877
+ readonly id?: string | undefined;
861
878
  } | {
862
879
  readonly type: "function_call_output";
863
880
  readonly call_id: string;
@@ -1012,17 +1029,20 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
1012
1029
  readonly text: string;
1013
1030
  })[];
1014
1031
  } | {
1032
+ readonly type: "message";
1015
1033
  readonly content: readonly {
1016
1034
  readonly type: "output_text";
1017
1035
  readonly text: string;
1018
1036
  }[];
1019
1037
  readonly role: "assistant";
1038
+ readonly id?: string | undefined;
1020
1039
  readonly phase?: "commentary" | "final_answer" | undefined;
1021
1040
  } | {
1022
1041
  readonly type: "function_call";
1023
- readonly call_id: string;
1024
1042
  readonly name: string;
1025
1043
  readonly arguments: string;
1044
+ readonly call_id: string;
1045
+ readonly id?: string | undefined;
1026
1046
  } | {
1027
1047
  readonly type: "function_call_output";
1028
1048
  readonly call_id: string;
@@ -66,6 +66,8 @@ export const InputItem = Schema.Union([
66
66
  Schema.Struct({ role: Schema.tag("developer"), content: Schema.String }),
67
67
  Schema.Struct({ role: Schema.tag("user"), content: Schema.Array(OpenResponsesInputContent) }),
68
68
  Schema.Struct({
69
+ type: Schema.tag("message"),
70
+ id: Schema.optionalKey(Schema.String),
69
71
  role: Schema.tag("assistant"),
70
72
  content: Schema.Array(OpenResponsesOutputText),
71
73
  phase: Schema.optionalKey(MessagePhase),
@@ -74,6 +76,7 @@ export const InputItem = Schema.Union([
74
76
  OpenResponsesItemReference,
75
77
  Schema.Struct({
76
78
  type: Schema.tag("function_call"),
79
+ id: Schema.optionalKey(Schema.String),
77
80
  call_id: Schema.String,
78
81
  name: Schema.String,
79
82
  arguments: Schema.String,
@@ -245,31 +248,39 @@ export const lowerToolChoice = (protocolName, toolChoice) => ProviderShared.matc
245
248
  required: () => "required",
246
249
  tool: (toolName) => ({ type: "function", name: toolName }),
247
250
  });
248
- const lowerToolCall = (part) => ({
249
- type: "function_call",
250
- call_id: part.id,
251
- name: part.name,
252
- arguments: ProviderShared.encodeJson(part.input),
253
- });
251
+ const itemID = (providerMetadata, providerMetadataKey) => {
252
+ const metadata = providerMetadata?.[providerMetadataKey];
253
+ return ProviderShared.isRecord(metadata) && typeof metadata.itemId === "string" && metadata.itemId.length > 0
254
+ ? metadata.itemId
255
+ : undefined;
256
+ };
257
+ const lowerToolCall = (part, providerMetadataKey) => {
258
+ const id = itemID(part.providerMetadata, providerMetadataKey);
259
+ return {
260
+ type: "function_call",
261
+ ...(id ? { id } : {}),
262
+ call_id: part.id,
263
+ name: part.name,
264
+ arguments: ProviderShared.encodeJson(part.input),
265
+ };
266
+ };
254
267
  const lowerReasoning = (part, providerMetadataKey) => {
255
268
  const metadata = part.providerMetadata?.[providerMetadataKey];
256
- if (!ProviderShared.isRecord(metadata) || typeof metadata.itemId !== "string" || metadata.itemId.length === 0)
269
+ const id = itemID(part.providerMetadata, providerMetadataKey);
270
+ if (!ProviderShared.isRecord(metadata) || !id)
257
271
  return undefined;
258
272
  const encryptedContent = typeof metadata.reasoningEncryptedContent === "string" || metadata.reasoningEncryptedContent === null
259
273
  ? metadata.reasoningEncryptedContent
260
274
  : undefined;
261
275
  return {
262
276
  type: "reasoning",
263
- id: metadata.itemId,
277
+ id,
264
278
  summary: part.text.length > 0 ? [{ type: "summary_text", text: part.text }] : [],
265
279
  encrypted_content: encryptedContent,
266
280
  };
267
281
  };
268
282
  const hostedToolItemID = (part, providerMetadataKey) => {
269
- const metadata = part.providerMetadata?.[providerMetadataKey];
270
- return ProviderShared.isRecord(metadata) && typeof metadata.itemId === "string" && metadata.itemId.length > 0
271
- ? metadata.itemId
272
- : undefined;
283
+ return itemID(part.providerMetadata, providerMetadataKey);
273
284
  };
274
285
  const lowerMedia = Effect.fn("OpenResponses.lowerMedia")(function* (part, request, extension) {
275
286
  const media = ProviderShared.normalizeMedia(part);
@@ -338,15 +349,18 @@ const lowerMessages = Effect.fn("OpenResponses.lowerMessages")(function* (reques
338
349
  return;
339
350
  const groups = content.reduce((groups, part) => {
340
351
  const metadata = part.providerMetadata?.[providerMetadataKey];
352
+ const id = itemID(part.providerMetadata, providerMetadataKey);
341
353
  const phase = ProviderShared.isRecord(metadata) ? messagePhase(metadata.phase, extension) : undefined;
342
354
  const group = groups.at(-1);
343
- if (group && group.phase === phase)
355
+ if (group && group.id === id && group.phase === phase)
344
356
  group.parts.push(part);
345
357
  else
346
- groups.push({ phase, parts: [part] });
358
+ groups.push({ id, phase, parts: [part] });
347
359
  return groups;
348
360
  }, []);
349
361
  input.push(...groups.map((group) => ({
362
+ type: "message",
363
+ ...(group.id === undefined ? {} : { id: group.id }),
350
364
  role: "assistant",
351
365
  content: group.parts.map((part) => ({ type: "output_text", text: part.text })),
352
366
  ...(group.phase === undefined ? {} : { phase: group.phase }),
@@ -376,20 +390,15 @@ const lowerMessages = Effect.fn("OpenResponses.lowerMessages")(function* (reques
376
390
  existing.encrypted_content = reasoning.encrypted_content;
377
391
  continue;
378
392
  }
379
- const replay = {
380
- type: reasoning.type,
381
- summary: reasoning.summary,
382
- encrypted_content: reasoning.encrypted_content,
383
- };
384
- reasoningItems[reasoning.id] = replay;
385
- input.push(replay);
393
+ reasoningItems[reasoning.id] = reasoning;
394
+ input.push(reasoning);
386
395
  continue;
387
396
  }
388
397
  if (part.type === "tool-call") {
389
398
  flushText();
390
399
  if (part.providerExecuted === true)
391
400
  continue;
392
- input.push(lowerToolCall(part));
401
+ input.push(lowerToolCall(part, providerMetadataKey));
393
402
  continue;
394
403
  }
395
404
  if (part.type === "tool-result" && part.providerExecuted === true) {
@@ -547,7 +556,7 @@ const onOutputTextDelta = (state, event, id) => {
547
556
  return [state, NO_EVENTS];
548
557
  const events = [];
549
558
  const phase = state.messagePhases[id];
550
- const metadata = phase === undefined ? undefined : providerMetadata(state, { phase });
559
+ const metadata = providerMetadata(state, { itemId: id, ...(phase === undefined ? {} : { phase }) });
551
560
  const lifecycle = Lifecycle.textStart(state.lifecycle, events, id, metadata);
552
561
  return [{ ...state, lifecycle: Lifecycle.textDelta(lifecycle, events, id, event.delta) }, events];
553
562
  };
@@ -731,7 +740,7 @@ const onOutputItemDone = Effect.fn("OpenResponses.onOutputItemDone")(function* (
731
740
  return [
732
741
  {
733
742
  ...state,
734
- lifecycle: Lifecycle.textEnd(state.lifecycle, events, item.id, phase === undefined ? undefined : providerMetadata(state, { phase })),
743
+ lifecycle: Lifecycle.textEnd(state.lifecycle, events, item.id, providerMetadata(state, { itemId: item.id, ...(phase === undefined ? {} : { phase }) })),
735
744
  messageItems,
736
745
  messagePhases,
737
746
  },
@@ -743,7 +752,11 @@ const onOutputItemDone = Effect.fn("OpenResponses.onOutputItemDone")(function* (
743
752
  return [state, NO_EVENTS];
744
753
  const tools = state.tools[item.id]
745
754
  ? state.tools
746
- : ToolStream.start(state.tools, item.id, { id: item.call_id, name: item.name });
755
+ : ToolStream.start(state.tools, item.id, {
756
+ id: item.call_id,
757
+ name: item.name,
758
+ providerMetadata: providerMetadata(state, { itemId: item.id }),
759
+ });
747
760
  const result = item.arguments === undefined
748
761
  ? yield* ToolStream.finish(state.id, tools, item.id)
749
762
  : yield* ToolStream.finishWithInput(state.id, tools, item.id, item.arguments);
@@ -38,17 +38,20 @@ export declare const route: Route<{
38
38
  readonly text: string;
39
39
  })[];
40
40
  } | {
41
+ readonly type: "message";
41
42
  readonly content: readonly {
42
43
  readonly type: "output_text";
43
44
  readonly text: string;
44
45
  }[];
45
46
  readonly role: "assistant";
47
+ readonly id?: string | undefined;
46
48
  readonly phase?: "commentary" | "final_answer" | undefined;
47
49
  } | {
48
50
  readonly type: "function_call";
49
- readonly call_id: string;
50
51
  readonly name: string;
51
52
  readonly arguments: string;
53
+ readonly call_id: string;
54
+ readonly id?: string | undefined;
52
55
  } | {
53
56
  readonly type: "function_call_output";
54
57
  readonly call_id: string;
@@ -8,6 +8,8 @@ export declare const PATH = "/responses";
8
8
  declare const OpenAIResponsesBody: Schema.Struct<{
9
9
  readonly stream: Schema.Literal<true>;
10
10
  readonly input: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
11
+ readonly type: Schema.tag<"message">;
12
+ readonly id: Schema.optionalKey<Schema.String>;
11
13
  readonly role: Schema.tag<"assistant">;
12
14
  readonly content: Schema.$Array<Schema.Struct<{
13
15
  readonly type: Schema.tag<"output_text">;
@@ -35,6 +37,8 @@ declare const OpenAIResponsesBody: Schema.Struct<{
35
37
  readonly mime_type: Schema.optional<Schema.String>;
36
38
  }>]>]>>;
37
39
  }>, Schema.Struct<{
40
+ readonly type: Schema.tag<"message">;
41
+ readonly id: Schema.optionalKey<Schema.String>;
38
42
  readonly role: Schema.tag<"assistant">;
39
43
  readonly content: Schema.$Array<Schema.Struct<{
40
44
  readonly type: Schema.tag<"output_text">;
@@ -54,6 +58,7 @@ declare const OpenAIResponsesBody: Schema.Struct<{
54
58
  readonly id: Schema.String;
55
59
  }>, Schema.Struct<{
56
60
  readonly type: Schema.tag<"function_call">;
61
+ readonly id: Schema.optionalKey<Schema.String>;
57
62
  readonly call_id: Schema.String;
58
63
  readonly name: Schema.String;
59
64
  readonly arguments: Schema.String;
@@ -165,17 +170,20 @@ export declare const protocol: Protocol<{
165
170
  readonly text: string;
166
171
  })[];
167
172
  } | {
173
+ readonly type: "message";
168
174
  readonly content: readonly {
169
175
  readonly type: "output_text";
170
176
  readonly text: string;
171
177
  }[];
172
178
  readonly role: "assistant";
179
+ readonly id?: string | undefined;
173
180
  readonly phase?: "commentary" | "final_answer" | undefined;
174
181
  } | {
175
182
  readonly type: "function_call";
176
- readonly call_id: string;
177
183
  readonly name: string;
178
184
  readonly arguments: string;
185
+ readonly call_id: string;
186
+ readonly id?: string | undefined;
179
187
  } | {
180
188
  readonly type: "function_call_output";
181
189
  readonly call_id: string;
@@ -192,11 +200,13 @@ export declare const protocol: Protocol<{
192
200
  readonly text: string;
193
201
  })[];
194
202
  } | {
203
+ readonly type: "message";
195
204
  readonly content: readonly {
196
205
  readonly type: "output_text";
197
206
  readonly text: string;
198
207
  }[];
199
208
  readonly role: "assistant";
209
+ readonly id?: string | undefined;
200
210
  readonly phase?: "commentary" | "final_answer" | null | undefined;
201
211
  })[];
202
212
  readonly model: string;
@@ -349,17 +359,20 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
349
359
  readonly text: string;
350
360
  })[];
351
361
  } | {
362
+ readonly type: "message";
352
363
  readonly content: readonly {
353
364
  readonly type: "output_text";
354
365
  readonly text: string;
355
366
  }[];
356
367
  readonly role: "assistant";
368
+ readonly id?: string | undefined;
357
369
  readonly phase?: "commentary" | "final_answer" | undefined;
358
370
  } | {
359
371
  readonly type: "function_call";
360
- readonly call_id: string;
361
372
  readonly name: string;
362
373
  readonly arguments: string;
374
+ readonly call_id: string;
375
+ readonly id?: string | undefined;
363
376
  } | {
364
377
  readonly type: "function_call_output";
365
378
  readonly call_id: string;
@@ -376,11 +389,13 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
376
389
  readonly text: string;
377
390
  })[];
378
391
  } | {
392
+ readonly type: "message";
379
393
  readonly content: readonly {
380
394
  readonly type: "output_text";
381
395
  readonly text: string;
382
396
  }[];
383
397
  readonly role: "assistant";
398
+ readonly id?: string | undefined;
384
399
  readonly phase?: "commentary" | "final_answer" | null | undefined;
385
400
  })[];
386
401
  readonly model: string;
@@ -479,17 +494,20 @@ export declare const transport: import("../route/transport/index.js").Transport<
479
494
  readonly text: string;
480
495
  })[];
481
496
  } | {
497
+ readonly type: "message";
482
498
  readonly content: readonly {
483
499
  readonly type: "output_text";
484
500
  readonly text: string;
485
501
  }[];
486
502
  readonly role: "assistant";
503
+ readonly id?: string | undefined;
487
504
  readonly phase?: "commentary" | "final_answer" | undefined;
488
505
  } | {
489
506
  readonly type: "function_call";
490
- readonly call_id: string;
491
507
  readonly name: string;
492
508
  readonly arguments: string;
509
+ readonly call_id: string;
510
+ readonly id?: string | undefined;
493
511
  } | {
494
512
  readonly type: "function_call_output";
495
513
  readonly call_id: string;
@@ -506,11 +524,13 @@ export declare const transport: import("../route/transport/index.js").Transport<
506
524
  readonly text: string;
507
525
  })[];
508
526
  } | {
527
+ readonly type: "message";
509
528
  readonly content: readonly {
510
529
  readonly type: "output_text";
511
530
  readonly text: string;
512
531
  }[];
513
532
  readonly role: "assistant";
533
+ readonly id?: string | undefined;
514
534
  readonly phase?: "commentary" | "final_answer" | null | undefined;
515
535
  })[];
516
536
  readonly model: string;
@@ -609,17 +629,20 @@ export declare const route: Route<{
609
629
  readonly text: string;
610
630
  })[];
611
631
  } | {
632
+ readonly type: "message";
612
633
  readonly content: readonly {
613
634
  readonly type: "output_text";
614
635
  readonly text: string;
615
636
  }[];
616
637
  readonly role: "assistant";
638
+ readonly id?: string | undefined;
617
639
  readonly phase?: "commentary" | "final_answer" | undefined;
618
640
  } | {
619
641
  readonly type: "function_call";
620
- readonly call_id: string;
621
642
  readonly name: string;
622
643
  readonly arguments: string;
644
+ readonly call_id: string;
645
+ readonly id?: string | undefined;
623
646
  } | {
624
647
  readonly type: "function_call_output";
625
648
  readonly call_id: string;
@@ -636,11 +659,13 @@ export declare const route: Route<{
636
659
  readonly text: string;
637
660
  })[];
638
661
  } | {
662
+ readonly type: "message";
639
663
  readonly content: readonly {
640
664
  readonly type: "output_text";
641
665
  readonly text: string;
642
666
  }[];
643
667
  readonly role: "assistant";
668
+ readonly id?: string | undefined;
644
669
  readonly phase?: "commentary" | "final_answer" | null | undefined;
645
670
  })[];
646
671
  readonly model: string;
@@ -37,6 +37,8 @@ const OpenAIResponsesToolChoice = Schema.Union([
37
37
  ]);
38
38
  const OpenAIResponsesInputItem = Schema.Union([
39
39
  Schema.Struct({
40
+ type: Schema.tag("message"),
41
+ id: Schema.optionalKey(Schema.String),
40
42
  role: Schema.tag("assistant"),
41
43
  content: Schema.Array(Schema.Struct({ type: Schema.tag("output_text"), text: Schema.String })),
42
44
  phase: Schema.optionalKey(Schema.NullOr(OpenResponses.MessagePhase)),
@@ -148,17 +148,20 @@ export declare const routes: (RouteDef<{
148
148
  readonly text: string;
149
149
  })[];
150
150
  } | {
151
+ readonly type: "message";
151
152
  readonly content: readonly {
152
153
  readonly type: "output_text";
153
154
  readonly text: string;
154
155
  }[];
155
156
  readonly role: "assistant";
157
+ readonly id?: string | undefined;
156
158
  readonly phase?: "commentary" | "final_answer" | undefined;
157
159
  } | {
158
160
  readonly type: "function_call";
159
- readonly call_id: string;
160
161
  readonly name: string;
161
162
  readonly arguments: string;
163
+ readonly call_id: string;
164
+ readonly id?: string | undefined;
162
165
  } | {
163
166
  readonly type: "function_call_output";
164
167
  readonly call_id: string;
@@ -175,11 +178,13 @@ export declare const routes: (RouteDef<{
175
178
  readonly text: string;
176
179
  })[];
177
180
  } | {
181
+ readonly type: "message";
178
182
  readonly content: readonly {
179
183
  readonly type: "output_text";
180
184
  readonly text: string;
181
185
  }[];
182
186
  readonly role: "assistant";
187
+ readonly id?: string | undefined;
183
188
  readonly phase?: "commentary" | "final_answer" | null | undefined;
184
189
  })[];
185
190
  readonly model: string;
@@ -151,17 +151,20 @@ export declare const routes: (RouteDef<{
151
151
  readonly text: string;
152
152
  })[];
153
153
  } | {
154
+ readonly type: "message";
154
155
  readonly content: readonly {
155
156
  readonly type: "output_text";
156
157
  readonly text: string;
157
158
  }[];
158
159
  readonly role: "assistant";
160
+ readonly id?: string | undefined;
159
161
  readonly phase?: "commentary" | "final_answer" | undefined;
160
162
  } | {
161
163
  readonly type: "function_call";
162
- readonly call_id: string;
163
164
  readonly name: string;
164
165
  readonly arguments: string;
166
+ readonly call_id: string;
167
+ readonly id?: string | undefined;
165
168
  } | {
166
169
  readonly type: "function_call_output";
167
170
  readonly call_id: string;
@@ -178,11 +181,13 @@ export declare const routes: (RouteDef<{
178
181
  readonly text: string;
179
182
  })[];
180
183
  } | {
184
+ readonly type: "message";
181
185
  readonly content: readonly {
182
186
  readonly type: "output_text";
183
187
  readonly text: string;
184
188
  }[];
185
189
  readonly role: "assistant";
190
+ readonly id?: string | undefined;
186
191
  readonly phase?: "commentary" | "final_answer" | null | undefined;
187
192
  })[];
188
193
  readonly model: string;
@@ -51,17 +51,20 @@ export declare const routes: import("../route/client.js").Route<{
51
51
  readonly text: string;
52
52
  })[];
53
53
  } | {
54
+ readonly type: "message";
54
55
  readonly content: readonly {
55
56
  readonly type: "output_text";
56
57
  readonly text: string;
57
58
  }[];
58
59
  readonly role: "assistant";
60
+ readonly id?: string | undefined;
59
61
  readonly phase?: "commentary" | "final_answer" | undefined;
60
62
  } | {
61
63
  readonly type: "function_call";
62
- readonly call_id: string;
63
64
  readonly name: string;
64
65
  readonly arguments: string;
66
+ readonly call_id: string;
67
+ readonly id?: string | undefined;
65
68
  } | {
66
69
  readonly type: "function_call_output";
67
70
  readonly call_id: string;
@@ -49,17 +49,20 @@ export declare const routes: import("../route/client.js").Route<{
49
49
  readonly text: string;
50
50
  })[];
51
51
  } | {
52
+ readonly type: "message";
52
53
  readonly content: readonly {
53
54
  readonly type: "output_text";
54
55
  readonly text: string;
55
56
  }[];
56
57
  readonly role: "assistant";
58
+ readonly id?: string | undefined;
57
59
  readonly phase?: "commentary" | "final_answer" | undefined;
58
60
  } | {
59
61
  readonly type: "function_call";
60
- readonly call_id: string;
61
62
  readonly name: string;
62
63
  readonly arguments: string;
64
+ readonly call_id: string;
65
+ readonly id?: string | undefined;
63
66
  } | {
64
67
  readonly type: "function_call_output";
65
68
  readonly call_id: string;
@@ -136,17 +136,20 @@ export declare const routes: (Route<{
136
136
  readonly text: string;
137
137
  })[];
138
138
  } | {
139
+ readonly type: "message";
139
140
  readonly content: readonly {
140
141
  readonly type: "output_text";
141
142
  readonly text: string;
142
143
  }[];
143
144
  readonly role: "assistant";
145
+ readonly id?: string | undefined;
144
146
  readonly phase?: "commentary" | "final_answer" | undefined;
145
147
  } | {
146
148
  readonly type: "function_call";
147
- readonly call_id: string;
148
149
  readonly name: string;
149
150
  readonly arguments: string;
151
+ readonly call_id: string;
152
+ readonly id?: string | undefined;
150
153
  } | {
151
154
  readonly type: "function_call_output";
152
155
  readonly call_id: string;
@@ -163,11 +166,13 @@ export declare const routes: (Route<{
163
166
  readonly text: string;
164
167
  })[];
165
168
  } | {
169
+ readonly type: "message";
166
170
  readonly content: readonly {
167
171
  readonly type: "output_text";
168
172
  readonly text: string;
169
173
  }[];
170
174
  readonly role: "assistant";
175
+ readonly id?: string | undefined;
171
176
  readonly phase?: "commentary" | "final_answer" | null | undefined;
172
177
  })[];
173
178
  readonly model: string;
@@ -144,17 +144,20 @@ export declare const routes: (Route<{
144
144
  readonly text: string;
145
145
  })[];
146
146
  } | {
147
+ readonly type: "message";
147
148
  readonly content: readonly {
148
149
  readonly type: "output_text";
149
150
  readonly text: string;
150
151
  }[];
151
152
  readonly role: "assistant";
153
+ readonly id?: string | undefined;
152
154
  readonly phase?: "commentary" | "final_answer" | undefined;
153
155
  } | {
154
156
  readonly type: "function_call";
155
- readonly call_id: string;
156
157
  readonly name: string;
157
158
  readonly arguments: string;
159
+ readonly call_id: string;
160
+ readonly id?: string | undefined;
158
161
  } | {
159
162
  readonly type: "function_call_output";
160
163
  readonly call_id: string;
@@ -171,11 +174,13 @@ export declare const routes: (Route<{
171
174
  readonly text: string;
172
175
  })[];
173
176
  } | {
177
+ readonly type: "message";
174
178
  readonly content: readonly {
175
179
  readonly type: "output_text";
176
180
  readonly text: string;
177
181
  }[];
178
182
  readonly role: "assistant";
183
+ readonly id?: string | undefined;
179
184
  readonly phase?: "commentary" | "final_answer" | null | undefined;
180
185
  })[];
181
186
  readonly model: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
- "version": "0.0.0-dev-17724",
3
+ "version": "0.0.0-dev-17729",
4
4
  "name": "@opencode-ai/ai",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -30,7 +30,7 @@
30
30
  "devDependencies": {
31
31
  "@clack/prompts": "1.0.0-alpha.1",
32
32
  "@effect/platform-node": "4.0.0-rc.110",
33
- "@opencode-ai/http-recorder": "0.0.0-dev-17724",
33
+ "@opencode-ai/http-recorder": "0.0.0-dev-17729",
34
34
  "@tsconfig/bun": "1.0.9",
35
35
  "@types/bun": "1.3.13",
36
36
  "@typescript/native-preview": "7.0.0-dev.20251207.1",
@@ -39,7 +39,7 @@
39
39
  "dependencies": {
40
40
  "@smithy/eventstream-codec": "4.2.14",
41
41
  "@smithy/util-utf8": "4.2.2",
42
- "@opencode-ai/schema": "0.0.0-dev-17724",
42
+ "@opencode-ai/schema": "0.0.0-dev-17729",
43
43
  "aws4fetch": "1.0.20",
44
44
  "effect": "4.0.0-rc.110",
45
45
  "google-auth-library": "10.5.0"