// Generated by @opencode/httpapi-codegen. Do not edit. import type { Effect, Stream } from "effect" import type { Location } from "@opencode/schema/location" import type { Agent } from "@opencode/schema/agent" import type { Plugin } from "@opencode/schema/plugin" import type { Session } from "@opencode/schema/session" import type { AbsolutePath } from "@opencode/schema/schema" import type { Project } from "@opencode/schema/project" import type { RelativePath } from "@opencode/schema/schema" import type { Model } from "@opencode/schema/model" import type { Permission } from "@opencode/schema/permission" import type { SessionMessage } from "@opencode/schema/session-message" import type { SessionInbox } from "@opencode/schema/session-inbox" import type { PromptInput } from "@opencode/schema/prompt-input" import type { AgentAttachment } from "@opencode/schema/prompt" import type { FileDiff } from "@opencode/schema/file-diff" import type { Form } from "@opencode/schema/form" import type { DateTime } from "effect" import type { Money } from "@opencode/schema/money" import type { Skill } from "@opencode/schema/skill" import type { InstructionEntry } from "@opencode/schema/instruction-entry" import type { Schema } from "effect" import type { Event } from "@opencode/schema/event" import type { EventLog } from "@opencode/schema/event-log" import type { Workspace } from "@opencode/schema/workspace" import type { Instruction } from "@opencode/schema/instruction" import type { Snapshot } from "@opencode/schema/snapshot" import type { Shell } from "@opencode/schema/shell" import type { Generate } from "@opencode/schema/generate" import type { Provider } from "@opencode/schema/provider" import type { Integration } from "@opencode/schema/integration" import type { Mcp } from "@opencode/schema/mcp" import type { PtyTicket } from "@opencode/schema/pty-ticket" import type { Credential } from "@opencode/schema/credential" import type { PermissionSaved } from "@opencode/schema/permission-saved" import type { FileSystem } from "@opencode/schema/filesystem" import type { Command } from "@opencode/schema/command" import type { OpenCodeEvent } from "@opencode/protocol/groups/event" import type { Pty } from "@opencode/schema/pty" import type { Schedule } from "@opencode/schema/schedule" import type { Artifact } from "@opencode/schema/artifact" import type { Reference } from "@opencode/schema/reference" import type { Worktree } from "@opencode/schema/worktree" import type { Vcs } from "@opencode/schema/vcs" import type { WebSearch } from "@opencode/schema/websearch" import type { UsageLimits } from "@opencode/schema/usage-limits" import type { Config } from "@opencode/schema/config" export type ServerInfoOutput = { readonly version: string readonly pid: number readonly hostname?: string | undefined readonly urls: ReadonlyArray readonly paths: { readonly tmp: string } readonly capabilities?: { readonly persistentPty?: boolean | undefined } | undefined } export type ServerInfoOperation = () => Effect.Effect export type ServerPairOutput = { readonly code: string; readonly expires_in: number } export type ServerPairOperation = () => Effect.Effect export type ServerConnectInput = { readonly code: string } export type ServerConnectOutput = { readonly token: string } export type ServerConnectOperation = (input: ServerConnectInput) => Effect.Effect export interface ServerApi { readonly info: ServerInfoOperation readonly pair: ServerPairOperation readonly connect: ServerConnectOperation } export type LocationGetInput = { readonly location?: { readonly directory?: string | undefined } | undefined } export type LocationGetOutput = Location.PublicInfo export type LocationGetOperation = (input?: LocationGetInput) => Effect.Effect export type LocationReloadOutput = void export type LocationReloadOperation = () => Effect.Effect export interface LocationApi { readonly get: LocationGetOperation readonly reload: LocationReloadOperation } export type AgentListInput = { readonly location?: { readonly directory?: string | undefined } | undefined } export type AgentListOutput = { readonly location: Location.PublicRef; readonly data: ReadonlyArray } export type AgentListOperation = (input?: AgentListInput) => Effect.Effect export type AgentGetInput = { readonly agentID: Agent.ID readonly location?: { readonly directory?: string | undefined } | undefined } export type AgentGetOutput = { readonly location: Location.PublicRef; readonly data: Agent.Info } export type AgentGetOperation = (input: AgentGetInput) => Effect.Effect export interface AgentApi { readonly list: AgentListOperation readonly get: AgentGetOperation } export type PluginListInput = { readonly location?: { readonly directory?: string | undefined } | undefined } export type PluginListOutput = { readonly location: Location.PublicRef; readonly data: ReadonlyArray } export type PluginListOperation = (input?: PluginListInput) => Effect.Effect export type PluginGuiInput = { readonly location?: { readonly directory?: string | undefined } | undefined readonly id: Plugin.ID } export type PluginGuiOutput = { readonly location: Location.PublicRef; readonly data: Plugin.GuiBundle } export type PluginGuiOperation = (input: PluginGuiInput) => Effect.Effect export type PluginCheckInput = { readonly location?: { readonly directory?: string | undefined } | undefined readonly target?: string | undefined } export type PluginCheckOutput = { readonly location: Location.PublicRef; readonly data: ReadonlyArray } export type PluginCheckOperation = (input?: PluginCheckInput) => Effect.Effect export type PluginUpdateInput = { readonly location?: { readonly directory?: string | undefined } | undefined readonly targets: ReadonlyArray } export type PluginUpdateOutput = void export type PluginUpdateOperation = (input: PluginUpdateInput) => Effect.Effect export interface PluginApi { readonly list: PluginListOperation readonly gui: PluginGuiOperation readonly check: PluginCheckOperation readonly update: PluginUpdateOperation } export type SessionListInput = { readonly limit?: number | undefined readonly order?: "asc" | "desc" | undefined readonly search?: string | undefined readonly parentID?: Session.ID | null | undefined readonly archived?: boolean | undefined readonly directory?: AbsolutePath | undefined readonly project?: Project.ID | undefined readonly subpath?: RelativePath | undefined readonly cursor?: Session.ListCursor | undefined } export type SessionListOutput = { readonly data: ReadonlyArray readonly cursor: { readonly previous?: Session.ListCursor | undefined readonly next?: Session.ListCursor | undefined } } export type SessionListOperation = (input?: SessionListInput) => Effect.Effect export type SessionCreateInput = { readonly id?: Session.ID | undefined readonly parentID?: Session.ID | undefined readonly title?: string | undefined readonly agent?: Agent.ID | undefined readonly model?: Model.Ref | undefined readonly location?: Location.PublicRef | undefined readonly metadata?: Session.Metadata | undefined readonly permissions?: Permission.Ruleset | undefined } export type SessionCreateOutput = Session.Info export type SessionCreateOperation = (input?: SessionCreateInput) => Effect.Effect export type SessionActiveOutput = { readonly [x: Session.ID]: { readonly type: "running" } } export type SessionActiveOperation = () => Effect.Effect export type SessionGetInput = { readonly sessionID: Session.ID } export type SessionGetOutput = Session.Info export type SessionGetOperation = (input: SessionGetInput) => Effect.Effect export type SessionRemoveInput = { readonly sessionID: Session.ID } export type SessionRemoveOutput = void export type SessionRemoveOperation = (input: SessionRemoveInput) => Effect.Effect export type SessionForkInput = { readonly sessionID: Session.ID; readonly before?: SessionMessage.ID | undefined } export type SessionForkOutput = Session.Info export type SessionForkOperation = (input: SessionForkInput) => Effect.Effect export type SessionSwitchAgentInput = { readonly sessionID: Session.ID; readonly agent: Agent.ID } export type SessionSwitchAgentOutput = void export type SessionSwitchAgentOperation = ( input: SessionSwitchAgentInput, ) => Effect.Effect export type SessionSwitchModelInput = { readonly sessionID: Session.ID; readonly model: Model.Ref } export type SessionSwitchModelOutput = void export type SessionSwitchModelOperation = ( input: SessionSwitchModelInput, ) => Effect.Effect export type SessionUpdateInput = { readonly sessionID: Session.ID readonly title?: string | undefined readonly metadata?: Session.Metadata | undefined readonly permissions?: Permission.Ruleset | undefined readonly archived?: boolean | undefined } export type SessionUpdateOutput = void export type SessionUpdateOperation = (input: SessionUpdateInput) => Effect.Effect export type SessionMoveInput = { readonly sessionID: Session.ID readonly directory: AbsolutePath readonly delivery?: SessionInbox.Delivery | undefined } export type SessionMoveOutput = void export type SessionMoveOperation = (input: SessionMoveInput) => Effect.Effect export type SessionPromptInput = { readonly sessionID: Session.ID readonly id?: SessionMessage.ID | undefined readonly text: string readonly files?: ReadonlyArray | undefined readonly agents?: ReadonlyArray | undefined readonly skills?: ReadonlyArray | undefined readonly metadata?: { readonly [x: string]: unknown } | undefined readonly delivery?: SessionInbox.Delivery | undefined readonly resume?: boolean | undefined } export type SessionPromptOutput = SessionInbox.User export type SessionPromptOperation = (input: SessionPromptInput) => Effect.Effect export type SessionCommandInput = { readonly sessionID: Session.ID readonly name: string readonly text: string readonly files?: ReadonlyArray | undefined readonly agents?: ReadonlyArray | undefined readonly skills?: ReadonlyArray | undefined readonly delivery?: SessionInbox.Delivery | undefined } export type SessionCommandOutput = void export type SessionCommandOperation = (input: SessionCommandInput) => Effect.Effect export type SessionSyntheticInput = { readonly sessionID: Session.ID readonly id?: SessionMessage.ID | undefined readonly text: string readonly description?: string | undefined readonly metadata?: { readonly [x: string]: unknown } | undefined readonly delivery?: SessionInbox.Delivery | undefined readonly resume?: boolean | undefined } export type SessionSyntheticOutput = SessionInbox.Synthetic export type SessionSyntheticOperation = ( input: SessionSyntheticInput, ) => Effect.Effect export type SessionShellInput = { readonly sessionID: Session.ID readonly id?: SessionMessage.ID | undefined readonly command: string } export type SessionShellOutput = void export type SessionShellOperation = (input: SessionShellInput) => Effect.Effect export type SessionCompactInput = { readonly sessionID: Session.ID readonly id?: SessionMessage.ID | undefined readonly delivery?: SessionInbox.Delivery | undefined } export type SessionCompactOutput = SessionInbox.Compaction export type SessionCompactOperation = (input: SessionCompactInput) => Effect.Effect export type SessionRevertStageInput = { readonly sessionID: Session.ID readonly messageID: SessionMessage.ID readonly files?: boolean | undefined } export type SessionRevertStageOutput = Session.Revert export type SessionRevertStageOperation = ( input: SessionRevertStageInput, ) => Effect.Effect export type SessionRevertClearInput = { readonly sessionID: Session.ID } export type SessionRevertClearOutput = void export type SessionRevertClearOperation = ( input: SessionRevertClearInput, ) => Effect.Effect export type SessionRevertCommitInput = { readonly sessionID: Session.ID } export type SessionRevertCommitOutput = void export type SessionRevertCommitOperation = ( input: SessionRevertCommitInput, ) => Effect.Effect export type SessionContextInput = { readonly sessionID: Session.ID } export type SessionContextOutput = ReadonlyArray export type SessionContextOperation = (input: SessionContextInput) => Effect.Effect export type SessionDiffInput = { readonly sessionID: Session.ID readonly from?: SessionMessage.ID | undefined readonly to?: SessionMessage.ID | undefined readonly context?: number | undefined } export type SessionDiffOutput = ReadonlyArray export type SessionDiffOperation = (input: SessionDiffInput) => Effect.Effect export type SessionInboxListInput = { readonly sessionID: Session.ID } export type SessionInboxListOutput = ReadonlyArray export type SessionInboxListOperation = ( input: SessionInboxListInput, ) => Effect.Effect export type SessionInboxCancelInput = { readonly sessionID: Session.ID; readonly inboxID: SessionMessage.ID } export type SessionInboxCancelOutput = void export type SessionInboxCancelOperation = ( input: SessionInboxCancelInput, ) => Effect.Effect export type SessionInboxUpdateInput = { readonly sessionID: Session.ID readonly inboxID: SessionMessage.ID readonly delivery: SessionInbox.Delivery } export type SessionInboxUpdateOutput = void export type SessionInboxUpdateOperation = ( input: SessionInboxUpdateInput, ) => Effect.Effect export type SessionGenerateInput = { readonly sessionID: Session.ID; readonly prompt: string } export type SessionGenerateOutput = { readonly text: string } export type SessionGenerateOperation = ( input: SessionGenerateInput, ) => Effect.Effect export type SessionInterruptInput = { readonly sessionID: Session.ID; readonly resume?: boolean | undefined } export type SessionInterruptOutput = { readonly interrupted: boolean } export type SessionInterruptOperation = ( input: SessionInterruptInput, ) => Effect.Effect export type SessionBackgroundInput = { readonly sessionID: Session.ID } export type SessionBackgroundOutput = void export type SessionBackgroundOperation = ( input: SessionBackgroundInput, ) => Effect.Effect export type SessionMessageGetInput = { readonly sessionID: Session.ID; readonly messageID: SessionMessage.ID } export type SessionMessageGetOutput = SessionMessage.Info export type SessionMessageGetOperation = ( input: SessionMessageGetInput, ) => Effect.Effect export type SessionFormListInput = { readonly sessionID: string } export type SessionFormListOutput = ReadonlyArray export type SessionFormListOperation = ( input: SessionFormListInput, ) => Effect.Effect export type SessionFormCreateInput = { readonly sessionID: string readonly id?: Form.ID | undefined readonly title: string readonly metadata?: Form.Metadata | undefined readonly fields: Form.Fields } export type SessionFormCreateOutput = Form.Info export type SessionFormCreateOperation = ( input: SessionFormCreateInput, ) => Effect.Effect export type SessionFormGetInput = { readonly sessionID: string; readonly formID: Form.ID } export type SessionFormGetOutput = Form.Detail export type SessionFormGetOperation = (input: SessionFormGetInput) => Effect.Effect export type SessionFormReplyInput = { readonly sessionID: string readonly formID: Form.ID readonly answer: Form.Answer } export type SessionFormReplyOutput = void export type SessionFormReplyOperation = ( input: SessionFormReplyInput, ) => Effect.Effect export type SessionFormCancelInput = { readonly sessionID: string readonly formID: Form.ID readonly message?: string | undefined } export type SessionFormCancelOutput = void export type SessionFormCancelOperation = ( input: SessionFormCancelInput, ) => Effect.Effect export type SessionEnvironmentInput = { readonly sessionID: Session.ID readonly variables: { readonly [x: string]: string } } export type SessionEnvironmentOutput = void export type SessionEnvironmentOperation = ( input: SessionEnvironmentInput, ) => Effect.Effect export type SessionViewInput = { readonly sessionID: Session.ID; readonly idle: DateTime.Utc } export type SessionViewOutput = void export type SessionViewOperation = (input: SessionViewInput) => Effect.Effect export interface SessionApi { readonly list: SessionListOperation readonly create: SessionCreateOperation readonly active: SessionActiveOperation readonly get: SessionGetOperation readonly remove: SessionRemoveOperation readonly fork: SessionForkOperation readonly switchAgent: SessionSwitchAgentOperation readonly switchModel: SessionSwitchModelOperation readonly update: SessionUpdateOperation readonly move: SessionMoveOperation readonly prompt: SessionPromptOperation readonly command: SessionCommandOperation readonly synthetic: SessionSyntheticOperation readonly shell: SessionShellOperation readonly compact: SessionCompactOperation readonly revert: { readonly stage: SessionRevertStageOperation readonly clear: SessionRevertClearOperation readonly commit: SessionRevertCommitOperation } readonly context: SessionContextOperation readonly diff: SessionDiffOperation readonly inbox: { readonly list: SessionInboxListOperation readonly cancel: SessionInboxCancelOperation readonly update: SessionInboxUpdateOperation } readonly generate: SessionGenerateOperation readonly interrupt: SessionInterruptOperation readonly background: SessionBackgroundOperation readonly message: { readonly get: SessionMessageGetOperation } readonly form: { readonly list: SessionFormListOperation readonly create: SessionFormCreateOperation readonly get: SessionFormGetOperation readonly reply: SessionFormReplyOperation readonly cancel: SessionFormCancelOperation } readonly environment: SessionEnvironmentOperation readonly view: SessionViewOperation /** @deprecated Use `client.experimental.session.stats`. Removed in the next minor. */ readonly stats: ExperimentalSessionStatsOperation /** @deprecated Use `client.experimental.session.import`. Removed in the next minor. */ readonly import: ExperimentalSessionImportOperation /** @deprecated Use `client.experimental.session.export`. Removed in the next minor. */ readonly export: ExperimentalSessionExportOperation /** @deprecated Use `client.experimental.session.skill`. Removed in the next minor. */ readonly skill: ExperimentalSessionSkillOperation /** @deprecated Use `client.experimental.session.wait`. Removed in the next minor. */ readonly wait: ExperimentalSessionWaitOperation /** @deprecated Use `client.experimental.session.instructions`. Removed in the next minor. */ readonly instructions: { /** @deprecated Use `client.experimental.session.instructions.entry`. Removed in the next minor. */ readonly entry: { /** @deprecated Use `client.experimental.session.instructions.entry.list`. Removed in the next minor. */ readonly list: ExperimentalSessionInstructionsEntryListOperation /** @deprecated Use `client.experimental.session.instructions.entry.put`. Removed in the next minor. */ readonly put: ExperimentalSessionInstructionsEntryPutOperation /** @deprecated Use `client.experimental.session.instructions.entry.remove`. Removed in the next minor. */ readonly remove: ExperimentalSessionInstructionsEntryRemoveOperation } } /** @deprecated Use `client.experimental.session.log`. Removed in the next minor. */ readonly log: ExperimentalSessionLogOperation } export type ExperimentalSessionStatsInput = { readonly from?: number | undefined readonly to?: number | undefined readonly project?: Project.ID | undefined readonly timezone?: string | undefined readonly tools?: "none" | "summary" | "detail" | undefined } export type ExperimentalSessionStatsOutput = { readonly range: { readonly from: DateTime.Utc; readonly to: DateTime.Utc } readonly sessions: number readonly subagents: number readonly prompts: number readonly steps: number readonly tokens: { readonly input: number readonly output: number readonly reasoning: number readonly cache: { readonly read: number; readonly write: number } } readonly cost: Money.USD readonly tools: | { readonly mode: "none" } | { readonly mode: "summary" readonly totals: { readonly calls: number readonly succeeded: number readonly failed: number readonly unfinished: number } } | { readonly mode: "detail" readonly totals: { readonly calls: number readonly succeeded: number readonly failed: number readonly unfinished: number } readonly usage: ReadonlyArray<{ readonly name: string readonly calls: number readonly succeeded: number readonly failed: number readonly unfinished: number readonly durationP50?: number | undefined }> } readonly activeDays: number readonly streak: number readonly activity: ReadonlyArray<{ readonly date: string; readonly steps: number }> readonly models: ReadonlyArray<{ readonly model: Model.Ref readonly steps: number readonly tokens: { readonly input: number readonly output: number readonly reasoning: number readonly cache: { readonly read: number; readonly write: number } } readonly cost: Money.USD }> } export type ExperimentalSessionStatsOperation = ( input?: ExperimentalSessionStatsInput, ) => Effect.Effect export type ExperimentalSessionImportInput = { readonly info: Session.Info readonly messages: ReadonlyArray readonly location?: Location.PublicRef | undefined } export type ExperimentalSessionImportOutput = Session.Info export type ExperimentalSessionImportOperation = ( input: ExperimentalSessionImportInput, ) => Effect.Effect export type ExperimentalSessionExportInput = { readonly sessionID: Session.ID; readonly sanitize?: boolean | undefined } export type ExperimentalSessionExportOutput = { readonly info: Session.Info readonly messages: ReadonlyArray } export type ExperimentalSessionExportOperation = ( input: ExperimentalSessionExportInput, ) => Effect.Effect export type ExperimentalSessionSkillInput = { readonly sessionID: Session.ID readonly id: Skill.ID readonly resume?: boolean | undefined } export type ExperimentalSessionSkillOutput = void export type ExperimentalSessionSkillOperation = ( input: ExperimentalSessionSkillInput, ) => Effect.Effect export type ExperimentalSessionWaitInput = { readonly sessionID: Session.ID } export type ExperimentalSessionWaitOutput = void export type ExperimentalSessionWaitOperation = ( input: ExperimentalSessionWaitInput, ) => Effect.Effect export type ExperimentalSessionInstructionsEntryListInput = { readonly sessionID: Session.ID } export type ExperimentalSessionInstructionsEntryListOutput = ReadonlyArray export type ExperimentalSessionInstructionsEntryListOperation = ( input: ExperimentalSessionInstructionsEntryListInput, ) => Effect.Effect export type ExperimentalSessionInstructionsEntryPutInput = { readonly sessionID: Session.ID readonly key: InstructionEntry.Key readonly value: Schema.Json } export type ExperimentalSessionInstructionsEntryPutOutput = void export type ExperimentalSessionInstructionsEntryPutOperation = ( input: ExperimentalSessionInstructionsEntryPutInput, ) => Effect.Effect export type ExperimentalSessionInstructionsEntryRemoveInput = { readonly sessionID: Session.ID readonly key: InstructionEntry.Key } export type ExperimentalSessionInstructionsEntryRemoveOutput = void export type ExperimentalSessionInstructionsEntryRemoveOperation = ( input: ExperimentalSessionInstructionsEntryRemoveInput, ) => Effect.Effect export type ExperimentalSessionLogInput = { readonly sessionID: Session.ID readonly after?: Event.Seq | undefined readonly follow?: boolean | undefined } export type ExperimentalSessionLogOutput = | ( | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.created" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID readonly projectID: Project.ID readonly location: { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } readonly subpath?: RelativePath | undefined readonly parentID?: Session.ID | undefined readonly slug: string readonly title?: string | undefined readonly agent?: Agent.ID | undefined readonly model?: Model.Ref | undefined readonly metadata?: Session.Metadata | undefined readonly permissions?: Permission.Ruleset | undefined readonly version: string } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.agent.selected" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID readonly agent: Agent.ID readonly previous?: Agent.ID | undefined } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.model.selected" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID readonly model: Model.Ref readonly previous?: Model.Ref | undefined } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.moved" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID readonly location: { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } readonly projectID: Project.ID readonly subpath?: RelativePath | undefined } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.renamed" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID; readonly title: string } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.metadata.updated" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID; readonly metadata: Session.Metadata } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.permissions" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID; readonly permissions: Permission.Ruleset } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.viewed" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID; readonly idle: number } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.archived" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.unarchived" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.deleted" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.forked" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID readonly parentID: Session.ID readonly boundary: Session.ForkBoundary readonly instructions?: { readonly [x: Instruction.Key]: Instruction.Hash } | undefined readonly instructionEntries?: InstructionEntry.Snapshot | undefined } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.inbox.delivered" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID; readonly inboxID: SessionMessage.ID } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.inbox.enqueued" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID readonly inboxID: SessionMessage.ID readonly item: SessionInbox.Item } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.inbox.cancelled" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID; readonly inboxID: SessionMessage.ID } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.inbox.delivery.changed" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID readonly inboxID: SessionMessage.ID readonly delivery: SessionInbox.Delivery } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.execution.started" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.execution.succeeded" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.execution.failed" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID readonly error: { readonly type: string readonly message: string readonly status?: number | undefined readonly response?: { readonly body: string } | undefined readonly retryAfterMs?: number | undefined } } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.execution.interrupted" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID readonly reason: "user" | "shutdown" | "superseded" | "inactivity" } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.instructions.updated" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID readonly delta: { readonly [x: string]: Instruction.Hash | "removed" } readonly text?: string | undefined } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.synthetic" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID readonly text: string readonly description?: string | undefined readonly metadata?: { readonly [x: string]: unknown } | undefined } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.skill.activated" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID readonly id: Skill.ID readonly name: Skill.Name readonly text: string } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.shell.started" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID; readonly shell: Shell.Info } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.shell.ended" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID readonly shell: Shell.Info readonly output: { readonly output: string readonly cursor: number readonly size: number readonly truncated: boolean } } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.step.started" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID readonly assistantMessageID: SessionMessage.ID readonly agent: Agent.ID readonly model: Model.Ref readonly snapshot?: Snapshot.ID | undefined readonly started: number } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.step.streamed" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID; readonly assistantMessageID: SessionMessage.ID } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.step.ended" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID readonly assistantMessageID: SessionMessage.ID readonly finish: "stop" | "length" | "tool-calls" | "content-filter" | "error" | "unknown" readonly rawFinish?: string | undefined readonly native?: SessionMessage.Native | undefined readonly cost: Money.USD readonly tokens: { readonly input: number readonly output: number readonly reasoning: number readonly cache: { readonly read: number; readonly write: number } } readonly snapshot?: Snapshot.ID | undefined readonly files?: ReadonlyArray | undefined } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.step.failed" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID readonly assistantMessageID: SessionMessage.ID readonly error: { readonly type: string readonly message: string readonly status?: number | undefined readonly response?: { readonly body: string } | undefined readonly retryAfterMs?: number | undefined } readonly finish?: "content-filter" | undefined readonly rawFinish?: string | undefined readonly native?: SessionMessage.Native | undefined readonly cost?: Money.USD | undefined readonly tokens?: | { readonly input: number readonly output: number readonly reasoning: number readonly cache: { readonly read: number; readonly write: number } } | undefined readonly snapshot?: Snapshot.ID | undefined readonly files?: ReadonlyArray | undefined } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.text.started" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID readonly assistantMessageID: SessionMessage.ID readonly ordinal: number } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.text.ended" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID readonly assistantMessageID: SessionMessage.ID readonly ordinal: number readonly text: string readonly native?: SessionMessage.Native | undefined } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.reasoning.started" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID readonly assistantMessageID: SessionMessage.ID readonly ordinal: number readonly native?: SessionMessage.Native | undefined } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.reasoning.ended" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID readonly assistantMessageID: SessionMessage.ID readonly ordinal: number readonly text: string readonly native?: SessionMessage.Native | undefined } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.tool.input.started" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID readonly assistantMessageID: SessionMessage.ID readonly id: string readonly name: string } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.tool.input.ended" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID readonly assistantMessageID: SessionMessage.ID readonly id: string readonly text: string } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.tool.called" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID readonly assistantMessageID: SessionMessage.ID readonly id: string readonly input: { readonly [x: string]: unknown } readonly executed: boolean readonly native?: SessionMessage.Native | undefined } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.tool.success" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID readonly assistantMessageID: SessionMessage.ID readonly id: string readonly content: readonly [ ( | { readonly type: "text"; readonly text: string } | { readonly type: "file" readonly uri: string readonly mime: string readonly name?: string | undefined } ), ...Array< | { readonly type: "text"; readonly text: string } | { readonly type: "file" readonly uri: string readonly mime: string readonly name?: string | undefined } >, ] readonly metadata?: { readonly [x: string]: Schema.Json } | undefined readonly executed: boolean readonly native?: SessionMessage.Native | undefined } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.tool.failed" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID readonly assistantMessageID: SessionMessage.ID readonly id: string readonly error: { readonly type: string readonly message: string readonly status?: number | undefined readonly response?: { readonly body: string } | undefined readonly retryAfterMs?: number | undefined } readonly content?: | readonly [ ( | { readonly type: "text"; readonly text: string } | { readonly type: "file" readonly uri: string readonly mime: string readonly name?: string | undefined } ), ...Array< | { readonly type: "text"; readonly text: string } | { readonly type: "file" readonly uri: string readonly mime: string readonly name?: string | undefined } >, ] | undefined readonly metadata?: { readonly [x: string]: Schema.Json } | undefined readonly executed: boolean readonly native?: SessionMessage.Native | undefined } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.retry.scheduled" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID readonly assistantMessageID: SessionMessage.ID readonly attempt: number readonly at: number readonly error: { readonly type: string readonly message: string readonly status?: number | undefined readonly response?: { readonly body: string } | undefined readonly retryAfterMs?: number | undefined } } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.compaction.started" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID readonly reason: "auto" | "manual" readonly inputID?: SessionMessage.ID | undefined } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.compaction.ended" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID readonly reason: "auto" | "manual" readonly model?: Model.Ref | undefined readonly native?: SessionMessage.Native | undefined readonly text: string readonly cost?: Money.USD | undefined readonly tokens?: | { readonly input: number readonly output: number readonly reasoning: number readonly cache: { readonly read: number; readonly write: number } } | undefined } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.compaction.failed" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID readonly reason: "auto" | "manual" readonly error: { readonly type: string readonly message: string readonly status?: number | undefined readonly response?: { readonly body: string } | undefined readonly retryAfterMs?: number | undefined } readonly inputID?: SessionMessage.ID | undefined readonly cost?: Money.USD | undefined readonly tokens?: | { readonly input: number readonly output: number readonly reasoning: number readonly cache: { readonly read: number; readonly write: number } } | undefined } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.revert.staged" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID; readonly revert: Session.Revert } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.revert.cleared" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.revert.committed" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID; readonly to: SessionMessage.ID } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.usage.recorded" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID readonly source: "title" | "compaction" readonly cost: Money.USD readonly tokens: { readonly input: number readonly output: number readonly reasoning: number readonly cache: { readonly read: number; readonly write: number } } } } | { readonly id: Event.ID readonly created: number readonly metadata?: { readonly [x: string]: unknown } | undefined readonly type: "session.message.content.updated" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: | { readonly directory: AbsolutePath; readonly workspaceID?: Workspace.ID | undefined } | undefined readonly data: { readonly sessionID: Session.ID readonly messageID: SessionMessage.ID readonly content: ReadonlyArray } } ) | EventLog.Synced export type ExperimentalSessionLogOperation = ( input: ExperimentalSessionLogInput, ) => Stream.Stream export interface ExperimentalSessionApi { readonly stats: ExperimentalSessionStatsOperation readonly import: ExperimentalSessionImportOperation readonly export: ExperimentalSessionExportOperation readonly skill: ExperimentalSessionSkillOperation readonly wait: ExperimentalSessionWaitOperation readonly instructions: { readonly entry: { readonly list: ExperimentalSessionInstructionsEntryListOperation readonly put: ExperimentalSessionInstructionsEntryPutOperation readonly remove: ExperimentalSessionInstructionsEntryRemoveOperation } } readonly log: ExperimentalSessionLogOperation } export type MessageListInput = { readonly sessionID: Session.ID readonly limit?: number | undefined readonly order?: "asc" | "desc" | undefined readonly cursor?: string | undefined readonly type?: | "agent-switched" | "model-switched" | "location-switched" | "user" | "synthetic" | "system" | "skill" | "shell" | "assistant" | "compaction" | "idle" | undefined } export type MessageListOutput = { readonly data: ReadonlyArray readonly cursor: { readonly previous?: string | undefined; readonly next?: string | undefined } } export type MessageListOperation = (input: MessageListInput) => Effect.Effect export interface MessageApi { readonly list: MessageListOperation } export type ModelListInput = { readonly location?: { readonly directory?: string | undefined } | undefined readonly types?: ReadonlyArray | undefined } export type ModelListOutput = { readonly location: Location.PublicRef; readonly data: ReadonlyArray } export type ModelListOperation = (input?: ModelListInput) => Effect.Effect export type ModelDefaultInput = { readonly location?: { readonly directory?: string | undefined } | undefined } export type ModelDefaultOutput = { readonly location: Location.PublicRef; readonly data: Model.Info | undefined } export type ModelDefaultOperation = (input?: ModelDefaultInput) => Effect.Effect export interface ModelApi { readonly list: ModelListOperation readonly default: ModelDefaultOperation } export type ExperimentalGenerateTextInput = { readonly prompt: string; readonly model?: Model.Ref | undefined } export type ExperimentalGenerateTextOutput = { readonly text: string } export type ExperimentalGenerateTextOperation = ( input: ExperimentalGenerateTextInput, ) => Effect.Effect export type ExperimentalGenerateImageInput = { readonly model: Model.Ref readonly prompt: string readonly images?: ReadonlyArray | undefined readonly n?: number | undefined readonly aspect?: Generate.ImageAspect | undefined readonly resolution?: Generate.ImageResolution | undefined } export type ExperimentalGenerateImageOutput = Generate.ImageResult export type ExperimentalGenerateImageOperation = ( input: ExperimentalGenerateImageInput, ) => Effect.Effect export type ExperimentalGenerateDecisionsInput = { readonly model: Model.Ref readonly input: ReadonlyArray readonly questions: ReadonlyArray } export type ExperimentalGenerateDecisionsOutput = Generate.DecisionResult export type ExperimentalGenerateDecisionsOperation = ( input: ExperimentalGenerateDecisionsInput, ) => Effect.Effect export interface ExperimentalGenerateApi { readonly text: ExperimentalGenerateTextOperation readonly image: ExperimentalGenerateImageOperation readonly decisions: ExperimentalGenerateDecisionsOperation } export type ExperimentalVoiceModelsOutput = { readonly models: ReadonlyArray<{ readonly model: string readonly provider: string readonly transports: ReadonlyArray<"webrtc" | "websocket"> readonly available: boolean }> readonly default?: string | undefined } export type ExperimentalVoiceModelsOperation = () => Effect.Effect export type ExperimentalVoiceSessionInput = { readonly model: string readonly session?: { readonly [x: string]: unknown } | undefined readonly transport: | { readonly type: "webrtc"; readonly sdp: string; readonly dcid?: number | undefined } | { readonly type: "websocket" } } export type ExperimentalVoiceSessionOutput = { readonly transport: | { readonly type: "webrtc"; readonly sdp: string } | { readonly type: "websocket"; readonly url: string; readonly token: string; readonly expiresAt: number } } export type ExperimentalVoiceSessionOperation = ( input: ExperimentalVoiceSessionInput, ) => Effect.Effect export interface ExperimentalVoiceApi { readonly models: ExperimentalVoiceModelsOperation readonly session: ExperimentalVoiceSessionOperation } export type ProviderListInput = { readonly location?: { readonly directory?: string | undefined } | undefined } export type ProviderListOutput = { readonly location: Location.PublicRef; readonly data: ReadonlyArray } export type ProviderListOperation = (input?: ProviderListInput) => Effect.Effect export type ProviderGetInput = { readonly providerID: Provider.ID readonly location?: { readonly directory?: string | undefined } | undefined } export type ProviderGetOutput = { readonly location: Location.PublicRef; readonly data: Provider.Info } export type ProviderGetOperation = (input: ProviderGetInput) => Effect.Effect export interface ProviderApi { readonly list: ProviderListOperation readonly get: ProviderGetOperation } export type IntegrationListInput = { readonly location?: { readonly directory?: string | undefined } | undefined } export type IntegrationListOutput = { readonly location: Location.PublicRef readonly data: ReadonlyArray } export type IntegrationListOperation = ( input?: IntegrationListInput, ) => Effect.Effect export type IntegrationGetInput = { readonly integrationID: Integration.ID readonly location?: { readonly directory?: string | undefined } | undefined } export type IntegrationGetOutput = { readonly location: Location.PublicRef; readonly data: Integration.Info } export type IntegrationGetOperation = (input: IntegrationGetInput) => Effect.Effect export type IntegrationConnectKeyInput = { readonly integrationID: Integration.ID readonly location?: { readonly directory?: string | undefined } | undefined readonly key: string readonly answer?: Form.Answer | undefined readonly label?: string | undefined } export type IntegrationConnectKeyOutput = void export type IntegrationConnectKeyOperation = ( input: IntegrationConnectKeyInput, ) => Effect.Effect export type IntegrationConnectExternalInput = { readonly integrationID: Integration.ID readonly location?: { readonly directory?: string | undefined } | undefined readonly methodID: Integration.MethodID readonly answer?: Form.Answer | undefined readonly label?: string | undefined } export type IntegrationConnectExternalOutput = void export type IntegrationConnectExternalOperation = ( input: IntegrationConnectExternalInput, ) => Effect.Effect export type IntegrationOauthConnectInput = { readonly integrationID: Integration.ID readonly location?: { readonly directory?: string | undefined } | undefined readonly methodID: Integration.MethodID readonly answer?: Form.Answer | undefined readonly label?: string | undefined } export type IntegrationOauthConnectOutput = { readonly location: Location.PublicRef readonly data: Integration.Attempt } export type IntegrationOauthConnectOperation = ( input: IntegrationOauthConnectInput, ) => Effect.Effect export type IntegrationOauthStatusInput = { readonly integrationID: Integration.ID readonly attemptID: Integration.AttemptID readonly location?: { readonly directory?: string | undefined } | undefined } export type IntegrationOauthStatusOutput = { readonly location: Location.PublicRef readonly data: Integration.AttemptStatus } export type IntegrationOauthStatusOperation = ( input: IntegrationOauthStatusInput, ) => Effect.Effect export type IntegrationOauthCompleteInput = { readonly integrationID: Integration.ID readonly attemptID: Integration.AttemptID readonly location?: { readonly directory?: string | undefined } | undefined readonly code?: string | undefined } export type IntegrationOauthCompleteOutput = void export type IntegrationOauthCompleteOperation = ( input: IntegrationOauthCompleteInput, ) => Effect.Effect export type IntegrationOauthCancelInput = { readonly integrationID: Integration.ID readonly attemptID: Integration.AttemptID readonly location?: { readonly directory?: string | undefined } | undefined } export type IntegrationOauthCancelOutput = void export type IntegrationOauthCancelOperation = ( input: IntegrationOauthCancelInput, ) => Effect.Effect export type IntegrationCommandConnectInput = { readonly integrationID: Integration.ID readonly location?: { readonly directory?: string | undefined } | undefined readonly methodID: Integration.MethodID readonly label?: string | undefined } export type IntegrationCommandConnectOutput = { readonly location: Location.PublicRef readonly data: Integration.CommandAttempt } export type IntegrationCommandConnectOperation = ( input: IntegrationCommandConnectInput, ) => Effect.Effect export type IntegrationCommandStatusInput = { readonly integrationID: Integration.ID readonly attemptID: Integration.AttemptID readonly location?: { readonly directory?: string | undefined } | undefined } export type IntegrationCommandStatusOutput = { readonly location: Location.PublicRef readonly data: Integration.CommandAttemptStatus } export type IntegrationCommandStatusOperation = ( input: IntegrationCommandStatusInput, ) => Effect.Effect export type IntegrationCommandCancelInput = { readonly integrationID: Integration.ID readonly attemptID: Integration.AttemptID readonly location?: { readonly directory?: string | undefined } | undefined } export type IntegrationCommandCancelOutput = void export type IntegrationCommandCancelOperation = ( input: IntegrationCommandCancelInput, ) => Effect.Effect export interface IntegrationApi { readonly list: IntegrationListOperation readonly get: IntegrationGetOperation readonly connect: { readonly key: IntegrationConnectKeyOperation readonly external: IntegrationConnectExternalOperation } readonly oauth: { readonly connect: IntegrationOauthConnectOperation readonly status: IntegrationOauthStatusOperation readonly complete: IntegrationOauthCompleteOperation readonly cancel: IntegrationOauthCancelOperation } readonly command: { readonly connect: IntegrationCommandConnectOperation readonly status: IntegrationCommandStatusOperation readonly cancel: IntegrationCommandCancelOperation } /** @deprecated Use `client.experimental.integration.wellknown`. Removed in the next minor. */ readonly wellknown: { /** @deprecated Use `client.experimental.integration.wellknown.add`. Removed in the next minor. */ readonly add: ExperimentalIntegrationWellknownAddOperation } } export type ExperimentalIntegrationWellknownAddInput = { readonly location?: { readonly directory?: string | undefined } | undefined readonly url: string } export type ExperimentalIntegrationWellknownAddOutput = void export type ExperimentalIntegrationWellknownAddOperation = ( input: ExperimentalIntegrationWellknownAddInput, ) => Effect.Effect export interface ExperimentalIntegrationApi { readonly wellknown: { readonly add: ExperimentalIntegrationWellknownAddOperation } } export type McpListInput = { readonly location?: { readonly directory?: string | undefined } | undefined } export type McpListOutput = { readonly location: Location.PublicRef; readonly data: ReadonlyArray } export type McpListOperation = (input?: McpListInput) => Effect.Effect export type McpResourceCatalogInput = { readonly location?: { readonly directory?: string | undefined } | undefined } export type McpResourceCatalogOutput = { readonly location: Location.PublicRef; readonly data: Mcp.ResourceCatalog } export type McpResourceCatalogOperation = ( input?: McpResourceCatalogInput, ) => Effect.Effect export interface McpApi { readonly list: McpListOperation readonly resource: { readonly catalog: McpResourceCatalogOperation } /** @deprecated Use `client.experimental.mcp.add`. Removed in the next minor. */ readonly add: ExperimentalMcpAddOperation /** @deprecated Use `client.experimental.mcp.remove`. Removed in the next minor. */ readonly remove: ExperimentalMcpRemoveOperation /** @deprecated Use `client.experimental.mcp.connect`. Removed in the next minor. */ readonly connect: ExperimentalMcpConnectOperation /** @deprecated Use `client.experimental.mcp.disconnect`. Removed in the next minor. */ readonly disconnect: ExperimentalMcpDisconnectOperation /** @deprecated Use `client.experimental.mcp.client`. Removed in the next minor. */ readonly client: { /** @deprecated Use `client.experimental.mcp.client.token`. Removed in the next minor. */ readonly token: ExperimentalMcpClientTokenOperation } } export type ExperimentalMcpAddInput = { readonly server: string readonly location?: { readonly directory?: string | undefined } | undefined readonly config: Mcp.LocalConfig | Mcp.RemoteConfig } export type ExperimentalMcpAddOutput = void export type ExperimentalMcpAddOperation = ( input: ExperimentalMcpAddInput, ) => Effect.Effect export type ExperimentalMcpRemoveInput = { readonly server: string readonly location?: { readonly directory?: string | undefined } | undefined } export type ExperimentalMcpRemoveOutput = void export type ExperimentalMcpRemoveOperation = ( input: ExperimentalMcpRemoveInput, ) => Effect.Effect export type ExperimentalMcpConnectInput = { readonly server: string readonly location?: { readonly directory?: string | undefined } | undefined } export type ExperimentalMcpConnectOutput = void export type ExperimentalMcpConnectOperation = ( input: ExperimentalMcpConnectInput, ) => Effect.Effect export type ExperimentalMcpDisconnectInput = { readonly server: string readonly location?: { readonly directory?: string | undefined } | undefined } export type ExperimentalMcpDisconnectOutput = void export type ExperimentalMcpDisconnectOperation = ( input: ExperimentalMcpDisconnectInput, ) => Effect.Effect export type ExperimentalMcpClientTokenInput = { readonly location?: { readonly directory?: string | undefined } | undefined readonly name: string readonly "x-opencode-ticket"?: string | undefined } export type ExperimentalMcpClientTokenOutput = { readonly location: Location.PublicRef readonly data: PtyTicket.ConnectToken } export type ExperimentalMcpClientTokenOperation = ( input: ExperimentalMcpClientTokenInput, ) => Effect.Effect export interface ExperimentalMcpApi { readonly add: ExperimentalMcpAddOperation readonly remove: ExperimentalMcpRemoveOperation readonly connect: ExperimentalMcpConnectOperation readonly disconnect: ExperimentalMcpDisconnectOperation readonly client: { readonly token: ExperimentalMcpClientTokenOperation } } export type CredentialListOutput = ReadonlyArray export type CredentialListOperation = () => Effect.Effect export type CredentialCreateInput = { readonly id?: Credential.ID | undefined readonly integrationID: Integration.ID readonly label?: string | undefined readonly value: Credential.Value readonly activate?: boolean | undefined } export type CredentialCreateOutput = Credential.Entry export type CredentialCreateOperation = ( input: CredentialCreateInput, ) => Effect.Effect export type CredentialUpdateInput = { readonly credentialID: Credential.ID; readonly label: string } export type CredentialUpdateOutput = void export type CredentialUpdateOperation = ( input: CredentialUpdateInput, ) => Effect.Effect export type CredentialActivateInput = { readonly credentialID: Credential.ID } export type CredentialActivateOutput = void export type CredentialActivateOperation = ( input: CredentialActivateInput, ) => Effect.Effect export type CredentialRemoveInput = { readonly credentialID: Credential.ID } export type CredentialRemoveOutput = void export type CredentialRemoveOperation = ( input: CredentialRemoveInput, ) => Effect.Effect export interface CredentialApi { readonly list: CredentialListOperation readonly create: CredentialCreateOperation readonly update: CredentialUpdateOperation readonly activate: CredentialActivateOperation readonly remove: CredentialRemoveOperation } export type ProjectListInput = { readonly archived?: boolean | undefined } export type ProjectListOutput = ReadonlyArray export type ProjectListOperation = (input?: ProjectListInput) => Effect.Effect export type ProjectUpdateInput = { readonly projectID: Project.ID readonly canonical?: AbsolutePath | undefined readonly name?: string | undefined readonly icon?: Project.Icon | undefined readonly commands?: Project.Commands | undefined } export type ProjectUpdateOutput = Project.Info export type ProjectUpdateOperation = (input: ProjectUpdateInput) => Effect.Effect export interface ProjectApi { readonly list: ProjectListOperation readonly update: ProjectUpdateOperation } export type FormListInput = { readonly location?: { readonly directory?: string | undefined } | undefined } export type FormListOutput = { readonly location: Location.PublicRef; readonly data: ReadonlyArray } export type FormListOperation = (input?: FormListInput) => Effect.Effect export interface FormApi { readonly list: FormListOperation } export type PermissionRequestListInput = { readonly location?: { readonly directory?: string | undefined } | undefined } export type PermissionRequestListOutput = { readonly location: Location.PublicRef readonly data: ReadonlyArray } export type PermissionRequestListOperation = ( input?: PermissionRequestListInput, ) => Effect.Effect export type PermissionSavedListInput = { readonly projectID?: Project.ID | undefined } export type PermissionSavedListOutput = ReadonlyArray export type PermissionSavedListOperation = ( input?: PermissionSavedListInput, ) => Effect.Effect export type PermissionSavedUpdateInput = { readonly id: PermissionSaved.ID readonly action?: string | undefined readonly resource?: string | undefined } export type PermissionSavedUpdateOutput = PermissionSaved.Info export type PermissionSavedUpdateOperation = ( input: PermissionSavedUpdateInput, ) => Effect.Effect export type PermissionSavedRemoveInput = { readonly id: PermissionSaved.ID } export type PermissionSavedRemoveOutput = void export type PermissionSavedRemoveOperation = ( input: PermissionSavedRemoveInput, ) => Effect.Effect export type PermissionCreateInput = { readonly sessionID: Session.ID readonly id?: Permission.ID | undefined readonly action: string readonly resources: ReadonlyArray readonly save?: ReadonlyArray | undefined readonly metadata?: { readonly [x: string]: unknown } | undefined readonly source?: Permission.Source | undefined readonly agent?: Agent.ID | undefined } export type PermissionCreateOutput = { readonly id: Permission.ID; readonly effect: Permission.Effect } export type PermissionCreateOperation = ( input: PermissionCreateInput, ) => Effect.Effect export type PermissionListInput = { readonly sessionID: Session.ID } export type PermissionListOutput = ReadonlyArray export type PermissionListOperation = (input: PermissionListInput) => Effect.Effect export type PermissionGetInput = { readonly sessionID: Session.ID; readonly requestID: Permission.ID } export type PermissionGetOutput = Permission.Request export type PermissionGetOperation = (input: PermissionGetInput) => Effect.Effect export type PermissionReplyInput = { readonly sessionID: Session.ID readonly requestID: Permission.ID readonly decision: Permission.Reply readonly message?: string | undefined } export type PermissionReplyOutput = void export type PermissionReplyOperation = ( input: PermissionReplyInput, ) => Effect.Effect export interface PermissionApi { readonly request: { readonly list: PermissionRequestListOperation } readonly saved: { readonly list: PermissionSavedListOperation readonly update: PermissionSavedUpdateOperation readonly remove: PermissionSavedRemoveOperation } readonly create: PermissionCreateOperation readonly list: PermissionListOperation readonly get: PermissionGetOperation readonly reply: PermissionReplyOperation } export type FileListInput = { readonly location?: { readonly directory?: string | undefined } | undefined readonly path?: string | undefined } export type FileListOutput = { readonly location: Location.PublicRef; readonly data: ReadonlyArray } export type FileListOperation = (input?: FileListInput) => Effect.Effect export type FileFindInput = { readonly location?: { readonly directory?: string | undefined } | undefined readonly query: string readonly type?: "file" | "directory" | undefined readonly limit?: number | undefined } export type FileFindOutput = { readonly location: Location.PublicRef; readonly data: ReadonlyArray } export type FileFindOperation = (input: FileFindInput) => Effect.Effect export interface FileApi { readonly list: FileListOperation readonly find: FileFindOperation /** @deprecated Use `client.experimental.file.watch`. Removed in the next minor. */ readonly watch: ExperimentalFileWatchOperation /** @deprecated Use `client.experimental.file.unwatch`. Removed in the next minor. */ readonly unwatch: ExperimentalFileUnwatchOperation } export type ExperimentalFileWatchInput = { readonly location?: { readonly directory?: string | undefined } | undefined readonly path: string } export type ExperimentalFileWatchOutput = void export type ExperimentalFileWatchOperation = ( input: ExperimentalFileWatchInput, ) => Effect.Effect export type ExperimentalFileUnwatchInput = { readonly location?: { readonly directory?: string | undefined } | undefined readonly path: string } export type ExperimentalFileUnwatchOutput = void export type ExperimentalFileUnwatchOperation = ( input: ExperimentalFileUnwatchInput, ) => Effect.Effect export interface ExperimentalFileApi { readonly watch: ExperimentalFileWatchOperation readonly unwatch: ExperimentalFileUnwatchOperation } export type CommandListInput = { readonly location?: { readonly directory?: string | undefined } | undefined } export type CommandListOutput = { readonly location: Location.PublicRef; readonly data: ReadonlyArray } export type CommandListOperation = (input?: CommandListInput) => Effect.Effect export interface CommandApi { readonly list: CommandListOperation } export type SkillListInput = { readonly location?: { readonly directory?: string | undefined } | undefined } export type SkillListOutput = { readonly location: Location.PublicRef; readonly data: ReadonlyArray } export type SkillListOperation = (input?: SkillListInput) => Effect.Effect export interface SkillApi { readonly list: SkillListOperation } export type RpcCallInput = { readonly rpcID: string readonly method: string readonly location?: { readonly directory?: string | undefined } | undefined readonly input?: unknown | undefined } export type RpcCallOutput = { readonly output?: unknown } export type RpcCallOperation = (input: RpcCallInput) => Effect.Effect export interface RpcApi { readonly call: RpcCallOperation } export type EventSubscribeInput = { readonly types?: | ReadonlyArray< | "location.shutdown" | "models-dev.refreshed" | "credential.updated" | "credential.switched" | "integration.updated" | "provider.updated" | "model.updated" | "agent.updated" | "session.created" | "session.agent.selected" | "session.model.selected" | "session.moved" | "session.renamed" | "session.metadata.updated" | "session.permissions" | "session.viewed" | "session.archived" | "session.unarchived" | "session.usage.updated" | "session.deleted" | "session.forked" | "session.inbox.delivered" | "session.inbox.enqueued" | "session.inbox.cancelled" | "session.inbox.delivery.changed" | "session.execution.started" | "session.execution.succeeded" | "session.execution.failed" | "session.execution.interrupted" | "session.instructions.updated" | "session.synthetic" | "session.skill.activated" | "session.shell.started" | "session.shell.ended" | "session.step.started" | "session.step.streamed" | "session.step.ended" | "session.step.failed" | "session.text.started" | "session.text.delta" | "session.text.ended" | "session.reasoning.started" | "session.reasoning.delta" | "session.reasoning.ended" | "session.tool.input.started" | "session.tool.input.delta" | "session.tool.input.ended" | "session.tool.called" | "session.tool.progress" | "session.tool.success" | "session.tool.failed" | "session.retry.scheduled" | "session.compaction.started" | "session.compaction.delta" | "session.compaction.ended" | "session.compaction.failed" | "session.revert.staged" | "session.revert.cleared" | "session.revert.committed" | "filesystem.changed" | "reference.updated" | "permission.asked" | "permission.replied" | "plugin.updated" | "project.updated" | "worktree.updated" | "worktree.resolved" | "command.updated" | "config.updated" | "skill.updated" | "pty.created" | "pty.updated" | "pty.exited" | "pty.deleted" | "persistent-pty.added" | "persistent-pty.removed" | "persistent-pty.updated" | "shell.created" | "shell.exited" | "shell.deleted" | "form.created" | "form.replied" | "form.cancelled" | "websearch.updated" | "artifact.updated" | "session.status" | "session.idle" | "tui.prompt.append" | "tui.command.execute" | "tui.toast.show" | "tui.session.select" | "installation.updated" | "installation.update-available" | "vcs.branch.updated" | "mcp.status.changed" | "mcp.resources.changed" | `${"rpc."}${string}` > | undefined } export type EventSubscribeOutput = OpenCodeEvent export type EventSubscribeOperation = (input?: EventSubscribeInput) => Stream.Stream export interface EventApi { readonly subscribe: EventSubscribeOperation } export type PtyListInput = { readonly location?: { readonly directory?: string | undefined } | undefined } export type PtyListOutput = { readonly location: Location.PublicRef; readonly data: ReadonlyArray } export type PtyListOperation = (input?: PtyListInput) => Effect.Effect export type PtyCreateInput = { readonly location?: { readonly directory?: string | undefined } | undefined readonly command?: string | undefined readonly args?: ReadonlyArray | undefined readonly cwd?: string | undefined readonly title?: string | undefined readonly env?: { readonly [x: string]: string } | undefined } export type PtyCreateOutput = { readonly location: Location.PublicRef; readonly data: Pty.Info } export type PtyCreateOperation = (input?: PtyCreateInput) => Effect.Effect export type PtyGetInput = { readonly ptyID: Pty.ID readonly location?: { readonly directory?: string | undefined } | undefined } export type PtyGetOutput = { readonly location: Location.PublicRef; readonly data: Pty.Info } export type PtyGetOperation = (input: PtyGetInput) => Effect.Effect export type PtyUpdateInput = { readonly ptyID: Pty.ID readonly location?: { readonly directory?: string | undefined } | undefined readonly title?: string | undefined readonly size?: { readonly rows: number; readonly cols: number } | undefined } export type PtyUpdateOutput = { readonly location: Location.PublicRef; readonly data: Pty.Info } export type PtyUpdateOperation = (input: PtyUpdateInput) => Effect.Effect export type PtyRemoveInput = { readonly ptyID: Pty.ID readonly location?: { readonly directory?: string | undefined } | undefined } export type PtyRemoveOutput = void export type PtyRemoveOperation = (input: PtyRemoveInput) => Effect.Effect export type PtyConnectTokenInput = { readonly ptyID: Pty.ID readonly location?: { readonly directory?: string | undefined } | undefined readonly "x-opencode-ticket"?: string | undefined } export type PtyConnectTokenOutput = { readonly location: Location.PublicRef; readonly data: PtyTicket.ConnectToken } export type PtyConnectTokenOperation = ( input: PtyConnectTokenInput, ) => Effect.Effect export interface PtyApi { readonly list: PtyListOperation readonly create: PtyCreateOperation readonly get: PtyGetOperation readonly update: PtyUpdateOperation readonly remove: PtyRemoveOperation readonly connect: { readonly token: PtyConnectTokenOperation } } export type ExperimentalPersistentPtyReadInput = { readonly sessionID: Session.ID; readonly lines?: number | undefined } export type ExperimentalPersistentPtyReadOutput = { readonly ptyID: Pty.ID readonly title: string readonly cwd: string readonly foregroundProcess: string | null readonly screen: { readonly text: string readonly cols: number readonly rows: number readonly cursor: { readonly x: number; readonly y: number } } } | null export type ExperimentalPersistentPtyReadOperation = ( input: ExperimentalPersistentPtyReadInput, ) => Effect.Effect export type ExperimentalPersistentPtyListInput = { readonly sessionID: Session.ID } export type ExperimentalPersistentPtyListOutput = ReadonlyArray<{ readonly id: Pty.ID readonly title: string readonly command: string readonly args: ReadonlyArray readonly cwd: string readonly status: "running" | "exited" readonly pid: number readonly exitCode?: number | undefined readonly sessionID: Session.ID readonly userTitle: string | null readonly foregroundProcess: string | null readonly size: { readonly cols: number; readonly rows: number } readonly output: { readonly head: number; readonly tail: number } }> export type ExperimentalPersistentPtyListOperation = ( input: ExperimentalPersistentPtyListInput, ) => Effect.Effect export type ExperimentalPersistentPtyCreateInput = { readonly sessionID: Session.ID readonly command?: string | undefined readonly args: ReadonlyArray readonly cwd?: string | undefined readonly title: string readonly env: { readonly [x: string]: string } readonly size?: { readonly cols: number; readonly rows: number } | undefined } export type ExperimentalPersistentPtyCreateOutput = { readonly id: Pty.ID readonly title: string readonly command: string readonly args: ReadonlyArray readonly cwd: string readonly status: "running" | "exited" readonly pid: number readonly exitCode?: number | undefined readonly sessionID: Session.ID readonly userTitle: string | null readonly foregroundProcess: string | null readonly size: { readonly cols: number; readonly rows: number } readonly output: { readonly head: number; readonly tail: number } } export type ExperimentalPersistentPtyCreateOperation = ( input: ExperimentalPersistentPtyCreateInput, ) => Effect.Effect export type ExperimentalPersistentPtyShutdownOutput = void export type ExperimentalPersistentPtyShutdownOperation = () => Effect.Effect< ExperimentalPersistentPtyShutdownOutput, E > export type ExperimentalPersistentPtyHandoffOutput = { readonly handoff: { readonly directory: string readonly instanceID: string readonly ticket: string readonly expiresAt: number } | null } export type ExperimentalPersistentPtyHandoffOperation = () => Effect.Effect< ExperimentalPersistentPtyHandoffOutput, E > export type ExperimentalPersistentPtyGetInput = { readonly ptyID: Pty.ID } export type ExperimentalPersistentPtyGetOutput = { readonly id: Pty.ID readonly title: string readonly command: string readonly args: ReadonlyArray readonly cwd: string readonly status: "running" | "exited" readonly pid: number readonly exitCode?: number | undefined readonly sessionID: Session.ID readonly userTitle: string | null readonly foregroundProcess: string | null readonly size: { readonly cols: number; readonly rows: number } readonly output: { readonly head: number; readonly tail: number } } export type ExperimentalPersistentPtyGetOperation = ( input: ExperimentalPersistentPtyGetInput, ) => Effect.Effect export type ExperimentalPersistentPtyUpdateInput = { readonly ptyID: Pty.ID readonly attachmentID?: string | undefined readonly size?: { readonly cols: number; readonly rows: number } | undefined readonly title?: string | null | undefined } export type ExperimentalPersistentPtyUpdateOutput = { readonly id: Pty.ID readonly title: string readonly command: string readonly args: ReadonlyArray readonly cwd: string readonly status: "running" | "exited" readonly pid: number readonly exitCode?: number | undefined readonly sessionID: Session.ID readonly userTitle: string | null readonly foregroundProcess: string | null readonly size: { readonly cols: number; readonly rows: number } readonly output: { readonly head: number; readonly tail: number } } export type ExperimentalPersistentPtyUpdateOperation = ( input: ExperimentalPersistentPtyUpdateInput, ) => Effect.Effect export type ExperimentalPersistentPtySnapshotInput = { readonly ptyID: Pty.ID } export type ExperimentalPersistentPtySnapshotOutput = { readonly info: { readonly id: Pty.ID readonly title: string readonly command: string readonly args: ReadonlyArray readonly cwd: string readonly status: "running" | "exited" readonly pid: number readonly exitCode?: number | undefined readonly sessionID: Session.ID readonly userTitle: string | null readonly foregroundProcess: string | null readonly size: { readonly cols: number; readonly rows: number } readonly output: { readonly head: number; readonly tail: number } } readonly text: string readonly checkpoint: globalThis.Uint8Array readonly cursor: { readonly x: number; readonly y: number } } export type ExperimentalPersistentPtySnapshotOperation = ( input: ExperimentalPersistentPtySnapshotInput, ) => Effect.Effect export type ExperimentalPersistentPtyRemoveInput = { readonly ptyID: Pty.ID } export type ExperimentalPersistentPtyRemoveOutput = void export type ExperimentalPersistentPtyRemoveOperation = ( input: ExperimentalPersistentPtyRemoveInput, ) => Effect.Effect export type ExperimentalPersistentPtyConnectTokenInput = { readonly ptyID: Pty.ID readonly "x-opencode-ticket"?: string | undefined } export type ExperimentalPersistentPtyConnectTokenOutput = PtyTicket.ConnectToken export type ExperimentalPersistentPtyConnectTokenOperation = ( input: ExperimentalPersistentPtyConnectTokenInput, ) => Effect.Effect export type ExperimentalScheduleCreateInput = { readonly sessionID: Session.ID readonly name?: string | undefined readonly when?: Schedule.WhenInput | undefined readonly if?: Schedule.ConditionInput | undefined readonly until?: Schedule.ConditionInput | undefined readonly ends?: Schedule.Ends | undefined readonly prompt: string } export type ExperimentalScheduleCreateOutput = Schedule.Info export type ExperimentalScheduleCreateOperation = ( input: ExperimentalScheduleCreateInput, ) => Effect.Effect export type ExperimentalScheduleListInput = { readonly sessionID: Session.ID } export type ExperimentalScheduleListOutput = ReadonlyArray export type ExperimentalScheduleListOperation = ( input: ExperimentalScheduleListInput, ) => Effect.Effect export type ExperimentalScheduleGetInput = { readonly scheduleID: Schedule.ID } export type ExperimentalScheduleGetOutput = Schedule.Info export type ExperimentalScheduleGetOperation = ( input: ExperimentalScheduleGetInput, ) => Effect.Effect export type ExperimentalSchedulePauseInput = { readonly scheduleID: Schedule.ID } export type ExperimentalSchedulePauseOutput = Schedule.Info export type ExperimentalSchedulePauseOperation = ( input: ExperimentalSchedulePauseInput, ) => Effect.Effect export type ExperimentalScheduleResumeInput = { readonly scheduleID: Schedule.ID } export type ExperimentalScheduleResumeOutput = Schedule.Info export type ExperimentalScheduleResumeOperation = ( input: ExperimentalScheduleResumeInput, ) => Effect.Effect export type ExperimentalScheduleDeleteInput = { readonly scheduleID: Schedule.ID } export type ExperimentalScheduleDeleteOutput = void export type ExperimentalScheduleDeleteOperation = ( input: ExperimentalScheduleDeleteInput, ) => Effect.Effect export type ExperimentalArtifactsProvidersInput = { readonly location?: { readonly directory?: string | undefined } | undefined } export type ExperimentalArtifactsProvidersOutput = { readonly location: Location.PublicRef readonly data: ReadonlyArray } export type ExperimentalArtifactsProvidersOperation = ( input?: ExperimentalArtifactsProvidersInput, ) => Effect.Effect export type ExperimentalArtifactsListInput = { readonly location?: { readonly directory?: string | undefined } | undefined readonly sessionID?: Session.ID | undefined readonly provider?: Artifact.ProviderID | undefined } export type ExperimentalArtifactsListOutput = { readonly location: Location.PublicRef readonly data: ReadonlyArray } export type ExperimentalArtifactsListOperation = ( input?: ExperimentalArtifactsListInput, ) => Effect.Effect export type ExperimentalArtifactsCreateInput = { readonly location?: { readonly directory?: string | undefined } | undefined readonly title: string readonly files: { readonly [x: string]: string } readonly entry?: string | undefined readonly provider?: Artifact.ProviderID | undefined readonly sessionID?: Session.ID | undefined } export type ExperimentalArtifactsCreateOutput = { readonly location: Location.PublicRef; readonly data: Artifact.Info } export type ExperimentalArtifactsCreateOperation = ( input: ExperimentalArtifactsCreateInput, ) => Effect.Effect export type ExperimentalArtifactsGetInput = { readonly artifactID: Artifact.ID readonly location?: { readonly directory?: string | undefined } | undefined } export type ExperimentalArtifactsGetOutput = { readonly location: Location.PublicRef; readonly data: Artifact.Content } export type ExperimentalArtifactsGetOperation = ( input: ExperimentalArtifactsGetInput, ) => Effect.Effect export type ExperimentalArtifactsUpdateInput = { readonly artifactID: Artifact.ID readonly location?: { readonly directory?: string | undefined } | undefined readonly title?: string | undefined readonly files: { readonly [x: string]: string } readonly entry?: string | undefined readonly sessionID?: Session.ID | undefined } export type ExperimentalArtifactsUpdateOutput = { readonly location: Location.PublicRef; readonly data: Artifact.Info } export type ExperimentalArtifactsUpdateOperation = ( input: ExperimentalArtifactsUpdateInput, ) => Effect.Effect export type ExperimentalArtifactsDeleteInput = { readonly artifactID: Artifact.ID readonly location?: { readonly directory?: string | undefined } | undefined } export type ExperimentalArtifactsDeleteOutput = void export type ExperimentalArtifactsDeleteOperation = ( input: ExperimentalArtifactsDeleteInput, ) => Effect.Effect export interface ExperimentalApi { readonly persistentPty: { readonly read: ExperimentalPersistentPtyReadOperation readonly list: ExperimentalPersistentPtyListOperation readonly create: ExperimentalPersistentPtyCreateOperation readonly shutdown: ExperimentalPersistentPtyShutdownOperation readonly handoff: ExperimentalPersistentPtyHandoffOperation readonly get: ExperimentalPersistentPtyGetOperation readonly update: ExperimentalPersistentPtyUpdateOperation readonly snapshot: ExperimentalPersistentPtySnapshotOperation readonly remove: ExperimentalPersistentPtyRemoveOperation readonly connectToken: ExperimentalPersistentPtyConnectTokenOperation } readonly schedule: { readonly create: ExperimentalScheduleCreateOperation readonly list: ExperimentalScheduleListOperation readonly get: ExperimentalScheduleGetOperation readonly pause: ExperimentalSchedulePauseOperation readonly resume: ExperimentalScheduleResumeOperation readonly delete: ExperimentalScheduleDeleteOperation } readonly artifacts: { readonly providers: ExperimentalArtifactsProvidersOperation readonly list: ExperimentalArtifactsListOperation readonly create: ExperimentalArtifactsCreateOperation readonly get: ExperimentalArtifactsGetOperation readonly update: ExperimentalArtifactsUpdateOperation readonly delete: ExperimentalArtifactsDeleteOperation } } export type ShellListInput = { readonly location?: { readonly directory?: string | undefined } | undefined } export type ShellListOutput = { readonly location: Location.PublicRef; readonly data: ReadonlyArray } export type ShellListOperation = (input?: ShellListInput) => Effect.Effect export type ShellCreateInput = { readonly location?: { readonly directory?: string | undefined } | undefined readonly command: string readonly cwd?: string | undefined readonly timeout?: number | undefined readonly metadata?: { readonly [x: string]: unknown } | undefined } export type ShellCreateOutput = { readonly location: Location.PublicRef; readonly data: Shell.Info } export type ShellCreateOperation = (input: ShellCreateInput) => Effect.Effect export type ShellGetInput = { readonly id: Shell.ID readonly location?: { readonly directory?: string | undefined } | undefined } export type ShellGetOutput = { readonly location: Location.PublicRef; readonly data: Shell.Info } export type ShellGetOperation = (input: ShellGetInput) => Effect.Effect export type ShellOutputInput = { readonly id: Shell.ID readonly location?: { readonly directory?: string | undefined } | undefined readonly cursor?: number | undefined readonly limit?: number | undefined } export type ShellOutputOutput = { readonly location: Location.PublicRef readonly data: { readonly output: string readonly cursor: number readonly size: number readonly truncated: boolean } } export type ShellOutputOperation = (input: ShellOutputInput) => Effect.Effect export type ShellRemoveInput = { readonly id: Shell.ID readonly location?: { readonly directory?: string | undefined } | undefined } export type ShellRemoveOutput = void export type ShellRemoveOperation = (input: ShellRemoveInput) => Effect.Effect export interface ShellApi { readonly list: ShellListOperation readonly create: ShellCreateOperation readonly get: ShellGetOperation readonly output: ShellOutputOperation readonly remove: ShellRemoveOperation } export type ReferenceListInput = { readonly location?: { readonly directory?: string | undefined } | undefined } export type ReferenceListOutput = { readonly location: Location.PublicRef readonly data: ReadonlyArray } export type ReferenceListOperation = (input?: ReferenceListInput) => Effect.Effect export interface ReferenceApi { readonly list: ReferenceListOperation } export type WorktreeListInput = { readonly projectID: Project.ID } export type WorktreeListOutput = Worktree.List export type WorktreeListOperation = (input: WorktreeListInput) => Effect.Effect export type WorktreeCreateInput = { readonly projectID: Project.ID readonly from?: AbsolutePath | undefined readonly branch?: string | undefined readonly directory?: AbsolutePath | undefined readonly name?: string | undefined } export type WorktreeCreateOutput = Worktree.Info export type WorktreeCreateOperation = (input: WorktreeCreateInput) => Effect.Effect export type WorktreeRemoveInput = { readonly projectID: Project.ID readonly directory: AbsolutePath readonly force: boolean } export type WorktreeRemoveOutput = void export type WorktreeRemoveOperation = (input: WorktreeRemoveInput) => Effect.Effect export type WorktreeRefreshInput = { readonly projectID: Project.ID } export type WorktreeRefreshOutput = void export type WorktreeRefreshOperation = ( input: WorktreeRefreshInput, ) => Effect.Effect export interface WorktreeApi { readonly list: WorktreeListOperation readonly create: WorktreeCreateOperation readonly remove: WorktreeRemoveOperation readonly refresh: WorktreeRefreshOperation } export type VcsInitInput = { readonly location?: { readonly directory?: string | undefined } | undefined readonly provider?: string | undefined } export type VcsInitOutput = void export type VcsInitOperation = (input?: VcsInitInput) => Effect.Effect export type VcsGetInput = { readonly location?: { readonly directory?: string | undefined } | undefined } export type VcsGetOutput = { readonly location: Location.PublicRef; readonly data: Vcs.Info } export type VcsGetOperation = (input?: VcsGetInput) => Effect.Effect export type VcsBaseInput = { readonly location?: { readonly directory?: string | undefined } | undefined } export type VcsBaseOutput = { readonly location: Location.PublicRef; readonly data: Vcs.Base | null } export type VcsBaseOperation = (input?: VcsBaseInput) => Effect.Effect export type VcsStatusInput = { readonly location?: { readonly directory?: string | undefined } | undefined } export type VcsStatusOutput = { readonly location: Location.PublicRef; readonly data: ReadonlyArray } export type VcsStatusOperation = (input?: VcsStatusInput) => Effect.Effect export type VcsBranchListInput = { readonly location?: { readonly directory?: string | undefined } | undefined readonly search?: string | undefined readonly limit?: number | undefined } export type VcsBranchListOutput = { readonly location: Location.PublicRef; readonly data: Vcs.BranchList } export type VcsBranchListOperation = (input?: VcsBranchListInput) => Effect.Effect export type VcsDiffInput = { readonly location?: { readonly directory?: string | undefined } | undefined readonly mode: Vcs.Mode readonly base?: string | undefined readonly context?: number | undefined readonly untracked?: Vcs.Untracked | undefined } export type VcsDiffOutput = { readonly location: Location.PublicRef; readonly data: ReadonlyArray } export type VcsDiffOperation = (input: VcsDiffInput) => Effect.Effect export interface VcsApi { readonly init: VcsInitOperation readonly get: VcsGetOperation readonly base: VcsBaseOperation readonly status: VcsStatusOperation readonly branch: { readonly list: VcsBranchListOperation } readonly diff: VcsDiffOperation } export type DebugHeapDumpInput = { readonly directory?: string | undefined } export type DebugHeapDumpOutput = { readonly path: string readonly pid: number readonly memory: { readonly rss: number readonly heapTotal: number readonly heapUsed: number readonly external: number readonly arrayBuffers: number } } export type DebugHeapDumpOperation = (input?: DebugHeapDumpInput) => Effect.Effect export type DebugLocationListOutput = ReadonlyArray export type DebugLocationListOperation = () => Effect.Effect export type DebugLocationEvictInput = { readonly location?: { readonly directory?: string | undefined } | undefined } export type DebugLocationEvictOutput = void export type DebugLocationEvictOperation = ( input?: DebugLocationEvictInput, ) => Effect.Effect export interface DebugApi { readonly heapDump: DebugHeapDumpOperation readonly location: { readonly list: DebugLocationListOperation; readonly evict: DebugLocationEvictOperation } } export type ExperimentalMigrationV1StatusOutput = | { readonly status: "required" | "completed" } | { readonly status: "running" readonly progress: { readonly label: string readonly numerator?: number | undefined readonly denominator?: number | undefined } } | { readonly status: "error"; readonly error: string } export type ExperimentalMigrationV1StatusOperation = () => Effect.Effect< ExperimentalMigrationV1StatusOutput, E > export interface ExperimentalMigrationApi { readonly v1: { readonly status: ExperimentalMigrationV1StatusOperation } } export type WebsearchProvidersInput = { readonly location?: { readonly directory?: string | undefined } | undefined } export type WebsearchProvidersOutput = { readonly location: Location.PublicRef readonly data: ReadonlyArray } export type WebsearchProvidersOperation = ( input?: WebsearchProvidersInput, ) => Effect.Effect export type WebsearchQueryInput = { readonly location?: { readonly directory?: string | undefined } | undefined readonly query: string readonly providerID?: WebSearch.ID | undefined } export type WebsearchQueryOutput = { readonly location: Location.PublicRef; readonly data: WebSearch.Response } export type WebsearchQueryOperation = (input: WebsearchQueryInput) => Effect.Effect export interface WebsearchApi { readonly providers: WebsearchProvidersOperation readonly query: WebsearchQueryOperation } export type ExperimentalUsageLimitsInput = { readonly location?: { readonly directory?: string | undefined } | undefined } export type ExperimentalUsageLimitsOutput = { readonly location: Location.PublicRef readonly data: UsageLimits.Info | null } export type ExperimentalUsageLimitsOperation = ( input?: ExperimentalUsageLimitsInput, ) => Effect.Effect export interface ExperimentalUsageApi { readonly limits: ExperimentalUsageLimitsOperation } export type ConfigGetInput = { readonly location?: { readonly directory?: string | undefined } | undefined } export type ConfigGetOutput = ReadonlyArray export type ConfigGetOperation = (input?: ConfigGetInput) => Effect.Effect export type ConfigShellsOutput = ReadonlyArray<{ readonly path: string readonly name: string readonly acceptable: boolean }> export type ConfigShellsOperation = () => Effect.Effect export interface ConfigApi { readonly get: ConfigGetOperation readonly shells: ConfigShellsOperation /** @deprecated Use `client.experimental.config.update`. Removed in the next minor. */ readonly update: ExperimentalConfigUpdateOperation } export type ExperimentalConfigUpdateInput = { readonly shell: string | null } export type ExperimentalConfigUpdateOutput = void export type ExperimentalConfigUpdateOperation = ( input: ExperimentalConfigUpdateInput, ) => Effect.Effect export interface ExperimentalConfigApi { readonly update: ExperimentalConfigUpdateOperation } /** @deprecated Use `ExperimentalSessionStatsInput`. Removed in the next minor. */ export type SessionStatsInput = ExperimentalSessionStatsInput /** @deprecated Use `ExperimentalSessionStatsOutput`. Removed in the next minor. */ export type SessionStatsOutput = ExperimentalSessionStatsOutput /** @deprecated Use `ExperimentalSessionStatsOperation`. Removed in the next minor. */ export type SessionStatsOperation = ExperimentalSessionStatsOperation /** @deprecated Use `ExperimentalSessionImportInput`. Removed in the next minor. */ export type SessionImportInput = ExperimentalSessionImportInput /** @deprecated Use `ExperimentalSessionImportOutput`. Removed in the next minor. */ export type SessionImportOutput = ExperimentalSessionImportOutput /** @deprecated Use `ExperimentalSessionImportOperation`. Removed in the next minor. */ export type SessionImportOperation = ExperimentalSessionImportOperation /** @deprecated Use `ExperimentalSessionExportInput`. Removed in the next minor. */ export type SessionExportInput = ExperimentalSessionExportInput /** @deprecated Use `ExperimentalSessionExportOutput`. Removed in the next minor. */ export type SessionExportOutput = ExperimentalSessionExportOutput /** @deprecated Use `ExperimentalSessionExportOperation`. Removed in the next minor. */ export type SessionExportOperation = ExperimentalSessionExportOperation /** @deprecated Use `ExperimentalSessionSkillInput`. Removed in the next minor. */ export type SessionSkillInput = ExperimentalSessionSkillInput /** @deprecated Use `ExperimentalSessionSkillOutput`. Removed in the next minor. */ export type SessionSkillOutput = ExperimentalSessionSkillOutput /** @deprecated Use `ExperimentalSessionSkillOperation`. Removed in the next minor. */ export type SessionSkillOperation = ExperimentalSessionSkillOperation /** @deprecated Use `ExperimentalSessionWaitInput`. Removed in the next minor. */ export type SessionWaitInput = ExperimentalSessionWaitInput /** @deprecated Use `ExperimentalSessionWaitOutput`. Removed in the next minor. */ export type SessionWaitOutput = ExperimentalSessionWaitOutput /** @deprecated Use `ExperimentalSessionWaitOperation`. Removed in the next minor. */ export type SessionWaitOperation = ExperimentalSessionWaitOperation /** @deprecated Use `ExperimentalSessionInstructionsEntryListInput`. Removed in the next minor. */ export type SessionInstructionsEntryListInput = ExperimentalSessionInstructionsEntryListInput /** @deprecated Use `ExperimentalSessionInstructionsEntryListOutput`. Removed in the next minor. */ export type SessionInstructionsEntryListOutput = ExperimentalSessionInstructionsEntryListOutput /** @deprecated Use `ExperimentalSessionInstructionsEntryListOperation`. Removed in the next minor. */ export type SessionInstructionsEntryListOperation = ExperimentalSessionInstructionsEntryListOperation /** @deprecated Use `ExperimentalSessionInstructionsEntryPutInput`. Removed in the next minor. */ export type SessionInstructionsEntryPutInput = ExperimentalSessionInstructionsEntryPutInput /** @deprecated Use `ExperimentalSessionInstructionsEntryPutOutput`. Removed in the next minor. */ export type SessionInstructionsEntryPutOutput = ExperimentalSessionInstructionsEntryPutOutput /** @deprecated Use `ExperimentalSessionInstructionsEntryPutOperation`. Removed in the next minor. */ export type SessionInstructionsEntryPutOperation = ExperimentalSessionInstructionsEntryPutOperation /** @deprecated Use `ExperimentalSessionInstructionsEntryRemoveInput`. Removed in the next minor. */ export type SessionInstructionsEntryRemoveInput = ExperimentalSessionInstructionsEntryRemoveInput /** @deprecated Use `ExperimentalSessionInstructionsEntryRemoveOutput`. Removed in the next minor. */ export type SessionInstructionsEntryRemoveOutput = ExperimentalSessionInstructionsEntryRemoveOutput /** @deprecated Use `ExperimentalSessionInstructionsEntryRemoveOperation`. Removed in the next minor. */ export type SessionInstructionsEntryRemoveOperation = ExperimentalSessionInstructionsEntryRemoveOperation /** @deprecated Use `ExperimentalSessionLogInput`. Removed in the next minor. */ export type SessionLogInput = ExperimentalSessionLogInput /** @deprecated Use `ExperimentalSessionLogOutput`. Removed in the next minor. */ export type SessionLogOutput = ExperimentalSessionLogOutput /** @deprecated Use `ExperimentalSessionLogOperation`. Removed in the next minor. */ export type SessionLogOperation = ExperimentalSessionLogOperation /** @deprecated Use `ExperimentalGenerateTextInput`. Removed in the next minor. */ export type GenerateTextInput = ExperimentalGenerateTextInput /** @deprecated Use `ExperimentalGenerateTextOutput`. Removed in the next minor. */ export type GenerateTextOutput = ExperimentalGenerateTextOutput /** @deprecated Use `ExperimentalGenerateTextOperation`. Removed in the next minor. */ export type GenerateTextOperation = ExperimentalGenerateTextOperation /** @deprecated Use `ExperimentalGenerateImageInput`. Removed in the next minor. */ export type GenerateImageInput = ExperimentalGenerateImageInput /** @deprecated Use `ExperimentalGenerateImageOutput`. Removed in the next minor. */ export type GenerateImageOutput = ExperimentalGenerateImageOutput /** @deprecated Use `ExperimentalGenerateImageOperation`. Removed in the next minor. */ export type GenerateImageOperation = ExperimentalGenerateImageOperation /** @deprecated Use `ExperimentalGenerateDecisionsInput`. Removed in the next minor. */ export type GenerateDecisionsInput = ExperimentalGenerateDecisionsInput /** @deprecated Use `ExperimentalGenerateDecisionsOutput`. Removed in the next minor. */ export type GenerateDecisionsOutput = ExperimentalGenerateDecisionsOutput /** @deprecated Use `ExperimentalGenerateDecisionsOperation`. Removed in the next minor. */ export type GenerateDecisionsOperation = ExperimentalGenerateDecisionsOperation /** @deprecated Use `ExperimentalVoiceModelsOutput`. Removed in the next minor. */ export type VoiceModelsOutput = ExperimentalVoiceModelsOutput /** @deprecated Use `ExperimentalVoiceModelsOperation`. Removed in the next minor. */ export type VoiceModelsOperation = ExperimentalVoiceModelsOperation /** @deprecated Use `ExperimentalVoiceSessionInput`. Removed in the next minor. */ export type VoiceSessionInput = ExperimentalVoiceSessionInput /** @deprecated Use `ExperimentalVoiceSessionOutput`. Removed in the next minor. */ export type VoiceSessionOutput = ExperimentalVoiceSessionOutput /** @deprecated Use `ExperimentalVoiceSessionOperation`. Removed in the next minor. */ export type VoiceSessionOperation = ExperimentalVoiceSessionOperation /** @deprecated Use `ExperimentalIntegrationWellknownAddInput`. Removed in the next minor. */ export type IntegrationWellknownAddInput = ExperimentalIntegrationWellknownAddInput /** @deprecated Use `ExperimentalIntegrationWellknownAddOutput`. Removed in the next minor. */ export type IntegrationWellknownAddOutput = ExperimentalIntegrationWellknownAddOutput /** @deprecated Use `ExperimentalIntegrationWellknownAddOperation`. Removed in the next minor. */ export type IntegrationWellknownAddOperation = ExperimentalIntegrationWellknownAddOperation /** @deprecated Use `ExperimentalMcpAddInput`. Removed in the next minor. */ export type McpAddInput = ExperimentalMcpAddInput /** @deprecated Use `ExperimentalMcpAddOutput`. Removed in the next minor. */ export type McpAddOutput = ExperimentalMcpAddOutput /** @deprecated Use `ExperimentalMcpAddOperation`. Removed in the next minor. */ export type McpAddOperation = ExperimentalMcpAddOperation /** @deprecated Use `ExperimentalMcpRemoveInput`. Removed in the next minor. */ export type McpRemoveInput = ExperimentalMcpRemoveInput /** @deprecated Use `ExperimentalMcpRemoveOutput`. Removed in the next minor. */ export type McpRemoveOutput = ExperimentalMcpRemoveOutput /** @deprecated Use `ExperimentalMcpRemoveOperation`. Removed in the next minor. */ export type McpRemoveOperation = ExperimentalMcpRemoveOperation /** @deprecated Use `ExperimentalMcpConnectInput`. Removed in the next minor. */ export type McpConnectInput = ExperimentalMcpConnectInput /** @deprecated Use `ExperimentalMcpConnectOutput`. Removed in the next minor. */ export type McpConnectOutput = ExperimentalMcpConnectOutput /** @deprecated Use `ExperimentalMcpConnectOperation`. Removed in the next minor. */ export type McpConnectOperation = ExperimentalMcpConnectOperation /** @deprecated Use `ExperimentalMcpDisconnectInput`. Removed in the next minor. */ export type McpDisconnectInput = ExperimentalMcpDisconnectInput /** @deprecated Use `ExperimentalMcpDisconnectOutput`. Removed in the next minor. */ export type McpDisconnectOutput = ExperimentalMcpDisconnectOutput /** @deprecated Use `ExperimentalMcpDisconnectOperation`. Removed in the next minor. */ export type McpDisconnectOperation = ExperimentalMcpDisconnectOperation /** @deprecated Use `ExperimentalMcpClientTokenInput`. Removed in the next minor. */ export type McpClientTokenInput = ExperimentalMcpClientTokenInput /** @deprecated Use `ExperimentalMcpClientTokenOutput`. Removed in the next minor. */ export type McpClientTokenOutput = ExperimentalMcpClientTokenOutput /** @deprecated Use `ExperimentalMcpClientTokenOperation`. Removed in the next minor. */ export type McpClientTokenOperation = ExperimentalMcpClientTokenOperation /** @deprecated Use `ExperimentalFileWatchInput`. Removed in the next minor. */ export type FileWatchInput = ExperimentalFileWatchInput /** @deprecated Use `ExperimentalFileWatchOutput`. Removed in the next minor. */ export type FileWatchOutput = ExperimentalFileWatchOutput /** @deprecated Use `ExperimentalFileWatchOperation`. Removed in the next minor. */ export type FileWatchOperation = ExperimentalFileWatchOperation /** @deprecated Use `ExperimentalFileUnwatchInput`. Removed in the next minor. */ export type FileUnwatchInput = ExperimentalFileUnwatchInput /** @deprecated Use `ExperimentalFileUnwatchOutput`. Removed in the next minor. */ export type FileUnwatchOutput = ExperimentalFileUnwatchOutput /** @deprecated Use `ExperimentalFileUnwatchOperation`. Removed in the next minor. */ export type FileUnwatchOperation = ExperimentalFileUnwatchOperation /** @deprecated Use `ExperimentalMigrationV1StatusOutput`. Removed in the next minor. */ export type MigrationV1StatusOutput = ExperimentalMigrationV1StatusOutput /** @deprecated Use `ExperimentalMigrationV1StatusOperation`. Removed in the next minor. */ export type MigrationV1StatusOperation = ExperimentalMigrationV1StatusOperation /** @deprecated Use `ExperimentalUsageLimitsInput`. Removed in the next minor. */ export type UsageLimitsInput = ExperimentalUsageLimitsInput /** @deprecated Use `ExperimentalUsageLimitsOutput`. Removed in the next minor. */ export type UsageLimitsOutput = ExperimentalUsageLimitsOutput /** @deprecated Use `ExperimentalUsageLimitsOperation`. Removed in the next minor. */ export type UsageLimitsOperation = ExperimentalUsageLimitsOperation /** @deprecated Use `ExperimentalConfigUpdateInput`. Removed in the next minor. */ export type ConfigUpdateInput = ExperimentalConfigUpdateInput /** @deprecated Use `ExperimentalConfigUpdateOutput`. Removed in the next minor. */ export type ConfigUpdateOutput = ExperimentalConfigUpdateOutput /** @deprecated Use `ExperimentalConfigUpdateOperation`. Removed in the next minor. */ export type ConfigUpdateOperation = ExperimentalConfigUpdateOperation /** @deprecated Use `ExperimentalGenerateApi`. Removed in the next minor. */ export type GenerateApi = ExperimentalGenerateApi /** @deprecated Use `ExperimentalVoiceApi`. Removed in the next minor. */ export type VoiceApi = ExperimentalVoiceApi /** @deprecated Use `ExperimentalMigrationApi`. Removed in the next minor. */ export type MigrationApi = ExperimentalMigrationApi /** @deprecated Use `ExperimentalUsageApi`. Removed in the next minor. */ export type UsageApi = ExperimentalUsageApi export interface AppApi { readonly server: ServerApi readonly location: LocationApi readonly agent: AgentApi readonly plugin: PluginApi readonly session: SessionApi readonly experimental: ExperimentalApi & { readonly session: ExperimentalSessionApi readonly generate: ExperimentalGenerateApi readonly voice: ExperimentalVoiceApi readonly integration: ExperimentalIntegrationApi readonly mcp: ExperimentalMcpApi readonly file: ExperimentalFileApi readonly migration: ExperimentalMigrationApi readonly usage: ExperimentalUsageApi readonly config: ExperimentalConfigApi } readonly message: MessageApi readonly model: ModelApi readonly provider: ProviderApi readonly integration: IntegrationApi readonly mcp: McpApi readonly credential: CredentialApi readonly project: ProjectApi readonly form: FormApi readonly permission: PermissionApi readonly file: FileApi readonly command: CommandApi readonly skill: SkillApi readonly rpc: RpcApi readonly event: EventApi readonly pty: PtyApi readonly shell: ShellApi readonly reference: ReferenceApi readonly worktree: WorktreeApi readonly vcs: VcsApi readonly debug: DebugApi readonly websearch: WebsearchApi readonly config: ConfigApi /** @deprecated Use `client.experimental.generate`. Removed in the next minor. */ readonly generate: { /** @deprecated Use `client.experimental.generate.text`. Removed in the next minor. */ readonly text: ExperimentalGenerateTextOperation /** @deprecated Use `client.experimental.generate.image`. Removed in the next minor. */ readonly image: ExperimentalGenerateImageOperation /** @deprecated Use `client.experimental.generate.decisions`. Removed in the next minor. */ readonly decisions: ExperimentalGenerateDecisionsOperation } /** @deprecated Use `client.experimental.voice`. Removed in the next minor. */ readonly voice: { /** @deprecated Use `client.experimental.voice.models`. Removed in the next minor. */ readonly models: ExperimentalVoiceModelsOperation /** @deprecated Use `client.experimental.voice.session`. Removed in the next minor. */ readonly session: ExperimentalVoiceSessionOperation } /** @deprecated Use `client.experimental.migration`. Removed in the next minor. */ readonly migration: { /** @deprecated Use `client.experimental.migration.v1`. Removed in the next minor. */ readonly v1: { /** @deprecated Use `client.experimental.migration.v1.status`. Removed in the next minor. */ readonly status: ExperimentalMigrationV1StatusOperation } } /** @deprecated Use `client.experimental.usage`. Removed in the next minor. */ readonly usage: { /** @deprecated Use `client.experimental.usage.limits`. Removed in the next minor. */ readonly limits: ExperimentalUsageLimitsOperation } }