openAgent
gitlabThe open source UNIVERSAL agent.
clone
https://gitlab.com/bitzzdev/openAgent.gitAIagentautomationopen-sourceuniversal-agent
import type { OpenCodeEventEncoded } from "@opencode-ai/protocol/groups/event"export type JsonValue =| null| boolean| number| string| ReadonlyArray<JsonValue>| { readonly [key: string]: JsonValue }export type UnauthorizedError = { readonly _tag: "UnauthorizedError"; readonly message: string }export const isUnauthorizedError = (value: unknown): value is UnauthorizedError =>typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "UnauthorizedError"export type InvalidRequestError = {readonly _tag: "InvalidRequestError"readonly message: stringreadonly kind?: string | undefinedreadonly field?: string | undefined}export const isInvalidRequestError = (value: unknown): value is InvalidRequestError =>typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "InvalidRequestError"export type InvalidCursorError = { readonly _tag: "InvalidCursorError"; readonly message: string }export const isInvalidCursorError = (value: unknown): value is InvalidCursorError =>typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "InvalidCursorError"export type SessionNotFoundError = {readonly _tag: "SessionNotFoundError"readonly sessionID: stringreadonly message: string}export const isSessionNotFoundError = (value: unknown): value is SessionNotFoundError =>typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "SessionNotFoundError"export type ConflictError = {readonly _tag: "ConflictError"readonly message: stringreadonly resource?: string | undefined}export const isConflictError = (value: unknown): value is ConflictError =>typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "ConflictError"export type ServiceUnavailableError = {readonly _tag: "ServiceUnavailableError"readonly message: stringreadonly service?: string | undefined}export const isServiceUnavailableError = (value: unknown): value is ServiceUnavailableError =>typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "ServiceUnavailableError"export type MessageNotFoundError = {readonly _tag: "MessageNotFoundError"readonly sessionID: stringreadonly messageID: stringreadonly message: string}export const isMessageNotFoundError = (value: unknown): value is MessageNotFoundError =>typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "MessageNotFoundError"export type UnknownError = {readonly _tag: "UnknownError"readonly message: stringreadonly ref?: string | undefined}export const isUnknownError = (value: unknown): value is UnknownError =>typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "UnknownError"export type ProviderNotFoundError = {readonly _tag: "ProviderNotFoundError"readonly providerID: stringreadonly message: string}export const isProviderNotFoundError = (value: unknown): value is ProviderNotFoundError =>typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "ProviderNotFoundError"export type PermissionNotFoundError = {readonly _tag: "PermissionNotFoundError"readonly requestID: stringreadonly message: string}export const isPermissionNotFoundError = (value: unknown): value is PermissionNotFoundError =>typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "PermissionNotFoundError"export type PtyNotFoundError = { readonly _tag: "PtyNotFoundError"; readonly ptyID: string; readonly message: string }export const isPtyNotFoundError = (value: unknown): value is PtyNotFoundError =>typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "PtyNotFoundError"export type QuestionNotFoundError = {readonly _tag: "QuestionNotFoundError"readonly requestID: stringreadonly message: string}export const isQuestionNotFoundError = (value: unknown): value is QuestionNotFoundError =>typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "QuestionNotFoundError"export type ProjectCopyError = {readonly name: "ProjectCopyError"readonly data: { readonly message: string; readonly forceRequired?: boolean | undefined }}export const isProjectCopyError = (value: unknown): value is ProjectCopyError =>typeof value === "object" && value !== null && "name" in value && value["name"] === "ProjectCopyError"export type HealthGetOutput = { readonly healthy: true }export type LocationGetInput = {readonly location?: {readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}["location"]}export type LocationGetOutput = {readonly directory: stringreadonly workspaceID?: stringreadonly project: { readonly id: string; readonly directory: string }}export type AgentsListInput = {readonly location?: {readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}["location"]}export type AgentsListOutput = {readonly location: {readonly directory: stringreadonly workspaceID?: stringreadonly project: { readonly id: string; readonly directory: string }}readonly data: ReadonlyArray<{readonly id: stringreadonly model?: { readonly id: string; readonly providerID: string; readonly variant?: string }readonly request: {readonly headers: { readonly [x: string]: string }readonly body: { readonly [x: string]: JsonValue }}readonly system?: stringreadonly description?: stringreadonly mode: "subagent" | "primary" | "all"readonly hidden: booleanreadonly color?: string | "primary" | "secondary" | "accent" | "success" | "warning" | "error" | "info"readonly steps?: numberreadonly permissions: ReadonlyArray<{readonly action: stringreadonly resource: stringreadonly effect: "allow" | "deny" | "ask"}>}>}export type SessionsListInput = {readonly workspace?: {readonly workspace?: string | undefinedreadonly limit?: number | undefinedreadonly order?: "asc" | "desc" | undefinedreadonly search?: string | undefinedreadonly directory?: string | undefinedreadonly project?: string | undefinedreadonly subpath?: string | undefinedreadonly cursor?: string | undefined}["workspace"]readonly limit?: {readonly workspace?: string | undefinedreadonly limit?: number | undefinedreadonly order?: "asc" | "desc" | undefinedreadonly search?: string | undefinedreadonly directory?: string | undefinedreadonly project?: string | undefinedreadonly subpath?: string | undefinedreadonly cursor?: string | undefined}["limit"]readonly order?: {readonly workspace?: string | undefinedreadonly limit?: number | undefinedreadonly order?: "asc" | "desc" | undefinedreadonly search?: string | undefinedreadonly directory?: string | undefinedreadonly project?: string | undefinedreadonly subpath?: string | undefinedreadonly cursor?: string | undefined}["order"]readonly search?: {readonly workspace?: string | undefinedreadonly limit?: number | undefinedreadonly order?: "asc" | "desc" | undefinedreadonly search?: string | undefinedreadonly directory?: string | undefinedreadonly project?: string | undefinedreadonly subpath?: string | undefinedreadonly cursor?: string | undefined}["search"]readonly directory?: {readonly workspace?: string | undefinedreadonly limit?: number | undefinedreadonly order?: "asc" | "desc" | undefinedreadonly search?: string | undefinedreadonly directory?: string | undefinedreadonly project?: string | undefinedreadonly subpath?: string | undefinedreadonly cursor?: string | undefined}["directory"]readonly project?: {readonly workspace?: string | undefinedreadonly limit?: number | undefinedreadonly order?: "asc" | "desc" | undefinedreadonly search?: string | undefinedreadonly directory?: string | undefinedreadonly project?: string | undefinedreadonly subpath?: string | undefinedreadonly cursor?: string | undefined}["project"]readonly subpath?: {readonly workspace?: string | undefinedreadonly limit?: number | undefinedreadonly order?: "asc" | "desc" | undefinedreadonly search?: string | undefinedreadonly directory?: string | undefinedreadonly project?: string | undefinedreadonly subpath?: string | undefinedreadonly cursor?: string | undefined}["subpath"]readonly cursor?: {readonly workspace?: string | undefinedreadonly limit?: number | undefinedreadonly order?: "asc" | "desc" | undefinedreadonly search?: string | undefinedreadonly directory?: string | undefinedreadonly project?: string | undefinedreadonly subpath?: string | undefinedreadonly cursor?: string | undefined}["cursor"]}export type SessionsListOutput = {readonly data: ReadonlyArray<{readonly id: stringreadonly parentID?: stringreadonly projectID: stringreadonly agent?: stringreadonly model?: { readonly id: string; readonly providerID: string; readonly variant?: string }readonly cost: numberreadonly tokens: {readonly input: numberreadonly output: numberreadonly reasoning: numberreadonly cache: { readonly read: number; readonly write: number }}readonly time: { readonly created: number; readonly updated: number; readonly archived?: number }readonly title: stringreadonly location: { readonly directory: string; readonly workspaceID?: string }readonly subpath?: stringreadonly revert?: {readonly messageID: stringreadonly partID?: stringreadonly snapshot?: stringreadonly diff?: stringreadonly files?: ReadonlyArray<{readonly path: stringreadonly status: "added" | "modified" | "deleted"readonly additions: numberreadonly deletions: numberreadonly patch: string}>}}>readonly cursor: { readonly previous?: string | null; readonly next?: string | null }}export type SessionsCreateInput = {readonly id?: {readonly id?: string | nullreadonly agent?: string | nullreadonly model?: { readonly id: string; readonly providerID: string; readonly variant?: string } | nullreadonly location?: { readonly directory: string; readonly workspaceID?: string } | null}["id"]readonly agent?: {readonly id?: string | nullreadonly agent?: string | nullreadonly model?: { readonly id: string; readonly providerID: string; readonly variant?: string } | nullreadonly location?: { readonly directory: string; readonly workspaceID?: string } | null}["agent"]readonly model?: {readonly id?: string | nullreadonly agent?: string | nullreadonly model?: { readonly id: string; readonly providerID: string; readonly variant?: string } | nullreadonly location?: { readonly directory: string; readonly workspaceID?: string } | null}["model"]readonly location?: {readonly id?: string | nullreadonly agent?: string | nullreadonly model?: { readonly id: string; readonly providerID: string; readonly variant?: string } | nullreadonly location?: { readonly directory: string; readonly workspaceID?: string } | null}["location"]}export type SessionsCreateOutput = {readonly data: {readonly id: stringreadonly parentID?: stringreadonly projectID: stringreadonly agent?: stringreadonly model?: { readonly id: string; readonly providerID: string; readonly variant?: string }readonly cost: numberreadonly tokens: {readonly input: numberreadonly output: numberreadonly reasoning: numberreadonly cache: { readonly read: number; readonly write: number }}readonly time: { readonly created: number; readonly updated: number; readonly archived?: number }readonly title: stringreadonly location: { readonly directory: string; readonly workspaceID?: string }readonly subpath?: stringreadonly revert?: {readonly messageID: stringreadonly partID?: stringreadonly snapshot?: stringreadonly diff?: stringreadonly files?: ReadonlyArray<{readonly path: stringreadonly status: "added" | "modified" | "deleted"readonly additions: numberreadonly deletions: numberreadonly patch: string}>}}}["data"]export type SessionsActiveOutput = { readonly data: { readonly [x: string]: { readonly type: "running" } } }["data"]export type SessionsGetInput = { readonly sessionID: { readonly sessionID: string }["sessionID"] }export type SessionsGetOutput = {readonly data: {readonly id: stringreadonly parentID?: stringreadonly projectID: stringreadonly agent?: stringreadonly model?: { readonly id: string; readonly providerID: string; readonly variant?: string }readonly cost: numberreadonly tokens: {readonly input: numberreadonly output: numberreadonly reasoning: numberreadonly cache: { readonly read: number; readonly write: number }}readonly time: { readonly created: number; readonly updated: number; readonly archived?: number }readonly title: stringreadonly location: { readonly directory: string; readonly workspaceID?: string }readonly subpath?: stringreadonly revert?: {readonly messageID: stringreadonly partID?: stringreadonly snapshot?: stringreadonly diff?: stringreadonly files?: ReadonlyArray<{readonly path: stringreadonly status: "added" | "modified" | "deleted"readonly additions: numberreadonly deletions: numberreadonly patch: string}>}}}["data"]export type SessionsSwitchAgentInput = {readonly sessionID: { readonly sessionID: string }["sessionID"]readonly agent: { readonly agent: string }["agent"]}export type SessionsSwitchAgentOutput = voidexport type SessionsSwitchModelInput = {readonly sessionID: { readonly sessionID: string }["sessionID"]readonly model: {readonly model: { readonly id: string; readonly providerID: string; readonly variant?: string }}["model"]}export type SessionsSwitchModelOutput = voidexport type SessionsPromptInput = {readonly sessionID: { readonly sessionID: string }["sessionID"]readonly id?: {readonly id?: string | nullreadonly prompt: {readonly text: stringreadonly files?: ReadonlyArray<{readonly uri: stringreadonly name?: stringreadonly description?: stringreadonly source?: { readonly start: number; readonly end: number; readonly text: string }}>readonly agents?: ReadonlyArray<{readonly name: stringreadonly source?: { readonly start: number; readonly end: number; readonly text: string }}>}readonly delivery?: "steer" | "queue" | nullreadonly resume?: boolean | null}["id"]readonly prompt: {readonly id?: string | nullreadonly prompt: {readonly text: stringreadonly files?: ReadonlyArray<{readonly uri: stringreadonly name?: stringreadonly description?: stringreadonly source?: { readonly start: number; readonly end: number; readonly text: string }}>readonly agents?: ReadonlyArray<{readonly name: stringreadonly source?: { readonly start: number; readonly end: number; readonly text: string }}>}readonly delivery?: "steer" | "queue" | nullreadonly resume?: boolean | null}["prompt"]readonly delivery?: {readonly id?: string | nullreadonly prompt: {readonly text: stringreadonly files?: ReadonlyArray<{readonly uri: stringreadonly name?: stringreadonly description?: stringreadonly source?: { readonly start: number; readonly end: number; readonly text: string }}>readonly agents?: ReadonlyArray<{readonly name: stringreadonly source?: { readonly start: number; readonly end: number; readonly text: string }}>}readonly delivery?: "steer" | "queue" | nullreadonly resume?: boolean | null}["delivery"]readonly resume?: {readonly id?: string | nullreadonly prompt: {readonly text: stringreadonly files?: ReadonlyArray<{readonly uri: stringreadonly name?: stringreadonly description?: stringreadonly source?: { readonly start: number; readonly end: number; readonly text: string }}>readonly agents?: ReadonlyArray<{readonly name: stringreadonly source?: { readonly start: number; readonly end: number; readonly text: string }}>}readonly delivery?: "steer" | "queue" | nullreadonly resume?: boolean | null}["resume"]}export type SessionsPromptOutput = {readonly data: {readonly admittedSeq: numberreadonly id: stringreadonly sessionID: stringreadonly prompt: {readonly text: stringreadonly files?: ReadonlyArray<{readonly uri: stringreadonly mime: stringreadonly name?: stringreadonly description?: stringreadonly source?: { readonly start: number; readonly end: number; readonly text: string }}>readonly agents?: ReadonlyArray<{readonly name: stringreadonly source?: { readonly start: number; readonly end: number; readonly text: string }}>}readonly delivery: "steer" | "queue"readonly timeCreated: numberreadonly promotedSeq?: number}}["data"]export type SessionsCompactInput = { readonly sessionID: { readonly sessionID: string }["sessionID"] }export type SessionsCompactOutput = voidexport type SessionsWaitInput = { readonly sessionID: { readonly sessionID: string }["sessionID"] }export type SessionsWaitOutput = voidexport type SessionsStageInput = {readonly sessionID: { readonly sessionID: string }["sessionID"]readonly messageID: { readonly messageID: string; readonly files?: boolean | undefined }["messageID"]readonly files?: { readonly messageID: string; readonly files?: boolean | undefined }["files"]}export type SessionsStageOutput = {readonly data: {readonly messageID: stringreadonly partID?: stringreadonly snapshot?: stringreadonly diff?: stringreadonly files?: ReadonlyArray<{readonly path: stringreadonly status: "added" | "modified" | "deleted"readonly additions: numberreadonly deletions: numberreadonly patch: string}>}}["data"]export type SessionsClearInput = { readonly sessionID: { readonly sessionID: string }["sessionID"] }export type SessionsClearOutput = voidexport type SessionsCommitInput = { readonly sessionID: { readonly sessionID: string }["sessionID"] }export type SessionsCommitOutput = voidexport type SessionsContextInput = { readonly sessionID: { readonly sessionID: string }["sessionID"] }export type SessionsContextOutput = {readonly data: ReadonlyArray<| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly time: { readonly created: number }readonly type: "agent-switched"readonly agent: string}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly time: { readonly created: number }readonly type: "model-switched"readonly model: { readonly id: string; readonly providerID: string; readonly variant?: string }}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly time: { readonly created: number }readonly text: stringreadonly files?: ReadonlyArray<{readonly uri: stringreadonly mime: stringreadonly name?: stringreadonly description?: stringreadonly source?: { readonly start: number; readonly end: number; readonly text: string }}>readonly agents?: ReadonlyArray<{readonly name: stringreadonly source?: { readonly start: number; readonly end: number; readonly text: string }}>readonly type: "user"}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly time: { readonly created: number }readonly sessionID: stringreadonly text: stringreadonly type: "synthetic"}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly time: { readonly created: number }readonly type: "system"readonly text: string}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly time: { readonly created: number; readonly completed?: number }readonly type: "shell"readonly callID: stringreadonly command: stringreadonly output: string}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly time: { readonly created: number; readonly completed?: number }readonly type: "assistant"readonly agent: stringreadonly model: { readonly id: string; readonly providerID: string; readonly variant?: string }readonly content: ReadonlyArray<| { readonly type: "text"; readonly id: string; readonly text: string }| {readonly type: "reasoning"readonly id: stringreadonly text: stringreadonly providerMetadata?: { readonly [x: string]: { readonly [x: string]: JsonValue } }readonly time?: { readonly created: number; readonly completed?: number }}| {readonly type: "tool"readonly id: stringreadonly name: stringreadonly provider?: {readonly executed: booleanreadonly metadata?: { readonly [x: string]: { readonly [x: string]: JsonValue } }readonly resultMetadata?: { readonly [x: string]: { readonly [x: string]: JsonValue } }}readonly state:| { readonly status: "pending"; readonly input: string }| {readonly status: "running"readonly input: { readonly [x: string]: JsonValue }readonly structured: { readonly [x: string]: JsonValue }readonly content: ReadonlyArray<| { readonly type: "text"; readonly text: string }| { readonly type: "file"; readonly uri: string; readonly mime: string; readonly name?: string }>}| {readonly status: "completed"readonly input: { readonly [x: string]: JsonValue }readonly attachments?: ReadonlyArray<{readonly uri: stringreadonly mime: stringreadonly name?: stringreadonly description?: stringreadonly source?: { readonly start: number; readonly end: number; readonly text: string }}>readonly content: ReadonlyArray<| { readonly type: "text"; readonly text: string }| { readonly type: "file"; readonly uri: string; readonly mime: string; readonly name?: string }>readonly outputPaths?: ReadonlyArray<string>readonly structured: { readonly [x: string]: JsonValue }readonly result?: JsonValue}| {readonly status: "error"readonly input: { readonly [x: string]: JsonValue }readonly content: ReadonlyArray<| { readonly type: "text"; readonly text: string }| { readonly type: "file"; readonly uri: string; readonly mime: string; readonly name?: string }>readonly structured: { readonly [x: string]: JsonValue }readonly error: { readonly type: "unknown"; readonly message: string }readonly result?: JsonValue}readonly time: {readonly created: numberreadonly ran?: numberreadonly completed?: numberreadonly pruned?: number}}>readonly snapshot?: { readonly start?: string; readonly end?: string; readonly files?: ReadonlyArray<string> }readonly finish?: stringreadonly cost?: numberreadonly tokens?: {readonly input: numberreadonly output: numberreadonly reasoning: numberreadonly cache: { readonly read: number; readonly write: number }}readonly error?: { readonly type: "unknown"; readonly message: string }}| {readonly type: "compaction"readonly reason: "auto" | "manual"readonly summary: stringreadonly recent: stringreadonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly time: { readonly created: number }}>}["data"]export type SessionsHistoryInput = {readonly sessionID: { readonly sessionID: string }["sessionID"]readonly limit?: { readonly limit?: number | undefined; readonly after?: number | undefined }["limit"]readonly after?: { readonly limit?: number | undefined; readonly after?: number | undefined }["after"]}export type SessionsHistoryOutput = {readonly data: ReadonlyArray<| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly type: "session.next.agent.switched"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly messageID: stringreadonly agent: string}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly type: "session.next.model.switched"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly messageID: stringreadonly model: { readonly id: string; readonly providerID: string; readonly variant?: string }}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly type: "session.next.moved"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly location: { readonly directory: string; readonly workspaceID?: string }readonly subdirectory?: string}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly type: "session.next.prompted"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly messageID: stringreadonly prompt: {readonly text: stringreadonly files?: ReadonlyArray<{readonly uri: stringreadonly mime: stringreadonly name?: stringreadonly description?: stringreadonly source?: { readonly start: number; readonly end: number; readonly text: string }}>readonly agents?: ReadonlyArray<{readonly name: stringreadonly source?: { readonly start: number; readonly end: number; readonly text: string }}>}readonly delivery: "steer" | "queue"}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly type: "session.next.prompt.admitted"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly messageID: stringreadonly prompt: {readonly text: stringreadonly files?: ReadonlyArray<{readonly uri: stringreadonly mime: stringreadonly name?: stringreadonly description?: stringreadonly source?: { readonly start: number; readonly end: number; readonly text: string }}>readonly agents?: ReadonlyArray<{readonly name: stringreadonly source?: { readonly start: number; readonly end: number; readonly text: string }}>}readonly delivery: "steer" | "queue"}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly type: "session.next.context.updated"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly messageID: stringreadonly text: string}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly type: "session.next.synthetic"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly messageID: stringreadonly text: string}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly type: "session.next.shell.started"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly messageID: stringreadonly callID: stringreadonly command: string}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly type: "session.next.shell.ended"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly callID: stringreadonly output: string}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly type: "session.next.step.started"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly assistantMessageID: stringreadonly agent: stringreadonly model: { readonly id: string; readonly providerID: string; readonly variant?: string }readonly snapshot?: string}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly type: "session.next.step.ended"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly assistantMessageID: stringreadonly finish: stringreadonly cost: numberreadonly tokens: {readonly input: numberreadonly output: numberreadonly reasoning: numberreadonly cache: { readonly read: number; readonly write: number }}readonly snapshot?: stringreadonly files?: ReadonlyArray<string>}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly type: "session.next.step.failed"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly assistantMessageID: stringreadonly error: { readonly type: "unknown"; readonly message: string }}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly type: "session.next.text.started"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly assistantMessageID: stringreadonly textID: string}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly type: "session.next.text.ended"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly assistantMessageID: stringreadonly textID: stringreadonly text: string}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly type: "session.next.tool.input.started"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly assistantMessageID: stringreadonly callID: stringreadonly name: string}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly type: "session.next.tool.input.ended"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly assistantMessageID: stringreadonly callID: stringreadonly text: string}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly type: "session.next.tool.called"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly assistantMessageID: stringreadonly callID: stringreadonly tool: stringreadonly input: { readonly [x: string]: JsonValue }readonly provider: {readonly executed: booleanreadonly metadata?: { readonly [x: string]: { readonly [x: string]: JsonValue } }}}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly type: "session.next.tool.progress"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly assistantMessageID: stringreadonly callID: stringreadonly structured: { readonly [x: string]: JsonValue }readonly content: ReadonlyArray<| { readonly type: "text"; readonly text: string }| { readonly type: "file"; readonly uri: string; readonly mime: string; readonly name?: string }>}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly type: "session.next.tool.success"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly assistantMessageID: stringreadonly callID: stringreadonly structured: { readonly [x: string]: JsonValue }readonly content: ReadonlyArray<| { readonly type: "text"; readonly text: string }| { readonly type: "file"; readonly uri: string; readonly mime: string; readonly name?: string }>readonly outputPaths?: ReadonlyArray<string>readonly result?: JsonValuereadonly provider: {readonly executed: booleanreadonly metadata?: { readonly [x: string]: { readonly [x: string]: JsonValue } }}}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly type: "session.next.tool.failed"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly assistantMessageID: stringreadonly callID: stringreadonly error: { readonly type: "unknown"; readonly message: string }readonly result?: JsonValuereadonly provider: {readonly executed: booleanreadonly metadata?: { readonly [x: string]: { readonly [x: string]: JsonValue } }}}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly type: "session.next.reasoning.started"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly assistantMessageID: stringreadonly reasoningID: stringreadonly providerMetadata?: { readonly [x: string]: { readonly [x: string]: JsonValue } }}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly type: "session.next.reasoning.ended"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly assistantMessageID: stringreadonly reasoningID: stringreadonly text: stringreadonly providerMetadata?: { readonly [x: string]: { readonly [x: string]: JsonValue } }}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly type: "session.next.retried"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly attempt: numberreadonly error: {readonly message: stringreadonly statusCode?: numberreadonly isRetryable: booleanreadonly responseHeaders?: { readonly [x: string]: string }readonly responseBody?: stringreadonly metadata?: { readonly [x: string]: string }}}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly type: "session.next.compaction.started"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly messageID: stringreadonly reason: "auto" | "manual"}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly type: "session.next.compaction.ended"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly messageID: stringreadonly reason: "auto" | "manual"readonly text: stringreadonly recent: string}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly type: "session.next.revert.staged"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly revert: {readonly messageID: stringreadonly partID?: stringreadonly snapshot?: stringreadonly diff?: stringreadonly files?: ReadonlyArray<{readonly path: stringreadonly status: "added" | "modified" | "deleted"readonly additions: numberreadonly deletions: numberreadonly patch: string}>}}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly type: "session.next.revert.cleared"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: { readonly timestamp: number; readonly sessionID: string }}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly type: "session.next.revert.committed"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: { readonly timestamp: number; readonly sessionID: string; readonly messageID: string }}>readonly hasMore: boolean}export type SessionsEventsInput = {readonly sessionID: { readonly sessionID: string }["sessionID"]readonly after?: { readonly after?: number | undefined }["after"]}export type SessionsEventsOutput =| {readonly id: stringreadonly metadata?: { readonly [x: string]: unknown }readonly type: "session.next.agent.switched"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly messageID: stringreadonly agent: string}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: unknown }readonly type: "session.next.model.switched"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly messageID: stringreadonly model: { readonly id: string; readonly providerID: string; readonly variant?: string }}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: unknown }readonly type: "session.next.moved"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly location: { readonly directory: string; readonly workspaceID?: string }readonly subdirectory?: string}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: unknown }readonly type: "session.next.prompted"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly messageID: stringreadonly prompt: {readonly text: stringreadonly files?: ReadonlyArray<{readonly uri: stringreadonly mime: stringreadonly name?: stringreadonly description?: stringreadonly source?: { readonly start: number; readonly end: number; readonly text: string }}>readonly agents?: ReadonlyArray<{readonly name: stringreadonly source?: { readonly start: number; readonly end: number; readonly text: string }}>}readonly delivery: "steer" | "queue"}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: unknown }readonly type: "session.next.prompt.admitted"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly messageID: stringreadonly prompt: {readonly text: stringreadonly files?: ReadonlyArray<{readonly uri: stringreadonly mime: stringreadonly name?: stringreadonly description?: stringreadonly source?: { readonly start: number; readonly end: number; readonly text: string }}>readonly agents?: ReadonlyArray<{readonly name: stringreadonly source?: { readonly start: number; readonly end: number; readonly text: string }}>}readonly delivery: "steer" | "queue"}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: unknown }readonly type: "session.next.context.updated"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly messageID: stringreadonly text: string}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: unknown }readonly type: "session.next.synthetic"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly messageID: stringreadonly text: string}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: unknown }readonly type: "session.next.shell.started"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly messageID: stringreadonly callID: stringreadonly command: string}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: unknown }readonly type: "session.next.shell.ended"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly callID: stringreadonly output: string}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: unknown }readonly type: "session.next.step.started"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly assistantMessageID: stringreadonly agent: stringreadonly model: { readonly id: string; readonly providerID: string; readonly variant?: string }readonly snapshot?: string}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: unknown }readonly type: "session.next.step.ended"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly assistantMessageID: stringreadonly finish: stringreadonly cost: numberreadonly tokens: {readonly input: numberreadonly output: numberreadonly reasoning: numberreadonly cache: { readonly read: number; readonly write: number }}readonly snapshot?: stringreadonly files?: ReadonlyArray<string>}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: unknown }readonly type: "session.next.step.failed"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly assistantMessageID: stringreadonly error: { readonly type: "unknown"; readonly message: string }}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: unknown }readonly type: "session.next.text.started"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly assistantMessageID: stringreadonly textID: string}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: unknown }readonly type: "session.next.text.ended"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly assistantMessageID: stringreadonly textID: stringreadonly text: string}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: unknown }readonly type: "session.next.tool.input.started"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly assistantMessageID: stringreadonly callID: stringreadonly name: string}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: unknown }readonly type: "session.next.tool.input.ended"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly assistantMessageID: stringreadonly callID: stringreadonly text: string}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: unknown }readonly type: "session.next.tool.called"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly assistantMessageID: stringreadonly callID: stringreadonly tool: stringreadonly input: { readonly [x: string]: unknown }readonly provider: {readonly executed: booleanreadonly metadata?: { readonly [x: string]: { readonly [x: string]: unknown } }}}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: unknown }readonly type: "session.next.tool.progress"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly assistantMessageID: stringreadonly callID: stringreadonly structured: { readonly [x: string]: unknown }readonly content: ReadonlyArray<| { readonly type: "text"; readonly text: string }| { readonly type: "file"; readonly uri: string; readonly mime: string; readonly name?: string }>}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: unknown }readonly type: "session.next.tool.success"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly assistantMessageID: stringreadonly callID: stringreadonly structured: { readonly [x: string]: unknown }readonly content: ReadonlyArray<| { readonly type: "text"; readonly text: string }| { readonly type: "file"; readonly uri: string; readonly mime: string; readonly name?: string }>readonly outputPaths?: ReadonlyArray<string>readonly result?: unknownreadonly provider: {readonly executed: booleanreadonly metadata?: { readonly [x: string]: { readonly [x: string]: unknown } }}}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: unknown }readonly type: "session.next.tool.failed"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly assistantMessageID: stringreadonly callID: stringreadonly error: { readonly type: "unknown"; readonly message: string }readonly result?: unknownreadonly provider: {readonly executed: booleanreadonly metadata?: { readonly [x: string]: { readonly [x: string]: unknown } }}}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: unknown }readonly type: "session.next.reasoning.started"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly assistantMessageID: stringreadonly reasoningID: stringreadonly providerMetadata?: { readonly [x: string]: { readonly [x: string]: unknown } }}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: unknown }readonly type: "session.next.reasoning.ended"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly assistantMessageID: stringreadonly reasoningID: stringreadonly text: stringreadonly providerMetadata?: { readonly [x: string]: { readonly [x: string]: unknown } }}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: unknown }readonly type: "session.next.retried"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly attempt: numberreadonly error: {readonly message: stringreadonly statusCode?: numberreadonly isRetryable: booleanreadonly responseHeaders?: { readonly [x: string]: string }readonly responseBody?: stringreadonly metadata?: { readonly [x: string]: string }}}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: unknown }readonly type: "session.next.compaction.started"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly messageID: stringreadonly reason: "auto" | "manual"}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: unknown }readonly type: "session.next.compaction.ended"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly messageID: stringreadonly reason: "auto" | "manual"readonly text: stringreadonly recent: string}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: unknown }readonly type: "session.next.revert.staged"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: {readonly timestamp: numberreadonly sessionID: stringreadonly revert: {readonly messageID: stringreadonly partID?: stringreadonly snapshot?: stringreadonly diff?: stringreadonly files?: ReadonlyArray<{readonly path: stringreadonly status: "added" | "modified" | "deleted"readonly additions: numberreadonly deletions: numberreadonly patch: string}>}}}| {readonly id: stringreadonly metadata?: { readonly [x: string]: unknown }readonly type: "session.next.revert.cleared"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: { readonly timestamp: number; readonly sessionID: string }}| {readonly id: stringreadonly metadata?: { readonly [x: string]: unknown }readonly type: "session.next.revert.committed"readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }readonly location?: { readonly directory: string; readonly workspaceID?: string }readonly data: { readonly timestamp: number; readonly sessionID: string; readonly messageID: string }}export type SessionsInterruptInput = { readonly sessionID: { readonly sessionID: string }["sessionID"] }export type SessionsInterruptOutput = voidexport type SessionsMessageInput = {readonly sessionID: { readonly sessionID: string; readonly messageID: string }["sessionID"]readonly messageID: { readonly sessionID: string; readonly messageID: string }["messageID"]}export type SessionsMessageOutput = {readonly data:| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly time: { readonly created: number }readonly type: "agent-switched"readonly agent: string}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly time: { readonly created: number }readonly type: "model-switched"readonly model: { readonly id: string; readonly providerID: string; readonly variant?: string }}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly time: { readonly created: number }readonly text: stringreadonly files?: ReadonlyArray<{readonly uri: stringreadonly mime: stringreadonly name?: stringreadonly description?: stringreadonly source?: { readonly start: number; readonly end: number; readonly text: string }}>readonly agents?: ReadonlyArray<{readonly name: stringreadonly source?: { readonly start: number; readonly end: number; readonly text: string }}>readonly type: "user"}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly time: { readonly created: number }readonly sessionID: stringreadonly text: stringreadonly type: "synthetic"}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly time: { readonly created: number }readonly type: "system"readonly text: string}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly time: { readonly created: number; readonly completed?: number }readonly type: "shell"readonly callID: stringreadonly command: stringreadonly output: string}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly time: { readonly created: number; readonly completed?: number }readonly type: "assistant"readonly agent: stringreadonly model: { readonly id: string; readonly providerID: string; readonly variant?: string }readonly content: ReadonlyArray<| { readonly type: "text"; readonly id: string; readonly text: string }| {readonly type: "reasoning"readonly id: stringreadonly text: stringreadonly providerMetadata?: { readonly [x: string]: { readonly [x: string]: JsonValue } }readonly time?: { readonly created: number; readonly completed?: number }}| {readonly type: "tool"readonly id: stringreadonly name: stringreadonly provider?: {readonly executed: booleanreadonly metadata?: { readonly [x: string]: { readonly [x: string]: JsonValue } }readonly resultMetadata?: { readonly [x: string]: { readonly [x: string]: JsonValue } }}readonly state:| { readonly status: "pending"; readonly input: string }| {readonly status: "running"readonly input: { readonly [x: string]: JsonValue }readonly structured: { readonly [x: string]: JsonValue }readonly content: ReadonlyArray<| { readonly type: "text"; readonly text: string }| { readonly type: "file"; readonly uri: string; readonly mime: string; readonly name?: string }>}| {readonly status: "completed"readonly input: { readonly [x: string]: JsonValue }readonly attachments?: ReadonlyArray<{readonly uri: stringreadonly mime: stringreadonly name?: stringreadonly description?: stringreadonly source?: { readonly start: number; readonly end: number; readonly text: string }}>readonly content: ReadonlyArray<| { readonly type: "text"; readonly text: string }| { readonly type: "file"; readonly uri: string; readonly mime: string; readonly name?: string }>readonly outputPaths?: ReadonlyArray<string>readonly structured: { readonly [x: string]: JsonValue }readonly result?: JsonValue}| {readonly status: "error"readonly input: { readonly [x: string]: JsonValue }readonly content: ReadonlyArray<| { readonly type: "text"; readonly text: string }| { readonly type: "file"; readonly uri: string; readonly mime: string; readonly name?: string }>readonly structured: { readonly [x: string]: JsonValue }readonly error: { readonly type: "unknown"; readonly message: string }readonly result?: JsonValue}readonly time: {readonly created: numberreadonly ran?: numberreadonly completed?: numberreadonly pruned?: number}}>readonly snapshot?: { readonly start?: string; readonly end?: string; readonly files?: ReadonlyArray<string> }readonly finish?: stringreadonly cost?: numberreadonly tokens?: {readonly input: numberreadonly output: numberreadonly reasoning: numberreadonly cache: { readonly read: number; readonly write: number }}readonly error?: { readonly type: "unknown"; readonly message: string }}| {readonly type: "compaction"readonly reason: "auto" | "manual"readonly summary: stringreadonly recent: stringreadonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly time: { readonly created: number }}}["data"]export type MessagesListInput = {readonly sessionID: { readonly sessionID: string }["sessionID"]readonly limit?: {readonly limit?: number | undefinedreadonly order?: "asc" | "desc" | undefinedreadonly cursor?: string | undefined}["limit"]readonly order?: {readonly limit?: number | undefinedreadonly order?: "asc" | "desc" | undefinedreadonly cursor?: string | undefined}["order"]readonly cursor?: {readonly limit?: number | undefinedreadonly order?: "asc" | "desc" | undefinedreadonly cursor?: string | undefined}["cursor"]}export type MessagesListOutput = {readonly data: ReadonlyArray<| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly time: { readonly created: number }readonly type: "agent-switched"readonly agent: string}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly time: { readonly created: number }readonly type: "model-switched"readonly model: { readonly id: string; readonly providerID: string; readonly variant?: string }}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly time: { readonly created: number }readonly text: stringreadonly files?: ReadonlyArray<{readonly uri: stringreadonly mime: stringreadonly name?: stringreadonly description?: stringreadonly source?: { readonly start: number; readonly end: number; readonly text: string }}>readonly agents?: ReadonlyArray<{readonly name: stringreadonly source?: { readonly start: number; readonly end: number; readonly text: string }}>readonly type: "user"}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly time: { readonly created: number }readonly sessionID: stringreadonly text: stringreadonly type: "synthetic"}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly time: { readonly created: number }readonly type: "system"readonly text: string}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly time: { readonly created: number; readonly completed?: number }readonly type: "shell"readonly callID: stringreadonly command: stringreadonly output: string}| {readonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly time: { readonly created: number; readonly completed?: number }readonly type: "assistant"readonly agent: stringreadonly model: { readonly id: string; readonly providerID: string; readonly variant?: string }readonly content: ReadonlyArray<| { readonly type: "text"; readonly id: string; readonly text: string }| {readonly type: "reasoning"readonly id: stringreadonly text: stringreadonly providerMetadata?: { readonly [x: string]: { readonly [x: string]: JsonValue } }readonly time?: { readonly created: number; readonly completed?: number }}| {readonly type: "tool"readonly id: stringreadonly name: stringreadonly provider?: {readonly executed: booleanreadonly metadata?: { readonly [x: string]: { readonly [x: string]: JsonValue } }readonly resultMetadata?: { readonly [x: string]: { readonly [x: string]: JsonValue } }}readonly state:| { readonly status: "pending"; readonly input: string }| {readonly status: "running"readonly input: { readonly [x: string]: JsonValue }readonly structured: { readonly [x: string]: JsonValue }readonly content: ReadonlyArray<| { readonly type: "text"; readonly text: string }| { readonly type: "file"; readonly uri: string; readonly mime: string; readonly name?: string }>}| {readonly status: "completed"readonly input: { readonly [x: string]: JsonValue }readonly attachments?: ReadonlyArray<{readonly uri: stringreadonly mime: stringreadonly name?: stringreadonly description?: stringreadonly source?: { readonly start: number; readonly end: number; readonly text: string }}>readonly content: ReadonlyArray<| { readonly type: "text"; readonly text: string }| { readonly type: "file"; readonly uri: string; readonly mime: string; readonly name?: string }>readonly outputPaths?: ReadonlyArray<string>readonly structured: { readonly [x: string]: JsonValue }readonly result?: JsonValue}| {readonly status: "error"readonly input: { readonly [x: string]: JsonValue }readonly content: ReadonlyArray<| { readonly type: "text"; readonly text: string }| { readonly type: "file"; readonly uri: string; readonly mime: string; readonly name?: string }>readonly structured: { readonly [x: string]: JsonValue }readonly error: { readonly type: "unknown"; readonly message: string }readonly result?: JsonValue}readonly time: {readonly created: numberreadonly ran?: numberreadonly completed?: numberreadonly pruned?: number}}>readonly snapshot?: { readonly start?: string; readonly end?: string; readonly files?: ReadonlyArray<string> }readonly finish?: stringreadonly cost?: numberreadonly tokens?: {readonly input: numberreadonly output: numberreadonly reasoning: numberreadonly cache: { readonly read: number; readonly write: number }}readonly error?: { readonly type: "unknown"; readonly message: string }}| {readonly type: "compaction"readonly reason: "auto" | "manual"readonly summary: stringreadonly recent: stringreadonly id: stringreadonly metadata?: { readonly [x: string]: JsonValue }readonly time: { readonly created: number }}>readonly cursor: { readonly previous?: string | null; readonly next?: string | null }}export type ModelsListInput = {readonly location?: {readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}["location"]}export type ModelsListOutput = {readonly location: {readonly directory: stringreadonly workspaceID?: stringreadonly project: { readonly id: string; readonly directory: string }}readonly data: ReadonlyArray<{readonly id: stringreadonly providerID: stringreadonly family?: stringreadonly name: stringreadonly api:| {readonly id: stringreadonly type: "aisdk"readonly package: stringreadonly url?: stringreadonly settings?: { readonly [x: string]: JsonValue }}| {readonly id: stringreadonly type: "native"readonly url?: stringreadonly settings: { readonly [x: string]: JsonValue }}readonly capabilities: {readonly tools: booleanreadonly input: ReadonlyArray<string>readonly output: ReadonlyArray<string>}readonly request: {readonly headers: { readonly [x: string]: string }readonly body: { readonly [x: string]: JsonValue }readonly variant?: string}readonly variants: ReadonlyArray<{readonly id: stringreadonly headers: { readonly [x: string]: string }readonly body: { readonly [x: string]: JsonValue }}>readonly time: { readonly released: number }readonly cost: ReadonlyArray<{readonly tier?: { readonly type: "context"; readonly size: number }readonly input: numberreadonly output: numberreadonly cache: { readonly read: number; readonly write: number }}>readonly status: "alpha" | "beta" | "deprecated" | "active"readonly enabled: booleanreadonly limit: { readonly context: number; readonly input?: number; readonly output: number }}>}export type ProvidersListInput = {readonly location?: {readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}["location"]}export type ProvidersListOutput = {readonly location: {readonly directory: stringreadonly workspaceID?: stringreadonly project: { readonly id: string; readonly directory: string }}readonly data: ReadonlyArray<{readonly id: stringreadonly integrationID?: stringreadonly name: stringreadonly disabled?: booleanreadonly api:| {readonly type: "aisdk"readonly package: stringreadonly url?: stringreadonly settings?: { readonly [x: string]: JsonValue }}| { readonly type: "native"; readonly url?: string; readonly settings: { readonly [x: string]: JsonValue } }readonly request: {readonly headers: { readonly [x: string]: string }readonly body: { readonly [x: string]: JsonValue }}}>}export type ProvidersGetInput = {readonly providerID: { readonly providerID: string }["providerID"]readonly location?: {readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}["location"]}export type ProvidersGetOutput = {readonly location: {readonly directory: stringreadonly workspaceID?: stringreadonly project: { readonly id: string; readonly directory: string }}readonly data: {readonly id: stringreadonly integrationID?: stringreadonly name: stringreadonly disabled?: booleanreadonly api:| {readonly type: "aisdk"readonly package: stringreadonly url?: stringreadonly settings?: { readonly [x: string]: JsonValue }}| { readonly type: "native"; readonly url?: string; readonly settings: { readonly [x: string]: JsonValue } }readonly request: {readonly headers: { readonly [x: string]: string }readonly body: { readonly [x: string]: JsonValue }}}}export type IntegrationsListInput = {readonly location?: {readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}["location"]}export type IntegrationsListOutput = {readonly location: {readonly directory: stringreadonly workspaceID?: stringreadonly project: { readonly id: string; readonly directory: string }}readonly data: ReadonlyArray<{readonly id: stringreadonly name: stringreadonly methods: ReadonlyArray<| {readonly id: stringreadonly type: "oauth"readonly label: stringreadonly prompts?: ReadonlyArray<| {readonly type: "text"readonly key: stringreadonly message: stringreadonly placeholder?: stringreadonly when?: { readonly key: string; readonly op: "eq" | "neq"; readonly value: string }}| {readonly type: "select"readonly key: stringreadonly message: stringreadonly options: ReadonlyArray<{readonly label: stringreadonly value: stringreadonly hint?: string}>readonly when?: { readonly key: string; readonly op: "eq" | "neq"; readonly value: string }}>}| { readonly type: "key"; readonly label?: string }| { readonly type: "env"; readonly names: ReadonlyArray<string> }>readonly connections: ReadonlyArray<| { readonly type: "credential"; readonly id: string; readonly label: string }| { readonly type: "env"; readonly name: string }>}>}export type IntegrationsGetInput = {readonly integrationID: { readonly integrationID: string }["integrationID"]readonly location?: {readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}["location"]}export type IntegrationsGetOutput = {readonly location: {readonly directory: stringreadonly workspaceID?: stringreadonly project: { readonly id: string; readonly directory: string }}readonly data: {readonly id: stringreadonly name: stringreadonly methods: ReadonlyArray<| {readonly id: stringreadonly type: "oauth"readonly label: stringreadonly prompts?: ReadonlyArray<| {readonly type: "text"readonly key: stringreadonly message: stringreadonly placeholder?: stringreadonly when?: { readonly key: string; readonly op: "eq" | "neq"; readonly value: string }}| {readonly type: "select"readonly key: stringreadonly message: stringreadonly options: ReadonlyArray<{readonly label: stringreadonly value: stringreadonly hint?: string}>readonly when?: { readonly key: string; readonly op: "eq" | "neq"; readonly value: string }}>}| { readonly type: "key"; readonly label?: string }| { readonly type: "env"; readonly names: ReadonlyArray<string> }>readonly connections: ReadonlyArray<| { readonly type: "credential"; readonly id: string; readonly label: string }| { readonly type: "env"; readonly name: string }>} | null}export type IntegrationsConnectKeyInput = {readonly integrationID: { readonly integrationID: string }["integrationID"]readonly location?: {readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}["location"]readonly key: { readonly key: string; readonly label?: string | undefined }["key"]readonly label?: { readonly key: string; readonly label?: string | undefined }["label"]}export type IntegrationsConnectKeyOutput = voidexport type IntegrationsConnectOauthInput = {readonly integrationID: { readonly integrationID: string }["integrationID"]readonly location?: {readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}["location"]readonly methodID: {readonly methodID: stringreadonly inputs: { readonly [x: string]: string }readonly label?: string | undefined}["methodID"]readonly inputs: {readonly methodID: stringreadonly inputs: { readonly [x: string]: string }readonly label?: string | undefined}["inputs"]readonly label?: {readonly methodID: stringreadonly inputs: { readonly [x: string]: string }readonly label?: string | undefined}["label"]}export type IntegrationsConnectOauthOutput = {readonly location: {readonly directory: stringreadonly workspaceID?: stringreadonly project: { readonly id: string; readonly directory: string }}readonly data: {readonly attemptID: stringreadonly url: stringreadonly instructions: stringreadonly mode: "auto" | "code"readonly time: {readonly created: number | "Infinity" | "-Infinity" | "NaN"readonly expires: number | "Infinity" | "-Infinity" | "NaN"}}}export type IntegrationsAttemptStatusInput = {readonly attemptID: { readonly attemptID: string }["attemptID"]readonly location?: {readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}["location"]}export type IntegrationsAttemptStatusOutput = {readonly location: {readonly directory: stringreadonly workspaceID?: stringreadonly project: { readonly id: string; readonly directory: string }}readonly data:| {readonly status: "pending"readonly time: {readonly created: number | "Infinity" | "-Infinity" | "NaN"readonly expires: number | "Infinity" | "-Infinity" | "NaN"}}| {readonly status: "complete"readonly time: {readonly created: number | "Infinity" | "-Infinity" | "NaN"readonly expires: number | "Infinity" | "-Infinity" | "NaN"}}| {readonly status: "failed"readonly message: stringreadonly time: {readonly created: number | "Infinity" | "-Infinity" | "NaN"readonly expires: number | "Infinity" | "-Infinity" | "NaN"}}| {readonly status: "expired"readonly time: {readonly created: number | "Infinity" | "-Infinity" | "NaN"readonly expires: number | "Infinity" | "-Infinity" | "NaN"}}}export type IntegrationsAttemptCompleteInput = {readonly attemptID: { readonly attemptID: string }["attemptID"]readonly location?: {readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}["location"]readonly code?: { readonly code?: string | undefined }["code"]}export type IntegrationsAttemptCompleteOutput = voidexport type IntegrationsAttemptCancelInput = {readonly attemptID: { readonly attemptID: string }["attemptID"]readonly location?: {readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}["location"]}export type IntegrationsAttemptCancelOutput = voidexport type CredentialsUpdateInput = {readonly credentialID: { readonly credentialID: string }["credentialID"]readonly location?: {readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}["location"]readonly label: { readonly label: string }["label"]}export type CredentialsUpdateOutput = voidexport type CredentialsRemoveInput = {readonly credentialID: { readonly credentialID: string }["credentialID"]readonly location?: {readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}["location"]}export type CredentialsRemoveOutput = voidexport type PermissionsListRequestsInput = {readonly location?: {readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}["location"]}export type PermissionsListRequestsOutput = {readonly location: {readonly directory: stringreadonly workspaceID?: stringreadonly project: { readonly id: string; readonly directory: string }}readonly data: ReadonlyArray<{readonly id: stringreadonly sessionID: stringreadonly action: stringreadonly resources: ReadonlyArray<string>readonly save?: ReadonlyArray<string>readonly metadata?: { readonly [x: string]: JsonValue }readonly source?: { readonly type: "tool"; readonly messageID: string; readonly callID: string }}>}export type PermissionsListSavedInput = {readonly projectID?: { readonly projectID?: string | undefined }["projectID"]}export type PermissionsListSavedOutput = {readonly data: ReadonlyArray<{readonly id: stringreadonly projectID: stringreadonly action: stringreadonly resource: string}>}["data"]export type PermissionsRemoveSavedInput = { readonly id: { readonly id: string }["id"] }export type PermissionsRemoveSavedOutput = voidexport type PermissionsCreateInput = {readonly sessionID: { readonly sessionID: string }["sessionID"]readonly id?: {readonly id?: string | nullreadonly action: stringreadonly resources: ReadonlyArray<string>readonly save?: ReadonlyArray<string>readonly metadata?: { readonly [x: string]: JsonValue }readonly source?: { readonly type: "tool"; readonly messageID: string; readonly callID: string }readonly agent?: string | null}["id"]readonly action: {readonly id?: string | nullreadonly action: stringreadonly resources: ReadonlyArray<string>readonly save?: ReadonlyArray<string>readonly metadata?: { readonly [x: string]: JsonValue }readonly source?: { readonly type: "tool"; readonly messageID: string; readonly callID: string }readonly agent?: string | null}["action"]readonly resources: {readonly id?: string | nullreadonly action: stringreadonly resources: ReadonlyArray<string>readonly save?: ReadonlyArray<string>readonly metadata?: { readonly [x: string]: JsonValue }readonly source?: { readonly type: "tool"; readonly messageID: string; readonly callID: string }readonly agent?: string | null}["resources"]readonly save?: {readonly id?: string | nullreadonly action: stringreadonly resources: ReadonlyArray<string>readonly save?: ReadonlyArray<string>readonly metadata?: { readonly [x: string]: JsonValue }readonly source?: { readonly type: "tool"; readonly messageID: string; readonly callID: string }readonly agent?: string | null}["save"]readonly metadata?: {readonly id?: string | nullreadonly action: stringreadonly resources: ReadonlyArray<string>readonly save?: ReadonlyArray<string>readonly metadata?: { readonly [x: string]: JsonValue }readonly source?: { readonly type: "tool"; readonly messageID: string; readonly callID: string }readonly agent?: string | null}["metadata"]readonly source?: {readonly id?: string | nullreadonly action: stringreadonly resources: ReadonlyArray<string>readonly save?: ReadonlyArray<string>readonly metadata?: { readonly [x: string]: JsonValue }readonly source?: { readonly type: "tool"; readonly messageID: string; readonly callID: string }readonly agent?: string | null}["source"]readonly agent?: {readonly id?: string | nullreadonly action: stringreadonly resources: ReadonlyArray<string>readonly save?: ReadonlyArray<string>readonly metadata?: { readonly [x: string]: JsonValue }readonly source?: { readonly type: "tool"; readonly messageID: string; readonly callID: string }readonly agent?: string | null}["agent"]}export type PermissionsCreateOutput = {readonly data: { readonly id: string; readonly effect: "allow" | "deny" | "ask" }}["data"]export type PermissionsListInput = { readonly sessionID: { readonly sessionID: string }["sessionID"] }export type PermissionsListOutput = {readonly data: ReadonlyArray<{readonly id: stringreadonly sessionID: stringreadonly action: stringreadonly resources: ReadonlyArray<string>readonly save?: ReadonlyArray<string>readonly metadata?: { readonly [x: string]: JsonValue }readonly source?: { readonly type: "tool"; readonly messageID: string; readonly callID: string }}>}["data"]export type PermissionsGetInput = {readonly sessionID: { readonly sessionID: string; readonly requestID: string }["sessionID"]readonly requestID: { readonly sessionID: string; readonly requestID: string }["requestID"]}export type PermissionsGetOutput = {readonly data: {readonly id: stringreadonly sessionID: stringreadonly action: stringreadonly resources: ReadonlyArray<string>readonly save?: ReadonlyArray<string>readonly metadata?: { readonly [x: string]: JsonValue }readonly source?: { readonly type: "tool"; readonly messageID: string; readonly callID: string }}}["data"]export type PermissionsReplyInput = {readonly sessionID: { readonly sessionID: string; readonly requestID: string }["sessionID"]readonly requestID: { readonly sessionID: string; readonly requestID: string }["requestID"]readonly reply: { readonly reply: "once" | "always" | "reject"; readonly message?: string | undefined }["reply"]readonly message?: { readonly reply: "once" | "always" | "reject"; readonly message?: string | undefined }["message"]}export type PermissionsReplyOutput = voidexport type FilesListInput = {readonly location?: {readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefinedreadonly path?: string | undefined}["location"]readonly path?: {readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefinedreadonly path?: string | undefined}["path"]}export type FilesListOutput = {readonly location: {readonly directory: stringreadonly workspaceID?: stringreadonly project: { readonly id: string; readonly directory: string }}readonly data: ReadonlyArray<{ readonly path: string; readonly type: "file" | "directory" }>}export type FilesFindInput = {readonly location?: {readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefinedreadonly query: stringreadonly type?: "file" | "directory" | undefinedreadonly limit?: number | undefined}["location"]readonly query: {readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefinedreadonly query: stringreadonly type?: "file" | "directory" | undefinedreadonly limit?: number | undefined}["query"]readonly type?: {readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefinedreadonly query: stringreadonly type?: "file" | "directory" | undefinedreadonly limit?: number | undefined}["type"]readonly limit?: {readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefinedreadonly query: stringreadonly type?: "file" | "directory" | undefinedreadonly limit?: number | undefined}["limit"]}export type FilesFindOutput = {readonly location: {readonly directory: stringreadonly workspaceID?: stringreadonly project: { readonly id: string; readonly directory: string }}readonly data: ReadonlyArray<{ readonly path: string; readonly type: "file" | "directory" }>}export type CommandsListInput = {readonly location?: {readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}["location"]}export type CommandsListOutput = {readonly location: {readonly directory: stringreadonly workspaceID?: stringreadonly project: { readonly id: string; readonly directory: string }}readonly data: ReadonlyArray<{readonly name: stringreadonly template: stringreadonly description?: stringreadonly agent?: stringreadonly model?: { readonly id: string; readonly providerID: string; readonly variant?: string }readonly subtask?: boolean}>}export type SkillsListInput = {readonly location?: {readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}["location"]}export type SkillsListOutput = {readonly location: {readonly directory: stringreadonly workspaceID?: stringreadonly project: { readonly id: string; readonly directory: string }}readonly data: ReadonlyArray<{readonly name: stringreadonly description?: stringreadonly slash?: booleanreadonly location: stringreadonly content: string}>}export type EventsSubscribeOutput = OpenCodeEventEncodedexport type PtysListInput = {readonly location?: {readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}["location"]}export type PtysListOutput = {readonly location: {readonly directory: stringreadonly workspaceID?: stringreadonly project: { readonly id: string; readonly directory: string }}readonly data: ReadonlyArray<{readonly id: stringreadonly title: stringreadonly command: stringreadonly args: ReadonlyArray<string>readonly cwd: stringreadonly status: "running" | "exited"readonly pid: numberreadonly exitCode?: number}>}export type PtysCreateInput = {readonly location?: {readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}["location"]readonly command?: {readonly command?: stringreadonly args?: ReadonlyArray<string>readonly cwd?: stringreadonly title?: stringreadonly env?: { readonly [x: string]: string }}["command"]readonly args?: {readonly command?: stringreadonly args?: ReadonlyArray<string>readonly cwd?: stringreadonly title?: stringreadonly env?: { readonly [x: string]: string }}["args"]readonly cwd?: {readonly command?: stringreadonly args?: ReadonlyArray<string>readonly cwd?: stringreadonly title?: stringreadonly env?: { readonly [x: string]: string }}["cwd"]readonly title?: {readonly command?: stringreadonly args?: ReadonlyArray<string>readonly cwd?: stringreadonly title?: stringreadonly env?: { readonly [x: string]: string }}["title"]readonly env?: {readonly command?: stringreadonly args?: ReadonlyArray<string>readonly cwd?: stringreadonly title?: stringreadonly env?: { readonly [x: string]: string }}["env"]}export type PtysCreateOutput = {readonly location: {readonly directory: stringreadonly workspaceID?: stringreadonly project: { readonly id: string; readonly directory: string }}readonly data: {readonly id: stringreadonly title: stringreadonly command: stringreadonly args: ReadonlyArray<string>readonly cwd: stringreadonly status: "running" | "exited"readonly pid: numberreadonly exitCode?: number}}export type PtysGetInput = {readonly ptyID: { readonly ptyID: string }["ptyID"]readonly location?: {readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}["location"]}export type PtysGetOutput = {readonly location: {readonly directory: stringreadonly workspaceID?: stringreadonly project: { readonly id: string; readonly directory: string }}readonly data: {readonly id: stringreadonly title: stringreadonly command: stringreadonly args: ReadonlyArray<string>readonly cwd: stringreadonly status: "running" | "exited"readonly pid: numberreadonly exitCode?: number}}export type PtysUpdateInput = {readonly ptyID: { readonly ptyID: string }["ptyID"]readonly location?: {readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}["location"]readonly title?: {readonly title?: stringreadonly size?: { readonly rows: number; readonly cols: number }}["title"]readonly size?: { readonly title?: string; readonly size?: { readonly rows: number; readonly cols: number } }["size"]}export type PtysUpdateOutput = {readonly location: {readonly directory: stringreadonly workspaceID?: stringreadonly project: { readonly id: string; readonly directory: string }}readonly data: {readonly id: stringreadonly title: stringreadonly command: stringreadonly args: ReadonlyArray<string>readonly cwd: stringreadonly status: "running" | "exited"readonly pid: numberreadonly exitCode?: number}}export type PtysRemoveInput = {readonly ptyID: { readonly ptyID: string }["ptyID"]readonly location?: {readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}["location"]}export type PtysRemoveOutput = voidexport type QuestionsListRequestsInput = {readonly location?: {readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}["location"]}export type QuestionsListRequestsOutput = {readonly location: {readonly directory: stringreadonly workspaceID?: stringreadonly project: { readonly id: string; readonly directory: string }}readonly data: ReadonlyArray<{readonly id: stringreadonly sessionID: stringreadonly questions: ReadonlyArray<{readonly question: stringreadonly header: stringreadonly options: ReadonlyArray<{ readonly label: string; readonly description: string }>readonly multiple?: booleanreadonly custom?: boolean}>readonly tool?: { readonly messageID: string; readonly callID: string }}>}export type QuestionsListInput = { readonly sessionID: { readonly sessionID: string }["sessionID"] }export type QuestionsListOutput = {readonly data: ReadonlyArray<{readonly id: stringreadonly sessionID: stringreadonly questions: ReadonlyArray<{readonly question: stringreadonly header: stringreadonly options: ReadonlyArray<{ readonly label: string; readonly description: string }>readonly multiple?: booleanreadonly custom?: boolean}>readonly tool?: { readonly messageID: string; readonly callID: string }}>}["data"]export type QuestionsReplyInput = {readonly sessionID: { readonly sessionID: string; readonly requestID: string }["sessionID"]readonly requestID: { readonly sessionID: string; readonly requestID: string }["requestID"]readonly answers: { readonly answers: ReadonlyArray<ReadonlyArray<string>> }["answers"]}export type QuestionsReplyOutput = voidexport type QuestionsRejectInput = {readonly sessionID: { readonly sessionID: string; readonly requestID: string }["sessionID"]readonly requestID: { readonly sessionID: string; readonly requestID: string }["requestID"]}export type QuestionsRejectOutput = voidexport type ReferencesListInput = {readonly location?: {readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}["location"]}export type ReferencesListOutput = {readonly location: {readonly directory: stringreadonly workspaceID?: stringreadonly project: { readonly id: string; readonly directory: string }}readonly data: ReadonlyArray<{readonly name: stringreadonly path: stringreadonly description?: stringreadonly hidden?: booleanreadonly source:| { readonly type: "local"; readonly path: string; readonly description?: string; readonly hidden?: boolean }| {readonly type: "git"readonly repository: stringreadonly branch?: stringreadonly description?: stringreadonly hidden?: boolean}}>}export type ProjectCopiesCreateInput = {readonly projectID: { readonly projectID: string }["projectID"]readonly location?: {readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}["location"]readonly strategy: { readonly strategy: string; readonly directory: string; readonly name?: string }["strategy"]readonly directory: { readonly strategy: string; readonly directory: string; readonly name?: string }["directory"]readonly name?: { readonly strategy: string; readonly directory: string; readonly name?: string }["name"]}export type ProjectCopiesCreateOutput = { readonly directory: string }export type ProjectCopiesRemoveInput = {readonly projectID: { readonly projectID: string }["projectID"]readonly location?: {readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}["location"]readonly directory: { readonly directory: string; readonly force: boolean }["directory"]readonly force: { readonly directory: string; readonly force: boolean }["force"]}export type ProjectCopiesRemoveOutput = voidexport type ProjectCopiesRefreshInput = {readonly projectID: { readonly projectID: string }["projectID"]readonly location?: {readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined}["location"]}export type ProjectCopiesRefreshOutput = void