The best way to control Claude Code, Codex and more from any computer or phone
feat(codex): regenerate protocol bindings for Codex 0.159 (#14311)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Julius Marminge committed
Sep 29, 2026 at 13:31 UTC
422248515a1eebff607b44d5abef91e13f6228fc
5 files changed
+515
-93
apps/server/src/provider/model-manifest.json
+12
-2
@@ -1,10 +1,20 @@
1
{
2
"version": 1,
3
- "updatedAt": "2026-09-29T01:03:44Z",
3
+ "updatedAt": "2026-09-29T20:20:00Z",
4
"compatibility": [
5
{
6
"driver": "codex",
7
- "t3CodeRange": ">=0.0.42",
7
+ "t3CodeRange": ">=0.0.44",
8
+ "recommendedRange": ">=0.159.0",
9
+ "ranges": [
10
+ { "range": ">=0.156.0", "status": "supported" },
11
+ { "range": ">=0.149.0 <0.156.0", "status": "unsupported" },
12
+ { "range": "<0.149.0", "status": "broken" }
13
+ ]
14
+ },
15
+ {
16
+ "driver": "codex",
17
+ "t3CodeRange": ">=0.0.42 <0.0.44",
18
"recommendedRange": ">=0.156.0",
19
"ranges": [
20
{ "range": ">=0.156.0", "status": "supported" },
packages/effect-codex-app-server/scripts/generate.ts
+4
-1
@@ -17,7 +17,7 @@ import {
17
} from "effect/unstable/http";
18
import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process";
19
20
-const UPSTREAM_REF = "fe74a774532af67b5a4a3dec03ce9469e17f89af";
20
+const UPSTREAM_REF = "687a119f0fcaace47e1f1abcc77cec6c813fd6da";
21
const USER_AGENT = "effect-codex-app-server-generator";
22
const GITHUB_API_BASE =
23
"https://api.github.com/repos/openai/codex/contents/codex-rs/app-server-protocol";
@@ -437,6 +437,9 @@ function resolveResponseTypeName(
437
generatedSchemaNames: ReadonlySet<string>,
438
): string {
439
const overrides: Record<string, string> = {
440
+ "account/gatewayOAuth/cancel": "GatewayOAuthCancelResponse",
441
+ "account/gatewayOAuth/login": "GatewayOAuthLoginResponse",
442
+ "account/gatewayOAuth/read": "GatewayOAuthReadResponse",
443
"account/logout": "LogoutAccountResponse",
444
"account/rateLimits/read": "GetAccountRateLimitsResponse",
445
"account/usage/read": "GetAccountTokenUsageResponse",
packages/effect-codex-app-server/src/_generated/meta.gen.ts
+19
-1
@@ -1,5 +1,5 @@
1
// This file is generated by the effect-codex-app-server package. Do not edit manually.
2
-// Upstream protocol ref: fe74a774532af67b5a4a3dec03ce9469e17f89af
2
+// Upstream protocol ref: 687a119f0fcaace47e1f1abcc77cec6c813fd6da
3
4
import * as CodexSchema from "./schema.gen.ts";
5
@@ -71,6 +71,9 @@ export const CLIENT_REQUEST_METHODS = {
71
"turn/interrupt": "turn/interrupt",
72
"review/start": "review/start",
73
"model/list": "model/list",
74
+ "account/gatewayOAuth/read": "account/gatewayOAuth/read",
75
+ "account/gatewayOAuth/login": "account/gatewayOAuth/login",
76
+ "account/gatewayOAuth/cancel": "account/gatewayOAuth/cancel",
77
"modelProvider/capabilities/read": "modelProvider/capabilities/read",
78
"experimentalFeature/list": "experimentalFeature/list",
79
"permissionProfile/list": "permissionProfile/list",
@@ -176,6 +179,7 @@ export const SERVER_NOTIFICATION_METHODS = {
179
"mcpServer/startupStatus/updated": "mcpServer/startupStatus/updated",
180
"mcpServer/event/stream/notification": "mcpServer/event/stream/notification",
181
"account/updated": "account/updated",
182
+ "account/gatewayOAuth/changed": "account/gatewayOAuth/changed",
183
"account/rateLimits/updated": "account/rateLimits/updated",
184
"app/list/updated": "app/list/updated",
185
"remoteControl/status/changed": "remoteControl/status/changed",
@@ -287,6 +291,9 @@ export interface ClientRequestParamsByMethod {
291
readonly "turn/interrupt": CodexSchema.V2TurnInterruptParams;
292
readonly "review/start": CodexSchema.V2ReviewStartParams;
293
readonly "model/list": CodexSchema.V2ModelListParams;
294
+ readonly "account/gatewayOAuth/read": undefined;
295
+ readonly "account/gatewayOAuth/login": undefined;
296
+ readonly "account/gatewayOAuth/cancel": undefined;
297
readonly "modelProvider/capabilities/read": CodexSchema.V2ModelProviderCapabilitiesReadParams;
298
readonly "experimentalFeature/list": CodexSchema.V2ExperimentalFeatureListParams;
299
readonly "permissionProfile/list": CodexSchema.V2PermissionProfileListParams;
@@ -394,6 +401,9 @@ export interface ClientRequestResponsesByMethod {
401
readonly "turn/interrupt": CodexSchema.V2TurnInterruptResponse;
402
readonly "review/start": CodexSchema.V2ReviewStartResponse;
403
readonly "model/list": CodexSchema.V2ModelListResponse;
404
+ readonly "account/gatewayOAuth/read": CodexSchema.V2GatewayOAuthReadResponse;
405
+ readonly "account/gatewayOAuth/login": CodexSchema.V2GatewayOAuthLoginResponse;
406
+ readonly "account/gatewayOAuth/cancel": CodexSchema.V2GatewayOAuthCancelResponse;
407
readonly "modelProvider/capabilities/read": CodexSchema.V2ModelProviderCapabilitiesReadResponse;
408
readonly "experimentalFeature/list": CodexSchema.V2ExperimentalFeatureListResponse;
409
readonly "permissionProfile/list": CodexSchema.V2PermissionProfileListResponse;
@@ -512,6 +522,7 @@ export interface ServerNotificationParamsByMethod {
522
readonly "mcpServer/startupStatus/updated": CodexSchema.V2McpServerStatusUpdatedNotification;
523
readonly "mcpServer/event/stream/notification": CodexSchema.V2McpServerEventStreamNotification;
524
readonly "account/updated": CodexSchema.V2AccountUpdatedNotification;
525
+ readonly "account/gatewayOAuth/changed": CodexSchema.V2GatewayOAuthChangedNotification;
526
readonly "account/rateLimits/updated": CodexSchema.V2AccountRateLimitsUpdatedNotification;
527
readonly "app/list/updated": CodexSchema.V2AppListUpdatedNotification;
528
readonly "remoteControl/status/changed": CodexSchema.V2RemoteControlStatusChangedNotification;
@@ -618,6 +629,9 @@ export const CLIENT_REQUEST_PARAMS = {
629
"turn/interrupt": CodexSchema.V2TurnInterruptParams,
630
"review/start": CodexSchema.V2ReviewStartParams,
631
"model/list": CodexSchema.V2ModelListParams,
632
+ "account/gatewayOAuth/read": undefined,
633
+ "account/gatewayOAuth/login": undefined,
634
+ "account/gatewayOAuth/cancel": undefined,
635
"modelProvider/capabilities/read": CodexSchema.V2ModelProviderCapabilitiesReadParams,
636
"experimentalFeature/list": CodexSchema.V2ExperimentalFeatureListParams,
637
"permissionProfile/list": CodexSchema.V2PermissionProfileListParams,
@@ -726,6 +740,9 @@ export const CLIENT_REQUEST_RESPONSES = {
740
"turn/interrupt": CodexSchema.V2TurnInterruptResponse,
741
"review/start": CodexSchema.V2ReviewStartResponse,
742
"model/list": CodexSchema.V2ModelListResponse,
743
+ "account/gatewayOAuth/read": CodexSchema.V2GatewayOAuthReadResponse,
744
+ "account/gatewayOAuth/login": CodexSchema.V2GatewayOAuthLoginResponse,
745
+ "account/gatewayOAuth/cancel": CodexSchema.V2GatewayOAuthCancelResponse,
746
"modelProvider/capabilities/read": CodexSchema.V2ModelProviderCapabilitiesReadResponse,
747
"experimentalFeature/list": CodexSchema.V2ExperimentalFeatureListResponse,
748
"permissionProfile/list": CodexSchema.V2PermissionProfileListResponse,
@@ -847,6 +864,7 @@ export const SERVER_NOTIFICATION_PARAMS = {
864
"mcpServer/startupStatus/updated": CodexSchema.V2McpServerStatusUpdatedNotification,
865
"mcpServer/event/stream/notification": CodexSchema.V2McpServerEventStreamNotification,
866
"account/updated": CodexSchema.V2AccountUpdatedNotification,
867
+ "account/gatewayOAuth/changed": CodexSchema.V2GatewayOAuthChangedNotification,
868
"account/rateLimits/updated": CodexSchema.V2AccountRateLimitsUpdatedNotification,
869
"app/list/updated": CodexSchema.V2AppListUpdatedNotification,
870
"remoteControl/status/changed": CodexSchema.V2RemoteControlStatusChangedNotification,
packages/effect-codex-app-server/src/_generated/namespaces.gen.ts
+5
-1
@@ -1,5 +1,5 @@
1
// This file is generated by the effect-codex-app-server package. Do not edit manually.
2
-// Upstream protocol ref: fe74a774532af67b5a4a3dec03ce9469e17f89af
2
+// Upstream protocol ref: 687a119f0fcaace47e1f1abcc77cec6c813fd6da
3
4
import * as CodexSchema from "./schema.gen.ts";
5
@@ -88,6 +88,10 @@ export const v2 = {
88
FsWatchResponse: CodexSchema.V2FsWatchResponse,
89
FsWriteFileParams: CodexSchema.V2FsWriteFileParams,
90
FsWriteFileResponse: CodexSchema.V2FsWriteFileResponse,
91
+ GatewayOAuthCancelResponse: CodexSchema.V2GatewayOAuthCancelResponse,
92
+ GatewayOAuthChangedNotification: CodexSchema.V2GatewayOAuthChangedNotification,
93
+ GatewayOAuthLoginResponse: CodexSchema.V2GatewayOAuthLoginResponse,
94
+ GatewayOAuthReadResponse: CodexSchema.V2GatewayOAuthReadResponse,
95
GetAccountParams: CodexSchema.V2GetAccountParams,
96
GetAccountRateLimitsResponse: CodexSchema.V2GetAccountRateLimitsResponse,
97
GetAccountResponse: CodexSchema.V2GetAccountResponse,
packages/effect-codex-app-server/src/_generated/schema.gen.ts
+475
-88
@@ -1,5 +1,5 @@
1
// This file is generated by the effect-codex-app-server package. Do not edit manually.
2
-// Upstream protocol ref: fe74a774532af67b5a4a3dec03ce9469e17f89af
2
+// Upstream protocol ref: 687a119f0fcaace47e1f1abcc77cec6c813fd6da
3
4
import * as Schema from "effect/Schema";
5
@@ -57,6 +57,7 @@ export const ClientRequest__RequestId = Schema.Union([
57
58
export type ClientRequest__InitializeCapabilities = {
59
readonly experimentalApi?: boolean;
60
+ readonly explicitGatewayOauth?: boolean;
61
readonly extensions?: { readonly [x: string]: Schema.Json } | null;
62
readonly mcpServerOpenaiFormElicitation?: boolean;
63
readonly optOutNotificationMethods?: ReadonlyArray<string> | null;
@@ -69,6 +70,12 @@ export const ClientRequest__InitializeCapabilities = Schema.Struct({
70
default: false,
71
}),
72
),
73
+ explicitGatewayOauth: Schema.optionalKey(
74
+ Schema.Boolean.annotate({
75
+ description:
76
+ "Use explicit gateway OAuth login instead of automatic browser authorization. Applies to this app-server's gateway runtime; later connections cannot undo it.",
77
+ }),
78
+ ),
79
extensions: Schema.optionalKey(
80
Schema.Union([
81
Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })).annotate({
@@ -572,6 +579,23 @@ export const ClientRequest__TurnItemsView = Schema.Union(
579
{ mode: "oneOf" },
580
).annotate({ identifier: "ClientRequest__TurnItemsView" });
581
582
+export type ClientRequest__ThreadItemsListAnchor = {
583
+ readonly itemId: string;
584
+ readonly type: "item";
585
+};
586
+export const ClientRequest__ThreadItemsListAnchor = Schema.Union(
587
+ [
588
+ Schema.Struct({
589
+ itemId: Schema.String,
590
+ type: Schema.Literal("item").annotate({ title: "ItemThreadItemsListAnchorType" }),
591
+ }).annotate({ title: "ItemThreadItemsListAnchor" }),
592
+ ],
593
+ { mode: "oneOf" },
594
+).annotate({
595
+ description: "An exclusive item position within the requested visible turn.",
596
+ identifier: "ClientRequest__ThreadItemsListAnchor",
597
+});
598
+
599
export type ClientRequest__ThreadInjectItemsParams = {
600
readonly items: ReadonlyArray<Schema.Json>;
601
readonly threadId: string;
@@ -1094,27 +1118,19 @@ export const ClientRequest__McpServerStatusDetail = Schema.Literals([
1118
"toolsAndAuthOnly",
1119
]).annotate({ identifier: "ClientRequest__McpServerStatusDetail" });
1120
1097
-export type ClientRequest__McpResourceReadParams = {
1098
- readonly connectorId?: string | null;
1099
- readonly originCallId?: string | null;
1100
- readonly server: string;
1101
- readonly threadId?: string | null;
1102
- readonly uri: string;
1121
+export type ClientRequest__McpResourceReadTarget = {
1122
+ readonly connectorId: string;
1123
+ readonly linkId: string | null;
1124
};
1104
-export const ClientRequest__McpResourceReadParams = Schema.Struct({
1105
- connectorId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1106
- originCallId: Schema.optionalKey(
1107
- Schema.Union([
1108
- Schema.String.annotate({
1109
- description: "Originating MCP tool call used to select the resource's app.",
1110
- }),
1111
- Schema.Null,
1112
- ]),
1113
- ),
1114
- server: Schema.String,
1115
- threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1116
- uri: Schema.String,
1117
-}).annotate({ identifier: "ClientRequest__McpResourceReadParams" });
1125
+export const ClientRequest__McpResourceReadTarget = Schema.Struct({
1126
+ connectorId: Schema.String,
1127
+ linkId: Schema.Union([
1128
+ Schema.String.annotate({
1129
+ description: "Null explicitly requests no-auth access, subject to the app's resource policy.",
1130
+ }),
1131
+ Schema.Null,
1132
+ ]),
1133
+}).annotate({ identifier: "ClientRequest__McpResourceReadTarget" });
1134
1135
export type ClientRequest__McpServerToolCallParams = {
1136
readonly _meta?: Schema.Json;
@@ -3209,6 +3225,18 @@ export const ServerNotification__PlanType = Schema.String.annotate({
3225
identifier: "ServerNotification__PlanType",
3226
});
3227
3228
+export type ServerNotification__GatewayOAuthStatus =
3229
+ | "notReady"
3230
+ | "started"
3231
+ | "succeeded"
3232
+ | "failed";
3233
+export const ServerNotification__GatewayOAuthStatus = Schema.Literals([
3234
+ "notReady",
3235
+ "started",
3236
+ "succeeded",
3237
+ "failed",
3238
+]).annotate({ identifier: "ServerNotification__GatewayOAuthStatus" });
3239
+
3240
export type ServerNotification__CreditsSnapshot = {
3241
readonly balance?: string | null;
3242
readonly hasCredits: boolean;
@@ -4008,6 +4036,7 @@ export const ToolRequestUserInputResponse__ToolRequestUserInputAnswer = Schema.S
4036
4037
export type V1InitializeParams__InitializeCapabilities = {
4038
readonly experimentalApi?: boolean;
4039
+ readonly explicitGatewayOauth?: boolean;
4040
readonly extensions?: { readonly [x: string]: Schema.Json } | null;
4041
readonly mcpServerOpenaiFormElicitation?: boolean;
4042
readonly optOutNotificationMethods?: ReadonlyArray<string> | null;
@@ -4020,6 +4049,12 @@ export const V1InitializeParams__InitializeCapabilities = Schema.Struct({
4049
default: false,
4050
}),
4051
),
4052
+ explicitGatewayOauth: Schema.optionalKey(
4053
+ Schema.Boolean.annotate({
4054
+ description:
4055
+ "Use explicit gateway OAuth login instead of automatic browser authorization. Applies to this app-server's gateway runtime; later connections cannot undo it.",
4056
+ }),
4057
+ ),
4058
extensions: Schema.optionalKey(
4059
Schema.Union([
4060
Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })).annotate({
@@ -5339,6 +5374,30 @@ export const V2FsWriteFileParams__AbsolutePathBuf = Schema.String.annotate({
5374
identifier: "V2FsWriteFileParams__AbsolutePathBuf",
5375
});
5376
5377
+export type V2GatewayOAuthChangedNotification__GatewayOAuthStatus =
5378
+ | "notReady"
5379
+ | "started"
5380
+ | "succeeded"
5381
+ | "failed";
5382
+export const V2GatewayOAuthChangedNotification__GatewayOAuthStatus = Schema.Literals([
5383
+ "notReady",
5384
+ "started",
5385
+ "succeeded",
5386
+ "failed",
5387
+]).annotate({ identifier: "V2GatewayOAuthChangedNotification__GatewayOAuthStatus" });
5388
+
5389
+export type V2GatewayOAuthReadResponse__GatewayOAuthStatus =
5390
+ | "notReady"
5391
+ | "started"
5392
+ | "succeeded"
5393
+ | "failed";
5394
+export const V2GatewayOAuthReadResponse__GatewayOAuthStatus = Schema.Literals([
5395
+ "notReady",
5396
+ "started",
5397
+ "succeeded",
5398
+ "failed",
5399
+]).annotate({ identifier: "V2GatewayOAuthReadResponse__GatewayOAuthStatus" });
5400
+
5401
export type V2GetAccountRateLimitsResponse__RateLimitResetType = "codexRateLimits" | "unknown";
5402
export const V2GetAccountRateLimitsResponse__RateLimitResetType = Schema.Literals([
5403
"codexRateLimits",
@@ -6966,6 +7025,20 @@ export const V2MarketplaceUpgradeResponse__AbsolutePathBuf = Schema.String.annot
7025
identifier: "V2MarketplaceUpgradeResponse__AbsolutePathBuf",
7026
});
7027
7028
+export type V2McpResourceReadParams__McpResourceReadTarget = {
7029
+ readonly connectorId: string;
7030
+ readonly linkId: string | null;
7031
+};
7032
+export const V2McpResourceReadParams__McpResourceReadTarget = Schema.Struct({
7033
+ connectorId: Schema.String,
7034
+ linkId: Schema.Union([
7035
+ Schema.String.annotate({
7036
+ description: "Null explicitly requests no-auth access, subject to the app's resource policy.",
7037
+ }),
7038
+ Schema.Null,
7039
+ ]),
7040
+}).annotate({ identifier: "V2McpResourceReadParams__McpResourceReadTarget" });
7041
+
7042
export type V2McpResourceReadResponse__ResourceContent =
7043
| {
7044
readonly _meta?: Schema.Json;
@@ -9233,6 +9306,23 @@ export const V2ThreadGoalUpdatedNotification__ThreadGoalStatus = Schema.Literals
9306
"complete",
9307
]).annotate({ identifier: "V2ThreadGoalUpdatedNotification__ThreadGoalStatus" });
9308
9309
+export type V2ThreadItemsListParams__ThreadItemsListAnchor = {
9310
+ readonly itemId: string;
9311
+ readonly type: "item";
9312
+};
9313
+export const V2ThreadItemsListParams__ThreadItemsListAnchor = Schema.Union(
9314
+ [
9315
+ Schema.Struct({
9316
+ itemId: Schema.String,
9317
+ type: Schema.Literal("item").annotate({ title: "ItemThreadItemsListAnchorType" }),
9318
+ }).annotate({ title: "ItemThreadItemsListAnchor" }),
9319
+ ],
9320
+ { mode: "oneOf" },
9321
+).annotate({
9322
+ description: "An exclusive item position within the requested visible turn.",
9323
+ identifier: "V2ThreadItemsListParams__ThreadItemsListAnchor",
9324
+});
9325
+
9326
export type V2ThreadItemsListParams__SortDirection = "asc" | "desc";
9327
export const V2ThreadItemsListParams__SortDirection = Schema.Literals(["asc", "desc"]).annotate({
9328
identifier: "V2ThreadItemsListParams__SortDirection",
@@ -16276,51 +16366,6 @@ export const ClientRequest__ThreadMetadataUpdateParams = Schema.Struct({
16366
threadId: Schema.String,
16367
}).annotate({ identifier: "ClientRequest__ThreadMetadataUpdateParams" });
16368
16279
-export type ClientRequest__ThreadItemsListParams = {
16280
- readonly cursor?: string | null;
16281
- readonly limit?: number | null;
16282
- readonly sortDirection?: ClientRequest__SortDirection | null;
16283
- readonly threadId: string;
16284
- readonly turnId?: string | null;
16285
-};
16286
-export const ClientRequest__ThreadItemsListParams = Schema.Struct({
16287
- cursor: Schema.optionalKey(
16288
- Schema.Union([
16289
- Schema.String.annotate({
16290
- description: "Opaque cursor to pass to the next call to continue after the last item.",
16291
- }),
16292
- Schema.Null,
16293
- ]),
16294
- ),
16295
- limit: Schema.optionalKey(
16296
- Schema.Union([
16297
- Schema.Number.annotate({ description: "Optional item page size.", format: "uint32" })
16298
- .check(Schema.isInt().annotate({ expected: "an integer" }))
16299
- .check(
16300
- Schema.isGreaterThanOrEqualTo(0).annotate({
16301
- expected: "a value greater than or equal to 0",
16302
- }),
16303
- ),
16304
- Schema.Null,
16305
- ]),
16306
- ),
16307
- sortDirection: Schema.optionalKey(
16308
- Schema.Union([ClientRequest__SortDirection, Schema.Null]).annotate({
16309
- description: "Optional item pagination direction; defaults to ascending.",
16310
- }),
16311
- ),
16312
- threadId: Schema.String,
16313
- turnId: Schema.optionalKey(
16314
- Schema.Union([
16315
- Schema.String.annotate({
16316
- description:
16317
- "Optional turn id to filter by. When omitted, returns items across the thread.",
16318
- }),
16319
- Schema.Null,
16320
- ]),
16321
- ),
16322
-}).annotate({ identifier: "ClientRequest__ThreadItemsListParams" });
16323
-
16369
export type ClientRequest__ThreadListParams = {
16370
readonly archived?: boolean | null;
16371
readonly cursor?: string | null;
@@ -16511,6 +16556,15 @@ export const ClientRequest__ThreadTurnsListParams = Schema.Struct({
16556
threadId: Schema.String,
16557
}).annotate({ identifier: "ClientRequest__ThreadTurnsListParams" });
16558
16559
+export type ClientRequest__ThreadItemsListCursor = string | ClientRequest__ThreadItemsListAnchor;
16560
+export const ClientRequest__ThreadItemsListCursor = Schema.Union([
16561
+ Schema.String,
16562
+ ClientRequest__ThreadItemsListAnchor,
16563
+]).annotate({
16564
+ description: "Starting position for an item-history page.",
16565
+ identifier: "ClientRequest__ThreadItemsListCursor",
16566
+});
16567
+
16568
export type ClientRequest__SkillsExtraRootsSetParams = {
16569
readonly extraRoots: ReadonlyArray<ClientRequest__AbsolutePathBuf>;
16570
};
@@ -17003,6 +17057,7 @@ export type ClientRequest__ListMcpServerStatusParams = {
17057
readonly cursor?: string | null;
17058
readonly detail?: ClientRequest__McpServerStatusDetail | null;
17059
readonly limit?: number | null;
17060
+ readonly serverName?: string | null;
17061
readonly threadId?: string | null;
17062
};
17063
export const ClientRequest__ListMcpServerStatusParams = Schema.Struct({
@@ -17035,9 +17090,46 @@ export const ClientRequest__ListMcpServerStatusParams = Schema.Struct({
17090
Schema.Null,
17091
]),
17092
),
17093
+ serverName: Schema.optionalKey(
17094
+ Schema.Union([
17095
+ Schema.String.annotate({
17096
+ description:
17097
+ "Limit discovery to one server. With a thread ID, reuse that thread's MCP connection.",
17098
+ }),
17099
+ Schema.Null,
17100
+ ]),
17101
+ ),
17102
threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
17103
}).annotate({ identifier: "ClientRequest__ListMcpServerStatusParams" });
17104
17105
+export type ClientRequest__McpResourceReadParams = {
17106
+ readonly connectorId?: string | null;
17107
+ readonly originCallId?: string | null;
17108
+ readonly server: string;
17109
+ readonly target?: ClientRequest__McpResourceReadTarget | null;
17110
+ readonly threadId?: string | null;
17111
+ readonly uri: string;
17112
+};
17113
+export const ClientRequest__McpResourceReadParams = Schema.Struct({
17114
+ connectorId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
17115
+ originCallId: Schema.optionalKey(
17116
+ Schema.Union([
17117
+ Schema.String.annotate({
17118
+ description: "Originating MCP tool call used to select the resource's app.",
17119
+ }),
17120
+ Schema.Null,
17121
+ ]),
17122
+ ),
17123
+ server: Schema.String,
17124
+ target: Schema.optionalKey(
17125
+ Schema.Union([ClientRequest__McpResourceReadTarget, Schema.Null]).annotate({
17126
+ description: "Explicit hosted app/account. Omit to retain legacy resource discovery.",
17127
+ }),
17128
+ ),
17129
+ threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
17130
+ uri: Schema.String,
17131
+}).annotate({ identifier: "ClientRequest__McpResourceReadParams" });
17132
+
17133
export type ClientRequest__WindowsSandboxSetupStartParams = {
17134
readonly cwd?: ClientRequest__AbsolutePathBuf | null;
17135
readonly mode: ClientRequest__WindowsSandboxSetupMode;
@@ -17771,9 +17863,11 @@ export type ServerNotification__CodexErrorInfo =
17863
| "sessionBudgetExceeded"
17864
| "usageLimitExceeded"
17865
| "rateLimitExceeded"
17866
+ | "flexUnavailable"
17867
| "serverOverloaded"
17868
| "cyberPolicy"
17869
| "misalignmentPolicyViolation"
17870
+ | "tooManyDenials"
17871
| "internalServerError"
17872
| "unauthorized"
17873
| "badRequest"
@@ -17796,9 +17890,11 @@ export const ServerNotification__CodexErrorInfo = Schema.Union(
17890
"sessionBudgetExceeded",
17891
"usageLimitExceeded",
17892
"rateLimitExceeded",
17893
+ "flexUnavailable",
17894
"serverOverloaded",
17895
"cyberPolicy",
17896
"misalignmentPolicyViolation",
17897
+ "tooManyDenials",
17898
"internalServerError",
17899
"unauthorized",
17900
"badRequest",
@@ -18501,6 +18597,26 @@ export const ServerNotification__AccountUpdatedNotification = Schema.Struct({
18597
planType: Schema.optionalKey(Schema.Union([ServerNotification__PlanType, Schema.Null])),
18598
}).annotate({ identifier: "ServerNotification__AccountUpdatedNotification" });
18599
18600
+export type ServerNotification__GatewayOAuthChangedNotification = {
18601
+ readonly authUrl?: string | null;
18602
+ readonly error?: string | null;
18603
+ readonly providerId: string;
18604
+ readonly status: ServerNotification__GatewayOAuthStatus;
18605
+};
18606
+export const ServerNotification__GatewayOAuthChangedNotification = Schema.Struct({
18607
+ authUrl: Schema.optionalKey(
18608
+ Schema.Union([
18609
+ Schema.String.annotate({
18610
+ description: "Authorization handoff, sent only to the connection that started login.",
18611
+ }),
18612
+ Schema.Null,
18613
+ ]),
18614
+ ),
18615
+ error: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
18616
+ providerId: Schema.String,
18617
+ status: ServerNotification__GatewayOAuthStatus,
18618
+}).annotate({ identifier: "ServerNotification__GatewayOAuthChangedNotification" });
18619
+
18620
export type ServerNotification__RateLimitSnapshot = {
18621
readonly credits?: ServerNotification__CreditsSnapshot | null;
18622
readonly individualLimit?: ServerNotification__SpendControlLimitSnapshot | null;
@@ -19833,9 +19949,11 @@ export type V2ErrorNotification__CodexErrorInfo =
19949
| "sessionBudgetExceeded"
19950
| "usageLimitExceeded"
19951
| "rateLimitExceeded"
19952
+ | "flexUnavailable"
19953
| "serverOverloaded"
19954
| "cyberPolicy"
19955
| "misalignmentPolicyViolation"
19956
+ | "tooManyDenials"
19957
| "internalServerError"
19958
| "unauthorized"
19959
| "badRequest"
@@ -19858,9 +19976,11 @@ export const V2ErrorNotification__CodexErrorInfo = Schema.Union(
19976
"sessionBudgetExceeded",
19977
"usageLimitExceeded",
19978
"rateLimitExceeded",
19979
+ "flexUnavailable",
19980
"serverOverloaded",
19981
"cyberPolicy",
19982
"misalignmentPolicyViolation",
19983
+ "tooManyDenials",
19984
"internalServerError",
19985
"unauthorized",
19986
"badRequest",
@@ -21307,6 +21427,7 @@ export const V2ItemStartedNotification__CollabAgentState = Schema.Struct({
21427
21428
export type V2ListMcpServerStatusResponse__McpServerStatus = {
21429
readonly authStatus: V2ListMcpServerStatusResponse__McpAuthStatus;
21430
+ readonly httpOrigin?: string | null;
21431
readonly name: string;
21432
readonly pluginId?: string | null;
21433
readonly resourceTemplates: ReadonlyArray<V2ListMcpServerStatusResponse__ResourceTemplate>;
@@ -21319,6 +21440,15 @@ export type V2ListMcpServerStatusResponse__McpServerStatus = {
21440
};
21441
export const V2ListMcpServerStatusResponse__McpServerStatus = Schema.Struct({
21442
authStatus: V2ListMcpServerStatusResponse__McpAuthStatus,
21443
+ httpOrigin: Schema.optionalKey(
21444
+ Schema.Union([
21445
+ Schema.String.annotate({
21446
+ description:
21447
+ "HTTP origin of the effective configured endpoint, including plugin servers. Excludes credentials, path, query, and fragment; null for non-HTTP transports.",
21448
+ }),
21449
+ Schema.Null,
21450
+ ]),
21451
+ ),
21452
name: Schema.String,
21453
pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
21454
resourceTemplates: Schema.Array(V2ListMcpServerStatusResponse__ResourceTemplate),
@@ -22275,9 +22405,11 @@ export type V2ReviewStartResponse__CodexErrorInfo =
22405
| "sessionBudgetExceeded"
22406
| "usageLimitExceeded"
22407
| "rateLimitExceeded"
22408
+ | "flexUnavailable"
22409
| "serverOverloaded"
22410
| "cyberPolicy"
22411
| "misalignmentPolicyViolation"
22412
+ | "tooManyDenials"
22413
| "internalServerError"
22414
| "unauthorized"
22415
| "badRequest"
@@ -22300,9 +22432,11 @@ export const V2ReviewStartResponse__CodexErrorInfo = Schema.Union(
22432
"sessionBudgetExceeded",
22433
"usageLimitExceeded",
22434
"rateLimitExceeded",
22435
+ "flexUnavailable",
22436
"serverOverloaded",
22437
"cyberPolicy",
22438
"misalignmentPolicyViolation",
22439
+ "tooManyDenials",
22440
"internalServerError",
22441
"unauthorized",
22442
"badRequest",
@@ -22809,9 +22943,11 @@ export type V2ThreadForkResponse__CodexErrorInfo =
22943
| "sessionBudgetExceeded"
22944
| "usageLimitExceeded"
22945
| "rateLimitExceeded"
22946
+ | "flexUnavailable"
22947
| "serverOverloaded"
22948
| "cyberPolicy"
22949
| "misalignmentPolicyViolation"
22950
+ | "tooManyDenials"
22951
| "internalServerError"
22952
| "unauthorized"
22953
| "badRequest"
@@ -22834,9 +22970,11 @@ export const V2ThreadForkResponse__CodexErrorInfo = Schema.Union(
22970
"sessionBudgetExceeded",
22971
"usageLimitExceeded",
22972
"rateLimitExceeded",
22973
+ "flexUnavailable",
22974
"serverOverloaded",
22975
"cyberPolicy",
22976
"misalignmentPolicyViolation",
22977
+ "tooManyDenials",
22978
"internalServerError",
22979
"unauthorized",
22980
"badRequest",
@@ -23193,6 +23331,17 @@ export const V2ThreadGoalUpdatedNotification__ThreadGoal = Schema.Struct({
23331
),
23332
}).annotate({ identifier: "V2ThreadGoalUpdatedNotification__ThreadGoal" });
23333
23334
+export type V2ThreadItemsListParams__ThreadItemsListCursor =
23335
+ | string
23336
+ | V2ThreadItemsListParams__ThreadItemsListAnchor;
23337
+export const V2ThreadItemsListParams__ThreadItemsListCursor = Schema.Union([
23338
+ Schema.String,
23339
+ V2ThreadItemsListParams__ThreadItemsListAnchor,
23340
+]).annotate({
23341
+ description: "Starting position for an item-history page.",
23342
+ identifier: "V2ThreadItemsListParams__ThreadItemsListCursor",
23343
+});
23344
+
23345
export type V2ThreadItemsListResponse__TextElement = {
23346
readonly byteRange: V2ThreadItemsListResponse__ByteRange;
23347
readonly placeholder?: string | null;
@@ -23444,9 +23593,11 @@ export type V2ThreadListResponse__CodexErrorInfo =
23593
| "sessionBudgetExceeded"
23594
| "usageLimitExceeded"
23595
| "rateLimitExceeded"
23596
+ | "flexUnavailable"
23597
| "serverOverloaded"
23598
| "cyberPolicy"
23599
| "misalignmentPolicyViolation"
23600
+ | "tooManyDenials"
23601
| "internalServerError"
23602
| "unauthorized"
23603
| "badRequest"
@@ -23469,9 +23620,11 @@ export const V2ThreadListResponse__CodexErrorInfo = Schema.Union(
23620
"sessionBudgetExceeded",
23621
"usageLimitExceeded",
23622
"rateLimitExceeded",
23623
+ "flexUnavailable",
23624
"serverOverloaded",
23625
"cyberPolicy",
23626
"misalignmentPolicyViolation",
23627
+ "tooManyDenials",
23628
"internalServerError",
23629
"unauthorized",
23630
"badRequest",
@@ -23849,9 +24002,11 @@ export type V2ThreadMetadataUpdateResponse__CodexErrorInfo =
24002
| "sessionBudgetExceeded"
24003
| "usageLimitExceeded"
24004
| "rateLimitExceeded"
24005
+ | "flexUnavailable"
24006
| "serverOverloaded"
24007
| "cyberPolicy"
24008
| "misalignmentPolicyViolation"
24009
+ | "tooManyDenials"
24010
| "internalServerError"
24011
| "unauthorized"
24012
| "badRequest"
@@ -23874,9 +24029,11 @@ export const V2ThreadMetadataUpdateResponse__CodexErrorInfo = Schema.Union(
24029
"sessionBudgetExceeded",
24030
"usageLimitExceeded",
24031
"rateLimitExceeded",
24032
+ "flexUnavailable",
24033
"serverOverloaded",
24034
"cyberPolicy",
24035
"misalignmentPolicyViolation",
24036
+ "tooManyDenials",
24037
"internalServerError",
24038
"unauthorized",
24039
"badRequest",
@@ -24259,9 +24416,11 @@ export type V2ThreadReadResponse__CodexErrorInfo =
24416
| "sessionBudgetExceeded"
24417
| "usageLimitExceeded"
24418
| "rateLimitExceeded"
24419
+ | "flexUnavailable"
24420
| "serverOverloaded"
24421
| "cyberPolicy"
24422
| "misalignmentPolicyViolation"
24423
+ | "tooManyDenials"
24424
| "internalServerError"
24425
| "unauthorized"
24426
| "badRequest"
@@ -24284,9 +24443,11 @@ export const V2ThreadReadResponse__CodexErrorInfo = Schema.Union(
24443
"sessionBudgetExceeded",
24444
"usageLimitExceeded",
24445
"rateLimitExceeded",
24446
+ "flexUnavailable",
24447
"serverOverloaded",
24448
"cyberPolicy",
24449
"misalignmentPolicyViolation",
24450
+ "tooManyDenials",
24451
"internalServerError",
24452
"unauthorized",
24453
"badRequest",
@@ -25023,9 +25184,11 @@ export type V2ThreadResumeResponse__CodexErrorInfo =
25184
| "sessionBudgetExceeded"
25185
| "usageLimitExceeded"
25186
| "rateLimitExceeded"
25187
+ | "flexUnavailable"
25188
| "serverOverloaded"
25189
| "cyberPolicy"
25190
| "misalignmentPolicyViolation"
25191
+ | "tooManyDenials"
25192
| "internalServerError"
25193
| "unauthorized"
25194
| "badRequest"
@@ -25048,9 +25211,11 @@ export const V2ThreadResumeResponse__CodexErrorInfo = Schema.Union(
25211
"sessionBudgetExceeded",
25212
"usageLimitExceeded",
25213
"rateLimitExceeded",
25214
+ "flexUnavailable",
25215
"serverOverloaded",
25216
"cyberPolicy",
25217
"misalignmentPolicyViolation",
25218
+ "tooManyDenials",
25219
"internalServerError",
25220
"unauthorized",
25221
"badRequest",
@@ -25390,9 +25555,11 @@ export type V2ThreadRevertResponse__CodexErrorInfo =
25555
| "sessionBudgetExceeded"
25556
| "usageLimitExceeded"
25557
| "rateLimitExceeded"
25558
+ | "flexUnavailable"
25559
| "serverOverloaded"
25560
| "cyberPolicy"
25561
| "misalignmentPolicyViolation"
25562
+ | "tooManyDenials"
25563
| "internalServerError"
25564
| "unauthorized"
25565
| "badRequest"
@@ -25415,9 +25582,11 @@ export const V2ThreadRevertResponse__CodexErrorInfo = Schema.Union(
25582
"sessionBudgetExceeded",
25583
"usageLimitExceeded",
25584
"rateLimitExceeded",
25585
+ "flexUnavailable",
25586
"serverOverloaded",
25587
"cyberPolicy",
25588
"misalignmentPolicyViolation",
25589
+ "tooManyDenials",
25590
"internalServerError",
25591
"unauthorized",
25592
"badRequest",
@@ -25926,9 +26095,11 @@ export type V2ThreadStartedNotification__CodexErrorInfo =
26095
| "sessionBudgetExceeded"
26096
| "usageLimitExceeded"
26097
| "rateLimitExceeded"
26098
+ | "flexUnavailable"
26099
| "serverOverloaded"
26100
| "cyberPolicy"
26101
| "misalignmentPolicyViolation"
26102
+ | "tooManyDenials"
26103
| "internalServerError"
26104
| "unauthorized"
26105
| "badRequest"
@@ -25951,9 +26122,11 @@ export const V2ThreadStartedNotification__CodexErrorInfo = Schema.Union(
26122
"sessionBudgetExceeded",
26123
"usageLimitExceeded",
26124
"rateLimitExceeded",
26125
+ "flexUnavailable",
26126
"serverOverloaded",
26127
"cyberPolicy",
26128
"misalignmentPolicyViolation",
26129
+ "tooManyDenials",
26130
"internalServerError",
26131
"unauthorized",
26132
"badRequest",
@@ -26427,9 +26600,11 @@ export type V2ThreadStartResponse__CodexErrorInfo =
26600
| "sessionBudgetExceeded"
26601
| "usageLimitExceeded"
26602
| "rateLimitExceeded"
26603
+ | "flexUnavailable"
26604
| "serverOverloaded"
26605
| "cyberPolicy"
26606
| "misalignmentPolicyViolation"
26607
+ | "tooManyDenials"
26608
| "internalServerError"
26609
| "unauthorized"
26610
| "badRequest"
@@ -26452,9 +26627,11 @@ export const V2ThreadStartResponse__CodexErrorInfo = Schema.Union(
26627
"sessionBudgetExceeded",
26628
"usageLimitExceeded",
26629
"rateLimitExceeded",
26630
+ "flexUnavailable",
26631
"serverOverloaded",
26632
"cyberPolicy",
26633
"misalignmentPolicyViolation",
26634
+ "tooManyDenials",
26635
"internalServerError",
26636
"unauthorized",
26637
"badRequest",
@@ -26753,9 +26930,11 @@ export type V2ThreadTurnsListResponse__CodexErrorInfo =
26930
| "sessionBudgetExceeded"
26931
| "usageLimitExceeded"
26932
| "rateLimitExceeded"
26933
+ | "flexUnavailable"
26934
| "serverOverloaded"
26935
| "cyberPolicy"
26936
| "misalignmentPolicyViolation"
26937
+ | "tooManyDenials"
26938
| "internalServerError"
26939
| "unauthorized"
26940
| "badRequest"
@@ -26778,9 +26957,11 @@ export const V2ThreadTurnsListResponse__CodexErrorInfo = Schema.Union(
26957
"sessionBudgetExceeded",
26958
"usageLimitExceeded",
26959
"rateLimitExceeded",
26960
+ "flexUnavailable",
26961
"serverOverloaded",
26962
"cyberPolicy",
26963
"misalignmentPolicyViolation",
26964
+ "tooManyDenials",
26965
"internalServerError",
26966
"unauthorized",
26967
"badRequest",
@@ -27162,9 +27343,11 @@ export type V2ThreadUnarchiveResponse__CodexErrorInfo =
27343
| "sessionBudgetExceeded"
27344
| "usageLimitExceeded"
27345
| "rateLimitExceeded"
27346
+ | "flexUnavailable"
27347
| "serverOverloaded"
27348
| "cyberPolicy"
27349
| "misalignmentPolicyViolation"
27350
+ | "tooManyDenials"
27351
| "internalServerError"
27352
| "unauthorized"
27353
| "badRequest"
@@ -27187,9 +27370,11 @@ export const V2ThreadUnarchiveResponse__CodexErrorInfo = Schema.Union(
27370
"sessionBudgetExceeded",
27371
"usageLimitExceeded",
27372
"rateLimitExceeded",
27373
+ "flexUnavailable",
27374
"serverOverloaded",
27375
"cyberPolicy",
27376
"misalignmentPolicyViolation",
27377
+ "tooManyDenials",
27378
"internalServerError",
27379
"unauthorized",
27380
"badRequest",
@@ -27489,9 +27674,11 @@ export type V2TurnCompletedNotification__CodexErrorInfo =
27674
| "sessionBudgetExceeded"
27675
| "usageLimitExceeded"
27676
| "rateLimitExceeded"
27677
+ | "flexUnavailable"
27678
| "serverOverloaded"
27679
| "cyberPolicy"
27680
| "misalignmentPolicyViolation"
27681
+ | "tooManyDenials"
27682
| "internalServerError"
27683
| "unauthorized"
27684
| "badRequest"
@@ -27514,9 +27701,11 @@ export const V2TurnCompletedNotification__CodexErrorInfo = Schema.Union(
27701
"sessionBudgetExceeded",
27702
"usageLimitExceeded",
27703
"rateLimitExceeded",
27704
+ "flexUnavailable",
27705
"serverOverloaded",
27706
"cyberPolicy",
27707
"misalignmentPolicyViolation",
27708
+ "tooManyDenials",
27709
"internalServerError",
27710
"unauthorized",
27711
"badRequest",
@@ -27826,9 +28015,11 @@ export type V2TurnStartedNotification__CodexErrorInfo =
28015
| "sessionBudgetExceeded"
28016
| "usageLimitExceeded"
28017
| "rateLimitExceeded"
28018
+ | "flexUnavailable"
28019
| "serverOverloaded"
28020
| "cyberPolicy"
28021
| "misalignmentPolicyViolation"
28022
+ | "tooManyDenials"
28023
| "internalServerError"
28024
| "unauthorized"
28025
| "badRequest"
@@ -27851,9 +28042,11 @@ export const V2TurnStartedNotification__CodexErrorInfo = Schema.Union(
28042
"sessionBudgetExceeded",
28043
"usageLimitExceeded",
28044
"rateLimitExceeded",
28045
+ "flexUnavailable",
28046
"serverOverloaded",
28047
"cyberPolicy",
28048
"misalignmentPolicyViolation",
28049
+ "tooManyDenials",
28050
"internalServerError",
28051
"unauthorized",
28052
"badRequest",
@@ -28290,9 +28483,11 @@ export type V2TurnStartResponse__CodexErrorInfo =
28483
| "sessionBudgetExceeded"
28484
| "usageLimitExceeded"
28485
| "rateLimitExceeded"
28486
+ | "flexUnavailable"
28487
| "serverOverloaded"
28488
| "cyberPolicy"
28489
| "misalignmentPolicyViolation"
28490
+ | "tooManyDenials"
28491
| "internalServerError"
28492
| "unauthorized"
28493
| "badRequest"
@@ -28315,9 +28510,11 @@ export const V2TurnStartResponse__CodexErrorInfo = Schema.Union(
28510
"sessionBudgetExceeded",
28511
"usageLimitExceeded",
28512
"rateLimitExceeded",
28513
+ "flexUnavailable",
28514
"serverOverloaded",
28515
"cyberPolicy",
28516
"misalignmentPolicyViolation",
28517
+ "tooManyDenials",
28518
"internalServerError",
28519
"unauthorized",
28520
"badRequest",
@@ -28693,6 +28890,49 @@ export const ApplyPatchApprovalResponse__ReviewDecision = Schema.Union(
28890
identifier: "ApplyPatchApprovalResponse__ReviewDecision",
28891
});
28892
28893
+export type ClientRequest__ThreadItemsListParams = {
28894
+ readonly cursor?: ClientRequest__ThreadItemsListCursor | null;
28895
+ readonly limit?: number | null;
28896
+ readonly sortDirection?: ClientRequest__SortDirection | null;
28897
+ readonly threadId: string;
28898
+ readonly turnId?: string | null;
28899
+};
28900
+export const ClientRequest__ThreadItemsListParams = Schema.Struct({
28901
+ cursor: Schema.optionalKey(
28902
+ Schema.Union([ClientRequest__ThreadItemsListCursor, Schema.Null]).annotate({
28903
+ description:
28904
+ "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.",
28905
+ }),
28906
+ ),
28907
+ limit: Schema.optionalKey(
28908
+ Schema.Union([
28909
+ Schema.Number.annotate({ description: "Optional item page size.", format: "uint32" })
28910
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
28911
+ .check(
28912
+ Schema.isGreaterThanOrEqualTo(0).annotate({
28913
+ expected: "a value greater than or equal to 0",
28914
+ }),
28915
+ ),
28916
+ Schema.Null,
28917
+ ]),
28918
+ ),
28919
+ sortDirection: Schema.optionalKey(
28920
+ Schema.Union([ClientRequest__SortDirection, Schema.Null]).annotate({
28921
+ description: "Optional item pagination direction; defaults to ascending.",
28922
+ }),
28923
+ ),
28924
+ threadId: Schema.String,
28925
+ turnId: Schema.optionalKey(
28926
+ Schema.Union([
28927
+ Schema.String.annotate({
28928
+ description:
28929
+ "Optional turn id to filter by. When omitted, returns items across the thread.",
28930
+ }),
28931
+ Schema.Null,
28932
+ ]),
28933
+ ),
28934
+}).annotate({ identifier: "ClientRequest__ThreadItemsListParams" });
28935
+
28936
export type ClientRequest__PluginShareSaveParams = {
28937
readonly discoverability?: ClientRequest__PluginShareDiscoverability | null;
28938
readonly pluginPath: ClientRequest__AbsolutePathBuf;
@@ -42625,7 +42865,7 @@ export const ServerNotification__Turn = Schema.Struct({
42865
),
42866
error: Schema.optionalKey(
42867
Schema.Union([ServerNotification__TurnError, Schema.Null]).annotate({
42628
- description: "Only populated when the Turn's status is failed.",
42868
+ description: "Error associated with a failed or interrupted turn.",
42869
}),
42870
),
42871
id: Schema.String.annotate({
@@ -43212,7 +43452,7 @@ export const V2ReviewStartResponse__Turn = Schema.Struct({
43452
),
43453
error: Schema.optionalKey(
43454
Schema.Union([V2ReviewStartResponse__TurnError, Schema.Null]).annotate({
43215
- description: "Only populated when the Turn's status is failed.",
43455
+ description: "Error associated with a failed or interrupted turn.",
43456
}),
43457
),
43458
id: Schema.String.annotate({
@@ -43273,7 +43513,7 @@ export const V2ThreadForkResponse__Turn = Schema.Struct({
43513
),
43514
error: Schema.optionalKey(
43515
Schema.Union([V2ThreadForkResponse__TurnError, Schema.Null]).annotate({
43276
- description: "Only populated when the Turn's status is failed.",
43516
+ description: "Error associated with a failed or interrupted turn.",
43517
}),
43518
),
43519
id: Schema.String.annotate({
@@ -43303,11 +43543,33 @@ export const V2ThreadForkResponse__Turn = Schema.Struct({
43543
}).annotate({ identifier: "V2ThreadForkResponse__Turn" });
43544
43545
export type V2ThreadItemsListResponse__ThreadItemEntry = {
43546
+ readonly completedAtMs?: number | null;
43547
readonly item: V2ThreadItemsListResponse__ThreadItem;
43548
+ readonly startedAtMs?: number | null;
43549
readonly turnId: string;
43550
};
43551
export const V2ThreadItemsListResponse__ThreadItemEntry = Schema.Struct({
43552
+ completedAtMs: Schema.optionalKey(
43553
+ Schema.Union([
43554
+ Schema.Number.annotate({
43555
+ description:
43556
+ "Unix timestamp (milliseconds) when the item completed, if recorded by the producer.",
43557
+ format: "int64",
43558
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
43559
+ Schema.Null,
43560
+ ]),
43561
+ ),
43562
item: V2ThreadItemsListResponse__ThreadItem,
43563
+ startedAtMs: Schema.optionalKey(
43564
+ Schema.Union([
43565
+ Schema.Number.annotate({
43566
+ description:
43567
+ "Unix timestamp (milliseconds) when the item started, if recorded by the producer.",
43568
+ format: "int64",
43569
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
43570
+ Schema.Null,
43571
+ ]),
43572
+ ),
43573
turnId: Schema.String.annotate({ description: "Turn containing this item." }),
43574
}).annotate({ identifier: "V2ThreadItemsListResponse__ThreadItemEntry" });
43575
@@ -43342,7 +43604,7 @@ export const V2ThreadListResponse__Turn = Schema.Struct({
43604
),
43605
error: Schema.optionalKey(
43606
Schema.Union([V2ThreadListResponse__TurnError, Schema.Null]).annotate({
43345
- description: "Only populated when the Turn's status is failed.",
43607
+ description: "Error associated with a failed or interrupted turn.",
43608
}),
43609
),
43610
id: Schema.String.annotate({
@@ -43402,7 +43664,7 @@ export const V2ThreadMetadataUpdateResponse__Turn = Schema.Struct({
43664
),
43665
error: Schema.optionalKey(
43666
Schema.Union([V2ThreadMetadataUpdateResponse__TurnError, Schema.Null]).annotate({
43405
- description: "Only populated when the Turn's status is failed.",
43667
+ description: "Error associated with a failed or interrupted turn.",
43668
}),
43669
),
43670
id: Schema.String.annotate({
@@ -43463,7 +43725,7 @@ export const V2ThreadReadResponse__Turn = Schema.Struct({
43725
),
43726
error: Schema.optionalKey(
43727
Schema.Union([V2ThreadReadResponse__TurnError, Schema.Null]).annotate({
43466
- description: "Only populated when the Turn's status is failed.",
43728
+ description: "Error associated with a failed or interrupted turn.",
43729
}),
43730
),
43731
id: Schema.String.annotate({
@@ -43523,7 +43785,7 @@ export const V2ThreadResumeResponse__Turn = Schema.Struct({
43785
),
43786
error: Schema.optionalKey(
43787
Schema.Union([V2ThreadResumeResponse__TurnError, Schema.Null]).annotate({
43526
- description: "Only populated when the Turn's status is failed.",
43788
+ description: "Error associated with a failed or interrupted turn.",
43789
}),
43790
),
43791
id: Schema.String.annotate({
@@ -43584,7 +43846,7 @@ export const V2ThreadRevertResponse__Turn = Schema.Struct({
43846
),
43847
error: Schema.optionalKey(
43848
Schema.Union([V2ThreadRevertResponse__TurnError, Schema.Null]).annotate({
43587
- description: "Only populated when the Turn's status is failed.",
43849
+ description: "Error associated with a failed or interrupted turn.",
43850
}),
43851
),
43852
id: Schema.String.annotate({
@@ -43645,7 +43907,7 @@ export const V2ThreadStartedNotification__Turn = Schema.Struct({
43907
),
43908
error: Schema.optionalKey(
43909
Schema.Union([V2ThreadStartedNotification__TurnError, Schema.Null]).annotate({
43648
- description: "Only populated when the Turn's status is failed.",
43910
+ description: "Error associated with a failed or interrupted turn.",
43911
}),
43912
),
43913
id: Schema.String.annotate({
@@ -43706,7 +43968,7 @@ export const V2ThreadStartResponse__Turn = Schema.Struct({
43968
),
43969
error: Schema.optionalKey(
43970
Schema.Union([V2ThreadStartResponse__TurnError, Schema.Null]).annotate({
43709
- description: "Only populated when the Turn's status is failed.",
43971
+ description: "Error associated with a failed or interrupted turn.",
43972
}),
43973
),
43974
id: Schema.String.annotate({
@@ -43767,7 +44029,7 @@ export const V2ThreadTurnsListResponse__Turn = Schema.Struct({
44029
),
44030
error: Schema.optionalKey(
44031
Schema.Union([V2ThreadTurnsListResponse__TurnError, Schema.Null]).annotate({
43770
- description: "Only populated when the Turn's status is failed.",
44032
+ description: "Error associated with a failed or interrupted turn.",
44033
}),
44034
),
44035
id: Schema.String.annotate({
@@ -43828,7 +44090,7 @@ export const V2ThreadUnarchiveResponse__Turn = Schema.Struct({
44090
),
44091
error: Schema.optionalKey(
44092
Schema.Union([V2ThreadUnarchiveResponse__TurnError, Schema.Null]).annotate({
43831
- description: "Only populated when the Turn's status is failed.",
44093
+ description: "Error associated with a failed or interrupted turn.",
44094
}),
44095
),
44096
id: Schema.String.annotate({
@@ -43889,7 +44151,7 @@ export const V2TurnCompletedNotification__Turn = Schema.Struct({
44151
),
44152
error: Schema.optionalKey(
44153
Schema.Union([V2TurnCompletedNotification__TurnError, Schema.Null]).annotate({
43892
- description: "Only populated when the Turn's status is failed.",
44154
+ description: "Error associated with a failed or interrupted turn.",
44155
}),
44156
),
44157
id: Schema.String.annotate({
@@ -43950,7 +44212,7 @@ export const V2TurnStartedNotification__Turn = Schema.Struct({
44212
),
44213
error: Schema.optionalKey(
44214
Schema.Union([V2TurnStartedNotification__TurnError, Schema.Null]).annotate({
43953
- description: "Only populated when the Turn's status is failed.",
44215
+ description: "Error associated with a failed or interrupted turn.",
44216
}),
44217
),
44218
id: Schema.String.annotate({
@@ -44011,7 +44273,7 @@ export const V2TurnStartResponse__Turn = Schema.Struct({
44273
),
44274
error: Schema.optionalKey(
44275
Schema.Union([V2TurnStartResponse__TurnError, Schema.Null]).annotate({
44014
- description: "Only populated when the Turn's status is failed.",
44276
+ description: "Error associated with a failed or interrupted turn.",
44277
}),
44278
),
44279
id: Schema.String.annotate({
@@ -47165,6 +47427,21 @@ export type ClientRequest =
47427
readonly method: "model/list";
47428
readonly params: ClientRequest__ModelListParams;
47429
}
47430
+ | {
47431
+ readonly id: ClientRequest__RequestId;
47432
+ readonly method: "account/gatewayOAuth/read";
47433
+ readonly params?: null;
47434
+ }
47435
+ | {
47436
+ readonly id: ClientRequest__RequestId;
47437
+ readonly method: "account/gatewayOAuth/login";
47438
+ readonly params?: null;
47439
+ }
47440
+ | {
47441
+ readonly id: ClientRequest__RequestId;
47442
+ readonly method: "account/gatewayOAuth/cancel";
47443
+ readonly params?: null;
47444
+ }
47445
| {
47446
readonly id: ClientRequest__RequestId;
47447
readonly method: "modelProvider/capabilities/read";
@@ -47744,6 +48021,27 @@ export const ClientRequest = Schema.Union(
48021
method: Schema.Literal("model/list").annotate({ title: "Model/listRequestMethod" }),
48022
params: ClientRequest__ModelListParams,
48023
}).annotate({ title: "Model/listRequest" }),
48024
+ Schema.Struct({
48025
+ id: ClientRequest__RequestId,
48026
+ method: Schema.Literal("account/gatewayOAuth/read").annotate({
48027
+ title: "Account/gatewayOAuth/readRequestMethod",
48028
+ }),
48029
+ params: Schema.optionalKey(Schema.Null),
48030
+ }).annotate({ title: "Account/gatewayOAuth/readRequest" }),
48031
+ Schema.Struct({
48032
+ id: ClientRequest__RequestId,
48033
+ method: Schema.Literal("account/gatewayOAuth/login").annotate({
48034
+ title: "Account/gatewayOAuth/loginRequestMethod",
48035
+ }),
48036
+ params: Schema.optionalKey(Schema.Null),
48037
+ }).annotate({ title: "Account/gatewayOAuth/loginRequest" }),
48038
+ Schema.Struct({
48039
+ id: ClientRequest__RequestId,
48040
+ method: Schema.Literal("account/gatewayOAuth/cancel").annotate({
48041
+ title: "Account/gatewayOAuth/cancelRequestMethod",
48042
+ }),
48043
+ params: Schema.optionalKey(Schema.Null),
48044
+ }).annotate({ title: "Account/gatewayOAuth/cancelRequest" }),
48045
Schema.Struct({
48046
id: ClientRequest__RequestId,
48047
method: Schema.Literal("modelProvider/capabilities/read").annotate({
@@ -49495,6 +49793,11 @@ export type ServerNotification =
49793
readonly method: "account/updated";
49794
readonly params: ServerNotification__AccountUpdatedNotification;
49795
}
49796
+ | {
49797
+ readonly emittedAtMs?: number;
49798
+ readonly method: "account/gatewayOAuth/changed";
49799
+ readonly params: ServerNotification__GatewayOAuthChangedNotification;
49800
+ }
49801
| {
49802
readonly emittedAtMs?: number;
49803
readonly method: "account/rateLimits/updated";
@@ -50284,6 +50587,19 @@ export const ServerNotification = Schema.Union(
50587
}),
50588
params: ServerNotification__AccountUpdatedNotification,
50589
}).annotate({ title: "Account/updatedNotification" }),
50590
+ Schema.Struct({
50591
+ emittedAtMs: Schema.optionalKey(
50592
+ Schema.Number.annotate({
50593
+ description:
50594
+ "Unix timestamp (in milliseconds) when app-server emitted this notification.",
50595
+ format: "int64",
50596
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
50597
+ ),
50598
+ method: Schema.Literal("account/gatewayOAuth/changed").annotate({
50599
+ title: "Account/gatewayOAuth/changedNotificationMethod",
50600
+ }),
50601
+ params: ServerNotification__GatewayOAuthChangedNotification,
50602
+ }).annotate({ title: "Account/gatewayOAuth/changedNotification" }),
50603
Schema.Struct({
50604
emittedAtMs: Schema.optionalKey(
50605
Schema.Number.annotate({
@@ -52595,6 +52911,63 @@ export const V2FsWriteFileResponse = Schema.Record(
52911
description: "Successful response for `fs/writeFile`.",
52912
});
52913
52914
+export type V2GatewayOAuthCancelResponse = { readonly [x: string]: Schema.Json };
52915
+export const V2GatewayOAuthCancelResponse = Schema.Record(
52916
+ Schema.String,
52917
+ Schema.Json.annotate({ expected: "JSON value" }),
52918
+).annotate({ title: "GatewayOAuthCancelResponse" });
52919
+
52920
+export type V2GatewayOAuthChangedNotification = {
52921
+ readonly authUrl?: string | null;
52922
+ readonly error?: string | null;
52923
+ readonly providerId: string;
52924
+ readonly status: V2GatewayOAuthChangedNotification__GatewayOAuthStatus;
52925
+};
52926
+export const V2GatewayOAuthChangedNotification = Schema.Struct({
52927
+ authUrl: Schema.optionalKey(
52928
+ Schema.Union([
52929
+ Schema.String.annotate({
52930
+ description: "Authorization handoff, sent only to the connection that started login.",
52931
+ }),
52932
+ Schema.Null,
52933
+ ]),
52934
+ ),
52935
+ error: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
52936
+ providerId: Schema.String,
52937
+ status: V2GatewayOAuthChangedNotification__GatewayOAuthStatus,
52938
+}).annotate({ title: "GatewayOAuthChangedNotification" });
52939
+
52940
+export type V2GatewayOAuthLoginResponse = { readonly [x: string]: Schema.Json };
52941
+export const V2GatewayOAuthLoginResponse = Schema.Record(
52942
+ Schema.String,
52943
+ Schema.Json.annotate({ expected: "JSON value" }),
52944
+).annotate({ title: "GatewayOAuthLoginResponse" });
52945
+
52946
+export type V2GatewayOAuthReadResponse = {
52947
+ readonly error?: string | null;
52948
+ readonly providerId: string;
52949
+ readonly providerName: string;
52950
+ readonly required: boolean;
52951
+ readonly status?: V2GatewayOAuthReadResponse__GatewayOAuthStatus | null;
52952
+};
52953
+export const V2GatewayOAuthReadResponse = Schema.Struct({
52954
+ error: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
52955
+ providerId: Schema.String,
52956
+ providerName: Schema.String,
52957
+ required: Schema.Boolean.annotate({
52958
+ description: "Whether the selected provider uses gateway OAuth, even when already signed in.",
52959
+ }),
52960
+ status: Schema.optionalKey(
52961
+ Schema.Union([V2GatewayOAuthReadResponse__GatewayOAuthStatus, Schema.Null]).annotate({
52962
+ description: "Null when the effective provider does not use gateway OAuth.",
52963
+ }),
52964
+ ),
52965
+}).annotate({
52966
+ title: "GatewayOAuthReadResponse",
52967
+ description:
52968
+ "Current effective gateway policy and credential readiness; never contains credentials.",
52969
+});
52970
+
52971
export type V2GetAccountParams = { readonly refreshToken?: boolean };
52972
export const V2GetAccountParams = Schema.Struct({
52973
refreshToken: Schema.optionalKey(
@@ -52870,6 +53243,7 @@ export type V2ListMcpServerStatusParams = {
53243
readonly cursor?: string | null;
53244
readonly detail?: V2ListMcpServerStatusParams__McpServerStatusDetail | null;
53245
readonly limit?: number | null;
53246
+ readonly serverName?: string | null;
53247
readonly threadId?: string | null;
53248
};
53249
export const V2ListMcpServerStatusParams = Schema.Struct({
@@ -52902,6 +53276,15 @@ export const V2ListMcpServerStatusParams = Schema.Struct({
53276
Schema.Null,
53277
]),
53278
),
53279
+ serverName: Schema.optionalKey(
53280
+ Schema.Union([
53281
+ Schema.String.annotate({
53282
+ description:
53283
+ "Limit discovery to one server. With a thread ID, reuse that thread's MCP connection.",
53284
+ }),
53285
+ Schema.Null,
53286
+ ]),
53287
+ ),
53288
threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
53289
}).annotate({ title: "ListMcpServerStatusParams" });
53290
@@ -53129,6 +53512,7 @@ export type V2McpResourceReadParams = {
53512
readonly connectorId?: string | null;
53513
readonly originCallId?: string | null;
53514
readonly server: string;
53515
+ readonly target?: V2McpResourceReadParams__McpResourceReadTarget | null;
53516
readonly threadId?: string | null;
53517
readonly uri: string;
53518
};
@@ -53143,6 +53527,11 @@ export const V2McpResourceReadParams = Schema.Struct({
53527
]),
53528
),
53529
server: Schema.String,
53530
+ target: Schema.optionalKey(
53531
+ Schema.Union([V2McpResourceReadParams__McpResourceReadTarget, Schema.Null]).annotate({
53532
+ description: "Explicit hosted app/account. Omit to retain legacy resource discovery.",
53533
+ }),
53534
+ ),
53535
threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
53536
uri: Schema.String,
53537
}).annotate({ title: "McpResourceReadParams" });
@@ -54530,7 +54919,7 @@ export const V2ThreadInjectItemsResponse = Schema.Record(
54919
).annotate({ title: "ThreadInjectItemsResponse" });
54920
54921
export type V2ThreadItemsListParams = {
54533
- readonly cursor?: string | null;
54922
+ readonly cursor?: V2ThreadItemsListParams__ThreadItemsListCursor | null;
54923
readonly limit?: number | null;
54924
readonly sortDirection?: V2ThreadItemsListParams__SortDirection | null;
54925
readonly threadId: string;
@@ -54538,12 +54927,10 @@ export type V2ThreadItemsListParams = {
54927
};
54928
export const V2ThreadItemsListParams = Schema.Struct({
54929
cursor: Schema.optionalKey(
54541
- Schema.Union([
54542
- Schema.String.annotate({
54543
- description: "Opaque cursor to pass to the next call to continue after the last item.",
54544
- }),
54545
- Schema.Null,
54546
- ]),
54930
+ Schema.Union([V2ThreadItemsListParams__ThreadItemsListCursor, Schema.Null]).annotate({
54931
+ description:
54932
+ "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.",
54933
+ }),
54934
),
54935
limit: Schema.optionalKey(
54936
Schema.Union([