// This file is generated by the effect-codex-app-server package. Do not edit manually.// Upstream protocol ref: be75785504ff152fa6333e380a2d50642f42fba0 import * as Schema from "effect/Schema"; export type ApplyPatchApprovalParams__FileChange = | { readonly content: string; readonly type: "add" } | { readonly content: string; readonly type: "delete" } | { readonly move_path?: string | null; readonly type: "update"; readonly unified_diff: string };export const ApplyPatchApprovalParams__FileChange = Schema.Union( [ Schema.Struct({ content: Schema.String, type: Schema.Literal("add").annotate({ title: "AddFileChangeType" }), }).annotate({ title: "AddFileChange" }), Schema.Struct({ content: Schema.String, type: Schema.Literal("delete").annotate({ title: "DeleteFileChangeType" }), }).annotate({ title: "DeleteFileChange" }), Schema.Struct({ move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), type: Schema.Literal("update").annotate({ title: "UpdateFileChangeType" }), unified_diff: Schema.String, }).annotate({ title: "UpdateFileChange" }), ], { mode: "oneOf" },); export type ApplyPatchApprovalParams__ThreadId = string;export const ApplyPatchApprovalParams__ThreadId = Schema.String; export type ApplyPatchApprovalResponse__NetworkPolicyRuleAction = "allow" | "deny";export const ApplyPatchApprovalResponse__NetworkPolicyRuleAction = Schema.Literals([ "allow", "deny",]); export type ChatgptAuthTokensRefreshParams__ChatgptAuthTokensRefreshReason = "unauthorized";export const ChatgptAuthTokensRefreshParams__ChatgptAuthTokensRefreshReason = Schema.Literal("unauthorized"); export type ClientRequest__AbsolutePathBuf = string;export const ClientRequest__AbsolutePathBuf = Schema.String.annotate({ description: "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",}); export type ClientRequest__AddCreditsNudgeCreditType = "credits" | "usage_limit";export const ClientRequest__AddCreditsNudgeCreditType = Schema.Literals(["credits", "usage_limit"]); export type ClientRequest__ApprovalsReviewer = "user" | "guardian_subagent";export const ClientRequest__ApprovalsReviewer = Schema.Literals([ "user", "guardian_subagent",]).annotate({ description: "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.",}); export type ClientRequest__AppsListParams = { readonly cursor?: string | null; readonly forceRefetch?: boolean; readonly limit?: number | null; readonly threadId?: string | null;};export const ClientRequest__AppsListParams = Schema.Struct({ cursor: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ description: "Opaque pagination cursor returned by a previous call.", }), Schema.Null, ]), ), forceRefetch: Schema.optionalKey( Schema.Boolean.annotate({ description: "When true, bypass app caches and fetch the latest data from sources.", }), ), limit: Schema.optionalKey( Schema.Union([ Schema.Number.annotate({ description: "Optional page size; defaults to a reasonable server-side value.", format: "uint32", }) .check(Schema.isInt()) .check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null, ]), ), threadId: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ description: "Optional thread id used to evaluate app feature gating from that thread's config.", }), Schema.Null, ]), ),}).annotate({ description: "EXPERIMENTAL - list available apps/connectors." }); export type ClientRequest__AskForApproval = | "untrusted" | "on-failure" | "on-request" | "never" | { readonly granular: { readonly mcp_elicitations: boolean; readonly request_permissions?: boolean; readonly rules: boolean; readonly sandbox_approval: boolean; readonly skill_approval?: boolean; }; };export const ClientRequest__AskForApproval = Schema.Union( [ Schema.Literals(["untrusted", "on-failure", "on-request", "never"]), Schema.Struct({ granular: Schema.Struct({ mcp_elicitations: Schema.Boolean, request_permissions: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), rules: Schema.Boolean, sandbox_approval: Schema.Boolean, skill_approval: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), }), }).annotate({ title: "GranularAskForApproval" }), ], { mode: "oneOf" },); export type ClientRequest__CancelLoginAccountParams = { readonly loginId: string };export const ClientRequest__CancelLoginAccountParams = Schema.Struct({ loginId: Schema.String }); export type ClientRequest__ClientInfo = { readonly name: string; readonly title?: string | null; readonly version: string;};export const ClientRequest__ClientInfo = Schema.Struct({ name: Schema.String, title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), version: Schema.String,}); export type ClientRequest__CommandExecResizeParams = { readonly processId: string; readonly size: { readonly cols: number; readonly rows: number };};export const ClientRequest__CommandExecResizeParams = Schema.Struct({ processId: Schema.String.annotate({ description: "Client-supplied, connection-scoped `processId` from the original `command/exec` request.", }), size: Schema.Struct({ cols: Schema.Number.annotate({ description: "Terminal width in character cells.", format: "uint16", }) .check(Schema.isInt()) .check(Schema.isGreaterThanOrEqualTo(0)), rows: Schema.Number.annotate({ description: "Terminal height in character cells.", format: "uint16", }) .check(Schema.isInt()) .check(Schema.isGreaterThanOrEqualTo(0)), }).annotate({ description: "PTY size in character cells for `command/exec` PTY sessions." }),}).annotate({ description: "Resize a running PTY-backed `command/exec` session." }); export type ClientRequest__CommandExecTerminalSize = { readonly cols: number; readonly rows: number;};export const ClientRequest__CommandExecTerminalSize = Schema.Struct({ cols: Schema.Number.annotate({ description: "Terminal width in character cells.", format: "uint16", }) .check(Schema.isInt()) .check(Schema.isGreaterThanOrEqualTo(0)), rows: Schema.Number.annotate({ description: "Terminal height in character cells.", format: "uint16", }) .check(Schema.isInt()) .check(Schema.isGreaterThanOrEqualTo(0)),}).annotate({ description: "PTY size in character cells for `command/exec` PTY sessions." }); export type ClientRequest__CommandExecTerminateParams = { readonly processId: string };export const ClientRequest__CommandExecTerminateParams = Schema.Struct({ processId: Schema.String.annotate({ description: "Client-supplied, connection-scoped `processId` from the original `command/exec` request.", }),}).annotate({ description: "Terminate a running `command/exec` session." }); export type ClientRequest__CommandExecWriteParams = { readonly closeStdin?: boolean; readonly deltaBase64?: string | null; readonly processId: string;};export const ClientRequest__CommandExecWriteParams = Schema.Struct({ closeStdin: Schema.optionalKey( Schema.Boolean.annotate({ description: "Close stdin after writing `deltaBase64`, if present.", }), ), deltaBase64: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ description: "Optional base64-encoded stdin bytes to write." }), Schema.Null, ]), ), processId: Schema.String.annotate({ description: "Client-supplied, connection-scoped `processId` from the original `command/exec` request.", }),}).annotate({ description: "Write stdin bytes to a running `command/exec` session, close stdin, or both.",}); export type ClientRequest__ConfigReadParams = { readonly cwd?: string | null; readonly includeLayers?: boolean;};export const ClientRequest__ConfigReadParams = Schema.Struct({ cwd: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ description: "Optional working directory to resolve project config layers. If specified, return the effective config as seen from that directory (i.e., including any project layers between `cwd` and the project/repo root).", }), Schema.Null, ]), ), includeLayers: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),}); export type ClientRequest__DeviceKeyProtectionPolicy = | "hardware_only" | "allow_os_protected_nonextractable";export const ClientRequest__DeviceKeyProtectionPolicy = Schema.Literals([ "hardware_only", "allow_os_protected_nonextractable",]).annotate({ description: "Protection policy for creating or loading a controller-local device key.",}); export type ClientRequest__DeviceKeyPublicParams = { readonly keyId: string };export const ClientRequest__DeviceKeyPublicParams = Schema.Struct({ keyId: Schema.String,}).annotate({ description: "Fetch a controller-local device key public key by id." }); export type ClientRequest__ExperimentalFeatureEnablementSetParams = { readonly enablement: { readonly [x: string]: boolean };};export const ClientRequest__ExperimentalFeatureEnablementSetParams = Schema.Struct({ enablement: Schema.Record(Schema.String, Schema.Boolean).annotate({ description: "Process-wide runtime feature enablement keyed by canonical feature name.\n\nOnly named features are updated. Omitted features are left unchanged. Send an empty map for a no-op.", }),}); export type ClientRequest__ExperimentalFeatureListParams = { readonly cursor?: string | null; readonly limit?: number | null;};export const ClientRequest__ExperimentalFeatureListParams = Schema.Struct({ cursor: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ description: "Opaque pagination cursor returned by a previous call.", }), Schema.Null, ]), ), limit: Schema.optionalKey( Schema.Union([ Schema.Number.annotate({ description: "Optional page size; defaults to a reasonable server-side value.", format: "uint32", }) .check(Schema.isInt()) .check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null, ]), ),}); export type ClientRequest__ExternalAgentConfigDetectParams = { readonly cwds?: ReadonlyArray<string> | null; readonly includeHome?: boolean;};export const ClientRequest__ExternalAgentConfigDetectParams = Schema.Struct({ cwds: Schema.optionalKey( Schema.Union([ Schema.Array(Schema.String).annotate({ description: "Zero or more working directories to include for repo-scoped detection.", }), Schema.Null, ]), ), includeHome: Schema.optionalKey( Schema.Boolean.annotate({ description: "If true, include detection under the user's home (~/.claude, ~/.codex, etc.).", }), ),}); export type ClientRequest__ExternalAgentConfigMigrationItemType = | "AGENTS_MD" | "CONFIG" | "SKILLS" | "PLUGINS" | "MCP_SERVER_CONFIG";export const ClientRequest__ExternalAgentConfigMigrationItemType = Schema.Literals([ "AGENTS_MD", "CONFIG", "SKILLS", "PLUGINS", "MCP_SERVER_CONFIG",]); export type ClientRequest__FeedbackUploadParams = { readonly classification: string; readonly extraLogFiles?: ReadonlyArray<string> | null; readonly includeLogs: boolean; readonly reason?: string | null; readonly tags?: { readonly [x: string]: string } | null; readonly threadId?: string | null;};export const ClientRequest__FeedbackUploadParams = Schema.Struct({ classification: Schema.String, extraLogFiles: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])), includeLogs: Schema.Boolean, reason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), tags: Schema.optionalKey( Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null]), ), threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),}); export type ClientRequest__FsCopyParams = { readonly destinationPath: string; readonly recursive?: boolean; readonly sourcePath: string;};export const ClientRequest__FsCopyParams = Schema.Struct({ destinationPath: Schema.String.annotate({ description: "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", }), recursive: Schema.optionalKey( Schema.Boolean.annotate({ description: "Required for directory copies; ignored for file copies.", }), ), sourcePath: Schema.String.annotate({ description: "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", }),}).annotate({ description: "Copy a file or directory tree on the host filesystem." }); export type ClientRequest__FsCreateDirectoryParams = { readonly path: string; readonly recursive?: boolean | null;};export const ClientRequest__FsCreateDirectoryParams = Schema.Struct({ path: Schema.String.annotate({ description: "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", }), recursive: Schema.optionalKey( Schema.Union([ Schema.Boolean.annotate({ description: "Whether parent directories should also be created. Defaults to `true`.", }), Schema.Null, ]), ),}).annotate({ description: "Create a directory on the host filesystem." }); export type ClientRequest__FsGetMetadataParams = { readonly path: string };export const ClientRequest__FsGetMetadataParams = Schema.Struct({ path: Schema.String.annotate({ description: "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", }),}).annotate({ description: "Request metadata for an absolute path." }); export type ClientRequest__FsReadDirectoryParams = { readonly path: string };export const ClientRequest__FsReadDirectoryParams = Schema.Struct({ path: Schema.String.annotate({ description: "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", }),}).annotate({ description: "List direct child names for a directory." }); export type ClientRequest__FsReadFileParams = { readonly path: string };export const ClientRequest__FsReadFileParams = Schema.Struct({ path: Schema.String.annotate({ description: "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", }),}).annotate({ description: "Read a file from the host filesystem." }); export type ClientRequest__FsRemoveParams = { readonly force?: boolean | null; readonly path: string; readonly recursive?: boolean | null;};export const ClientRequest__FsRemoveParams = Schema.Struct({ force: Schema.optionalKey( Schema.Union([ Schema.Boolean.annotate({ description: "Whether missing paths should be ignored. Defaults to `true`.", }), Schema.Null, ]), ), path: Schema.String.annotate({ description: "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", }), recursive: Schema.optionalKey( Schema.Union([ Schema.Boolean.annotate({ description: "Whether directory removal should recurse. Defaults to `true`.", }), Schema.Null, ]), ),}).annotate({ description: "Remove a file or directory tree from the host filesystem." }); export type ClientRequest__FsUnwatchParams = { readonly watchId: string };export const ClientRequest__FsUnwatchParams = Schema.Struct({ watchId: Schema.String.annotate({ description: "Watch identifier previously provided to `fs/watch`.", }),}).annotate({ description: "Stop filesystem watch notifications for a prior `fs/watch`." }); export type ClientRequest__FsWatchParams = { readonly path: string; readonly watchId: string };export const ClientRequest__FsWatchParams = Schema.Struct({ path: Schema.String.annotate({ description: "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", }), watchId: Schema.String.annotate({ description: "Connection-scoped watch identifier used for `fs/unwatch` and `fs/changed`.", }),}).annotate({ description: "Start filesystem watch notifications for an absolute path." }); export type ClientRequest__FsWriteFileParams = { readonly dataBase64: string; readonly path: string;};export const ClientRequest__FsWriteFileParams = Schema.Struct({ dataBase64: Schema.String.annotate({ description: "File contents encoded as base64." }), path: Schema.String.annotate({ description: "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", }),}).annotate({ description: "Write a file on the host filesystem." }); export type ClientRequest__FuzzyFileSearchParams = { readonly cancellationToken?: string | null; readonly query: string; readonly roots: ReadonlyArray<string>;};export const ClientRequest__FuzzyFileSearchParams = Schema.Struct({ cancellationToken: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), query: Schema.String, roots: Schema.Array(Schema.String),}); export type ClientRequest__GetAccountParams = { readonly refreshToken?: boolean };export const ClientRequest__GetAccountParams = Schema.Struct({ refreshToken: Schema.optionalKey( Schema.Boolean.annotate({ description: "When `true`, requests a proactive token refresh before returning.\n\nIn managed auth mode this triggers the normal refresh-token flow. In external auth mode this flag is ignored. Clients should refresh tokens themselves and call `account/login/start` with `chatgptAuthTokens`.", default: false, }), ),}); export type ClientRequest__GhostCommit = { readonly id: string; readonly parent?: string | null; readonly preexisting_untracked_dirs: ReadonlyArray<string>; readonly preexisting_untracked_files: ReadonlyArray<string>;};export const ClientRequest__GhostCommit = Schema.Struct({ id: Schema.String, parent: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), preexisting_untracked_dirs: Schema.Array(Schema.String), preexisting_untracked_files: Schema.Array(Schema.String),}).annotate({ description: "Details of a ghost commit created from a repository state." }); Lines 1–500 of 35113. Load more
// This file is generated by the effect-codex-app-server package. Do not edit manually. // Upstream protocol ref: be75785504ff152fa6333e380a2d50642f42fba0 import * as Schema from "effect/Schema"; export type ApplyPatchApprovalParams__FileChange = | { readonly content: string; readonly type: "add" } | { readonly content: string; readonly type: "delete" } | { readonly move_path?: string | null; readonly type: "update"; readonly unified_diff: string }; export const ApplyPatchApprovalParams__FileChange = Schema.Union( [ Schema.Struct({ content: Schema.String, type: Schema.Literal("add").annotate({ title: "AddFileChangeType" }), }).annotate({ title: "AddFileChange" }), Schema.Struct({ content: Schema.String, type: Schema.Literal("delete").annotate({ title: "DeleteFileChangeType" }), }).annotate({ title: "DeleteFileChange" }), Schema.Struct({ move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), type: Schema.Literal("update").annotate({ title: "UpdateFileChangeType" }), unified_diff: Schema.String, }).annotate({ title: "UpdateFileChange" }), ], { mode: "oneOf" }, ); export type ApplyPatchApprovalParams__ThreadId = string; export const ApplyPatchApprovalParams__ThreadId = Schema.String; export type ApplyPatchApprovalResponse__NetworkPolicyRuleAction = "allow" | "deny"; export const ApplyPatchApprovalResponse__NetworkPolicyRuleAction = Schema.Literals([ "allow", "deny", ]); export type ChatgptAuthTokensRefreshParams__ChatgptAuthTokensRefreshReason = "unauthorized"; export const ChatgptAuthTokensRefreshParams__ChatgptAuthTokensRefreshReason = Schema.Literal("unauthorized"); export type ClientRequest__AbsolutePathBuf = string; export const ClientRequest__AbsolutePathBuf = Schema.String.annotate({ description: "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", }); export type ClientRequest__AddCreditsNudgeCreditType = "credits" | "usage_limit"; export const ClientRequest__AddCreditsNudgeCreditType = Schema.Literals(["credits", "usage_limit"]); export type ClientRequest__ApprovalsReviewer = "user" | "guardian_subagent"; export const ClientRequest__ApprovalsReviewer = Schema.Literals([ "user", "guardian_subagent", ]).annotate({ description: "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", }); export type ClientRequest__AppsListParams = { readonly cursor?: string | null; readonly forceRefetch?: boolean; readonly limit?: number | null; readonly threadId?: string | null; }; export const ClientRequest__AppsListParams = Schema.Struct({ cursor: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ description: "Opaque pagination cursor returned by a previous call.", }), Schema.Null, ]), ), forceRefetch: Schema.optionalKey( Schema.Boolean.annotate({ description: "When true, bypass app caches and fetch the latest data from sources.", }), ), limit: Schema.optionalKey( Schema.Union([ Schema.Number.annotate({ description: "Optional page size; defaults to a reasonable server-side value.", format: "uint32", }) .check(Schema.isInt()) .check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null, ]), ), threadId: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ description: "Optional thread id used to evaluate app feature gating from that thread's config.", }), Schema.Null, ]), ), }).annotate({ description: "EXPERIMENTAL - list available apps/connectors." }); export type ClientRequest__AskForApproval = | "untrusted" | "on-failure" | "on-request" | "never" | { readonly granular: { readonly mcp_elicitations: boolean; readonly request_permissions?: boolean; readonly rules: boolean; readonly sandbox_approval: boolean; readonly skill_approval?: boolean; }; }; export const ClientRequest__AskForApproval = Schema.Union( [ Schema.Literals(["untrusted", "on-failure", "on-request", "never"]), Schema.Struct({ granular: Schema.Struct({ mcp_elicitations: Schema.Boolean, request_permissions: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), rules: Schema.Boolean, sandbox_approval: Schema.Boolean, skill_approval: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), }), }).annotate({ title: "GranularAskForApproval" }), ], { mode: "oneOf" }, ); export type ClientRequest__CancelLoginAccountParams = { readonly loginId: string }; export const ClientRequest__CancelLoginAccountParams = Schema.Struct({ loginId: Schema.String }); export type ClientRequest__ClientInfo = { readonly name: string; readonly title?: string | null; readonly version: string; }; export const ClientRequest__ClientInfo = Schema.Struct({ name: Schema.String, title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), version: Schema.String, }); export type ClientRequest__CommandExecResizeParams = { readonly processId: string; readonly size: { readonly cols: number; readonly rows: number }; }; export const ClientRequest__CommandExecResizeParams = Schema.Struct({ processId: Schema.String.annotate({ description: "Client-supplied, connection-scoped `processId` from the original `command/exec` request.", }), size: Schema.Struct({ cols: Schema.Number.annotate({ description: "Terminal width in character cells.", format: "uint16", }) .check(Schema.isInt()) .check(Schema.isGreaterThanOrEqualTo(0)), rows: Schema.Number.annotate({ description: "Terminal height in character cells.", format: "uint16", }) .check(Schema.isInt()) .check(Schema.isGreaterThanOrEqualTo(0)), }).annotate({ description: "PTY size in character cells for `command/exec` PTY sessions." }), }).annotate({ description: "Resize a running PTY-backed `command/exec` session." }); export type ClientRequest__CommandExecTerminalSize = { readonly cols: number; readonly rows: number; }; export const ClientRequest__CommandExecTerminalSize = Schema.Struct({ cols: Schema.Number.annotate({ description: "Terminal width in character cells.", format: "uint16", }) .check(Schema.isInt()) .check(Schema.isGreaterThanOrEqualTo(0)), rows: Schema.Number.annotate({ description: "Terminal height in character cells.", format: "uint16", }) .check(Schema.isInt()) .check(Schema.isGreaterThanOrEqualTo(0)), }).annotate({ description: "PTY size in character cells for `command/exec` PTY sessions." }); export type ClientRequest__CommandExecTerminateParams = { readonly processId: string }; export const ClientRequest__CommandExecTerminateParams = Schema.Struct({ processId: Schema.String.annotate({ description: "Client-supplied, connection-scoped `processId` from the original `command/exec` request.", }), }).annotate({ description: "Terminate a running `command/exec` session." }); export type ClientRequest__CommandExecWriteParams = { readonly closeStdin?: boolean; readonly deltaBase64?: string | null; readonly processId: string; }; export const ClientRequest__CommandExecWriteParams = Schema.Struct({ closeStdin: Schema.optionalKey( Schema.Boolean.annotate({ description: "Close stdin after writing `deltaBase64`, if present.", }), ), deltaBase64: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ description: "Optional base64-encoded stdin bytes to write." }), Schema.Null, ]), ), processId: Schema.String.annotate({ description: "Client-supplied, connection-scoped `processId` from the original `command/exec` request.", }), }).annotate({ description: "Write stdin bytes to a running `command/exec` session, close stdin, or both.", }); export type ClientRequest__ConfigReadParams = { readonly cwd?: string | null; readonly includeLayers?: boolean; }; export const ClientRequest__ConfigReadParams = Schema.Struct({ cwd: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ description: "Optional working directory to resolve project config layers. If specified, return the effective config as seen from that directory (i.e., including any project layers between `cwd` and the project/repo root).", }), Schema.Null, ]), ), includeLayers: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), }); export type ClientRequest__DeviceKeyProtectionPolicy = | "hardware_only" | "allow_os_protected_nonextractable"; export const ClientRequest__DeviceKeyProtectionPolicy = Schema.Literals([ "hardware_only", "allow_os_protected_nonextractable", ]).annotate({ description: "Protection policy for creating or loading a controller-local device key.", }); export type ClientRequest__DeviceKeyPublicParams = { readonly keyId: string }; export const ClientRequest__DeviceKeyPublicParams = Schema.Struct({ keyId: Schema.String, }).annotate({ description: "Fetch a controller-local device key public key by id." }); export type ClientRequest__ExperimentalFeatureEnablementSetParams = { readonly enablement: { readonly [x: string]: boolean }; }; export const ClientRequest__ExperimentalFeatureEnablementSetParams = Schema.Struct({ enablement: Schema.Record(Schema.String, Schema.Boolean).annotate({ description: "Process-wide runtime feature enablement keyed by canonical feature name.\n\nOnly named features are updated. Omitted features are left unchanged. Send an empty map for a no-op.", }), }); export type ClientRequest__ExperimentalFeatureListParams = { readonly cursor?: string | null; readonly limit?: number | null; }; export const ClientRequest__ExperimentalFeatureListParams = Schema.Struct({ cursor: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ description: "Opaque pagination cursor returned by a previous call.", }), Schema.Null, ]), ), limit: Schema.optionalKey( Schema.Union([ Schema.Number.annotate({ description: "Optional page size; defaults to a reasonable server-side value.", format: "uint32", }) .check(Schema.isInt()) .check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null, ]), ), }); export type ClientRequest__ExternalAgentConfigDetectParams = { readonly cwds?: ReadonlyArray<string> | null; readonly includeHome?: boolean; }; export const ClientRequest__ExternalAgentConfigDetectParams = Schema.Struct({ cwds: Schema.optionalKey( Schema.Union([ Schema.Array(Schema.String).annotate({ description: "Zero or more working directories to include for repo-scoped detection.", }), Schema.Null, ]), ), includeHome: Schema.optionalKey( Schema.Boolean.annotate({ description: "If true, include detection under the user's home (~/.claude, ~/.codex, etc.).", }), ), }); export type ClientRequest__ExternalAgentConfigMigrationItemType = | "AGENTS_MD" | "CONFIG" | "SKILLS" | "PLUGINS" | "MCP_SERVER_CONFIG"; export const ClientRequest__ExternalAgentConfigMigrationItemType = Schema.Literals([ "AGENTS_MD", "CONFIG", "SKILLS", "PLUGINS", "MCP_SERVER_CONFIG", ]); export type ClientRequest__FeedbackUploadParams = { readonly classification: string; readonly extraLogFiles?: ReadonlyArray<string> | null; readonly includeLogs: boolean; readonly reason?: string | null; readonly tags?: { readonly [x: string]: string } | null; readonly threadId?: string | null; }; export const ClientRequest__FeedbackUploadParams = Schema.Struct({ classification: Schema.String, extraLogFiles: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])), includeLogs: Schema.Boolean, reason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), tags: Schema.optionalKey( Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null]), ), threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); export type ClientRequest__FsCopyParams = { readonly destinationPath: string; readonly recursive?: boolean; readonly sourcePath: string; }; export const ClientRequest__FsCopyParams = Schema.Struct({ destinationPath: Schema.String.annotate({ description: "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", }), recursive: Schema.optionalKey( Schema.Boolean.annotate({ description: "Required for directory copies; ignored for file copies.", }), ), sourcePath: Schema.String.annotate({ description: "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", }), }).annotate({ description: "Copy a file or directory tree on the host filesystem." }); export type ClientRequest__FsCreateDirectoryParams = { readonly path: string; readonly recursive?: boolean | null; }; export const ClientRequest__FsCreateDirectoryParams = Schema.Struct({ path: Schema.String.annotate({ description: "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", }), recursive: Schema.optionalKey( Schema.Union([ Schema.Boolean.annotate({ description: "Whether parent directories should also be created. Defaults to `true`.", }), Schema.Null, ]), ), }).annotate({ description: "Create a directory on the host filesystem." }); export type ClientRequest__FsGetMetadataParams = { readonly path: string }; export const ClientRequest__FsGetMetadataParams = Schema.Struct({ path: Schema.String.annotate({ description: "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", }), }).annotate({ description: "Request metadata for an absolute path." }); export type ClientRequest__FsReadDirectoryParams = { readonly path: string }; export const ClientRequest__FsReadDirectoryParams = Schema.Struct({ path: Schema.String.annotate({ description: "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", }), }).annotate({ description: "List direct child names for a directory." }); export type ClientRequest__FsReadFileParams = { readonly path: string }; export const ClientRequest__FsReadFileParams = Schema.Struct({ path: Schema.String.annotate({ description: "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", }), }).annotate({ description: "Read a file from the host filesystem." }); export type ClientRequest__FsRemoveParams = { readonly force?: boolean | null; readonly path: string; readonly recursive?: boolean | null; }; export const ClientRequest__FsRemoveParams = Schema.Struct({ force: Schema.optionalKey( Schema.Union([ Schema.Boolean.annotate({ description: "Whether missing paths should be ignored. Defaults to `true`.", }), Schema.Null, ]), ), path: Schema.String.annotate({ description: "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", }), recursive: Schema.optionalKey( Schema.Union([ Schema.Boolean.annotate({ description: "Whether directory removal should recurse. Defaults to `true`.", }), Schema.Null, ]), ), }).annotate({ description: "Remove a file or directory tree from the host filesystem." }); export type ClientRequest__FsUnwatchParams = { readonly watchId: string }; export const ClientRequest__FsUnwatchParams = Schema.Struct({ watchId: Schema.String.annotate({ description: "Watch identifier previously provided to `fs/watch`.", }), }).annotate({ description: "Stop filesystem watch notifications for a prior `fs/watch`." }); export type ClientRequest__FsWatchParams = { readonly path: string; readonly watchId: string }; export const ClientRequest__FsWatchParams = Schema.Struct({ path: Schema.String.annotate({ description: "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", }), watchId: Schema.String.annotate({ description: "Connection-scoped watch identifier used for `fs/unwatch` and `fs/changed`.", }), }).annotate({ description: "Start filesystem watch notifications for an absolute path." }); export type ClientRequest__FsWriteFileParams = { readonly dataBase64: string; readonly path: string; }; export const ClientRequest__FsWriteFileParams = Schema.Struct({ dataBase64: Schema.String.annotate({ description: "File contents encoded as base64." }), path: Schema.String.annotate({ description: "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", }), }).annotate({ description: "Write a file on the host filesystem." }); export type ClientRequest__FuzzyFileSearchParams = { readonly cancellationToken?: string | null; readonly query: string; readonly roots: ReadonlyArray<string>; }; export const ClientRequest__FuzzyFileSearchParams = Schema.Struct({ cancellationToken: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), query: Schema.String, roots: Schema.Array(Schema.String), }); export type ClientRequest__GetAccountParams = { readonly refreshToken?: boolean }; export const ClientRequest__GetAccountParams = Schema.Struct({ refreshToken: Schema.optionalKey( Schema.Boolean.annotate({ description: "When `true`, requests a proactive token refresh before returning.\n\nIn managed auth mode this triggers the normal refresh-token flow. In external auth mode this flag is ignored. Clients should refresh tokens themselves and call `account/login/start` with `chatgptAuthTokens`.", default: false, }), ), }); export type ClientRequest__GhostCommit = { readonly id: string; readonly parent?: string | null; readonly preexisting_untracked_dirs: ReadonlyArray<string>; readonly preexisting_untracked_files: ReadonlyArray<string>; }; export const ClientRequest__GhostCommit = Schema.Struct({ id: Schema.String, parent: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), preexisting_untracked_dirs: Schema.Array(Schema.String), preexisting_untracked_files: Schema.Array(Schema.String), }).annotate({ description: "Details of a ghost commit created from a repository state." });