Something went wrong. Try again.
opencode v2 mirror
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089// Generated by @opencode-ai/httpapi-codegen. Do not edit.import type { Effect, Stream } from "effect"import type { Location } from "@opencode-ai/schema/location"import type { Agent } from "@opencode-ai/schema/agent"import type { Plugin } from "@opencode-ai/schema/plugin"import type { Workspace } from "@opencode-ai/schema/workspace"import type { Session } from "@opencode-ai/schema/session"import type { AbsolutePath } from "@opencode-ai/schema/schema"import type { Project } from "@opencode-ai/schema/project"import type { RelativePath } from "@opencode-ai/schema/schema"import type { Brand } from "effect"import type { Model } from "@opencode-ai/schema/model"import type { DateTime } from "effect"import type { SessionMessage } from "@opencode-ai/schema/session-message"import type { SessionInbox } from "@opencode-ai/schema/session-inbox"import type { PromptInput } from "@opencode-ai/schema/prompt-input"import type { AgentAttachment } from "@opencode-ai/schema/prompt"import type { Skill } from "@opencode-ai/schema/skill"import type { Event } from "@opencode-ai/schema/event"import type { InstructionEntry } from "@opencode-ai/schema/instruction-entry"import type { Schema } from "effect"import type { EventLog } from "@opencode-ai/schema/event-log"import type { Shell } from "@opencode-ai/schema/shell"import type { Provider } from "@opencode-ai/schema/provider"import type { Integration } from "@opencode-ai/schema/integration"import type { Form } from "@opencode-ai/schema/form"import type { Mcp } from "@opencode-ai/schema/mcp"import type { Credential } from "@opencode-ai/schema/credential"import type { Permission } from "@opencode-ai/schema/permission"import type { PermissionSaved } from "@opencode-ai/schema/permission-saved"import type { FileSystem } from "@opencode-ai/schema/filesystem"import type { Command } from "@opencode-ai/schema/command"import type { OpenCodeEvent } from "@opencode-ai/protocol/groups/event"import type { Pty } from "@opencode-ai/schema/pty"import type { PtyTicket } from "@opencode-ai/schema/pty-ticket"import type { Reference } from "@opencode-ai/schema/reference"import type { Worktree } from "@opencode-ai/schema/worktree"import type { Vcs } from "@opencode-ai/schema/vcs"import type { FileDiff } from "@opencode-ai/schema/file-diff"import type { WebSearch } from "@opencode-ai/schema/websearch"import type { Config } from "@opencode-ai/schema/config"
export type HealthGetOutput = { readonly healthy: true; readonly version: string; readonly pid: number }export type HealthGetOperation<E = never> = () => Effect.Effect<HealthGetOutput, E>
export interface HealthApi<E = never> { readonly get: HealthGetOperation<E>}
export type ServerGetOutput = { readonly urls: ReadonlyArray<string> }export type ServerGetOperation<E = never> = () => Effect.Effect<ServerGetOutput, E>
export interface ServerApi<E = never> { readonly get: ServerGetOperation<E>}
export type LocationGetInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type LocationGetOutput = Location.Infoexport type LocationGetOperation<E = never> = (input?: LocationGetInput) => Effect.Effect<LocationGetOutput, E>
export interface LocationApi<E = never> { readonly get: LocationGetOperation<E>}
export type AgentListInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type AgentListOutput = { readonly location: Location.Info; readonly data: ReadonlyArray<Agent.Info> }export type AgentListOperation<E = never> = (input?: AgentListInput) => Effect.Effect<AgentListOutput, E>
export type AgentGetInput = { readonly agentID: Agent.ID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type AgentGetOutput = { readonly location: Location.Info; readonly data: Agent.Info }export type AgentGetOperation<E = never> = (input: AgentGetInput) => Effect.Effect<AgentGetOutput, E>
export interface AgentApi<E = never> { readonly list: AgentListOperation<E> readonly get: AgentGetOperation<E>}
export type PluginListInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type PluginListOutput = { readonly location: Location.Info; readonly data: ReadonlyArray<Plugin.Info> }export type PluginListOperation<E = never> = (input?: PluginListInput) => Effect.Effect<PluginListOutput, E>
export interface PluginApi<E = never> { readonly list: PluginListOperation<E>}
export type SessionListInput = { readonly workspace?: Workspace.ID | undefined readonly limit?: number | undefined readonly order?: "asc" | "desc" | undefined readonly search?: string | undefined readonly parentID?: Session.ID | null | undefined readonly directory?: AbsolutePath | undefined readonly project?: Project.ID | undefined readonly subpath?: RelativePath | undefined readonly cursor?: (string & Brand.Brand<"SessionsCursor">) | undefined}export type SessionListOutput = { readonly data: ReadonlyArray<Session.Info> readonly cursor: { readonly previous?: (string & Brand.Brand<"SessionsCursor">) | undefined readonly next?: (string & Brand.Brand<"SessionsCursor">) | undefined }}export type SessionListOperation<E = never> = (input?: SessionListInput) => Effect.Effect<SessionListOutput, E>
export type SessionStatsInput = { 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 SessionStatsOutput = { 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: number & Brand.Brand<"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: number & Brand.Brand<"Money.USD"> }>}export type SessionStatsOperation<E = never> = (input?: SessionStatsInput) => Effect.Effect<SessionStatsOutput, E>
export type SessionCreateInput = { readonly id?: Session.ID | undefined readonly title?: string | undefined readonly agent?: Agent.ID | undefined readonly model?: Model.Ref | undefined readonly location?: Location.Ref | undefined readonly metadata?: Session.Metadata | undefined}export type SessionCreateOutput = Session.Infoexport type SessionCreateOperation<E = never> = (input?: SessionCreateInput) => Effect.Effect<SessionCreateOutput, E>
export type SessionImportInput = { readonly info: Session.Info readonly messages: ReadonlyArray<SessionMessage.Info> readonly location?: Location.Ref | undefined}export type SessionImportOutput = Session.Infoexport type SessionImportOperation<E = never> = (input: SessionImportInput) => Effect.Effect<SessionImportOutput, E>
export type SessionExportInput = { readonly sessionID: Session.ID; readonly sanitize?: boolean | undefined }export type SessionExportOutput = { readonly info: Session.Info; readonly messages: ReadonlyArray<SessionMessage.Info> }export type SessionExportOperation<E = never> = (input: SessionExportInput) => Effect.Effect<SessionExportOutput, E>
export type SessionActiveOutput = { readonly [x: Session.ID]: { readonly type: "running" } }export type SessionActiveOperation<E = never> = () => Effect.Effect<SessionActiveOutput, E>
export type SessionGetInput = { readonly sessionID: Session.ID }export type SessionGetOutput = Session.Infoexport type SessionGetOperation<E = never> = (input: SessionGetInput) => Effect.Effect<SessionGetOutput, E>
export type SessionRemoveInput = { readonly sessionID: Session.ID }export type SessionRemoveOutput = voidexport type SessionRemoveOperation<E = never> = (input: SessionRemoveInput) => Effect.Effect<SessionRemoveOutput, E>
export type SessionForkInput = { readonly sessionID: Session.ID; readonly boundary: Session.ForkRequestBoundary }export type SessionForkOutput = Session.Infoexport type SessionForkOperation<E = never> = (input: SessionForkInput) => Effect.Effect<SessionForkOutput, E>
export type SessionSwitchAgentInput = { readonly sessionID: Session.ID; readonly agent: Agent.ID }export type SessionSwitchAgentOutput = voidexport type SessionSwitchAgentOperation<E = never> = ( input: SessionSwitchAgentInput,) => Effect.Effect<SessionSwitchAgentOutput, E>
export type SessionSwitchModelInput = { readonly sessionID: Session.ID; readonly model: Model.Ref }export type SessionSwitchModelOutput = voidexport type SessionSwitchModelOperation<E = never> = ( input: SessionSwitchModelInput,) => Effect.Effect<SessionSwitchModelOutput, E>
export type SessionRenameInput = { readonly sessionID: Session.ID; readonly title: string }export type SessionRenameOutput = voidexport type SessionRenameOperation<E = never> = (input: SessionRenameInput) => Effect.Effect<SessionRenameOutput, E>
export type SessionMoveInput = { readonly sessionID: Session.ID readonly directory: AbsolutePath readonly workspaceID?: Workspace.ID | undefined readonly delivery?: SessionInbox.Delivery | undefined}export type SessionMoveOutput = voidexport type SessionMoveOperation<E = never> = (input: SessionMoveInput) => Effect.Effect<SessionMoveOutput, E>
export type SessionPromptInput = { readonly sessionID: Session.ID readonly id?: SessionMessage.ID | undefined readonly text: string readonly files?: ReadonlyArray<PromptInput.FileAttachment> | undefined readonly agents?: ReadonlyArray<AgentAttachment> | undefined readonly skills?: ReadonlyArray<PromptInput.SkillAttachment> | undefined readonly metadata?: { readonly [x: string]: unknown } | undefined readonly delivery?: SessionInbox.Delivery | undefined readonly resume?: boolean | undefined}export type SessionPromptOutput = SessionInbox.Userexport type SessionPromptOperation<E = never> = (input: SessionPromptInput) => Effect.Effect<SessionPromptOutput, E>
export type SessionCommandInput = { readonly sessionID: Session.ID readonly command: string readonly text: string readonly files?: ReadonlyArray<PromptInput.FileAttachment> | undefined readonly agents?: ReadonlyArray<AgentAttachment> | undefined readonly skills?: ReadonlyArray<PromptInput.SkillAttachment> | undefined readonly delivery?: SessionInbox.Delivery | undefined}export type SessionCommandOutput = voidexport type SessionCommandOperation<E = never> = (input: SessionCommandInput) => Effect.Effect<SessionCommandOutput, E>
export type SessionSkillInput = { readonly sessionID: Session.ID readonly id?: SessionMessage.ID | undefined readonly skill: Skill.ID readonly resume?: boolean | undefined}export type SessionSkillOutput = voidexport type SessionSkillOperation<E = never> = (input: SessionSkillInput) => Effect.Effect<SessionSkillOutput, E>
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.Syntheticexport type SessionSyntheticOperation<E = never> = ( input: SessionSyntheticInput,) => Effect.Effect<SessionSyntheticOutput, E>
export type SessionShellInput = { readonly sessionID: Session.ID readonly id?: Event.ID | undefined readonly command: string}export type SessionShellOutput = voidexport type SessionShellOperation<E = never> = (input: SessionShellInput) => Effect.Effect<SessionShellOutput, E>
export type SessionCompactInput = { readonly sessionID: Session.ID readonly id?: SessionMessage.ID | undefined readonly delivery?: SessionInbox.Delivery | undefined}export type SessionCompactOutput = SessionInbox.Compactionexport type SessionCompactOperation<E = never> = (input: SessionCompactInput) => Effect.Effect<SessionCompactOutput, E>
export type SessionWaitInput = { readonly sessionID: Session.ID }export type SessionWaitOutput = voidexport type SessionWaitOperation<E = never> = (input: SessionWaitInput) => Effect.Effect<SessionWaitOutput, E>
export type SessionRevertStageInput = { readonly sessionID: Session.ID readonly messageID: SessionMessage.ID readonly files?: boolean | undefined}export type SessionRevertStageOutput = Session.Revertexport type SessionRevertStageOperation<E = never> = ( input: SessionRevertStageInput,) => Effect.Effect<SessionRevertStageOutput, E>
export type SessionRevertClearInput = { readonly sessionID: Session.ID }export type SessionRevertClearOutput = voidexport type SessionRevertClearOperation<E = never> = ( input: SessionRevertClearInput,) => Effect.Effect<SessionRevertClearOutput, E>
export type SessionRevertCommitInput = { readonly sessionID: Session.ID }export type SessionRevertCommitOutput = voidexport type SessionRevertCommitOperation<E = never> = ( input: SessionRevertCommitInput,) => Effect.Effect<SessionRevertCommitOutput, E>
export type SessionContextInput = { readonly sessionID: Session.ID }export type SessionContextOutput = ReadonlyArray<SessionMessage.Info>export type SessionContextOperation<E = never> = (input: SessionContextInput) => Effect.Effect<SessionContextOutput, E>
export type SessionInboxListInput = { readonly sessionID: Session.ID }export type SessionInboxListOutput = ReadonlyArray<SessionInbox.Info>export type SessionInboxListOperation<E = never> = ( input: SessionInboxListInput,) => Effect.Effect<SessionInboxListOutput, E>
export type SessionInboxCancelInput = { readonly sessionID: Session.ID; readonly inboxID: SessionMessage.ID }export type SessionInboxCancelOutput = voidexport type SessionInboxCancelOperation<E = never> = ( input: SessionInboxCancelInput,) => Effect.Effect<SessionInboxCancelOutput, E>
export type SessionInboxSteerInput = { readonly sessionID: Session.ID; readonly inboxID: SessionMessage.ID }export type SessionInboxSteerOutput = voidexport type SessionInboxSteerOperation<E = never> = ( input: SessionInboxSteerInput,) => Effect.Effect<SessionInboxSteerOutput, E>
export type SessionInboxQueueInput = { readonly sessionID: Session.ID; readonly inboxID: SessionMessage.ID }export type SessionInboxQueueOutput = voidexport type SessionInboxQueueOperation<E = never> = ( input: SessionInboxQueueInput,) => Effect.Effect<SessionInboxQueueOutput, E>
export type SessionInstructionsEntryListInput = { readonly sessionID: Session.ID }export type SessionInstructionsEntryListOutput = ReadonlyArray<InstructionEntry.Info>export type SessionInstructionsEntryListOperation<E = never> = ( input: SessionInstructionsEntryListInput,) => Effect.Effect<SessionInstructionsEntryListOutput, E>
export type SessionInstructionsEntryPutInput = { readonly sessionID: Session.ID readonly key: InstructionEntry.Key readonly value: Schema.Json}export type SessionInstructionsEntryPutOutput = voidexport type SessionInstructionsEntryPutOperation<E = never> = ( input: SessionInstructionsEntryPutInput,) => Effect.Effect<SessionInstructionsEntryPutOutput, E>
export type SessionInstructionsEntryRemoveInput = { readonly sessionID: Session.ID; readonly key: InstructionEntry.Key }export type SessionInstructionsEntryRemoveOutput = voidexport type SessionInstructionsEntryRemoveOperation<E = never> = ( input: SessionInstructionsEntryRemoveInput,) => Effect.Effect<SessionInstructionsEntryRemoveOutput, E>
export type SessionGenerateInput = { readonly sessionID: Session.ID; readonly prompt: string }export type SessionGenerateOutput = { readonly text: string }export type SessionGenerateOperation<E = never> = ( input: SessionGenerateInput,) => Effect.Effect<SessionGenerateOutput, E>
export type SessionLogInput = { readonly sessionID: Session.ID readonly after?: Event.Seq | undefined readonly follow?: boolean | undefined}export type SessionLogOutput = | ( | { 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?: Location.Ref | undefined readonly data: { readonly sessionID: Session.ID readonly projectID: Project.ID readonly location: Location.Ref 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 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?: Location.Ref | 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?: Location.Ref | 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?: Location.Ref | undefined readonly data: { readonly sessionID: Session.ID readonly location: Location.Ref 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?: Location.Ref | 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.viewed" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: Location.Ref | 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.deleted" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: Location.Ref | 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?: Location.Ref | undefined readonly data: { readonly sessionID: Session.ID readonly parentID: Session.ID readonly boundary: Session.ForkBoundary readonly instructions?: | { readonly [x: string & Brand.Brand<"Instruction.Key">]: string & Brand.Brand<"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?: Location.Ref | 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?: Location.Ref | 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?: Location.Ref | 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?: Location.Ref | 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?: Location.Ref | 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?: Location.Ref | 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?: Location.Ref | undefined readonly data: { readonly sessionID: Session.ID readonly error: { readonly type: string; readonly message: string; readonly status?: 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?: Location.Ref | undefined readonly data: { readonly sessionID: Session.ID; readonly reason: "user" | "shutdown" | "superseded" } } | { 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?: Location.Ref | undefined readonly data: { readonly sessionID: Session.ID readonly delta: { readonly [x: string]: (string & Brand.Brand<"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?: Location.Ref | 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?: Location.Ref | 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?: Location.Ref | 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?: Location.Ref | 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?: Location.Ref | undefined readonly data: { readonly sessionID: Session.ID readonly assistantMessageID: SessionMessage.ID readonly agent: Agent.ID readonly model: Model.Ref readonly snapshot?: (string & Brand.Brand<"Snapshot.ID">) | undefined } } | { 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?: Location.Ref | 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?: Location.Ref | 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 providerState?: SessionMessage.ProviderState | undefined readonly cost: number & Brand.Brand<"Money.USD"> readonly tokens: { readonly input: number readonly output: number readonly reasoning: number readonly cache: { readonly read: number; readonly write: number } } readonly snapshot?: (string & Brand.Brand<"Snapshot.ID">) | undefined readonly files?: ReadonlyArray<RelativePath> | 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?: Location.Ref | undefined readonly data: { readonly sessionID: Session.ID readonly assistantMessageID: SessionMessage.ID readonly error: { readonly type: string; readonly message: string; readonly status?: number | undefined } readonly finish?: "content-filter" | undefined readonly rawFinish?: string | undefined readonly providerState?: SessionMessage.ProviderState | undefined readonly cost?: (number & Brand.Brand<"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?: (string & Brand.Brand<"Snapshot.ID">) | undefined readonly files?: ReadonlyArray<RelativePath> | 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?: Location.Ref | 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?: Location.Ref | undefined readonly data: { readonly sessionID: Session.ID readonly assistantMessageID: SessionMessage.ID readonly ordinal: number readonly text: string readonly state?: SessionMessage.ProviderState | 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?: Location.Ref | undefined readonly data: { readonly sessionID: Session.ID readonly assistantMessageID: SessionMessage.ID readonly ordinal: number readonly state?: SessionMessage.ProviderState | 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?: Location.Ref | undefined readonly data: { readonly sessionID: Session.ID readonly assistantMessageID: SessionMessage.ID readonly ordinal: number readonly text: string readonly state?: SessionMessage.ProviderState | 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?: Location.Ref | 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?: Location.Ref | 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?: Location.Ref | undefined readonly data: { readonly sessionID: Session.ID readonly assistantMessageID: SessionMessage.ID readonly id: string readonly input: { readonly [x: string]: unknown } readonly executed: boolean readonly state?: SessionMessage.ProviderState | 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?: Location.Ref | 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 resultState?: SessionMessage.ProviderState | 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?: Location.Ref | 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 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 resultState?: SessionMessage.ProviderState | 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?: Location.Ref | 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 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?: Location.Ref | undefined readonly data: { readonly sessionID: Session.ID readonly reason: "auto" | "manual" readonly recent: string 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?: Location.Ref | undefined readonly data: { readonly sessionID: Session.ID readonly reason: "auto" | "manual" readonly text: string readonly recent: string } } | { 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?: Location.Ref | undefined readonly data: { readonly sessionID: Session.ID readonly reason: "auto" | "manual" readonly error: { readonly type: string; readonly message: string; readonly status?: number | undefined } readonly inputID?: SessionMessage.ID | 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?: Location.Ref | 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?: Location.Ref | 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?: Location.Ref | 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.message.content.updated" readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version } readonly location?: Location.Ref | undefined readonly data: { readonly sessionID: Session.ID readonly messageID: SessionMessage.ID readonly content: ReadonlyArray<SessionMessage.AssistantContentEncoded> } } | { 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?: Location.Ref | undefined readonly data: { readonly sessionID: Session.ID readonly source: "title" | "compaction" readonly cost: number & Brand.Brand<"Money.USD"> readonly tokens: { readonly input: number readonly output: number readonly reasoning: number readonly cache: { readonly read: number; readonly write: number } } } } ) | EventLog.Syncedexport type SessionLogOperation<E = never> = (input: SessionLogInput) => Stream.Stream<SessionLogOutput, E>
export type SessionInterruptInput = { readonly sessionID: Session.ID; readonly continue?: boolean | undefined }export type SessionInterruptOutput = { readonly interrupted: boolean }export type SessionInterruptOperation<E = never> = ( input: SessionInterruptInput,) => Effect.Effect<SessionInterruptOutput, E>
export type SessionBackgroundInput = { readonly sessionID: Session.ID }export type SessionBackgroundOutput = voidexport type SessionBackgroundOperation<E = never> = ( input: SessionBackgroundInput,) => Effect.Effect<SessionBackgroundOutput, E>
export type SessionMessageInput = { readonly sessionID: Session.ID; readonly messageID: SessionMessage.ID }export type SessionMessageOutput = SessionMessage.Infoexport type SessionMessageOperation<E = never> = (input: SessionMessageInput) => Effect.Effect<SessionMessageOutput, E>
export type SessionMessageUpdateInput = { readonly sessionID: Session.ID readonly messageID: SessionMessage.ID readonly content: ReadonlyArray< SessionMessage.AssistantText | SessionMessage.AssistantReasoning | SessionMessage.AssistantTool >}export type SessionMessageUpdateOutput = SessionMessage.Assistantexport type SessionMessageUpdateOperation<E = never> = ( input: SessionMessageUpdateInput,) => Effect.Effect<SessionMessageUpdateOutput, E>
export type SessionEnvironmentInput = { readonly sessionID: Session.ID readonly variables: { readonly [x: string]: string }}export type SessionEnvironmentOutput = voidexport type SessionEnvironmentOperation<E = never> = ( input: SessionEnvironmentInput,) => Effect.Effect<SessionEnvironmentOutput, E>
export type SessionViewInput = { readonly sessionID: Session.ID; readonly idle: number }export type SessionViewOutput = voidexport type SessionViewOperation<E = never> = (input: SessionViewInput) => Effect.Effect<SessionViewOutput, E>
export interface SessionApi<E = never> { readonly list: SessionListOperation<E> readonly stats: SessionStatsOperation<E> readonly create: SessionCreateOperation<E> readonly import: SessionImportOperation<E> readonly export: SessionExportOperation<E> readonly active: SessionActiveOperation<E> readonly get: SessionGetOperation<E> readonly remove: SessionRemoveOperation<E> readonly fork: SessionForkOperation<E> readonly switchAgent: SessionSwitchAgentOperation<E> readonly switchModel: SessionSwitchModelOperation<E> readonly rename: SessionRenameOperation<E> readonly move: SessionMoveOperation<E> readonly prompt: SessionPromptOperation<E> readonly command: SessionCommandOperation<E> readonly skill: SessionSkillOperation<E> readonly synthetic: SessionSyntheticOperation<E> readonly shell: SessionShellOperation<E> readonly compact: SessionCompactOperation<E> readonly wait: SessionWaitOperation<E> readonly revert: { readonly stage: SessionRevertStageOperation<E> readonly clear: SessionRevertClearOperation<E> readonly commit: SessionRevertCommitOperation<E> } readonly context: SessionContextOperation<E> readonly inbox: { readonly list: SessionInboxListOperation<E> readonly cancel: SessionInboxCancelOperation<E> readonly steer: SessionInboxSteerOperation<E> readonly queue: SessionInboxQueueOperation<E> } readonly instructions: { readonly entry: { readonly list: SessionInstructionsEntryListOperation<E> readonly put: SessionInstructionsEntryPutOperation<E> readonly remove: SessionInstructionsEntryRemoveOperation<E> } } readonly generate: SessionGenerateOperation<E> readonly log: SessionLogOperation<E> readonly interrupt: SessionInterruptOperation<E> readonly background: SessionBackgroundOperation<E> readonly message: SessionMessageOperation<E> readonly messageUpdate: SessionMessageUpdateOperation<E> readonly environment: SessionEnvironmentOperation<E> readonly view: SessionViewOperation<E>}
export type MessageListInput = { readonly sessionID: Session.ID readonly limit?: number | undefined readonly order?: "asc" | "desc" | undefined readonly cursor?: string | undefined}export type MessageListOutput = { readonly data: ReadonlyArray<SessionMessage.Info> readonly cursor: { readonly previous?: string | undefined; readonly next?: string | undefined }}export type MessageListOperation<E = never> = (input: MessageListInput) => Effect.Effect<MessageListOutput, E>
export interface MessageApi<E = never> { readonly list: MessageListOperation<E>}
export type ModelListInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type ModelListOutput = { readonly location: Location.Info; readonly data: ReadonlyArray<Model.Info> }export type ModelListOperation<E = never> = (input?: ModelListInput) => Effect.Effect<ModelListOutput, E>
export type ModelDefaultInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type ModelDefaultOutput = { readonly location: Location.Info; readonly data: Model.Info | undefined }export type ModelDefaultOperation<E = never> = (input?: ModelDefaultInput) => Effect.Effect<ModelDefaultOutput, E>
export interface ModelApi<E = never> { readonly list: ModelListOperation<E> readonly default: ModelDefaultOperation<E>}
export type GenerateTextInput = { readonly prompt: string; readonly model?: Model.Ref | undefined }export type GenerateTextOutput = { readonly text: string }export type GenerateTextOperation<E = never> = (input: GenerateTextInput) => Effect.Effect<GenerateTextOutput, E>
export interface GenerateApi<E = never> { readonly text: GenerateTextOperation<E>}
export type ProviderListInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type ProviderListOutput = { readonly location: Location.Info; readonly data: ReadonlyArray<Provider.Info> }export type ProviderListOperation<E = never> = (input?: ProviderListInput) => Effect.Effect<ProviderListOutput, E>
export type ProviderGetInput = { readonly providerID: Provider.ID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type ProviderGetOutput = { readonly location: Location.Info; readonly data: Provider.Info }export type ProviderGetOperation<E = never> = (input: ProviderGetInput) => Effect.Effect<ProviderGetOutput, E>
export interface ProviderApi<E = never> { readonly list: ProviderListOperation<E> readonly get: ProviderGetOperation<E>}
export type IntegrationListInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type IntegrationListOutput = { readonly location: Location.Info; readonly data: ReadonlyArray<Integration.Info> }export type IntegrationListOperation<E = never> = ( input?: IntegrationListInput,) => Effect.Effect<IntegrationListOutput, E>
export type IntegrationGetInput = { readonly integrationID: Integration.ID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type IntegrationGetOutput = { readonly location: Location.Info; readonly data: Integration.Info | undefined }export type IntegrationGetOperation<E = never> = (input: IntegrationGetInput) => Effect.Effect<IntegrationGetOutput, E>
export type IntegrationWellknownAddInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined readonly url: string}export type IntegrationWellknownAddOutput = voidexport type IntegrationWellknownAddOperation<E = never> = ( input: IntegrationWellknownAddInput,) => Effect.Effect<IntegrationWellknownAddOutput, E>
export type IntegrationConnectKeyInput = { readonly integrationID: Integration.ID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined readonly key: string readonly answer?: Form.Answer | undefined readonly label?: string | undefined}export type IntegrationConnectKeyOutput = voidexport type IntegrationConnectKeyOperation<E = never> = ( input: IntegrationConnectKeyInput,) => Effect.Effect<IntegrationConnectKeyOutput, E>
export type IntegrationOauthConnectInput = { readonly integrationID: Integration.ID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined readonly methodID: Integration.MethodID readonly answer?: Form.Answer | undefined readonly label?: string | undefined}export type IntegrationOauthConnectOutput = { readonly location: Location.Info; readonly data: Integration.Attempt }export type IntegrationOauthConnectOperation<E = never> = ( input: IntegrationOauthConnectInput,) => Effect.Effect<IntegrationOauthConnectOutput, E>
export type IntegrationOauthStatusInput = { readonly integrationID: Integration.ID readonly attemptID: Integration.AttemptID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type IntegrationOauthStatusOutput = { readonly location: Location.Info readonly data: Integration.AttemptStatus}export type IntegrationOauthStatusOperation<E = never> = ( input: IntegrationOauthStatusInput,) => Effect.Effect<IntegrationOauthStatusOutput, E>
export type IntegrationOauthCompleteInput = { readonly integrationID: Integration.ID readonly attemptID: Integration.AttemptID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined readonly code?: string | undefined}export type IntegrationOauthCompleteOutput = voidexport type IntegrationOauthCompleteOperation<E = never> = ( input: IntegrationOauthCompleteInput,) => Effect.Effect<IntegrationOauthCompleteOutput, E>
export type IntegrationOauthCancelInput = { readonly integrationID: Integration.ID readonly attemptID: Integration.AttemptID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type IntegrationOauthCancelOutput = voidexport type IntegrationOauthCancelOperation<E = never> = ( input: IntegrationOauthCancelInput,) => Effect.Effect<IntegrationOauthCancelOutput, E>
export type IntegrationCommandConnectInput = { readonly integrationID: Integration.ID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined readonly methodID: Integration.MethodID readonly label?: string | undefined}export type IntegrationCommandConnectOutput = { readonly location: Location.Info readonly data: Integration.CommandAttempt}export type IntegrationCommandConnectOperation<E = never> = ( input: IntegrationCommandConnectInput,) => Effect.Effect<IntegrationCommandConnectOutput, E>
export type IntegrationCommandStatusInput = { readonly integrationID: Integration.ID readonly attemptID: Integration.AttemptID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type IntegrationCommandStatusOutput = { readonly location: Location.Info readonly data: Integration.CommandAttemptStatus}export type IntegrationCommandStatusOperation<E = never> = ( input: IntegrationCommandStatusInput,) => Effect.Effect<IntegrationCommandStatusOutput, E>
export type IntegrationCommandCancelInput = { readonly integrationID: Integration.ID readonly attemptID: Integration.AttemptID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type IntegrationCommandCancelOutput = voidexport type IntegrationCommandCancelOperation<E = never> = ( input: IntegrationCommandCancelInput,) => Effect.Effect<IntegrationCommandCancelOutput, E>
export interface IntegrationApi<E = never> { readonly list: IntegrationListOperation<E> readonly get: IntegrationGetOperation<E> readonly wellknown: { readonly add: IntegrationWellknownAddOperation<E> } readonly connect: { readonly key: IntegrationConnectKeyOperation<E> } readonly oauth: { readonly connect: IntegrationOauthConnectOperation<E> readonly status: IntegrationOauthStatusOperation<E> readonly complete: IntegrationOauthCompleteOperation<E> readonly cancel: IntegrationOauthCancelOperation<E> } readonly command: { readonly connect: IntegrationCommandConnectOperation<E> readonly status: IntegrationCommandStatusOperation<E> readonly cancel: IntegrationCommandCancelOperation<E> }}
export type McpListInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type McpListOutput = { readonly location: Location.Info; readonly data: ReadonlyArray<Mcp.Server> }export type McpListOperation<E = never> = (input?: McpListInput) => Effect.Effect<McpListOutput, E>
export type McpAddInput = { readonly server: string readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined readonly config: Mcp.LocalConfig | Mcp.RemoteConfig}export type McpAddOutput = voidexport type McpAddOperation<E = never> = (input: McpAddInput) => Effect.Effect<McpAddOutput, E>
export type McpRemoveInput = { readonly server: string readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type McpRemoveOutput = voidexport type McpRemoveOperation<E = never> = (input: McpRemoveInput) => Effect.Effect<McpRemoveOutput, E>
export type McpConnectInput = { readonly server: string readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type McpConnectOutput = voidexport type McpConnectOperation<E = never> = (input: McpConnectInput) => Effect.Effect<McpConnectOutput, E>
export type McpDisconnectInput = { readonly server: string readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type McpDisconnectOutput = voidexport type McpDisconnectOperation<E = never> = (input: McpDisconnectInput) => Effect.Effect<McpDisconnectOutput, E>
export type McpResourceCatalogInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type McpResourceCatalogOutput = { readonly location: Location.Info; readonly data: Mcp.ResourceCatalog }export type McpResourceCatalogOperation<E = never> = ( input?: McpResourceCatalogInput,) => Effect.Effect<McpResourceCatalogOutput, E>
export interface McpApi<E = never> { readonly list: McpListOperation<E> readonly add: McpAddOperation<E> readonly remove: McpRemoveOperation<E> readonly connect: McpConnectOperation<E> readonly disconnect: McpDisconnectOperation<E> readonly resource: { readonly catalog: McpResourceCatalogOperation<E> }}
export type CredentialUpdateInput = { readonly credentialID: Credential.ID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined readonly label: string}export type CredentialUpdateOutput = voidexport type CredentialUpdateOperation<E = never> = ( input: CredentialUpdateInput,) => Effect.Effect<CredentialUpdateOutput, E>
export type CredentialActivateInput = { readonly credentialID: Credential.ID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type CredentialActivateOutput = voidexport type CredentialActivateOperation<E = never> = ( input: CredentialActivateInput,) => Effect.Effect<CredentialActivateOutput, E>
export type CredentialRemoveInput = { readonly credentialID: Credential.ID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type CredentialRemoveOutput = voidexport type CredentialRemoveOperation<E = never> = ( input: CredentialRemoveInput,) => Effect.Effect<CredentialRemoveOutput, E>
export interface CredentialApi<E = never> { readonly update: CredentialUpdateOperation<E> readonly activate: CredentialActivateOperation<E> readonly remove: CredentialRemoveOperation<E>}
export type ProjectListOutput = ReadonlyArray<Project.Info>export type ProjectListOperation<E = never> = () => Effect.Effect<ProjectListOutput, E>
export type ProjectUpdateInput = { readonly projectID: Project.ID readonly name?: string | undefined readonly icon?: Project.Icon | undefined readonly commands?: Project.Commands | undefined}export type ProjectUpdateOutput = Project.Infoexport type ProjectUpdateOperation<E = never> = (input: ProjectUpdateInput) => Effect.Effect<ProjectUpdateOutput, E>
export type ProjectCurrentInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type ProjectCurrentOutput = Project.Currentexport type ProjectCurrentOperation<E = never> = (input?: ProjectCurrentInput) => Effect.Effect<ProjectCurrentOutput, E>
export interface ProjectApi<E = never> { readonly list: ProjectListOperation<E> readonly update: ProjectUpdateOperation<E> readonly current: ProjectCurrentOperation<E>}
export type FormRequestListInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type FormRequestListOutput = { readonly location: Location.Info; readonly data: ReadonlyArray<Form.Info> }export type FormRequestListOperation<E = never> = ( input?: FormRequestListInput,) => Effect.Effect<FormRequestListOutput, E>
export type FormListInput = { readonly sessionID: string }export type FormListOutput = ReadonlyArray<Form.Info>export type FormListOperation<E = never> = (input: FormListInput) => Effect.Effect<FormListOutput, E>
export type FormCreateInput = { readonly sessionID: string readonly id?: Form.ID | undefined readonly title: string readonly metadata?: Form.Metadata | undefined readonly fields: Form.Fields}export type FormCreateOutput = Form.Infoexport type FormCreateOperation<E = never> = (input: FormCreateInput) => Effect.Effect<FormCreateOutput, E>
export type FormGetInput = { readonly sessionID: string; readonly formID: Form.ID }export type FormGetOutput = Form.Infoexport type FormGetOperation<E = never> = (input: FormGetInput) => Effect.Effect<FormGetOutput, E>
export type FormStateInput = { readonly sessionID: string; readonly formID: Form.ID }export type FormStateOutput = Form.Stateexport type FormStateOperation<E = never> = (input: FormStateInput) => Effect.Effect<FormStateOutput, E>
export type FormReplyInput = { readonly sessionID: string; readonly formID: Form.ID; readonly answer: Form.Answer }export type FormReplyOutput = voidexport type FormReplyOperation<E = never> = (input: FormReplyInput) => Effect.Effect<FormReplyOutput, E>
export type FormCancelInput = { readonly sessionID: string; readonly formID: Form.ID }export type FormCancelOutput = voidexport type FormCancelOperation<E = never> = (input: FormCancelInput) => Effect.Effect<FormCancelOutput, E>
export interface FormApi<E = never> { readonly request: { readonly list: FormRequestListOperation<E> } readonly list: FormListOperation<E> readonly create: FormCreateOperation<E> readonly get: FormGetOperation<E> readonly state: FormStateOperation<E> readonly reply: FormReplyOperation<E> readonly cancel: FormCancelOperation<E>}
export type PermissionRequestListInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type PermissionRequestListOutput = { readonly location: Location.Info readonly data: ReadonlyArray<Permission.Request>}export type PermissionRequestListOperation<E = never> = ( input?: PermissionRequestListInput,) => Effect.Effect<PermissionRequestListOutput, E>
export type PermissionSavedListInput = { readonly projectID?: Project.ID | undefined }export type PermissionSavedListOutput = ReadonlyArray<PermissionSaved.Info>export type PermissionSavedListOperation<E = never> = ( input?: PermissionSavedListInput,) => Effect.Effect<PermissionSavedListOutput, E>
export type PermissionSavedRemoveInput = { readonly id: PermissionSaved.ID }export type PermissionSavedRemoveOutput = voidexport type PermissionSavedRemoveOperation<E = never> = ( input: PermissionSavedRemoveInput,) => Effect.Effect<PermissionSavedRemoveOutput, E>
export type PermissionCreateInput = { readonly sessionID: Session.ID readonly id?: Permission.ID | undefined readonly action: string readonly resources: ReadonlyArray<string> readonly save?: ReadonlyArray<string> | 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<E = never> = ( input: PermissionCreateInput,) => Effect.Effect<PermissionCreateOutput, E>
export type PermissionListInput = { readonly sessionID: Session.ID }export type PermissionListOutput = ReadonlyArray<Permission.Request>export type PermissionListOperation<E = never> = (input: PermissionListInput) => Effect.Effect<PermissionListOutput, E>
export type PermissionGetInput = { readonly sessionID: Session.ID; readonly requestID: Permission.ID }export type PermissionGetOutput = Permission.Requestexport type PermissionGetOperation<E = never> = (input: PermissionGetInput) => Effect.Effect<PermissionGetOutput, E>
export type PermissionReplyInput = { readonly sessionID: Session.ID readonly requestID: Permission.ID readonly reply: Permission.Reply readonly message?: string | undefined}export type PermissionReplyOutput = voidexport type PermissionReplyOperation<E = never> = ( input: PermissionReplyInput,) => Effect.Effect<PermissionReplyOutput, E>
export interface PermissionApi<E = never> { readonly request: { readonly list: PermissionRequestListOperation<E> } readonly saved: { readonly list: PermissionSavedListOperation<E>; readonly remove: PermissionSavedRemoveOperation<E> } readonly create: PermissionCreateOperation<E> readonly list: PermissionListOperation<E> readonly get: PermissionGetOperation<E> readonly reply: PermissionReplyOperation<E>}
export type FileListInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined readonly path?: RelativePath | undefined}export type FileListOutput = { readonly location: Location.Info; readonly data: ReadonlyArray<FileSystem.Entry> }export type FileListOperation<E = never> = (input?: FileListInput) => Effect.Effect<FileListOutput, E>
export type FileFindInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined readonly query: string readonly type?: "file" | "directory" | undefined readonly limit?: number | undefined}export type FileFindOutput = { readonly location: Location.Info; readonly data: ReadonlyArray<FileSystem.Entry> }export type FileFindOperation<E = never> = (input: FileFindInput) => Effect.Effect<FileFindOutput, E>
export interface FileApi<E = never> { readonly list: FileListOperation<E> readonly find: FileFindOperation<E>}
export type CommandListInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type CommandListOutput = { readonly location: Location.Info; readonly data: ReadonlyArray<Command.Info> }export type CommandListOperation<E = never> = (input?: CommandListInput) => Effect.Effect<CommandListOutput, E>
export interface CommandApi<E = never> { readonly list: CommandListOperation<E>}
export type SkillListInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type SkillListOutput = { readonly location: Location.Info; readonly data: ReadonlyArray<Skill.Info> }export type SkillListOperation<E = never> = (input?: SkillListInput) => Effect.Effect<SkillListOutput, E>
export interface SkillApi<E = never> { readonly list: SkillListOperation<E>}
export type EventSubscribeOutput = OpenCodeEventexport type EventSubscribeOperation<E = never> = () => Stream.Stream<EventSubscribeOutput, E>
export interface EventApi<E = never> { readonly subscribe: EventSubscribeOperation<E>}
export type PtyListInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type PtyListOutput = { readonly location: Location.Info; readonly data: ReadonlyArray<Pty.Info> }export type PtyListOperation<E = never> = (input?: PtyListInput) => Effect.Effect<PtyListOutput, E>
export type PtyCreateInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined readonly command?: string | undefined readonly args?: ReadonlyArray<string> | undefined readonly cwd?: string | undefined readonly title?: string | undefined readonly env?: { readonly [x: string]: string } | undefined}export type PtyCreateOutput = { readonly location: Location.Info; readonly data: Pty.Info }export type PtyCreateOperation<E = never> = (input?: PtyCreateInput) => Effect.Effect<PtyCreateOutput, E>
export type PtyGetInput = { readonly ptyID: Pty.ID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type PtyGetOutput = { readonly location: Location.Info; readonly data: Pty.Info }export type PtyGetOperation<E = never> = (input: PtyGetInput) => Effect.Effect<PtyGetOutput, E>
export type PtyUpdateInput = { readonly ptyID: Pty.ID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined readonly title?: string | undefined readonly size?: { readonly rows: number; readonly cols: number } | undefined}export type PtyUpdateOutput = { readonly location: Location.Info; readonly data: Pty.Info }export type PtyUpdateOperation<E = never> = (input: PtyUpdateInput) => Effect.Effect<PtyUpdateOutput, E>
export type PtyRemoveInput = { readonly ptyID: Pty.ID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type PtyRemoveOutput = voidexport type PtyRemoveOperation<E = never> = (input: PtyRemoveInput) => Effect.Effect<PtyRemoveOutput, E>
export type PtyConnectTokenInput = { readonly ptyID: Pty.ID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined readonly "x-opencode-ticket"?: string | undefined}export type PtyConnectTokenOutput = { readonly location: Location.Info; readonly data: PtyTicket.ConnectToken }export type PtyConnectTokenOperation<E = never> = ( input: PtyConnectTokenInput,) => Effect.Effect<PtyConnectTokenOutput, E>
export interface PtyApi<E = never> { readonly list: PtyListOperation<E> readonly create: PtyCreateOperation<E> readonly get: PtyGetOperation<E> readonly update: PtyUpdateOperation<E> readonly remove: PtyRemoveOperation<E> readonly connect: { readonly token: PtyConnectTokenOperation<E> }}
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 } }} | nullexport type ExperimentalPersistentPtyReadOperation<E = never> = ( input: ExperimentalPersistentPtyReadInput,) => Effect.Effect<ExperimentalPersistentPtyReadOutput, E>
export type ExperimentalPersistentPtyListInput = { readonly sessionID: Session.ID }export type ExperimentalPersistentPtyListOutput = ReadonlyArray<{ readonly id: Pty.ID readonly title: string readonly command: string readonly args: ReadonlyArray<string> readonly cwd: string readonly status: "running" | "exited" readonly pid: number readonly exitCode?: number | undefined readonly sessionID: Session.ID readonly foregroundProcess: string | null readonly size: { readonly cols: number; readonly rows: number } readonly output: { readonly head: number; readonly tail: number }}>export type ExperimentalPersistentPtyListOperation<E = never> = ( input: ExperimentalPersistentPtyListInput,) => Effect.Effect<ExperimentalPersistentPtyListOutput, E>
export type ExperimentalPersistentPtyCreateInput = { readonly sessionID: Session.ID readonly command?: string | undefined readonly args: ReadonlyArray<string> 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<string> readonly cwd: string readonly status: "running" | "exited" readonly pid: number readonly exitCode?: number | undefined readonly sessionID: Session.ID readonly foregroundProcess: string | null readonly size: { readonly cols: number; readonly rows: number } readonly output: { readonly head: number; readonly tail: number }}export type ExperimentalPersistentPtyCreateOperation<E = never> = ( input: ExperimentalPersistentPtyCreateInput,) => Effect.Effect<ExperimentalPersistentPtyCreateOutput, E>
export type ExperimentalPersistentPtyShutdownOutput = voidexport type ExperimentalPersistentPtyShutdownOperation<E = never> = () => 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<E = never> = () => 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<string> readonly cwd: string readonly status: "running" | "exited" readonly pid: number readonly exitCode?: number | undefined readonly sessionID: Session.ID readonly foregroundProcess: string | null readonly size: { readonly cols: number; readonly rows: number } readonly output: { readonly head: number; readonly tail: number }}export type ExperimentalPersistentPtyGetOperation<E = never> = ( input: ExperimentalPersistentPtyGetInput,) => Effect.Effect<ExperimentalPersistentPtyGetOutput, E>
export type ExperimentalPersistentPtyUpdateInput = { readonly ptyID: Pty.ID readonly attachmentID?: string | undefined readonly size: { readonly cols: number; readonly rows: number }}export type ExperimentalPersistentPtyUpdateOutput = { readonly id: Pty.ID readonly title: string readonly command: string readonly args: ReadonlyArray<string> readonly cwd: string readonly status: "running" | "exited" readonly pid: number readonly exitCode?: number | undefined readonly sessionID: Session.ID readonly foregroundProcess: string | null readonly size: { readonly cols: number; readonly rows: number } readonly output: { readonly head: number; readonly tail: number }}export type ExperimentalPersistentPtyUpdateOperation<E = never> = ( input: ExperimentalPersistentPtyUpdateInput,) => Effect.Effect<ExperimentalPersistentPtyUpdateOutput, E>
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<string> readonly cwd: string readonly status: "running" | "exited" readonly pid: number readonly exitCode?: number | undefined readonly sessionID: Session.ID 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<E = never> = ( input: ExperimentalPersistentPtySnapshotInput,) => Effect.Effect<ExperimentalPersistentPtySnapshotOutput, E>
export type ExperimentalPersistentPtyRemoveInput = { readonly ptyID: Pty.ID }export type ExperimentalPersistentPtyRemoveOutput = voidexport type ExperimentalPersistentPtyRemoveOperation<E = never> = ( input: ExperimentalPersistentPtyRemoveInput,) => Effect.Effect<ExperimentalPersistentPtyRemoveOutput, E>
export type ExperimentalPersistentPtyConnectTokenInput = { readonly ptyID: Pty.ID readonly "x-opencode-ticket"?: string | undefined}export type ExperimentalPersistentPtyConnectTokenOutput = PtyTicket.ConnectTokenexport type ExperimentalPersistentPtyConnectTokenOperation<E = never> = ( input: ExperimentalPersistentPtyConnectTokenInput,) => Effect.Effect<ExperimentalPersistentPtyConnectTokenOutput, E>
export interface ExperimentalApi<E = never> { readonly persistentPty: { readonly read: ExperimentalPersistentPtyReadOperation<E> readonly list: ExperimentalPersistentPtyListOperation<E> readonly create: ExperimentalPersistentPtyCreateOperation<E> readonly shutdown: ExperimentalPersistentPtyShutdownOperation<E> readonly handoff: ExperimentalPersistentPtyHandoffOperation<E> readonly get: ExperimentalPersistentPtyGetOperation<E> readonly update: ExperimentalPersistentPtyUpdateOperation<E> readonly snapshot: ExperimentalPersistentPtySnapshotOperation<E> readonly remove: ExperimentalPersistentPtyRemoveOperation<E> readonly connectToken: ExperimentalPersistentPtyConnectTokenOperation<E> }}
export type ShellListInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type ShellListOutput = { readonly location: Location.Info; readonly data: ReadonlyArray<Shell.Info> }export type ShellListOperation<E = never> = (input?: ShellListInput) => Effect.Effect<ShellListOutput, E>
export type ShellCreateInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined readonly command: string readonly cwd?: string | undefined readonly timeout: number readonly metadata?: { readonly [x: string]: unknown } | undefined}export type ShellCreateOutput = { readonly location: Location.Info; readonly data: Shell.Info }export type ShellCreateOperation<E = never> = (input: ShellCreateInput) => Effect.Effect<ShellCreateOutput, E>
export type ShellGetInput = { readonly id: Shell.ID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type ShellGetOutput = { readonly location: Location.Info; readonly data: Shell.Info }export type ShellGetOperation<E = never> = (input: ShellGetInput) => Effect.Effect<ShellGetOutput, E>
export type ShellTimeoutInput = { readonly id: Shell.ID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined readonly timeout: number}export type ShellTimeoutOutput = { readonly location: Location.Info; readonly data: Shell.Info }export type ShellTimeoutOperation<E = never> = (input: ShellTimeoutInput) => Effect.Effect<ShellTimeoutOutput, E>
export type ShellOutputInput = { readonly id: Shell.ID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined readonly cursor?: number | undefined readonly limit?: number | undefined}export type ShellOutputOutput = { readonly location: Location.Info readonly data: { readonly output: string readonly cursor: number readonly size: number readonly truncated: boolean }}export type ShellOutputOperation<E = never> = (input: ShellOutputInput) => Effect.Effect<ShellOutputOutput, E>
export type ShellRemoveInput = { readonly id: Shell.ID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type ShellRemoveOutput = voidexport type ShellRemoveOperation<E = never> = (input: ShellRemoveInput) => Effect.Effect<ShellRemoveOutput, E>
export interface ShellApi<E = never> { readonly list: ShellListOperation<E> readonly create: ShellCreateOperation<E> readonly get: ShellGetOperation<E> readonly timeout: ShellTimeoutOperation<E> readonly output: ShellOutputOperation<E> readonly remove: ShellRemoveOperation<E>}
export type ReferenceListInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type ReferenceListOutput = { readonly location: Location.Info; readonly data: ReadonlyArray<Reference.Info> }export type ReferenceListOperation<E = never> = (input?: ReferenceListInput) => Effect.Effect<ReferenceListOutput, E>
export interface ReferenceApi<E = never> { readonly list: ReferenceListOperation<E>}
export type WorktreeListInput = { readonly projectID: Project.ID }export type WorktreeListOutput = Worktree.Listexport type WorktreeListOperation<E = never> = (input: WorktreeListInput) => Effect.Effect<WorktreeListOutput, E>
export type WorktreeCreateInput = { readonly projectID: Project.ID readonly strategy: Worktree.StrategyID readonly from?: AbsolutePath | undefined readonly branch?: string | undefined readonly directory: AbsolutePath readonly name?: string | undefined}export type WorktreeCreateOutput = Worktree.Infoexport type WorktreeCreateOperation<E = never> = (input: WorktreeCreateInput) => Effect.Effect<WorktreeCreateOutput, E>
export type WorktreeRemoveInput = { readonly projectID: Project.ID readonly directory: AbsolutePath readonly force: boolean}export type WorktreeRemoveOutput = voidexport type WorktreeRemoveOperation<E = never> = (input: WorktreeRemoveInput) => Effect.Effect<WorktreeRemoveOutput, E>
export type WorktreeRefreshInput = { readonly projectID: Project.ID }export type WorktreeRefreshOutput = voidexport type WorktreeRefreshOperation<E = never> = ( input: WorktreeRefreshInput,) => Effect.Effect<WorktreeRefreshOutput, E>
export interface WorktreeApi<E = never> { readonly list: WorktreeListOperation<E> readonly create: WorktreeCreateOperation<E> readonly remove: WorktreeRemoveOperation<E> readonly refresh: WorktreeRefreshOperation<E>}
export type WorkspaceCreateInput = { readonly id?: Workspace.ID | undefined; readonly provider: string }export type WorkspaceCreateOutput = Workspace.IDexport type WorkspaceCreateOperation<E = never> = ( input: WorkspaceCreateInput,) => Effect.Effect<WorkspaceCreateOutput, E>
export type WorkspaceDestroyInput = { readonly workspaceID: Workspace.ID }export type WorkspaceDestroyOutput = Workspace.DestroyResultexport type WorkspaceDestroyOperation<E = never> = ( input: WorkspaceDestroyInput,) => Effect.Effect<WorkspaceDestroyOutput, E>
export interface WorkspaceApi<E = never> { readonly create: WorkspaceCreateOperation<E> readonly destroy: WorkspaceDestroyOperation<E>}
export type VcsGetInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type VcsGetOutput = { readonly location: Location.Info; readonly data: Vcs.Info }export type VcsGetOperation<E = never> = (input?: VcsGetInput) => Effect.Effect<VcsGetOutput, E>
export type VcsBaseInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type VcsBaseOutput = { readonly location: Location.Info; readonly data: Vcs.Base | null }export type VcsBaseOperation<E = never> = (input?: VcsBaseInput) => Effect.Effect<VcsBaseOutput, E>
export type VcsStatusInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type VcsStatusOutput = { readonly location: Location.Info; readonly data: ReadonlyArray<Vcs.FileStatus> }export type VcsStatusOperation<E = never> = (input?: VcsStatusInput) => Effect.Effect<VcsStatusOutput, E>
export type VcsBranchesInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined readonly search?: string | undefined readonly limit?: number | undefined}export type VcsBranchesOutput = { readonly location: Location.Info; readonly data: Vcs.BranchList }export type VcsBranchesOperation<E = never> = (input?: VcsBranchesInput) => Effect.Effect<VcsBranchesOutput, E>
export type VcsDiffInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined readonly mode: Vcs.Mode readonly base?: string | undefined readonly context?: number | undefined}export type VcsDiffOutput = { readonly location: Location.Info; readonly data: ReadonlyArray<FileDiff.Info> }export type VcsDiffOperation<E = never> = (input: VcsDiffInput) => Effect.Effect<VcsDiffOutput, E>
export interface VcsApi<E = never> { readonly get: VcsGetOperation<E> readonly base: VcsBaseOperation<E> readonly status: VcsStatusOperation<E> readonly branches: VcsBranchesOperation<E> readonly diff: VcsDiffOperation<E>}
export type DebugLocationListOutput = ReadonlyArray<Location.Ref>export type DebugLocationListOperation<E = never> = () => Effect.Effect<DebugLocationListOutput, E>
export type DebugLocationEvictInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type DebugLocationEvictOutput = voidexport type DebugLocationEvictOperation<E = never> = ( input?: DebugLocationEvictInput,) => Effect.Effect<DebugLocationEvictOutput, E>
export interface DebugApi<E = never> { readonly location: { readonly list: DebugLocationListOperation<E>; readonly evict: DebugLocationEvictOperation<E> }}
export type MigrationV1StatusOutput = | { 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 MigrationV1StatusOperation<E = never> = () => Effect.Effect<MigrationV1StatusOutput, E>
export interface MigrationApi<E = never> { readonly v1: { readonly status: MigrationV1StatusOperation<E> }}
export type WebsearchProvidersInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type WebsearchProvidersOutput = { readonly location: Location.Info readonly data: ReadonlyArray<WebSearch.Provider>}export type WebsearchProvidersOperation<E = never> = ( input?: WebsearchProvidersInput,) => Effect.Effect<WebsearchProvidersOutput, E>
export type WebsearchQueryInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined readonly query: string readonly providerID?: WebSearch.ID | undefined}export type WebsearchQueryOutput = { readonly location: Location.Info; readonly data: WebSearch.Response }export type WebsearchQueryOperation<E = never> = (input: WebsearchQueryInput) => Effect.Effect<WebsearchQueryOutput, E>
export interface WebsearchApi<E = never> { readonly providers: WebsearchProvidersOperation<E> readonly query: WebsearchQueryOperation<E>}
export type ConfigGetInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}export type ConfigGetOutput = ReadonlyArray<Config.Entry>export type ConfigGetOperation<E = never> = (input?: ConfigGetInput) => Effect.Effect<ConfigGetOutput, E>
export interface ConfigApi<E = never> { readonly get: ConfigGetOperation<E>}
export interface AppApi<E = never> { readonly health: HealthApi<E> readonly server: ServerApi<E> readonly location: LocationApi<E> readonly agent: AgentApi<E> readonly plugin: PluginApi<E> readonly session: SessionApi<E> readonly message: MessageApi<E> readonly model: ModelApi<E> readonly generate: GenerateApi<E> readonly provider: ProviderApi<E> readonly integration: IntegrationApi<E> readonly mcp: McpApi<E> readonly credential: CredentialApi<E> readonly project: ProjectApi<E> readonly form: FormApi<E> readonly permission: PermissionApi<E> readonly file: FileApi<E> readonly command: CommandApi<E> readonly skill: SkillApi<E> readonly event: EventApi<E> readonly pty: PtyApi<E> readonly experimental: ExperimentalApi<E> readonly shell: ShellApi<E> readonly reference: ReferenceApi<E> readonly worktree: WorktreeApi<E> readonly workspace: WorkspaceApi<E> readonly vcs: VcsApi<E> readonly debug: DebugApi<E> readonly migration: MigrationApi<E> readonly websearch: WebsearchApi<E> readonly config: ConfigApi<E>}