@meistrari/agent-core 0.2.0-experimental.4 → 0.2.0-experimental.5

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/README.md CHANGED
@@ -131,7 +131,7 @@ The attachment preparation error constructor is public at
131
131
  Core owns provider, mapper, attachment, tool-runner, and lifecycle regression tests,
132
132
  including suites transferred from Remy. Remy owns its strict event projection, model admission,
133
133
  product instructions/tools, and supervisor integration tests. CI type-checks and tests core
134
- with Remy's Bun 1.3.10 / Claude SDK 0.3.280 and agent-api's Claude SDK 0.3.257 pins.
134
+ with Remy's Bun 1.3.10 / Claude SDK 0.3.284 and agent-api's Claude SDK 0.3.257 pins.
135
135
 
136
136
  `bun run test` runs the portable suites. `bun run test:cli` runs the `*.cli.spec.ts` suites
137
137
  against the real bundled Claude Code CLI and a fake Messages API. CI runs them on Linux; the
@@ -139,5 +139,5 @@ process lifecycle spec reads `/proc`, so it fails on macOS. Claude Code rejects
139
139
  bypass-permissions mode as root, so run them as a regular user.
140
140
 
141
141
  Regenerate the experimental Codex wire types with `bun run generate:codex-protocol`.
142
- The generator pins Codex 0.156.1 and verifies any `CODEX_EXECUTABLE` override before
142
+ The generator pins Codex 0.159.0 and verifies any `CODEX_EXECUTABLE` override before
143
143
  using it. Commit generated files with generator changes; CI checks reproducibility.
@@ -231,8 +231,8 @@ command correlation, usage accounting, credential sources, and transport entrypo
231
231
  provider-specific model admission stays in its compatibility adapter. Experimental Codex
232
232
  `step_model_switching` is explicitly enabled by Remy; core's default remains disabled.
233
233
 
234
- The Codex protocol generator now pins 0.156.1. Remy's image/model catalog keeps that product's
235
- 0.156.1 pin; agent-api keeps its own runtime pin. Current and historical live-image evidence is
234
+ The Codex protocol generator now pins 0.159.0. Remy's image/model catalog moves to that
235
+ 0.159.0 pin with it; agent-api keeps its own runtime pin. Current and historical live-image evidence is
236
236
  separated by artifact below; a passing infrastructure smoke does not prove application parity.
237
237
 
238
238
  | New requirement | Owner | Regression coverage | Validation |
@@ -240,7 +240,7 @@ separated by artifact below; a passing infrastructure smoke does not prove appli
240
240
  | Model and effort changes carried by accepted prompts, including same-turn steering and next-turn fallback | core; model admission in Remy | Claude/Codex run regression suites, Remy compatibility tests | unit, cli, consumer; host and official Remy application settings smokes pass |
241
241
  | Claude compaction returns on acceptance, reports one correlated outcome, and defers steers while compacting | core | `claude-run.regression.test.ts`, `claude-compaction.cli.spec.ts` | CLI and official Remy application compaction/steer-order checks pass |
242
242
  | Provider setting controls precede input; failed changes retain accepted settings | core | run regressions and `claude-settings-change.cli.spec.ts` | new CLI checks passed |
243
- | Opt-in Codex active-turn switching and pinned protocol | core configuration, product chooses runtime | command mapper/provider regressions, generated 0.156.1 protocol | generation CI and host and official Remy Codex application settings smokes pass |
243
+ | Opt-in Codex active-turn switching and pinned protocol | core configuration, product chooses runtime | command mapper/provider regressions, generated 0.159.0 protocol | generation CI and host and official Remy Codex application settings smokes pass |
244
244
 
245
245
  ## Provider execution
246
246
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@meistrari/agent-core",
3
3
  "type": "module",
4
- "version": "0.2.0-experimental.4",
4
+ "version": "0.2.0-experimental.5",
5
5
  "packageManager": "bun@1.3.12",
6
6
  "description": "Shared contracts and runtime modules for Tela coding-agent sandboxes: agent protocol, supervisor wire protocol, resident supervisor, worker runtime client, and Claude/Codex harness adapters.",
7
7
  "license": "UNLICENSED",
@@ -103,7 +103,7 @@
103
103
  },
104
104
  "devDependencies": {
105
105
  "@antfu/eslint-config": "4.16.2",
106
- "@anthropic-ai/claude-agent-sdk": "0.3.280",
106
+ "@anthropic-ai/claude-agent-sdk": "0.3.284",
107
107
  "@anthropic-ai/sdk": "0.93.0",
108
108
  "@modelcontextprotocol/sdk": "1.29.0",
109
109
  "@types/bun": "1.3.12",
@@ -37,8 +37,8 @@ interface ResponseEntry {
37
37
  }
38
38
 
39
39
  const root = resolve(dirname(fileURLToPath(import.meta.url)), '..')
40
- const codexCliVersion = '0.156.1'
41
- const upstreamRef = '3d2ee51ca2d5db578f328aa75e20aa22c0197c9a'
40
+ const codexCliVersion = '0.159.0'
41
+ const upstreamRef = '687a119f0fcaace47e1f1abcc77cec6c813fd6da'
42
42
  const upstreamSchemaRoot = generateCodexSchemas()
43
43
  const upstreamJsonDir = join(upstreamSchemaRoot, 'json')
44
44
  const upstreamTypescriptDir = join(upstreamSchemaRoot, 'typescript')
@@ -640,6 +640,9 @@ function parseSupportedParamsType(rawTypeName: string): {
640
640
 
641
641
  function resolveResponseTypeName(method: string, paramsType: string | undefined, generatedSchemaNames: Set<string>): string {
642
642
  const overrides: { [method: string]: string } = {
643
+ 'account/gatewayOAuth/cancel': 'GatewayOAuthCancelResponse',
644
+ 'account/gatewayOAuth/login': 'GatewayOAuthLoginResponse',
645
+ 'account/gatewayOAuth/read': 'GatewayOAuthReadResponse',
643
646
  'account/logout': 'LogoutAccountResponse',
644
647
  'account/rateLimits/read': 'GetAccountRateLimitsResponse',
645
648
  'account/usage/read': 'GetAccountTokenUsageResponse',
@@ -168,6 +168,8 @@ export interface ClaudeEventMapperState {
168
168
  heldTurnEnd?: Extract<AgentEventDraft, { type: 'turn.ended' }>
169
169
  currentTurnId?: string
170
170
  currentCommandId?: string
171
+ /** An input the run never pushed (a scheduled task) started while no turn was open; the next turn is the provider's own. */
172
+ providerInitiatedInput?: true
171
173
  currentMessageId?: string
172
174
  currentCompactionId?: string
173
175
  }
@@ -859,7 +861,10 @@ function ensureTurnStarted(drafts: AgentEventDraft[], state: ClaudeEventMapperSt
859
861
  state.currentTurnId = createRuntimeTurnId()
860
862
  state.currentMessageId = undefined
861
863
  state.contentBlockTypeByIndex.clear()
862
- drafts.push({ type: 'turn.started', turnId: state.currentTurnId, actor: mainActor, payload: removeUndefined({ commandId: state.currentCommandId }) })
864
+ // A submitted input that also started wins: the turn then answers a command.
865
+ const providerInitiated = state.providerInitiatedInput && !state.currentCommandId ? true : undefined
866
+ state.providerInitiatedInput = undefined
867
+ drafts.push({ type: 'turn.started', turnId: state.currentTurnId, actor: mainActor, payload: removeUndefined({ commandId: state.currentCommandId, providerInitiated }) })
863
868
  }
864
869
  ensureSessionRunning(drafts, state)
865
870
  return state.currentTurnId
@@ -877,6 +882,7 @@ function endTurn(drafts: AgentEventDraft[], state: ClaudeEventMapperState): void
877
882
  state.interrupt = { status: 'none' }
878
883
  state.currentTurnId = undefined
879
884
  state.currentCommandId = undefined
885
+ state.providerInitiatedInput = undefined
880
886
  }
881
887
 
882
888
  /** Emits a superseded turn's held end as final: its steer will not continue it. */
@@ -224,6 +224,8 @@ export class ClaudeRun implements AgentRun {
224
224
  private modelChangeInFlight = false
225
225
  // Provider command identity by derived client message id, until its completed/negative receipt.
226
226
  private readonly commandByClientMessageId = new Map<string, string>()
227
+ // Every input this run pushed, until its lifecycle settles; any other started input is the CLI's own.
228
+ private readonly ownedInputIds = new Set<string>()
227
229
  // Prompts whose accepted user message has not been emitted into a turn yet.
228
230
  private readonly pendingMessages = new Map<string, { messageId: string, mode: 'next' | 'steer', turnId?: string, started: boolean }>()
229
231
 
@@ -988,11 +990,24 @@ export class ClaudeRun implements AgentRun {
988
990
  })
989
991
  }
990
992
  this.observeSessionContextLifecycle(parsed.data)
993
+ this.observeProviderInitiatedInput(parsed.data)
991
994
  const steerDrafts = this.observeSteerLifecycle(parsed.data)
992
995
  this.settleInputLifecycle(parsed.data)
993
996
  return steerDrafts
994
997
  }
995
998
 
999
+ // The CLI runs inputs of its own, such as a scheduled task firing. One that starts while no turn
1000
+ // is open opens a turn no command asked for; an owned input's receipt never marks it.
1001
+ private observeProviderInitiatedInput(frame: CommandLifecycleFrame): void {
1002
+ if (this.ownedInputIds.has(frame.command_uuid)) {
1003
+ if (frame.state !== 'queued' && frame.state !== 'started')
1004
+ this.ownedInputIds.delete(frame.command_uuid)
1005
+ return
1006
+ }
1007
+ if (frame.state === 'started' && !this.eventMapperState.turnStarted)
1008
+ this.eventMapperState.providerInitiatedInput = true
1009
+ }
1010
+
996
1011
  // A steer's receipts before system/init belong to the session's first input, which supersedes
997
1012
  // nothing; afterwards they drive the mapper's supersession of the running ask.
998
1013
  private observeSteerLifecycle(frame: CommandLifecycleFrame): AgentEventDraft[] {
@@ -1162,6 +1177,9 @@ export class ClaudeRun implements AgentRun {
1162
1177
  // The owned input queue rejects synchronously before enqueue when the stream is closed, so a
1163
1178
  // rejected push is proven non-delivery and safe to retry against a fresh run.
1164
1179
  private async pushOwnedStream(message: SDKUserMessage): Promise<void> {
1180
+ // Recorded before the push: the CLI's receipt can outrun the push resolution.
1181
+ if (message.uuid)
1182
+ this.ownedInputIds.add(message.uuid)
1165
1183
  try {
1166
1184
  await this.input.push(message)
1167
1185
  this.recordStartup?.('first_input_queued')
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable style/indent, style/member-delimiter-style, style/quotes, style/semi, style/quote-props */
2
2
  // This file is generated by scripts/generate-codex-protocol.ts. Do not edit manually.
3
- // Upstream Codex protocol ref: 3d2ee51ca2d5db578f328aa75e20aa22c0197c9a
3
+ // Upstream Codex protocol ref: 687a119f0fcaace47e1f1abcc77cec6c813fd6da
4
4
 
5
5
  import type * as CodexSchema from "./schema.gen.js";
6
6
 
@@ -112,6 +112,9 @@ export const CLIENT_REQUEST_METHODS = {
112
112
  "thread/realtime/listVoices": "thread/realtime/listVoices",
113
113
  "review/start": "review/start",
114
114
  "model/list": "model/list",
115
+ "account/gatewayOAuth/read": "account/gatewayOAuth/read",
116
+ "account/gatewayOAuth/login": "account/gatewayOAuth/login",
117
+ "account/gatewayOAuth/cancel": "account/gatewayOAuth/cancel",
115
118
  "modelProvider/capabilities/read": "modelProvider/capabilities/read",
116
119
  "experimentalFeature/list": "experimentalFeature/list",
117
120
  "permissionProfile/list": "permissionProfile/list",
@@ -241,6 +244,7 @@ export const SERVER_NOTIFICATION_METHODS = {
241
244
  "mcpServer/startupStatus/updated": "mcpServer/startupStatus/updated",
242
245
  "mcpServer/event/stream/notification": "mcpServer/event/stream/notification",
243
246
  "account/updated": "account/updated",
247
+ "account/gatewayOAuth/changed": "account/gatewayOAuth/changed",
244
248
  "account/rateLimits/updated": "account/rateLimits/updated",
245
249
  "app/list/updated": "app/list/updated",
246
250
  "remoteControl/status/changed": "remoteControl/status/changed",
@@ -392,6 +396,9 @@ export interface ClientRequestParamsByMethod {
392
396
  readonly "thread/realtime/listVoices": CodexSchema.V2ThreadRealtimeListVoicesParams;
393
397
  readonly "review/start": CodexSchema.V2ReviewStartParams;
394
398
  readonly "model/list": CodexSchema.V2ModelListParams;
399
+ readonly "account/gatewayOAuth/read": undefined;
400
+ readonly "account/gatewayOAuth/login": undefined;
401
+ readonly "account/gatewayOAuth/cancel": undefined;
395
402
  readonly "modelProvider/capabilities/read": CodexSchema.V2ModelProviderCapabilitiesReadParams;
396
403
  readonly "experimentalFeature/list": CodexSchema.V2ExperimentalFeatureListParams;
397
404
  readonly "permissionProfile/list": CodexSchema.V2PermissionProfileListParams;
@@ -562,6 +569,9 @@ export interface ClientRequestResponsesByMethod {
562
569
  readonly "thread/realtime/listVoices": CodexSchema.V2ThreadRealtimeListVoicesResponse;
563
570
  readonly "review/start": CodexSchema.V2ReviewStartResponse;
564
571
  readonly "model/list": CodexSchema.V2ModelListResponse;
572
+ readonly "account/gatewayOAuth/read": CodexSchema.V2GatewayOAuthReadResponse;
573
+ readonly "account/gatewayOAuth/login": CodexSchema.V2GatewayOAuthLoginResponse;
574
+ readonly "account/gatewayOAuth/cancel": CodexSchema.V2GatewayOAuthCancelResponse;
565
575
  readonly "modelProvider/capabilities/read": CodexSchema.V2ModelProviderCapabilitiesReadResponse;
566
576
  readonly "experimentalFeature/list": CodexSchema.V2ExperimentalFeatureListResponse;
567
577
  readonly "permissionProfile/list": CodexSchema.V2PermissionProfileListResponse;
@@ -705,6 +715,7 @@ export interface ServerNotificationParamsByMethod {
705
715
  readonly "mcpServer/startupStatus/updated": CodexSchema.V2McpServerStatusUpdatedNotification;
706
716
  readonly "mcpServer/event/stream/notification": CodexSchema.V2McpServerEventStreamNotification;
707
717
  readonly "account/updated": CodexSchema.V2AccountUpdatedNotification;
718
+ readonly "account/gatewayOAuth/changed": CodexSchema.V2GatewayOAuthChangedNotification;
708
719
  readonly "account/rateLimits/updated": CodexSchema.V2AccountRateLimitsUpdatedNotification;
709
720
  readonly "app/list/updated": CodexSchema.V2AppListUpdatedNotification;
710
721
  readonly "remoteControl/status/changed": CodexSchema.V2RemoteControlStatusChangedNotification;
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable style/indent, style/quotes, style/semi, style/quote-props */
2
2
  // This file is generated by scripts/generate-codex-protocol.ts. Do not edit manually.
3
- // Upstream Codex protocol ref: 3d2ee51ca2d5db578f328aa75e20aa22c0197c9a
3
+ // Upstream Codex protocol ref: 687a119f0fcaace47e1f1abcc77cec6c813fd6da
4
4
 
5
5
  export const v1 = {
6
6
  "InitializeParams": "V1InitializeParams",
@@ -93,6 +93,10 @@ export const v2 = {
93
93
  "FsWatchResponse": "V2FsWatchResponse",
94
94
  "FsWriteFileParams": "V2FsWriteFileParams",
95
95
  "FsWriteFileResponse": "V2FsWriteFileResponse",
96
+ "GatewayOAuthCancelResponse": "V2GatewayOAuthCancelResponse",
97
+ "GatewayOAuthChangedNotification": "V2GatewayOAuthChangedNotification",
98
+ "GatewayOAuthLoginResponse": "V2GatewayOAuthLoginResponse",
99
+ "GatewayOAuthReadResponse": "V2GatewayOAuthReadResponse",
96
100
  "GetAccountParams": "V2GetAccountParams",
97
101
  "GetAccountRateLimitsResponse": "V2GetAccountRateLimitsResponse",
98
102
  "GetAccountResponse": "V2GetAccountResponse",
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable style/indent, style/member-delimiter-style, style/quotes, style/semi, style/operator-linebreak, style/indent-binary-ops */
2
2
  // This file is generated by scripts/generate-codex-protocol.ts. Do not edit manually.
3
- // Upstream Codex protocol ref: 3d2ee51ca2d5db578f328aa75e20aa22c0197c9a
3
+ // Upstream Codex protocol ref: 687a119f0fcaace47e1f1abcc77cec6c813fd6da
4
4
 
5
5
  /**
6
6
  * This interface was referenced by `CodexSchema`'s JSON-Schema
@@ -479,6 +479,21 @@ export type ClientRequest__ThreadGoalStatus =
479
479
  * via the `definition` "ClientRequest__ThreadHistoryMode".
480
480
  */
481
481
  export type ClientRequest__ThreadHistoryMode = "legacy" | "paginated";
482
+ /**
483
+ * An exclusive item position within the requested visible turn.
484
+ *
485
+ * This interface was referenced by `CodexSchema`'s JSON-Schema
486
+ * via the `definition` "ClientRequest__ThreadItemsListAnchor".
487
+ */
488
+ export type ClientRequest__ThreadItemsListAnchor = ItemThreadItemsListAnchor;
489
+ export type ItemThreadItemsListAnchorType = "item";
490
+ /**
491
+ * Starting position for an item-history page.
492
+ *
493
+ * This interface was referenced by `CodexSchema`'s JSON-Schema
494
+ * via the `definition` "ClientRequest__ThreadItemsListCursor".
495
+ */
496
+ export type ClientRequest__ThreadItemsListCursor = string | ClientRequest__ThreadItemsListAnchor;
482
497
  /**
483
498
  * This interface was referenced by `CodexSchema`'s JSON-Schema
484
499
  * via the `definition` "ClientRequest__ThreadListCwdFilter".
@@ -673,6 +688,9 @@ export type ClientRequest =
673
688
  | ThreadRealtimeListVoicesRequest
674
689
  | ReviewStartRequest
675
690
  | ModelListRequest
691
+ | AccountGatewayOAuthReadRequest
692
+ | AccountGatewayOAuthLoginRequest
693
+ | AccountGatewayOAuthCancelRequest
676
694
  | ModelProviderCapabilitiesReadRequest
677
695
  | ExperimentalFeatureListRequest
678
696
  | PermissionProfileListRequest
@@ -837,6 +855,9 @@ export type ThreadTimelineListRequestMethod = "thread/timeline/list";
837
855
  export type ThreadRealtimeListVoicesRequestMethod = "thread/realtime/listVoices";
838
856
  export type ReviewStartRequestMethod = "review/start";
839
857
  export type ModelListRequestMethod = "model/list";
858
+ export type AccountGatewayOAuthReadRequestMethod = "account/gatewayOAuth/read";
859
+ export type AccountGatewayOAuthLoginRequestMethod = "account/gatewayOAuth/login";
860
+ export type AccountGatewayOAuthCancelRequestMethod = "account/gatewayOAuth/cancel";
840
861
  export type ModelProviderCapabilitiesReadRequestMethod = "modelProvider/capabilities/read";
841
862
  export type ExperimentalFeatureListRequestMethod = "experimentalFeature/list";
842
863
  export type PermissionProfileListRequestMethod = "permissionProfile/list";
@@ -1289,6 +1310,7 @@ export type ServerNotification__PlanType =
1289
1310
  | "plus"
1290
1311
  | "pro"
1291
1312
  | "prolite"
1313
+ | "promax"
1292
1314
  | "team"
1293
1315
  | "self_serve_business_prolite"
1294
1316
  | "self_serve_business_usage_based"
@@ -1404,9 +1426,11 @@ export type ServerNotification__CodexErrorInfo =
1404
1426
  | "sessionBudgetExceeded"
1405
1427
  | "usageLimitExceeded"
1406
1428
  | "rateLimitExceeded"
1429
+ | "flexUnavailable"
1407
1430
  | "serverOverloaded"
1408
1431
  | "cyberPolicy"
1409
1432
  | "misalignmentPolicyViolation"
1433
+ | "tooManyDenials"
1410
1434
  | "internalServerError"
1411
1435
  | "unauthorized"
1412
1436
  | "badRequest"
@@ -1556,6 +1580,11 @@ export type EncryptedContentFunctionCallOutputContentItemType1 = "encrypted_cont
1556
1580
  * via the `definition` "ServerNotification__FuzzyFileSearchMatchType".
1557
1581
  */
1558
1582
  export type ServerNotification__FuzzyFileSearchMatchType = "file" | "directory";
1583
+ /**
1584
+ * This interface was referenced by `CodexSchema`'s JSON-Schema
1585
+ * via the `definition` "ServerNotification__GatewayOAuthStatus".
1586
+ */
1587
+ export type ServerNotification__GatewayOAuthStatus = "notReady" | "started" | "succeeded" | "failed";
1559
1588
  /**
1560
1589
  * [UNSTABLE] Risk level assigned by approval auto-review.
1561
1590
  *
@@ -2029,6 +2058,7 @@ export type ServerNotification =
2029
2058
  | McpServerStartupStatusUpdatedNotification
2030
2059
  | McpServerEventStreamNotificationNotification
2031
2060
  | AccountUpdatedNotification
2061
+ | AccountGatewayOAuthChangedNotification
2032
2062
  | AccountRateLimitsUpdatedNotification
2033
2063
  | AppListUpdatedNotification
2034
2064
  | RemoteControlStatusChangedNotification
@@ -2111,6 +2141,7 @@ export type McpServerOauthLoginCompletedNotificationMethod = "mcpServer/oauthLog
2111
2141
  export type McpServerStartupStatusUpdatedNotificationMethod = "mcpServer/startupStatus/updated";
2112
2142
  export type McpServerEventStreamNotificationNotificationMethod = "mcpServer/event/stream/notification";
2113
2143
  export type AccountUpdatedNotificationMethod = "account/updated";
2144
+ export type AccountGatewayOAuthChangedNotificationMethod = "account/gatewayOAuth/changed";
2114
2145
  export type AccountRateLimitsUpdatedNotificationMethod = "account/rateLimits/updated";
2115
2146
  export type AppListUpdatedNotificationMethod = "app/list/updated";
2116
2147
  export type RemoteControlStatusChangedNotificationMethod = "remoteControl/status/changed";
@@ -2407,6 +2438,7 @@ export type V2AccountRateLimitsUpdatedNotification__PlanType =
2407
2438
  | "plus"
2408
2439
  | "pro"
2409
2440
  | "prolite"
2441
+ | "promax"
2410
2442
  | "team"
2411
2443
  | "self_serve_business_prolite"
2412
2444
  | "self_serve_business_usage_based"
@@ -2454,6 +2486,7 @@ export type V2AccountUpdatedNotification__PlanType =
2454
2486
  | "plus"
2455
2487
  | "pro"
2456
2488
  | "prolite"
2489
+ | "promax"
2457
2490
  | "team"
2458
2491
  | "self_serve_business_prolite"
2459
2492
  | "self_serve_business_usage_based"
@@ -2811,9 +2844,11 @@ export type V2ErrorNotification__CodexErrorInfo =
2811
2844
  | "sessionBudgetExceeded"
2812
2845
  | "usageLimitExceeded"
2813
2846
  | "rateLimitExceeded"
2847
+ | "flexUnavailable"
2814
2848
  | "serverOverloaded"
2815
2849
  | "cyberPolicy"
2816
2850
  | "misalignmentPolicyViolation"
2851
+ | "tooManyDenials"
2817
2852
  | "internalServerError"
2818
2853
  | "unauthorized"
2819
2854
  | "badRequest"
@@ -3038,6 +3073,16 @@ export type V2FsWatchResponse__AbsolutePathBuf = string;
3038
3073
  * via the `definition` "V2FsWriteFileParams__AbsolutePathBuf".
3039
3074
  */
3040
3075
  export type V2FsWriteFileParams__AbsolutePathBuf = string;
3076
+ /**
3077
+ * This interface was referenced by `CodexSchema`'s JSON-Schema
3078
+ * via the `definition` "V2GatewayOAuthChangedNotification__GatewayOAuthStatus".
3079
+ */
3080
+ export type V2GatewayOAuthChangedNotification__GatewayOAuthStatus = "notReady" | "started" | "succeeded" | "failed";
3081
+ /**
3082
+ * This interface was referenced by `CodexSchema`'s JSON-Schema
3083
+ * via the `definition` "V2GatewayOAuthReadResponse__GatewayOAuthStatus".
3084
+ */
3085
+ export type V2GatewayOAuthReadResponse__GatewayOAuthStatus = "notReady" | "started" | "succeeded" | "failed";
3041
3086
  /**
3042
3087
  * This interface was referenced by `CodexSchema`'s JSON-Schema
3043
3088
  * via the `definition` "V2GetAccountRateLimitsResponse__PlanType".
@@ -3048,6 +3093,7 @@ export type V2GetAccountRateLimitsResponse__PlanType =
3048
3093
  | "plus"
3049
3094
  | "pro"
3050
3095
  | "prolite"
3096
+ | "promax"
3051
3097
  | "team"
3052
3098
  | "self_serve_business_prolite"
3053
3099
  | "self_serve_business_usage_based"
@@ -3097,6 +3143,7 @@ export type V2GetAccountResponse__PlanType =
3097
3143
  | "plus"
3098
3144
  | "pro"
3099
3145
  | "prolite"
3146
+ | "promax"
3100
3147
  | "team"
3101
3148
  | "self_serve_business_prolite"
3102
3149
  | "self_serve_business_usage_based"
@@ -4951,9 +4998,11 @@ export type V2ReviewStartResponse__CodexErrorInfo =
4951
4998
  | "sessionBudgetExceeded"
4952
4999
  | "usageLimitExceeded"
4953
5000
  | "rateLimitExceeded"
5001
+ | "flexUnavailable"
4954
5002
  | "serverOverloaded"
4955
5003
  | "cyberPolicy"
4956
5004
  | "misalignmentPolicyViolation"
5005
+ | "tooManyDenials"
4957
5006
  | "internalServerError"
4958
5007
  | "unauthorized"
4959
5008
  | "badRequest"
@@ -5340,9 +5389,11 @@ export type V2ThreadForkResponse__CodexErrorInfo =
5340
5389
  | "sessionBudgetExceeded"
5341
5390
  | "usageLimitExceeded"
5342
5391
  | "rateLimitExceeded"
5392
+ | "flexUnavailable"
5343
5393
  | "serverOverloaded"
5344
5394
  | "cyberPolicy"
5345
5395
  | "misalignmentPolicyViolation"
5396
+ | "tooManyDenials"
5346
5397
  | "internalServerError"
5347
5398
  | "unauthorized"
5348
5399
  | "badRequest"
@@ -5683,6 +5734,21 @@ export type V2ThreadGoalUpdatedNotification__ThreadGoalStatus =
5683
5734
  * via the `definition` "V2ThreadItemsListParams__SortDirection".
5684
5735
  */
5685
5736
  export type V2ThreadItemsListParams__SortDirection = "asc" | "desc";
5737
+ /**
5738
+ * An exclusive item position within the requested visible turn.
5739
+ *
5740
+ * This interface was referenced by `CodexSchema`'s JSON-Schema
5741
+ * via the `definition` "V2ThreadItemsListParams__ThreadItemsListAnchor".
5742
+ */
5743
+ export type V2ThreadItemsListParams__ThreadItemsListAnchor = ItemThreadItemsListAnchor1;
5744
+ export type ItemThreadItemsListAnchorType1 = "item";
5745
+ /**
5746
+ * Starting position for an item-history page.
5747
+ *
5748
+ * This interface was referenced by `CodexSchema`'s JSON-Schema
5749
+ * via the `definition` "V2ThreadItemsListParams__ThreadItemsListCursor".
5750
+ */
5751
+ export type V2ThreadItemsListParams__ThreadItemsListCursor = string | V2ThreadItemsListParams__ThreadItemsListAnchor;
5686
5752
  /**
5687
5753
  * A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).
5688
5754
  *
@@ -5978,9 +6044,11 @@ export type V2ThreadListResponse__CodexErrorInfo =
5978
6044
  | "sessionBudgetExceeded"
5979
6045
  | "usageLimitExceeded"
5980
6046
  | "rateLimitExceeded"
6047
+ | "flexUnavailable"
5981
6048
  | "serverOverloaded"
5982
6049
  | "cyberPolicy"
5983
6050
  | "misalignmentPolicyViolation"
6051
+ | "tooManyDenials"
5984
6052
  | "internalServerError"
5985
6053
  | "unauthorized"
5986
6054
  | "badRequest"
@@ -6305,9 +6373,11 @@ export type V2ThreadMetadataUpdateResponse__CodexErrorInfo =
6305
6373
  | "sessionBudgetExceeded"
6306
6374
  | "usageLimitExceeded"
6307
6375
  | "rateLimitExceeded"
6376
+ | "flexUnavailable"
6308
6377
  | "serverOverloaded"
6309
6378
  | "cyberPolicy"
6310
6379
  | "misalignmentPolicyViolation"
6380
+ | "tooManyDenials"
6311
6381
  | "internalServerError"
6312
6382
  | "unauthorized"
6313
6383
  | "badRequest"
@@ -6696,9 +6766,11 @@ export type V2ThreadQueueStartResponse__CodexErrorInfo =
6696
6766
  | "sessionBudgetExceeded"
6697
6767
  | "usageLimitExceeded"
6698
6768
  | "rateLimitExceeded"
6769
+ | "flexUnavailable"
6699
6770
  | "serverOverloaded"
6700
6771
  | "cyberPolicy"
6701
6772
  | "misalignmentPolicyViolation"
6773
+ | "tooManyDenials"
6702
6774
  | "internalServerError"
6703
6775
  | "unauthorized"
6704
6776
  | "badRequest"
@@ -7025,9 +7097,11 @@ export type V2ThreadReadResponse__CodexErrorInfo =
7025
7097
  | "sessionBudgetExceeded"
7026
7098
  | "usageLimitExceeded"
7027
7099
  | "rateLimitExceeded"
7100
+ | "flexUnavailable"
7028
7101
  | "serverOverloaded"
7029
7102
  | "cyberPolicy"
7030
7103
  | "misalignmentPolicyViolation"
7104
+ | "tooManyDenials"
7031
7105
  | "internalServerError"
7032
7106
  | "unauthorized"
7033
7107
  | "badRequest"
@@ -7706,9 +7780,11 @@ export type V2ThreadResumeResponse__CodexErrorInfo =
7706
7780
  | "sessionBudgetExceeded"
7707
7781
  | "usageLimitExceeded"
7708
7782
  | "rateLimitExceeded"
7783
+ | "flexUnavailable"
7709
7784
  | "serverOverloaded"
7710
7785
  | "cyberPolicy"
7711
7786
  | "misalignmentPolicyViolation"
7787
+ | "tooManyDenials"
7712
7788
  | "internalServerError"
7713
7789
  | "unauthorized"
7714
7790
  | "badRequest"
@@ -8060,9 +8136,11 @@ export type V2ThreadRevertResponse__CodexErrorInfo =
8060
8136
  | "sessionBudgetExceeded"
8061
8137
  | "usageLimitExceeded"
8062
8138
  | "rateLimitExceeded"
8139
+ | "flexUnavailable"
8063
8140
  | "serverOverloaded"
8064
8141
  | "cyberPolicy"
8065
8142
  | "misalignmentPolicyViolation"
8143
+ | "tooManyDenials"
8066
8144
  | "internalServerError"
8067
8145
  | "unauthorized"
8068
8146
  | "badRequest"
@@ -8407,9 +8485,11 @@ export type V2ThreadSearchResponse__CodexErrorInfo =
8407
8485
  | "sessionBudgetExceeded"
8408
8486
  | "usageLimitExceeded"
8409
8487
  | "rateLimitExceeded"
8488
+ | "flexUnavailable"
8410
8489
  | "serverOverloaded"
8411
8490
  | "cyberPolicy"
8412
8491
  | "misalignmentPolicyViolation"
8492
+ | "tooManyDenials"
8413
8493
  | "internalServerError"
8414
8494
  | "unauthorized"
8415
8495
  | "badRequest"
@@ -8881,9 +8961,11 @@ export type V2ThreadStartedNotification__CodexErrorInfo =
8881
8961
  | "sessionBudgetExceeded"
8882
8962
  | "usageLimitExceeded"
8883
8963
  | "rateLimitExceeded"
8964
+ | "flexUnavailable"
8884
8965
  | "serverOverloaded"
8885
8966
  | "cyberPolicy"
8886
8967
  | "misalignmentPolicyViolation"
8968
+ | "tooManyDenials"
8887
8969
  | "internalServerError"
8888
8970
  | "unauthorized"
8889
8971
  | "badRequest"
@@ -9297,9 +9379,11 @@ export type V2ThreadStartResponse__CodexErrorInfo =
9297
9379
  | "sessionBudgetExceeded"
9298
9380
  | "usageLimitExceeded"
9299
9381
  | "rateLimitExceeded"
9382
+ | "flexUnavailable"
9300
9383
  | "serverOverloaded"
9301
9384
  | "cyberPolicy"
9302
9385
  | "misalignmentPolicyViolation"
9386
+ | "tooManyDenials"
9303
9387
  | "internalServerError"
9304
9388
  | "unauthorized"
9305
9389
  | "badRequest"
@@ -9654,9 +9738,11 @@ export type V2ThreadTimelineListResponse__CodexErrorInfo =
9654
9738
  | "sessionBudgetExceeded"
9655
9739
  | "usageLimitExceeded"
9656
9740
  | "rateLimitExceeded"
9741
+ | "flexUnavailable"
9657
9742
  | "serverOverloaded"
9658
9743
  | "cyberPolicy"
9659
9744
  | "misalignmentPolicyViolation"
9745
+ | "tooManyDenials"
9660
9746
  | "internalServerError"
9661
9747
  | "unauthorized"
9662
9748
  | "badRequest"
@@ -9988,9 +10074,11 @@ export type V2ThreadTurnsListResponse__CodexErrorInfo =
9988
10074
  | "sessionBudgetExceeded"
9989
10075
  | "usageLimitExceeded"
9990
10076
  | "rateLimitExceeded"
10077
+ | "flexUnavailable"
9991
10078
  | "serverOverloaded"
9992
10079
  | "cyberPolicy"
9993
10080
  | "misalignmentPolicyViolation"
10081
+ | "tooManyDenials"
9994
10082
  | "internalServerError"
9995
10083
  | "unauthorized"
9996
10084
  | "badRequest"
@@ -10269,9 +10357,11 @@ export type V2ThreadUnarchiveResponse__CodexErrorInfo =
10269
10357
  | "sessionBudgetExceeded"
10270
10358
  | "usageLimitExceeded"
10271
10359
  | "rateLimitExceeded"
10360
+ | "flexUnavailable"
10272
10361
  | "serverOverloaded"
10273
10362
  | "cyberPolicy"
10274
10363
  | "misalignmentPolicyViolation"
10364
+ | "tooManyDenials"
10275
10365
  | "internalServerError"
10276
10366
  | "unauthorized"
10277
10367
  | "badRequest"
@@ -10592,9 +10682,11 @@ export type V2TurnCompletedNotification__CodexErrorInfo =
10592
10682
  | "sessionBudgetExceeded"
10593
10683
  | "usageLimitExceeded"
10594
10684
  | "rateLimitExceeded"
10685
+ | "flexUnavailable"
10595
10686
  | "serverOverloaded"
10596
10687
  | "cyberPolicy"
10597
10688
  | "misalignmentPolicyViolation"
10689
+ | "tooManyDenials"
10598
10690
  | "internalServerError"
10599
10691
  | "unauthorized"
10600
10692
  | "badRequest"
@@ -10899,9 +10991,11 @@ export type V2TurnStartedNotification__CodexErrorInfo =
10899
10991
  | "sessionBudgetExceeded"
10900
10992
  | "usageLimitExceeded"
10901
10993
  | "rateLimitExceeded"
10994
+ | "flexUnavailable"
10902
10995
  | "serverOverloaded"
10903
10996
  | "cyberPolicy"
10904
10997
  | "misalignmentPolicyViolation"
10998
+ | "tooManyDenials"
10905
10999
  | "internalServerError"
10906
11000
  | "unauthorized"
10907
11001
  | "badRequest"
@@ -11311,9 +11405,11 @@ export type V2TurnStartResponse__CodexErrorInfo =
11311
11405
  | "sessionBudgetExceeded"
11312
11406
  | "usageLimitExceeded"
11313
11407
  | "rateLimitExceeded"
11408
+ | "flexUnavailable"
11314
11409
  | "serverOverloaded"
11315
11410
  | "cyberPolicy"
11316
11411
  | "misalignmentPolicyViolation"
11412
+ | "tooManyDenials"
11317
11413
  | "internalServerError"
11318
11414
  | "unauthorized"
11319
11415
  | "badRequest"
@@ -12235,6 +12331,7 @@ export interface NamespaceDynamicToolSpec {
12235
12331
  * via the `definition` "ClientRequest__EnvironmentAddParams".
12236
12332
  */
12237
12333
  export interface ClientRequest__EnvironmentAddParams {
12334
+ authBearerToken?: string | null;
12238
12335
  connectTimeoutMs?: number | null;
12239
12336
  environmentId: string;
12240
12337
  execServerUrl: string;
@@ -12711,6 +12808,10 @@ export interface ClientRequest__InitializeCapabilities {
12711
12808
  * Opt into receiving experimental API methods and fields.
12712
12809
  */
12713
12810
  experimentalApi?: boolean;
12811
+ /**
12812
+ * Use explicit gateway OAuth login instead of automatic browser authorization. Applies to this app-server's gateway runtime; later connections cannot undo it.
12813
+ */
12814
+ explicitGatewayOauth?: boolean;
12714
12815
  extensions?: {
12715
12816
  [k: string]: unknown;
12716
12817
  } | null;
@@ -12759,6 +12860,7 @@ export interface ClientRequest__ListMcpServerStatusParams {
12759
12860
  */
12760
12861
  detail?: ClientRequest__McpServerStatusDetail | null;
12761
12862
  limit?: number | null;
12863
+ serverName?: string | null;
12762
12864
  threadId?: string | null;
12763
12865
  [k: string]: unknown;
12764
12866
  }
@@ -12859,10 +12961,23 @@ export interface ClientRequest__McpResourceReadParams {
12859
12961
  connectorId?: string | null;
12860
12962
  originCallId?: string | null;
12861
12963
  server: string;
12964
+ /**
12965
+ * Explicit hosted app/account. Omit to retain legacy resource discovery.
12966
+ */
12967
+ target?: ClientRequest__McpResourceReadTarget | null;
12862
12968
  threadId?: string | null;
12863
12969
  uri: string;
12864
12970
  [k: string]: unknown;
12865
12971
  }
12972
+ /**
12973
+ * This interface was referenced by `CodexSchema`'s JSON-Schema
12974
+ * via the `definition` "ClientRequest__McpResourceReadTarget".
12975
+ */
12976
+ export interface ClientRequest__McpResourceReadTarget {
12977
+ connectorId: string;
12978
+ linkId: string | null;
12979
+ [k: string]: unknown;
12980
+ }
12866
12981
  /**
12867
12982
  * This interface was referenced by `CodexSchema`'s JSON-Schema
12868
12983
  * via the `definition` "ClientRequest__McpServerEventStreamStartParams".
@@ -13869,12 +13984,20 @@ export interface ClientRequest__ThreadInjectItemsParams {
13869
13984
  threadId: string;
13870
13985
  [k: string]: unknown;
13871
13986
  }
13987
+ export interface ItemThreadItemsListAnchor {
13988
+ itemId: string;
13989
+ type: ItemThreadItemsListAnchorType;
13990
+ [k: string]: unknown;
13991
+ }
13872
13992
  /**
13873
13993
  * This interface was referenced by `CodexSchema`'s JSON-Schema
13874
13994
  * via the `definition` "ClientRequest__ThreadItemsListParams".
13875
13995
  */
13876
13996
  export interface ClientRequest__ThreadItemsListParams {
13877
- cursor?: string | null;
13997
+ /**
13998
+ * Opaque continuation cursor or an exclusive item anchor in the requested visible turn. An item anchor requires a non-empty `turnId`; ascending (the default) returns items after it, and descending returns items before it. Continue with the returned string cursor.
13999
+ */
14000
+ cursor?: ClientRequest__ThreadItemsListCursor | null;
13878
14001
  limit?: number | null;
13879
14002
  /**
13880
14003
  * Optional item pagination direction; defaults to ascending.
@@ -14149,6 +14272,10 @@ export interface ClientRequest__ThreadRealtimeListVoicesParams {
14149
14272
  * via the `definition` "ClientRequest__ThreadRealtimeStartParams".
14150
14273
  */
14151
14274
  export interface ClientRequest__ThreadRealtimeStartParams {
14275
+ /**
14276
+ * Relays public reasoning summaries as quiet context for realtime V3 delegations. Defaults to false.
14277
+ */
14278
+ backendReasoningStatus?: boolean;
14152
14279
  clientManagedHandoffs?: boolean | null;
14153
14280
  codexResponseHandoffChannelPrefixes?: {
14154
14281
  [k: string]: string[];
@@ -15446,6 +15573,24 @@ export interface ModelListRequest {
15446
15573
  params: ClientRequest__ModelListParams;
15447
15574
  [k: string]: unknown;
15448
15575
  }
15576
+ export interface AccountGatewayOAuthReadRequest {
15577
+ id: ClientRequest__RequestId;
15578
+ method: AccountGatewayOAuthReadRequestMethod;
15579
+ params?: null;
15580
+ [k: string]: unknown;
15581
+ }
15582
+ export interface AccountGatewayOAuthLoginRequest {
15583
+ id: ClientRequest__RequestId;
15584
+ method: AccountGatewayOAuthLoginRequestMethod;
15585
+ params?: null;
15586
+ [k: string]: unknown;
15587
+ }
15588
+ export interface AccountGatewayOAuthCancelRequest {
15589
+ id: ClientRequest__RequestId;
15590
+ method: AccountGatewayOAuthCancelRequestMethod;
15591
+ params?: null;
15592
+ [k: string]: unknown;
15593
+ }
15449
15594
  export interface ModelProviderCapabilitiesReadRequest {
15450
15595
  id: ClientRequest__RequestId;
15451
15596
  method: ModelProviderCapabilitiesReadRequestMethod;
@@ -17540,6 +17685,17 @@ export interface ServerNotification__FuzzyFileSearchSessionUpdatedNotification {
17540
17685
  sessionId: string;
17541
17686
  [k: string]: unknown;
17542
17687
  }
17688
+ /**
17689
+ * This interface was referenced by `CodexSchema`'s JSON-Schema
17690
+ * via the `definition` "ServerNotification__GatewayOAuthChangedNotification".
17691
+ */
17692
+ export interface ServerNotification__GatewayOAuthChangedNotification {
17693
+ authUrl?: string | null;
17694
+ error?: string | null;
17695
+ providerId: string;
17696
+ status: ServerNotification__GatewayOAuthStatus;
17697
+ [k: string]: unknown;
17698
+ }
17543
17699
  /**
17544
17700
  * This interface was referenced by `CodexSchema`'s JSON-Schema
17545
17701
  * via the `definition` "ServerNotification__GitInfo".
@@ -18612,7 +18768,7 @@ export interface ServerNotification__Turn {
18612
18768
  completedAt?: number | null;
18613
18769
  durationMs?: number | null;
18614
18770
  /**
18615
- * Only populated when the Turn's status is failed.
18771
+ * Error associated with a failed or interrupted turn.
18616
18772
  */
18617
18773
  error?: ServerNotification__TurnError | null;
18618
18774
  /**
@@ -19353,6 +19509,11 @@ export interface AccountUpdatedNotification {
19353
19509
  params: ServerNotification__AccountUpdatedNotification;
19354
19510
  [k: string]: unknown;
19355
19511
  }
19512
+ export interface AccountGatewayOAuthChangedNotification {
19513
+ method: AccountGatewayOAuthChangedNotificationMethod;
19514
+ params: ServerNotification__GatewayOAuthChangedNotification;
19515
+ [k: string]: unknown;
19516
+ }
19356
19517
  export interface AccountRateLimitsUpdatedNotification {
19357
19518
  method: AccountRateLimitsUpdatedNotificationMethod;
19358
19519
  params: ServerNotification__AccountRateLimitsUpdatedNotification;
@@ -20226,6 +20387,10 @@ export interface V1InitializeParams__InitializeCapabilities {
20226
20387
  * Opt into receiving experimental API methods and fields.
20227
20388
  */
20228
20389
  experimentalApi?: boolean;
20390
+ /**
20391
+ * Use explicit gateway OAuth login instead of automatic browser authorization. Applies to this app-server's gateway runtime; later connections cannot undo it.
20392
+ */
20393
+ explicitGatewayOauth?: boolean;
20229
20394
  extensions?: {
20230
20395
  [k: string]: unknown;
20231
20396
  } | null;
@@ -21931,6 +22096,7 @@ export interface V2DeprecationNoticeNotification {
21931
22096
  * via the `definition` "V2EnvironmentAddParams".
21932
22097
  */
21933
22098
  export interface V2EnvironmentAddParams {
22099
+ authBearerToken?: string | null;
21934
22100
  connectTimeoutMs?: number | null;
21935
22101
  environmentId: string;
21936
22102
  execServerUrl: string;
@@ -22965,6 +23131,51 @@ export interface V2FsWriteFileParams {
22965
23131
  export interface V2FsWriteFileResponse {
22966
23132
  [k: string]: unknown;
22967
23133
  }
23134
+ /**
23135
+ * This interface was referenced by `CodexSchema`'s JSON-Schema
23136
+ * via the `definition` "V2GatewayOAuthCancelResponse".
23137
+ */
23138
+ export interface V2GatewayOAuthCancelResponse {
23139
+ [k: string]: unknown;
23140
+ }
23141
+ /**
23142
+ * This interface was referenced by `CodexSchema`'s JSON-Schema
23143
+ * via the `definition` "V2GatewayOAuthChangedNotification".
23144
+ */
23145
+ export interface V2GatewayOAuthChangedNotification {
23146
+ authUrl?: string | null;
23147
+ error?: string | null;
23148
+ providerId: string;
23149
+ status: V2GatewayOAuthChangedNotification__GatewayOAuthStatus;
23150
+ [k: string]: unknown;
23151
+ }
23152
+ /**
23153
+ * This interface was referenced by `CodexSchema`'s JSON-Schema
23154
+ * via the `definition` "V2GatewayOAuthLoginResponse".
23155
+ */
23156
+ export interface V2GatewayOAuthLoginResponse {
23157
+ [k: string]: unknown;
23158
+ }
23159
+ /**
23160
+ * Current effective gateway policy and credential readiness; never contains credentials.
23161
+ *
23162
+ * This interface was referenced by `CodexSchema`'s JSON-Schema
23163
+ * via the `definition` "V2GatewayOAuthReadResponse".
23164
+ */
23165
+ export interface V2GatewayOAuthReadResponse {
23166
+ error?: string | null;
23167
+ providerId: string;
23168
+ providerName: string;
23169
+ /**
23170
+ * Whether the selected provider uses gateway OAuth, even when already signed in.
23171
+ */
23172
+ required: boolean;
23173
+ /**
23174
+ * Null when the effective provider does not use gateway OAuth.
23175
+ */
23176
+ status?: V2GatewayOAuthReadResponse__GatewayOAuthStatus | null;
23177
+ [k: string]: unknown;
23178
+ }
22968
23179
  /**
22969
23180
  * This interface was referenced by `CodexSchema`'s JSON-Schema
22970
23181
  * via the `definition` "V2GetAccountParams".
@@ -24655,6 +24866,7 @@ export interface V2ListMcpServerStatusParams {
24655
24866
  */
24656
24867
  detail?: V2ListMcpServerStatusParams__McpServerStatusDetail | null;
24657
24868
  limit?: number | null;
24869
+ serverName?: string | null;
24658
24870
  threadId?: string | null;
24659
24871
  [k: string]: unknown;
24660
24872
  }
@@ -24679,6 +24891,7 @@ export interface V2ListMcpServerStatusResponse__McpServerInfo {
24679
24891
  */
24680
24892
  export interface V2ListMcpServerStatusResponse__McpServerStatus {
24681
24893
  authStatus: V2ListMcpServerStatusResponse__McpAuthStatus;
24894
+ httpOrigin?: string | null;
24682
24895
  name: string;
24683
24896
  pluginId?: string | null;
24684
24897
  resourceTemplates: V2ListMcpServerStatusResponse__ResourceTemplate[];
@@ -24916,6 +25129,15 @@ export interface V2MarketplaceUpgradeResponse {
24916
25129
  upgradedRoots: V2MarketplaceUpgradeResponse__AbsolutePathBuf[];
24917
25130
  [k: string]: unknown;
24918
25131
  }
25132
+ /**
25133
+ * This interface was referenced by `CodexSchema`'s JSON-Schema
25134
+ * via the `definition` "V2McpResourceReadParams__McpResourceReadTarget".
25135
+ */
25136
+ export interface V2McpResourceReadParams__McpResourceReadTarget {
25137
+ connectorId: string;
25138
+ linkId: string | null;
25139
+ [k: string]: unknown;
25140
+ }
24919
25141
  /**
24920
25142
  * This interface was referenced by `CodexSchema`'s JSON-Schema
24921
25143
  * via the `definition` "V2McpResourceReadParams".
@@ -24924,6 +25146,10 @@ export interface V2McpResourceReadParams {
24924
25146
  connectorId?: string | null;
24925
25147
  originCallId?: string | null;
24926
25148
  server: string;
25149
+ /**
25150
+ * Explicit hosted app/account. Omit to retain legacy resource discovery.
25151
+ */
25152
+ target?: V2McpResourceReadParams__McpResourceReadTarget | null;
24927
25153
  threadId?: string | null;
24928
25154
  uri: string;
24929
25155
  [k: string]: unknown;
@@ -28137,7 +28363,7 @@ export interface V2ReviewStartResponse__Turn {
28137
28363
  completedAt?: number | null;
28138
28364
  durationMs?: number | null;
28139
28365
  /**
28140
- * Only populated when the Turn's status is failed.
28366
+ * Error associated with a failed or interrupted turn.
28141
28367
  */
28142
28368
  error?: V2ReviewStartResponse__TurnError | null;
28143
28369
  /**
@@ -29281,7 +29507,7 @@ export interface V2ThreadForkResponse__Turn {
29281
29507
  completedAt?: number | null;
29282
29508
  durationMs?: number | null;
29283
29509
  /**
29284
- * Only populated when the Turn's status is failed.
29510
+ * Error associated with a failed or interrupted turn.
29285
29511
  */
29286
29512
  error?: V2ThreadForkResponse__TurnError | null;
29287
29513
  /**
@@ -29791,12 +30017,20 @@ export interface V2ThreadInjectItemsParams {
29791
30017
  export interface V2ThreadInjectItemsResponse {
29792
30018
  [k: string]: unknown;
29793
30019
  }
30020
+ export interface ItemThreadItemsListAnchor1 {
30021
+ itemId: string;
30022
+ type: ItemThreadItemsListAnchorType1;
30023
+ [k: string]: unknown;
30024
+ }
29794
30025
  /**
29795
30026
  * This interface was referenced by `CodexSchema`'s JSON-Schema
29796
30027
  * via the `definition` "V2ThreadItemsListParams".
29797
30028
  */
29798
30029
  export interface V2ThreadItemsListParams {
29799
- cursor?: string | null;
30030
+ /**
30031
+ * Opaque continuation cursor or an exclusive item anchor in the requested visible turn. An item anchor requires a non-empty `turnId`; ascending (the default) returns items after it, and descending returns items before it. Continue with the returned string cursor.
30032
+ */
30033
+ cursor?: V2ThreadItemsListParams__ThreadItemsListCursor | null;
29800
30034
  limit?: number | null;
29801
30035
  /**
29802
30036
  * Optional item pagination direction; defaults to ascending.
@@ -30283,7 +30517,9 @@ export interface ContextCompactionThreadItem5 {
30283
30517
  * via the `definition` "V2ThreadItemsListResponse__ThreadItemEntry".
30284
30518
  */
30285
30519
  export interface V2ThreadItemsListResponse__ThreadItemEntry {
30520
+ completedAtMs?: number | null;
30286
30521
  item: V2ThreadItemsListResponse__ThreadItem;
30522
+ startedAtMs?: number | null;
30287
30523
  /**
30288
30524
  * Turn containing this item.
30289
30525
  */
@@ -30797,7 +31033,7 @@ export interface V2ThreadListResponse__Turn {
30797
31033
  completedAt?: number | null;
30798
31034
  durationMs?: number | null;
30799
31035
  /**
30800
- * Only populated when the Turn's status is failed.
31036
+ * Error associated with a failed or interrupted turn.
30801
31037
  */
30802
31038
  error?: V2ThreadListResponse__TurnError | null;
30803
31039
  /**
@@ -31636,7 +31872,7 @@ export interface V2ThreadMetadataUpdateResponse__Turn {
31636
31872
  completedAt?: number | null;
31637
31873
  durationMs?: number | null;
31638
31874
  /**
31639
- * Only populated when the Turn's status is failed.
31875
+ * Error associated with a failed or interrupted turn.
31640
31876
  */
31641
31877
  error?: V2ThreadMetadataUpdateResponse__TurnError | null;
31642
31878
  /**
@@ -32815,7 +33051,7 @@ export interface V2ThreadQueueStartResponse__Turn {
32815
33051
  completedAt?: number | null;
32816
33052
  durationMs?: number | null;
32817
33053
  /**
32818
- * Only populated when the Turn's status is failed.
33054
+ * Error associated with a failed or interrupted turn.
32819
33055
  */
32820
33056
  error?: V2ThreadQueueStartResponse__TurnError | null;
32821
33057
  /**
@@ -33491,7 +33727,7 @@ export interface V2ThreadReadResponse__Turn {
33491
33727
  completedAt?: number | null;
33492
33728
  durationMs?: number | null;
33493
33729
  /**
33494
- * Only populated when the Turn's status is failed.
33730
+ * Error associated with a failed or interrupted turn.
33495
33731
  */
33496
33732
  error?: V2ThreadReadResponse__TurnError | null;
33497
33733
  /**
@@ -34132,6 +34368,10 @@ export interface ExistingCallThreadRealtimeStartTransport1 {
34132
34368
  * via the `definition` "V2ThreadRealtimeStartParams".
34133
34369
  */
34134
34370
  export interface V2ThreadRealtimeStartParams {
34371
+ /**
34372
+ * Relays public reasoning summaries as quiet context for realtime V3 delegations. Defaults to false.
34373
+ */
34374
+ backendReasoningStatus?: boolean;
34135
34375
  clientManagedHandoffs?: boolean | null;
34136
34376
  codexResponseHandoffChannelPrefixes?: {
34137
34377
  [k: string]: string[];
@@ -35097,7 +35337,7 @@ export interface V2ThreadResumeResponse__Turn {
35097
35337
  completedAt?: number | null;
35098
35338
  durationMs?: number | null;
35099
35339
  /**
35100
- * Only populated when the Turn's status is failed.
35340
+ * Error associated with a failed or interrupted turn.
35101
35341
  */
35102
35342
  error?: V2ThreadResumeResponse__TurnError | null;
35103
35343
  /**
@@ -35951,7 +36191,7 @@ export interface V2ThreadRevertResponse__Turn {
35951
36191
  completedAt?: number | null;
35952
36192
  durationMs?: number | null;
35953
36193
  /**
35954
- * Only populated when the Turn's status is failed.
36194
+ * Error associated with a failed or interrupted turn.
35955
36195
  */
35956
36196
  error?: V2ThreadRevertResponse__TurnError | null;
35957
36197
  /**
@@ -36820,7 +37060,7 @@ export interface V2ThreadSearchResponse__Turn {
36820
37060
  completedAt?: number | null;
36821
37061
  durationMs?: number | null;
36822
37062
  /**
36823
- * Only populated when the Turn's status is failed.
37063
+ * Error associated with a failed or interrupted turn.
36824
37064
  */
36825
37065
  error?: V2ThreadSearchResponse__TurnError | null;
36826
37066
  /**
@@ -38103,7 +38343,7 @@ export interface V2ThreadStartedNotification__Turn {
38103
38343
  completedAt?: number | null;
38104
38344
  durationMs?: number | null;
38105
38345
  /**
38106
- * Only populated when the Turn's status is failed.
38346
+ * Error associated with a failed or interrupted turn.
38107
38347
  */
38108
38348
  error?: V2ThreadStartedNotification__TurnError | null;
38109
38349
  /**
@@ -39058,7 +39298,7 @@ export interface V2ThreadStartResponse__Turn {
39058
39298
  completedAt?: number | null;
39059
39299
  durationMs?: number | null;
39060
39300
  /**
39061
- * Only populated when the Turn's status is failed.
39301
+ * Error associated with a failed or interrupted turn.
39062
39302
  */
39063
39303
  error?: V2ThreadStartResponse__TurnError | null;
39064
39304
  /**
@@ -40664,7 +40904,7 @@ export interface V2ThreadTurnsListResponse__Turn {
40664
40904
  completedAt?: number | null;
40665
40905
  durationMs?: number | null;
40666
40906
  /**
40667
- * Only populated when the Turn's status is failed.
40907
+ * Error associated with a failed or interrupted turn.
40668
40908
  */
40669
40909
  error?: V2ThreadTurnsListResponse__TurnError | null;
40670
40910
  /**
@@ -41186,7 +41426,7 @@ export interface V2ThreadUnarchiveResponse__Turn {
41186
41426
  completedAt?: number | null;
41187
41427
  durationMs?: number | null;
41188
41428
  /**
41189
- * Only populated when the Turn's status is failed.
41429
+ * Error associated with a failed or interrupted turn.
41190
41430
  */
41191
41431
  error?: V2ThreadUnarchiveResponse__TurnError | null;
41192
41432
  /**
@@ -42058,7 +42298,7 @@ export interface V2TurnCompletedNotification__Turn {
42058
42298
  completedAt?: number | null;
42059
42299
  durationMs?: number | null;
42060
42300
  /**
42061
- * Only populated when the Turn's status is failed.
42301
+ * Error associated with a failed or interrupted turn.
42062
42302
  */
42063
42303
  error?: V2TurnCompletedNotification__TurnError | null;
42064
42304
  /**
@@ -42733,7 +42973,7 @@ export interface V2TurnStartedNotification__Turn {
42733
42973
  completedAt?: number | null;
42734
42974
  durationMs?: number | null;
42735
42975
  /**
42736
- * Only populated when the Turn's status is failed.
42976
+ * Error associated with a failed or interrupted turn.
42737
42977
  */
42738
42978
  error?: V2TurnStartedNotification__TurnError | null;
42739
42979
  /**
@@ -43564,7 +43804,7 @@ export interface V2TurnStartResponse__Turn {
43564
43804
  completedAt?: number | null;
43565
43805
  durationMs?: number | null;
43566
43806
  /**
43567
- * Only populated when the Turn's status is failed.
43807
+ * Error associated with a failed or interrupted turn.
43568
43808
  */
43569
43809
  error?: V2TurnStartResponse__TurnError | null;
43570
43810
  /**
@@ -19,7 +19,7 @@ export const selectableCodexModelIds = codexModelIds
19
19
  /** Verified available to the configured Claude subscription through `supportedModels()`. */
20
20
  export const selectableClaudeModelIds = [
21
21
  'claude-opus-5-5',
22
- 'claude-sonnet-5',
22
+ 'claude-sonnet-5-5',
23
23
  'claude-fable-5-1',
24
24
  ] as const
25
25
 
@@ -170,7 +170,9 @@ export const sessionEndedAgentEventSchema = agentSessionEventBaseSchema.extend({
170
170
 
171
171
  export const turnStartedAgentEventSchema = agentTurnEventBaseSchema.extend({
172
172
  type: z.literal('turn.started'),
173
- payload: z.object({ commandId: z.string().min(1).optional() }),
173
+ // `providerInitiated`: the provider started the turn from an input no command submitted (a
174
+ // scheduled task firing), so the turn carries no command and answers none.
175
+ payload: z.object({ commandId: z.string().min(1).optional(), providerInitiated: z.literal(true).optional() }),
174
176
  })
175
177
 
176
178
  // Provider-confirmed input consumption; distinct from acceptance receipts.
@@ -9,6 +9,7 @@ import z from 'zod'
9
9
  */
10
10
  export const codexModelIds = [
11
11
  'gpt-6-astra',
12
+ 'gpt-6.1-sol',
12
13
  'gpt-5.6-sol',
13
14
  'gpt-5.6-terra',
14
15
  'gpt-5.6-luna',
@@ -25,6 +26,7 @@ export const codexModelIds = [
25
26
  */
26
27
  export const claudeModelIds = [
27
28
  'claude-opus-5-5',
29
+ 'claude-sonnet-5-5',
28
30
  'claude-sonnet-5',
29
31
  'claude-fable-5-1',
30
32
  'claude-opus-5',
@@ -8,7 +8,7 @@ import type { KnownCodexModelId } from './agent-model'
8
8
  * `Record` types below fail to compile until every identifier is covered.
9
9
  *
10
10
  * Labels, descriptions, and image support follow the non-hidden `model/list`
11
- * catalog observed through Codex 0.153.4. Context windows use its model metadata's
11
+ * catalog observed through Codex 0.159.0. Context windows use its model metadata's
12
12
  * default `context_window`, not the opt-in `max_context_window`.
13
13
  * Refresh alongside the model registry; the live catalog can change without a CLI
14
14
  * upgrade. Relative cost weights are product-owned, not provider-reported prices.
@@ -39,6 +39,13 @@ export const codexModelPresentation: Record<KnownCodexModelId, AgentModelPresent
39
39
  maxInputTokens: CODEX_CONTEXT_WINDOW,
40
40
  isMultiModal: true,
41
41
  },
42
+ 'gpt-6.1-sol': {
43
+ label: 'GPT 6.1 Sol',
44
+ description: 'Latest workhorse model for coding and everyday work.',
45
+ relativeCost: 4,
46
+ maxInputTokens: CODEX_CONTEXT_WINDOW,
47
+ isMultiModal: true,
48
+ },
42
49
  'gpt-5.6-sol': {
43
50
  label: 'GPT 5.6 Sol',
44
51
  description: 'Reliable agentic workhorse for everyday tasks.',
@@ -93,7 +100,7 @@ export const codexModelPresentation: Record<KnownCodexModelId, AgentModelPresent
93
100
  /*
94
101
  * Claude presentation covers the selectable ids only (`agent-catalog.ts`); historical wire
95
102
  * ids render through the unknown-model fallback. Labels, context windows, output limits,
96
- * and image support follow the model catalog baked into Claude Code 2.1.280, the CLI the
103
+ * and image support follow the model catalog baked into Claude Code 2.1.284, the CLI the
97
104
  * sandbox image pins. Relative cost follows that catalog's pricing tiers on the same
98
105
  * product-owned 1–5 scale as Codex.
99
106
  */
@@ -108,12 +115,12 @@ export const claudeModelPresentation: Record<SelectableClaudeModelId, AgentModel
108
115
  maxOutputTokens: 128_000,
109
116
  isMultiModal: true,
110
117
  },
111
- 'claude-sonnet-5': {
112
- label: 'Sonnet 5',
118
+ 'claude-sonnet-5-5': {
119
+ label: 'Sonnet 5.5',
113
120
  description: 'Efficient for routine coding tasks.',
114
121
  relativeCost: 2,
115
122
  maxInputTokens: CLAUDE_CONTEXT_WINDOW,
116
- maxOutputTokens: 64_000,
123
+ maxOutputTokens: 128_000,
117
124
  isMultiModal: true,
118
125
  },
119
126
  'claude-fable-5-1': {
@@ -1,6 +1,6 @@
1
1
  // Generated by scripts/write-provenance.ts. Do not edit by hand.
2
2
  export const generatedProvenance = {
3
- version: "0.2.0-experimental.4",
4
- sha: "432a69b2d7243b7d5c6651229bf2f005e94afad7",
5
- buildTime: "2026-09-29T14:26:10.056Z",
3
+ version: "0.2.0-experimental.5",
4
+ sha: "eea347fec63bc912885e3201e6463cfcfead865b",
5
+ buildTime: "2026-09-29T19:55:41.637Z",
6
6
  } as const