@janole/ai-sdk-provider-codex-asp 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -42,9 +42,20 @@ type CommandExecutionApprovalDecision = "accept" | "acceptForSession" | {
42
42
  };
43
43
  } | "decline" | "cancel";
44
44
 
45
+ /**
46
+ * A path that is guaranteed to be absolute and normalized (though it is not
47
+ * guaranteed to be canonicalized or exist on the filesystem).
48
+ *
49
+ * IMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set
50
+ * using [AbsolutePathBufGuard::new]. If no base path is set, the
51
+ * deserialization will fail unless the path being deserialized is already
52
+ * absolute.
53
+ */
54
+ type AbsolutePathBuf = string;
55
+
45
56
  type AdditionalFileSystemPermissions = {
46
- read: Array<string> | null;
47
- write: Array<string> | null;
57
+ read: Array<AbsolutePathBuf> | null;
58
+ write: Array<AbsolutePathBuf> | null;
48
59
  };
49
60
 
50
61
  type MacOsAutomationValue = boolean | Array<string>;
@@ -58,8 +69,12 @@ type AdditionalMacOsPermissions = {
58
69
  calendar: boolean | null;
59
70
  };
60
71
 
72
+ type AdditionalNetworkPermissions = {
73
+ enabled: boolean | null;
74
+ };
75
+
61
76
  type AdditionalPermissionProfile = {
62
- network: boolean | null;
77
+ network: AdditionalNetworkPermissions | null;
63
78
  fileSystem: AdditionalFileSystemPermissions | null;
64
79
  macos: AdditionalMacOsPermissions | null;
65
80
  };
@@ -169,17 +184,6 @@ type FileChangeRequestApprovalResponse = {
169
184
 
170
185
  type SandboxMode = "read-only" | "workspace-write" | "danger-full-access";
171
186
 
172
- /**
173
- * A path that is guaranteed to be absolute and normalized (though it is not
174
- * guaranteed to be canonicalized or exist on the filesystem).
175
- *
176
- * IMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set
177
- * using [AbsolutePathBufGuard::new]. If no base path is set, the
178
- * deserialization will fail unless the path being deserialized is already
179
- * absolute.
180
- */
181
- type AbsolutePathBuf = string;
182
-
183
187
  type NetworkAccess = "restricted" | "enabled";
184
188
 
185
189
  type ReadOnlyAccess = {
@@ -195,6 +199,7 @@ type SandboxPolicy = {
195
199
  } | {
196
200
  "type": "readOnly";
197
201
  access: ReadOnlyAccess;
202
+ networkAccess: boolean;
198
203
  } | {
199
204
  "type": "externalSandbox";
200
205
  networkAccess: NetworkAccess;
@@ -207,70 +212,6 @@ type SandboxPolicy = {
207
212
  excludeSlashTmp: boolean;
208
213
  };
209
214
 
210
- type Personality = "none" | "friendly" | "pragmatic";
211
-
212
- type ContentItem = {
213
- "type": "input_text";
214
- text: string;
215
- } | {
216
- "type": "input_image";
217
- image_url: string;
218
- } | {
219
- "type": "output_text";
220
- text: string;
221
- };
222
-
223
- /**
224
- * Responses API compatible content items that can be returned by a tool call.
225
- * This is a subset of ContentItem with the types we support as function call outputs.
226
- */
227
- type FunctionCallOutputContentItem = {
228
- "type": "input_text";
229
- text: string;
230
- } | {
231
- "type": "input_image";
232
- image_url: string;
233
- };
234
-
235
- type FunctionCallOutputBody = string | Array<FunctionCallOutputContentItem>;
236
-
237
- /**
238
- * The payload we send back to OpenAI when reporting a tool call result.
239
- *
240
- * `body` serializes directly as the wire value for `function_call_output.output`.
241
- * `success` remains internal metadata for downstream handling.
242
- */
243
- type FunctionCallOutputPayload = {
244
- body: FunctionCallOutputBody;
245
- success: boolean | null;
246
- };
247
-
248
- /**
249
- * Details of a ghost commit created from a repository state.
250
- */
251
- type GhostCommit = {
252
- id: string;
253
- parent: string | null;
254
- preexisting_untracked_files: Array<string>;
255
- preexisting_untracked_dirs: Array<string>;
256
- };
257
-
258
- type LocalShellExecAction = {
259
- command: Array<string>;
260
- timeout_ms: bigint | null;
261
- working_directory: string | null;
262
- env: {
263
- [key in string]?: string;
264
- } | null;
265
- user: string | null;
266
- };
267
-
268
- type LocalShellAction = {
269
- "type": "exec";
270
- } & LocalShellExecAction;
271
-
272
- type LocalShellStatus = "completed" | "in_progress" | "incomplete";
273
-
274
215
  /**
275
216
  * Classifies an assistant message as interim commentary or final answer text.
276
217
  *
@@ -279,172 +220,6 @@ type LocalShellStatus = "completed" | "in_progress" | "incomplete";
279
220
  */
280
221
  type MessagePhase = "commentary" | "final_answer";
281
222
 
282
- type ReasoningItemContent = {
283
- "type": "reasoning_text";
284
- text: string;
285
- } | {
286
- "type": "text";
287
- text: string;
288
- };
289
-
290
- type ReasoningItemReasoningSummary = {
291
- "type": "summary_text";
292
- text: string;
293
- };
294
-
295
- type WebSearchAction$1 = {
296
- "type": "search";
297
- query?: string;
298
- queries?: Array<string>;
299
- } | {
300
- "type": "open_page";
301
- url?: string;
302
- } | {
303
- "type": "find_in_page";
304
- url?: string;
305
- pattern?: string;
306
- } | {
307
- "type": "other";
308
- };
309
-
310
- type ResponseItem = {
311
- "type": "message";
312
- role: string;
313
- content: Array<ContentItem>;
314
- end_turn?: boolean;
315
- phase?: MessagePhase;
316
- } | {
317
- "type": "reasoning";
318
- summary: Array<ReasoningItemReasoningSummary>;
319
- content?: Array<ReasoningItemContent>;
320
- encrypted_content: string | null;
321
- } | {
322
- "type": "local_shell_call";
323
- /**
324
- * Set when using the Responses API.
325
- */
326
- call_id: string | null;
327
- status: LocalShellStatus;
328
- action: LocalShellAction;
329
- } | {
330
- "type": "function_call";
331
- name: string;
332
- arguments: string;
333
- call_id: string;
334
- } | {
335
- "type": "function_call_output";
336
- call_id: string;
337
- output: FunctionCallOutputPayload;
338
- } | {
339
- "type": "custom_tool_call";
340
- status?: string;
341
- call_id: string;
342
- name: string;
343
- input: string;
344
- } | {
345
- "type": "custom_tool_call_output";
346
- call_id: string;
347
- output: string;
348
- } | {
349
- "type": "web_search_call";
350
- status?: string;
351
- action?: WebSearchAction$1;
352
- } | {
353
- "type": "ghost_snapshot";
354
- ghost_commit: GhostCommit;
355
- } | {
356
- "type": "compaction";
357
- encrypted_content: string;
358
- } | {
359
- "type": "other";
360
- };
361
-
362
- /**
363
- * There are three ways to resume a thread:
364
- * 1. By thread_id: load the thread from disk by thread_id and resume it.
365
- * 2. By history: instantiate the thread from memory and resume it.
366
- * 3. By path: load the thread from disk by path and resume it.
367
- *
368
- * The precedence is: history > path > thread_id.
369
- * If using history or path, the thread_id param will be ignored.
370
- *
371
- * Prefer using thread_id whenever possible.
372
- */
373
- type ThreadResumeParams = {
374
- threadId: string;
375
- /**
376
- * [UNSTABLE] FOR CODEX CLOUD - DO NOT USE.
377
- * If specified, the thread will be resumed with the provided history
378
- * instead of loaded from disk.
379
- */
380
- history?: Array<ResponseItem> | null;
381
- /**
382
- * [UNSTABLE] Specify the rollout path to resume from.
383
- * If specified, the thread_id param will be ignored.
384
- */
385
- path?: string | null;
386
- /**
387
- * Configuration overrides for the resumed thread, if any.
388
- */
389
- model?: string | null;
390
- modelProvider?: string | null;
391
- cwd?: string | null;
392
- approvalPolicy?: AskForApproval | null;
393
- sandbox?: SandboxMode | null;
394
- config?: {
395
- [key in string]?: JsonValue;
396
- } | null;
397
- baseInstructions?: string | null;
398
- developerInstructions?: string | null;
399
- personality?: Personality | null;
400
- /**
401
- * If true, persist additional rollout EventMsg variants required to
402
- * reconstruct a richer thread history on subsequent resume/fork/read.
403
- */
404
- persistExtendedHistory: boolean;
405
- };
406
-
407
- /**
408
- * See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning
409
- */
410
- type ReasoningEffort = "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
411
-
412
- type GitInfo = {
413
- sha: string | null;
414
- branch: string | null;
415
- originUrl: string | null;
416
- };
417
-
418
- type ThreadId = string;
419
-
420
- type SubAgentSource = "review" | "compact" | {
421
- "thread_spawn": {
422
- parent_thread_id: ThreadId;
423
- depth: number;
424
- agent_nickname: string | null;
425
- agent_role: string | null;
426
- };
427
- } | "memory_consolidation" | {
428
- "other": string;
429
- };
430
-
431
- type SessionSource = "cli" | "vscode" | "exec" | "appServer" | {
432
- "subAgent": SubAgentSource;
433
- } | "unknown";
434
-
435
- type ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput";
436
-
437
- type ThreadStatus = {
438
- "type": "notLoaded";
439
- } | {
440
- "type": "idle";
441
- } | {
442
- "type": "systemError";
443
- } | {
444
- "type": "active";
445
- activeFlags: Array<ThreadActiveFlag>;
446
- };
447
-
448
223
  type CollabAgentStatus = "pendingInit" | "running" | "completed" | "errored" | "shutdown" | "notFound";
449
224
 
450
225
  type CollabAgentState = {
@@ -535,7 +310,7 @@ type UserInput = {
535
310
  path: string;
536
311
  };
537
312
 
538
- type WebSearchAction = {
313
+ type WebSearchAction$1 = {
539
314
  "type": "search";
540
315
  query: string | null;
541
316
  queries: Array<string> | null;
@@ -669,11 +444,17 @@ type ThreadItem = {
669
444
  "type": "webSearch";
670
445
  id: string;
671
446
  query: string;
672
- action: WebSearchAction | null;
447
+ action: WebSearchAction$1 | null;
673
448
  } | {
674
449
  "type": "imageView";
675
450
  id: string;
676
451
  path: string;
452
+ } | {
453
+ "type": "imageGeneration";
454
+ id: string;
455
+ status: string;
456
+ revisedPrompt: string | null;
457
+ result: string;
677
458
  } | {
678
459
  "type": "enteredReviewMode";
679
460
  id: string;
@@ -687,6 +468,248 @@ type ThreadItem = {
687
468
  id: string;
688
469
  };
689
470
 
471
+ type Personality = "none" | "friendly" | "pragmatic";
472
+
473
+ type ContentItem = {
474
+ "type": "input_text";
475
+ text: string;
476
+ } | {
477
+ "type": "input_image";
478
+ image_url: string;
479
+ } | {
480
+ "type": "output_text";
481
+ text: string;
482
+ };
483
+
484
+ type ImageDetail = "auto" | "low" | "high" | "original";
485
+
486
+ /**
487
+ * Responses API compatible content items that can be returned by a tool call.
488
+ * This is a subset of ContentItem with the types we support as function call outputs.
489
+ */
490
+ type FunctionCallOutputContentItem = {
491
+ "type": "input_text";
492
+ text: string;
493
+ } | {
494
+ "type": "input_image";
495
+ image_url: string;
496
+ detail?: ImageDetail;
497
+ };
498
+
499
+ type FunctionCallOutputBody = string | Array<FunctionCallOutputContentItem>;
500
+
501
+ /**
502
+ * The payload we send back to OpenAI when reporting a tool call result.
503
+ *
504
+ * `body` serializes directly as the wire value for `function_call_output.output`.
505
+ * `success` remains internal metadata for downstream handling.
506
+ */
507
+ type FunctionCallOutputPayload = {
508
+ body: FunctionCallOutputBody;
509
+ success: boolean | null;
510
+ };
511
+
512
+ /**
513
+ * Details of a ghost commit created from a repository state.
514
+ */
515
+ type GhostCommit = {
516
+ id: string;
517
+ parent: string | null;
518
+ preexisting_untracked_files: Array<string>;
519
+ preexisting_untracked_dirs: Array<string>;
520
+ };
521
+
522
+ type LocalShellExecAction = {
523
+ command: Array<string>;
524
+ timeout_ms: bigint | null;
525
+ working_directory: string | null;
526
+ env: {
527
+ [key in string]?: string;
528
+ } | null;
529
+ user: string | null;
530
+ };
531
+
532
+ type LocalShellAction = {
533
+ "type": "exec";
534
+ } & LocalShellExecAction;
535
+
536
+ type LocalShellStatus = "completed" | "in_progress" | "incomplete";
537
+
538
+ type ReasoningItemContent = {
539
+ "type": "reasoning_text";
540
+ text: string;
541
+ } | {
542
+ "type": "text";
543
+ text: string;
544
+ };
545
+
546
+ type ReasoningItemReasoningSummary = {
547
+ "type": "summary_text";
548
+ text: string;
549
+ };
550
+
551
+ type WebSearchAction = {
552
+ "type": "search";
553
+ query?: string;
554
+ queries?: Array<string>;
555
+ } | {
556
+ "type": "open_page";
557
+ url?: string;
558
+ } | {
559
+ "type": "find_in_page";
560
+ url?: string;
561
+ pattern?: string;
562
+ } | {
563
+ "type": "other";
564
+ };
565
+
566
+ type ResponseItem = {
567
+ "type": "message";
568
+ role: string;
569
+ content: Array<ContentItem>;
570
+ end_turn?: boolean;
571
+ phase?: MessagePhase;
572
+ } | {
573
+ "type": "reasoning";
574
+ summary: Array<ReasoningItemReasoningSummary>;
575
+ content?: Array<ReasoningItemContent>;
576
+ encrypted_content: string | null;
577
+ } | {
578
+ "type": "local_shell_call";
579
+ /**
580
+ * Set when using the Responses API.
581
+ */
582
+ call_id: string | null;
583
+ status: LocalShellStatus;
584
+ action: LocalShellAction;
585
+ } | {
586
+ "type": "function_call";
587
+ name: string;
588
+ arguments: string;
589
+ call_id: string;
590
+ } | {
591
+ "type": "function_call_output";
592
+ call_id: string;
593
+ output: FunctionCallOutputPayload;
594
+ } | {
595
+ "type": "custom_tool_call";
596
+ status?: string;
597
+ call_id: string;
598
+ name: string;
599
+ input: string;
600
+ } | {
601
+ "type": "custom_tool_call_output";
602
+ call_id: string;
603
+ output: FunctionCallOutputPayload;
604
+ } | {
605
+ "type": "web_search_call";
606
+ status?: string;
607
+ action?: WebSearchAction;
608
+ } | {
609
+ "type": "image_generation_call";
610
+ id: string;
611
+ status: string;
612
+ revised_prompt?: string;
613
+ result: string;
614
+ } | {
615
+ "type": "ghost_snapshot";
616
+ ghost_commit: GhostCommit;
617
+ } | {
618
+ "type": "compaction";
619
+ encrypted_content: string;
620
+ } | {
621
+ "type": "other";
622
+ };
623
+
624
+ type ServiceTier = "fast" | "flex";
625
+
626
+ /**
627
+ * There are three ways to resume a thread:
628
+ * 1. By thread_id: load the thread from disk by thread_id and resume it.
629
+ * 2. By history: instantiate the thread from memory and resume it.
630
+ * 3. By path: load the thread from disk by path and resume it.
631
+ *
632
+ * The precedence is: history > path > thread_id.
633
+ * If using history or path, the thread_id param will be ignored.
634
+ *
635
+ * Prefer using thread_id whenever possible.
636
+ */
637
+ type ThreadResumeParams = {
638
+ threadId: string;
639
+ /**
640
+ * [UNSTABLE] FOR CODEX CLOUD - DO NOT USE.
641
+ * If specified, the thread will be resumed with the provided history
642
+ * instead of loaded from disk.
643
+ */
644
+ history?: Array<ResponseItem> | null;
645
+ /**
646
+ * [UNSTABLE] Specify the rollout path to resume from.
647
+ * If specified, the thread_id param will be ignored.
648
+ */
649
+ path?: string | null;
650
+ /**
651
+ * Configuration overrides for the resumed thread, if any.
652
+ */
653
+ model?: string | null;
654
+ modelProvider?: string | null;
655
+ serviceTier?: ServiceTier | null | null;
656
+ cwd?: string | null;
657
+ approvalPolicy?: AskForApproval | null;
658
+ sandbox?: SandboxMode | null;
659
+ config?: {
660
+ [key in string]?: JsonValue;
661
+ } | null;
662
+ baseInstructions?: string | null;
663
+ developerInstructions?: string | null;
664
+ personality?: Personality | null;
665
+ /**
666
+ * If true, persist additional rollout EventMsg variants required to
667
+ * reconstruct a richer thread history on subsequent resume/fork/read.
668
+ */
669
+ persistExtendedHistory: boolean;
670
+ };
671
+
672
+ /**
673
+ * See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning
674
+ */
675
+ type ReasoningEffort = "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
676
+
677
+ type GitInfo = {
678
+ sha: string | null;
679
+ branch: string | null;
680
+ originUrl: string | null;
681
+ };
682
+
683
+ type ThreadId = string;
684
+
685
+ type SubAgentSource = "review" | "compact" | {
686
+ "thread_spawn": {
687
+ parent_thread_id: ThreadId;
688
+ depth: number;
689
+ agent_nickname: string | null;
690
+ agent_role: string | null;
691
+ };
692
+ } | "memory_consolidation" | {
693
+ "other": string;
694
+ };
695
+
696
+ type SessionSource = "cli" | "vscode" | "exec" | "appServer" | {
697
+ "subAgent": SubAgentSource;
698
+ } | "unknown";
699
+
700
+ type ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput";
701
+
702
+ type ThreadStatus = {
703
+ "type": "notLoaded";
704
+ } | {
705
+ "type": "idle";
706
+ } | {
707
+ "type": "systemError";
708
+ } | {
709
+ "type": "active";
710
+ activeFlags: Array<ThreadActiveFlag>;
711
+ };
712
+
690
713
  /**
691
714
  * This translation layer make sure that we expose codex error code in camel case.
692
715
  *
@@ -740,6 +763,10 @@ type Thread = {
740
763
  * Usually the first user message in the thread, if available.
741
764
  */
742
765
  preview: string;
766
+ /**
767
+ * Whether the thread is ephemeral and should not be materialized on disk.
768
+ */
769
+ ephemeral: boolean;
743
770
  /**
744
771
  * Model provider used for this thread (for example, 'openai').
745
772
  */
@@ -801,6 +828,7 @@ type ThreadResumeResponse = {
801
828
  thread: Thread;
802
829
  model: string;
803
830
  modelProvider: string;
831
+ serviceTier: ServiceTier | null;
804
832
  cwd: string;
805
833
  approvalPolicy: AskForApproval;
806
834
  sandbox: SandboxPolicy;
@@ -855,6 +883,10 @@ type TurnStartParams = {
855
883
  * Override the model for this turn and subsequent turns.
856
884
  */
857
885
  model?: string | null;
886
+ /**
887
+ * Override the service tier for this turn and subsequent turns.
888
+ */
889
+ serviceTier?: ServiceTier | null | null;
858
890
  /**
859
891
  * Override the reasoning effort for this turn and subsequent turns.
860
892
  */
@@ -1333,6 +1365,10 @@ interface CodexSession {
1333
1365
  interrupt(): Promise<void>;
1334
1366
  }
1335
1367
 
1368
+ interface TransportContext {
1369
+ signal?: AbortSignal;
1370
+ threadId?: string;
1371
+ }
1336
1372
  interface CodexThreadDefaults {
1337
1373
  cwd?: string;
1338
1374
  approvalPolicy?: AskForApproval;
@@ -1395,7 +1431,7 @@ interface CodexProviderSettings {
1395
1431
  defaultThreadSettings?: CodexThreadDefaults;
1396
1432
  defaultTurnSettings?: CodexTurnDefaults;
1397
1433
  compaction?: CodexCompactionSettings;
1398
- transportFactory?: (signal?: AbortSignal, threadId?: string) => CodexTransport;
1434
+ transportFactory?: (context: TransportContext) => CodexTransport;
1399
1435
  /** Tools with schema (description + inputSchema) advertised to Codex + local handlers. */
1400
1436
  tools?: Record<string, DynamicToolDefinition>;
1401
1437
  /** Legacy: handler-only tools, not advertised to Codex. Use `tools` for full schema support. */
@@ -1431,6 +1467,13 @@ interface CodexProviderSettings {
1431
1467
  };
1432
1468
  /** Emit plan updates as tool-call/tool-result parts. Default: true. */
1433
1469
  emitPlanUpdates?: boolean;
1470
+ /**
1471
+ * Maximum number of characters retained for tool result output payloads.
1472
+ * Applies to streamed command output and finalized tool results.
1473
+ * Older content is dropped when the limit is exceeded. Default: 32768.
1474
+ * Set to 0 or a negative value to disable truncation.
1475
+ */
1476
+ maxToolResultOutputChars?: number;
1434
1477
  /** Called when a streaming session is created, providing access to inject messages and interrupt. */
1435
1478
  onSessionCreated?: (session: CodexSession) => void;
1436
1479
  }
@@ -1467,6 +1510,11 @@ interface CodexEventMapperInput {
1467
1510
  interface CodexEventMapperOptions {
1468
1511
  /** Emit plan updates as tool-call/tool-result parts. Default: true. */
1469
1512
  emitPlanUpdates?: boolean;
1513
+ /**
1514
+ * Max retained tool-result output chars; older content is truncated. Default: 32768.
1515
+ * Set to 0 or a negative value to disable truncation.
1516
+ */
1517
+ maxToolResultOutputChars?: number;
1470
1518
  }
1471
1519
  declare class CodexEventMapper {
1472
1520
  private readonly options;
@@ -1479,12 +1527,39 @@ declare class CodexEventMapper {
1479
1527
  private threadId;
1480
1528
  private turnId;
1481
1529
  private latestUsage;
1530
+ private readonly handlers;
1482
1531
  constructor(options?: CodexEventMapperOptions);
1483
1532
  setThreadId(threadId: string): void;
1484
1533
  setTurnId(turnId: string): void;
1485
1534
  getTurnId(): string | undefined;
1486
- private nextPlanSequence;
1487
1535
  map(event: CodexEventMapperInput): LanguageModelV3StreamPart[];
1536
+ private withMeta;
1537
+ private ensureStreamStarted;
1538
+ private emitReasoningDelta;
1539
+ private nextPlanSequence;
1540
+ private applyOutputLimit;
1541
+ private appendTrackedOutput;
1542
+ private formatToolOutput;
1543
+ private handleTurnStarted;
1544
+ private handleItemStarted;
1545
+ private handleAgentMessageDelta;
1546
+ private handleItemCompleted;
1547
+ private handleReasoningDelta;
1548
+ private handleSummaryPartAdded;
1549
+ private handlePlanUpdated;
1550
+ private handleCommandOutputDelta;
1551
+ private handleMcpToolCallBegin;
1552
+ private handleMcpToolCallEnd;
1553
+ private handleMcpToolCallProgress;
1554
+ private handleToolCallStarted;
1555
+ private handleToolCallDelta;
1556
+ private handleToolCallFinished;
1557
+ private handleToolCall;
1558
+ private startDynamicToolCall;
1559
+ private stringifyDynamicToolResult;
1560
+ private formatWebSearchItemSummary;
1561
+ private handleTokenUsageUpdated;
1562
+ private handleTurnCompleted;
1488
1563
  }
1489
1564
 
1490
1565
  declare const CODEX_PROVIDER_ID = "@janole/ai-sdk-provider-codex-asp";
@@ -1502,6 +1577,17 @@ declare function withProviderMetadata<T extends LanguageModelV3StreamPart>(part:
1502
1577
  */
1503
1578
  type InputModality = "text" | "image";
1504
1579
 
1580
+ type ModelAvailabilityNux = {
1581
+ message: string;
1582
+ };
1583
+
1584
+ type ModelUpgradeInfo = {
1585
+ model: string;
1586
+ upgradeCopy: string | null;
1587
+ modelLink: string | null;
1588
+ migrationMarkdown: string | null;
1589
+ };
1590
+
1505
1591
  type ReasoningEffortOption = {
1506
1592
  reasoningEffort: ReasoningEffort;
1507
1593
  description: string;
@@ -1511,6 +1597,8 @@ type Model = {
1511
1597
  id: string;
1512
1598
  model: string;
1513
1599
  upgrade: string | null;
1600
+ upgradeInfo: ModelUpgradeInfo | null;
1601
+ availabilityNux: ModelAvailabilityNux | null;
1514
1602
  displayName: string;
1515
1603
  description: string;
1516
1604
  hidden: boolean;
@@ -1641,4 +1729,4 @@ declare class PromptFileResolver {
1641
1729
  private resolveFresh;
1642
1730
  }
1643
1731
 
1644
- export { type AgentMessageDeltaNotification, AppServerClient, type AppServerClientSettings, ApprovalsDispatcher, type ApprovalsDispatcherSettings, type AskForApproval, CODEX_PROVIDER_ID, type CodexCommandApprovalRequest, type CodexDynamicToolDefinition, CodexEventMapper, type CodexEventMapperInput, type CodexEventMapperOptions, type CodexFileChangeApprovalRequest, type CodexInitializeParams, type CodexInitializeResult, type CodexInitializedNotification, CodexLanguageModel, type CodexLanguageModelSettings, type Model as CodexModel, type CodexModelConfig, CodexNotImplementedError, type CodexNotification, type CodexProvider, CodexProviderError, type CodexProviderSettings, type CodexSession, type CodexThreadDefaults, type CodexThreadResumeParams, type CodexThreadResumeResult, type CodexThreadStartParams, type CodexThreadStartResult, type CodexToolCallDeltaNotification, type CodexToolCallFinishedNotification, type CodexToolCallRequestParams, type CodexToolCallResult, type CodexToolCallStartedNotification, type CodexToolResultContentItem, type CodexTransport, type CodexTransportEventMap, type CodexTurnInputImage, type CodexTurnInputItem, type CodexTurnInputLocalImage, type CodexTurnInputMention, type CodexTurnInputSkill, type CodexTurnInputText, type CodexTurnStartParams, type CodexTurnStartResult, CodexWorker, CodexWorkerPool, type CodexWorkerPoolSettings, type CodexWorkerSettings, type CommandApprovalHandler, type CommandExecutionApprovalDecision, type CommandExecutionRequestApprovalParams, type CommandExecutionRequestApprovalResponse, type DynamicToolDefinition, type DynamicToolExecutionContext, type DynamicToolHandler, DynamicToolsDispatcher, type DynamicToolsDispatcherSettings, type FileChangeApprovalDecision, type FileChangeApprovalHandler, type FileChangeRequestApprovalParams, type FileChangeRequestApprovalResponse, type FileWriter, type ItemCompletedNotification, type ItemStartedNotification, JsonRpcError, type JsonRpcErrorResponse, type JsonRpcId, type JsonRpcMessage, type JsonRpcMessageBase, type JsonRpcNotification, type JsonRpcRequest, type JsonRpcResponse, type JsonRpcSuccessResponse, LocalFileWriter, type McpServerConfig, PACKAGE_NAME, PACKAGE_VERSION, type PendingToolCall, PersistentTransport, type PersistentTransportSettings, PromptFileResolver, type SandboxMode, StdioTransport, type StdioTransportSettings, type ThreadTokenUsageUpdatedNotification, type TurnCompletedNotification, type TurnStartedNotification, WebSocketTransport, type WebSocketTransportSettings, codexAppServer, codexProviderMetadata, createCodexAppServer, createCodexProvider, mapSystemPrompt, withProviderMetadata };
1732
+ export { type AgentMessageDeltaNotification, AppServerClient, type AppServerClientSettings, ApprovalsDispatcher, type ApprovalsDispatcherSettings, type AskForApproval, CODEX_PROVIDER_ID, type CodexCommandApprovalRequest, type CodexDynamicToolDefinition, CodexEventMapper, type CodexEventMapperInput, type CodexEventMapperOptions, type CodexFileChangeApprovalRequest, type CodexInitializeParams, type CodexInitializeResult, type CodexInitializedNotification, CodexLanguageModel, type CodexLanguageModelSettings, type Model as CodexModel, type CodexModelConfig, CodexNotImplementedError, type CodexNotification, type CodexProvider, CodexProviderError, type CodexProviderSettings, type CodexSession, type CodexThreadDefaults, type CodexThreadResumeParams, type CodexThreadResumeResult, type CodexThreadStartParams, type CodexThreadStartResult, type CodexToolCallDeltaNotification, type CodexToolCallFinishedNotification, type CodexToolCallRequestParams, type CodexToolCallResult, type CodexToolCallStartedNotification, type CodexToolResultContentItem, type CodexTransport, type CodexTransportEventMap, type CodexTurnInputImage, type CodexTurnInputItem, type CodexTurnInputLocalImage, type CodexTurnInputMention, type CodexTurnInputSkill, type CodexTurnInputText, type CodexTurnStartParams, type CodexTurnStartResult, CodexWorker, CodexWorkerPool, type CodexWorkerPoolSettings, type CodexWorkerSettings, type CommandApprovalHandler, type CommandExecutionApprovalDecision, type CommandExecutionRequestApprovalParams, type CommandExecutionRequestApprovalResponse, type DynamicToolDefinition, type DynamicToolExecutionContext, type DynamicToolHandler, DynamicToolsDispatcher, type DynamicToolsDispatcherSettings, type FileChangeApprovalDecision, type FileChangeApprovalHandler, type FileChangeRequestApprovalParams, type FileChangeRequestApprovalResponse, type FileWriter, type ItemCompletedNotification, type ItemStartedNotification, JsonRpcError, type JsonRpcErrorResponse, type JsonRpcId, type JsonRpcMessage, type JsonRpcMessageBase, type JsonRpcNotification, type JsonRpcRequest, type JsonRpcResponse, type JsonRpcSuccessResponse, LocalFileWriter, type McpServerConfig, PACKAGE_NAME, PACKAGE_VERSION, type PendingToolCall, PersistentTransport, type PersistentTransportSettings, PromptFileResolver, type SandboxMode, StdioTransport, type StdioTransportSettings, type ThreadTokenUsageUpdatedNotification, type TransportContext, type TurnCompletedNotification, type TurnStartedNotification, WebSocketTransport, type WebSocketTransportSettings, codexAppServer, codexProviderMetadata, createCodexAppServer, createCodexProvider, mapSystemPrompt, withProviderMetadata };