36615 lines · 1.4 MB · TypeScript
RawDownload
// This file is generated by the effect-codex-app-server package. Do not edit manually.// Upstream protocol ref: 07b695190f30a450e4921f71f77473e564395c59 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" | "auto_review" | "guardian_subagent";export const ClientRequest__ApprovalsReviewer = Schema.Literals([  "user",  "auto_review",  "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`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.",}); 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__CommandMigration = { readonly name: string };export const ClientRequest__CommandMigration = Schema.Struct({ name: Schema.String }); 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__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"  | "SUBAGENTS"  | "HOOKS"  | "COMMANDS"  | "SESSIONS";export const ClientRequest__ExternalAgentConfigMigrationItemType = Schema.Literals([  "AGENTS_MD",  "CONFIG",  "SKILLS",  "PLUGINS",  "MCP_SERVER_CONFIG",  "SUBAGENTS",  "HOOKS",  "COMMANDS",  "SESSIONS",]); 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__FileSystemAccessMode = "read" | "write" | "none";export const ClientRequest__FileSystemAccessMode = Schema.Literals(["read", "write", "none"]); export type ClientRequest__FileSystemSpecialPath =  | { readonly kind: "root" }  | { readonly kind: "minimal" }  | { readonly kind: "project_roots"; readonly subpath?: string | null }  | { readonly kind: "tmpdir" }  | { readonly kind: "slash_tmp" }  | { readonly kind: "unknown"; readonly path: string; readonly subpath?: string | null };export const ClientRequest__FileSystemSpecialPath = Schema.Union(  [    Schema.Struct({ kind: Schema.Literal("root") }).annotate({      title: "RootFileSystemSpecialPath",    }),    Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({      title: "MinimalFileSystemSpecialPath",    }),    Schema.Struct({      kind: Schema.Literal("project_roots"),      subpath: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),    }).annotate({ title: "KindFileSystemSpecialPath" }),    Schema.Struct({ kind: Schema.Literal("tmpdir") }).annotate({      title: "TmpdirFileSystemSpecialPath",    }),    Schema.Struct({ kind: Schema.Literal("slash_tmp") }).annotate({      title: "SlashTmpFileSystemSpecialPath",    }),    Schema.Struct({      kind: Schema.Literal("unknown"),      path: Schema.String,      subpath: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),    }),  ],  { mode: "oneOf" },); 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 = {

Lines 1–500 of 36615.