Skip to content
TypeScript

feat(codex): regenerate protocol bindings for Codex 0.159 (#14311)

Julius Marminge422248515a1e
diff --git a/apps/server/src/provider/model-manifest.json b/apps/server/src/provider/model-manifest.json
index 5eb0b3db507..f11972dae6c 100644
--- a/apps/server/src/provider/model-manifest.json
+++ b/apps/server/src/provider/model-manifest.json
@@ -1,10 +1,20 @@
{
"version": 1,
- "updatedAt": "2026-09-29T01:03:44Z",
+ "updatedAt": "2026-09-29T20:20:00Z",
"compatibility": [
{
"driver": "codex",
- "t3CodeRange": ">=0.0.42",
+ "t3CodeRange": ">=0.0.44",
+ "recommendedRange": ">=0.159.0",
+ "ranges": [
+ { "range": ">=0.156.0", "status": "supported" },
+ { "range": ">=0.149.0 <0.156.0", "status": "unsupported" },
+ { "range": "<0.149.0", "status": "broken" }
+ ]
+ },
+ {
+ "driver": "codex",
+ "t3CodeRange": ">=0.0.42 <0.0.44",
"recommendedRange": ">=0.156.0",
"ranges": [
{ "range": ">=0.156.0", "status": "supported" },
diff --git a/packages/effect-codex-app-server/scripts/generate.ts b/packages/effect-codex-app-server/scripts/generate.ts
index 8825f6044fc..f7cab8e59b9 100644
--- a/packages/effect-codex-app-server/scripts/generate.ts
+++ b/packages/effect-codex-app-server/scripts/generate.ts
@@ -17,7 +17,7 @@ import {
} from "effect/unstable/http";
import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process";
-const UPSTREAM_REF = "fe74a774532af67b5a4a3dec03ce9469e17f89af";
+const UPSTREAM_REF = "687a119f0fcaace47e1f1abcc77cec6c813fd6da";
const USER_AGENT = "effect-codex-app-server-generator";
const GITHUB_API_BASE =
"https://api.github.com/repos/openai/codex/contents/codex-rs/app-server-protocol";
@@ -437,6 +437,9 @@ function resolveResponseTypeName(
generatedSchemaNames: ReadonlySet<string>,
): string {
const overrides: Record<string, string> = {
+ "account/gatewayOAuth/cancel": "GatewayOAuthCancelResponse",
+ "account/gatewayOAuth/login": "GatewayOAuthLoginResponse",
+ "account/gatewayOAuth/read": "GatewayOAuthReadResponse",
"account/logout": "LogoutAccountResponse",
"account/rateLimits/read": "GetAccountRateLimitsResponse",
"account/usage/read": "GetAccountTokenUsageResponse",
diff --git a/packages/effect-codex-app-server/src/_generated/meta.gen.ts b/packages/effect-codex-app-server/src/_generated/meta.gen.ts
index 88ffb842ac9..1c9d47e5852 100644
--- a/packages/effect-codex-app-server/src/_generated/meta.gen.ts
+++ b/packages/effect-codex-app-server/src/_generated/meta.gen.ts
@@ -1,5 +1,5 @@
// This file is generated by the effect-codex-app-server package. Do not edit manually.
-// Upstream protocol ref: fe74a774532af67b5a4a3dec03ce9469e17f89af
+// Upstream protocol ref: 687a119f0fcaace47e1f1abcc77cec6c813fd6da
import * as CodexSchema from "./schema.gen.ts";
@@ -71,6 +71,9 @@ export const CLIENT_REQUEST_METHODS = {
"turn/interrupt": "turn/interrupt",
"review/start": "review/start",
"model/list": "model/list",
+ "account/gatewayOAuth/read": "account/gatewayOAuth/read",
+ "account/gatewayOAuth/login": "account/gatewayOAuth/login",
+ "account/gatewayOAuth/cancel": "account/gatewayOAuth/cancel",
"modelProvider/capabilities/read": "modelProvider/capabilities/read",
"experimentalFeature/list": "experimentalFeature/list",
"permissionProfile/list": "permissionProfile/list",
@@ -176,6 +179,7 @@ export const SERVER_NOTIFICATION_METHODS = {
"mcpServer/startupStatus/updated": "mcpServer/startupStatus/updated",
"mcpServer/event/stream/notification": "mcpServer/event/stream/notification",
"account/updated": "account/updated",
+ "account/gatewayOAuth/changed": "account/gatewayOAuth/changed",
"account/rateLimits/updated": "account/rateLimits/updated",
"app/list/updated": "app/list/updated",
"remoteControl/status/changed": "remoteControl/status/changed",
@@ -287,6 +291,9 @@ export interface ClientRequestParamsByMethod {
readonly "turn/interrupt": CodexSchema.V2TurnInterruptParams;
readonly "review/start": CodexSchema.V2ReviewStartParams;
readonly "model/list": CodexSchema.V2ModelListParams;
+ readonly "account/gatewayOAuth/read": undefined;
+ readonly "account/gatewayOAuth/login": undefined;
+ readonly "account/gatewayOAuth/cancel": undefined;
readonly "modelProvider/capabilities/read": CodexSchema.V2ModelProviderCapabilitiesReadParams;
readonly "experimentalFeature/list": CodexSchema.V2ExperimentalFeatureListParams;
readonly "permissionProfile/list": CodexSchema.V2PermissionProfileListParams;
@@ -394,6 +401,9 @@ export interface ClientRequestResponsesByMethod {
readonly "turn/interrupt": CodexSchema.V2TurnInterruptResponse;
readonly "review/start": CodexSchema.V2ReviewStartResponse;
readonly "model/list": CodexSchema.V2ModelListResponse;
+ readonly "account/gatewayOAuth/read": CodexSchema.V2GatewayOAuthReadResponse;
+ readonly "account/gatewayOAuth/login": CodexSchema.V2GatewayOAuthLoginResponse;
+ readonly "account/gatewayOAuth/cancel": CodexSchema.V2GatewayOAuthCancelResponse;
readonly "modelProvider/capabilities/read": CodexSchema.V2ModelProviderCapabilitiesReadResponse;
readonly "experimentalFeature/list": CodexSchema.V2ExperimentalFeatureListResponse;
readonly "permissionProfile/list": CodexSchema.V2PermissionProfileListResponse;
@@ -512,6 +522,7 @@ export interface ServerNotificationParamsByMethod {
readonly "mcpServer/startupStatus/updated": CodexSchema.V2McpServerStatusUpdatedNotification;
readonly "mcpServer/event/stream/notification": CodexSchema.V2McpServerEventStreamNotification;
readonly "account/updated": CodexSchema.V2AccountUpdatedNotification;
+ readonly "account/gatewayOAuth/changed": CodexSchema.V2GatewayOAuthChangedNotification;
readonly "account/rateLimits/updated": CodexSchema.V2AccountRateLimitsUpdatedNotification;
readonly "app/list/updated": CodexSchema.V2AppListUpdatedNotification;
readonly "remoteControl/status/changed": CodexSchema.V2RemoteControlStatusChangedNotification;
@@ -618,6 +629,9 @@ export const CLIENT_REQUEST_PARAMS = {
"turn/interrupt": CodexSchema.V2TurnInterruptParams,
"review/start": CodexSchema.V2ReviewStartParams,
"model/list": CodexSchema.V2ModelListParams,
+ "account/gatewayOAuth/read": undefined,
+ "account/gatewayOAuth/login": undefined,
+ "account/gatewayOAuth/cancel": undefined,
"modelProvider/capabilities/read": CodexSchema.V2ModelProviderCapabilitiesReadParams,
"experimentalFeature/list": CodexSchema.V2ExperimentalFeatureListParams,
"permissionProfile/list": CodexSchema.V2PermissionProfileListParams,
@@ -726,6 +740,9 @@ export const CLIENT_REQUEST_RESPONSES = {
"turn/interrupt": CodexSchema.V2TurnInterruptResponse,
"review/start": CodexSchema.V2ReviewStartResponse,
"model/list": CodexSchema.V2ModelListResponse,
+ "account/gatewayOAuth/read": CodexSchema.V2GatewayOAuthReadResponse,
+ "account/gatewayOAuth/login": CodexSchema.V2GatewayOAuthLoginResponse,
+ "account/gatewayOAuth/cancel": CodexSchema.V2GatewayOAuthCancelResponse,
"modelProvider/capabilities/read": CodexSchema.V2ModelProviderCapabilitiesReadResponse,
"experimentalFeature/list": CodexSchema.V2ExperimentalFeatureListResponse,
"permissionProfile/list": CodexSchema.V2PermissionProfileListResponse,
@@ -847,6 +864,7 @@ export const SERVER_NOTIFICATION_PARAMS = {
"mcpServer/startupStatus/updated": CodexSchema.V2McpServerStatusUpdatedNotification,
"mcpServer/event/stream/notification": CodexSchema.V2McpServerEventStreamNotification,
"account/updated": CodexSchema.V2AccountUpdatedNotification,
+ "account/gatewayOAuth/changed": CodexSchema.V2GatewayOAuthChangedNotification,
"account/rateLimits/updated": CodexSchema.V2AccountRateLimitsUpdatedNotification,
"app/list/updated": CodexSchema.V2AppListUpdatedNotification,
"remoteControl/status/changed": CodexSchema.V2RemoteControlStatusChangedNotification,
diff --git a/packages/effect-codex-app-server/src/_generated/namespaces.gen.ts b/packages/effect-codex-app-server/src/_generated/namespaces.gen.ts
index 3428ce049ed..47474330d28 100644
--- a/packages/effect-codex-app-server/src/_generated/namespaces.gen.ts
+++ b/packages/effect-codex-app-server/src/_generated/namespaces.gen.ts
@@ -1,5 +1,5 @@
// This file is generated by the effect-codex-app-server package. Do not edit manually.
-// Upstream protocol ref: fe74a774532af67b5a4a3dec03ce9469e17f89af
+// Upstream protocol ref: 687a119f0fcaace47e1f1abcc77cec6c813fd6da
import * as CodexSchema from "./schema.gen.ts";
@@ -88,6 +88,10 @@ export const v2 = {
FsWatchResponse: CodexSchema.V2FsWatchResponse,
FsWriteFileParams: CodexSchema.V2FsWriteFileParams,
FsWriteFileResponse: CodexSchema.V2FsWriteFileResponse,
+ GatewayOAuthCancelResponse: CodexSchema.V2GatewayOAuthCancelResponse,
+ GatewayOAuthChangedNotification: CodexSchema.V2GatewayOAuthChangedNotification,
+ GatewayOAuthLoginResponse: CodexSchema.V2GatewayOAuthLoginResponse,
+ GatewayOAuthReadResponse: CodexSchema.V2GatewayOAuthReadResponse,
GetAccountParams: CodexSchema.V2GetAccountParams,
GetAccountRateLimitsResponse: CodexSchema.V2GetAccountRateLimitsResponse,
GetAccountResponse: CodexSchema.V2GetAccountResponse,
diff --git a/packages/effect-codex-app-server/src/_generated/schema.gen.ts b/packages/effect-codex-app-server/src/_generated/schema.gen.ts
index e9ac22ec120..38b46712257 100644
--- a/packages/effect-codex-app-server/src/_generated/schema.gen.ts
+++ b/packages/effect-codex-app-server/src/_generated/schema.gen.ts
@@ -1,5 +1,5 @@
// This file is generated by the effect-codex-app-server package. Do not edit manually.
-// Upstream protocol ref: fe74a774532af67b5a4a3dec03ce9469e17f89af
+// Upstream protocol ref: 687a119f0fcaace47e1f1abcc77cec6c813fd6da
import * as Schema from "effect/Schema";
@@ -57,6 +57,7 @@ export const ClientRequest__RequestId = Schema.Union([
export type ClientRequest__InitializeCapabilities = {
readonly experimentalApi?: boolean;
+ readonly explicitGatewayOauth?: boolean;
readonly extensions?: { readonly [x: string]: Schema.Json } | null;
readonly mcpServerOpenaiFormElicitation?: boolean;
readonly optOutNotificationMethods?: ReadonlyArray<string> | null;
@@ -69,6 +70,12 @@ export const ClientRequest__InitializeCapabilities = Schema.Struct({
default: false,
}),
),
+ explicitGatewayOauth: Schema.optionalKey(
+ Schema.Boolean.annotate({
+ description:
+ "Use explicit gateway OAuth login instead of automatic browser authorization. Applies to this app-server's gateway runtime; later connections cannot undo it.",
+ }),
+ ),
extensions: Schema.optionalKey(
Schema.Union([
Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })).annotate({
@@ -572,6 +579,23 @@ export const ClientRequest__TurnItemsView = Schema.Union(
{ mode: "oneOf" },
).annotate({ identifier: "ClientRequest__TurnItemsView" });
+export type ClientRequest__ThreadItemsListAnchor = {
+ readonly itemId: string;
+ readonly type: "item";
+};
+export const ClientRequest__ThreadItemsListAnchor = Schema.Union(
+ [
+ Schema.Struct({
+ itemId: Schema.String,
+ type: Schema.Literal("item").annotate({ title: "ItemThreadItemsListAnchorType" }),
+ }).annotate({ title: "ItemThreadItemsListAnchor" }),
+ ],
+ { mode: "oneOf" },
+).annotate({
+ description: "An exclusive item position within the requested visible turn.",
+ identifier: "ClientRequest__ThreadItemsListAnchor",
+});
+
export type ClientRequest__ThreadInjectItemsParams = {
readonly items: ReadonlyArray<Schema.Json>;
readonly threadId: string;
@@ -1094,27 +1118,19 @@ export const ClientRequest__McpServerStatusDetail = Schema.Literals([
"toolsAndAuthOnly",
]).annotate({ identifier: "ClientRequest__McpServerStatusDetail" });
-export type ClientRequest__McpResourceReadParams = {
- readonly connectorId?: string | null;
- readonly originCallId?: string | null;
- readonly server: string;
- readonly threadId?: string | null;
- readonly uri: string;
+export type ClientRequest__McpResourceReadTarget = {
+ readonly connectorId: string;
+ readonly linkId: string | null;
};
-export const ClientRequest__McpResourceReadParams = Schema.Struct({
- connectorId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- originCallId: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description: "Originating MCP tool call used to select the resource's app.",
- }),
- Schema.Null,
- ]),
- ),
- server: Schema.String,
- threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- uri: Schema.String,
-}).annotate({ identifier: "ClientRequest__McpResourceReadParams" });
+export const ClientRequest__McpResourceReadTarget = Schema.Struct({
+ connectorId: Schema.String,
+ linkId: Schema.Union([
+ Schema.String.annotate({
+ description: "Null explicitly requests no-auth access, subject to the app's resource policy.",
+ }),
+ Schema.Null,
+ ]),
+}).annotate({ identifier: "ClientRequest__McpResourceReadTarget" });
export type ClientRequest__McpServerToolCallParams = {
readonly _meta?: Schema.Json;
@@ -3209,6 +3225,18 @@ export const ServerNotification__PlanType = Schema.String.annotate({
identifier: "ServerNotification__PlanType",
});
+export type ServerNotification__GatewayOAuthStatus =
+ | "notReady"
+ | "started"
+ | "succeeded"
+ | "failed";
+export const ServerNotification__GatewayOAuthStatus = Schema.Literals([
+ "notReady",
+ "started",
+ "succeeded",
+ "failed",
+]).annotate({ identifier: "ServerNotification__GatewayOAuthStatus" });
+
export type ServerNotification__CreditsSnapshot = {
readonly balance?: string | null;
readonly hasCredits: boolean;
@@ -4008,6 +4036,7 @@ export const ToolRequestUserInputResponse__ToolRequestUserInputAnswer = Schema.S
export type V1InitializeParams__InitializeCapabilities = {
readonly experimentalApi?: boolean;
+ readonly explicitGatewayOauth?: boolean;
readonly extensions?: { readonly [x: string]: Schema.Json } | null;
readonly mcpServerOpenaiFormElicitation?: boolean;
readonly optOutNotificationMethods?: ReadonlyArray<string> | null;
@@ -4020,6 +4049,12 @@ export const V1InitializeParams__InitializeCapabilities = Schema.Struct({
default: false,
}),
),
+ explicitGatewayOauth: Schema.optionalKey(
+ Schema.Boolean.annotate({
+ description:
+ "Use explicit gateway OAuth login instead of automatic browser authorization. Applies to this app-server's gateway runtime; later connections cannot undo it.",
+ }),
+ ),
extensions: Schema.optionalKey(
Schema.Union([
Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })).annotate({
@@ -5339,6 +5374,30 @@ export const V2FsWriteFileParams__AbsolutePathBuf = Schema.String.annotate({
identifier: "V2FsWriteFileParams__AbsolutePathBuf",
});
+export type V2GatewayOAuthChangedNotification__GatewayOAuthStatus =
+ | "notReady"
+ | "started"
+ | "succeeded"
+ | "failed";
+export const V2GatewayOAuthChangedNotification__GatewayOAuthStatus = Schema.Literals([
+ "notReady",
+ "started",
+ "succeeded",
+ "failed",
+]).annotate({ identifier: "V2GatewayOAuthChangedNotification__GatewayOAuthStatus" });
+
+export type V2GatewayOAuthReadResponse__GatewayOAuthStatus =
+ | "notReady"
+ | "started"
+ | "succeeded"
+ | "failed";
+export const V2GatewayOAuthReadResponse__GatewayOAuthStatus = Schema.Literals([
+ "notReady",
+ "started",
+ "succeeded",
+ "failed",
+]).annotate({ identifier: "V2GatewayOAuthReadResponse__GatewayOAuthStatus" });
+
export type V2GetAccountRateLimitsResponse__RateLimitResetType = "codexRateLimits" | "unknown";
export const V2GetAccountRateLimitsResponse__RateLimitResetType = Schema.Literals([
"codexRateLimits",
@@ -6966,6 +7025,20 @@ export const V2MarketplaceUpgradeResponse__AbsolutePathBuf = Schema.String.annot
identifier: "V2MarketplaceUpgradeResponse__AbsolutePathBuf",
});
+export type V2McpResourceReadParams__McpResourceReadTarget = {
+ readonly connectorId: string;
+ readonly linkId: string | null;
+};
+export const V2McpResourceReadParams__McpResourceReadTarget = Schema.Struct({
+ connectorId: Schema.String,
+ linkId: Schema.Union([
+ Schema.String.annotate({
+ description: "Null explicitly requests no-auth access, subject to the app's resource policy.",
+ }),
+ Schema.Null,
+ ]),
+}).annotate({ identifier: "V2McpResourceReadParams__McpResourceReadTarget" });
+
export type V2McpResourceReadResponse__ResourceContent =
| {
readonly _meta?: Schema.Json;
@@ -9233,6 +9306,23 @@ export const V2ThreadGoalUpdatedNotification__ThreadGoalStatus = Schema.Literals
"complete",
]).annotate({ identifier: "V2ThreadGoalUpdatedNotification__ThreadGoalStatus" });
+export type V2ThreadItemsListParams__ThreadItemsListAnchor = {
+ readonly itemId: string;
+ readonly type: "item";
+};
+export const V2ThreadItemsListParams__ThreadItemsListAnchor = Schema.Union(
+ [
+ Schema.Struct({
+ itemId: Schema.String,
+ type: Schema.Literal("item").annotate({ title: "ItemThreadItemsListAnchorType" }),
+ }).annotate({ title: "ItemThreadItemsListAnchor" }),
+ ],
+ { mode: "oneOf" },
+).annotate({
+ description: "An exclusive item position within the requested visible turn.",
+ identifier: "V2ThreadItemsListParams__ThreadItemsListAnchor",
+});
+
export type V2ThreadItemsListParams__SortDirection = "asc" | "desc";
export const V2ThreadItemsListParams__SortDirection = Schema.Literals(["asc", "desc"]).annotate({
identifier: "V2ThreadItemsListParams__SortDirection",
@@ -16276,51 +16366,6 @@ export const ClientRequest__ThreadMetadataUpdateParams = Schema.Struct({
threadId: Schema.String,
}).annotate({ identifier: "ClientRequest__ThreadMetadataUpdateParams" });
-export type ClientRequest__ThreadItemsListParams = {
- readonly cursor?: string | null;
- readonly limit?: number | null;
- readonly sortDirection?: ClientRequest__SortDirection | null;
- readonly threadId: string;
- readonly turnId?: string | null;
-};
-export const ClientRequest__ThreadItemsListParams = Schema.Struct({
- cursor: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description: "Opaque cursor to pass to the next call to continue after the last item.",
- }),
- Schema.Null,
- ]),
- ),
- limit: Schema.optionalKey(
- Schema.Union([
- Schema.Number.annotate({ description: "Optional item page size.", format: "uint32" })
- .check(Schema.isInt().annotate({ expected: "an integer" }))
- .check(
- Schema.isGreaterThanOrEqualTo(0).annotate({
- expected: "a value greater than or equal to 0",
- }),
- ),
- Schema.Null,
- ]),
- ),
- sortDirection: Schema.optionalKey(
- Schema.Union([ClientRequest__SortDirection, Schema.Null]).annotate({
- description: "Optional item pagination direction; defaults to ascending.",
- }),
- ),
- threadId: Schema.String,
- turnId: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description:
- "Optional turn id to filter by. When omitted, returns items across the thread.",
- }),
- Schema.Null,
- ]),
- ),
-}).annotate({ identifier: "ClientRequest__ThreadItemsListParams" });
-
export type ClientRequest__ThreadListParams = {
readonly archived?: boolean | null;
readonly cursor?: string | null;
@@ -16511,6 +16556,15 @@ export const ClientRequest__ThreadTurnsListParams = Schema.Struct({
threadId: Schema.String,
}).annotate({ identifier: "ClientRequest__ThreadTurnsListParams" });
+export type ClientRequest__ThreadItemsListCursor = string | ClientRequest__ThreadItemsListAnchor;
+export const ClientRequest__ThreadItemsListCursor = Schema.Union([
+ Schema.String,
+ ClientRequest__ThreadItemsListAnchor,
+]).annotate({
+ description: "Starting position for an item-history page.",
+ identifier: "ClientRequest__ThreadItemsListCursor",
+});
+
export type ClientRequest__SkillsExtraRootsSetParams = {
readonly extraRoots: ReadonlyArray<ClientRequest__AbsolutePathBuf>;
};
@@ -17003,6 +17057,7 @@ export type ClientRequest__ListMcpServerStatusParams = {
readonly cursor?: string | null;
readonly detail?: ClientRequest__McpServerStatusDetail | null;
readonly limit?: number | null;
+ readonly serverName?: string | null;
readonly threadId?: string | null;
};
export const ClientRequest__ListMcpServerStatusParams = Schema.Struct({
@@ -17035,9 +17090,46 @@ export const ClientRequest__ListMcpServerStatusParams = Schema.Struct({
Schema.Null,
]),
),
+ serverName: Schema.optionalKey(
+ Schema.Union([
+ Schema.String.annotate({
+ description:
+ "Limit discovery to one server. With a thread ID, reuse that thread's MCP connection.",
+ }),
+ Schema.Null,
+ ]),
+ ),
threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
}).annotate({ identifier: "ClientRequest__ListMcpServerStatusParams" });
+export type ClientRequest__McpResourceReadParams = {
+ readonly connectorId?: string | null;
+ readonly originCallId?: string | null;
+ readonly server: string;
+ readonly target?: ClientRequest__McpResourceReadTarget | null;
+ readonly threadId?: string | null;
+ readonly uri: string;
+};
+export const ClientRequest__McpResourceReadParams = Schema.Struct({
+ connectorId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ originCallId: Schema.optionalKey(
+ Schema.Union([
+ Schema.String.annotate({
+ description: "Originating MCP tool call used to select the resource's app.",
+ }),
+ Schema.Null,
+ ]),
+ ),
+ server: Schema.String,
+ target: Schema.optionalKey(
+ Schema.Union([ClientRequest__McpResourceReadTarget, Schema.Null]).annotate({
+ description: "Explicit hosted app/account. Omit to retain legacy resource discovery.",
+ }),
+ ),
+ threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ uri: Schema.String,
+}).annotate({ identifier: "ClientRequest__McpResourceReadParams" });
+
export type ClientRequest__WindowsSandboxSetupStartParams = {
readonly cwd?: ClientRequest__AbsolutePathBuf | null;
readonly mode: ClientRequest__WindowsSandboxSetupMode;
@@ -17771,9 +17863,11 @@ export type ServerNotification__CodexErrorInfo =
| "sessionBudgetExceeded"
| "usageLimitExceeded"
| "rateLimitExceeded"
+ | "flexUnavailable"
| "serverOverloaded"
| "cyberPolicy"
| "misalignmentPolicyViolation"
+ | "tooManyDenials"
| "internalServerError"
| "unauthorized"
| "badRequest"
@@ -17796,9 +17890,11 @@ export const ServerNotification__CodexErrorInfo = Schema.Union(
"sessionBudgetExceeded",
"usageLimitExceeded",
"rateLimitExceeded",
+ "flexUnavailable",
"serverOverloaded",
"cyberPolicy",
"misalignmentPolicyViolation",
+ "tooManyDenials",
"internalServerError",
"unauthorized",
"badRequest",
@@ -18501,6 +18597,26 @@ export const ServerNotification__AccountUpdatedNotification = Schema.Struct({
planType: Schema.optionalKey(Schema.Union([ServerNotification__PlanType, Schema.Null])),
}).annotate({ identifier: "ServerNotification__AccountUpdatedNotification" });
+export type ServerNotification__GatewayOAuthChangedNotification = {
+ readonly authUrl?: string | null;
+ readonly error?: string | null;
+ readonly providerId: string;
+ readonly status: ServerNotification__GatewayOAuthStatus;
+};
+export const ServerNotification__GatewayOAuthChangedNotification = Schema.Struct({
+ authUrl: Schema.optionalKey(
+ Schema.Union([
+ Schema.String.annotate({
+ description: "Authorization handoff, sent only to the connection that started login.",
+ }),
+ Schema.Null,
+ ]),
+ ),
+ error: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ providerId: Schema.String,
+ status: ServerNotification__GatewayOAuthStatus,
+}).annotate({ identifier: "ServerNotification__GatewayOAuthChangedNotification" });
+
export type ServerNotification__RateLimitSnapshot = {
readonly credits?: ServerNotification__CreditsSnapshot | null;
readonly individualLimit?: ServerNotification__SpendControlLimitSnapshot | null;
@@ -19833,9 +19949,11 @@ export type V2ErrorNotification__CodexErrorInfo =
| "sessionBudgetExceeded"
| "usageLimitExceeded"
| "rateLimitExceeded"
+ | "flexUnavailable"
| "serverOverloaded"
| "cyberPolicy"
| "misalignmentPolicyViolation"
+ | "tooManyDenials"
| "internalServerError"
| "unauthorized"
| "badRequest"
@@ -19858,9 +19976,11 @@ export const V2ErrorNotification__CodexErrorInfo = Schema.Union(
"sessionBudgetExceeded",
"usageLimitExceeded",
"rateLimitExceeded",
+ "flexUnavailable",
"serverOverloaded",
"cyberPolicy",
"misalignmentPolicyViolation",
+ "tooManyDenials",
"internalServerError",
"unauthorized",
"badRequest",
@@ -21307,6 +21427,7 @@ export const V2ItemStartedNotification__CollabAgentState = Schema.Struct({
export type V2ListMcpServerStatusResponse__McpServerStatus = {
readonly authStatus: V2ListMcpServerStatusResponse__McpAuthStatus;
+ readonly httpOrigin?: string | null;
readonly name: string;
readonly pluginId?: string | null;
readonly resourceTemplates: ReadonlyArray<V2ListMcpServerStatusResponse__ResourceTemplate>;
@@ -21319,6 +21440,15 @@ export type V2ListMcpServerStatusResponse__McpServerStatus = {
};
export const V2ListMcpServerStatusResponse__McpServerStatus = Schema.Struct({
authStatus: V2ListMcpServerStatusResponse__McpAuthStatus,
+ httpOrigin: Schema.optionalKey(
+ Schema.Union([
+ Schema.String.annotate({
+ description:
+ "HTTP origin of the effective configured endpoint, including plugin servers. Excludes credentials, path, query, and fragment; null for non-HTTP transports.",
+ }),
+ Schema.Null,
+ ]),
+ ),
name: Schema.String,
pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
resourceTemplates: Schema.Array(V2ListMcpServerStatusResponse__ResourceTemplate),
@@ -22275,9 +22405,11 @@ export type V2ReviewStartResponse__CodexErrorInfo =
| "sessionBudgetExceeded"
| "usageLimitExceeded"
| "rateLimitExceeded"
+ | "flexUnavailable"
| "serverOverloaded"
| "cyberPolicy"
| "misalignmentPolicyViolation"
+ | "tooManyDenials"
| "internalServerError"
| "unauthorized"
| "badRequest"
@@ -22300,9 +22432,11 @@ export const V2ReviewStartResponse__CodexErrorInfo = Schema.Union(
"sessionBudgetExceeded",
"usageLimitExceeded",
"rateLimitExceeded",
+ "flexUnavailable",
"serverOverloaded",
"cyberPolicy",
"misalignmentPolicyViolation",
+ "tooManyDenials",
"internalServerError",
"unauthorized",
"badRequest",
@@ -22809,9 +22943,11 @@ export type V2ThreadForkResponse__CodexErrorInfo =
| "sessionBudgetExceeded"
| "usageLimitExceeded"
| "rateLimitExceeded"
+ | "flexUnavailable"
| "serverOverloaded"
| "cyberPolicy"
| "misalignmentPolicyViolation"
+ | "tooManyDenials"
| "internalServerError"
| "unauthorized"
| "badRequest"
@@ -22834,9 +22970,11 @@ export const V2ThreadForkResponse__CodexErrorInfo = Schema.Union(
"sessionBudgetExceeded",
"usageLimitExceeded",
"rateLimitExceeded",
+ "flexUnavailable",
"serverOverloaded",
"cyberPolicy",
"misalignmentPolicyViolation",
+ "tooManyDenials",
"internalServerError",
"unauthorized",
"badRequest",
@@ -23193,6 +23331,17 @@ export const V2ThreadGoalUpdatedNotification__ThreadGoal = Schema.Struct({
),
}).annotate({ identifier: "V2ThreadGoalUpdatedNotification__ThreadGoal" });
+export type V2ThreadItemsListParams__ThreadItemsListCursor =
+ | string
+ | V2ThreadItemsListParams__ThreadItemsListAnchor;
+export const V2ThreadItemsListParams__ThreadItemsListCursor = Schema.Union([
+ Schema.String,
+ V2ThreadItemsListParams__ThreadItemsListAnchor,
+]).annotate({
+ description: "Starting position for an item-history page.",
+ identifier: "V2ThreadItemsListParams__ThreadItemsListCursor",
+});
+
export type V2ThreadItemsListResponse__TextElement = {
readonly byteRange: V2ThreadItemsListResponse__ByteRange;
readonly placeholder?: string | null;
@@ -23444,9 +23593,11 @@ export type V2ThreadListResponse__CodexErrorInfo =
| "sessionBudgetExceeded"
| "usageLimitExceeded"
| "rateLimitExceeded"
+ | "flexUnavailable"
| "serverOverloaded"
| "cyberPolicy"
| "misalignmentPolicyViolation"
+ | "tooManyDenials"
| "internalServerError"
| "unauthorized"
| "badRequest"
@@ -23469,9 +23620,11 @@ export const V2ThreadListResponse__CodexErrorInfo = Schema.Union(
"sessionBudgetExceeded",
"usageLimitExceeded",
"rateLimitExceeded",
+ "flexUnavailable",
"serverOverloaded",
"cyberPolicy",
"misalignmentPolicyViolation",
+ "tooManyDenials",
"internalServerError",
"unauthorized",
"badRequest",
@@ -23849,9 +24002,11 @@ export type V2ThreadMetadataUpdateResponse__CodexErrorInfo =
| "sessionBudgetExceeded"
| "usageLimitExceeded"
| "rateLimitExceeded"
+ | "flexUnavailable"
| "serverOverloaded"
| "cyberPolicy"
| "misalignmentPolicyViolation"
+ | "tooManyDenials"
| "internalServerError"
| "unauthorized"
| "badRequest"
@@ -23874,9 +24029,11 @@ export const V2ThreadMetadataUpdateResponse__CodexErrorInfo = Schema.Union(
"sessionBudgetExceeded",
"usageLimitExceeded",
"rateLimitExceeded",
+ "flexUnavailable",
"serverOverloaded",
"cyberPolicy",
"misalignmentPolicyViolation",
+ "tooManyDenials",
"internalServerError",
"unauthorized",
"badRequest",
@@ -24259,9 +24416,11 @@ export type V2ThreadReadResponse__CodexErrorInfo =
| "sessionBudgetExceeded"
| "usageLimitExceeded"
| "rateLimitExceeded"
+ | "flexUnavailable"
| "serverOverloaded"
| "cyberPolicy"
| "misalignmentPolicyViolation"
+ | "tooManyDenials"
| "internalServerError"
| "unauthorized"
| "badRequest"
@@ -24284,9 +24443,11 @@ export const V2ThreadReadResponse__CodexErrorInfo = Schema.Union(
"sessionBudgetExceeded",
"usageLimitExceeded",
"rateLimitExceeded",
+ "flexUnavailable",
"serverOverloaded",
"cyberPolicy",
"misalignmentPolicyViolation",
+ "tooManyDenials",
"internalServerError",
"unauthorized",
"badRequest",
@@ -25023,9 +25184,11 @@ export type V2ThreadResumeResponse__CodexErrorInfo =
| "sessionBudgetExceeded"
| "usageLimitExceeded"
| "rateLimitExceeded"
+ | "flexUnavailable"
| "serverOverloaded"
| "cyberPolicy"
| "misalignmentPolicyViolation"
+ | "tooManyDenials"
| "internalServerError"
| "unauthorized"
| "badRequest"
@@ -25048,9 +25211,11 @@ export const V2ThreadResumeResponse__CodexErrorInfo = Schema.Union(
"sessionBudgetExceeded",
"usageLimitExceeded",
"rateLimitExceeded",
+ "flexUnavailable",
"serverOverloaded",
"cyberPolicy",
"misalignmentPolicyViolation",
+ "tooManyDenials",
"internalServerError",
"unauthorized",
"badRequest",
@@ -25390,9 +25555,11 @@ export type V2ThreadRevertResponse__CodexErrorInfo =
| "sessionBudgetExceeded"
| "usageLimitExceeded"
| "rateLimitExceeded"
+ | "flexUnavailable"
| "serverOverloaded"
| "cyberPolicy"
| "misalignmentPolicyViolation"
+ | "tooManyDenials"
| "internalServerError"
| "unauthorized"
| "badRequest"
@@ -25415,9 +25582,11 @@ export const V2ThreadRevertResponse__CodexErrorInfo = Schema.Union(
"sessionBudgetExceeded",
"usageLimitExceeded",
"rateLimitExceeded",
+ "flexUnavailable",
"serverOverloaded",
"cyberPolicy",
"misalignmentPolicyViolation",
+ "tooManyDenials",
"internalServerError",
"unauthorized",
"badRequest",
@@ -25926,9 +26095,11 @@ export type V2ThreadStartedNotification__CodexErrorInfo =
| "sessionBudgetExceeded"
| "usageLimitExceeded"
| "rateLimitExceeded"
+ | "flexUnavailable"
| "serverOverloaded"
| "cyberPolicy"
| "misalignmentPolicyViolation"
+ | "tooManyDenials"
| "internalServerError"
| "unauthorized"
| "badRequest"
@@ -25951,9 +26122,11 @@ export const V2ThreadStartedNotification__CodexErrorInfo = Schema.Union(
"sessionBudgetExceeded",
"usageLimitExceeded",
"rateLimitExceeded",
+ "flexUnavailable",
"serverOverloaded",
"cyberPolicy",
"misalignmentPolicyViolation",
+ "tooManyDenials",
"internalServerError",
"unauthorized",
"badRequest",
@@ -26427,9 +26600,11 @@ export type V2ThreadStartResponse__CodexErrorInfo =
| "sessionBudgetExceeded"
| "usageLimitExceeded"
| "rateLimitExceeded"
+ | "flexUnavailable"
| "serverOverloaded"
| "cyberPolicy"
| "misalignmentPolicyViolation"
+ | "tooManyDenials"
| "internalServerError"
| "unauthorized"
| "badRequest"
@@ -26452,9 +26627,11 @@ export const V2ThreadStartResponse__CodexErrorInfo = Schema.Union(
"sessionBudgetExceeded",
"usageLimitExceeded",
"rateLimitExceeded",
+ "flexUnavailable",
"serverOverloaded",
"cyberPolicy",
"misalignmentPolicyViolation",
+ "tooManyDenials",
"internalServerError",
"unauthorized",
"badRequest",
@@ -26753,9 +26930,11 @@ export type V2ThreadTurnsListResponse__CodexErrorInfo =
| "sessionBudgetExceeded"
| "usageLimitExceeded"
| "rateLimitExceeded"
+ | "flexUnavailable"
| "serverOverloaded"
| "cyberPolicy"
| "misalignmentPolicyViolation"
+ | "tooManyDenials"
| "internalServerError"
| "unauthorized"
| "badRequest"
@@ -26778,9 +26957,11 @@ export const V2ThreadTurnsListResponse__CodexErrorInfo = Schema.Union(
"sessionBudgetExceeded",
"usageLimitExceeded",
"rateLimitExceeded",
+ "flexUnavailable",
"serverOverloaded",
"cyberPolicy",
"misalignmentPolicyViolation",
+ "tooManyDenials",
"internalServerError",
"unauthorized",
"badRequest",
@@ -27162,9 +27343,11 @@ export type V2ThreadUnarchiveResponse__CodexErrorInfo =
| "sessionBudgetExceeded"
| "usageLimitExceeded"
| "rateLimitExceeded"
+ | "flexUnavailable"
| "serverOverloaded"
| "cyberPolicy"
| "misalignmentPolicyViolation"
+ | "tooManyDenials"
| "internalServerError"
| "unauthorized"
| "badRequest"
@@ -27187,9 +27370,11 @@ export const V2ThreadUnarchiveResponse__CodexErrorInfo = Schema.Union(
"sessionBudgetExceeded",
"usageLimitExceeded",
"rateLimitExceeded",
+ "flexUnavailable",
"serverOverloaded",
"cyberPolicy",
"misalignmentPolicyViolation",
+ "tooManyDenials",
"internalServerError",
"unauthorized",
"badRequest",
@@ -27489,9 +27674,11 @@ export type V2TurnCompletedNotification__CodexErrorInfo =
| "sessionBudgetExceeded"
| "usageLimitExceeded"
| "rateLimitExceeded"
+ | "flexUnavailable"
| "serverOverloaded"
| "cyberPolicy"
| "misalignmentPolicyViolation"
+ | "tooManyDenials"
| "internalServerError"
| "unauthorized"
| "badRequest"
@@ -27514,9 +27701,11 @@ export const V2TurnCompletedNotification__CodexErrorInfo = Schema.Union(
"sessionBudgetExceeded",
"usageLimitExceeded",
"rateLimitExceeded",
+ "flexUnavailable",
"serverOverloaded",
"cyberPolicy",
"misalignmentPolicyViolation",
+ "tooManyDenials",
"internalServerError",
"unauthorized",
"badRequest",
@@ -27826,9 +28015,11 @@ export type V2TurnStartedNotification__CodexErrorInfo =
| "sessionBudgetExceeded"
| "usageLimitExceeded"
| "rateLimitExceeded"
+ | "flexUnavailable"
| "serverOverloaded"
| "cyberPolicy"
| "misalignmentPolicyViolation"
+ | "tooManyDenials"
| "internalServerError"
| "unauthorized"
| "badRequest"
@@ -27851,9 +28042,11 @@ export const V2TurnStartedNotification__CodexErrorInfo = Schema.Union(
"sessionBudgetExceeded",
"usageLimitExceeded",
"rateLimitExceeded",
+ "flexUnavailable",
"serverOverloaded",
"cyberPolicy",
"misalignmentPolicyViolation",
+ "tooManyDenials",
"internalServerError",
"unauthorized",
"badRequest",
@@ -28290,9 +28483,11 @@ export type V2TurnStartResponse__CodexErrorInfo =
| "sessionBudgetExceeded"
| "usageLimitExceeded"
| "rateLimitExceeded"
+ | "flexUnavailable"
| "serverOverloaded"
| "cyberPolicy"
| "misalignmentPolicyViolation"
+ | "tooManyDenials"
| "internalServerError"
| "unauthorized"
| "badRequest"
@@ -28315,9 +28510,11 @@ export const V2TurnStartResponse__CodexErrorInfo = Schema.Union(
"sessionBudgetExceeded",
"usageLimitExceeded",
"rateLimitExceeded",
+ "flexUnavailable",
"serverOverloaded",
"cyberPolicy",
"misalignmentPolicyViolation",
+ "tooManyDenials",
"internalServerError",
"unauthorized",
"badRequest",
@@ -28693,6 +28890,49 @@ export const ApplyPatchApprovalResponse__ReviewDecision = Schema.Union(
identifier: "ApplyPatchApprovalResponse__ReviewDecision",
});
+export type ClientRequest__ThreadItemsListParams = {
+ readonly cursor?: ClientRequest__ThreadItemsListCursor | null;
+ readonly limit?: number | null;
+ readonly sortDirection?: ClientRequest__SortDirection | null;
+ readonly threadId: string;
+ readonly turnId?: string | null;
+};
+export const ClientRequest__ThreadItemsListParams = Schema.Struct({
+ cursor: Schema.optionalKey(
+ Schema.Union([ClientRequest__ThreadItemsListCursor, Schema.Null]).annotate({
+ description:
+ "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.",
+ }),
+ ),
+ limit: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({ description: "Optional item page size.", format: "uint32" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({
+ expected: "a value greater than or equal to 0",
+ }),
+ ),
+ Schema.Null,
+ ]),
+ ),
+ sortDirection: Schema.optionalKey(
+ Schema.Union([ClientRequest__SortDirection, Schema.Null]).annotate({
+ description: "Optional item pagination direction; defaults to ascending.",
+ }),
+ ),
+ threadId: Schema.String,
+ turnId: Schema.optionalKey(
+ Schema.Union([
+ Schema.String.annotate({
+ description:
+ "Optional turn id to filter by. When omitted, returns items across the thread.",
+ }),
+ Schema.Null,
+ ]),
+ ),
+}).annotate({ identifier: "ClientRequest__ThreadItemsListParams" });
+
export type ClientRequest__PluginShareSaveParams = {
readonly discoverability?: ClientRequest__PluginShareDiscoverability | null;
readonly pluginPath: ClientRequest__AbsolutePathBuf;
@@ -42625,7 +42865,7 @@ export const ServerNotification__Turn = Schema.Struct({
),
error: Schema.optionalKey(
Schema.Union([ServerNotification__TurnError, Schema.Null]).annotate({
- description: "Only populated when the Turn's status is failed.",
+ description: "Error associated with a failed or interrupted turn.",
}),
),
id: Schema.String.annotate({
@@ -43212,7 +43452,7 @@ export const V2ReviewStartResponse__Turn = Schema.Struct({
),
error: Schema.optionalKey(
Schema.Union([V2ReviewStartResponse__TurnError, Schema.Null]).annotate({
- description: "Only populated when the Turn's status is failed.",
+ description: "Error associated with a failed or interrupted turn.",
}),
),
id: Schema.String.annotate({
@@ -43273,7 +43513,7 @@ export const V2ThreadForkResponse__Turn = Schema.Struct({
),
error: Schema.optionalKey(
Schema.Union([V2ThreadForkResponse__TurnError, Schema.Null]).annotate({
- description: "Only populated when the Turn's status is failed.",
+ description: "Error associated with a failed or interrupted turn.",
}),
),
id: Schema.String.annotate({
@@ -43303,11 +43543,33 @@ export const V2ThreadForkResponse__Turn = Schema.Struct({
}).annotate({ identifier: "V2ThreadForkResponse__Turn" });
export type V2ThreadItemsListResponse__ThreadItemEntry = {
+ readonly completedAtMs?: number | null;
readonly item: V2ThreadItemsListResponse__ThreadItem;
+ readonly startedAtMs?: number | null;
readonly turnId: string;
};
export const V2ThreadItemsListResponse__ThreadItemEntry = Schema.Struct({
+ completedAtMs: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({
+ description:
+ "Unix timestamp (milliseconds) when the item completed, if recorded by the producer.",
+ format: "int64",
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
+ Schema.Null,
+ ]),
+ ),
item: V2ThreadItemsListResponse__ThreadItem,
+ startedAtMs: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({
+ description:
+ "Unix timestamp (milliseconds) when the item started, if recorded by the producer.",
+ format: "int64",
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
+ Schema.Null,
+ ]),
+ ),
turnId: Schema.String.annotate({ description: "Turn containing this item." }),
}).annotate({ identifier: "V2ThreadItemsListResponse__ThreadItemEntry" });
@@ -43342,7 +43604,7 @@ export const V2ThreadListResponse__Turn = Schema.Struct({
),
error: Schema.optionalKey(
Schema.Union([V2ThreadListResponse__TurnError, Schema.Null]).annotate({
- description: "Only populated when the Turn's status is failed.",
+ description: "Error associated with a failed or interrupted turn.",
}),
),
id: Schema.String.annotate({
@@ -43402,7 +43664,7 @@ export const V2ThreadMetadataUpdateResponse__Turn = Schema.Struct({
),
error: Schema.optionalKey(
Schema.Union([V2ThreadMetadataUpdateResponse__TurnError, Schema.Null]).annotate({
- description: "Only populated when the Turn's status is failed.",
+ description: "Error associated with a failed or interrupted turn.",
}),
),
id: Schema.String.annotate({
@@ -43463,7 +43725,7 @@ export const V2ThreadReadResponse__Turn = Schema.Struct({
),
error: Schema.optionalKey(
Schema.Union([V2ThreadReadResponse__TurnError, Schema.Null]).annotate({
- description: "Only populated when the Turn's status is failed.",
+ description: "Error associated with a failed or interrupted turn.",
}),
),
id: Schema.String.annotate({
@@ -43523,7 +43785,7 @@ export const V2ThreadResumeResponse__Turn = Schema.Struct({
),
error: Schema.optionalKey(
Schema.Union([V2ThreadResumeResponse__TurnError, Schema.Null]).annotate({
- description: "Only populated when the Turn's status is failed.",
+ description: "Error associated with a failed or interrupted turn.",
}),
),
id: Schema.String.annotate({
@@ -43584,7 +43846,7 @@ export const V2ThreadRevertResponse__Turn = Schema.Struct({
),
error: Schema.optionalKey(
Schema.Union([V2ThreadRevertResponse__TurnError, Schema.Null]).annotate({
- description: "Only populated when the Turn's status is failed.",
+ description: "Error associated with a failed or interrupted turn.",
}),
),
id: Schema.String.annotate({
@@ -43645,7 +43907,7 @@ export const V2ThreadStartedNotification__Turn = Schema.Struct({
),
error: Schema.optionalKey(
Schema.Union([V2ThreadStartedNotification__TurnError, Schema.Null]).annotate({
- description: "Only populated when the Turn's status is failed.",
+ description: "Error associated with a failed or interrupted turn.",
}),
),
id: Schema.String.annotate({
@@ -43706,7 +43968,7 @@ export const V2ThreadStartResponse__Turn = Schema.Struct({
),
error: Schema.optionalKey(
Schema.Union([V2ThreadStartResponse__TurnError, Schema.Null]).annotate({
- description: "Only populated when the Turn's status is failed.",
+ description: "Error associated with a failed or interrupted turn.",
}),
),
id: Schema.String.annotate({
@@ -43767,7 +44029,7 @@ export const V2ThreadTurnsListResponse__Turn = Schema.Struct({
),
error: Schema.optionalKey(
Schema.Union([V2ThreadTurnsListResponse__TurnError, Schema.Null]).annotate({
- description: "Only populated when the Turn's status is failed.",
+ description: "Error associated with a failed or interrupted turn.",
}),
),
id: Schema.String.annotate({
@@ -43828,7 +44090,7 @@ export const V2ThreadUnarchiveResponse__Turn = Schema.Struct({
),
error: Schema.optionalKey(
Schema.Union([V2ThreadUnarchiveResponse__TurnError, Schema.Null]).annotate({
- description: "Only populated when the Turn's status is failed.",
+ description: "Error associated with a failed or interrupted turn.",
}),
),
id: Schema.String.annotate({
@@ -43889,7 +44151,7 @@ export const V2TurnCompletedNotification__Turn = Schema.Struct({
),
error: Schema.optionalKey(
Schema.Union([V2TurnCompletedNotification__TurnError, Schema.Null]).annotate({
- description: "Only populated when the Turn's status is failed.",
+ description: "Error associated with a failed or interrupted turn.",
}),
),
id: Schema.String.annotate({
@@ -43950,7 +44212,7 @@ export const V2TurnStartedNotification__Turn = Schema.Struct({
),
error: Schema.optionalKey(
Schema.Union([V2TurnStartedNotification__TurnError, Schema.Null]).annotate({
- description: "Only populated when the Turn's status is failed.",
+ description: "Error associated with a failed or interrupted turn.",
}),
),
id: Schema.String.annotate({
@@ -44011,7 +44273,7 @@ export const V2TurnStartResponse__Turn = Schema.Struct({
),
error: Schema.optionalKey(
Schema.Union([V2TurnStartResponse__TurnError, Schema.Null]).annotate({
- description: "Only populated when the Turn's status is failed.",
+ description: "Error associated with a failed or interrupted turn.",
}),
),
id: Schema.String.annotate({
@@ -47165,6 +47427,21 @@ export type ClientRequest =
readonly method: "model/list";
readonly params: ClientRequest__ModelListParams;
}
+ | {
+ readonly id: ClientRequest__RequestId;
+ readonly method: "account/gatewayOAuth/read";
+ readonly params?: null;
+ }
+ | {
+ readonly id: ClientRequest__RequestId;
+ readonly method: "account/gatewayOAuth/login";
+ readonly params?: null;
+ }
+ | {
+ readonly id: ClientRequest__RequestId;
+ readonly method: "account/gatewayOAuth/cancel";
+ readonly params?: null;
+ }
| {
readonly id: ClientRequest__RequestId;
readonly method: "modelProvider/capabilities/read";
@@ -47744,6 +48021,27 @@ export const ClientRequest = Schema.Union(
method: Schema.Literal("model/list").annotate({ title: "Model/listRequestMethod" }),
params: ClientRequest__ModelListParams,
}).annotate({ title: "Model/listRequest" }),
+ Schema.Struct({
+ id: ClientRequest__RequestId,
+ method: Schema.Literal("account/gatewayOAuth/read").annotate({
+ title: "Account/gatewayOAuth/readRequestMethod",
+ }),
+ params: Schema.optionalKey(Schema.Null),
+ }).annotate({ title: "Account/gatewayOAuth/readRequest" }),
+ Schema.Struct({
+ id: ClientRequest__RequestId,
+ method: Schema.Literal("account/gatewayOAuth/login").annotate({
+ title: "Account/gatewayOAuth/loginRequestMethod",
+ }),
+ params: Schema.optionalKey(Schema.Null),
+ }).annotate({ title: "Account/gatewayOAuth/loginRequest" }),
+ Schema.Struct({
+ id: ClientRequest__RequestId,
+ method: Schema.Literal("account/gatewayOAuth/cancel").annotate({
+ title: "Account/gatewayOAuth/cancelRequestMethod",
+ }),
+ params: Schema.optionalKey(Schema.Null),
+ }).annotate({ title: "Account/gatewayOAuth/cancelRequest" }),
Schema.Struct({
id: ClientRequest__RequestId,
method: Schema.Literal("modelProvider/capabilities/read").annotate({
@@ -49495,6 +49793,11 @@ export type ServerNotification =
readonly method: "account/updated";
readonly params: ServerNotification__AccountUpdatedNotification;
}
+ | {
+ readonly emittedAtMs?: number;
+ readonly method: "account/gatewayOAuth/changed";
+ readonly params: ServerNotification__GatewayOAuthChangedNotification;
+ }
| {
readonly emittedAtMs?: number;
readonly method: "account/rateLimits/updated";
@@ -50284,6 +50587,19 @@ export const ServerNotification = Schema.Union(
}),
params: ServerNotification__AccountUpdatedNotification,
}).annotate({ title: "Account/updatedNotification" }),
+ Schema.Struct({
+ emittedAtMs: Schema.optionalKey(
+ Schema.Number.annotate({
+ description:
+ "Unix timestamp (in milliseconds) when app-server emitted this notification.",
+ format: "int64",
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
+ ),
+ method: Schema.Literal("account/gatewayOAuth/changed").annotate({
+ title: "Account/gatewayOAuth/changedNotificationMethod",
+ }),
+ params: ServerNotification__GatewayOAuthChangedNotification,
+ }).annotate({ title: "Account/gatewayOAuth/changedNotification" }),
Schema.Struct({
emittedAtMs: Schema.optionalKey(
Schema.Number.annotate({
@@ -52595,6 +52911,63 @@ export const V2FsWriteFileResponse = Schema.Record(
description: "Successful response for `fs/writeFile`.",
});
+export type V2GatewayOAuthCancelResponse = { readonly [x: string]: Schema.Json };
+export const V2GatewayOAuthCancelResponse = Schema.Record(
+ Schema.String,
+ Schema.Json.annotate({ expected: "JSON value" }),
+).annotate({ title: "GatewayOAuthCancelResponse" });
+
+export type V2GatewayOAuthChangedNotification = {
+ readonly authUrl?: string | null;
+ readonly error?: string | null;
+ readonly providerId: string;
+ readonly status: V2GatewayOAuthChangedNotification__GatewayOAuthStatus;
+};
+export const V2GatewayOAuthChangedNotification = Schema.Struct({
+ authUrl: Schema.optionalKey(
+ Schema.Union([
+ Schema.String.annotate({
+ description: "Authorization handoff, sent only to the connection that started login.",
+ }),
+ Schema.Null,
+ ]),
+ ),
+ error: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ providerId: Schema.String,
+ status: V2GatewayOAuthChangedNotification__GatewayOAuthStatus,
+}).annotate({ title: "GatewayOAuthChangedNotification" });
+
+export type V2GatewayOAuthLoginResponse = { readonly [x: string]: Schema.Json };
+export const V2GatewayOAuthLoginResponse = Schema.Record(
+ Schema.String,
+ Schema.Json.annotate({ expected: "JSON value" }),
+).annotate({ title: "GatewayOAuthLoginResponse" });
+
+export type V2GatewayOAuthReadResponse = {
+ readonly error?: string | null;
+ readonly providerId: string;
+ readonly providerName: string;
+ readonly required: boolean;
+ readonly status?: V2GatewayOAuthReadResponse__GatewayOAuthStatus | null;
+};
+export const V2GatewayOAuthReadResponse = Schema.Struct({
+ error: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ providerId: Schema.String,
+ providerName: Schema.String,
+ required: Schema.Boolean.annotate({
+ description: "Whether the selected provider uses gateway OAuth, even when already signed in.",
+ }),
+ status: Schema.optionalKey(
+ Schema.Union([V2GatewayOAuthReadResponse__GatewayOAuthStatus, Schema.Null]).annotate({
+ description: "Null when the effective provider does not use gateway OAuth.",
+ }),
+ ),
+}).annotate({
+ title: "GatewayOAuthReadResponse",
+ description:
+ "Current effective gateway policy and credential readiness; never contains credentials.",
+});
+
export type V2GetAccountParams = { readonly refreshToken?: boolean };
export const V2GetAccountParams = Schema.Struct({
refreshToken: Schema.optionalKey(
@@ -52870,6 +53243,7 @@ export type V2ListMcpServerStatusParams = {
readonly cursor?: string | null;
readonly detail?: V2ListMcpServerStatusParams__McpServerStatusDetail | null;
readonly limit?: number | null;
+ readonly serverName?: string | null;
readonly threadId?: string | null;
};
export const V2ListMcpServerStatusParams = Schema.Struct({
@@ -52902,6 +53276,15 @@ export const V2ListMcpServerStatusParams = Schema.Struct({
Schema.Null,
]),
),
+ serverName: Schema.optionalKey(
+ Schema.Union([
+ Schema.String.annotate({
+ description:
+ "Limit discovery to one server. With a thread ID, reuse that thread's MCP connection.",
+ }),
+ Schema.Null,
+ ]),
+ ),
threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
}).annotate({ title: "ListMcpServerStatusParams" });
@@ -53129,6 +53512,7 @@ export type V2McpResourceReadParams = {
readonly connectorId?: string | null;
readonly originCallId?: string | null;
readonly server: string;
+ readonly target?: V2McpResourceReadParams__McpResourceReadTarget | null;
readonly threadId?: string | null;
readonly uri: string;
};
@@ -53143,6 +53527,11 @@ export const V2McpResourceReadParams = Schema.Struct({
]),
),
server: Schema.String,
+ target: Schema.optionalKey(
+ Schema.Union([V2McpResourceReadParams__McpResourceReadTarget, Schema.Null]).annotate({
+ description: "Explicit hosted app/account. Omit to retain legacy resource discovery.",
+ }),
+ ),
threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
uri: Schema.String,
}).annotate({ title: "McpResourceReadParams" });
@@ -54530,7 +54919,7 @@ export const V2ThreadInjectItemsResponse = Schema.Record(
).annotate({ title: "ThreadInjectItemsResponse" });
export type V2ThreadItemsListParams = {
- readonly cursor?: string | null;
+ readonly cursor?: V2ThreadItemsListParams__ThreadItemsListCursor | null;
readonly limit?: number | null;
readonly sortDirection?: V2ThreadItemsListParams__SortDirection | null;
readonly threadId: string;
@@ -54538,12 +54927,10 @@ export type V2ThreadItemsListParams = {
};
export const V2ThreadItemsListParams = Schema.Struct({
cursor: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description: "Opaque cursor to pass to the next call to continue after the last item.",
- }),
- Schema.Null,
- ]),
+ Schema.Union([V2ThreadItemsListParams__ThreadItemsListCursor, Schema.Null]).annotate({
+ description:
+ "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.",
+ }),
),
limit: Schema.optionalKey(
Schema.Union([