diff --git a/packages/client/src/effect/api/api.ts b/packages/client/src/effect/api/api.ts index c1cdc0d4017..a2c002a0f1b 100644 --- a/packages/client/src/effect/api/api.ts +++ b/packages/client/src/effect/api/api.ts @@ -39,59 +39,59 @@ 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 Endpoint0_0Output = { readonly healthy: true; readonly version: string; readonly pid: number } -export type HealthGetOperation = () => Effect.Effect +export type HealthGetOutput = { readonly healthy: true; readonly version: string; readonly pid: number } +export type HealthGetOperation = () => Effect.Effect export interface HealthApi { readonly get: HealthGetOperation } -export type Endpoint1_0Output = { readonly urls: ReadonlyArray } -export type ServerGetOperation = () => Effect.Effect +export type ServerGetOutput = { readonly urls: ReadonlyArray } +export type ServerGetOperation = () => Effect.Effect export interface ServerApi { readonly get: ServerGetOperation } -export type Endpoint2_0Input = { +export type LocationGetInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint2_0Output = Location.Info -export type LocationGetOperation = (input?: Endpoint2_0Input) => Effect.Effect +export type LocationGetOutput = Location.Info +export type LocationGetOperation = (input?: LocationGetInput) => Effect.Effect export interface LocationApi { readonly get: LocationGetOperation } -export type Endpoint3_0Input = { +export type AgentListInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint3_0Output = { readonly location: Location.Info; readonly data: ReadonlyArray } -export type AgentListOperation = (input?: Endpoint3_0Input) => Effect.Effect +export type AgentListOutput = { readonly location: Location.Info; readonly data: ReadonlyArray } +export type AgentListOperation = (input?: AgentListInput) => Effect.Effect -export type Endpoint3_1Input = { +export type AgentGetInput = { readonly agentID: Agent.ID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint3_1Output = { readonly location: Location.Info; readonly data: Agent.Info } -export type AgentGetOperation = (input: Endpoint3_1Input) => Effect.Effect +export type AgentGetOutput = { readonly location: Location.Info; readonly data: Agent.Info } +export type AgentGetOperation = (input: AgentGetInput) => Effect.Effect export interface AgentApi { readonly list: AgentListOperation readonly get: AgentGetOperation } -export type Endpoint4_0Input = { +export type PluginListInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint4_0Output = { readonly location: Location.Info; readonly data: ReadonlyArray } -export type PluginListOperation = (input?: Endpoint4_0Input) => Effect.Effect +export type PluginListOutput = { readonly location: Location.Info; readonly data: ReadonlyArray } +export type PluginListOperation = (input?: PluginListInput) => Effect.Effect export interface PluginApi { readonly list: PluginListOperation } -export type Endpoint5_0Input = { +export type SessionListInput = { readonly workspace?: Workspace.ID | undefined readonly limit?: number | undefined readonly order?: "asc" | "desc" | undefined @@ -102,74 +102,78 @@ export type Endpoint5_0Input = { readonly subpath?: RelativePath | undefined readonly cursor?: (string & Brand.Brand<"SessionsCursor">) | undefined } -export type Endpoint5_0Output = { +export type SessionListOutput = { readonly data: ReadonlyArray readonly cursor: { readonly previous?: (string & Brand.Brand<"SessionsCursor">) | undefined readonly next?: (string & Brand.Brand<"SessionsCursor">) | undefined } } -export type SessionListOperation = (input?: Endpoint5_0Input) => Effect.Effect +export type SessionListOperation = (input?: SessionListInput) => Effect.Effect -export type Endpoint5_1Input = { +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 } -export type Endpoint5_1Output = Session.Info -export type SessionCreateOperation = (input?: Endpoint5_1Input) => Effect.Effect +export type SessionCreateOutput = Session.Info +export type SessionCreateOperation = (input?: SessionCreateInput) => Effect.Effect -export type Endpoint5_2Input = { +export type SessionImportInput = { readonly info: Session.Info readonly messages: ReadonlyArray readonly location?: Location.Ref | undefined } -export type Endpoint5_2Output = Session.Info -export type SessionImportOperation = (input: Endpoint5_2Input) => Effect.Effect +export type SessionImportOutput = Session.Info +export type SessionImportOperation = (input: SessionImportInput) => Effect.Effect -export type Endpoint5_3Input = { readonly sessionID: Session.ID; readonly sanitize?: boolean | undefined } -export type Endpoint5_3Output = { readonly info: Session.Info; readonly messages: ReadonlyArray } -export type SessionExportOperation = (input: Endpoint5_3Input) => Effect.Effect +export type SessionExportInput = { readonly sessionID: Session.ID; readonly sanitize?: boolean | undefined } +export type SessionExportOutput = { readonly info: Session.Info; readonly messages: ReadonlyArray } +export type SessionExportOperation = (input: SessionExportInput) => Effect.Effect -export type Endpoint5_4Output = { readonly [x: Session.ID]: { readonly type: "running" } } -export type SessionActiveOperation = () => Effect.Effect +export type SessionActiveOutput = { readonly [x: Session.ID]: { readonly type: "running" } } +export type SessionActiveOperation = () => Effect.Effect -export type Endpoint5_5Input = { readonly sessionID: Session.ID } -export type Endpoint5_5Output = Session.Info -export type SessionGetOperation = (input: Endpoint5_5Input) => Effect.Effect +export type SessionGetInput = { readonly sessionID: Session.ID } +export type SessionGetOutput = Session.Info +export type SessionGetOperation = (input: SessionGetInput) => Effect.Effect -export type Endpoint5_6Input = { readonly sessionID: Session.ID } -export type Endpoint5_6Output = void -export type SessionRemoveOperation = (input: Endpoint5_6Input) => Effect.Effect +export type SessionRemoveInput = { readonly sessionID: Session.ID } +export type SessionRemoveOutput = void +export type SessionRemoveOperation = (input: SessionRemoveInput) => Effect.Effect -export type Endpoint5_7Input = { readonly sessionID: Session.ID; readonly boundary: Session.ForkRequestBoundary } -export type Endpoint5_7Output = Session.Info -export type SessionForkOperation = (input: Endpoint5_7Input) => Effect.Effect +export type SessionForkInput = { readonly sessionID: Session.ID; readonly boundary: Session.ForkRequestBoundary } +export type SessionForkOutput = Session.Info +export type SessionForkOperation = (input: SessionForkInput) => Effect.Effect -export type Endpoint5_8Input = { readonly sessionID: Session.ID; readonly agent: Agent.ID } -export type Endpoint5_8Output = void -export type SessionSwitchAgentOperation = (input: Endpoint5_8Input) => Effect.Effect +export type SessionSwitchAgentInput = { readonly sessionID: Session.ID; readonly agent: Agent.ID } +export type SessionSwitchAgentOutput = void +export type SessionSwitchAgentOperation = ( + input: SessionSwitchAgentInput, +) => Effect.Effect -export type Endpoint5_9Input = { readonly sessionID: Session.ID; readonly model: Model.Ref } -export type Endpoint5_9Output = void -export type SessionSwitchModelOperation = (input: Endpoint5_9Input) => Effect.Effect +export type SessionSwitchModelInput = { readonly sessionID: Session.ID; readonly model: Model.Ref } +export type SessionSwitchModelOutput = void +export type SessionSwitchModelOperation = ( + input: SessionSwitchModelInput, +) => Effect.Effect -export type Endpoint5_10Input = { readonly sessionID: Session.ID; readonly title: string } -export type Endpoint5_10Output = void -export type SessionRenameOperation = (input: Endpoint5_10Input) => Effect.Effect +export type SessionRenameInput = { readonly sessionID: Session.ID; readonly title: string } +export type SessionRenameOutput = void +export type SessionRenameOperation = (input: SessionRenameInput) => Effect.Effect -export type Endpoint5_11Input = { +export type SessionMoveInput = { readonly sessionID: Session.ID readonly directory: AbsolutePath readonly workspaceID?: Workspace.ID | undefined readonly delivery?: SessionInbox.Delivery | undefined } -export type Endpoint5_11Output = void -export type SessionMoveOperation = (input: Endpoint5_11Input) => Effect.Effect +export type SessionMoveOutput = void +export type SessionMoveOperation = (input: SessionMoveInput) => Effect.Effect -export type Endpoint5_12Input = { +export type SessionPromptInput = { readonly sessionID: Session.ID readonly id?: SessionMessage.ID | undefined readonly text: string @@ -180,10 +184,10 @@ export type Endpoint5_12Input = { readonly delivery?: SessionInbox.Delivery | undefined readonly resume?: boolean | undefined } -export type Endpoint5_12Output = SessionInbox.User -export type SessionPromptOperation = (input: Endpoint5_12Input) => Effect.Effect +export type SessionPromptOutput = SessionInbox.User +export type SessionPromptOperation = (input: SessionPromptInput) => Effect.Effect -export type Endpoint5_13Input = { +export type SessionCommandInput = { readonly sessionID: Session.ID readonly id?: SessionMessage.ID | undefined readonly command: string @@ -196,19 +200,19 @@ export type Endpoint5_13Input = { readonly delivery?: SessionInbox.Delivery | undefined readonly resume?: boolean | undefined } -export type Endpoint5_13Output = SessionInbox.User -export type SessionCommandOperation = (input: Endpoint5_13Input) => Effect.Effect +export type SessionCommandOutput = SessionInbox.User +export type SessionCommandOperation = (input: SessionCommandInput) => Effect.Effect -export type Endpoint5_14Input = { +export type SessionSkillInput = { readonly sessionID: Session.ID readonly id?: SessionMessage.ID | undefined readonly skill: Skill.ID readonly resume?: boolean | undefined } -export type Endpoint5_14Output = void -export type SessionSkillOperation = (input: Endpoint5_14Input) => Effect.Effect +export type SessionSkillOutput = void +export type SessionSkillOperation = (input: SessionSkillInput) => Effect.Effect -export type Endpoint5_15Input = { +export type SessionSyntheticInput = { readonly sessionID: Session.ID readonly id?: SessionMessage.ID | undefined readonly text: string @@ -217,97 +221,115 @@ export type Endpoint5_15Input = { readonly delivery?: SessionInbox.Delivery | undefined readonly resume?: boolean | undefined } -export type Endpoint5_15Output = SessionInbox.Synthetic -export type SessionSyntheticOperation = (input: Endpoint5_15Input) => Effect.Effect +export type SessionSyntheticOutput = SessionInbox.Synthetic +export type SessionSyntheticOperation = ( + input: SessionSyntheticInput, +) => Effect.Effect -export type Endpoint5_16Input = { +export type SessionShellInput = { readonly sessionID: Session.ID readonly id?: Event.ID | undefined readonly command: string } -export type Endpoint5_16Output = void -export type SessionShellOperation = (input: Endpoint5_16Input) => Effect.Effect +export type SessionShellOutput = void +export type SessionShellOperation = (input: SessionShellInput) => Effect.Effect -export type Endpoint5_17Input = { +export type SessionCompactInput = { readonly sessionID: Session.ID readonly id?: SessionMessage.ID | undefined readonly delivery?: SessionInbox.Delivery | undefined } -export type Endpoint5_17Output = SessionInbox.Compaction -export type SessionCompactOperation = (input: Endpoint5_17Input) => Effect.Effect +export type SessionCompactOutput = SessionInbox.Compaction +export type SessionCompactOperation = (input: SessionCompactInput) => Effect.Effect -export type Endpoint5_18Input = { readonly sessionID: Session.ID } -export type Endpoint5_18Output = void -export type SessionWaitOperation = (input: Endpoint5_18Input) => Effect.Effect +export type SessionWaitInput = { readonly sessionID: Session.ID } +export type SessionWaitOutput = void +export type SessionWaitOperation = (input: SessionWaitInput) => Effect.Effect -export type Endpoint5_19Input = { +export type SessionRevertStageInput = { readonly sessionID: Session.ID readonly messageID: SessionMessage.ID readonly files?: boolean | undefined } -export type Endpoint5_19Output = Session.Revert -export type SessionRevertStageOperation = (input: Endpoint5_19Input) => Effect.Effect +export type SessionRevertStageOutput = Session.Revert +export type SessionRevertStageOperation = ( + input: SessionRevertStageInput, +) => Effect.Effect -export type Endpoint5_20Input = { readonly sessionID: Session.ID } -export type Endpoint5_20Output = void -export type SessionRevertClearOperation = (input: Endpoint5_20Input) => Effect.Effect +export type SessionRevertClearInput = { readonly sessionID: Session.ID } +export type SessionRevertClearOutput = void +export type SessionRevertClearOperation = ( + input: SessionRevertClearInput, +) => Effect.Effect -export type Endpoint5_21Input = { readonly sessionID: Session.ID } -export type Endpoint5_21Output = void -export type SessionRevertCommitOperation = (input: Endpoint5_21Input) => Effect.Effect +export type SessionRevertCommitInput = { readonly sessionID: Session.ID } +export type SessionRevertCommitOutput = void +export type SessionRevertCommitOperation = ( + input: SessionRevertCommitInput, +) => Effect.Effect -export type Endpoint5_22Input = { readonly sessionID: Session.ID } -export type Endpoint5_22Output = ReadonlyArray -export type SessionContextOperation = (input: Endpoint5_22Input) => Effect.Effect +export type SessionContextInput = { readonly sessionID: Session.ID } +export type SessionContextOutput = ReadonlyArray +export type SessionContextOperation = (input: SessionContextInput) => Effect.Effect -export type Endpoint5_23Input = { readonly sessionID: Session.ID } -export type Endpoint5_23Output = ReadonlyArray -export type SessionInboxListOperation = (input: Endpoint5_23Input) => Effect.Effect +export type SessionInboxListInput = { readonly sessionID: Session.ID } +export type SessionInboxListOutput = ReadonlyArray +export type SessionInboxListOperation = ( + input: SessionInboxListInput, +) => Effect.Effect -export type Endpoint5_24Input = { readonly sessionID: Session.ID; readonly inboxID: SessionMessage.ID } -export type Endpoint5_24Output = void -export type SessionInboxCancelOperation = (input: Endpoint5_24Input) => Effect.Effect +export type SessionInboxCancelInput = { readonly sessionID: Session.ID; readonly inboxID: SessionMessage.ID } +export type SessionInboxCancelOutput = void +export type SessionInboxCancelOperation = ( + input: SessionInboxCancelInput, +) => Effect.Effect -export type Endpoint5_25Input = { readonly sessionID: Session.ID; readonly inboxID: SessionMessage.ID } -export type Endpoint5_25Output = void -export type SessionInboxSteerOperation = (input: Endpoint5_25Input) => Effect.Effect +export type SessionInboxSteerInput = { readonly sessionID: Session.ID; readonly inboxID: SessionMessage.ID } +export type SessionInboxSteerOutput = void +export type SessionInboxSteerOperation = ( + input: SessionInboxSteerInput, +) => Effect.Effect -export type Endpoint5_26Input = { readonly sessionID: Session.ID; readonly inboxID: SessionMessage.ID } -export type Endpoint5_26Output = void -export type SessionInboxQueueOperation = (input: Endpoint5_26Input) => Effect.Effect +export type SessionInboxQueueInput = { readonly sessionID: Session.ID; readonly inboxID: SessionMessage.ID } +export type SessionInboxQueueOutput = void +export type SessionInboxQueueOperation = ( + input: SessionInboxQueueInput, +) => Effect.Effect -export type Endpoint5_27Input = { readonly sessionID: Session.ID } -export type Endpoint5_27Output = ReadonlyArray +export type SessionInstructionsEntryListInput = { readonly sessionID: Session.ID } +export type SessionInstructionsEntryListOutput = ReadonlyArray export type SessionInstructionsEntryListOperation = ( - input: Endpoint5_27Input, -) => Effect.Effect + input: SessionInstructionsEntryListInput, +) => Effect.Effect -export type Endpoint5_28Input = { +export type SessionInstructionsEntryPutInput = { readonly sessionID: Session.ID readonly key: InstructionEntry.Key readonly value: Schema.Json } -export type Endpoint5_28Output = void +export type SessionInstructionsEntryPutOutput = void export type SessionInstructionsEntryPutOperation = ( - input: Endpoint5_28Input, -) => Effect.Effect + input: SessionInstructionsEntryPutInput, +) => Effect.Effect -export type Endpoint5_29Input = { readonly sessionID: Session.ID; readonly key: InstructionEntry.Key } -export type Endpoint5_29Output = void +export type SessionInstructionsEntryRemoveInput = { readonly sessionID: Session.ID; readonly key: InstructionEntry.Key } +export type SessionInstructionsEntryRemoveOutput = void export type SessionInstructionsEntryRemoveOperation = ( - input: Endpoint5_29Input, -) => Effect.Effect + input: SessionInstructionsEntryRemoveInput, +) => Effect.Effect -export type Endpoint5_30Input = { readonly sessionID: Session.ID; readonly prompt: string } -export type Endpoint5_30Output = { readonly text: string } -export type SessionGenerateOperation = (input: Endpoint5_30Input) => Effect.Effect +export type SessionGenerateInput = { readonly sessionID: Session.ID; readonly prompt: string } +export type SessionGenerateOutput = { readonly text: string } +export type SessionGenerateOperation = ( + input: SessionGenerateInput, +) => Effect.Effect -export type Endpoint5_31Input = { +export type SessionLogInput = { readonly sessionID: Session.ID readonly after?: Event.Seq | undefined readonly follow?: boolean | undefined } -export type Endpoint5_31Output = +export type SessionLogOutput = | ( | { readonly id: Event.ID @@ -911,27 +933,36 @@ export type Endpoint5_31Output = } ) | EventLog.Synced -export type SessionLogOperation = (input: Endpoint5_31Input) => Stream.Stream +export type SessionLogOperation = (input: SessionLogInput) => Stream.Stream -export type Endpoint5_32Input = { readonly sessionID: Session.ID; readonly continue?: boolean | undefined } -export type Endpoint5_32Output = void -export type SessionInterruptOperation = (input: Endpoint5_32Input) => Effect.Effect +export type SessionInterruptInput = { readonly sessionID: Session.ID; readonly continue?: boolean | undefined } +export type SessionInterruptOutput = void +export type SessionInterruptOperation = ( + input: SessionInterruptInput, +) => Effect.Effect -export type Endpoint5_33Input = { readonly sessionID: Session.ID } -export type Endpoint5_33Output = void -export type SessionBackgroundOperation = (input: Endpoint5_33Input) => Effect.Effect +export type SessionBackgroundInput = { readonly sessionID: Session.ID } +export type SessionBackgroundOutput = void +export type SessionBackgroundOperation = ( + input: SessionBackgroundInput, +) => Effect.Effect -export type Endpoint5_34Input = { readonly sessionID: Session.ID; readonly messageID: SessionMessage.ID } -export type Endpoint5_34Output = SessionMessage.Info -export type SessionMessageOperation = (input: Endpoint5_34Input) => Effect.Effect +export type SessionMessageInput = { readonly sessionID: Session.ID; readonly messageID: SessionMessage.ID } +export type SessionMessageOutput = SessionMessage.Info +export type SessionMessageOperation = (input: SessionMessageInput) => Effect.Effect -export type Endpoint5_35Input = { readonly sessionID: Session.ID; readonly variables: { readonly [x: string]: string } } -export type Endpoint5_35Output = void -export type SessionEnvironmentOperation = (input: Endpoint5_35Input) => Effect.Effect +export type SessionEnvironmentInput = { + readonly sessionID: Session.ID + readonly variables: { readonly [x: string]: string } +} +export type SessionEnvironmentOutput = void +export type SessionEnvironmentOperation = ( + input: SessionEnvironmentInput, +) => Effect.Effect -export type Endpoint5_36Input = { readonly sessionID: Session.ID; readonly idle: number } -export type Endpoint5_36Output = void -export type SessionViewOperation = (input: Endpoint5_36Input) => Effect.Effect +export type SessionViewInput = { readonly sessionID: Session.ID; readonly idle: number } +export type SessionViewOutput = void +export type SessionViewOperation = (input: SessionViewInput) => Effect.Effect export interface SessionApi { readonly list: SessionListOperation @@ -981,176 +1012,187 @@ export interface SessionApi { readonly view: SessionViewOperation } -export type Endpoint6_0Input = { +export type MessageListInput = { readonly sessionID: Session.ID readonly limit?: number | undefined readonly order?: "asc" | "desc" | undefined readonly cursor?: string | undefined } -export type Endpoint6_0Output = { +export type MessageListOutput = { readonly data: ReadonlyArray readonly cursor: { readonly previous?: string | undefined; readonly next?: string | undefined } } -export type MessageListOperation = (input: Endpoint6_0Input) => Effect.Effect +export type MessageListOperation = (input: MessageListInput) => Effect.Effect export interface MessageApi { readonly list: MessageListOperation } -export type Endpoint7_0Input = { +export type ModelListInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint7_0Output = { readonly location: Location.Info; readonly data: ReadonlyArray } -export type ModelListOperation = (input?: Endpoint7_0Input) => Effect.Effect +export type ModelListOutput = { readonly location: Location.Info; readonly data: ReadonlyArray } +export type ModelListOperation = (input?: ModelListInput) => Effect.Effect -export type Endpoint7_1Input = { +export type ModelDefaultInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint7_1Output = { readonly location: Location.Info; readonly data: Model.Info | undefined } -export type ModelDefaultOperation = (input?: Endpoint7_1Input) => Effect.Effect +export type ModelDefaultOutput = { readonly location: Location.Info; readonly data: Model.Info | undefined } +export type ModelDefaultOperation = (input?: ModelDefaultInput) => Effect.Effect export interface ModelApi { readonly list: ModelListOperation readonly default: ModelDefaultOperation } -export type Endpoint8_0Input = { +export type GenerateTextInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined readonly prompt: string readonly model?: Model.Ref | undefined } -export type Endpoint8_0Output = { readonly text: string } -export type GenerateTextOperation = (input: Endpoint8_0Input) => Effect.Effect +export type GenerateTextOutput = { readonly text: string } +export type GenerateTextOperation = (input: GenerateTextInput) => Effect.Effect export interface GenerateApi { readonly text: GenerateTextOperation } -export type Endpoint9_0Input = { +export type ProviderListInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint9_0Output = { readonly location: Location.Info; readonly data: ReadonlyArray } -export type ProviderListOperation = (input?: Endpoint9_0Input) => Effect.Effect +export type ProviderListOutput = { readonly location: Location.Info; readonly data: ReadonlyArray } +export type ProviderListOperation = (input?: ProviderListInput) => Effect.Effect -export type Endpoint9_1Input = { +export type ProviderGetInput = { readonly providerID: Provider.ID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint9_1Output = { readonly location: Location.Info; readonly data: Provider.Info } -export type ProviderGetOperation = (input: Endpoint9_1Input) => Effect.Effect +export type ProviderGetOutput = { readonly location: Location.Info; readonly data: Provider.Info } +export type ProviderGetOperation = (input: ProviderGetInput) => Effect.Effect export interface ProviderApi { readonly list: ProviderListOperation readonly get: ProviderGetOperation } -export type Endpoint10_0Input = { +export type IntegrationListInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint10_0Output = { readonly location: Location.Info; readonly data: ReadonlyArray } -export type IntegrationListOperation = (input?: Endpoint10_0Input) => Effect.Effect +export type IntegrationListOutput = { readonly location: Location.Info; readonly data: ReadonlyArray } +export type IntegrationListOperation = ( + input?: IntegrationListInput, +) => Effect.Effect -export type Endpoint10_1Input = { +export type IntegrationGetInput = { readonly integrationID: Integration.ID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint10_1Output = { readonly location: Location.Info; readonly data: Integration.Info | undefined } -export type IntegrationGetOperation = (input: Endpoint10_1Input) => Effect.Effect +export type IntegrationGetOutput = { readonly location: Location.Info; readonly data: Integration.Info | undefined } +export type IntegrationGetOperation = (input: IntegrationGetInput) => Effect.Effect -export type Endpoint10_2Input = { +export type IntegrationWellknownAddInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined readonly url: string } -export type Endpoint10_2Output = void +export type IntegrationWellknownAddOutput = void export type IntegrationWellknownAddOperation = ( - input: Endpoint10_2Input, -) => Effect.Effect + input: IntegrationWellknownAddInput, +) => Effect.Effect -export type Endpoint10_3Input = { +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 Endpoint10_3Output = void +export type IntegrationConnectKeyOutput = void export type IntegrationConnectKeyOperation = ( - input: Endpoint10_3Input, -) => Effect.Effect + input: IntegrationConnectKeyInput, +) => Effect.Effect -export type Endpoint10_4Input = { +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 Endpoint10_4Output = { readonly location: Location.Info; readonly data: Integration.Attempt } +export type IntegrationOauthConnectOutput = { readonly location: Location.Info; readonly data: Integration.Attempt } export type IntegrationOauthConnectOperation = ( - input: Endpoint10_4Input, -) => Effect.Effect + input: IntegrationOauthConnectInput, +) => Effect.Effect -export type Endpoint10_5Input = { +export type IntegrationOauthStatusInput = { readonly integrationID: Integration.ID readonly attemptID: Integration.AttemptID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint10_5Output = { readonly location: Location.Info; readonly data: Integration.AttemptStatus } +export type IntegrationOauthStatusOutput = { + readonly location: Location.Info + readonly data: Integration.AttemptStatus +} export type IntegrationOauthStatusOperation = ( - input: Endpoint10_5Input, -) => Effect.Effect + input: IntegrationOauthStatusInput, +) => Effect.Effect -export type Endpoint10_6Input = { +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 Endpoint10_6Output = void +export type IntegrationOauthCompleteOutput = void export type IntegrationOauthCompleteOperation = ( - input: Endpoint10_6Input, -) => Effect.Effect + input: IntegrationOauthCompleteInput, +) => Effect.Effect -export type Endpoint10_7Input = { +export type IntegrationOauthCancelInput = { readonly integrationID: Integration.ID readonly attemptID: Integration.AttemptID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint10_7Output = void +export type IntegrationOauthCancelOutput = void export type IntegrationOauthCancelOperation = ( - input: Endpoint10_7Input, -) => Effect.Effect + input: IntegrationOauthCancelInput, +) => Effect.Effect -export type Endpoint10_8Input = { +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 Endpoint10_8Output = { readonly location: Location.Info; readonly data: Integration.CommandAttempt } +export type IntegrationCommandConnectOutput = { + readonly location: Location.Info + readonly data: Integration.CommandAttempt +} export type IntegrationCommandConnectOperation = ( - input: Endpoint10_8Input, -) => Effect.Effect + input: IntegrationCommandConnectInput, +) => Effect.Effect -export type Endpoint10_9Input = { +export type IntegrationCommandStatusInput = { readonly integrationID: Integration.ID readonly attemptID: Integration.AttemptID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint10_9Output = { readonly location: Location.Info; readonly data: Integration.CommandAttemptStatus } +export type IntegrationCommandStatusOutput = { + readonly location: Location.Info + readonly data: Integration.CommandAttemptStatus +} export type IntegrationCommandStatusOperation = ( - input: Endpoint10_9Input, -) => Effect.Effect + input: IntegrationCommandStatusInput, +) => Effect.Effect -export type Endpoint10_10Input = { +export type IntegrationCommandCancelInput = { readonly integrationID: Integration.ID readonly attemptID: Integration.AttemptID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint10_10Output = void +export type IntegrationCommandCancelOutput = void export type IntegrationCommandCancelOperation = ( - input: Endpoint10_10Input, -) => Effect.Effect + input: IntegrationCommandCancelInput, +) => Effect.Effect export interface IntegrationApi { readonly list: IntegrationListOperation @@ -1170,46 +1212,48 @@ export interface IntegrationApi { } } -export type Endpoint11_0Input = { +export type McpListInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint11_0Output = { readonly location: Location.Info; readonly data: ReadonlyArray } -export type McpListOperation = (input?: Endpoint11_0Input) => Effect.Effect +export type McpListOutput = { readonly location: Location.Info; readonly data: ReadonlyArray } +export type McpListOperation = (input?: McpListInput) => Effect.Effect -export type Endpoint11_1Input = { +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 Endpoint11_1Output = void -export type McpAddOperation = (input: Endpoint11_1Input) => Effect.Effect +export type McpAddOutput = void +export type McpAddOperation = (input: McpAddInput) => Effect.Effect -export type Endpoint11_2Input = { +export type McpRemoveInput = { readonly server: string readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint11_2Output = void -export type McpRemoveOperation = (input: Endpoint11_2Input) => Effect.Effect +export type McpRemoveOutput = void +export type McpRemoveOperation = (input: McpRemoveInput) => Effect.Effect -export type Endpoint11_3Input = { +export type McpConnectInput = { readonly server: string readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint11_3Output = void -export type McpConnectOperation = (input: Endpoint11_3Input) => Effect.Effect +export type McpConnectOutput = void +export type McpConnectOperation = (input: McpConnectInput) => Effect.Effect -export type Endpoint11_4Input = { +export type McpDisconnectInput = { readonly server: string readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint11_4Output = void -export type McpDisconnectOperation = (input: Endpoint11_4Input) => Effect.Effect +export type McpDisconnectOutput = void +export type McpDisconnectOperation = (input: McpDisconnectInput) => Effect.Effect -export type Endpoint11_5Input = { +export type McpResourceCatalogInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint11_5Output = { readonly location: Location.Info; readonly data: Mcp.ResourceCatalog } -export type McpResourceCatalogOperation = (input?: Endpoint11_5Input) => Effect.Effect +export type McpResourceCatalogOutput = { readonly location: Location.Info; readonly data: Mcp.ResourceCatalog } +export type McpResourceCatalogOperation = ( + input?: McpResourceCatalogInput, +) => Effect.Effect export interface McpApi { readonly list: McpListOperation @@ -1220,75 +1264,81 @@ export interface McpApi { readonly resource: { readonly catalog: McpResourceCatalogOperation } } -export type Endpoint12_0Input = { +export type CredentialUpdateInput = { readonly credentialID: Credential.ID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined readonly label: string } -export type Endpoint12_0Output = void -export type CredentialUpdateOperation = (input: Endpoint12_0Input) => Effect.Effect +export type CredentialUpdateOutput = void +export type CredentialUpdateOperation = ( + input: CredentialUpdateInput, +) => Effect.Effect -export type Endpoint12_1Input = { +export type CredentialRemoveInput = { readonly credentialID: Credential.ID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint12_1Output = void -export type CredentialRemoveOperation = (input: Endpoint12_1Input) => Effect.Effect +export type CredentialRemoveOutput = void +export type CredentialRemoveOperation = ( + input: CredentialRemoveInput, +) => Effect.Effect export interface CredentialApi { readonly update: CredentialUpdateOperation readonly remove: CredentialRemoveOperation } -export type Endpoint13_0Output = ReadonlyArray -export type ProjectListOperation = () => Effect.Effect +export type ProjectListOutput = ReadonlyArray +export type ProjectListOperation = () => Effect.Effect -export type Endpoint13_1Input = { +export type ProjectCurrentInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint13_1Output = Project.Current -export type ProjectCurrentOperation = (input?: Endpoint13_1Input) => Effect.Effect +export type ProjectCurrentOutput = Project.Current +export type ProjectCurrentOperation = (input?: ProjectCurrentInput) => Effect.Effect export interface ProjectApi { readonly list: ProjectListOperation readonly current: ProjectCurrentOperation } -export type Endpoint14_0Input = { +export type FormRequestListInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint14_0Output = { readonly location: Location.Info; readonly data: ReadonlyArray } -export type FormRequestListOperation = (input?: Endpoint14_0Input) => Effect.Effect +export type FormRequestListOutput = { readonly location: Location.Info; readonly data: ReadonlyArray } +export type FormRequestListOperation = ( + input?: FormRequestListInput, +) => Effect.Effect -export type Endpoint14_1Input = { readonly sessionID: string } -export type Endpoint14_1Output = ReadonlyArray -export type FormListOperation = (input: Endpoint14_1Input) => Effect.Effect +export type FormListInput = { readonly sessionID: string } +export type FormListOutput = ReadonlyArray +export type FormListOperation = (input: FormListInput) => Effect.Effect -export type Endpoint14_2Input = { +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 Endpoint14_2Output = Form.Info -export type FormCreateOperation = (input: Endpoint14_2Input) => Effect.Effect +export type FormCreateOutput = Form.Info +export type FormCreateOperation = (input: FormCreateInput) => Effect.Effect -export type Endpoint14_3Input = { readonly sessionID: string; readonly formID: Form.ID } -export type Endpoint14_3Output = Form.Info -export type FormGetOperation = (input: Endpoint14_3Input) => Effect.Effect +export type FormGetInput = { readonly sessionID: string; readonly formID: Form.ID } +export type FormGetOutput = Form.Info +export type FormGetOperation = (input: FormGetInput) => Effect.Effect -export type Endpoint14_4Input = { readonly sessionID: string; readonly formID: Form.ID } -export type Endpoint14_4Output = Form.State -export type FormStateOperation = (input: Endpoint14_4Input) => Effect.Effect +export type FormStateInput = { readonly sessionID: string; readonly formID: Form.ID } +export type FormStateOutput = Form.State +export type FormStateOperation = (input: FormStateInput) => Effect.Effect -export type Endpoint14_5Input = { readonly sessionID: string; readonly formID: Form.ID; readonly answer: Form.Answer } -export type Endpoint14_5Output = void -export type FormReplyOperation = (input: Endpoint14_5Input) => Effect.Effect +export type FormReplyInput = { readonly sessionID: string; readonly formID: Form.ID; readonly answer: Form.Answer } +export type FormReplyOutput = void +export type FormReplyOperation = (input: FormReplyInput) => Effect.Effect -export type Endpoint14_6Input = { readonly sessionID: string; readonly formID: Form.ID } -export type Endpoint14_6Output = void -export type FormCancelOperation = (input: Endpoint14_6Input) => Effect.Effect +export type FormCancelInput = { readonly sessionID: string; readonly formID: Form.ID } +export type FormCancelOutput = void +export type FormCancelOperation = (input: FormCancelInput) => Effect.Effect export interface FormApi { readonly request: { readonly list: FormRequestListOperation } @@ -1300,27 +1350,30 @@ export interface FormApi { readonly cancel: FormCancelOperation } -export type Endpoint15_0Input = { +export type PermissionRequestListInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint15_0Output = { readonly location: Location.Info; readonly data: ReadonlyArray } +export type PermissionRequestListOutput = { + readonly location: Location.Info + readonly data: ReadonlyArray +} export type PermissionRequestListOperation = ( - input?: Endpoint15_0Input, -) => Effect.Effect + input?: PermissionRequestListInput, +) => Effect.Effect -export type Endpoint15_1Input = { readonly projectID?: Project.ID | undefined } -export type Endpoint15_1Output = ReadonlyArray +export type PermissionSavedListInput = { readonly projectID?: Project.ID | undefined } +export type PermissionSavedListOutput = ReadonlyArray export type PermissionSavedListOperation = ( - input?: Endpoint15_1Input, -) => Effect.Effect + input?: PermissionSavedListInput, +) => Effect.Effect -export type Endpoint15_2Input = { readonly id: PermissionSaved.ID } -export type Endpoint15_2Output = void +export type PermissionSavedRemoveInput = { readonly id: PermissionSaved.ID } +export type PermissionSavedRemoveOutput = void export type PermissionSavedRemoveOperation = ( - input: Endpoint15_2Input, -) => Effect.Effect + input: PermissionSavedRemoveInput, +) => Effect.Effect -export type Endpoint15_3Input = { +export type PermissionCreateInput = { readonly sessionID: Session.ID readonly id?: Permission.ID | undefined readonly action: string @@ -1330,25 +1383,29 @@ export type Endpoint15_3Input = { readonly source?: Permission.Source | undefined readonly agent?: Agent.ID | undefined } -export type Endpoint15_3Output = { readonly id: Permission.ID; readonly effect: Permission.Effect } -export type PermissionCreateOperation = (input: Endpoint15_3Input) => Effect.Effect +export type PermissionCreateOutput = { readonly id: Permission.ID; readonly effect: Permission.Effect } +export type PermissionCreateOperation = ( + input: PermissionCreateInput, +) => Effect.Effect -export type Endpoint15_4Input = { readonly sessionID: Session.ID } -export type Endpoint15_4Output = ReadonlyArray -export type PermissionListOperation = (input: Endpoint15_4Input) => Effect.Effect +export type PermissionListInput = { readonly sessionID: Session.ID } +export type PermissionListOutput = ReadonlyArray +export type PermissionListOperation = (input: PermissionListInput) => Effect.Effect -export type Endpoint15_5Input = { readonly sessionID: Session.ID; readonly requestID: Permission.ID } -export type Endpoint15_5Output = Permission.Request -export type PermissionGetOperation = (input: Endpoint15_5Input) => Effect.Effect +export type PermissionGetInput = { readonly sessionID: Session.ID; readonly requestID: Permission.ID } +export type PermissionGetOutput = Permission.Request +export type PermissionGetOperation = (input: PermissionGetInput) => Effect.Effect -export type Endpoint15_6Input = { +export type PermissionReplyInput = { readonly sessionID: Session.ID readonly requestID: Permission.ID readonly reply: Permission.Reply readonly message?: string | undefined } -export type Endpoint15_6Output = void -export type PermissionReplyOperation = (input: Endpoint15_6Input) => Effect.Effect +export type PermissionReplyOutput = void +export type PermissionReplyOperation = ( + input: PermissionReplyInput, +) => Effect.Effect export interface PermissionApi { readonly request: { readonly list: PermissionRequestListOperation } @@ -1359,61 +1416,61 @@ export interface PermissionApi { readonly reply: PermissionReplyOperation } -export type Endpoint16_0Input = { +export type FileListInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined readonly path?: RelativePath | undefined } -export type Endpoint16_0Output = { readonly location: Location.Info; readonly data: ReadonlyArray } -export type FileListOperation = (input?: Endpoint16_0Input) => Effect.Effect +export type FileListOutput = { readonly location: Location.Info; readonly data: ReadonlyArray } +export type FileListOperation = (input?: FileListInput) => Effect.Effect -export type Endpoint16_1Input = { +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 Endpoint16_1Output = { readonly location: Location.Info; readonly data: ReadonlyArray } -export type FileFindOperation = (input: Endpoint16_1Input) => Effect.Effect +export type FileFindOutput = { readonly location: Location.Info; readonly data: ReadonlyArray } +export type FileFindOperation = (input: FileFindInput) => Effect.Effect export interface FileApi { readonly list: FileListOperation readonly find: FileFindOperation } -export type Endpoint17_0Input = { +export type CommandListInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint17_0Output = { readonly location: Location.Info; readonly data: ReadonlyArray } -export type CommandListOperation = (input?: Endpoint17_0Input) => Effect.Effect +export type CommandListOutput = { readonly location: Location.Info; readonly data: ReadonlyArray } +export type CommandListOperation = (input?: CommandListInput) => Effect.Effect export interface CommandApi { readonly list: CommandListOperation } -export type Endpoint18_0Input = { +export type SkillListInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint18_0Output = { readonly location: Location.Info; readonly data: ReadonlyArray } -export type SkillListOperation = (input?: Endpoint18_0Input) => Effect.Effect +export type SkillListOutput = { readonly location: Location.Info; readonly data: ReadonlyArray } +export type SkillListOperation = (input?: SkillListInput) => Effect.Effect export interface SkillApi { readonly list: SkillListOperation } -export type Endpoint19_0Output = OpenCodeEvent -export type EventSubscribeOperation = () => Stream.Stream +export type EventSubscribeOutput = OpenCodeEvent +export type EventSubscribeOperation = () => Stream.Stream export interface EventApi { readonly subscribe: EventSubscribeOperation } -export type Endpoint20_0Input = { +export type PtyListInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint20_0Output = { readonly location: Location.Info; readonly data: ReadonlyArray } -export type PtyListOperation = (input?: Endpoint20_0Input) => Effect.Effect +export type PtyListOutput = { readonly location: Location.Info; readonly data: ReadonlyArray } +export type PtyListOperation = (input?: PtyListInput) => Effect.Effect -export type Endpoint20_1Input = { +export type PtyCreateInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined readonly command?: string | undefined readonly args?: ReadonlyArray | undefined @@ -1421,39 +1478,41 @@ export type Endpoint20_1Input = { readonly title?: string | undefined readonly env?: { readonly [x: string]: string } | undefined } -export type Endpoint20_1Output = { readonly location: Location.Info; readonly data: Pty.Info } -export type PtyCreateOperation = (input?: Endpoint20_1Input) => Effect.Effect +export type PtyCreateOutput = { readonly location: Location.Info; readonly data: Pty.Info } +export type PtyCreateOperation = (input?: PtyCreateInput) => Effect.Effect -export type Endpoint20_2Input = { +export type PtyGetInput = { readonly ptyID: Pty.ID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint20_2Output = { readonly location: Location.Info; readonly data: Pty.Info } -export type PtyGetOperation = (input: Endpoint20_2Input) => Effect.Effect +export type PtyGetOutput = { readonly location: Location.Info; readonly data: Pty.Info } +export type PtyGetOperation = (input: PtyGetInput) => Effect.Effect -export type Endpoint20_3Input = { +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 Endpoint20_3Output = { readonly location: Location.Info; readonly data: Pty.Info } -export type PtyUpdateOperation = (input: Endpoint20_3Input) => Effect.Effect +export type PtyUpdateOutput = { readonly location: Location.Info; readonly data: Pty.Info } +export type PtyUpdateOperation = (input: PtyUpdateInput) => Effect.Effect -export type Endpoint20_4Input = { +export type PtyRemoveInput = { readonly ptyID: Pty.ID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint20_4Output = void -export type PtyRemoveOperation = (input: Endpoint20_4Input) => Effect.Effect +export type PtyRemoveOutput = void +export type PtyRemoveOperation = (input: PtyRemoveInput) => Effect.Effect -export type Endpoint20_5Input = { +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 Endpoint20_5Output = { readonly location: Location.Info; readonly data: PtyTicket.ConnectToken } -export type PtyConnectTokenOperation = (input: Endpoint20_5Input) => Effect.Effect +export type PtyConnectTokenOutput = { readonly location: Location.Info; readonly data: PtyTicket.ConnectToken } +export type PtyConnectTokenOperation = ( + input: PtyConnectTokenInput, +) => Effect.Effect export interface PtyApi { readonly list: PtyListOperation @@ -1464,44 +1523,44 @@ export interface PtyApi { readonly connect: { readonly token: PtyConnectTokenOperation } } -export type Endpoint21_0Input = { +export type ShellListInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint21_0Output = { readonly location: Location.Info; readonly data: ReadonlyArray } -export type ShellListOperation = (input?: Endpoint21_0Input) => Effect.Effect +export type ShellListOutput = { readonly location: Location.Info; readonly data: ReadonlyArray } +export type ShellListOperation = (input?: ShellListInput) => Effect.Effect -export type Endpoint21_1Input = { +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 Endpoint21_1Output = { readonly location: Location.Info; readonly data: Shell.Info } -export type ShellCreateOperation = (input: Endpoint21_1Input) => Effect.Effect +export type ShellCreateOutput = { readonly location: Location.Info; readonly data: Shell.Info } +export type ShellCreateOperation = (input: ShellCreateInput) => Effect.Effect -export type Endpoint21_2Input = { +export type ShellGetInput = { readonly id: Shell.ID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint21_2Output = { readonly location: Location.Info; readonly data: Shell.Info } -export type ShellGetOperation = (input: Endpoint21_2Input) => Effect.Effect +export type ShellGetOutput = { readonly location: Location.Info; readonly data: Shell.Info } +export type ShellGetOperation = (input: ShellGetInput) => Effect.Effect -export type Endpoint21_3Input = { +export type ShellTimeoutInput = { readonly id: Shell.ID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined readonly timeout: number } -export type Endpoint21_3Output = { readonly location: Location.Info; readonly data: Shell.Info } -export type ShellTimeoutOperation = (input: Endpoint21_3Input) => Effect.Effect +export type ShellTimeoutOutput = { readonly location: Location.Info; readonly data: Shell.Info } +export type ShellTimeoutOperation = (input: ShellTimeoutInput) => Effect.Effect -export type Endpoint21_4Input = { +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 Endpoint21_4Output = { +export type ShellOutputOutput = { readonly location: Location.Info readonly data: { readonly output: string @@ -1510,14 +1569,14 @@ export type Endpoint21_4Output = { readonly truncated: boolean } } -export type ShellOutputOperation = (input: Endpoint21_4Input) => Effect.Effect +export type ShellOutputOperation = (input: ShellOutputInput) => Effect.Effect -export type Endpoint21_5Input = { +export type ShellRemoveInput = { readonly id: Shell.ID readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint21_5Output = void -export type ShellRemoveOperation = (input: Endpoint21_5Input) => Effect.Effect +export type ShellRemoveOutput = void +export type ShellRemoveOperation = (input: ShellRemoveInput) => Effect.Effect export interface ShellApi { readonly list: ShellListOperation @@ -1528,41 +1587,43 @@ export interface ShellApi { readonly remove: ShellRemoveOperation } -export type Endpoint22_0Input = { +export type ReferenceListInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint22_0Output = { readonly location: Location.Info; readonly data: ReadonlyArray } -export type ReferenceListOperation = (input?: Endpoint22_0Input) => Effect.Effect +export type ReferenceListOutput = { readonly location: Location.Info; readonly data: ReadonlyArray } +export type ReferenceListOperation = (input?: ReferenceListInput) => Effect.Effect export interface ReferenceApi { readonly list: ReferenceListOperation } -export type Endpoint23_0Input = { readonly projectID: Project.ID } -export type Endpoint23_0Output = Worktree.List -export type WorktreeListOperation = (input: Endpoint23_0Input) => Effect.Effect +export type WorktreeListInput = { readonly projectID: Project.ID } +export type WorktreeListOutput = Worktree.List +export type WorktreeListOperation = (input: WorktreeListInput) => Effect.Effect -export type Endpoint23_1Input = { +export type WorktreeCreateInput = { readonly projectID: Project.ID readonly strategy: Worktree.StrategyID readonly from?: AbsolutePath | undefined readonly directory: AbsolutePath readonly name?: string | undefined } -export type Endpoint23_1Output = Worktree.Info -export type WorktreeCreateOperation = (input: Endpoint23_1Input) => Effect.Effect +export type WorktreeCreateOutput = Worktree.Info +export type WorktreeCreateOperation = (input: WorktreeCreateInput) => Effect.Effect -export type Endpoint23_2Input = { +export type WorktreeRemoveInput = { readonly projectID: Project.ID readonly directory: AbsolutePath readonly force: boolean } -export type Endpoint23_2Output = void -export type WorktreeRemoveOperation = (input: Endpoint23_2Input) => Effect.Effect +export type WorktreeRemoveOutput = void +export type WorktreeRemoveOperation = (input: WorktreeRemoveInput) => Effect.Effect -export type Endpoint23_3Input = { readonly projectID: Project.ID } -export type Endpoint23_3Output = void -export type WorktreeRefreshOperation = (input: Endpoint23_3Input) => Effect.Effect +export type WorktreeRefreshInput = { readonly projectID: Project.ID } +export type WorktreeRefreshOutput = void +export type WorktreeRefreshOperation = ( + input: WorktreeRefreshInput, +) => Effect.Effect export interface WorktreeApi { readonly list: WorktreeListOperation @@ -1571,25 +1632,25 @@ export interface WorktreeApi { readonly refresh: WorktreeRefreshOperation } -export type Endpoint24_0Input = { +export type VcsGetInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint24_0Output = { readonly location: Location.Info; readonly data: Vcs.Info } -export type VcsGetOperation = (input?: Endpoint24_0Input) => Effect.Effect +export type VcsGetOutput = { readonly location: Location.Info; readonly data: Vcs.Info } +export type VcsGetOperation = (input?: VcsGetInput) => Effect.Effect -export type Endpoint24_1Input = { +export type VcsStatusInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint24_1Output = { readonly location: Location.Info; readonly data: ReadonlyArray } -export type VcsStatusOperation = (input?: Endpoint24_1Input) => Effect.Effect +export type VcsStatusOutput = { readonly location: Location.Info; readonly data: ReadonlyArray } +export type VcsStatusOperation = (input?: VcsStatusInput) => Effect.Effect -export type Endpoint24_2Input = { +export type VcsDiffInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined readonly mode: Vcs.Mode readonly context?: number | undefined } -export type Endpoint24_2Output = { readonly location: Location.Info; readonly data: ReadonlyArray } -export type VcsDiffOperation = (input: Endpoint24_2Input) => Effect.Effect +export type VcsDiffOutput = { readonly location: Location.Info; readonly data: ReadonlyArray } +export type VcsDiffOperation = (input: VcsDiffInput) => Effect.Effect export interface VcsApi { readonly get: VcsGetOperation @@ -1597,20 +1658,22 @@ export interface VcsApi { readonly diff: VcsDiffOperation } -export type Endpoint25_0Output = ReadonlyArray -export type DebugLocationListOperation = () => Effect.Effect +export type DebugLocationListOutput = ReadonlyArray +export type DebugLocationListOperation = () => Effect.Effect -export type Endpoint25_1Input = { +export type DebugLocationEvictInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint25_1Output = void -export type DebugLocationEvictOperation = (input?: Endpoint25_1Input) => Effect.Effect +export type DebugLocationEvictOutput = void +export type DebugLocationEvictOperation = ( + input?: DebugLocationEvictInput, +) => Effect.Effect export interface DebugApi { readonly location: { readonly list: DebugLocationListOperation; readonly evict: DebugLocationEvictOperation } } -export type Endpoint26_0Output = +export type MigrationV1StatusOutput = | { readonly status: "required" | "completed" } | { readonly status: "running" @@ -1621,36 +1684,41 @@ export type Endpoint26_0Output = } } | { readonly status: "error"; readonly error: string } -export type MigrationV1StatusOperation = () => Effect.Effect +export type MigrationV1StatusOperation = () => Effect.Effect export interface MigrationApi { readonly v1: { readonly status: MigrationV1StatusOperation } } -export type Endpoint27_0Input = { +export type WebsearchProvidersInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint27_0Output = { readonly location: Location.Info; readonly data: ReadonlyArray } -export type WebsearchProvidersOperation = (input?: Endpoint27_0Input) => Effect.Effect +export type WebsearchProvidersOutput = { + readonly location: Location.Info + readonly data: ReadonlyArray +} +export type WebsearchProvidersOperation = ( + input?: WebsearchProvidersInput, +) => Effect.Effect -export type Endpoint27_1Input = { +export type WebsearchQueryInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined readonly query: string readonly providerID?: WebSearch.ID | undefined } -export type Endpoint27_1Output = { readonly location: Location.Info; readonly data: WebSearch.Response } -export type WebsearchQueryOperation = (input: Endpoint27_1Input) => Effect.Effect +export type WebsearchQueryOutput = { readonly location: Location.Info; readonly data: WebSearch.Response } +export type WebsearchQueryOperation = (input: WebsearchQueryInput) => Effect.Effect export interface WebsearchApi { readonly providers: WebsearchProvidersOperation readonly query: WebsearchQueryOperation } -export type Endpoint28_0Input = { +export type ConfigGetInput = { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined } -export type Endpoint28_0Output = ReadonlyArray -export type ConfigGetOperation = (input?: Endpoint28_0Input) => Effect.Effect +export type ConfigGetOutput = ReadonlyArray +export type ConfigGetOperation = (input?: ConfigGetInput) => Effect.Effect export interface ConfigApi { readonly get: ConfigGetOperation diff --git a/packages/client/src/effect/generated/client.ts b/packages/client/src/effect/generated/client.ts index 0bfba2daab7..c1a4e08065b 100644 --- a/packages/client/src/effect/generated/client.ts +++ b/packages/client/src/effect/generated/client.ts @@ -5,229 +5,229 @@ import { HttpClientError } from "effect/unstable/http" import { HttpApiClient } from "effect/unstable/httpapi" import { ClientApi } from "../../contract" import type { - Endpoint0_0Output, - Endpoint1_0Output, - Endpoint2_0Input, - Endpoint2_0Output, - Endpoint3_0Input, - Endpoint3_0Output, - Endpoint3_1Input, - Endpoint3_1Output, - Endpoint4_0Input, - Endpoint4_0Output, - Endpoint5_0Input, - Endpoint5_0Output, - Endpoint5_1Input, - Endpoint5_1Output, - Endpoint5_2Input, - Endpoint5_2Output, - Endpoint5_3Input, - Endpoint5_3Output, - Endpoint5_4Output, - Endpoint5_5Input, - Endpoint5_5Output, - Endpoint5_6Input, - Endpoint5_6Output, - Endpoint5_7Input, - Endpoint5_7Output, - Endpoint5_8Input, - Endpoint5_8Output, - Endpoint5_9Input, - Endpoint5_9Output, - Endpoint5_10Input, - Endpoint5_10Output, - Endpoint5_11Input, - Endpoint5_11Output, - Endpoint5_12Input, - Endpoint5_12Output, - Endpoint5_13Input, - Endpoint5_13Output, - Endpoint5_14Input, - Endpoint5_14Output, - Endpoint5_15Input, - Endpoint5_15Output, - Endpoint5_16Input, - Endpoint5_16Output, - Endpoint5_17Input, - Endpoint5_17Output, - Endpoint5_18Input, - Endpoint5_18Output, - Endpoint5_19Input, - Endpoint5_19Output, - Endpoint5_20Input, - Endpoint5_20Output, - Endpoint5_21Input, - Endpoint5_21Output, - Endpoint5_22Input, - Endpoint5_22Output, - Endpoint5_23Input, - Endpoint5_23Output, - Endpoint5_24Input, - Endpoint5_24Output, - Endpoint5_25Input, - Endpoint5_25Output, - Endpoint5_26Input, - Endpoint5_26Output, - Endpoint5_27Input, - Endpoint5_27Output, - Endpoint5_28Input, - Endpoint5_28Output, - Endpoint5_29Input, - Endpoint5_29Output, - Endpoint5_30Input, - Endpoint5_30Output, - Endpoint5_31Input, - Endpoint5_31Output, - Endpoint5_32Input, - Endpoint5_32Output, - Endpoint5_33Input, - Endpoint5_33Output, - Endpoint5_34Input, - Endpoint5_34Output, - Endpoint5_35Input, - Endpoint5_35Output, - Endpoint5_36Input, - Endpoint5_36Output, - Endpoint6_0Input, - Endpoint6_0Output, - Endpoint7_0Input, - Endpoint7_0Output, - Endpoint7_1Input, - Endpoint7_1Output, - Endpoint8_0Input, - Endpoint8_0Output, - Endpoint9_0Input, - Endpoint9_0Output, - Endpoint9_1Input, - Endpoint9_1Output, - Endpoint10_0Input, - Endpoint10_0Output, - Endpoint10_1Input, - Endpoint10_1Output, - Endpoint10_2Input, - Endpoint10_2Output, - Endpoint10_3Input, - Endpoint10_3Output, - Endpoint10_4Input, - Endpoint10_4Output, - Endpoint10_5Input, - Endpoint10_5Output, - Endpoint10_6Input, - Endpoint10_6Output, - Endpoint10_7Input, - Endpoint10_7Output, - Endpoint10_8Input, - Endpoint10_8Output, - Endpoint10_9Input, - Endpoint10_9Output, - Endpoint10_10Input, - Endpoint10_10Output, - Endpoint11_0Input, - Endpoint11_0Output, - Endpoint11_1Input, - Endpoint11_1Output, - Endpoint11_2Input, - Endpoint11_2Output, - Endpoint11_3Input, - Endpoint11_3Output, - Endpoint11_4Input, - Endpoint11_4Output, - Endpoint11_5Input, - Endpoint11_5Output, - Endpoint12_0Input, - Endpoint12_0Output, - Endpoint12_1Input, - Endpoint12_1Output, - Endpoint13_0Output, - Endpoint13_1Input, - Endpoint13_1Output, - Endpoint14_0Input, - Endpoint14_0Output, - Endpoint14_1Input, - Endpoint14_1Output, - Endpoint14_2Input, - Endpoint14_2Output, - Endpoint14_3Input, - Endpoint14_3Output, - Endpoint14_4Input, - Endpoint14_4Output, - Endpoint14_5Input, - Endpoint14_5Output, - Endpoint14_6Input, - Endpoint14_6Output, - Endpoint15_0Input, - Endpoint15_0Output, - Endpoint15_1Input, - Endpoint15_1Output, - Endpoint15_2Input, - Endpoint15_2Output, - Endpoint15_3Input, - Endpoint15_3Output, - Endpoint15_4Input, - Endpoint15_4Output, - Endpoint15_5Input, - Endpoint15_5Output, - Endpoint15_6Input, - Endpoint15_6Output, - Endpoint16_0Input, - Endpoint16_0Output, - Endpoint16_1Input, - Endpoint16_1Output, - Endpoint17_0Input, - Endpoint17_0Output, - Endpoint18_0Input, - Endpoint18_0Output, - Endpoint19_0Output, - Endpoint20_0Input, - Endpoint20_0Output, - Endpoint20_1Input, - Endpoint20_1Output, - Endpoint20_2Input, - Endpoint20_2Output, - Endpoint20_3Input, - Endpoint20_3Output, - Endpoint20_4Input, - Endpoint20_4Output, - Endpoint20_5Input, - Endpoint20_5Output, - Endpoint21_0Input, - Endpoint21_0Output, - Endpoint21_1Input, - Endpoint21_1Output, - Endpoint21_2Input, - Endpoint21_2Output, - Endpoint21_3Input, - Endpoint21_3Output, - Endpoint21_4Input, - Endpoint21_4Output, - Endpoint21_5Input, - Endpoint21_5Output, - Endpoint22_0Input, - Endpoint22_0Output, - Endpoint23_0Input, - Endpoint23_0Output, - Endpoint23_1Input, - Endpoint23_1Output, - Endpoint23_2Input, - Endpoint23_2Output, - Endpoint23_3Input, - Endpoint23_3Output, - Endpoint24_0Input, - Endpoint24_0Output, - Endpoint24_1Input, - Endpoint24_1Output, - Endpoint24_2Input, - Endpoint24_2Output, - Endpoint25_0Output, - Endpoint25_1Input, - Endpoint25_1Output, - Endpoint26_0Output, - Endpoint27_0Input, - Endpoint27_0Output, - Endpoint27_1Input, - Endpoint27_1Output, - Endpoint28_0Input, - Endpoint28_0Output, + HealthGetOutput, + ServerGetOutput, + LocationGetInput, + LocationGetOutput, + AgentListInput, + AgentListOutput, + AgentGetInput, + AgentGetOutput, + PluginListInput, + PluginListOutput, + SessionListInput, + SessionListOutput, + SessionCreateInput, + SessionCreateOutput, + SessionImportInput, + SessionImportOutput, + SessionExportInput, + SessionExportOutput, + SessionActiveOutput, + SessionGetInput, + SessionGetOutput, + SessionRemoveInput, + SessionRemoveOutput, + SessionForkInput, + SessionForkOutput, + SessionSwitchAgentInput, + SessionSwitchAgentOutput, + SessionSwitchModelInput, + SessionSwitchModelOutput, + SessionRenameInput, + SessionRenameOutput, + SessionMoveInput, + SessionMoveOutput, + SessionPromptInput, + SessionPromptOutput, + SessionCommandInput, + SessionCommandOutput, + SessionSkillInput, + SessionSkillOutput, + SessionSyntheticInput, + SessionSyntheticOutput, + SessionShellInput, + SessionShellOutput, + SessionCompactInput, + SessionCompactOutput, + SessionWaitInput, + SessionWaitOutput, + SessionRevertStageInput, + SessionRevertStageOutput, + SessionRevertClearInput, + SessionRevertClearOutput, + SessionRevertCommitInput, + SessionRevertCommitOutput, + SessionContextInput, + SessionContextOutput, + SessionInboxListInput, + SessionInboxListOutput, + SessionInboxCancelInput, + SessionInboxCancelOutput, + SessionInboxSteerInput, + SessionInboxSteerOutput, + SessionInboxQueueInput, + SessionInboxQueueOutput, + SessionInstructionsEntryListInput, + SessionInstructionsEntryListOutput, + SessionInstructionsEntryPutInput, + SessionInstructionsEntryPutOutput, + SessionInstructionsEntryRemoveInput, + SessionInstructionsEntryRemoveOutput, + SessionGenerateInput, + SessionGenerateOutput, + SessionLogInput, + SessionLogOutput, + SessionInterruptInput, + SessionInterruptOutput, + SessionBackgroundInput, + SessionBackgroundOutput, + SessionMessageInput, + SessionMessageOutput, + SessionEnvironmentInput, + SessionEnvironmentOutput, + SessionViewInput, + SessionViewOutput, + MessageListInput, + MessageListOutput, + ModelListInput, + ModelListOutput, + ModelDefaultInput, + ModelDefaultOutput, + GenerateTextInput, + GenerateTextOutput, + ProviderListInput, + ProviderListOutput, + ProviderGetInput, + ProviderGetOutput, + IntegrationListInput, + IntegrationListOutput, + IntegrationGetInput, + IntegrationGetOutput, + IntegrationWellknownAddInput, + IntegrationWellknownAddOutput, + IntegrationConnectKeyInput, + IntegrationConnectKeyOutput, + IntegrationOauthConnectInput, + IntegrationOauthConnectOutput, + IntegrationOauthStatusInput, + IntegrationOauthStatusOutput, + IntegrationOauthCompleteInput, + IntegrationOauthCompleteOutput, + IntegrationOauthCancelInput, + IntegrationOauthCancelOutput, + IntegrationCommandConnectInput, + IntegrationCommandConnectOutput, + IntegrationCommandStatusInput, + IntegrationCommandStatusOutput, + IntegrationCommandCancelInput, + IntegrationCommandCancelOutput, + McpListInput, + McpListOutput, + McpAddInput, + McpAddOutput, + McpRemoveInput, + McpRemoveOutput, + McpConnectInput, + McpConnectOutput, + McpDisconnectInput, + McpDisconnectOutput, + McpResourceCatalogInput, + McpResourceCatalogOutput, + CredentialUpdateInput, + CredentialUpdateOutput, + CredentialRemoveInput, + CredentialRemoveOutput, + ProjectListOutput, + ProjectCurrentInput, + ProjectCurrentOutput, + FormRequestListInput, + FormRequestListOutput, + FormListInput, + FormListOutput, + FormCreateInput, + FormCreateOutput, + FormGetInput, + FormGetOutput, + FormStateInput, + FormStateOutput, + FormReplyInput, + FormReplyOutput, + FormCancelInput, + FormCancelOutput, + PermissionRequestListInput, + PermissionRequestListOutput, + PermissionSavedListInput, + PermissionSavedListOutput, + PermissionSavedRemoveInput, + PermissionSavedRemoveOutput, + PermissionCreateInput, + PermissionCreateOutput, + PermissionListInput, + PermissionListOutput, + PermissionGetInput, + PermissionGetOutput, + PermissionReplyInput, + PermissionReplyOutput, + FileListInput, + FileListOutput, + FileFindInput, + FileFindOutput, + CommandListInput, + CommandListOutput, + SkillListInput, + SkillListOutput, + EventSubscribeOutput, + PtyListInput, + PtyListOutput, + PtyCreateInput, + PtyCreateOutput, + PtyGetInput, + PtyGetOutput, + PtyUpdateInput, + PtyUpdateOutput, + PtyRemoveInput, + PtyRemoveOutput, + PtyConnectTokenInput, + PtyConnectTokenOutput, + ShellListInput, + ShellListOutput, + ShellCreateInput, + ShellCreateOutput, + ShellGetInput, + ShellGetOutput, + ShellTimeoutInput, + ShellTimeoutOutput, + ShellOutputInput, + ShellOutputOutput, + ShellRemoveInput, + ShellRemoveOutput, + ReferenceListInput, + ReferenceListOutput, + WorktreeListInput, + WorktreeListOutput, + WorktreeCreateInput, + WorktreeCreateOutput, + WorktreeRemoveInput, + WorktreeRemoveOutput, + WorktreeRefreshInput, + WorktreeRefreshOutput, + VcsGetInput, + VcsGetOutput, + VcsStatusInput, + VcsStatusOutput, + VcsDiffInput, + VcsDiffOutput, + DebugLocationListOutput, + DebugLocationEvictInput, + DebugLocationEvictOutput, + MigrationV1StatusOutput, + WebsearchProvidersInput, + WebsearchProvidersOutput, + WebsearchQueryInput, + WebsearchQueryOutput, + ConfigGetInput, + ConfigGetOutput, } from "../api/api.js" import { ClientError } from "./client-error.js" @@ -247,46 +247,49 @@ const preserveStream = (stream: Stream.Stream) => stream -const Endpoint0_0 = (raw: RawClient["server.health"]) => () => - preserveEffect()(raw["health.get"]({}).pipe(Effect.mapError(mapClientError))) +const EndpointHealthGet = (raw: RawClient["server.health"]) => () => + preserveEffect()(raw["health.get"]({}).pipe(Effect.mapError(mapClientError))) -const adaptGroup0 = (raw: RawClient["server.health"]) => ({ get: Endpoint0_0(raw) }) +const adaptGroupHealth = (raw: RawClient["server.health"]) => ({ get: EndpointHealthGet(raw) }) -const Endpoint1_0 = (raw: RawClient["server.server"]) => () => - preserveEffect()(raw["server.get"]({}).pipe(Effect.mapError(mapClientError))) +const EndpointServerGet = (raw: RawClient["server.server"]) => () => + preserveEffect()(raw["server.get"]({}).pipe(Effect.mapError(mapClientError))) -const adaptGroup1 = (raw: RawClient["server.server"]) => ({ get: Endpoint1_0(raw) }) +const adaptGroupServer = (raw: RawClient["server.server"]) => ({ get: EndpointServerGet(raw) }) -const Endpoint2_0 = (raw: RawClient["server.location"]) => (input?: Endpoint2_0Input) => - preserveEffect()( +const EndpointLocationGet = (raw: RawClient["server.location"]) => (input?: LocationGetInput) => + preserveEffect()( raw["location.get"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)), ) -const adaptGroup2 = (raw: RawClient["server.location"]) => ({ get: Endpoint2_0(raw) }) +const adaptGroupLocation = (raw: RawClient["server.location"]) => ({ get: EndpointLocationGet(raw) }) -const Endpoint3_0 = (raw: RawClient["server.agent"]) => (input?: Endpoint3_0Input) => - preserveEffect()( +const EndpointAgentList = (raw: RawClient["server.agent"]) => (input?: AgentListInput) => + preserveEffect()( raw["agent.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint3_1 = (raw: RawClient["server.agent"]) => (input: Endpoint3_1Input) => - preserveEffect()( +const EndpointAgentGet = (raw: RawClient["server.agent"]) => (input: AgentGetInput) => + preserveEffect()( raw["agent.get"]({ params: { agentID: input["agentID"] }, query: { location: input["location"] } }).pipe( Effect.mapError(mapClientError), ), ) -const adaptGroup3 = (raw: RawClient["server.agent"]) => ({ list: Endpoint3_0(raw), get: Endpoint3_1(raw) }) +const adaptGroupAgent = (raw: RawClient["server.agent"]) => ({ + list: EndpointAgentList(raw), + get: EndpointAgentGet(raw), +}) -const Endpoint4_0 = (raw: RawClient["server.plugin"]) => (input?: Endpoint4_0Input) => - preserveEffect()( +const EndpointPluginList = (raw: RawClient["server.plugin"]) => (input?: PluginListInput) => + preserveEffect()( raw["plugin.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)), ) -const adaptGroup4 = (raw: RawClient["server.plugin"]) => ({ list: Endpoint4_0(raw) }) +const adaptGroupPlugin = (raw: RawClient["server.plugin"]) => ({ list: EndpointPluginList(raw) }) -const Endpoint5_0 = (raw: RawClient["server.session"]) => (input?: Endpoint5_0Input) => - preserveEffect()( +const EndpointSessionList = (raw: RawClient["server.session"]) => (input?: SessionListInput) => + preserveEffect()( raw["session.list"]({ query: { workspace: input?.["workspace"], @@ -302,8 +305,8 @@ const Endpoint5_0 = (raw: RawClient["server.session"]) => (input?: Endpoint5_0In }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint5_1 = (raw: RawClient["server.session"]) => (input?: Endpoint5_1Input) => - preserveEffect()( +const EndpointSessionCreate = (raw: RawClient["server.session"]) => (input?: SessionCreateInput) => + preserveEffect()( raw["session.create"]({ payload: { id: input?.["id"], @@ -318,8 +321,8 @@ const Endpoint5_1 = (raw: RawClient["server.session"]) => (input?: Endpoint5_1In ), ) -const Endpoint5_2 = (raw: RawClient["server.session"]) => (input: Endpoint5_2Input) => - preserveEffect()( +const EndpointSessionImport = (raw: RawClient["server.session"]) => (input: SessionImportInput) => + preserveEffect()( raw["session.import"]({ payload: { info: input["info"], messages: input["messages"], location: input["location"] }, }).pipe( @@ -328,74 +331,74 @@ const Endpoint5_2 = (raw: RawClient["server.session"]) => (input: Endpoint5_2Inp ), ) -const Endpoint5_3 = (raw: RawClient["server.session"]) => (input: Endpoint5_3Input) => - preserveEffect()( +const EndpointSessionExport = (raw: RawClient["server.session"]) => (input: SessionExportInput) => + preserveEffect()( raw["session.export"]({ params: { sessionID: input["sessionID"] }, query: { sanitize: input["sanitize"] } }).pipe( Effect.mapError(mapClientError), Effect.map((value) => value.data), ), ) -const Endpoint5_4 = (raw: RawClient["server.session"]) => () => - preserveEffect()( +const EndpointSessionActive = (raw: RawClient["server.session"]) => () => + preserveEffect()( raw["session.active"]({}).pipe( Effect.mapError(mapClientError), Effect.map((value) => value.data), ), ) -const Endpoint5_5 = (raw: RawClient["server.session"]) => (input: Endpoint5_5Input) => - preserveEffect()( +const EndpointSessionGet = (raw: RawClient["server.session"]) => (input: SessionGetInput) => + preserveEffect()( raw["session.get"]({ params: { sessionID: input["sessionID"] } }).pipe( Effect.mapError(mapClientError), Effect.map((value) => value.data), ), ) -const Endpoint5_6 = (raw: RawClient["server.session"]) => (input: Endpoint5_6Input) => - preserveEffect()( +const EndpointSessionRemove = (raw: RawClient["server.session"]) => (input: SessionRemoveInput) => + preserveEffect()( raw["session.remove"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint5_7 = (raw: RawClient["server.session"]) => (input: Endpoint5_7Input) => - preserveEffect()( +const EndpointSessionFork = (raw: RawClient["server.session"]) => (input: SessionForkInput) => + preserveEffect()( raw["session.fork"]({ params: { sessionID: input["sessionID"] }, payload: { boundary: input["boundary"] } }).pipe( Effect.mapError(mapClientError), Effect.map((value) => value.data), ), ) -const Endpoint5_8 = (raw: RawClient["server.session"]) => (input: Endpoint5_8Input) => - preserveEffect()( +const EndpointSessionSwitchAgent = (raw: RawClient["server.session"]) => (input: SessionSwitchAgentInput) => + preserveEffect()( raw["session.switchAgent"]({ params: { sessionID: input["sessionID"] }, payload: { agent: input["agent"] } }).pipe( Effect.mapError(mapClientError), ), ) -const Endpoint5_9 = (raw: RawClient["server.session"]) => (input: Endpoint5_9Input) => - preserveEffect()( +const EndpointSessionSwitchModel = (raw: RawClient["server.session"]) => (input: SessionSwitchModelInput) => + preserveEffect()( raw["session.switchModel"]({ params: { sessionID: input["sessionID"] }, payload: { model: input["model"] } }).pipe( Effect.mapError(mapClientError), ), ) -const Endpoint5_10 = (raw: RawClient["server.session"]) => (input: Endpoint5_10Input) => - preserveEffect()( +const EndpointSessionRename = (raw: RawClient["server.session"]) => (input: SessionRenameInput) => + preserveEffect()( raw["session.rename"]({ params: { sessionID: input["sessionID"] }, payload: { title: input["title"] } }).pipe( Effect.mapError(mapClientError), ), ) -const Endpoint5_11 = (raw: RawClient["server.session"]) => (input: Endpoint5_11Input) => - preserveEffect()( +const EndpointSessionMove = (raw: RawClient["server.session"]) => (input: SessionMoveInput) => + preserveEffect()( raw["session.move"]({ params: { sessionID: input["sessionID"] }, payload: { directory: input["directory"], workspaceID: input["workspaceID"], delivery: input["delivery"] }, }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint5_12 = (raw: RawClient["server.session"]) => (input: Endpoint5_12Input) => - preserveEffect()( +const EndpointSessionPrompt = (raw: RawClient["server.session"]) => (input: SessionPromptInput) => + preserveEffect()( raw["session.prompt"]({ params: { sessionID: input["sessionID"] }, payload: { @@ -414,8 +417,8 @@ const Endpoint5_12 = (raw: RawClient["server.session"]) => (input: Endpoint5_12I ), ) -const Endpoint5_13 = (raw: RawClient["server.session"]) => (input: Endpoint5_13Input) => - preserveEffect()( +const EndpointSessionCommand = (raw: RawClient["server.session"]) => (input: SessionCommandInput) => + preserveEffect()( raw["session.command"]({ params: { sessionID: input["sessionID"] }, payload: { @@ -436,16 +439,16 @@ const Endpoint5_13 = (raw: RawClient["server.session"]) => (input: Endpoint5_13I ), ) -const Endpoint5_14 = (raw: RawClient["server.session"]) => (input: Endpoint5_14Input) => - preserveEffect()( +const EndpointSessionSkill = (raw: RawClient["server.session"]) => (input: SessionSkillInput) => + preserveEffect()( raw["session.skill"]({ params: { sessionID: input["sessionID"] }, payload: { id: input["id"], skill: input["skill"], resume: input["resume"] }, }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint5_15 = (raw: RawClient["server.session"]) => (input: Endpoint5_15Input) => - preserveEffect()( +const EndpointSessionSynthetic = (raw: RawClient["server.session"]) => (input: SessionSyntheticInput) => + preserveEffect()( raw["session.synthetic"]({ params: { sessionID: input["sessionID"] }, payload: { @@ -462,16 +465,16 @@ const Endpoint5_15 = (raw: RawClient["server.session"]) => (input: Endpoint5_15I ), ) -const Endpoint5_16 = (raw: RawClient["server.session"]) => (input: Endpoint5_16Input) => - preserveEffect()( +const EndpointSessionShell = (raw: RawClient["server.session"]) => (input: SessionShellInput) => + preserveEffect()( raw["session.shell"]({ params: { sessionID: input["sessionID"] }, payload: { id: input["id"], command: input["command"] }, }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint5_17 = (raw: RawClient["server.session"]) => (input: Endpoint5_17Input) => - preserveEffect()( +const EndpointSessionCompact = (raw: RawClient["server.session"]) => (input: SessionCompactInput) => + preserveEffect()( raw["session.compact"]({ params: { sessionID: input["sessionID"] }, payload: { id: input["id"], delivery: input["delivery"] }, @@ -481,13 +484,13 @@ const Endpoint5_17 = (raw: RawClient["server.session"]) => (input: Endpoint5_17I ), ) -const Endpoint5_18 = (raw: RawClient["server.session"]) => (input: Endpoint5_18Input) => - preserveEffect()( +const EndpointSessionWait = (raw: RawClient["server.session"]) => (input: SessionWaitInput) => + preserveEffect()( raw["session.wait"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint5_19 = (raw: RawClient["server.session"]) => (input: Endpoint5_19Input) => - preserveEffect()( +const EndpointSessionRevertStage = (raw: RawClient["server.session"]) => (input: SessionRevertStageInput) => + preserveEffect()( raw["session.revert.stage"]({ params: { sessionID: input["sessionID"] }, payload: { messageID: input["messageID"], files: input["files"] }, @@ -497,86 +500,89 @@ const Endpoint5_19 = (raw: RawClient["server.session"]) => (input: Endpoint5_19I ), ) -const Endpoint5_20 = (raw: RawClient["server.session"]) => (input: Endpoint5_20Input) => - preserveEffect()( +const EndpointSessionRevertClear = (raw: RawClient["server.session"]) => (input: SessionRevertClearInput) => + preserveEffect()( raw["session.revert.clear"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint5_21 = (raw: RawClient["server.session"]) => (input: Endpoint5_21Input) => - preserveEffect()( +const EndpointSessionRevertCommit = (raw: RawClient["server.session"]) => (input: SessionRevertCommitInput) => + preserveEffect()( raw["session.revert.commit"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint5_22 = (raw: RawClient["server.session"]) => (input: Endpoint5_22Input) => - preserveEffect()( +const EndpointSessionContext = (raw: RawClient["server.session"]) => (input: SessionContextInput) => + preserveEffect()( raw["session.context"]({ params: { sessionID: input["sessionID"] } }).pipe( Effect.mapError(mapClientError), Effect.map((value) => value.data), ), ) -const Endpoint5_23 = (raw: RawClient["server.session"]) => (input: Endpoint5_23Input) => - preserveEffect()( +const EndpointSessionInboxList = (raw: RawClient["server.session"]) => (input: SessionInboxListInput) => + preserveEffect()( raw["session.inbox.list"]({ params: { sessionID: input["sessionID"] } }).pipe( Effect.mapError(mapClientError), Effect.map((value) => value.data), ), ) -const Endpoint5_24 = (raw: RawClient["server.session"]) => (input: Endpoint5_24Input) => - preserveEffect()( +const EndpointSessionInboxCancel = (raw: RawClient["server.session"]) => (input: SessionInboxCancelInput) => + preserveEffect()( raw["session.inbox.cancel"]({ params: { sessionID: input["sessionID"], inboxID: input["inboxID"] } }).pipe( Effect.mapError(mapClientError), ), ) -const Endpoint5_25 = (raw: RawClient["server.session"]) => (input: Endpoint5_25Input) => - preserveEffect()( +const EndpointSessionInboxSteer = (raw: RawClient["server.session"]) => (input: SessionInboxSteerInput) => + preserveEffect()( raw["session.inbox.steer"]({ params: { sessionID: input["sessionID"], inboxID: input["inboxID"] } }).pipe( Effect.mapError(mapClientError), ), ) -const Endpoint5_26 = (raw: RawClient["server.session"]) => (input: Endpoint5_26Input) => - preserveEffect()( +const EndpointSessionInboxQueue = (raw: RawClient["server.session"]) => (input: SessionInboxQueueInput) => + preserveEffect()( raw["session.inbox.queue"]({ params: { sessionID: input["sessionID"], inboxID: input["inboxID"] } }).pipe( Effect.mapError(mapClientError), ), ) -const Endpoint5_27 = (raw: RawClient["server.session"]) => (input: Endpoint5_27Input) => - preserveEffect()( - raw["session.instructions.entry.list"]({ params: { sessionID: input["sessionID"] } }).pipe( - Effect.mapError(mapClientError), - Effect.map((value) => value.data), - ), - ) +const EndpointSessionInstructionsEntryList = + (raw: RawClient["server.session"]) => (input: SessionInstructionsEntryListInput) => + preserveEffect()( + raw["session.instructions.entry.list"]({ params: { sessionID: input["sessionID"] } }).pipe( + Effect.mapError(mapClientError), + Effect.map((value) => value.data), + ), + ) -const Endpoint5_28 = (raw: RawClient["server.session"]) => (input: Endpoint5_28Input) => - preserveEffect()( - raw["session.instructions.entry.put"]({ - params: { sessionID: input["sessionID"], key: input["key"] }, - payload: { value: input["value"] }, - }).pipe(Effect.mapError(mapClientError)), - ) +const EndpointSessionInstructionsEntryPut = + (raw: RawClient["server.session"]) => (input: SessionInstructionsEntryPutInput) => + preserveEffect()( + raw["session.instructions.entry.put"]({ + params: { sessionID: input["sessionID"], key: input["key"] }, + payload: { value: input["value"] }, + }).pipe(Effect.mapError(mapClientError)), + ) -const Endpoint5_29 = (raw: RawClient["server.session"]) => (input: Endpoint5_29Input) => - preserveEffect()( - raw["session.instructions.entry.remove"]({ params: { sessionID: input["sessionID"], key: input["key"] } }).pipe( - Effect.mapError(mapClientError), - ), - ) +const EndpointSessionInstructionsEntryRemove = + (raw: RawClient["server.session"]) => (input: SessionInstructionsEntryRemoveInput) => + preserveEffect()( + raw["session.instructions.entry.remove"]({ params: { sessionID: input["sessionID"], key: input["key"] } }).pipe( + Effect.mapError(mapClientError), + ), + ) -const Endpoint5_30 = (raw: RawClient["server.session"]) => (input: Endpoint5_30Input) => - preserveEffect()( +const EndpointSessionGenerate = (raw: RawClient["server.session"]) => (input: SessionGenerateInput) => + preserveEffect()( raw["session.generate"]({ params: { sessionID: input["sessionID"] }, payload: { prompt: input["prompt"] } }).pipe( Effect.mapError(mapClientError), Effect.map((value) => value.data), ), ) -const Endpoint5_31 = (raw: RawClient["server.session"]) => (input: Endpoint5_31Input) => - preserveStream()( +const EndpointSessionLog = (raw: RawClient["server.session"]) => (input: SessionLogInput) => + preserveStream()( Stream.unwrap( raw["session.log"]({ params: { sessionID: input["sessionID"] }, @@ -588,99 +594,117 @@ const Endpoint5_31 = (raw: RawClient["server.session"]) => (input: Endpoint5_31I ), ) -const Endpoint5_32 = (raw: RawClient["server.session"]) => (input: Endpoint5_32Input) => - preserveEffect()( +const EndpointSessionInterrupt = (raw: RawClient["server.session"]) => (input: SessionInterruptInput) => + preserveEffect()( raw["session.interrupt"]({ params: { sessionID: input["sessionID"] }, query: { continue: input["continue"] }, }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint5_33 = (raw: RawClient["server.session"]) => (input: Endpoint5_33Input) => - preserveEffect()( +const EndpointSessionBackground = (raw: RawClient["server.session"]) => (input: SessionBackgroundInput) => + preserveEffect()( raw["session.background"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint5_34 = (raw: RawClient["server.session"]) => (input: Endpoint5_34Input) => - preserveEffect()( +const EndpointSessionMessage = (raw: RawClient["server.session"]) => (input: SessionMessageInput) => + preserveEffect()( raw["session.message"]({ params: { sessionID: input["sessionID"], messageID: input["messageID"] } }).pipe( Effect.mapError(mapClientError), Effect.map((value) => value.data), ), ) -const Endpoint5_35 = (raw: RawClient["server.session"]) => (input: Endpoint5_35Input) => - preserveEffect()( +const EndpointSessionEnvironment = (raw: RawClient["server.session"]) => (input: SessionEnvironmentInput) => + preserveEffect()( raw["session.environment"]({ params: { sessionID: input["sessionID"] }, payload: { variables: input["variables"] }, }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint5_36 = (raw: RawClient["server.session"]) => (input: Endpoint5_36Input) => - preserveEffect()( +const EndpointSessionView = (raw: RawClient["server.session"]) => (input: SessionViewInput) => + preserveEffect()( raw["session.view"]({ params: { sessionID: input["sessionID"] }, payload: { idle: input["idle"] } }).pipe( Effect.mapError(mapClientError), ), ) -const adaptGroup5 = (raw: RawClient["server.session"]) => ({ - list: Endpoint5_0(raw), - create: Endpoint5_1(raw), - import: Endpoint5_2(raw), - export: Endpoint5_3(raw), - active: Endpoint5_4(raw), - get: Endpoint5_5(raw), - remove: Endpoint5_6(raw), - fork: Endpoint5_7(raw), - switchAgent: Endpoint5_8(raw), - switchModel: Endpoint5_9(raw), - rename: Endpoint5_10(raw), - move: Endpoint5_11(raw), - prompt: Endpoint5_12(raw), - command: Endpoint5_13(raw), - skill: Endpoint5_14(raw), - synthetic: Endpoint5_15(raw), - shell: Endpoint5_16(raw), - compact: Endpoint5_17(raw), - wait: Endpoint5_18(raw), - revert: { stage: Endpoint5_19(raw), clear: Endpoint5_20(raw), commit: Endpoint5_21(raw) }, - context: Endpoint5_22(raw), - inbox: { list: Endpoint5_23(raw), cancel: Endpoint5_24(raw), steer: Endpoint5_25(raw), queue: Endpoint5_26(raw) }, - instructions: { entry: { list: Endpoint5_27(raw), put: Endpoint5_28(raw), remove: Endpoint5_29(raw) } }, - generate: Endpoint5_30(raw), - log: Endpoint5_31(raw), - interrupt: Endpoint5_32(raw), - background: Endpoint5_33(raw), - message: Endpoint5_34(raw), - environment: Endpoint5_35(raw), - view: Endpoint5_36(raw), +const adaptGroupSession = (raw: RawClient["server.session"]) => ({ + list: EndpointSessionList(raw), + create: EndpointSessionCreate(raw), + import: EndpointSessionImport(raw), + export: EndpointSessionExport(raw), + active: EndpointSessionActive(raw), + get: EndpointSessionGet(raw), + remove: EndpointSessionRemove(raw), + fork: EndpointSessionFork(raw), + switchAgent: EndpointSessionSwitchAgent(raw), + switchModel: EndpointSessionSwitchModel(raw), + rename: EndpointSessionRename(raw), + move: EndpointSessionMove(raw), + prompt: EndpointSessionPrompt(raw), + command: EndpointSessionCommand(raw), + skill: EndpointSessionSkill(raw), + synthetic: EndpointSessionSynthetic(raw), + shell: EndpointSessionShell(raw), + compact: EndpointSessionCompact(raw), + wait: EndpointSessionWait(raw), + revert: { + stage: EndpointSessionRevertStage(raw), + clear: EndpointSessionRevertClear(raw), + commit: EndpointSessionRevertCommit(raw), + }, + context: EndpointSessionContext(raw), + inbox: { + list: EndpointSessionInboxList(raw), + cancel: EndpointSessionInboxCancel(raw), + steer: EndpointSessionInboxSteer(raw), + queue: EndpointSessionInboxQueue(raw), + }, + instructions: { + entry: { + list: EndpointSessionInstructionsEntryList(raw), + put: EndpointSessionInstructionsEntryPut(raw), + remove: EndpointSessionInstructionsEntryRemove(raw), + }, + }, + generate: EndpointSessionGenerate(raw), + log: EndpointSessionLog(raw), + interrupt: EndpointSessionInterrupt(raw), + background: EndpointSessionBackground(raw), + message: EndpointSessionMessage(raw), + environment: EndpointSessionEnvironment(raw), + view: EndpointSessionView(raw), }) -const Endpoint6_0 = (raw: RawClient["server.message"]) => (input: Endpoint6_0Input) => - preserveEffect()( +const EndpointMessageList = (raw: RawClient["server.message"]) => (input: MessageListInput) => + preserveEffect()( raw["session.messages"]({ params: { sessionID: input["sessionID"] }, query: { limit: input["limit"], order: input["order"], cursor: input["cursor"] }, }).pipe(Effect.mapError(mapClientError)), ) -const adaptGroup6 = (raw: RawClient["server.message"]) => ({ list: Endpoint6_0(raw) }) +const adaptGroupMessage = (raw: RawClient["server.message"]) => ({ list: EndpointMessageList(raw) }) -const Endpoint7_0 = (raw: RawClient["server.model"]) => (input?: Endpoint7_0Input) => - preserveEffect()( +const EndpointModelList = (raw: RawClient["server.model"]) => (input?: ModelListInput) => + preserveEffect()( raw["model.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint7_1 = (raw: RawClient["server.model"]) => (input?: Endpoint7_1Input) => - preserveEffect()( +const EndpointModelDefault = (raw: RawClient["server.model"]) => (input?: ModelDefaultInput) => + preserveEffect()( raw["model.default"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)), ) -const adaptGroup7 = (raw: RawClient["server.model"]) => ({ list: Endpoint7_0(raw), default: Endpoint7_1(raw) }) +const adaptGroupModel = (raw: RawClient["server.model"]) => ({ + list: EndpointModelList(raw), + default: EndpointModelDefault(raw), +}) -const Endpoint8_0 = (raw: RawClient["server.generate"]) => (input: Endpoint8_0Input) => - preserveEffect()( +const EndpointGenerateText = (raw: RawClient["server.generate"]) => (input: GenerateTextInput) => + preserveEffect()( raw["generate.text"]({ query: { location: input["location"] }, payload: { prompt: input["prompt"], model: input["model"] }, @@ -690,44 +714,48 @@ const Endpoint8_0 = (raw: RawClient["server.generate"]) => (input: Endpoint8_0In ), ) -const adaptGroup8 = (raw: RawClient["server.generate"]) => ({ text: Endpoint8_0(raw) }) +const adaptGroupGenerate = (raw: RawClient["server.generate"]) => ({ text: EndpointGenerateText(raw) }) -const Endpoint9_0 = (raw: RawClient["server.provider"]) => (input?: Endpoint9_0Input) => - preserveEffect()( +const EndpointProviderList = (raw: RawClient["server.provider"]) => (input?: ProviderListInput) => + preserveEffect()( raw["provider.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint9_1 = (raw: RawClient["server.provider"]) => (input: Endpoint9_1Input) => - preserveEffect()( +const EndpointProviderGet = (raw: RawClient["server.provider"]) => (input: ProviderGetInput) => + preserveEffect()( raw["provider.get"]({ params: { providerID: input["providerID"] }, query: { location: input["location"] } }).pipe( Effect.mapError(mapClientError), ), ) -const adaptGroup9 = (raw: RawClient["server.provider"]) => ({ list: Endpoint9_0(raw), get: Endpoint9_1(raw) }) +const adaptGroupProvider = (raw: RawClient["server.provider"]) => ({ + list: EndpointProviderList(raw), + get: EndpointProviderGet(raw), +}) -const Endpoint10_0 = (raw: RawClient["server.integration"]) => (input?: Endpoint10_0Input) => - preserveEffect()( +const EndpointIntegrationList = (raw: RawClient["server.integration"]) => (input?: IntegrationListInput) => + preserveEffect()( raw["integration.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint10_1 = (raw: RawClient["server.integration"]) => (input: Endpoint10_1Input) => - preserveEffect()( +const EndpointIntegrationGet = (raw: RawClient["server.integration"]) => (input: IntegrationGetInput) => + preserveEffect()( raw["integration.get"]({ params: { integrationID: input["integrationID"] }, query: { location: input["location"] }, }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint10_2 = (raw: RawClient["server.integration"]) => (input: Endpoint10_2Input) => - preserveEffect()( - raw["integration.wellknown.add"]({ query: { location: input["location"] }, payload: { url: input["url"] } }).pipe( - Effect.mapError(mapClientError), - ), - ) +const EndpointIntegrationWellknownAdd = + (raw: RawClient["server.integration"]) => (input: IntegrationWellknownAddInput) => + preserveEffect()( + raw["integration.wellknown.add"]({ query: { location: input["location"] }, payload: { url: input["url"] } }).pipe( + Effect.mapError(mapClientError), + ), + ) -const Endpoint10_3 = (raw: RawClient["server.integration"]) => (input: Endpoint10_3Input) => - preserveEffect()( +const EndpointIntegrationConnectKey = (raw: RawClient["server.integration"]) => (input: IntegrationConnectKeyInput) => + preserveEffect()( raw["integration.connect.key"]({ params: { integrationID: input["integrationID"] }, query: { location: input["location"] }, @@ -735,86 +763,95 @@ const Endpoint10_3 = (raw: RawClient["server.integration"]) => (input: Endpoint1 }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint10_4 = (raw: RawClient["server.integration"]) => (input: Endpoint10_4Input) => - preserveEffect()( - raw["integration.oauth.connect"]({ - params: { integrationID: input["integrationID"] }, - query: { location: input["location"] }, - payload: { methodID: input["methodID"], answer: input["answer"], label: input["label"] }, - }).pipe(Effect.mapError(mapClientError)), - ) +const EndpointIntegrationOauthConnect = + (raw: RawClient["server.integration"]) => (input: IntegrationOauthConnectInput) => + preserveEffect()( + raw["integration.oauth.connect"]({ + params: { integrationID: input["integrationID"] }, + query: { location: input["location"] }, + payload: { methodID: input["methodID"], answer: input["answer"], label: input["label"] }, + }).pipe(Effect.mapError(mapClientError)), + ) -const Endpoint10_5 = (raw: RawClient["server.integration"]) => (input: Endpoint10_5Input) => - preserveEffect()( +const EndpointIntegrationOauthStatus = (raw: RawClient["server.integration"]) => (input: IntegrationOauthStatusInput) => + preserveEffect()( raw["integration.oauth.status"]({ params: { integrationID: input["integrationID"], attemptID: input["attemptID"] }, query: { location: input["location"] }, }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint10_6 = (raw: RawClient["server.integration"]) => (input: Endpoint10_6Input) => - preserveEffect()( - raw["integration.oauth.complete"]({ - params: { integrationID: input["integrationID"], attemptID: input["attemptID"] }, - query: { location: input["location"] }, - payload: { code: input["code"] }, - }).pipe(Effect.mapError(mapClientError)), - ) +const EndpointIntegrationOauthComplete = + (raw: RawClient["server.integration"]) => (input: IntegrationOauthCompleteInput) => + preserveEffect()( + raw["integration.oauth.complete"]({ + params: { integrationID: input["integrationID"], attemptID: input["attemptID"] }, + query: { location: input["location"] }, + payload: { code: input["code"] }, + }).pipe(Effect.mapError(mapClientError)), + ) -const Endpoint10_7 = (raw: RawClient["server.integration"]) => (input: Endpoint10_7Input) => - preserveEffect()( +const EndpointIntegrationOauthCancel = (raw: RawClient["server.integration"]) => (input: IntegrationOauthCancelInput) => + preserveEffect()( raw["integration.oauth.cancel"]({ params: { integrationID: input["integrationID"], attemptID: input["attemptID"] }, query: { location: input["location"] }, }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint10_8 = (raw: RawClient["server.integration"]) => (input: Endpoint10_8Input) => - preserveEffect()( - raw["integration.command.connect"]({ - params: { integrationID: input["integrationID"] }, - query: { location: input["location"] }, - payload: { methodID: input["methodID"], label: input["label"] }, - }).pipe(Effect.mapError(mapClientError)), - ) +const EndpointIntegrationCommandConnect = + (raw: RawClient["server.integration"]) => (input: IntegrationCommandConnectInput) => + preserveEffect()( + raw["integration.command.connect"]({ + params: { integrationID: input["integrationID"] }, + query: { location: input["location"] }, + payload: { methodID: input["methodID"], label: input["label"] }, + }).pipe(Effect.mapError(mapClientError)), + ) -const Endpoint10_9 = (raw: RawClient["server.integration"]) => (input: Endpoint10_9Input) => - preserveEffect()( - raw["integration.command.status"]({ - params: { integrationID: input["integrationID"], attemptID: input["attemptID"] }, - query: { location: input["location"] }, - }).pipe(Effect.mapError(mapClientError)), - ) +const EndpointIntegrationCommandStatus = + (raw: RawClient["server.integration"]) => (input: IntegrationCommandStatusInput) => + preserveEffect()( + raw["integration.command.status"]({ + params: { integrationID: input["integrationID"], attemptID: input["attemptID"] }, + query: { location: input["location"] }, + }).pipe(Effect.mapError(mapClientError)), + ) -const Endpoint10_10 = (raw: RawClient["server.integration"]) => (input: Endpoint10_10Input) => - preserveEffect()( - raw["integration.command.cancel"]({ - params: { integrationID: input["integrationID"], attemptID: input["attemptID"] }, - query: { location: input["location"] }, - }).pipe(Effect.mapError(mapClientError)), - ) +const EndpointIntegrationCommandCancel = + (raw: RawClient["server.integration"]) => (input: IntegrationCommandCancelInput) => + preserveEffect()( + raw["integration.command.cancel"]({ + params: { integrationID: input["integrationID"], attemptID: input["attemptID"] }, + query: { location: input["location"] }, + }).pipe(Effect.mapError(mapClientError)), + ) -const adaptGroup10 = (raw: RawClient["server.integration"]) => ({ - list: Endpoint10_0(raw), - get: Endpoint10_1(raw), - wellknown: { add: Endpoint10_2(raw) }, - connect: { key: Endpoint10_3(raw) }, +const adaptGroupIntegration = (raw: RawClient["server.integration"]) => ({ + list: EndpointIntegrationList(raw), + get: EndpointIntegrationGet(raw), + wellknown: { add: EndpointIntegrationWellknownAdd(raw) }, + connect: { key: EndpointIntegrationConnectKey(raw) }, oauth: { - connect: Endpoint10_4(raw), - status: Endpoint10_5(raw), - complete: Endpoint10_6(raw), - cancel: Endpoint10_7(raw), + connect: EndpointIntegrationOauthConnect(raw), + status: EndpointIntegrationOauthStatus(raw), + complete: EndpointIntegrationOauthComplete(raw), + cancel: EndpointIntegrationOauthCancel(raw), + }, + command: { + connect: EndpointIntegrationCommandConnect(raw), + status: EndpointIntegrationCommandStatus(raw), + cancel: EndpointIntegrationCommandCancel(raw), }, - command: { connect: Endpoint10_8(raw), status: Endpoint10_9(raw), cancel: Endpoint10_10(raw) }, }) -const Endpoint11_0 = (raw: RawClient["server.mcp"]) => (input?: Endpoint11_0Input) => - preserveEffect()( +const EndpointMcpList = (raw: RawClient["server.mcp"]) => (input?: McpListInput) => + preserveEffect()( raw["mcp.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint11_1 = (raw: RawClient["server.mcp"]) => (input: Endpoint11_1Input) => - preserveEffect()( +const EndpointMcpAdd = (raw: RawClient["server.mcp"]) => (input: McpAddInput) => + preserveEffect()( raw["mcp.add"]({ params: { server: input["server"] }, query: { location: input["location"] }, @@ -822,43 +859,43 @@ const Endpoint11_1 = (raw: RawClient["server.mcp"]) => (input: Endpoint11_1Input }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint11_2 = (raw: RawClient["server.mcp"]) => (input: Endpoint11_2Input) => - preserveEffect()( +const EndpointMcpRemove = (raw: RawClient["server.mcp"]) => (input: McpRemoveInput) => + preserveEffect()( raw["mcp.remove"]({ params: { server: input["server"] }, query: { location: input["location"] } }).pipe( Effect.mapError(mapClientError), ), ) -const Endpoint11_3 = (raw: RawClient["server.mcp"]) => (input: Endpoint11_3Input) => - preserveEffect()( +const EndpointMcpConnect = (raw: RawClient["server.mcp"]) => (input: McpConnectInput) => + preserveEffect()( raw["mcp.connect"]({ params: { server: input["server"] }, query: { location: input["location"] } }).pipe( Effect.mapError(mapClientError), ), ) -const Endpoint11_4 = (raw: RawClient["server.mcp"]) => (input: Endpoint11_4Input) => - preserveEffect()( +const EndpointMcpDisconnect = (raw: RawClient["server.mcp"]) => (input: McpDisconnectInput) => + preserveEffect()( raw["mcp.disconnect"]({ params: { server: input["server"] }, query: { location: input["location"] } }).pipe( Effect.mapError(mapClientError), ), ) -const Endpoint11_5 = (raw: RawClient["server.mcp"]) => (input?: Endpoint11_5Input) => - preserveEffect()( +const EndpointMcpResourceCatalog = (raw: RawClient["server.mcp"]) => (input?: McpResourceCatalogInput) => + preserveEffect()( raw["mcp.resource.catalog"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)), ) -const adaptGroup11 = (raw: RawClient["server.mcp"]) => ({ - list: Endpoint11_0(raw), - add: Endpoint11_1(raw), - remove: Endpoint11_2(raw), - connect: Endpoint11_3(raw), - disconnect: Endpoint11_4(raw), - resource: { catalog: Endpoint11_5(raw) }, +const adaptGroupMcp = (raw: RawClient["server.mcp"]) => ({ + list: EndpointMcpList(raw), + add: EndpointMcpAdd(raw), + remove: EndpointMcpRemove(raw), + connect: EndpointMcpConnect(raw), + disconnect: EndpointMcpDisconnect(raw), + resource: { catalog: EndpointMcpResourceCatalog(raw) }, }) -const Endpoint12_0 = (raw: RawClient["server.credential"]) => (input: Endpoint12_0Input) => - preserveEffect()( +const EndpointCredentialUpdate = (raw: RawClient["server.credential"]) => (input: CredentialUpdateInput) => + preserveEffect()( raw["credential.update"]({ params: { credentialID: input["credentialID"] }, query: { location: input["location"] }, @@ -866,41 +903,47 @@ const Endpoint12_0 = (raw: RawClient["server.credential"]) => (input: Endpoint12 }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint12_1 = (raw: RawClient["server.credential"]) => (input: Endpoint12_1Input) => - preserveEffect()( +const EndpointCredentialRemove = (raw: RawClient["server.credential"]) => (input: CredentialRemoveInput) => + preserveEffect()( raw["credential.remove"]({ params: { credentialID: input["credentialID"] }, query: { location: input["location"] }, }).pipe(Effect.mapError(mapClientError)), ) -const adaptGroup12 = (raw: RawClient["server.credential"]) => ({ update: Endpoint12_0(raw), remove: Endpoint12_1(raw) }) +const adaptGroupCredential = (raw: RawClient["server.credential"]) => ({ + update: EndpointCredentialUpdate(raw), + remove: EndpointCredentialRemove(raw), +}) -const Endpoint13_0 = (raw: RawClient["server.project"]) => () => - preserveEffect()(raw["project.list"]({}).pipe(Effect.mapError(mapClientError))) +const EndpointProjectList = (raw: RawClient["server.project"]) => () => + preserveEffect()(raw["project.list"]({}).pipe(Effect.mapError(mapClientError))) -const Endpoint13_1 = (raw: RawClient["server.project"]) => (input?: Endpoint13_1Input) => - preserveEffect()( +const EndpointProjectCurrent = (raw: RawClient["server.project"]) => (input?: ProjectCurrentInput) => + preserveEffect()( raw["project.current"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)), ) -const adaptGroup13 = (raw: RawClient["server.project"]) => ({ list: Endpoint13_0(raw), current: Endpoint13_1(raw) }) +const adaptGroupProject = (raw: RawClient["server.project"]) => ({ + list: EndpointProjectList(raw), + current: EndpointProjectCurrent(raw), +}) -const Endpoint14_0 = (raw: RawClient["server.form"]) => (input?: Endpoint14_0Input) => - preserveEffect()( +const EndpointFormRequestList = (raw: RawClient["server.form"]) => (input?: FormRequestListInput) => + preserveEffect()( raw["form.request.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint14_1 = (raw: RawClient["server.form"]) => (input: Endpoint14_1Input) => - preserveEffect()( +const EndpointFormList = (raw: RawClient["server.form"]) => (input: FormListInput) => + preserveEffect()( raw["session.form.list"]({ params: { sessionID: input["sessionID"] } }).pipe( Effect.mapError(mapClientError), Effect.map((value) => value.data), ), ) -const Endpoint14_2 = (raw: RawClient["server.form"]) => (input: Endpoint14_2Input) => - preserveEffect()( +const EndpointFormCreate = (raw: RawClient["server.form"]) => (input: FormCreateInput) => + preserveEffect()( raw["session.form.create"]({ params: { sessionID: input["sessionID"] }, payload: { id: input["id"], title: input["title"], metadata: input["metadata"], fields: input["fields"] }, @@ -910,67 +953,67 @@ const Endpoint14_2 = (raw: RawClient["server.form"]) => (input: Endpoint14_2Inpu ), ) -const Endpoint14_3 = (raw: RawClient["server.form"]) => (input: Endpoint14_3Input) => - preserveEffect()( +const EndpointFormGet = (raw: RawClient["server.form"]) => (input: FormGetInput) => + preserveEffect()( raw["session.form.get"]({ params: { sessionID: input["sessionID"], formID: input["formID"] } }).pipe( Effect.mapError(mapClientError), Effect.map((value) => value.data), ), ) -const Endpoint14_4 = (raw: RawClient["server.form"]) => (input: Endpoint14_4Input) => - preserveEffect()( +const EndpointFormState = (raw: RawClient["server.form"]) => (input: FormStateInput) => + preserveEffect()( raw["session.form.state"]({ params: { sessionID: input["sessionID"], formID: input["formID"] } }).pipe( Effect.mapError(mapClientError), Effect.map((value) => value.data), ), ) -const Endpoint14_5 = (raw: RawClient["server.form"]) => (input: Endpoint14_5Input) => - preserveEffect()( +const EndpointFormReply = (raw: RawClient["server.form"]) => (input: FormReplyInput) => + preserveEffect()( raw["session.form.reply"]({ params: { sessionID: input["sessionID"], formID: input["formID"] }, payload: { answer: input["answer"] }, }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint14_6 = (raw: RawClient["server.form"]) => (input: Endpoint14_6Input) => - preserveEffect()( +const EndpointFormCancel = (raw: RawClient["server.form"]) => (input: FormCancelInput) => + preserveEffect()( raw["session.form.cancel"]({ params: { sessionID: input["sessionID"], formID: input["formID"] } }).pipe( Effect.mapError(mapClientError), ), ) -const adaptGroup14 = (raw: RawClient["server.form"]) => ({ - request: { list: Endpoint14_0(raw) }, - list: Endpoint14_1(raw), - create: Endpoint14_2(raw), - get: Endpoint14_3(raw), - state: Endpoint14_4(raw), - reply: Endpoint14_5(raw), - cancel: Endpoint14_6(raw), +const adaptGroupForm = (raw: RawClient["server.form"]) => ({ + request: { list: EndpointFormRequestList(raw) }, + list: EndpointFormList(raw), + create: EndpointFormCreate(raw), + get: EndpointFormGet(raw), + state: EndpointFormState(raw), + reply: EndpointFormReply(raw), + cancel: EndpointFormCancel(raw), }) -const Endpoint15_0 = (raw: RawClient["server.permission"]) => (input?: Endpoint15_0Input) => - preserveEffect()( +const EndpointPermissionRequestList = (raw: RawClient["server.permission"]) => (input?: PermissionRequestListInput) => + preserveEffect()( raw["permission.request.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint15_1 = (raw: RawClient["server.permission"]) => (input?: Endpoint15_1Input) => - preserveEffect()( +const EndpointPermissionSavedList = (raw: RawClient["server.permission"]) => (input?: PermissionSavedListInput) => + preserveEffect()( raw["permission.saved.list"]({ query: { projectID: input?.["projectID"] } }).pipe( Effect.mapError(mapClientError), Effect.map((value) => value.data), ), ) -const Endpoint15_2 = (raw: RawClient["server.permission"]) => (input: Endpoint15_2Input) => - preserveEffect()( +const EndpointPermissionSavedRemove = (raw: RawClient["server.permission"]) => (input: PermissionSavedRemoveInput) => + preserveEffect()( raw["permission.saved.remove"]({ params: { id: input["id"] } }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint15_3 = (raw: RawClient["server.permission"]) => (input: Endpoint15_3Input) => - preserveEffect()( +const EndpointPermissionCreate = (raw: RawClient["server.permission"]) => (input: PermissionCreateInput) => + preserveEffect()( raw["session.permission.create"]({ params: { sessionID: input["sessionID"] }, payload: { @@ -988,71 +1031,71 @@ const Endpoint15_3 = (raw: RawClient["server.permission"]) => (input: Endpoint15 ), ) -const Endpoint15_4 = (raw: RawClient["server.permission"]) => (input: Endpoint15_4Input) => - preserveEffect()( +const EndpointPermissionList = (raw: RawClient["server.permission"]) => (input: PermissionListInput) => + preserveEffect()( raw["session.permission.list"]({ params: { sessionID: input["sessionID"] } }).pipe( Effect.mapError(mapClientError), Effect.map((value) => value.data), ), ) -const Endpoint15_5 = (raw: RawClient["server.permission"]) => (input: Endpoint15_5Input) => - preserveEffect()( +const EndpointPermissionGet = (raw: RawClient["server.permission"]) => (input: PermissionGetInput) => + preserveEffect()( raw["session.permission.get"]({ params: { sessionID: input["sessionID"], requestID: input["requestID"] } }).pipe( Effect.mapError(mapClientError), Effect.map((value) => value.data), ), ) -const Endpoint15_6 = (raw: RawClient["server.permission"]) => (input: Endpoint15_6Input) => - preserveEffect()( +const EndpointPermissionReply = (raw: RawClient["server.permission"]) => (input: PermissionReplyInput) => + preserveEffect()( raw["session.permission.reply"]({ params: { sessionID: input["sessionID"], requestID: input["requestID"] }, payload: { reply: input["reply"], message: input["message"] }, }).pipe(Effect.mapError(mapClientError)), ) -const adaptGroup15 = (raw: RawClient["server.permission"]) => ({ - request: { list: Endpoint15_0(raw) }, - saved: { list: Endpoint15_1(raw), remove: Endpoint15_2(raw) }, - create: Endpoint15_3(raw), - list: Endpoint15_4(raw), - get: Endpoint15_5(raw), - reply: Endpoint15_6(raw), +const adaptGroupPermission = (raw: RawClient["server.permission"]) => ({ + request: { list: EndpointPermissionRequestList(raw) }, + saved: { list: EndpointPermissionSavedList(raw), remove: EndpointPermissionSavedRemove(raw) }, + create: EndpointPermissionCreate(raw), + list: EndpointPermissionList(raw), + get: EndpointPermissionGet(raw), + reply: EndpointPermissionReply(raw), }) -const Endpoint16_0 = (raw: RawClient["server.fs"]) => (input?: Endpoint16_0Input) => - preserveEffect()( +const EndpointFileList = (raw: RawClient["server.fs"]) => (input?: FileListInput) => + preserveEffect()( raw["fs.list"]({ query: { location: input?.["location"], path: input?.["path"] } }).pipe( Effect.mapError(mapClientError), ), ) -const Endpoint16_1 = (raw: RawClient["server.fs"]) => (input: Endpoint16_1Input) => - preserveEffect()( +const EndpointFileFind = (raw: RawClient["server.fs"]) => (input: FileFindInput) => + preserveEffect()( raw["fs.find"]({ query: { location: input["location"], query: input["query"], type: input["type"], limit: input["limit"] }, }).pipe(Effect.mapError(mapClientError)), ) -const adaptGroup16 = (raw: RawClient["server.fs"]) => ({ list: Endpoint16_0(raw), find: Endpoint16_1(raw) }) +const adaptGroupFile = (raw: RawClient["server.fs"]) => ({ list: EndpointFileList(raw), find: EndpointFileFind(raw) }) -const Endpoint17_0 = (raw: RawClient["server.command"]) => (input?: Endpoint17_0Input) => - preserveEffect()( +const EndpointCommandList = (raw: RawClient["server.command"]) => (input?: CommandListInput) => + preserveEffect()( raw["command.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)), ) -const adaptGroup17 = (raw: RawClient["server.command"]) => ({ list: Endpoint17_0(raw) }) +const adaptGroupCommand = (raw: RawClient["server.command"]) => ({ list: EndpointCommandList(raw) }) -const Endpoint18_0 = (raw: RawClient["server.skill"]) => (input?: Endpoint18_0Input) => - preserveEffect()( +const EndpointSkillList = (raw: RawClient["server.skill"]) => (input?: SkillListInput) => + preserveEffect()( raw["skill.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)), ) -const adaptGroup18 = (raw: RawClient["server.skill"]) => ({ list: Endpoint18_0(raw) }) +const adaptGroupSkill = (raw: RawClient["server.skill"]) => ({ list: EndpointSkillList(raw) }) -const Endpoint19_0 = (raw: RawClient["server.event"]) => () => - preserveStream()( +const EndpointEventSubscribe = (raw: RawClient["server.event"]) => () => + preserveStream()( Stream.unwrap( raw["event.subscribe"]({}).pipe( Effect.mapError(mapClientError), @@ -1061,15 +1104,15 @@ const Endpoint19_0 = (raw: RawClient["server.event"]) => () => ), ) -const adaptGroup19 = (raw: RawClient["server.event"]) => ({ subscribe: Endpoint19_0(raw) }) +const adaptGroupEvent = (raw: RawClient["server.event"]) => ({ subscribe: EndpointEventSubscribe(raw) }) -const Endpoint20_0 = (raw: RawClient["server.pty"]) => (input?: Endpoint20_0Input) => - preserveEffect()( +const EndpointPtyList = (raw: RawClient["server.pty"]) => (input?: PtyListInput) => + preserveEffect()( raw["pty.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint20_1 = (raw: RawClient["server.pty"]) => (input?: Endpoint20_1Input) => - preserveEffect()( +const EndpointPtyCreate = (raw: RawClient["server.pty"]) => (input?: PtyCreateInput) => + preserveEffect()( raw["pty.create"]({ query: { location: input?.["location"] }, payload: { @@ -1082,15 +1125,15 @@ const Endpoint20_1 = (raw: RawClient["server.pty"]) => (input?: Endpoint20_1Inpu }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint20_2 = (raw: RawClient["server.pty"]) => (input: Endpoint20_2Input) => - preserveEffect()( +const EndpointPtyGet = (raw: RawClient["server.pty"]) => (input: PtyGetInput) => + preserveEffect()( raw["pty.get"]({ params: { ptyID: input["ptyID"] }, query: { location: input["location"] } }).pipe( Effect.mapError(mapClientError), ), ) -const Endpoint20_3 = (raw: RawClient["server.pty"]) => (input: Endpoint20_3Input) => - preserveEffect()( +const EndpointPtyUpdate = (raw: RawClient["server.pty"]) => (input: PtyUpdateInput) => + preserveEffect()( raw["pty.update"]({ params: { ptyID: input["ptyID"] }, query: { location: input["location"] }, @@ -1098,15 +1141,15 @@ const Endpoint20_3 = (raw: RawClient["server.pty"]) => (input: Endpoint20_3Input }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint20_4 = (raw: RawClient["server.pty"]) => (input: Endpoint20_4Input) => - preserveEffect()( +const EndpointPtyRemove = (raw: RawClient["server.pty"]) => (input: PtyRemoveInput) => + preserveEffect()( raw["pty.remove"]({ params: { ptyID: input["ptyID"] }, query: { location: input["location"] } }).pipe( Effect.mapError(mapClientError), ), ) -const Endpoint20_5 = (raw: RawClient["server.pty"]) => (input: Endpoint20_5Input) => - preserveEffect()( +const EndpointPtyConnectToken = (raw: RawClient["server.pty"]) => (input: PtyConnectTokenInput) => + preserveEffect()( raw["pty.connectToken"]({ params: { ptyID: input["ptyID"] }, query: { location: input["location"] }, @@ -1114,37 +1157,37 @@ const Endpoint20_5 = (raw: RawClient["server.pty"]) => (input: Endpoint20_5Input }).pipe(Effect.mapError(mapClientError)), ) -const adaptGroup20 = (raw: RawClient["server.pty"]) => ({ - list: Endpoint20_0(raw), - create: Endpoint20_1(raw), - get: Endpoint20_2(raw), - update: Endpoint20_3(raw), - remove: Endpoint20_4(raw), - connect: { token: Endpoint20_5(raw) }, +const adaptGroupPty = (raw: RawClient["server.pty"]) => ({ + list: EndpointPtyList(raw), + create: EndpointPtyCreate(raw), + get: EndpointPtyGet(raw), + update: EndpointPtyUpdate(raw), + remove: EndpointPtyRemove(raw), + connect: { token: EndpointPtyConnectToken(raw) }, }) -const Endpoint21_0 = (raw: RawClient["server.shell"]) => (input?: Endpoint21_0Input) => - preserveEffect()( +const EndpointShellList = (raw: RawClient["server.shell"]) => (input?: ShellListInput) => + preserveEffect()( raw["shell.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint21_1 = (raw: RawClient["server.shell"]) => (input: Endpoint21_1Input) => - preserveEffect()( +const EndpointShellCreate = (raw: RawClient["server.shell"]) => (input: ShellCreateInput) => + preserveEffect()( raw["shell.create"]({ query: { location: input["location"] }, payload: { command: input["command"], cwd: input["cwd"], timeout: input["timeout"], metadata: input["metadata"] }, }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint21_2 = (raw: RawClient["server.shell"]) => (input: Endpoint21_2Input) => - preserveEffect()( +const EndpointShellGet = (raw: RawClient["server.shell"]) => (input: ShellGetInput) => + preserveEffect()( raw["shell.get"]({ params: { id: input["id"] }, query: { location: input["location"] } }).pipe( Effect.mapError(mapClientError), ), ) -const Endpoint21_3 = (raw: RawClient["server.shell"]) => (input: Endpoint21_3Input) => - preserveEffect()( +const EndpointShellTimeout = (raw: RawClient["server.shell"]) => (input: ShellTimeoutInput) => + preserveEffect()( raw["shell.timeout"]({ params: { id: input["id"] }, query: { location: input["location"] }, @@ -1152,165 +1195,165 @@ const Endpoint21_3 = (raw: RawClient["server.shell"]) => (input: Endpoint21_3Inp }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint21_4 = (raw: RawClient["server.shell"]) => (input: Endpoint21_4Input) => - preserveEffect()( +const EndpointShellOutput = (raw: RawClient["server.shell"]) => (input: ShellOutputInput) => + preserveEffect()( raw["shell.output"]({ params: { id: input["id"] }, query: { location: input["location"], cursor: input["cursor"], limit: input["limit"] }, }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint21_5 = (raw: RawClient["server.shell"]) => (input: Endpoint21_5Input) => - preserveEffect()( +const EndpointShellRemove = (raw: RawClient["server.shell"]) => (input: ShellRemoveInput) => + preserveEffect()( raw["shell.remove"]({ params: { id: input["id"] }, query: { location: input["location"] } }).pipe( Effect.mapError(mapClientError), ), ) -const adaptGroup21 = (raw: RawClient["server.shell"]) => ({ - list: Endpoint21_0(raw), - create: Endpoint21_1(raw), - get: Endpoint21_2(raw), - timeout: Endpoint21_3(raw), - output: Endpoint21_4(raw), - remove: Endpoint21_5(raw), +const adaptGroupShell = (raw: RawClient["server.shell"]) => ({ + list: EndpointShellList(raw), + create: EndpointShellCreate(raw), + get: EndpointShellGet(raw), + timeout: EndpointShellTimeout(raw), + output: EndpointShellOutput(raw), + remove: EndpointShellRemove(raw), }) -const Endpoint22_0 = (raw: RawClient["server.reference"]) => (input?: Endpoint22_0Input) => - preserveEffect()( +const EndpointReferenceList = (raw: RawClient["server.reference"]) => (input?: ReferenceListInput) => + preserveEffect()( raw["reference.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)), ) -const adaptGroup22 = (raw: RawClient["server.reference"]) => ({ list: Endpoint22_0(raw) }) +const adaptGroupReference = (raw: RawClient["server.reference"]) => ({ list: EndpointReferenceList(raw) }) -const Endpoint23_0 = (raw: RawClient["server.worktree"]) => (input: Endpoint23_0Input) => - preserveEffect()( +const EndpointWorktreeList = (raw: RawClient["server.worktree"]) => (input: WorktreeListInput) => + preserveEffect()( raw["worktree.list"]({ params: { projectID: input["projectID"] } }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint23_1 = (raw: RawClient["server.worktree"]) => (input: Endpoint23_1Input) => - preserveEffect()( +const EndpointWorktreeCreate = (raw: RawClient["server.worktree"]) => (input: WorktreeCreateInput) => + preserveEffect()( raw["worktree.create"]({ params: { projectID: input["projectID"] }, payload: { strategy: input["strategy"], from: input["from"], directory: input["directory"], name: input["name"] }, }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint23_2 = (raw: RawClient["server.worktree"]) => (input: Endpoint23_2Input) => - preserveEffect()( +const EndpointWorktreeRemove = (raw: RawClient["server.worktree"]) => (input: WorktreeRemoveInput) => + preserveEffect()( raw["worktree.remove"]({ params: { projectID: input["projectID"] }, payload: { directory: input["directory"], force: input["force"] }, }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint23_3 = (raw: RawClient["server.worktree"]) => (input: Endpoint23_3Input) => - preserveEffect()( +const EndpointWorktreeRefresh = (raw: RawClient["server.worktree"]) => (input: WorktreeRefreshInput) => + preserveEffect()( raw["worktree.refresh"]({ params: { projectID: input["projectID"] } }).pipe(Effect.mapError(mapClientError)), ) -const adaptGroup23 = (raw: RawClient["server.worktree"]) => ({ - list: Endpoint23_0(raw), - create: Endpoint23_1(raw), - remove: Endpoint23_2(raw), - refresh: Endpoint23_3(raw), +const adaptGroupWorktree = (raw: RawClient["server.worktree"]) => ({ + list: EndpointWorktreeList(raw), + create: EndpointWorktreeCreate(raw), + remove: EndpointWorktreeRemove(raw), + refresh: EndpointWorktreeRefresh(raw), }) -const Endpoint24_0 = (raw: RawClient["server.vcs"]) => (input?: Endpoint24_0Input) => - preserveEffect()( +const EndpointVcsGet = (raw: RawClient["server.vcs"]) => (input?: VcsGetInput) => + preserveEffect()( raw["vcs.get"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint24_1 = (raw: RawClient["server.vcs"]) => (input?: Endpoint24_1Input) => - preserveEffect()( +const EndpointVcsStatus = (raw: RawClient["server.vcs"]) => (input?: VcsStatusInput) => + preserveEffect()( raw["vcs.status"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint24_2 = (raw: RawClient["server.vcs"]) => (input: Endpoint24_2Input) => - preserveEffect()( +const EndpointVcsDiff = (raw: RawClient["server.vcs"]) => (input: VcsDiffInput) => + preserveEffect()( raw["vcs.diff"]({ query: { location: input["location"], mode: input["mode"], context: input["context"] } }).pipe( Effect.mapError(mapClientError), ), ) -const adaptGroup24 = (raw: RawClient["server.vcs"]) => ({ - get: Endpoint24_0(raw), - status: Endpoint24_1(raw), - diff: Endpoint24_2(raw), +const adaptGroupVcs = (raw: RawClient["server.vcs"]) => ({ + get: EndpointVcsGet(raw), + status: EndpointVcsStatus(raw), + diff: EndpointVcsDiff(raw), }) -const Endpoint25_0 = (raw: RawClient["server.debug"]) => () => - preserveEffect()(raw["debug.location"]({}).pipe(Effect.mapError(mapClientError))) +const EndpointDebugLocationList = (raw: RawClient["server.debug"]) => () => + preserveEffect()(raw["debug.location"]({}).pipe(Effect.mapError(mapClientError))) -const Endpoint25_1 = (raw: RawClient["server.debug"]) => (input?: Endpoint25_1Input) => - preserveEffect()( +const EndpointDebugLocationEvict = (raw: RawClient["server.debug"]) => (input?: DebugLocationEvictInput) => + preserveEffect()( raw["debug.location.evict"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)), ) -const adaptGroup25 = (raw: RawClient["server.debug"]) => ({ - location: { list: Endpoint25_0(raw), evict: Endpoint25_1(raw) }, +const adaptGroupDebug = (raw: RawClient["server.debug"]) => ({ + location: { list: EndpointDebugLocationList(raw), evict: EndpointDebugLocationEvict(raw) }, }) -const Endpoint26_0 = (raw: RawClient["server.migration"]) => () => - preserveEffect()(raw["migration.v1.status"]({}).pipe(Effect.mapError(mapClientError))) +const EndpointMigrationV1Status = (raw: RawClient["server.migration"]) => () => + preserveEffect()(raw["migration.v1.status"]({}).pipe(Effect.mapError(mapClientError))) -const adaptGroup26 = (raw: RawClient["server.migration"]) => ({ v1: { status: Endpoint26_0(raw) } }) +const adaptGroupMigration = (raw: RawClient["server.migration"]) => ({ v1: { status: EndpointMigrationV1Status(raw) } }) -const Endpoint27_0 = (raw: RawClient["server.websearch"]) => (input?: Endpoint27_0Input) => - preserveEffect()( +const EndpointWebsearchProviders = (raw: RawClient["server.websearch"]) => (input?: WebsearchProvidersInput) => + preserveEffect()( raw["websearch.providers"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint27_1 = (raw: RawClient["server.websearch"]) => (input: Endpoint27_1Input) => - preserveEffect()( +const EndpointWebsearchQuery = (raw: RawClient["server.websearch"]) => (input: WebsearchQueryInput) => + preserveEffect()( raw["websearch.query"]({ query: { location: input["location"] }, payload: { query: input["query"], providerID: input["providerID"] }, }).pipe(Effect.mapError(mapClientError)), ) -const adaptGroup27 = (raw: RawClient["server.websearch"]) => ({ - providers: Endpoint27_0(raw), - query: Endpoint27_1(raw), +const adaptGroupWebsearch = (raw: RawClient["server.websearch"]) => ({ + providers: EndpointWebsearchProviders(raw), + query: EndpointWebsearchQuery(raw), }) -const Endpoint28_0 = (raw: RawClient["server.config"]) => (input?: Endpoint28_0Input) => - preserveEffect()( +const EndpointConfigGet = (raw: RawClient["server.config"]) => (input?: ConfigGetInput) => + preserveEffect()( raw["config.get"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)), ) -const adaptGroup28 = (raw: RawClient["server.config"]) => ({ get: Endpoint28_0(raw) }) +const adaptGroupConfig = (raw: RawClient["server.config"]) => ({ get: EndpointConfigGet(raw) }) const adaptClient = (raw: RawClient) => ({ - health: adaptGroup0(raw["server.health"]), - server: adaptGroup1(raw["server.server"]), - location: adaptGroup2(raw["server.location"]), - agent: adaptGroup3(raw["server.agent"]), - plugin: adaptGroup4(raw["server.plugin"]), - session: adaptGroup5(raw["server.session"]), - message: adaptGroup6(raw["server.message"]), - model: adaptGroup7(raw["server.model"]), - generate: adaptGroup8(raw["server.generate"]), - provider: adaptGroup9(raw["server.provider"]), - integration: adaptGroup10(raw["server.integration"]), - mcp: adaptGroup11(raw["server.mcp"]), - credential: adaptGroup12(raw["server.credential"]), - project: adaptGroup13(raw["server.project"]), - form: adaptGroup14(raw["server.form"]), - permission: adaptGroup15(raw["server.permission"]), - file: adaptGroup16(raw["server.fs"]), - command: adaptGroup17(raw["server.command"]), - skill: adaptGroup18(raw["server.skill"]), - event: adaptGroup19(raw["server.event"]), - pty: adaptGroup20(raw["server.pty"]), - shell: adaptGroup21(raw["server.shell"]), - reference: adaptGroup22(raw["server.reference"]), - worktree: adaptGroup23(raw["server.worktree"]), - vcs: adaptGroup24(raw["server.vcs"]), - debug: adaptGroup25(raw["server.debug"]), - migration: adaptGroup26(raw["server.migration"]), - websearch: adaptGroup27(raw["server.websearch"]), - config: adaptGroup28(raw["server.config"]), + health: adaptGroupHealth(raw["server.health"]), + server: adaptGroupServer(raw["server.server"]), + location: adaptGroupLocation(raw["server.location"]), + agent: adaptGroupAgent(raw["server.agent"]), + plugin: adaptGroupPlugin(raw["server.plugin"]), + session: adaptGroupSession(raw["server.session"]), + message: adaptGroupMessage(raw["server.message"]), + model: adaptGroupModel(raw["server.model"]), + generate: adaptGroupGenerate(raw["server.generate"]), + provider: adaptGroupProvider(raw["server.provider"]), + integration: adaptGroupIntegration(raw["server.integration"]), + mcp: adaptGroupMcp(raw["server.mcp"]), + credential: adaptGroupCredential(raw["server.credential"]), + project: adaptGroupProject(raw["server.project"]), + form: adaptGroupForm(raw["server.form"]), + permission: adaptGroupPermission(raw["server.permission"]), + file: adaptGroupFile(raw["server.fs"]), + command: adaptGroupCommand(raw["server.command"]), + skill: adaptGroupSkill(raw["server.skill"]), + event: adaptGroupEvent(raw["server.event"]), + pty: adaptGroupPty(raw["server.pty"]), + shell: adaptGroupShell(raw["server.shell"]), + reference: adaptGroupReference(raw["server.reference"]), + worktree: adaptGroupWorktree(raw["server.worktree"]), + vcs: adaptGroupVcs(raw["server.vcs"]), + debug: adaptGroupDebug(raw["server.debug"]), + migration: adaptGroupMigration(raw["server.migration"]), + websearch: adaptGroupWebsearch(raw["server.websearch"]), + config: adaptGroupConfig(raw["server.config"]), }) export const make = (options?: { readonly baseUrl?: URL | string }) => diff --git a/packages/client/src/promise/generated/types.ts b/packages/client/src/promise/generated/types.ts index 59a4bf96a03..fba66256cbd 100644 --- a/packages/client/src/promise/generated/types.ts +++ b/packages/client/src/promise/generated/types.ts @@ -1089,7 +1089,7 @@ export type PtyUpdated = { data: { info: Pty } } -export type SessionStatus2 = { +export type SessionStatusUpdated = { id: string created: number metadata?: { [x: string]: any } @@ -2117,7 +2117,7 @@ export type V2Event = | FormReplied | FormCancelled | WebsearchUpdated - | SessionStatus2 + | SessionStatusUpdated | SessionIdle | TuiPromptAppend | TuiCommandExecute diff --git a/packages/client/test/contract-identity.test.ts b/packages/client/test/contract-identity.test.ts index 677cf4d8a06..5bec4414443 100644 --- a/packages/client/test/contract-identity.test.ts +++ b/packages/client/test/contract-identity.test.ts @@ -19,8 +19,8 @@ test("effect entrypoint exposes canonical Schema contracts", () => { test("generated Effect API names canonical and composed outputs", async () => { const source = await Bun.file(new URL("../src/effect/api/api.ts", import.meta.url)).text() - expect(source).toContain("export type Endpoint5_5Output = Session.Info") - expect(source).toContain("export type Endpoint19_0Output = OpenCodeEvent") + expect(source).toContain("export type SessionGetOutput = Session.Info") + expect(source).toContain("export type EventSubscribeOutput = OpenCodeEvent") expect(source).not.toContain("HttpApiClient.ForApi") }) diff --git a/packages/httpapi-codegen/src/index.ts b/packages/httpapi-codegen/src/index.ts index 25626efa897..5c15bc36e9e 100644 --- a/packages/httpapi-codegen/src/index.ts +++ b/packages/httpapi-codegen/src/index.ts @@ -216,12 +216,17 @@ export function compile endpoint.group), - ([identifier, endpoints], index) => { + ([identifier, endpoints]) => { if (new Set(endpoints.map((endpoint) => endpoint.sourceGroup)).size > 1) { throw new GenerationError({ reason: `Client group name collision: ${identifier}` }) } - const base = /^[A-Za-z0-9_-]+$/.test(identifier) ? identifier : `group-${index}` - const module = uniqueModule(base, index, modules) + // Module names derive from the group identifier so unrelated groups never rename. + const sanitized = identifier.replace(/[^A-Za-z0-9_-]+/g, "-").replace(/^-+|-+$/g, "") + const reserved = /^(aux|client|client-error|con|index|nul|prn|com[1-9]|lpt[1-9])$/i.test(sanitized) + const module = sanitized === "" || reserved ? `group-${sanitized}` : sanitized + if (modules.has(module.toLowerCase())) { + throw new GenerationError({ reason: `Client module name collision: ${module}` }) + } modules.add(module.toLowerCase()) return { identifier, sourceIdentifier: endpoints[0].sourceGroup, module, endpoints } }, @@ -363,9 +368,28 @@ function renderEffectShape( ) { const references = effectTypeReferences(typeReferences) const imports = new Set() - const endpointTypes = groups.map((group, groupIndex) => { - const endpoints = group.endpoints.map((endpoint, endpointIndex) => { - const prefix = `Endpoint${groupIndex}_${endpointIndex}` + const externalNames = new Set([ + "AppApi", + "Effect", + "Stream", + ...typeReferences.flatMap((reference) => reference.name.match(/^[A-Za-z_$][A-Za-z0-9_$]*/) ?? []), + ...Object.values(outputTypes ?? {}).flatMap((output) => output.name.match(/^[A-Za-z_$][A-Za-z0-9_$]*/) ?? []), + ]) + const generatedNames = groups.flatMap((group) => [ + groupShapeName(group), + ...group.endpoints.flatMap((endpoint) => [ + ...(endpoint.operation.inputMode === "none" ? [] : [`${endpointTypeName(group, endpoint)}Input`]), + `${endpointTypeName(group, endpoint)}Output`, + groupShapeTypeName(group, endpoint), + ]), + ]) + const collision = generatedNames.find((name) => externalNames.has(name)) + if (collision !== undefined) { + throw new GenerationError({ reason: `Generated Effect type collides with imported type: ${collision}` }) + } + const endpointTypes = groups.map((group) => { + const endpoints = group.endpoints.map((endpoint) => { + const prefix = endpointTypeName(group, endpoint) const input = endpoint.input .map((field) => { const schema = effectInputSchema(endpoint, field) @@ -530,8 +554,23 @@ function groupShapeName(group: Group) { return `${identifierPart(group.identifier)}Api` } +// Generated symbol names derive from group and endpoint identity, never from traversal +// position, so adding an endpoint or group cannot rename unrelated generated code. +// Uniqueness is validated by compile (groupTypeNames/endpointTypeNames). +function groupTypeName(group: Group) { + return identifierPart(group.identifier) +} + +function endpointTypeName(group: Group, endpoint: Endpoint) { + return `${groupTypeName(group)}${endpoint.clientPath.map(identifierPart).join("")}` +} + +function endpointAdapterName(group: Group, endpoint: Endpoint) { + return `Endpoint${endpointTypeName(group, endpoint)}` +} + function groupShapeTypeName(group: Group, endpoint: Endpoint) { - return `${identifierPart(group.identifier)}${endpoint.clientPath.map(identifierPart).join("")}Operation` + return `${endpointTypeName(group, endpoint)}Operation` } function assertPromiseEndpoint(endpoint: Endpoint) { @@ -585,7 +624,7 @@ function promiseOperations(groups: ReadonlyArray) { function renderEffectFiles(groups: ReadonlyArray): Output["files"] { return [ - ...groups.map((group, index) => ({ path: `${group.module}.ts`, content: renderGroup(group, index) })), + ...groups.map((group) => ({ path: `${group.module}.ts`, content: renderGroup(group) })), { path: "client-error.ts", content: @@ -610,10 +649,11 @@ function renderImportedEffectFiles( readonly shapeModule?: string }, ): Output["files"] { - const adapters = groups.map((group, groupIndex) => { + const adapters = groups.map((group) => { const rawGroup = group.endpoints[0]?.topLevel ? "RawClient" : `RawClient[${JSON.stringify(group.sourceIdentifier)}]` - const methods = group.endpoints.map((item, endpointIndex) => { - const prefix = `Endpoint${groupIndex}_${endpointIndex}` + const methods = group.endpoints.map((item) => { + const prefix = endpointTypeName(group, item) + const adapter = endpointAdapterName(group, item) const schemaBySource = { params: item.params, query: item.query, @@ -660,20 +700,22 @@ function renderImportedEffectFiles( : isOpaquePayload(item) ? `type ${prefix}Request = Parameters<${rawGroup}[${JSON.stringify(item.endpoint.identifier)}]>[0]\n` : "" - return `${declarations}const ${prefix} = (raw: ${rawGroup}) => (${argument}) => ${output}` + return `${declarations}const ${adapter} = (raw: ${rawGroup}) => (${argument}) => ${output}` }) const fields = renderClientTree( group.endpoints, - (_item, endpointIndex) => `Endpoint${groupIndex}_${endpointIndex}(raw)`, + (item) => `${endpointAdapterName(group, item)}(raw)`, (name, value) => `${JSON.stringify(name)}: ${value}`, ", ", ) - return `${methods.join("\n\n")}\n\nconst adaptGroup${groupIndex} = (raw: ${rawGroup}) => ({ ${fields} })` + return `${methods.join("\n\n")}\n\nconst adaptGroup${groupTypeName(group)} = (raw: ${rawGroup}) => ({ ${fields} })` }) - const fields = groups.flatMap((group, index) => + const fields = groups.flatMap((group) => group.endpoints[0]?.topLevel - ? [`...adaptGroup${index}(raw)`] - : [`${JSON.stringify(group.identifier)}: adaptGroup${index}(raw[${JSON.stringify(group.sourceIdentifier)}])`], + ? [`...adaptGroup${groupTypeName(group)}(raw)`] + : [ + `${JSON.stringify(group.identifier)}: adaptGroup${groupTypeName(group)}(raw[${JSON.stringify(group.sourceIdentifier)}])`, + ], ) const usesStream = groups.some((group) => group.endpoints.some((item) => item.operation.success === "stream")) const imported = "api" in options @@ -683,15 +725,24 @@ function renderImportedEffectFiles( ? renderImportedGroup(options.group) : renderImportedProjection(groups, options.endpoints) const api = imported ? options.api : "Api" + const adapterNames = new Set( + groups.flatMap((group) => group.endpoints.map((endpoint) => endpointAdapterName(group, endpoint))), + ) + const adapterCollision = (projection?.imports ?? [api]).find((name) => adapterNames.has(name)) + if (adapterCollision !== undefined) { + throw new GenerationError({ + reason: `Generated Effect adapter collides with imported endpoint: ${adapterCollision}`, + }) + } const imports = projection === undefined ? `import { ${api} } from ${JSON.stringify(options.module)}` : `import { HttpApi, HttpApiClient${"endpoints" in options ? ", HttpApiGroup" : ""} } from "effect/unstable/httpapi"\nimport { ${projection.imports.join(", ")} } from ${JSON.stringify(options.module)}` const httpApiImport = projection === undefined ? 'import { HttpApiClient } from "effect/unstable/httpapi"\n' : "" - const shapeTypes = groups.flatMap((group, groupIndex) => - group.endpoints.flatMap((endpoint, endpointIndex) => [ - ...(endpoint.operation.inputMode === "none" ? [] : [`Endpoint${groupIndex}_${endpointIndex}Input`]), - `Endpoint${groupIndex}_${endpointIndex}Output`, + const shapeTypes = groups.flatMap((group) => + group.endpoints.flatMap((endpoint) => [ + ...(endpoint.operation.inputMode === "none" ? [] : [`${endpointTypeName(group, endpoint)}Input`]), + `${endpointTypeName(group, endpoint)}Output`, ]), ) const shapeImport = @@ -975,11 +1026,12 @@ function renderClientTree( } function identifierPart(value: string) { - return value + const identifier = value .split(/[^A-Za-z0-9]+/) .filter(Boolean) .map((part) => `${part[0]?.toUpperCase() ?? ""}${part.slice(1)}`) .join("") + return /^[A-Za-z_$]/.test(identifier) ? identifier : `_${identifier}` } function structuralTypes(schemas: ReadonlyArray, mutable: boolean, reservedNames: ReadonlySet) { @@ -1239,14 +1291,6 @@ function promisePath(path: string, input: ReadonlyArray, wildcard?: return `\`${template}${wildcard === undefined ? "" : `\${encodePath(input.${wildcard.name})}`}\`` } -function uniqueModule(base: string, index: number, modules: ReadonlySet) { - if (!modules.has(base.toLowerCase())) return base - const seed = `${base}-${index}` - let suffix = 0 - while (modules.has(`${seed}${suffix === 0 ? "" : `-${suffix}`}`.toLowerCase())) suffix++ - return `${seed}${suffix === 0 ? "" : `-${suffix}`}` -} - function normalizeTransport( schema: Schema.Top | undefined, source: InputField["source"] | "success" | "error", @@ -1697,10 +1741,10 @@ function streamEffectPortable(schema: Schema.Top) { return sameEncoding(schema.events.ast, rebuilt.events.ast) } -function renderGroup(group: Group, groupIndex: number) { +function renderGroup(group: Group) { const slots: Array = [] const adapters: Array = [] - const endpointSources = group.endpoints.map((operation, endpointIndex) => { + const endpointSources = group.endpoints.map((operation) => { const { endpoint, errors, @@ -1710,7 +1754,7 @@ function renderGroup(group: Group, groupIndex: number) { query: endpointQuery, successes, } = operation - const prefix = `Endpoint${endpointIndex}` + const prefix = `Endpoint${operation.clientPath.map(identifierPart).join("")}` const params = addSlot(endpointParams, `${prefix}Params`) const query = addSlot(endpointQuery, `${prefix}Query`) const headers = addSlot(endpointHeaders, `${prefix}Headers`) @@ -1805,15 +1849,16 @@ function renderGroup(group: Group, groupIndex: number) { const usesHttpApiSchema = endpointSources.some((source) => source.includes("HttpApiSchema.")) const methods = renderClientTree( group.endpoints, - (_item, index) => `Endpoint${index}(raw)`, + (item) => `Endpoint${item.clientPath.map(identifierPart).join("")}(raw)`, (name, value) => `${JSON.stringify(name)}: ${value}`, ", ", ) + const name = groupTypeName(group) const rawGroup = group.endpoints[0]?.topLevel - ? `HttpApiClient.Client` - : `HttpApiClient.Client.Group` + ? `HttpApiClient.Client` + : `HttpApiClient.Client.Group` const usesStream = group.endpoints.some((item) => item.operation.success === "stream") - return `// Generated by @opencode-ai/httpapi-codegen. Do not edit.\nimport { Effect, Schema${usesStream ? ", Stream" : ""} } from "effect"\nimport { Sse } from "effect/unstable/encoding"\nimport { HttpClientError } from "effect/unstable/http"\nimport { HttpApiClient, HttpApiEndpoint, HttpApiGroup${usesHttpApiSchema ? ", HttpApiSchema" : ""} } from "effect/unstable/httpapi"\nimport { ClientError } from "./client-error.js"\n\n${declarations}\n\nexport const Group${groupIndex} = ${groupSource}\n\ntype RawGroup = ${rawGroup}\n\n${adapters.join("\n\n")}\n\nexport const adaptGroup${groupIndex} = (raw: RawGroup) => ({ ${methods} })\n` + return `// Generated by @opencode-ai/httpapi-codegen. Do not edit.\nimport { Effect, Schema${usesStream ? ", Stream" : ""} } from "effect"\nimport { Sse } from "effect/unstable/encoding"\nimport { HttpClientError } from "effect/unstable/http"\nimport { HttpApiClient, HttpApiEndpoint, HttpApiGroup${usesHttpApiSchema ? ", HttpApiSchema" : ""} } from "effect/unstable/httpapi"\nimport { ClientError } from "./client-error.js"\n\n${declarations}\n\nexport const Group${name} = ${groupSource}\n\ntype RawGroup = ${rawGroup}\n\n${adapters.join("\n\n")}\n\nexport const adaptGroup${name} = (raw: RawGroup) => ({ ${methods} })\n` } function renderEffectRequestPart( @@ -1883,15 +1928,20 @@ function renderSchemas(slots: ReadonlyArray) { function renderClient(groups: ReadonlyArray) { const imports = groups - .map((group, index) => `import { adaptGroup${index}, Group${index} } from ${JSON.stringify(`./${group.module}`)}`) + .map( + (group) => + `import { adaptGroup${groupTypeName(group)}, Group${groupTypeName(group)} } from ${JSON.stringify(`./${group.module}`)}`, + ) .join("\n") - const api = `HttpApi.make("generated")${groups.map((_, index) => `.add(Group${index})`).join("")}` - const fields = groups.flatMap((group, index) => { + const api = `HttpApi.make("generated")${groups.map((group) => `.add(Group${groupTypeName(group)})`).join("")}` + const fields = groups.flatMap((group) => { if (!group.endpoints[0]?.topLevel) { - return [`${JSON.stringify(group.identifier)}: adaptGroup${index}(raw[${JSON.stringify(group.identifier)}])`] + return [ + `${JSON.stringify(group.identifier)}: adaptGroup${groupTypeName(group)}(raw[${JSON.stringify(group.identifier)}])`, + ] } const raw = `{ ${group.endpoints.map((item) => `${JSON.stringify(item.endpoint.identifier)}: raw[${JSON.stringify(item.endpoint.identifier)}]`).join(", ")} }` - return [`...adaptGroup${index}(${raw})`] + return [`...adaptGroup${groupTypeName(group)}(${raw})`] }) return `// Generated by @opencode-ai/httpapi-codegen. Do not edit.\nimport { Effect } from "effect"\nimport { HttpApi, HttpApiClient } from "effect/unstable/httpapi"\n${imports}\n\nconst Api = ${api}\nconst adaptClient = (raw: HttpApiClient.ForApi) => ({ ${fields.join(", ")} })\n\nexport const make = (options?: { readonly baseUrl?: URL | string }) =>\n HttpApiClient.make(Api, options).pipe(Effect.map(adaptClient))\n` } diff --git a/packages/httpapi-codegen/test/generate.test.ts b/packages/httpapi-codegen/test/generate.test.ts index bde4f21a37e..e3dde0ba226 100644 --- a/packages/httpapi-codegen/test/generate.test.ts +++ b/packages/httpapi-codegen/test/generate.test.ts @@ -120,8 +120,8 @@ describe("HttpApiCodegen.generate", () => { const source = output.files[0]?.content expect(source).toContain('import type { Session } from "@example/schema/session"') - expect(source).toContain('export type Endpoint0_0Input = { readonly "id": string }') - expect(source).toContain("export type Endpoint0_0Output = Session.Info") + expect(source).toContain('export type SessionGetInput = { readonly "id": string }') + expect(source).toContain("export type SessionGetOutput = Session.Info") expect(source).not.toContain("HttpApiClient") expect(source).not.toContain("@example/api") }) @@ -141,7 +141,53 @@ describe("HttpApiCodegen.generate", () => { const source = output.files[0]?.content expect(source).toContain('import type { OpenCodeEvent } from "@example/protocol/event"') - expect(source).toContain("export type Endpoint0_0Output = OpenCodeEvent") + expect(source).toContain("export type SessionEventsOutput = OpenCodeEvent") + }) + + test("rejects authoritative Effect types colliding with generated aliases", () => { + expect(() => + emitEffectShape(compileContract(api(HttpApiEndpoint.get("get", "/session", { success: Schema.String }))), { + outputTypes: { + "session.get": { + name: "SessionGetOutput", + import: 'import type { SessionGetOutput } from "@example/schema/session"', + }, + }, + }), + ).toThrow("Generated Effect type collides with imported type: SessionGetOutput") + }) + + test("rejects qualified Effect imports colliding with generated interfaces", () => { + const Info = Schema.Struct({ id: Schema.String }).annotate({ identifier: "Session.Info" }) + + expect(() => + emitEffectShape(compileContract(api(HttpApiEndpoint.get("get", "/session", { success: Info }))), { + typeReferences: [ + { + schema: Info, + name: "SessionApi.Info", + import: 'import type { SessionApi } from "@example/schema/session"', + }, + ], + }), + ).toThrow("Generated Effect type collides with imported type: SessionApi") + }) + + test("rejects imported endpoints colliding with generated adapter values", () => { + const contract = compileContract(api(HttpApiEndpoint.get("session.get", "/session", { success: Schema.String }))) + + expect(() => + emitEffectImported(contract, { + module: "@example/api", + endpoints: { "session.session.get": "EndpointSessionGet" }, + }), + ).toThrow("Generated Effect adapter collides with imported endpoint: EndpointSessionGet") + expect(() => + emitEffectImported(contract, { + module: "@example/api", + api: "EndpointSessionGet", + }), + ).toThrow("Generated Effect adapter collides with imported endpoint: EndpointSessionGet") }) test("exposes an imported Effect client through its generated shape", () => { @@ -151,8 +197,8 @@ describe("HttpApiCodegen.generate", () => { ) const source = output.files.find((file) => file.path === "client.ts")?.content - expect(source).toContain('import type { Endpoint0_0Output } from "../api"') - expect(source).toContain("preserveEffect()") + expect(source).toContain('import type { SessionGetOutput } from "../api"') + expect(source).toContain("preserveEffect()") }) test("projects imported endpoint constants into a generated API", () => { @@ -271,12 +317,12 @@ describe("HttpApiCodegen.generate", () => { const effect = emitEffect(contract) expect(effect.files.find((file) => file.path === "session.ts")?.content).toContain( - '"instructions": { "list": Endpoint0(raw), "put": Endpoint1(raw), "remove": Endpoint2(raw) }', + '"instructions": { "list": EndpointInstructionsList(raw), "put": EndpointInstructionsPut(raw), "remove": EndpointInstructionsRemove(raw) }', ) const imported = emitEffectImported(contract, { module: "@example/api", api: "Api" }) expect(imported.files.find((file) => file.path === "client.ts")?.content).toContain( - '"instructions": { "list": Endpoint0_0(raw), "put": Endpoint0_1(raw), "remove": Endpoint0_2(raw) }', + '"instructions": { "list": EndpointSessionInstructionsList(raw), "put": EndpointSessionInstructionsPut(raw), "remove": EndpointSessionInstructionsRemove(raw) }', ) const shape = emitEffectShape(contract) @@ -396,9 +442,14 @@ describe("HttpApiCodegen.generate", () => { }) test("rejects normalized group, operation-key, and group prototype collisions", () => { - const normalized = HttpApi.make("test") + const sanitized = HttpApi.make("test") .add(HttpApiGroup.make("foo-bar").add(HttpApiEndpoint.get("get", "/first", { success: Schema.String }))) .add(HttpApiGroup.make("foo.bar").add(HttpApiEndpoint.get("get", "/second", { success: Schema.String }))) + expect(() => compileContract(sanitized)).toThrow("Client module name collision: foo-bar") + + const normalized = HttpApi.make("test") + .add(HttpApiGroup.make("foo_bar").add(HttpApiEndpoint.get("get", "/first", { success: Schema.String }))) + .add(HttpApiGroup.make("foo.bar").add(HttpApiEndpoint.get("get", "/second", { success: Schema.String }))) expect(() => compileContract(normalized)).toThrow("Client group type collision: FooBar") const endpointType = HttpApi.make("test") @@ -499,7 +550,9 @@ describe("HttpApiCodegen.generate", () => { expect(contract.groups[0]?.endpoints[0]?.operation.name).toBe("get") expect(promise).toContain('"get": (input: SessionGetInput, requestOptions?: RequestOptions)') - expect(effect).toContain('const adaptGroup0 = (raw: RawClient["session"]) => ({ "get": Endpoint0_0(raw) })') + expect(effect).toContain( + 'const adaptGroupSession = (raw: RawClient["session"]) => ({ "get": EndpointSessionGet(raw) })', + ) expect(effect).toContain('raw["session.get"]') }) @@ -1478,7 +1531,7 @@ describe("HttpApiCodegen.generate", () => { expect(output.operations[0]).toBeDefined() expect(output.files.find((file) => file.path === "session.ts")?.content).toContain( - 'extends Schema.TaggedError("Unauthorized")', + 'extends Schema.TaggedError("Unauthorized")', ) }) @@ -1494,7 +1547,7 @@ describe("HttpApiCodegen.generate", () => { ) expect(output.files.find((file) => file.path === "session.ts")?.content).toContain( - 'Endpoint0Error0Class.annotate({ "httpApiStatus": 404 })', + 'EndpointGetError0Class.annotate({ "httpApiStatus": 404 })', ) }) @@ -1504,35 +1557,35 @@ describe("HttpApiCodegen.generate", () => { expect(output.files.find((file) => file.path === "session.ts")?.content).toContain('HttpApiEndpoint.make("TRACE")') }) - test("uses safe unique module paths without changing public group identifiers", () => { + test("uses safe identity-derived module paths without changing public group identifiers", () => { const output = compile( HttpApi.make("test") .add(HttpApiGroup.make("../session").add(HttpApiEndpoint.get("get", "/session", { success: Schema.String }))) .add(HttpApiGroup.make("GROUP-0").add(HttpApiEndpoint.get("list", "/session", { success: Schema.String }))), ) - expect(output.files.slice(0, 2).map((file) => file.path)).toEqual(["group-0.ts", "GROUP-0-1.ts"]) + expect(output.files.slice(0, 2).map((file) => file.path)).toEqual(["session.ts", "GROUP-0.ts"]) expect(output.files[0]?.content).toContain('HttpApiGroup.make("../session"') }) - test("reserves support module names case-insensitively", () => { + test("prefixes group modules that collide with support or Windows-reserved names", () => { const output = compile( HttpApi.make("test") - .add(HttpApiGroup.make("client").add(HttpApiEndpoint.get("get", "/client", { success: Schema.String }))) - .add(HttpApiGroup.make("INDEX").add(HttpApiEndpoint.get("get", "/index", { success: Schema.String }))), + .add(HttpApiGroup.make("INDEX").add(HttpApiEndpoint.get("get", "/index", { success: Schema.String }))) + .add(HttpApiGroup.make("CON").add(HttpApiEndpoint.get("get", "/con", { success: Schema.String }))), ) - expect(output.files.slice(0, 2).map((file) => file.path)).toEqual(["client-0.ts", "INDEX-1.ts"]) + expect(output.files.slice(0, 2).map((file) => file.path)).toEqual(["group-INDEX.ts", "group-CON.ts"]) }) - test("keeps searching when a reserved-name fallback is also occupied", () => { - const output = compile( - HttpApi.make("test") - .add(HttpApiGroup.make("client-1").add(HttpApiEndpoint.get("first", "/first", { success: Schema.String }))) - .add(HttpApiGroup.make("client").add(HttpApiEndpoint.get("second", "/second", { success: Schema.String }))), - ) - - expect(output.files.slice(0, 2).map((file) => file.path)).toEqual(["client-1.ts", "client-1-1.ts"]) + test("rejects module names colliding after normalization", () => { + expect(() => + compile( + HttpApi.make("test") + .add(HttpApiGroup.make("my.group").add(HttpApiEndpoint.get("first", "/first", { success: Schema.String }))) + .add(HttpApiGroup.make("my/group").add(HttpApiEndpoint.get("second", "/second", { success: Schema.String }))), + ), + ).toThrow("Client module name collision: my-group") }) test("rejects collisions in the flattened client namespace", () => { @@ -1558,7 +1611,7 @@ describe("HttpApiCodegen.generate", () => { ), ) - expect(output.files[0]?.content).toContain("type RawGroup = HttpApiClient.Client diff --git a/packages/httpapi-codegen/test/generated/client.ts b/packages/httpapi-codegen/test/generated/client.ts index f67fc00a99a..8379f4d9afe 100644 --- a/packages/httpapi-codegen/test/generated/client.ts +++ b/packages/httpapi-codegen/test/generated/client.ts @@ -1,15 +1,15 @@ // Generated by @opencode-ai/httpapi-codegen. Do not edit. import { Effect } from "effect" import { HttpApi, HttpApiClient } from "effect/unstable/httpapi" -import { adaptGroup0, Group0 } from "./session" -import { adaptGroup1, Group1 } from "./event" -import { adaptGroup2, Group2 } from "./system" +import { adaptGroupSession, GroupSession } from "./session" +import { adaptGroupEvent, GroupEvent } from "./event" +import { adaptGroupSystem, GroupSystem } from "./system" -const Api = HttpApi.make("generated").add(Group0).add(Group1).add(Group2) +const Api = HttpApi.make("generated").add(GroupSession).add(GroupEvent).add(GroupSystem) const adaptClient = (raw: HttpApiClient.ForApi) => ({ - session: adaptGroup0(raw["session"]), - event: adaptGroup1(raw["event"]), - ...adaptGroup2({ status: raw["status"] }), + session: adaptGroupSession(raw["session"]), + event: adaptGroupEvent(raw["event"]), + ...adaptGroupSystem({ status: raw["status"] }), }) export const make = (options?: { readonly baseUrl?: URL | string }) => diff --git a/packages/httpapi-codegen/test/generated/event.ts b/packages/httpapi-codegen/test/generated/event.ts index bd8a2926e01..d1799d2ad1b 100644 --- a/packages/httpapi-codegen/test/generated/event.ts +++ b/packages/httpapi-codegen/test/generated/event.ts @@ -5,35 +5,35 @@ import { HttpClientError } from "effect/unstable/http" import { HttpApiClient, HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/unstable/httpapi" import { ClientError } from "./client-error.js" -const Endpoint0SuccessData = Schema.Struct({ type: Schema.String }) +const EndpointSubscribeSuccessData = Schema.Struct({ type: Schema.String }) -const Endpoint0SuccessError = Schema.Never +const EndpointSubscribeSuccessError = Schema.Never -export const Group1 = HttpApiGroup.make("event", { topLevel: false }).add( +export const GroupEvent = HttpApiGroup.make("event", { topLevel: false }).add( HttpApiEndpoint.make("GET")("subscribe", "/event", { success: HttpApiSchema.StreamSse({ - data: Endpoint0SuccessData, - error: Endpoint0SuccessError, + data: EndpointSubscribeSuccessData, + error: EndpointSubscribeSuccessError, contentType: "text/event-stream", }).pipe(HttpApiSchema.status(202)), }), ) -type RawGroup = HttpApiClient.Client.Group +type RawGroup = HttpApiClient.Client.Group -const Endpoint0DeclaredError = Schema.Union([Endpoint0SuccessError]) -const mapEndpoint0Error = (error: unknown) => +const EndpointSubscribeDeclaredError = Schema.Union([EndpointSubscribeSuccessError]) +const mapEndpointSubscribeError = (error: unknown) => HttpClientError.isHttpClientError(error) || Schema.isSchemaError(error) || Sse.Retry.is(error) ? new ClientError({ cause: error }) - : Schema.is(Endpoint0DeclaredError)(error) + : Schema.is(EndpointSubscribeDeclaredError)(error) ? error : new ClientError({ cause: error }) -const Endpoint0 = (raw: RawGroup) => () => +const EndpointSubscribe = (raw: RawGroup) => () => Stream.unwrap( raw["subscribe"]({}).pipe( - Effect.mapError(mapEndpoint0Error), - Effect.map((stream) => stream.pipe(Stream.mapError(mapEndpoint0Error))), + Effect.mapError(mapEndpointSubscribeError), + Effect.map((stream) => stream.pipe(Stream.mapError(mapEndpointSubscribeError))), ), ) -export const adaptGroup1 = (raw: RawGroup) => ({ subscribe: Endpoint0(raw) }) +export const adaptGroupEvent = (raw: RawGroup) => ({ subscribe: EndpointSubscribe(raw) }) diff --git a/packages/httpapi-codegen/test/generated/session.ts b/packages/httpapi-codegen/test/generated/session.ts index ced2f16db2c..24706d83fa1 100644 --- a/packages/httpapi-codegen/test/generated/session.ts +++ b/packages/httpapi-codegen/test/generated/session.ts @@ -5,137 +5,141 @@ import { HttpClientError } from "effect/unstable/http" import { HttpApiClient, HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi" import { ClientError } from "./client-error.js" -const Endpoint0Success = Schema.String +const EndpointHealthSuccess = Schema.String -const Endpoint1Query = Schema.Struct({ archived: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Undefined])) }) +const EndpointListQuery = Schema.Struct({ + archived: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Undefined])), +}) -const Endpoint1Success = Schema.Array(Schema.String) +const EndpointListSuccess = Schema.Array(Schema.String) -const Endpoint2Params = Schema.Struct({ sessionID: Schema.String }) +const EndpointGetParams = Schema.Struct({ sessionID: Schema.String }) -const Endpoint2Success = Schema.Struct({ data: Schema.String }) +const EndpointGetSuccess = Schema.Struct({ data: Schema.String }) -class Endpoint2Error0Class extends Schema.TaggedError("Missing")("Missing", { +class EndpointGetError0Class extends Schema.TaggedError("Missing")("Missing", { message: Schema.String, }) {} -const Endpoint2Error0 = Endpoint2Error0Class.annotate({ httpApiStatus: 404 }) +const EndpointGetError0 = EndpointGetError0Class.annotate({ httpApiStatus: 404 }) -const Endpoint3Params = Schema.Struct({ sessionID: Schema.String }) +const EndpointInterruptParams = Schema.Struct({ sessionID: Schema.String }) -const Endpoint3Success = Schema.Void.annotate({ httpApiStatus: 204 }) +const EndpointInterruptSuccess = Schema.Void.annotate({ httpApiStatus: 204 }) -const Endpoint4Params = Schema.Struct({ sessionID: Schema.String }) +const EndpointConfigureParams = Schema.Struct({ sessionID: Schema.String }) -const Endpoint4Query = Schema.Struct({ dryRun: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Undefined])) }) +const EndpointConfigureQuery = Schema.Struct({ + dryRun: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Undefined])), +}) -const Endpoint4Headers = Schema.Struct({ traceID: Schema.String }) +const EndpointConfigureHeaders = Schema.Struct({ traceID: Schema.String }) -const Endpoint4Payload0 = Schema.Union([ +const EndpointConfigurePayload0 = Schema.Union([ Schema.Struct({ type: Schema.Literal("local"), command: Schema.Array(Schema.String) }), Schema.Struct({ type: Schema.Literal("remote"), url: Schema.String }), ]) -const Endpoint4Success = Schema.String +const EndpointConfigureSuccess = Schema.String -export const Group0 = HttpApiGroup.make("session", { topLevel: false }) - .add(HttpApiEndpoint.make("GET")("health", "/session/health", { success: Endpoint0Success })) - .add(HttpApiEndpoint.make("GET")("list", "/session", { query: Endpoint1Query, success: Endpoint1Success })) +export const GroupSession = HttpApiGroup.make("session", { topLevel: false }) + .add(HttpApiEndpoint.make("GET")("health", "/session/health", { success: EndpointHealthSuccess })) + .add(HttpApiEndpoint.make("GET")("list", "/session", { query: EndpointListQuery, success: EndpointListSuccess })) .add( HttpApiEndpoint.make("GET")("get", "/session/:sessionID", { - params: Endpoint2Params, - success: Endpoint2Success, - error: Endpoint2Error0, + params: EndpointGetParams, + success: EndpointGetSuccess, + error: EndpointGetError0, }), ) .add( HttpApiEndpoint.make("POST")("interrupt", "/session/:sessionID/interrupt", { - params: Endpoint3Params, - success: Endpoint3Success, + params: EndpointInterruptParams, + success: EndpointInterruptSuccess, }), ) .add( HttpApiEndpoint.make("POST")("configure", "/session/:sessionID/configure", { - params: Endpoint4Params, - query: Endpoint4Query, - headers: Endpoint4Headers, - payload: Endpoint4Payload0, - success: Endpoint4Success, + params: EndpointConfigureParams, + query: EndpointConfigureQuery, + headers: EndpointConfigureHeaders, + payload: EndpointConfigurePayload0, + success: EndpointConfigureSuccess, }), ) -type RawGroup = HttpApiClient.Client.Group +type RawGroup = HttpApiClient.Client.Group -const Endpoint0DeclaredError = Schema.Never -const mapEndpoint0Error = (error: unknown) => +const EndpointHealthDeclaredError = Schema.Never +const mapEndpointHealthError = (error: unknown) => HttpClientError.isHttpClientError(error) || Schema.isSchemaError(error) || Sse.Retry.is(error) ? new ClientError({ cause: error }) - : Schema.is(Endpoint0DeclaredError)(error) + : Schema.is(EndpointHealthDeclaredError)(error) ? error : new ClientError({ cause: error }) -const Endpoint0 = (raw: RawGroup) => () => raw["health"]({}).pipe(Effect.mapError(mapEndpoint0Error)) +const EndpointHealth = (raw: RawGroup) => () => raw["health"]({}).pipe(Effect.mapError(mapEndpointHealthError)) -type Endpoint1Input = { readonly archived?: (typeof Endpoint1Query.Type)["archived"] } -const Endpoint1DeclaredError = Schema.Never -const mapEndpoint1Error = (error: unknown) => +type EndpointListInput = { readonly archived?: (typeof EndpointListQuery.Type)["archived"] } +const EndpointListDeclaredError = Schema.Never +const mapEndpointListError = (error: unknown) => HttpClientError.isHttpClientError(error) || Schema.isSchemaError(error) || Sse.Retry.is(error) ? new ClientError({ cause: error }) - : Schema.is(Endpoint1DeclaredError)(error) + : Schema.is(EndpointListDeclaredError)(error) ? error : new ClientError({ cause: error }) -const Endpoint1 = (raw: RawGroup) => (input?: Endpoint1Input) => - raw["list"]({ query: { archived: input?.["archived"] } }).pipe(Effect.mapError(mapEndpoint1Error)) +const EndpointList = (raw: RawGroup) => (input?: EndpointListInput) => + raw["list"]({ query: { archived: input?.["archived"] } }).pipe(Effect.mapError(mapEndpointListError)) -type Endpoint2Input = { readonly sessionID: (typeof Endpoint2Params.Type)["sessionID"] } -const Endpoint2DeclaredError = Schema.Union([Endpoint2Error0]) -const mapEndpoint2Error = (error: unknown) => +type EndpointGetInput = { readonly sessionID: (typeof EndpointGetParams.Type)["sessionID"] } +const EndpointGetDeclaredError = Schema.Union([EndpointGetError0]) +const mapEndpointGetError = (error: unknown) => HttpClientError.isHttpClientError(error) || Schema.isSchemaError(error) || Sse.Retry.is(error) ? new ClientError({ cause: error }) - : Schema.is(Endpoint2DeclaredError)(error) + : Schema.is(EndpointGetDeclaredError)(error) ? error : new ClientError({ cause: error }) -const Endpoint2 = (raw: RawGroup) => (input: Endpoint2Input) => +const EndpointGet = (raw: RawGroup) => (input: EndpointGetInput) => raw["get"]({ params: { sessionID: input["sessionID"] } }).pipe( - Effect.mapError(mapEndpoint2Error), + Effect.mapError(mapEndpointGetError), Effect.map((value) => value.data), ) -type Endpoint3Input = { readonly sessionID: (typeof Endpoint3Params.Type)["sessionID"] } -const Endpoint3DeclaredError = Schema.Never -const mapEndpoint3Error = (error: unknown) => +type EndpointInterruptInput = { readonly sessionID: (typeof EndpointInterruptParams.Type)["sessionID"] } +const EndpointInterruptDeclaredError = Schema.Never +const mapEndpointInterruptError = (error: unknown) => HttpClientError.isHttpClientError(error) || Schema.isSchemaError(error) || Sse.Retry.is(error) ? new ClientError({ cause: error }) - : Schema.is(Endpoint3DeclaredError)(error) + : Schema.is(EndpointInterruptDeclaredError)(error) ? error : new ClientError({ cause: error }) -const Endpoint3 = (raw: RawGroup) => (input: Endpoint3Input) => - raw["interrupt"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapEndpoint3Error)) +const EndpointInterrupt = (raw: RawGroup) => (input: EndpointInterruptInput) => + raw["interrupt"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapEndpointInterruptError)) -type Endpoint4Request = Parameters[0] -type Endpoint4Input = { - readonly sessionID: (typeof Endpoint4Params.Type)["sessionID"] - readonly dryRun?: (typeof Endpoint4Query.Type)["dryRun"] - readonly traceID: (typeof Endpoint4Headers.Type)["traceID"] - readonly payload: typeof Endpoint4Payload0.Type +type EndpointConfigureRequest = Parameters[0] +type EndpointConfigureInput = { + readonly sessionID: (typeof EndpointConfigureParams.Type)["sessionID"] + readonly dryRun?: (typeof EndpointConfigureQuery.Type)["dryRun"] + readonly traceID: (typeof EndpointConfigureHeaders.Type)["traceID"] + readonly payload: typeof EndpointConfigurePayload0.Type } -const Endpoint4DeclaredError = Schema.Never -const mapEndpoint4Error = (error: unknown) => +const EndpointConfigureDeclaredError = Schema.Never +const mapEndpointConfigureError = (error: unknown) => HttpClientError.isHttpClientError(error) || Schema.isSchemaError(error) || Sse.Retry.is(error) ? new ClientError({ cause: error }) - : Schema.is(Endpoint4DeclaredError)(error) + : Schema.is(EndpointConfigureDeclaredError)(error) ? error : new ClientError({ cause: error }) -const Endpoint4 = (raw: RawGroup) => (input: Endpoint4Input) => +const EndpointConfigure = (raw: RawGroup) => (input: EndpointConfigureInput) => raw["configure"]({ params: { sessionID: input["sessionID"] }, query: { dryRun: input["dryRun"] }, headers: { traceID: input["traceID"] }, payload: input["payload"], - } as Endpoint4Request).pipe(Effect.mapError(mapEndpoint4Error)) + } as EndpointConfigureRequest).pipe(Effect.mapError(mapEndpointConfigureError)) -export const adaptGroup0 = (raw: RawGroup) => ({ - health: Endpoint0(raw), - list: Endpoint1(raw), - get: Endpoint2(raw), - interrupt: Endpoint3(raw), - configure: Endpoint4(raw), +export const adaptGroupSession = (raw: RawGroup) => ({ + health: EndpointHealth(raw), + list: EndpointList(raw), + get: EndpointGet(raw), + interrupt: EndpointInterrupt(raw), + configure: EndpointConfigure(raw), }) diff --git a/packages/httpapi-codegen/test/generated/system.ts b/packages/httpapi-codegen/test/generated/system.ts index 8f2a25afa6b..4cd56d9c965 100644 --- a/packages/httpapi-codegen/test/generated/system.ts +++ b/packages/httpapi-codegen/test/generated/system.ts @@ -5,21 +5,21 @@ import { HttpClientError } from "effect/unstable/http" import { HttpApiClient, HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi" import { ClientError } from "./client-error.js" -const Endpoint0Success = Schema.String +const EndpointStatusSuccess = Schema.String -export const Group2 = HttpApiGroup.make("system", { topLevel: true }).add( - HttpApiEndpoint.make("GET")("status", "/status", { success: Endpoint0Success }), +export const GroupSystem = HttpApiGroup.make("system", { topLevel: true }).add( + HttpApiEndpoint.make("GET")("status", "/status", { success: EndpointStatusSuccess }), ) -type RawGroup = HttpApiClient.Client +type RawGroup = HttpApiClient.Client -const Endpoint0DeclaredError = Schema.Never -const mapEndpoint0Error = (error: unknown) => +const EndpointStatusDeclaredError = Schema.Never +const mapEndpointStatusError = (error: unknown) => HttpClientError.isHttpClientError(error) || Schema.isSchemaError(error) || Sse.Retry.is(error) ? new ClientError({ cause: error }) - : Schema.is(Endpoint0DeclaredError)(error) + : Schema.is(EndpointStatusDeclaredError)(error) ? error : new ClientError({ cause: error }) -const Endpoint0 = (raw: RawGroup) => () => raw["status"]({}).pipe(Effect.mapError(mapEndpoint0Error)) +const EndpointStatus = (raw: RawGroup) => () => raw["status"]({}).pipe(Effect.mapError(mapEndpointStatusError)) -export const adaptGroup2 = (raw: RawGroup) => ({ status: Endpoint0(raw) }) +export const adaptGroupSystem = (raw: RawGroup) => ({ status: EndpointStatus(raw) }) diff --git a/packages/protocol/openapi.json b/packages/protocol/openapi.json index c30875e4ad6..2a0a4ab9435 100644 --- a/packages/protocol/openapi.json +++ b/packages/protocol/openapi.json @@ -109,7 +109,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -162,7 +162,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -236,7 +236,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -309,7 +309,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -428,7 +428,7 @@ "name": "search", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_" + "$ref": "#/components/schemas/Union_f090cb615c84" }, "required": false }, @@ -637,16 +637,16 @@ ] }, "title": { - "$ref": "#/components/schemas/Union_" + "$ref": "#/components/schemas/Union_f090cb615c84" }, "agent": { - "$ref": "#/components/schemas/Union_2" + "$ref": "#/components/schemas/Union_f090cb615c84" }, "model": { - "$ref": "#/components/schemas/Union_3" + "$ref": "#/components/schemas/Union_6a162d0a021d" }, "location": { - "$ref": "#/components/schemas/Union_4" + "$ref": "#/components/schemas/Union_5ee94d3ca88d" } }, "additionalProperties": false @@ -724,10 +724,10 @@ "$ref": "#/components/schemas/Session.Info" }, "messages": { - "$ref": "#/components/schemas/Arrays_" + "$ref": "#/components/schemas/Arrays_fa246a9267ec" }, "location": { - "$ref": "#/components/schemas/Union_4" + "$ref": "#/components/schemas/Union_5ee94d3ca88d" } }, "required": ["info", "messages"], @@ -761,7 +761,7 @@ "name": "sanitize", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_7" + "$ref": "#/components/schemas/Union_e13209ef6bf4" }, "required": false } @@ -1459,7 +1459,7 @@ ] }, "delivery": { - "$ref": "#/components/schemas/Union_8" + "$ref": "#/components/schemas/Union_1f50b1b03235" } }, "required": ["directory"], @@ -1573,28 +1573,28 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/Union_9" + "$ref": "#/components/schemas/Union_f8b4c9e24aa0" }, "text": { "type": "string" }, "files": { - "$ref": "#/components/schemas/Arrays_4" + "$ref": "#/components/schemas/Arrays_3ff7cb2a474f" }, "agents": { - "$ref": "#/components/schemas/Arrays_5" + "$ref": "#/components/schemas/Arrays_e1027de4b984" }, "skills": { - "$ref": "#/components/schemas/Arrays_6" + "$ref": "#/components/schemas/Arrays_c17502465996" }, "metadata": { - "$ref": "#/components/schemas/Objects_3" + "$ref": "#/components/schemas/Objects_a2c799262a3c" }, "delivery": { - "$ref": "#/components/schemas/Union_8" + "$ref": "#/components/schemas/Union_1f50b1b03235" }, "resume": { - "$ref": "#/components/schemas/Union_10" + "$ref": "#/components/schemas/Union_6a1762611a44" } }, "required": ["text"], @@ -1721,34 +1721,34 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/Union_9" + "$ref": "#/components/schemas/Union_f8b4c9e24aa0" }, "command": { "type": "string" }, "arguments": { - "$ref": "#/components/schemas/Union_" + "$ref": "#/components/schemas/Union_f090cb615c84" }, "agent": { - "$ref": "#/components/schemas/Union_2" + "$ref": "#/components/schemas/Union_f090cb615c84" }, "model": { - "$ref": "#/components/schemas/Union_3" + "$ref": "#/components/schemas/Union_6a162d0a021d" }, "files": { - "$ref": "#/components/schemas/Arrays_4" + "$ref": "#/components/schemas/Arrays_3ff7cb2a474f" }, "agents": { - "$ref": "#/components/schemas/Arrays_5" + "$ref": "#/components/schemas/Arrays_e1027de4b984" }, "skills": { - "$ref": "#/components/schemas/Arrays_6" + "$ref": "#/components/schemas/Arrays_c17502465996" }, "delivery": { - "$ref": "#/components/schemas/Union_8" + "$ref": "#/components/schemas/Union_1f50b1b03235" }, "resume": { - "$ref": "#/components/schemas/Union_10" + "$ref": "#/components/schemas/Union_6a1762611a44" } }, "required": ["command"], @@ -1834,13 +1834,13 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/Union_9" + "$ref": "#/components/schemas/Union_f8b4c9e24aa0" }, "skill": { "type": "string" }, "resume": { - "$ref": "#/components/schemas/Union_10" + "$ref": "#/components/schemas/Union_6a1762611a44" } }, "required": ["skill"], @@ -1947,22 +1947,22 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/Union_9" + "$ref": "#/components/schemas/Union_f8b4c9e24aa0" }, "text": { "type": "string" }, "description": { - "$ref": "#/components/schemas/Union_" + "$ref": "#/components/schemas/Union_f090cb615c84" }, "metadata": { - "$ref": "#/components/schemas/Objects_" + "$ref": "#/components/schemas/Objects_a2c799262a3c" }, "delivery": { - "$ref": "#/components/schemas/Union_8" + "$ref": "#/components/schemas/Union_1f50b1b03235" }, "resume": { - "$ref": "#/components/schemas/Union_10" + "$ref": "#/components/schemas/Union_6a1762611a44" } }, "required": ["text"], @@ -2167,10 +2167,10 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/Union_9" + "$ref": "#/components/schemas/Union_f8b4c9e24aa0" }, "delivery": { - "$ref": "#/components/schemas/Union_8" + "$ref": "#/components/schemas/Union_1f50b1b03235" } }, "additionalProperties": false @@ -2373,7 +2373,7 @@ ] }, "files": { - "$ref": "#/components/schemas/Union_10" + "$ref": "#/components/schemas/Union_6a1762611a44" } }, "required": ["messageID"], @@ -3344,7 +3344,7 @@ "name": "follow", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_7" + "$ref": "#/components/schemas/Union_e13209ef6bf4" }, "required": false } @@ -3499,7 +3499,7 @@ "name": "continue", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_7" + "$ref": "#/components/schemas/Union_e13209ef6bf4" }, "required": false } @@ -4011,7 +4011,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4087,7 +4087,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4167,7 +4167,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4236,7 +4236,7 @@ "type": "string" }, "model": { - "$ref": "#/components/schemas/Union_3" + "$ref": "#/components/schemas/Union_6a162d0a021d" } }, "required": ["prompt"], @@ -4257,7 +4257,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4341,7 +4341,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4424,7 +4424,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4498,7 +4498,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4568,7 +4568,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4646,7 +4646,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4698,10 +4698,10 @@ "type": "string" }, "answer": { - "$ref": "#/components/schemas/Union_12" + "$ref": "#/components/schemas/Union_636af7bc29f5" }, "label": { - "$ref": "#/components/schemas/Union_" + "$ref": "#/components/schemas/Union_f090cb615c84" } }, "required": ["key"], @@ -4730,7 +4730,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4799,10 +4799,10 @@ "type": "string" }, "answer": { - "$ref": "#/components/schemas/Union_12" + "$ref": "#/components/schemas/Union_636af7bc29f5" }, "label": { - "$ref": "#/components/schemas/Union_" + "$ref": "#/components/schemas/Union_f090cb615c84" } }, "required": ["methodID"], @@ -4839,7 +4839,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4916,7 +4916,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4978,7 +4978,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5027,7 +5027,7 @@ "type": "object", "properties": { "code": { - "$ref": "#/components/schemas/Union_" + "$ref": "#/components/schemas/Union_f090cb615c84" } }, "additionalProperties": false @@ -5055,7 +5055,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5124,7 +5124,7 @@ "type": "string" }, "label": { - "$ref": "#/components/schemas/Union_" + "$ref": "#/components/schemas/Union_f090cb615c84" } }, "required": ["methodID"], @@ -5161,7 +5161,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5238,7 +5238,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5284,7 +5284,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5358,7 +5358,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5434,7 +5434,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5498,7 +5498,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5562,7 +5562,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5618,7 +5618,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5689,7 +5689,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5758,7 +5758,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5849,7 +5849,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5902,7 +5902,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -6519,7 +6519,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -6806,19 +6806,19 @@ "type": "string" }, "resources": { - "$ref": "#/components/schemas/Arrays_8" + "$ref": "#/components/schemas/Arrays_681004346c78" }, "save": { - "$ref": "#/components/schemas/Arrays_9" + "$ref": "#/components/schemas/Arrays_681004346c78" }, "metadata": { - "$ref": "#/components/schemas/Objects_9" + "$ref": "#/components/schemas/Objects_a2c799262a3c" }, "source": { "$ref": "#/components/schemas/Permission.Source" }, "agent": { - "$ref": "#/components/schemas/Union_2" + "$ref": "#/components/schemas/Union_f090cb615c84" } }, "required": ["action", "resources"], @@ -7097,7 +7097,7 @@ "$ref": "#/components/schemas/Permission.Reply" }, "message": { - "$ref": "#/components/schemas/Union_" + "$ref": "#/components/schemas/Union_f090cb615c84" } }, "required": ["reply"], @@ -7118,7 +7118,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -7172,7 +7172,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -7253,7 +7253,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -7351,7 +7351,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -7417,7 +7417,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -7606,7 +7606,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -7670,7 +7670,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -7780,7 +7780,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -7864,7 +7864,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -7987,7 +7987,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -8056,7 +8056,7 @@ "name": "x-opencode-ticket", "in": "header", "schema": { - "$ref": "#/components/schemas/Union_" + "$ref": "#/components/schemas/Union_f090cb615c84" }, "required": false }, @@ -8064,7 +8064,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -8252,7 +8252,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -8316,7 +8316,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -8423,7 +8423,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -8507,7 +8507,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -8576,7 +8576,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -8684,7 +8684,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -8730,7 +8730,7 @@ "$ref": "#/components/schemas/Location.InfoEncoded" }, "data": { - "$ref": "#/components/schemas/Objects_2" + "$ref": "#/components/schemas/Objects_9d53a00b1efb" } }, "required": ["location", "data"], @@ -8783,7 +8783,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -9102,7 +9102,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -9165,7 +9165,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -9231,7 +9231,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -9363,7 +9363,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -9528,7 +9528,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -9604,7 +9604,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -9704,7 +9704,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -9754,192 +9754,9 @@ }, "components": { "schemas": { - "ServiceHealth": { - "type": "object", - "properties": { - "healthy": { - "type": "boolean", - "enum": [true] - }, - "version": { - "type": "string" - }, - "pid": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - } - }, - "required": ["healthy", "version", "pid"], - "additionalProperties": false - }, - "UnauthorizedErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["UnauthorizedError"] - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "message"], - "additionalProperties": false - }, - "Union_": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "InvalidRequestErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["InvalidRequestError"] - }, - "message": { - "type": "string" - }, - "kind": { - "$ref": "#/components/schemas/Union_" - }, - "field": { - "$ref": "#/components/schemas/Union_" - } - }, - "required": ["_tag", "message"], - "additionalProperties": false - }, - "Union_1": { - "anyOf": [ - { - "type": "object", - "properties": { - "directory": { - "$ref": "#/components/schemas/Union_" - }, - "workspace": { - "$ref": "#/components/schemas/Union_" - } - }, - "additionalProperties": false - }, - { - "type": "null" - } - ] - }, - "Location.InfoEncoded": { - "type": "object", - "properties": { - "directory": { - "type": "string" - }, - "workspaceID": { - "type": "string", - "allOf": [ - { - "pattern": "^wrk" - } - ] - }, - "project": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "directory": { - "type": "string" - }, - "canonical": { - "type": "string" - } - }, - "required": ["id", "directory", "canonical"], - "additionalProperties": false - } - }, - "required": ["directory", "project"], - "additionalProperties": false - }, - "Model.Ref": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "providerID": { - "type": "string" - }, - "variant": { - "type": "string" - } - }, - "required": ["id", "providerID"], - "additionalProperties": false - }, - "Provider.Settings": { - "type": "object" - }, - "Provider.Request": { - "type": "object", - "properties": { - "settings": { - "$ref": "#/components/schemas/Provider.Settings" - }, - "headers": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "body": { - "type": "object" - } - }, - "required": ["settings", "headers", "body"], - "additionalProperties": false - }, "Agent.Color": { "type": "string" }, - "Permission.Effect": { - "type": "string", - "enum": ["allow", "deny", "ask"] - }, - "Permission.Rule": { - "type": "object", - "properties": { - "action": { - "type": "string" - }, - "resource": { - "type": "string" - }, - "effect": { - "$ref": "#/components/schemas/Permission.Effect" - } - }, - "required": ["action", "resource", "effect"], - "additionalProperties": false - }, - "Permission.Ruleset": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Permission.Rule" - } - }, "Agent.Info": { "type": "object", "properties": { @@ -10003,3877 +9820,53 @@ "required": ["_tag", "agentID", "message"], "additionalProperties": false }, - "Plugin.Source": { - "anyOf": [ - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["builtin"] - } - }, - "required": ["type"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["package"] - }, - "package": { - "type": "string" - } - }, - "required": ["type", "package"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["local"] - }, - "path": { - "type": "string" - } - }, - "required": ["type", "path"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["sdk"] - } - }, - "required": ["type"], - "additionalProperties": false - } - ] - }, - "Plugin.Info": { - "anyOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "source": { - "$ref": "#/components/schemas/Plugin.Source" - }, - "status": { - "type": "string", - "enum": ["active"] - }, - "tui": { - "type": "boolean" - } - }, - "required": ["id", "source", "status", "tui"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "source": { - "$ref": "#/components/schemas/Plugin.Source" - }, - "status": { - "type": "string", - "enum": ["failed"] - }, - "error": { - "type": "string" - }, - "tui": { - "type": "boolean" - } - }, - "required": ["source", "status", "error", "tui"], - "additionalProperties": false - } - ] - }, - "Session.ForkBoundary": { - "anyOf": [ - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["before"] - }, - "messageID": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - } - }, - "required": ["type", "messageID"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["through"] - }, - "messageID": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - } - }, - "required": ["type", "messageID"], - "additionalProperties": false - } - ] - }, - "Money.USD": { - "type": "number" - }, - "TokenUsage.Info": { - "type": "object", - "properties": { - "input": { - "type": "number" - }, - "output": { - "type": "number" - }, - "reasoning": { - "type": "number" - }, - "cache": { - "type": "object", - "properties": { - "read": { - "type": "number" - }, - "write": { - "type": "number" - } - }, - "required": ["read", "write"], - "additionalProperties": false - } - }, - "required": ["input", "output", "reasoning", "cache"], - "additionalProperties": false - }, - "Location.Ref": { - "type": "object", - "properties": { - "directory": { - "type": "string" - }, - "workspaceID": { - "type": "string", - "allOf": [ - { - "pattern": "^wrk" - } - ] - } - }, - "required": ["directory"], - "additionalProperties": false - }, - "FileDiff.Info": { - "type": "object", - "properties": { - "file": { - "type": "string" - }, - "patch": { - "type": "string" - }, - "additions": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "deletions": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "status": { - "type": "string", - "enum": ["added", "deleted", "modified"] - } - }, - "required": ["file", "patch", "additions", "deletions", "status"], - "additionalProperties": false - }, - "Session.Revert": { - "type": "object", - "properties": { - "messageID": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "partID": { - "type": "string" - }, - "snapshot": { - "type": "string" - }, - "files": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FileDiff.Info" - } - } - }, - "required": ["messageID"], - "additionalProperties": false - }, - "Session.Info": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] - }, - "parentID": { - "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] - }, - "fork": { - "type": "object", - "properties": { - "sessionID": { - "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] - }, - "boundary": { - "$ref": "#/components/schemas/Session.ForkBoundary" - } - }, - "required": ["sessionID", "boundary"], - "additionalProperties": false - }, - "projectID": { - "type": "string" - }, - "agent": { - "type": "string" - }, - "model": { - "$ref": "#/components/schemas/Model.Ref" - }, - "cost": { - "$ref": "#/components/schemas/Money.USD" - }, - "tokens": { - "$ref": "#/components/schemas/TokenUsage.Info" - }, - "outcome": { - "type": "string", - "enum": ["succeeded", "failed", "interrupted"] - }, - "time": { - "type": "object", - "properties": { - "created": { - "type": "number" - }, - "updated": { - "type": "number" - }, - "idle": { - "type": "number" - }, - "viewed": { - "type": "number" - }, - "archived": { - "type": "number" - } - }, - "required": ["created", "updated"], - "additionalProperties": false - }, - "title": { - "type": "string" - }, - "location": { - "$ref": "#/components/schemas/Location.Ref" - }, - "subpath": { - "type": "string" - }, - "revert": { - "$ref": "#/components/schemas/Session.Revert" - } - }, - "required": ["id", "projectID", "cost", "tokens", "time", "location"], - "additionalProperties": false - }, - "SessionsResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Session.Info" - } - }, - "cursor": { - "type": "object", - "properties": { - "previous": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "next": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "additionalProperties": false - } - }, - "required": ["data", "cursor"], - "additionalProperties": false - }, - "InvalidCursorErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["InvalidCursorError"] - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "message"], - "additionalProperties": false - }, - "Union_2": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "Union_3": { - "anyOf": [ - { - "$ref": "#/components/schemas/Model.Ref" - }, - { - "type": "null" - } - ] - }, - "Union_4": { - "anyOf": [ - { - "$ref": "#/components/schemas/Location.Ref" - }, - { - "type": "null" - } - ] - }, - "Objects_": { - "type": "object" - }, - "Objects_1": { - "type": "object", - "properties": { - "created": { - "type": "number" - } - }, - "required": ["created"], - "additionalProperties": false - }, - "Session.Message.AgentSelected": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "$ref": "#/components/schemas/Objects_1" - }, - "type": { - "type": "string", - "enum": ["agent-switched"] - }, - "agent": { - "type": "string" - }, - "previous": { - "type": "string" - } - }, - "required": ["id", "time", "type", "agent"], - "additionalProperties": false - }, - "Session.Message.ModelSelected": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "$ref": "#/components/schemas/Objects_1" - }, - "type": { - "type": "string", - "enum": ["model-switched"] - }, - "model": { - "$ref": "#/components/schemas/Model.Ref" - }, - "previous": { - "$ref": "#/components/schemas/Model.Ref" - } - }, - "required": ["id", "time", "type", "model"], - "additionalProperties": false - }, - "Session.Message.LocationSwitched": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "$ref": "#/components/schemas/Objects_1" - }, - "type": { - "type": "string", - "enum": ["location-switched"] - }, - "location": { - "$ref": "#/components/schemas/Location.Ref" - }, - "projectID": { - "type": "string" - }, - "subpath": { - "type": "string" - }, - "previous": { - "type": "object", - "properties": { - "location": { - "$ref": "#/components/schemas/Location.Ref" - }, - "projectID": { - "type": "string" - }, - "subpath": { - "type": "string" - } - }, - "required": ["location"], - "additionalProperties": false - } - }, - "required": ["id", "time", "type", "location"], - "additionalProperties": false - }, - "Prompt.Base64": { - "type": "string", - "allOf": [ - { - "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" - } - ] - }, - "Prompt.FileSource": { - "anyOf": [ - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["inline"] - } - }, - "required": ["type"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["uri"] - }, - "uri": { - "type": "string" - } - }, - "required": ["type", "uri"], - "additionalProperties": false - } - ] - }, - "Prompt.Mention": { - "type": "object", - "properties": { - "start": { - "type": "number" - }, - "end": { - "type": "number" - }, - "text": { - "type": "string" - } - }, - "required": ["start", "end", "text"], - "additionalProperties": false - }, - "Prompt.FileAttachment": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/Prompt.Base64" - }, - "mime": { - "type": "string" - }, - "source": { - "$ref": "#/components/schemas/Prompt.FileSource" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "mention": { - "$ref": "#/components/schemas/Prompt.Mention" - } - }, - "required": ["data", "mime", "source"], - "additionalProperties": false - }, - "Arrays_1": { + "Arrays_042d796a7901": { "type": "array", "items": { "$ref": "#/components/schemas/Prompt.FileAttachment" } }, - "Prompt.AgentAttachment": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "mention": { - "$ref": "#/components/schemas/Prompt.Mention" - } - }, - "required": ["name"], - "additionalProperties": false - }, - "Arrays_2": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Prompt.AgentAttachment" - } - }, - "Prompt.SkillAttachment": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "mention": { - "$ref": "#/components/schemas/Prompt.Mention" - } - }, - "required": ["id", "name"], - "additionalProperties": false - }, - "Arrays_3": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Prompt.SkillAttachment" - } - }, - "Session.Message.User": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "$ref": "#/components/schemas/Objects_1" - }, - "text": { - "type": "string" - }, - "files": { - "$ref": "#/components/schemas/Arrays_1" - }, - "agents": { - "$ref": "#/components/schemas/Arrays_2" - }, - "skills": { - "$ref": "#/components/schemas/Arrays_3" - }, - "type": { - "type": "string", - "enum": ["user"] - } - }, - "required": ["id", "time", "text", "type"], - "additionalProperties": false - }, - "Session.Message.Synthetic": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "$ref": "#/components/schemas/Objects_1" - }, - "text": { - "type": "string" - }, - "description": { - "type": "string" - }, - "type": { - "type": "string", - "enum": ["synthetic"] - } - }, - "required": ["id", "time", "text", "type"], - "additionalProperties": false - }, - "Session.Message.System": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "$ref": "#/components/schemas/Objects_1" - }, - "type": { - "type": "string", - "enum": ["system"] - }, - "text": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "required": ["id", "time", "type", "text"], - "additionalProperties": false - }, - "Session.Message.Skill": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "$ref": "#/components/schemas/Objects_1" - }, - "type": { - "type": "string", - "enum": ["skill"] - }, - "skill": { - "type": "string" - }, - "name": { - "type": "string" - }, - "text": { - "type": "string" - } - }, - "required": ["id", "time", "type", "skill", "name", "text"], - "additionalProperties": false - }, - "Union_5": { - "type": "string", - "enum": ["running", "exited", "timeout", "killed"] - }, - "Union_6": { - "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] - }, - "Objects_2": { - "type": "object", - "properties": { - "output": { - "type": "string" - }, - "cursor": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "size": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "truncated": { - "type": "boolean" - } - }, - "required": ["output", "cursor", "size", "truncated"], - "additionalProperties": false - }, - "Session.Message.Shell": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "type": "object", - "properties": { - "created": { - "type": "number" - }, - "completed": { - "type": "number" - } - }, - "required": ["created"], - "additionalProperties": false - }, - "type": { - "type": "string", - "enum": ["shell"] - }, - "shellID": { - "type": "string", - "allOf": [ - { - "pattern": "^sh_" - } - ] - }, - "command": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/Union_5" - }, - "exit": { - "anyOf": [ - { - "type": "number" - }, - { - "$ref": "#/components/schemas/Union_6" - } - ] - }, - "output": { - "$ref": "#/components/schemas/Objects_2" - } - }, - "required": ["id", "time", "type", "shellID", "command", "status"], - "additionalProperties": false - }, - "Session.Message.ProviderState": { - "type": "object" - }, - "Session.Message.Assistant.Text": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["text"] - }, - "text": { - "type": "string" - }, - "state": { - "$ref": "#/components/schemas/Session.Message.ProviderState" - } - }, - "required": ["type", "text"], - "additionalProperties": false - }, - "Session.Message.ProviderState_1": { - "type": "object" - }, - "Session.Message.Assistant.Reasoning": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["reasoning"] - }, - "text": { - "type": "string" - }, - "state": { - "$ref": "#/components/schemas/Session.Message.ProviderState_1" - }, - "time": { - "type": "object", - "properties": { - "created": { - "type": "number" - }, - "completed": { - "type": "number" - } - }, - "required": ["created"], - "additionalProperties": false - } - }, - "required": ["type", "text"], - "additionalProperties": false - }, - "Session.Message.ProviderState_2": { - "type": "object" - }, - "Session.Message.ProviderState_3": { - "type": "object" - }, - "Session.Message.ToolState.Streaming": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["streaming"] - }, - "input": { - "type": "string" - } - }, - "required": ["status", "input"], - "additionalProperties": false - }, - "Session.Message.ToolState.Running": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["running"] - }, - "input": { - "type": "object" - }, - "metadata": { - "type": "object" - } - }, - "required": ["status", "input", "metadata"], - "additionalProperties": false - }, - "Tool.TextContent": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["text"] - }, - "text": { - "type": "string" - } - }, - "required": ["type", "text"], - "additionalProperties": false - }, - "Tool.FileContent": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["file"] - }, - "uri": { - "type": "string" - }, - "mime": { - "type": "string" - }, - "name": { - "$ref": "#/components/schemas/Union_" - } - }, - "required": ["type", "uri", "mime"], - "additionalProperties": false - }, - "Tool.Content": { - "anyOf": [ - { - "$ref": "#/components/schemas/Tool.TextContent" - }, - { - "$ref": "#/components/schemas/Tool.FileContent" - } - ] - }, - "Session.Message.ToolState.Completed": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["completed"] - }, - "input": { - "type": "object" - }, - "content": { - "type": "array", - "prefixItems": [ - { - "$ref": "#/components/schemas/Tool.Content" - } - ], - "minItems": 1, - "items": { - "$ref": "#/components/schemas/Tool.Content" - } - }, - "metadata": { - "type": "object" - } - }, - "required": ["status", "input", "content"], - "additionalProperties": false - }, - "Session.StructuredError": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "message": { - "type": "string" - }, - "status": { - "type": "integer", - "allOf": [ - { - "minimum": 100, - "maximum": 599 - } - ] - } - }, - "required": ["type", "message"], - "additionalProperties": false - }, - "Session.Message.ToolState.Error": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["error"] - }, - "input": { - "type": "object" - }, - "error": { - "$ref": "#/components/schemas/Session.StructuredError" - }, - "content": { - "type": "array", - "prefixItems": [ - { - "$ref": "#/components/schemas/Tool.Content" - } - ], - "minItems": 1, - "items": { - "$ref": "#/components/schemas/Tool.Content" - } - }, - "metadata": { - "type": "object" - } - }, - "required": ["status", "input", "error"], - "additionalProperties": false - }, - "Session.Message.Assistant.Tool": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["tool"] - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "executed": { - "type": "boolean" - }, - "providerState": { - "$ref": "#/components/schemas/Session.Message.ProviderState_2" - }, - "providerResultState": { - "$ref": "#/components/schemas/Session.Message.ProviderState_3" - }, - "state": { - "anyOf": [ - { - "$ref": "#/components/schemas/Session.Message.ToolState.Streaming" - }, - { - "$ref": "#/components/schemas/Session.Message.ToolState.Running" - }, - { - "$ref": "#/components/schemas/Session.Message.ToolState.Completed" - }, - { - "$ref": "#/components/schemas/Session.Message.ToolState.Error" - } - ] - }, - "time": { - "type": "object", - "properties": { - "created": { - "type": "number" - }, - "ran": { - "type": "number" - }, - "completed": { - "type": "number" - } - }, - "required": ["created"], - "additionalProperties": false - } - }, - "required": ["type", "id", "name", "state", "time"], - "additionalProperties": false - }, - "Session.Message.ProviderState_4": { - "type": "object" - }, - "Session.Message.Assistant.Retry": { - "type": "object", - "properties": { - "attempt": { - "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] - }, - "at": { - "type": "number" - }, - "error": { - "$ref": "#/components/schemas/Session.StructuredError" - } - }, - "required": ["attempt", "at", "error"], - "additionalProperties": false - }, - "Session.Message.Assistant": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "type": "object", - "properties": { - "created": { - "type": "number" - }, - "completed": { - "type": "number" - } - }, - "required": ["created"], - "additionalProperties": false - }, - "type": { - "type": "string", - "enum": ["assistant"] - }, - "agent": { - "type": "string" - }, - "model": { - "$ref": "#/components/schemas/Model.Ref" - }, - "content": { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/Session.Message.Assistant.Text" - }, - { - "$ref": "#/components/schemas/Session.Message.Assistant.Reasoning" - }, - { - "$ref": "#/components/schemas/Session.Message.Assistant.Tool" - } - ] - } - }, - "snapshot": { - "type": "object", - "properties": { - "start": { - "type": "string" - }, - "end": { - "type": "string" - }, - "files": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "finish": { - "type": "string", - "enum": ["stop", "length", "tool-calls", "content-filter", "error", "unknown"] - }, - "rawFinish": { - "type": "string" - }, - "providerState": { - "$ref": "#/components/schemas/Session.Message.ProviderState_4" - }, - "cost": { - "$ref": "#/components/schemas/Money.USD" - }, - "tokens": { - "$ref": "#/components/schemas/TokenUsage.Info" - }, - "error": { - "$ref": "#/components/schemas/Session.StructuredError" - }, - "retry": { - "$ref": "#/components/schemas/Session.Message.Assistant.Retry" - } - }, - "required": ["id", "time", "type", "agent", "model", "content"], - "additionalProperties": false - }, - "Session.Message.Compaction.Running": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["compaction"] - }, - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "$ref": "#/components/schemas/Objects_1" - }, - "status": { - "type": "string", - "enum": ["running"] - }, - "reason": { - "type": "string", - "enum": ["auto", "manual"] - }, - "summary": { - "type": "string" - }, - "recent": { - "type": "string" - } - }, - "required": ["type", "id", "time", "status", "reason", "summary", "recent"], - "additionalProperties": false - }, - "Session.Message.Compaction.Completed": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["compaction"] - }, - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "$ref": "#/components/schemas/Objects_1" - }, - "status": { - "type": "string", - "enum": ["completed"] - }, - "reason": { - "type": "string", - "enum": ["auto", "manual"] - }, - "summary": { - "type": "string" - }, - "recent": { - "type": "string" - } - }, - "required": ["type", "id", "time", "status", "reason", "summary", "recent"], - "additionalProperties": false - }, - "Session.Message.Compaction.Failed": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["compaction"] - }, - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "$ref": "#/components/schemas/Objects_1" - }, - "status": { - "type": "string", - "enum": ["failed"] - }, - "reason": { - "type": "string", - "enum": ["auto", "manual"] - }, - "error": { - "$ref": "#/components/schemas/Session.StructuredError" - } - }, - "required": ["type", "id", "time", "status", "reason", "error"], - "additionalProperties": false - }, - "Session.Message.Compaction": { - "anyOf": [ - { - "$ref": "#/components/schemas/Session.Message.Compaction.Running" - }, - { - "$ref": "#/components/schemas/Session.Message.Compaction.Completed" - }, - { - "$ref": "#/components/schemas/Session.Message.Compaction.Failed" - } - ] - }, - "Session.Message.Info": { - "anyOf": [ - { - "$ref": "#/components/schemas/Session.Message.AgentSelected" - }, - { - "$ref": "#/components/schemas/Session.Message.ModelSelected" - }, - { - "$ref": "#/components/schemas/Session.Message.LocationSwitched" - }, - { - "$ref": "#/components/schemas/Session.Message.User" - }, - { - "$ref": "#/components/schemas/Session.Message.Synthetic" - }, - { - "$ref": "#/components/schemas/Session.Message.System" - }, - { - "$ref": "#/components/schemas/Session.Message.Skill" - }, - { - "$ref": "#/components/schemas/Session.Message.Shell" - }, - { - "$ref": "#/components/schemas/Session.Message.Assistant" - }, - { - "$ref": "#/components/schemas/Session.Message.Compaction" - } - ] - }, - "Arrays_": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Session.Message.Info" - } - }, - "ConflictErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["ConflictError"] - }, - "message": { - "type": "string" - }, - "resource": { - "$ref": "#/components/schemas/Union_" - } - }, - "required": ["_tag", "message"], - "additionalProperties": false - }, - "Union_7": { - "anyOf": [ - { - "type": "string", - "enum": ["true", "false"] - }, - { - "type": "null" - } - ] - }, - "SessionTransfer.Data": { - "type": "object", - "properties": { - "info": { - "$ref": "#/components/schemas/Session.Info" - }, - "messages": { - "$ref": "#/components/schemas/Arrays_" - } - }, - "required": ["info", "messages"], - "additionalProperties": false - }, - "SessionNotFoundErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["SessionNotFoundError"] - }, - "sessionID": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "sessionID", "message"], - "additionalProperties": false - }, - "UnknownErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["UnknownError"] - }, - "message": { - "type": "string" - }, - "ref": { - "$ref": "#/components/schemas/Union_" - } - }, - "required": ["_tag", "message"], - "additionalProperties": false - }, - "SessionActive": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["running"] - } - }, - "required": ["type"], - "additionalProperties": false - }, - "Session.ForkRequestBoundary": { - "anyOf": [ - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["before"] - }, - "messageID": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - } - }, - "required": ["type", "messageID"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["through"] - } - }, - "required": ["type"], - "additionalProperties": false - } - ] - }, - "MessageNotFoundErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["MessageNotFoundError"] - }, - "sessionID": { - "type": "string" - }, - "messageID": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "sessionID", "messageID", "message"], - "additionalProperties": false - }, - "Session.Inbox.Delivery": { - "type": "string", - "enum": ["steer", "queue"] - }, - "Union_8": { - "anyOf": [ - { - "$ref": "#/components/schemas/Session.Inbox.Delivery" - }, - { - "type": "null" - } - ] - }, - "Union_9": { - "anyOf": [ - { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - { - "type": "null" - } - ] - }, - "PromptInput.FileAttachment": { - "type": "object", - "properties": { - "uri": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "mention": { - "$ref": "#/components/schemas/Prompt.Mention" - } - }, - "required": ["uri"], - "additionalProperties": false - }, - "Arrays_4": { + "Arrays_3ff7cb2a474f": { "type": "array", "items": { "$ref": "#/components/schemas/PromptInput.FileAttachment" } }, - "Arrays_5": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Prompt.AgentAttachment" - } - }, - "PromptInput.SkillAttachment": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "mention": { - "$ref": "#/components/schemas/Prompt.Mention" - } - }, - "required": ["id"], - "additionalProperties": false - }, - "Arrays_6": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PromptInput.SkillAttachment" - } - }, - "Objects_3": { - "type": "object" - }, - "Union_10": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "Session.Inbox.UserPayload": { - "type": "object", - "properties": { - "text": { - "type": "string" - }, - "files": { - "$ref": "#/components/schemas/Arrays_1" - }, - "agents": { - "$ref": "#/components/schemas/Arrays_2" - }, - "skills": { - "$ref": "#/components/schemas/Arrays_3" - }, - "metadata": { - "$ref": "#/components/schemas/Objects_3" - } - }, - "required": ["text"], - "additionalProperties": false - }, - "Session.Inbox.User": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "sessionID": { - "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] - }, - "timeCreated": { - "type": "number" - }, - "type": { - "type": "string", - "enum": ["user"] - }, - "payload": { - "$ref": "#/components/schemas/Session.Inbox.UserPayload" - }, - "delivery": { - "$ref": "#/components/schemas/Session.Inbox.Delivery" - } - }, - "required": ["id", "sessionID", "timeCreated", "type", "payload", "delivery"], - "additionalProperties": false - }, - "CommandNotFoundErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["CommandNotFoundError"] - }, - "command": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "command", "message"], - "additionalProperties": false - }, - "CommandEvaluationErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["CommandEvaluationError"] - }, - "command": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "command", "message"], - "additionalProperties": false - }, - "SkillNotFoundErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["SkillNotFoundError"] - }, - "skill": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "skill", "message"], - "additionalProperties": false - }, - "Session.Inbox.SyntheticPayload": { - "type": "object", - "properties": { - "text": { - "type": "string" - }, - "description": { - "type": "string" - }, - "metadata": { - "type": "object" - } - }, - "required": ["text"], - "additionalProperties": false - }, - "Session.Inbox.Synthetic": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "sessionID": { - "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] - }, - "timeCreated": { - "type": "number" - }, - "type": { - "type": "string", - "enum": ["synthetic"] - }, - "payload": { - "$ref": "#/components/schemas/Session.Inbox.SyntheticPayload" - }, - "delivery": { - "$ref": "#/components/schemas/Session.Inbox.Delivery" - } - }, - "required": ["id", "sessionID", "timeCreated", "type", "payload", "delivery"], - "additionalProperties": false - }, - "Session.Inbox.CompactionPayload": { - "anyOf": [ - { - "type": "object" - }, - { - "type": "array" - } - ] - }, - "Session.Inbox.Compaction": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "sessionID": { - "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] - }, - "timeCreated": { - "type": "number" - }, - "type": { - "type": "string", - "enum": ["compaction"] - }, - "payload": { - "$ref": "#/components/schemas/Session.Inbox.CompactionPayload" - }, - "delivery": { - "$ref": "#/components/schemas/Session.Inbox.Delivery" - } - }, - "required": ["id", "sessionID", "timeCreated", "type", "payload", "delivery"], - "additionalProperties": false - }, - "ServiceUnavailableErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["ServiceUnavailableError"] - }, - "message": { - "type": "string" - }, - "service": { - "$ref": "#/components/schemas/Union_" - } - }, - "required": ["_tag", "message"], - "additionalProperties": false - }, - "SessionBusyErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["SessionBusyError"] - }, - "sessionID": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "sessionID", "message"], - "additionalProperties": false - }, - "Session.Inbox.MovePayload": { - "type": "object", - "properties": { - "location": { - "$ref": "#/components/schemas/Location.Ref" - }, - "projectID": { - "type": "string" - }, - "subpath": { - "type": "string" - } - }, - "required": ["location", "projectID"], - "additionalProperties": false - }, - "Session.Inbox.Move": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "sessionID": { - "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] - }, - "timeCreated": { - "type": "number" - }, - "type": { - "type": "string", - "enum": ["move"] - }, - "payload": { - "$ref": "#/components/schemas/Session.Inbox.MovePayload" - }, - "delivery": { - "$ref": "#/components/schemas/Session.Inbox.Delivery" - } - }, - "required": ["id", "sessionID", "timeCreated", "type", "payload", "delivery"], - "additionalProperties": false - }, - "Session.Inbox.Info": { - "anyOf": [ - { - "$ref": "#/components/schemas/Session.Inbox.User" - }, - { - "$ref": "#/components/schemas/Session.Inbox.Synthetic" - }, - { - "$ref": "#/components/schemas/Session.Inbox.Compaction" - }, - { - "$ref": "#/components/schemas/Session.Inbox.Move" - } - ] - }, - "InstructionEntry.Key": { - "type": "string", - "allOf": [ - { - "pattern": "^[a-z0-9][a-z0-9._-]*$", - "description": "Instruction entry key (lowercase alphanumerics plus . _ -)" - } - ] - }, - "InstructionEntry.Info": { - "type": "object", - "properties": { - "key": { - "$ref": "#/components/schemas/InstructionEntry.Key" - }, - "value": { - "description": "JSON value attached to the session's instructions" - } - }, - "required": ["key", "value"], - "additionalProperties": false - }, - "InstructionEntryValueTooLargeErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["InstructionEntryValueTooLargeError"] - }, - "actualBytes": { - "type": "integer" - }, - "maxBytes": { - "type": "integer" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "actualBytes", "maxBytes", "message"], - "additionalProperties": false - }, - "SessionGenerateResponse": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "text": { - "type": "string" - } - }, - "required": ["text"], - "additionalProperties": false - } - }, - "required": ["data"], - "additionalProperties": false - }, - "SessionLogItemEncoded": { - "type": "string", - "contentMediaType": "application/json" - }, - "SessionMessagesResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Session.Message.Info" - } - }, - "cursor": { - "type": "object", - "properties": { - "previous": { - "$ref": "#/components/schemas/Union_" - }, - "next": { - "$ref": "#/components/schemas/Union_" - } - }, - "additionalProperties": false - } - }, - "required": ["data", "cursor"], - "additionalProperties": false - }, - "Model.ReasoningField": { - "anyOf": [ - { - "type": "string", - "enum": ["reasoning", "reasoning_content", "reasoning_text"] - }, - { - "type": "string" - } - ] - }, - "Model.MaxTokensField": { - "type": "string", - "enum": ["max_completion_tokens", "max_tokens"] - }, - "Model.Compatibility": { - "type": "object", - "properties": { - "reasoningField": { - "$ref": "#/components/schemas/Model.ReasoningField" - }, - "maxTokensField": { - "$ref": "#/components/schemas/Model.MaxTokensField" - }, - "requireFinishReason": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "Objects_4": { - "type": "object" - }, - "Objects_5": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "Objects_6": { - "type": "object" - }, - "Model.Capabilities": { - "type": "object", - "properties": { - "tools": { - "type": "boolean" - }, - "input": { - "type": "array", - "items": { - "type": "string" - } - }, - "output": { - "type": "array", - "items": { - "type": "string" - } - }, - "responsesWebsockets": { - "type": "boolean" - } - }, - "required": ["tools", "input", "output"], - "additionalProperties": false - }, - "Model.Variant": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "settings": { - "$ref": "#/components/schemas/Objects_4" - }, - "headers": { - "$ref": "#/components/schemas/Objects_5" - }, - "body": { - "$ref": "#/components/schemas/Objects_6" - } - }, - "required": ["id"], - "additionalProperties": false - }, - "Money.USDPerMillionTokens": { - "type": "number" - }, - "Model.Cost": { - "type": "object", - "properties": { - "tier": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["context"] - }, - "size": { - "type": "integer" - } - }, - "required": ["type", "size"], - "additionalProperties": false - }, - "input": { - "$ref": "#/components/schemas/Money.USDPerMillionTokens" - }, - "output": { - "$ref": "#/components/schemas/Money.USDPerMillionTokens" - }, - "cache": { - "type": "object", - "properties": { - "read": { - "$ref": "#/components/schemas/Money.USDPerMillionTokens" - }, - "write": { - "$ref": "#/components/schemas/Money.USDPerMillionTokens" - } - }, - "required": ["read", "write"], - "additionalProperties": false - } - }, - "required": ["input", "output", "cache"], - "additionalProperties": false - }, - "Model.Info": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "modelID": { - "type": "string" - }, - "providerID": { - "type": "string" - }, - "family": { - "type": "string" - }, - "name": { - "type": "string" - }, - "compatibility": { - "$ref": "#/components/schemas/Model.Compatibility" - }, - "package": { - "type": "string" - }, - "settings": { - "$ref": "#/components/schemas/Objects_4" - }, - "headers": { - "$ref": "#/components/schemas/Objects_5" - }, - "body": { - "$ref": "#/components/schemas/Objects_6" - }, - "capabilities": { - "$ref": "#/components/schemas/Model.Capabilities" - }, - "variants": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Model.Variant" - } - }, - "time": { - "type": "object", - "properties": { - "released": { - "type": "number" - } - }, - "required": ["released"], - "additionalProperties": false - }, - "cost": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Model.Cost" - } - }, - "status": { - "type": "string", - "enum": ["alpha", "beta", "deprecated", "active"] - }, - "enabled": { - "type": "boolean" - }, - "limit": { - "type": "object", - "properties": { - "context": { - "type": "integer" - }, - "input": { - "type": "integer" - }, - "output": { - "type": "integer" - } - }, - "required": ["context", "output"], - "additionalProperties": false - } - }, - "required": [ - "id", - "modelID", - "providerID", - "name", - "capabilities", - "variants", - "time", - "cost", - "status", - "enabled", - "limit" - ], - "additionalProperties": false - }, - "GenerateTextResponse": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "text": { - "type": "string" - } - }, - "required": ["text"], - "additionalProperties": false - } - }, - "required": ["data"], - "additionalProperties": false - }, - "Provider.Info": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "integrationID": { - "type": "string" - }, - "name": { - "type": "string" - }, - "activation": { - "type": "string", - "enum": ["auto", "enabled", "disabled"] - }, - "package": { - "type": "string" - }, - "settings": { - "$ref": "#/components/schemas/Objects_4" - }, - "headers": { - "$ref": "#/components/schemas/Objects_5" - }, - "body": { - "$ref": "#/components/schemas/Objects_6" - } - }, - "required": ["id", "name", "activation", "package"], - "additionalProperties": false - }, - "ProviderNotFoundErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["ProviderNotFoundError"] - }, - "providerID": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "providerID", "message"], - "additionalProperties": false - }, - "Union_11": { - "anyOf": [ - { - "type": "number" - }, - { - "$ref": "#/components/schemas/Union_6" - } - ] - }, - "Form.When": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "op": { - "type": "string", - "enum": ["eq", "neq"] - }, - "value": { - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/Union_11" - }, - { - "type": "boolean" - } - ] - } - }, - "required": ["key", "op", "value"], - "additionalProperties": false - }, - "Arrays_7": { + "Arrays_4df8e9fdc8e1": { "type": "array", "items": { "$ref": "#/components/schemas/Form.When" } }, - "Form.Option": { - "type": "object", - "properties": { - "value": { - "type": "string" - }, - "label": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "required": ["value", "label"], - "additionalProperties": false - }, - "Form.StringField": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "required": { - "type": "boolean" - }, - "when": { - "$ref": "#/components/schemas/Arrays_7" - }, - "type": { - "type": "string", - "enum": ["string"] - }, - "format": { - "type": "string", - "enum": ["email", "uri", "date", "date-time"] - }, - "minLength": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "maxLength": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "pattern": { - "type": "string" - }, - "placeholder": { - "type": "string" - }, - "default": { - "type": "string" - }, - "options": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Form.Option" - } - }, - "custom": { - "type": "boolean" - } - }, - "required": ["key", "type"], - "additionalProperties": false - }, - "Form.NumberField": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "required": { - "type": "boolean" - }, - "when": { - "$ref": "#/components/schemas/Arrays_7" - }, - "type": { - "type": "string", - "enum": ["number"] - }, - "minimum": { - "anyOf": [ - { - "type": "number" - }, - { - "$ref": "#/components/schemas/Union_6" - } - ] - }, - "maximum": { - "anyOf": [ - { - "type": "number" - }, - { - "$ref": "#/components/schemas/Union_6" - } - ] - }, - "default": { - "anyOf": [ - { - "type": "number" - }, - { - "$ref": "#/components/schemas/Union_6" - } - ] - } - }, - "required": ["key", "type"], - "additionalProperties": false - }, - "Form.IntegerField": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "required": { - "type": "boolean" - }, - "when": { - "$ref": "#/components/schemas/Arrays_7" - }, - "type": { - "type": "string", - "enum": ["integer"] - }, - "minimum": { - "anyOf": [ - { - "type": "number" - }, - { - "$ref": "#/components/schemas/Union_6" - } - ] - }, - "maximum": { - "anyOf": [ - { - "type": "number" - }, - { - "$ref": "#/components/schemas/Union_6" - } - ] - }, - "default": { - "anyOf": [ - { - "type": "number" - }, - { - "$ref": "#/components/schemas/Union_6" - } - ] - } - }, - "required": ["key", "type"], - "additionalProperties": false - }, - "Form.BooleanField": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "required": { - "type": "boolean" - }, - "when": { - "$ref": "#/components/schemas/Arrays_7" - }, - "type": { - "type": "string", - "enum": ["boolean"] - }, - "default": { - "type": "boolean" - } - }, - "required": ["key", "type"], - "additionalProperties": false - }, - "Form.MultiselectField": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "required": { - "type": "boolean" - }, - "when": { - "$ref": "#/components/schemas/Arrays_7" - }, - "type": { - "type": "string", - "enum": ["multiselect"] - }, - "options": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Form.Option" - } - }, - "minItems": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "maxItems": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "custom": { - "type": "boolean" - }, - "default": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": ["key", "type", "options"], - "additionalProperties": false - }, - "Form.ExternalField": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "type": { - "type": "string", - "enum": ["external"] - }, - "url": { - "type": "string" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "required": ["key", "type", "url"], - "additionalProperties": false - }, - "Form.Field": { - "anyOf": [ - { - "$ref": "#/components/schemas/Form.StringField" - }, - { - "$ref": "#/components/schemas/Form.NumberField" - }, - { - "$ref": "#/components/schemas/Form.IntegerField" - }, - { - "$ref": "#/components/schemas/Form.BooleanField" - }, - { - "$ref": "#/components/schemas/Form.MultiselectField" - }, - { - "$ref": "#/components/schemas/Form.ExternalField" - } - ] - }, - "Form.Fields": { - "type": "array", - "prefixItems": [ - { - "$ref": "#/components/schemas/Form.Field" - } - ], - "minItems": 1, - "items": { - "$ref": "#/components/schemas/Form.Field" - } - }, - "Integration.OAuthMethod": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": ["oauth"] - }, - "label": { - "type": "string" - }, - "form": { - "$ref": "#/components/schemas/Form.Fields" - } - }, - "required": ["id", "type", "label"], - "additionalProperties": false - }, - "Integration.CommandMethod": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": ["command"] - }, - "label": { - "type": "string" - }, - "command": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": ["id", "type", "label", "command"], - "additionalProperties": false - }, - "Form.Fields_1": { - "type": "array", - "prefixItems": [ - { - "$ref": "#/components/schemas/Form.Field" - } - ], - "minItems": 1, - "items": { - "$ref": "#/components/schemas/Form.Field" - } - }, - "Integration.KeyMethod": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["key"] - }, - "label": { - "type": "string" - }, - "form": { - "$ref": "#/components/schemas/Form.Fields_1" - } - }, - "required": ["type"], - "additionalProperties": false - }, - "Integration.EnvMethod": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["env"] - }, - "names": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": ["type", "names"], - "additionalProperties": false - }, - "Integration.Method": { - "anyOf": [ - { - "$ref": "#/components/schemas/Integration.OAuthMethod" - }, - { - "$ref": "#/components/schemas/Integration.CommandMethod" - }, - { - "$ref": "#/components/schemas/Integration.KeyMethod" - }, - { - "$ref": "#/components/schemas/Integration.EnvMethod" - } - ] - }, - "Connection.CredentialInfo": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["credential"] - }, - "id": { - "type": "string" - }, - "label": { - "type": "string" - } - }, - "required": ["type", "id", "label"], - "additionalProperties": false - }, - "Connection.EnvInfo": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["env"] - }, - "name": { - "type": "string" - } - }, - "required": ["type", "name"], - "additionalProperties": false - }, - "Connection.Info": { - "anyOf": [ - { - "$ref": "#/components/schemas/Connection.CredentialInfo" - }, - { - "$ref": "#/components/schemas/Connection.EnvInfo" - } - ] - }, - "Integration.Info": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "methods": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Integration.Method" - } - }, - "connections": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Connection.Info" - } - } - }, - "required": ["id", "name", "methods", "connections"], - "additionalProperties": false - }, - "Form.Value": { - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/Union_11" - }, - { - "type": "boolean" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "Form.Answer": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Form.Value" - } - }, - "Union_12": { - "anyOf": [ - { - "$ref": "#/components/schemas/Form.Answer" - }, - { - "type": "null" - } - ] - }, - "Objects_7": { - "type": "object", - "properties": { - "created": { - "$ref": "#/components/schemas/Union_11" - }, - "expires": { - "$ref": "#/components/schemas/Union_11" - } - }, - "required": ["created", "expires"], - "additionalProperties": false - }, - "Integration.AttemptEncoded": { - "type": "object", - "properties": { - "attemptID": { - "type": "string" - }, - "url": { - "type": "string" - }, - "instructions": { - "type": "string" - }, - "mode": { - "type": "string", - "enum": ["auto", "code"] - }, - "time": { - "$ref": "#/components/schemas/Objects_7" - } - }, - "required": ["attemptID", "url", "instructions", "mode", "time"], - "additionalProperties": false - }, - "Integration.AttemptStatus": { - "anyOf": [ - { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["pending"] - }, - "time": { - "$ref": "#/components/schemas/Objects_7" - } - }, - "required": ["status", "time"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["complete"] - }, - "time": { - "$ref": "#/components/schemas/Objects_7" - } - }, - "required": ["status", "time"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["failed"] - }, - "message": { - "type": "string" - }, - "time": { - "$ref": "#/components/schemas/Objects_7" - } - }, - "required": ["status", "message", "time"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["expired"] - }, - "time": { - "$ref": "#/components/schemas/Objects_7" - } - }, - "required": ["status", "time"], - "additionalProperties": false - } - ] - }, - "Integration.CommandAttempt": { - "type": "object", - "properties": { - "attemptID": { - "type": "string" - }, - "time": { - "$ref": "#/components/schemas/Objects_7" - } - }, - "required": ["attemptID", "time"], - "additionalProperties": false - }, - "Integration.CommandAttemptStatus": { - "anyOf": [ - { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["pending"] - }, - "message": { - "type": "string" - }, - "time": { - "$ref": "#/components/schemas/Objects_7" - } - }, - "required": ["status", "time"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["complete"] - }, - "time": { - "$ref": "#/components/schemas/Objects_7" - } - }, - "required": ["status", "time"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["failed"] - }, - "message": { - "type": "string" - }, - "time": { - "$ref": "#/components/schemas/Objects_7" - } - }, - "required": ["status", "message", "time"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["expired"] - }, - "time": { - "$ref": "#/components/schemas/Objects_7" - } - }, - "required": ["status", "time"], - "additionalProperties": false - } - ] - }, - "Mcp.Status.Connected": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["connected"] - } - }, - "required": ["status"], - "additionalProperties": false - }, - "Mcp.Status.Pending": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["pending"] - } - }, - "required": ["status"], - "additionalProperties": false - }, - "Mcp.Status.Disabled": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["disabled"] - } - }, - "required": ["status"], - "additionalProperties": false - }, - "Mcp.Status.Failed": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["failed"] - }, - "error": { - "type": "string" - } - }, - "required": ["status", "error"], - "additionalProperties": false - }, - "Mcp.Status.NeedsAuth": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["needs_auth"] - } - }, - "required": ["status"], - "additionalProperties": false - }, - "Mcp.Server": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "status": { - "anyOf": [ - { - "$ref": "#/components/schemas/Mcp.Status.Connected" - }, - { - "$ref": "#/components/schemas/Mcp.Status.Pending" - }, - { - "$ref": "#/components/schemas/Mcp.Status.Disabled" - }, - { - "$ref": "#/components/schemas/Mcp.Status.Failed" - }, - { - "$ref": "#/components/schemas/Mcp.Status.NeedsAuth" - } - ] - }, - "integrationID": { - "type": "string" - } - }, - "required": ["name", "status"], - "additionalProperties": false - }, - "Objects_8": { - "type": "object", - "properties": { - "startup": { - "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] - }, - "catalog": { - "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] - }, - "execution": { - "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] - } - }, - "additionalProperties": false - }, - "Mcp.LocalConfigEncoded": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["local"] - }, - "command": { - "type": "array", - "items": { - "type": "string" - } - }, - "cwd": { - "type": "string" - }, - "environment": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "disabled": { - "type": "boolean" - }, - "codemode": { - "type": "boolean" - }, - "timeout": { - "$ref": "#/components/schemas/Objects_8" - } - }, - "required": ["type", "command"], - "additionalProperties": false - }, - "Mcp.OAuthConfigEncoded": { - "type": "object", - "properties": { - "client_id": { - "type": "string" - }, - "client_secret": { - "type": "string" - }, - "scope": { - "type": "string" - }, - "callback_port": { - "type": "integer", - "allOf": [ - { - "minimum": 1, - "maximum": 65535 - } - ] - }, - "redirect_uri": { - "type": "string" - } - }, - "additionalProperties": false - }, - "Mcp.RemoteConfigEncoded": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["remote"] - }, - "url": { - "type": "string" - }, - "headers": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "oauth": { - "anyOf": [ - { - "$ref": "#/components/schemas/Mcp.OAuthConfigEncoded" - }, - { - "type": "boolean", - "enum": [false] - } - ] - }, - "disabled": { - "type": "boolean" - }, - "codemode": { - "type": "boolean" - }, - "timeout": { - "$ref": "#/components/schemas/Objects_8" - } - }, - "required": ["type", "url"], - "additionalProperties": false - }, - "McpServerNotFoundErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["McpServerNotFoundError"] - }, - "server": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "server", "message"], - "additionalProperties": false - }, - "Mcp.Resource": { - "type": "object", - "properties": { - "server": { - "type": "string" - }, - "name": { - "type": "string" - }, - "uri": { - "type": "string" - }, - "description": { - "type": "string" - }, - "mimeType": { - "type": "string" - } - }, - "required": ["server", "name", "uri"], - "additionalProperties": false - }, - "Mcp.ResourceTemplate": { - "type": "object", - "properties": { - "server": { - "type": "string" - }, - "name": { - "type": "string" - }, - "uriTemplate": { - "type": "string" - }, - "description": { - "type": "string" - }, - "mimeType": { - "type": "string" - } - }, - "required": ["server", "name", "uriTemplate"], - "additionalProperties": false - }, - "Mcp.ResourceCatalog": { - "type": "object", - "properties": { - "resources": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Mcp.Resource" - } - }, - "templates": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Mcp.ResourceTemplate" - } - } - }, - "required": ["resources", "templates"], - "additionalProperties": false - }, - "Project.Vcs": { - "type": "string", - "enum": ["git", "hg"] - }, - "Project.Icon": { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "override": { - "type": "string" - }, - "color": { - "type": "string" - } - }, - "additionalProperties": false - }, - "Project.Commands": { - "type": "object", - "properties": { - "start": { - "type": "string", - "description": "Startup script to run when creating a new workspace (worktree)" - } - }, - "additionalProperties": false - }, - "Project.Time": { - "type": "object", - "properties": { - "created": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "updated": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "initialized": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - } - }, - "required": ["created", "updated"], - "additionalProperties": false - }, - "Project": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "canonical": { - "type": "string" - }, - "vcs": { - "$ref": "#/components/schemas/Project.Vcs" - }, - "name": { - "type": "string" - }, - "icon": { - "$ref": "#/components/schemas/Project.Icon" - }, - "commands": { - "$ref": "#/components/schemas/Project.Commands" - }, - "time": { - "$ref": "#/components/schemas/Project.Time" - }, - "sandboxes": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": ["id", "canonical", "time", "sandboxes"], - "additionalProperties": false - }, - "Project.Current": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "directory": { - "type": "string" - }, - "canonical": { - "type": "string" - } - }, - "required": ["id", "directory", "canonical"], - "additionalProperties": false - }, - "Form.Metadata": { - "type": "object" - }, - "Form.Fields_2": { - "type": "array", - "prefixItems": [ - { - "$ref": "#/components/schemas/Form.Field" - } - ], - "minItems": 1, - "items": { - "$ref": "#/components/schemas/Form.Field" - } - }, - "Form.Info": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^frm_" - } - ] - }, - "sessionID": { - "type": "string" - }, - "title": { - "type": "string" - }, - "metadata": { - "$ref": "#/components/schemas/Form.Metadata" - }, - "fields": { - "$ref": "#/components/schemas/Form.Fields_2" - } - }, - "required": ["id", "sessionID", "title", "fields"], - "additionalProperties": false - }, - "Form.CreatePayload": { - "type": "object", - "properties": { - "id": { - "anyOf": [ - { - "type": "string", - "allOf": [ - { - "pattern": "^frm_" - } - ] - }, - { - "type": "null" - } - ] - }, - "title": { - "type": "string" - }, - "metadata": { - "$ref": "#/components/schemas/Form.Metadata" - }, - "fields": { - "$ref": "#/components/schemas/Form.Fields_2" - } - }, - "required": ["title", "fields"], - "additionalProperties": false - }, - "FormNotFoundErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["FormNotFoundError"] - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "id", "message"], - "additionalProperties": false - }, - "Form.State": { - "anyOf": [ - { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["pending"] - } - }, - "required": ["status"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["answered"] - }, - "answer": { - "$ref": "#/components/schemas/Form.Answer" - } - }, - "required": ["status", "answer"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["cancelled"] - } - }, - "required": ["status"], - "additionalProperties": false - } - ] - }, - "Form.Reply": { - "type": "object", - "properties": { - "answer": { - "$ref": "#/components/schemas/Form.Answer" - } - }, - "required": ["answer"], - "additionalProperties": false - }, - "FormAlreadySettledErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["FormAlreadySettledError"] - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "id", "message"], - "additionalProperties": false - }, - "FormInvalidAnswerErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["FormInvalidAnswerError"] - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "id", "message"], - "additionalProperties": false - }, - "Arrays_8": { + "Arrays_681004346c78": { "type": "array", "items": { "type": "string" } }, - "Arrays_9": { + "Arrays_92aa8803e81f": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/Prompt.SkillAttachment" } }, - "Objects_9": { - "type": "object" + "Arrays_c17502465996": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PromptInput.SkillAttachment" + } }, - "Permission.Source": { - "anyOf": [ - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["tool"] - }, - "messageID": { - "type": "string" - }, - "id": { - "type": "string" - } - }, - "required": ["type", "messageID", "id"], - "additionalProperties": false - } - ] + "Arrays_e1027de4b984": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Prompt.AgentAttachment" + } }, - "Permission.Request": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^per" - } - ] - }, - "sessionID": { - "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] - }, - "action": { - "type": "string" - }, - "resources": { - "$ref": "#/components/schemas/Arrays_8" - }, - "save": { - "$ref": "#/components/schemas/Arrays_9" - }, - "metadata": { - "$ref": "#/components/schemas/Objects_9" - }, - "source": { - "$ref": "#/components/schemas/Permission.Source" - } - }, - "required": ["id", "sessionID", "action", "resources"], - "additionalProperties": false - }, - "PermissionSaved.Info": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "projectID": { - "type": "string" - }, - "action": { - "type": "string" - }, - "resource": { - "type": "string" - } - }, - "required": ["id", "projectID", "action", "resource"], - "additionalProperties": false - }, - "PermissionNotFoundErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["PermissionNotFoundError"] - }, - "requestID": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "requestID", "message"], - "additionalProperties": false - }, - "Permission.Reply": { - "type": "string", - "enum": ["once", "always", "reject"] - }, - "FileSystem.Entry": { - "type": "object", - "properties": { - "path": { - "type": "string" - }, - "type": { - "type": "string", - "enum": ["file", "directory"] - } - }, - "required": ["path", "type"], - "additionalProperties": false + "Arrays_fa246a9267ec": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Session.Message.Info" + } }, "Command.Info": { "type": "object", @@ -13900,515 +9893,54 @@ "required": ["name", "template"], "additionalProperties": false }, - "Skill.Info": { + "CommandEvaluationErrorEncoded": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "slash": { - "type": "boolean" - }, - "autoinvoke": { - "type": "boolean" - }, - "location": { - "type": "string" - }, - "content": { - "type": "string" - } - }, - "required": ["id", "name", "location", "content"], - "additionalProperties": false - }, - "V2EventEncoded": { - "type": "string", - "contentMediaType": "application/json" - }, - "Pty": { - "type": "object", - "properties": { - "id": { + "_tag": { "type": "string", - "allOf": [ - { - "pattern": "^pty" - } - ] - }, - "title": { - "type": "string" + "enum": ["CommandEvaluationError"] }, "command": { "type": "string" }, - "args": { - "type": "array", - "items": { - "type": "string" - } - }, - "cwd": { - "type": "string" - }, - "status": { - "type": "string", - "enum": ["running", "exited"] - }, - "pid": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "exitCode": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - } - }, - "required": ["id", "title", "command", "args", "cwd", "status", "pid"], - "additionalProperties": false - }, - "PtyNotFoundErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["PtyNotFoundError"] - }, - "ptyID": { - "type": "string" - }, "message": { "type": "string" } }, - "required": ["_tag", "ptyID", "message"], + "required": ["_tag", "command", "message"], "additionalProperties": false }, - "PtyTicket.ConnectToken": { - "type": "object", - "properties": { - "ticket": { - "type": "string" - }, - "expires_in": { - "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] - } - }, - "required": ["ticket", "expires_in"], - "additionalProperties": false - }, - "ForbiddenErrorEncoded": { + "CommandNotFoundErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", - "enum": ["ForbiddenError"] - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "message"], - "additionalProperties": false - }, - "Shell.Info": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^sh_" - } - ] - }, - "status": { - "$ref": "#/components/schemas/Union_5" + "enum": ["CommandNotFoundError"] }, "command": { "type": "string" }, - "cwd": { - "type": "string" - }, - "shell": { - "type": "string" - }, - "file": { - "type": "string" - }, - "pid": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "exit": { - "type": "number" - }, - "metadata": { - "type": "object" - }, - "time": { - "type": "object", - "properties": { - "started": { - "type": "number" - }, - "completed": { - "type": "number" - } - }, - "required": ["started"], - "additionalProperties": false - } - }, - "required": ["id", "status", "command", "cwd", "shell", "file", "metadata", "time"], - "additionalProperties": false - }, - "ShellNotFoundErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["ShellNotFoundError"] - }, - "id": { - "type": "string" - }, "message": { "type": "string" } }, - "required": ["_tag", "id", "message"], + "required": ["_tag", "command", "message"], "additionalProperties": false }, - "Reference.LocalSource": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["local"] - }, - "path": { - "type": "string" - }, - "description": { - "type": "string" - }, - "hidden": { - "type": "boolean" - } - }, - "required": ["type", "path"], - "additionalProperties": false - }, - "Reference.GitSource": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["git"] - }, - "repository": { - "type": "string" - }, - "branch": { - "type": "string" - }, - "description": { - "type": "string" - }, - "hidden": { - "type": "boolean" - } - }, - "required": ["type", "repository"], - "additionalProperties": false - }, - "Reference.Source": { - "anyOf": [ - { - "$ref": "#/components/schemas/Reference.LocalSource" - }, - { - "$ref": "#/components/schemas/Reference.GitSource" - } - ] - }, - "Reference.Info": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "description": { - "type": "string" - }, - "hidden": { - "type": "boolean" - }, - "source": { - "$ref": "#/components/schemas/Reference.Source" - } - }, - "required": ["name", "path", "source"], - "additionalProperties": false - }, - "Worktree.Directory": { - "type": "object", - "properties": { - "directory": { - "type": "string" - }, - "strategy": { - "type": "string" - } - }, - "required": ["directory"], - "additionalProperties": false - }, - "Worktree.List": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Worktree.Directory" - } - }, - "Worktree.Info": { - "type": "object", - "properties": { - "directory": { - "type": "string" - } - }, - "required": ["directory"], - "additionalProperties": false - }, - "WorktreeErrorEncoded": { - "type": "object", - "properties": { - "name": { - "type": "string", - "enum": ["WorktreeError"] - }, - "data": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "forceRequired": { - "$ref": "#/components/schemas/Union_10" - } - }, - "required": ["message"], - "additionalProperties": false - } - }, - "required": ["name", "data"], - "additionalProperties": false - }, - "Vcs.Branch": { - "type": "object", - "properties": { - "current": { - "type": "string" - }, - "default": { - "type": "string" - } - }, - "additionalProperties": false - }, - "Vcs.Info": { - "type": "object", - "properties": { - "branch": { - "$ref": "#/components/schemas/Vcs.Branch" - } - }, - "required": ["branch"], - "additionalProperties": false - }, - "Vcs.FileStatus": { - "type": "object", - "properties": { - "file": { - "type": "string" - }, - "additions": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "deletions": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "status": { - "type": "string", - "enum": ["added", "deleted", "modified"] - } - }, - "required": ["file", "additions", "deletions", "status"], - "additionalProperties": false - }, - "Vcs.Mode": { - "type": "string", - "enum": ["working", "branch"] - }, - "WebSearch.Provider": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": ["id", "name"], - "additionalProperties": false - }, - "WebSearch.Result": { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "title": { - "type": "string" - }, - "content": { - "type": "string" - }, - "time": { - "type": "object", - "properties": { - "published": { - "type": "number" - } - }, - "additionalProperties": false - } - }, - "required": ["url", "time"], - "additionalProperties": false - }, - "WebSearch.ResponseEncoded": { - "type": "object", - "properties": { - "providerID": { - "type": "string" - }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WebSearch.Result" - } - } - }, - "required": ["providerID", "results"], - "additionalProperties": false - }, - "Union_13": { - "anyOf": [ - { - "type": "string", - "allOf": [ - { - "pattern": "^[^/#]+\\/[^#]+(?:#[^#]+)?$" - } - ] - }, - { - "type": "object", - "properties": { - "providerID": { - "type": "string", - "allOf": [ - { - "pattern": "^[^/#]+$" - } - ] - }, - "model": { - "type": "string", - "allOf": [ - { - "pattern": "^[^#]+$" - } - ] - }, - "variant": { - "type": "string", - "allOf": [ - { - "pattern": "^[^#]+$" - } - ] - } - }, - "required": ["providerID", "model"], - "additionalProperties": false - } - ] - }, - "Objects_10": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "Objects_11": { - "type": "object" - }, "Config.AgentEncoded": { "type": "object", "properties": { "model": { - "$ref": "#/components/schemas/Union_13" + "$ref": "#/components/schemas/Union_85ca62cf1a33" }, "request": { "type": "object", "properties": { "headers": { - "$ref": "#/components/schemas/Objects_10" + "$ref": "#/components/schemas/Objects_3f161562db4a" }, "body": { - "$ref": "#/components/schemas/Objects_11" + "$ref": "#/components/schemas/Objects_a2c799262a3c" } }, "additionalProperties": false @@ -14451,6 +9983,103 @@ }, "additionalProperties": false }, + "Config.AgentsDirectoryEncoded": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["agents"] + }, + "path": { + "type": "string" + } + }, + "required": ["type", "path"], + "additionalProperties": false + }, + "Config.ClaudeDirectoryEncoded": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["claude"] + }, + "path": { + "type": "string" + } + }, + "required": ["type", "path"], + "additionalProperties": false + }, + "Config.CommandEncoded": { + "type": "object", + "properties": { + "template": { + "type": "string" + }, + "description": { + "type": "string" + }, + "agent": { + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/Union_85ca62cf1a33" + }, + "subtask": { + "type": "boolean" + } + }, + "required": ["template"], + "additionalProperties": false + }, + "Config.DirectoryEncoded": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["directory"] + }, + "path": { + "type": "string" + } + }, + "required": ["type", "path"], + "additionalProperties": false + }, + "Config.DocumentEncoded": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["document"] + }, + "path": { + "type": "string" + }, + "info": { + "$ref": "#/components/schemas/Config.InfoEncoded" + } + }, + "required": ["type", "info"], + "additionalProperties": false + }, + "Config.Entry": { + "anyOf": [ + { + "$ref": "#/components/schemas/Config.DocumentEncoded" + }, + { + "$ref": "#/components/schemas/Config.DirectoryEncoded" + }, + { + "$ref": "#/components/schemas/Config.AgentsDirectoryEncoded" + }, + { + "$ref": "#/components/schemas/Config.ClaudeDirectoryEncoded" + } + ] + }, "Config.Formatter.EntryEncoded": { "type": "object", "properties": { @@ -14478,298 +10107,6 @@ }, "additionalProperties": false }, - "Config.LSP.ServerEncoded": { - "type": "object", - "properties": { - "command": { - "type": "array", - "items": { - "type": "string" - } - }, - "extensions": { - "type": "array", - "items": { - "type": "string" - } - }, - "disabled": { - "type": "boolean" - }, - "env": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "initialization": { - "type": "object" - } - }, - "required": ["command"], - "additionalProperties": false - }, - "Config.CommandEncoded": { - "type": "object", - "properties": { - "template": { - "type": "string" - }, - "description": { - "type": "string" - }, - "agent": { - "type": "string" - }, - "model": { - "$ref": "#/components/schemas/Union_13" - }, - "subtask": { - "type": "boolean" - } - }, - "required": ["template"], - "additionalProperties": false - }, - "Config.Reference.GitEncoded": { - "type": "object", - "properties": { - "repository": { - "type": "string" - }, - "branch": { - "type": "string" - }, - "description": { - "type": "string" - }, - "hidden": { - "type": "boolean" - } - }, - "required": ["repository"], - "additionalProperties": false - }, - "Config.Reference.LocalEncoded": { - "type": "object", - "properties": { - "path": { - "type": "string" - }, - "description": { - "type": "string" - }, - "hidden": { - "type": "boolean" - } - }, - "required": ["path"], - "additionalProperties": false - }, - "ConfigWebSearch.InfoEncoded": { - "type": "object", - "properties": { - "provider": { - "anyOf": [ - { - "type": "string", - "enum": ["random"] - }, - { - "type": "string" - } - ] - } - }, - "required": ["provider"], - "additionalProperties": false - }, - "Config.Plugin.EntryEncoded": { - "type": "object", - "properties": { - "package": { - "type": "string" - }, - "options": { - "type": "object" - } - }, - "required": ["package"], - "additionalProperties": false - }, - "Config.WarmingEncoded": { - "type": "object", - "properties": { - "prompt": { - "type": "string" - }, - "interval": { - "type": "string" - }, - "duration": { - "type": "string" - } - }, - "additionalProperties": false - }, - "Config.Model.CostEncoded": { - "type": "object", - "properties": { - "tier": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["context"] - }, - "size": { - "type": "integer" - } - }, - "required": ["type", "size"], - "additionalProperties": false - }, - "input": { - "$ref": "#/components/schemas/Money.USDPerMillionTokens" - }, - "output": { - "$ref": "#/components/schemas/Money.USDPerMillionTokens" - }, - "cache": { - "type": "object", - "properties": { - "read": { - "$ref": "#/components/schemas/Money.USDPerMillionTokens" - }, - "write": { - "$ref": "#/components/schemas/Money.USDPerMillionTokens" - } - }, - "additionalProperties": false - } - }, - "required": ["input", "output"], - "additionalProperties": false - }, - "Config.ModelEncoded": { - "type": "object", - "properties": { - "modelID": { - "type": "string" - }, - "family": { - "type": "string" - }, - "name": { - "type": "string" - }, - "compatibility": { - "$ref": "#/components/schemas/Model.Compatibility" - }, - "package": { - "type": "string" - }, - "settings": { - "$ref": "#/components/schemas/Objects_11" - }, - "headers": { - "$ref": "#/components/schemas/Objects_10" - }, - "body": { - "$ref": "#/components/schemas/Objects_11" - }, - "capabilities": { - "$ref": "#/components/schemas/Model.Capabilities" - }, - "variants": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "settings": { - "$ref": "#/components/schemas/Objects_11" - }, - "headers": { - "$ref": "#/components/schemas/Objects_10" - }, - "body": { - "$ref": "#/components/schemas/Objects_11" - } - }, - "required": ["id"], - "additionalProperties": false - } - }, - "cost": { - "anyOf": [ - { - "$ref": "#/components/schemas/Config.Model.CostEncoded" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/Config.Model.CostEncoded" - } - } - ] - }, - "disabled": { - "type": "boolean" - }, - "limit": { - "type": "object", - "properties": { - "context": { - "type": "integer" - }, - "input": { - "type": "integer" - }, - "output": { - "type": "integer" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - "Config.ProviderEncoded": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "env": { - "type": "array", - "items": { - "type": "string" - } - }, - "package": { - "type": "string" - }, - "settings": { - "$ref": "#/components/schemas/Objects_11" - }, - "headers": { - "$ref": "#/components/schemas/Objects_10" - }, - "body": { - "$ref": "#/components/schemas/Objects_11" - }, - "models": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Config.ModelEncoded" - } - } - }, - "additionalProperties": false - }, "Config.InfoEncoded": { "type": "object", "properties": { @@ -14780,7 +10117,7 @@ "type": "string" }, "model": { - "$ref": "#/components/schemas/Union_13" + "$ref": "#/components/schemas/Union_85ca62cf1a33" }, "default_agent": { "type": "string" @@ -14942,7 +10279,7 @@ "type": "object", "properties": { "timeout": { - "$ref": "#/components/schemas/Objects_8" + "$ref": "#/components/schemas/Objects_7b507c2fd81f" }, "servers": { "type": "object", @@ -15106,80 +10443,4700 @@ }, "additionalProperties": false }, - "Config.DocumentEncoded": { + "Config.LSP.ServerEncoded": { + "type": "object", + "properties": { + "command": { + "type": "array", + "items": { + "type": "string" + } + }, + "extensions": { + "type": "array", + "items": { + "type": "string" + } + }, + "disabled": { + "type": "boolean" + }, + "env": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "initialization": { + "type": "object" + } + }, + "required": ["command"], + "additionalProperties": false + }, + "Config.Model.CostEncoded": { + "type": "object", + "properties": { + "tier": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["context"] + }, + "size": { + "type": "integer" + } + }, + "required": ["type", "size"], + "additionalProperties": false + }, + "input": { + "$ref": "#/components/schemas/Money.USDPerMillionTokens" + }, + "output": { + "$ref": "#/components/schemas/Money.USDPerMillionTokens" + }, + "cache": { + "type": "object", + "properties": { + "read": { + "$ref": "#/components/schemas/Money.USDPerMillionTokens" + }, + "write": { + "$ref": "#/components/schemas/Money.USDPerMillionTokens" + } + }, + "additionalProperties": false + } + }, + "required": ["input", "output"], + "additionalProperties": false + }, + "Config.ModelEncoded": { + "type": "object", + "properties": { + "modelID": { + "type": "string" + }, + "family": { + "type": "string" + }, + "name": { + "type": "string" + }, + "compatibility": { + "$ref": "#/components/schemas/Model.Compatibility" + }, + "package": { + "type": "string" + }, + "settings": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "headers": { + "$ref": "#/components/schemas/Objects_3f161562db4a" + }, + "body": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "capabilities": { + "$ref": "#/components/schemas/Model.Capabilities" + }, + "variants": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "settings": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "headers": { + "$ref": "#/components/schemas/Objects_3f161562db4a" + }, + "body": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + } + }, + "required": ["id"], + "additionalProperties": false + } + }, + "cost": { + "anyOf": [ + { + "$ref": "#/components/schemas/Config.Model.CostEncoded" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Config.Model.CostEncoded" + } + } + ] + }, + "disabled": { + "type": "boolean" + }, + "limit": { + "type": "object", + "properties": { + "context": { + "type": "integer" + }, + "input": { + "type": "integer" + }, + "output": { + "type": "integer" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "Config.Plugin.EntryEncoded": { + "type": "object", + "properties": { + "package": { + "type": "string" + }, + "options": { + "type": "object" + } + }, + "required": ["package"], + "additionalProperties": false + }, + "Config.ProviderEncoded": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "env": { + "type": "array", + "items": { + "type": "string" + } + }, + "package": { + "type": "string" + }, + "settings": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "headers": { + "$ref": "#/components/schemas/Objects_3f161562db4a" + }, + "body": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "models": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Config.ModelEncoded" + } + } + }, + "additionalProperties": false + }, + "Config.Reference.GitEncoded": { + "type": "object", + "properties": { + "repository": { + "type": "string" + }, + "branch": { + "type": "string" + }, + "description": { + "type": "string" + }, + "hidden": { + "type": "boolean" + } + }, + "required": ["repository"], + "additionalProperties": false + }, + "Config.Reference.LocalEncoded": { + "type": "object", + "properties": { + "path": { + "type": "string" + }, + "description": { + "type": "string" + }, + "hidden": { + "type": "boolean" + } + }, + "required": ["path"], + "additionalProperties": false + }, + "Config.WarmingEncoded": { + "type": "object", + "properties": { + "prompt": { + "type": "string" + }, + "interval": { + "type": "string" + }, + "duration": { + "type": "string" + } + }, + "additionalProperties": false + }, + "ConfigWebSearch.InfoEncoded": { + "type": "object", + "properties": { + "provider": { + "anyOf": [ + { + "type": "string", + "enum": ["random"] + }, + { + "type": "string" + } + ] + } + }, + "required": ["provider"], + "additionalProperties": false + }, + "ConflictErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["ConflictError"] + }, + "message": { + "type": "string" + }, + "resource": { + "$ref": "#/components/schemas/Union_f090cb615c84" + } + }, + "required": ["_tag", "message"], + "additionalProperties": false + }, + "Connection.CredentialInfo": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["document"] + "enum": ["credential"] }, - "path": { + "id": { "type": "string" }, - "info": { - "$ref": "#/components/schemas/Config.InfoEncoded" + "label": { + "type": "string" } }, - "required": ["type", "info"], + "required": ["type", "id", "label"], "additionalProperties": false }, - "Config.DirectoryEncoded": { + "Connection.EnvInfo": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["directory"] + "enum": ["env"] }, - "path": { + "name": { "type": "string" } }, - "required": ["type", "path"], + "required": ["type", "name"], "additionalProperties": false }, - "Config.AgentsDirectoryEncoded": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["agents"] - }, - "path": { - "type": "string" - } - }, - "required": ["type", "path"], - "additionalProperties": false - }, - "Config.ClaudeDirectoryEncoded": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["claude"] - }, - "path": { - "type": "string" - } - }, - "required": ["type", "path"], - "additionalProperties": false - }, - "Config.Entry": { + "Connection.Info": { "anyOf": [ { - "$ref": "#/components/schemas/Config.DocumentEncoded" + "$ref": "#/components/schemas/Connection.CredentialInfo" }, { - "$ref": "#/components/schemas/Config.DirectoryEncoded" - }, - { - "$ref": "#/components/schemas/Config.AgentsDirectoryEncoded" - }, - { - "$ref": "#/components/schemas/Config.ClaudeDirectoryEncoded" + "$ref": "#/components/schemas/Connection.EnvInfo" } ] + }, + "FileDiff.Info": { + "type": "object", + "properties": { + "file": { + "type": "string" + }, + "patch": { + "type": "string" + }, + "additions": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "deletions": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "status": { + "type": "string", + "enum": ["added", "deleted", "modified"] + } + }, + "required": ["file", "patch", "additions", "deletions", "status"], + "additionalProperties": false + }, + "FileSystem.Entry": { + "type": "object", + "properties": { + "path": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["file", "directory"] + } + }, + "required": ["path", "type"], + "additionalProperties": false + }, + "ForbiddenErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["ForbiddenError"] + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "message"], + "additionalProperties": false + }, + "Form.Answer": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Form.Value" + } + }, + "Form.BooleanField": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "required": { + "type": "boolean" + }, + "when": { + "$ref": "#/components/schemas/Arrays_4df8e9fdc8e1" + }, + "type": { + "type": "string", + "enum": ["boolean"] + }, + "default": { + "type": "boolean" + } + }, + "required": ["key", "type"], + "additionalProperties": false + }, + "Form.CreatePayload": { + "type": "object", + "properties": { + "id": { + "anyOf": [ + { + "type": "string", + "allOf": [ + { + "pattern": "^frm_" + } + ] + }, + { + "type": "null" + } + ] + }, + "title": { + "type": "string" + }, + "metadata": { + "$ref": "#/components/schemas/Form.Metadata" + }, + "fields": { + "$ref": "#/components/schemas/Form.Fields_2" + } + }, + "required": ["title", "fields"], + "additionalProperties": false + }, + "Form.ExternalField": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["external"] + }, + "url": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": ["key", "type", "url"], + "additionalProperties": false + }, + "Form.Field": { + "anyOf": [ + { + "$ref": "#/components/schemas/Form.StringField" + }, + { + "$ref": "#/components/schemas/Form.NumberField" + }, + { + "$ref": "#/components/schemas/Form.IntegerField" + }, + { + "$ref": "#/components/schemas/Form.BooleanField" + }, + { + "$ref": "#/components/schemas/Form.MultiselectField" + }, + { + "$ref": "#/components/schemas/Form.ExternalField" + } + ] + }, + "Form.Fields": { + "type": "array", + "prefixItems": [ + { + "$ref": "#/components/schemas/Form.Field" + } + ], + "minItems": 1, + "items": { + "$ref": "#/components/schemas/Form.Field" + } + }, + "Form.Fields_1": { + "type": "array", + "prefixItems": [ + { + "$ref": "#/components/schemas/Form.Field" + } + ], + "minItems": 1, + "items": { + "$ref": "#/components/schemas/Form.Field" + } + }, + "Form.Fields_2": { + "type": "array", + "prefixItems": [ + { + "$ref": "#/components/schemas/Form.Field" + } + ], + "minItems": 1, + "items": { + "$ref": "#/components/schemas/Form.Field" + } + }, + "Form.Info": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^frm_" + } + ] + }, + "sessionID": { + "type": "string" + }, + "title": { + "type": "string" + }, + "metadata": { + "$ref": "#/components/schemas/Form.Metadata" + }, + "fields": { + "$ref": "#/components/schemas/Form.Fields_2" + } + }, + "required": ["id", "sessionID", "title", "fields"], + "additionalProperties": false + }, + "Form.IntegerField": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "required": { + "type": "boolean" + }, + "when": { + "$ref": "#/components/schemas/Arrays_4df8e9fdc8e1" + }, + "type": { + "type": "string", + "enum": ["integer"] + }, + "minimum": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/components/schemas/Union_97d8d2942510" + } + ] + }, + "maximum": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/components/schemas/Union_97d8d2942510" + } + ] + }, + "default": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/components/schemas/Union_97d8d2942510" + } + ] + } + }, + "required": ["key", "type"], + "additionalProperties": false + }, + "Form.Metadata": { + "type": "object" + }, + "Form.MultiselectField": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "required": { + "type": "boolean" + }, + "when": { + "$ref": "#/components/schemas/Arrays_4df8e9fdc8e1" + }, + "type": { + "type": "string", + "enum": ["multiselect"] + }, + "options": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Form.Option" + } + }, + "minItems": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "maxItems": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "custom": { + "type": "boolean" + }, + "default": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": ["key", "type", "options"], + "additionalProperties": false + }, + "Form.NumberField": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "required": { + "type": "boolean" + }, + "when": { + "$ref": "#/components/schemas/Arrays_4df8e9fdc8e1" + }, + "type": { + "type": "string", + "enum": ["number"] + }, + "minimum": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/components/schemas/Union_97d8d2942510" + } + ] + }, + "maximum": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/components/schemas/Union_97d8d2942510" + } + ] + }, + "default": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/components/schemas/Union_97d8d2942510" + } + ] + } + }, + "required": ["key", "type"], + "additionalProperties": false + }, + "Form.Option": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": ["value", "label"], + "additionalProperties": false + }, + "Form.Reply": { + "type": "object", + "properties": { + "answer": { + "$ref": "#/components/schemas/Form.Answer" + } + }, + "required": ["answer"], + "additionalProperties": false + }, + "Form.State": { + "anyOf": [ + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["pending"] + } + }, + "required": ["status"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["answered"] + }, + "answer": { + "$ref": "#/components/schemas/Form.Answer" + } + }, + "required": ["status", "answer"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["cancelled"] + } + }, + "required": ["status"], + "additionalProperties": false + } + ] + }, + "Form.StringField": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "required": { + "type": "boolean" + }, + "when": { + "$ref": "#/components/schemas/Arrays_4df8e9fdc8e1" + }, + "type": { + "type": "string", + "enum": ["string"] + }, + "format": { + "type": "string", + "enum": ["email", "uri", "date", "date-time"] + }, + "minLength": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "maxLength": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "pattern": { + "type": "string" + }, + "placeholder": { + "type": "string" + }, + "default": { + "type": "string" + }, + "options": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Form.Option" + } + }, + "custom": { + "type": "boolean" + } + }, + "required": ["key", "type"], + "additionalProperties": false + }, + "Form.Value": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/Union_00be4ed53f19" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Form.When": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "op": { + "type": "string", + "enum": ["eq", "neq"] + }, + "value": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/Union_00be4ed53f19" + }, + { + "type": "boolean" + } + ] + } + }, + "required": ["key", "op", "value"], + "additionalProperties": false + }, + "FormAlreadySettledErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["FormAlreadySettledError"] + }, + "id": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "id", "message"], + "additionalProperties": false + }, + "FormInvalidAnswerErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["FormInvalidAnswerError"] + }, + "id": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "id", "message"], + "additionalProperties": false + }, + "FormNotFoundErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["FormNotFoundError"] + }, + "id": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "id", "message"], + "additionalProperties": false + }, + "GenerateTextResponse": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "text": { + "type": "string" + } + }, + "required": ["text"], + "additionalProperties": false + } + }, + "required": ["data"], + "additionalProperties": false + }, + "InstructionEntry.Info": { + "type": "object", + "properties": { + "key": { + "$ref": "#/components/schemas/InstructionEntry.Key" + }, + "value": { + "description": "JSON value attached to the session's instructions" + } + }, + "required": ["key", "value"], + "additionalProperties": false + }, + "InstructionEntry.Key": { + "type": "string", + "allOf": [ + { + "pattern": "^[a-z0-9][a-z0-9._-]*$", + "description": "Instruction entry key (lowercase alphanumerics plus . _ -)" + } + ] + }, + "InstructionEntryValueTooLargeErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["InstructionEntryValueTooLargeError"] + }, + "actualBytes": { + "type": "integer" + }, + "maxBytes": { + "type": "integer" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "actualBytes", "maxBytes", "message"], + "additionalProperties": false + }, + "Integration.AttemptEncoded": { + "type": "object", + "properties": { + "attemptID": { + "type": "string" + }, + "url": { + "type": "string" + }, + "instructions": { + "type": "string" + }, + "mode": { + "type": "string", + "enum": ["auto", "code"] + }, + "time": { + "$ref": "#/components/schemas/Objects_03af97aacac9" + } + }, + "required": ["attemptID", "url", "instructions", "mode", "time"], + "additionalProperties": false + }, + "Integration.AttemptStatus": { + "anyOf": [ + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["pending"] + }, + "time": { + "$ref": "#/components/schemas/Objects_03af97aacac9" + } + }, + "required": ["status", "time"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["complete"] + }, + "time": { + "$ref": "#/components/schemas/Objects_03af97aacac9" + } + }, + "required": ["status", "time"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["failed"] + }, + "message": { + "type": "string" + }, + "time": { + "$ref": "#/components/schemas/Objects_03af97aacac9" + } + }, + "required": ["status", "message", "time"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["expired"] + }, + "time": { + "$ref": "#/components/schemas/Objects_03af97aacac9" + } + }, + "required": ["status", "time"], + "additionalProperties": false + } + ] + }, + "Integration.CommandAttempt": { + "type": "object", + "properties": { + "attemptID": { + "type": "string" + }, + "time": { + "$ref": "#/components/schemas/Objects_03af97aacac9" + } + }, + "required": ["attemptID", "time"], + "additionalProperties": false + }, + "Integration.CommandAttemptStatus": { + "anyOf": [ + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["pending"] + }, + "message": { + "type": "string" + }, + "time": { + "$ref": "#/components/schemas/Objects_03af97aacac9" + } + }, + "required": ["status", "time"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["complete"] + }, + "time": { + "$ref": "#/components/schemas/Objects_03af97aacac9" + } + }, + "required": ["status", "time"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["failed"] + }, + "message": { + "type": "string" + }, + "time": { + "$ref": "#/components/schemas/Objects_03af97aacac9" + } + }, + "required": ["status", "message", "time"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["expired"] + }, + "time": { + "$ref": "#/components/schemas/Objects_03af97aacac9" + } + }, + "required": ["status", "time"], + "additionalProperties": false + } + ] + }, + "Integration.CommandMethod": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["command"] + }, + "label": { + "type": "string" + }, + "command": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": ["id", "type", "label", "command"], + "additionalProperties": false + }, + "Integration.EnvMethod": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["env"] + }, + "names": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": ["type", "names"], + "additionalProperties": false + }, + "Integration.Info": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "methods": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Integration.Method" + } + }, + "connections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Connection.Info" + } + } + }, + "required": ["id", "name", "methods", "connections"], + "additionalProperties": false + }, + "Integration.KeyMethod": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["key"] + }, + "label": { + "type": "string" + }, + "form": { + "$ref": "#/components/schemas/Form.Fields_1" + } + }, + "required": ["type"], + "additionalProperties": false + }, + "Integration.Method": { + "anyOf": [ + { + "$ref": "#/components/schemas/Integration.OAuthMethod" + }, + { + "$ref": "#/components/schemas/Integration.CommandMethod" + }, + { + "$ref": "#/components/schemas/Integration.KeyMethod" + }, + { + "$ref": "#/components/schemas/Integration.EnvMethod" + } + ] + }, + "Integration.OAuthMethod": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["oauth"] + }, + "label": { + "type": "string" + }, + "form": { + "$ref": "#/components/schemas/Form.Fields" + } + }, + "required": ["id", "type", "label"], + "additionalProperties": false + }, + "InvalidCursorErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["InvalidCursorError"] + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "message"], + "additionalProperties": false + }, + "InvalidRequestErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["InvalidRequestError"] + }, + "message": { + "type": "string" + }, + "kind": { + "$ref": "#/components/schemas/Union_f090cb615c84" + }, + "field": { + "$ref": "#/components/schemas/Union_f090cb615c84" + } + }, + "required": ["_tag", "message"], + "additionalProperties": false + }, + "Location.InfoEncoded": { + "type": "object", + "properties": { + "directory": { + "type": "string" + }, + "workspaceID": { + "type": "string", + "allOf": [ + { + "pattern": "^wrk" + } + ] + }, + "project": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "directory": { + "type": "string" + }, + "canonical": { + "type": "string" + } + }, + "required": ["id", "directory", "canonical"], + "additionalProperties": false + } + }, + "required": ["directory", "project"], + "additionalProperties": false + }, + "Location.Ref": { + "type": "object", + "properties": { + "directory": { + "type": "string" + }, + "workspaceID": { + "type": "string", + "allOf": [ + { + "pattern": "^wrk" + } + ] + } + }, + "required": ["directory"], + "additionalProperties": false + }, + "Mcp.LocalConfigEncoded": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["local"] + }, + "command": { + "type": "array", + "items": { + "type": "string" + } + }, + "cwd": { + "type": "string" + }, + "environment": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "disabled": { + "type": "boolean" + }, + "codemode": { + "type": "boolean" + }, + "timeout": { + "$ref": "#/components/schemas/Objects_7b507c2fd81f" + } + }, + "required": ["type", "command"], + "additionalProperties": false + }, + "Mcp.OAuthConfigEncoded": { + "type": "object", + "properties": { + "client_id": { + "type": "string" + }, + "client_secret": { + "type": "string" + }, + "scope": { + "type": "string" + }, + "callback_port": { + "type": "integer", + "allOf": [ + { + "minimum": 1, + "maximum": 65535 + } + ] + }, + "redirect_uri": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Mcp.RemoteConfigEncoded": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["remote"] + }, + "url": { + "type": "string" + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "oauth": { + "anyOf": [ + { + "$ref": "#/components/schemas/Mcp.OAuthConfigEncoded" + }, + { + "type": "boolean", + "enum": [false] + } + ] + }, + "disabled": { + "type": "boolean" + }, + "codemode": { + "type": "boolean" + }, + "timeout": { + "$ref": "#/components/schemas/Objects_7b507c2fd81f" + } + }, + "required": ["type", "url"], + "additionalProperties": false + }, + "Mcp.Resource": { + "type": "object", + "properties": { + "server": { + "type": "string" + }, + "name": { + "type": "string" + }, + "uri": { + "type": "string" + }, + "description": { + "type": "string" + }, + "mimeType": { + "type": "string" + } + }, + "required": ["server", "name", "uri"], + "additionalProperties": false + }, + "Mcp.ResourceCatalog": { + "type": "object", + "properties": { + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Mcp.Resource" + } + }, + "templates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Mcp.ResourceTemplate" + } + } + }, + "required": ["resources", "templates"], + "additionalProperties": false + }, + "Mcp.ResourceTemplate": { + "type": "object", + "properties": { + "server": { + "type": "string" + }, + "name": { + "type": "string" + }, + "uriTemplate": { + "type": "string" + }, + "description": { + "type": "string" + }, + "mimeType": { + "type": "string" + } + }, + "required": ["server", "name", "uriTemplate"], + "additionalProperties": false + }, + "Mcp.Server": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/Mcp.Status.Connected" + }, + { + "$ref": "#/components/schemas/Mcp.Status.Pending" + }, + { + "$ref": "#/components/schemas/Mcp.Status.Disabled" + }, + { + "$ref": "#/components/schemas/Mcp.Status.Failed" + }, + { + "$ref": "#/components/schemas/Mcp.Status.NeedsAuth" + } + ] + }, + "integrationID": { + "type": "string" + } + }, + "required": ["name", "status"], + "additionalProperties": false + }, + "Mcp.Status.Connected": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["connected"] + } + }, + "required": ["status"], + "additionalProperties": false + }, + "Mcp.Status.Disabled": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["disabled"] + } + }, + "required": ["status"], + "additionalProperties": false + }, + "Mcp.Status.Failed": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["failed"] + }, + "error": { + "type": "string" + } + }, + "required": ["status", "error"], + "additionalProperties": false + }, + "Mcp.Status.NeedsAuth": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["needs_auth"] + } + }, + "required": ["status"], + "additionalProperties": false + }, + "Mcp.Status.Pending": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["pending"] + } + }, + "required": ["status"], + "additionalProperties": false + }, + "McpServerNotFoundErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["McpServerNotFoundError"] + }, + "server": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "server", "message"], + "additionalProperties": false + }, + "MessageNotFoundErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["MessageNotFoundError"] + }, + "sessionID": { + "type": "string" + }, + "messageID": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "sessionID", "messageID", "message"], + "additionalProperties": false + }, + "Model.Capabilities": { + "type": "object", + "properties": { + "tools": { + "type": "boolean" + }, + "input": { + "type": "array", + "items": { + "type": "string" + } + }, + "output": { + "type": "array", + "items": { + "type": "string" + } + }, + "responsesWebsockets": { + "type": "boolean" + } + }, + "required": ["tools", "input", "output"], + "additionalProperties": false + }, + "Model.Compatibility": { + "type": "object", + "properties": { + "reasoningField": { + "$ref": "#/components/schemas/Model.ReasoningField" + }, + "maxTokensField": { + "$ref": "#/components/schemas/Model.MaxTokensField" + }, + "requireFinishReason": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "Model.Cost": { + "type": "object", + "properties": { + "tier": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["context"] + }, + "size": { + "type": "integer" + } + }, + "required": ["type", "size"], + "additionalProperties": false + }, + "input": { + "$ref": "#/components/schemas/Money.USDPerMillionTokens" + }, + "output": { + "$ref": "#/components/schemas/Money.USDPerMillionTokens" + }, + "cache": { + "type": "object", + "properties": { + "read": { + "$ref": "#/components/schemas/Money.USDPerMillionTokens" + }, + "write": { + "$ref": "#/components/schemas/Money.USDPerMillionTokens" + } + }, + "required": ["read", "write"], + "additionalProperties": false + } + }, + "required": ["input", "output", "cache"], + "additionalProperties": false + }, + "Model.Info": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "modelID": { + "type": "string" + }, + "providerID": { + "type": "string" + }, + "family": { + "type": "string" + }, + "name": { + "type": "string" + }, + "compatibility": { + "$ref": "#/components/schemas/Model.Compatibility" + }, + "package": { + "type": "string" + }, + "settings": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "headers": { + "$ref": "#/components/schemas/Objects_3f161562db4a" + }, + "body": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "capabilities": { + "$ref": "#/components/schemas/Model.Capabilities" + }, + "variants": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Model.Variant" + } + }, + "time": { + "type": "object", + "properties": { + "released": { + "type": "number" + } + }, + "required": ["released"], + "additionalProperties": false + }, + "cost": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Model.Cost" + } + }, + "status": { + "type": "string", + "enum": ["alpha", "beta", "deprecated", "active"] + }, + "enabled": { + "type": "boolean" + }, + "limit": { + "type": "object", + "properties": { + "context": { + "type": "integer" + }, + "input": { + "type": "integer" + }, + "output": { + "type": "integer" + } + }, + "required": ["context", "output"], + "additionalProperties": false + } + }, + "required": [ + "id", + "modelID", + "providerID", + "name", + "capabilities", + "variants", + "time", + "cost", + "status", + "enabled", + "limit" + ], + "additionalProperties": false + }, + "Model.MaxTokensField": { + "type": "string", + "enum": ["max_completion_tokens", "max_tokens"] + }, + "Model.ReasoningField": { + "anyOf": [ + { + "type": "string", + "enum": ["reasoning", "reasoning_content", "reasoning_text"] + }, + { + "type": "string" + } + ] + }, + "Model.Ref": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "providerID": { + "type": "string" + }, + "variant": { + "type": "string" + } + }, + "required": ["id", "providerID"], + "additionalProperties": false + }, + "Model.Variant": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "settings": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "headers": { + "$ref": "#/components/schemas/Objects_3f161562db4a" + }, + "body": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + } + }, + "required": ["id"], + "additionalProperties": false + }, + "Money.USD": { + "type": "number" + }, + "Money.USDPerMillionTokens": { + "type": "number" + }, + "Objects_03af97aacac9": { + "type": "object", + "properties": { + "created": { + "$ref": "#/components/schemas/Union_00be4ed53f19" + }, + "expires": { + "$ref": "#/components/schemas/Union_00be4ed53f19" + } + }, + "required": ["created", "expires"], + "additionalProperties": false + }, + "Objects_3f161562db4a": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "Objects_7b507c2fd81f": { + "type": "object", + "properties": { + "startup": { + "type": "integer", + "allOf": [ + { + "exclusiveMinimum": 0 + } + ] + }, + "catalog": { + "type": "integer", + "allOf": [ + { + "exclusiveMinimum": 0 + } + ] + }, + "execution": { + "type": "integer", + "allOf": [ + { + "exclusiveMinimum": 0 + } + ] + } + }, + "additionalProperties": false + }, + "Objects_9d53a00b1efb": { + "type": "object", + "properties": { + "output": { + "type": "string" + }, + "cursor": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "size": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "truncated": { + "type": "boolean" + } + }, + "required": ["output", "cursor", "size", "truncated"], + "additionalProperties": false + }, + "Objects_a2c799262a3c": { + "type": "object" + }, + "Objects_d7bbfd8ec2f6": { + "type": "object", + "properties": { + "created": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false + }, + "Permission.Effect": { + "type": "string", + "enum": ["allow", "deny", "ask"] + }, + "Permission.Reply": { + "type": "string", + "enum": ["once", "always", "reject"] + }, + "Permission.Request": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^per" + } + ] + }, + "sessionID": { + "type": "string", + "allOf": [ + { + "pattern": "^ses" + } + ] + }, + "action": { + "type": "string" + }, + "resources": { + "$ref": "#/components/schemas/Arrays_681004346c78" + }, + "save": { + "$ref": "#/components/schemas/Arrays_681004346c78" + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "source": { + "$ref": "#/components/schemas/Permission.Source" + } + }, + "required": ["id", "sessionID", "action", "resources"], + "additionalProperties": false + }, + "Permission.Rule": { + "type": "object", + "properties": { + "action": { + "type": "string" + }, + "resource": { + "type": "string" + }, + "effect": { + "$ref": "#/components/schemas/Permission.Effect" + } + }, + "required": ["action", "resource", "effect"], + "additionalProperties": false + }, + "Permission.Ruleset": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Permission.Rule" + } + }, + "Permission.Source": { + "anyOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["tool"] + }, + "messageID": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "required": ["type", "messageID", "id"], + "additionalProperties": false + } + ] + }, + "PermissionNotFoundErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["PermissionNotFoundError"] + }, + "requestID": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "requestID", "message"], + "additionalProperties": false + }, + "PermissionSaved.Info": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "projectID": { + "type": "string" + }, + "action": { + "type": "string" + }, + "resource": { + "type": "string" + } + }, + "required": ["id", "projectID", "action", "resource"], + "additionalProperties": false + }, + "Plugin.Info": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "source": { + "$ref": "#/components/schemas/Plugin.Source" + }, + "status": { + "type": "string", + "enum": ["active"] + }, + "tui": { + "type": "boolean" + } + }, + "required": ["id", "source", "status", "tui"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "source": { + "$ref": "#/components/schemas/Plugin.Source" + }, + "status": { + "type": "string", + "enum": ["failed"] + }, + "error": { + "type": "string" + }, + "tui": { + "type": "boolean" + } + }, + "required": ["source", "status", "error", "tui"], + "additionalProperties": false + } + ] + }, + "Plugin.Source": { + "anyOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["builtin"] + } + }, + "required": ["type"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["package"] + }, + "package": { + "type": "string" + } + }, + "required": ["type", "package"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["local"] + }, + "path": { + "type": "string" + } + }, + "required": ["type", "path"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["sdk"] + } + }, + "required": ["type"], + "additionalProperties": false + } + ] + }, + "Project": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "canonical": { + "type": "string" + }, + "vcs": { + "$ref": "#/components/schemas/Project.Vcs" + }, + "name": { + "type": "string" + }, + "icon": { + "$ref": "#/components/schemas/Project.Icon" + }, + "commands": { + "$ref": "#/components/schemas/Project.Commands" + }, + "time": { + "$ref": "#/components/schemas/Project.Time" + }, + "sandboxes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": ["id", "canonical", "time", "sandboxes"], + "additionalProperties": false + }, + "Project.Commands": { + "type": "object", + "properties": { + "start": { + "type": "string", + "description": "Startup script to run when creating a new workspace (worktree)" + } + }, + "additionalProperties": false + }, + "Project.Current": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "directory": { + "type": "string" + }, + "canonical": { + "type": "string" + } + }, + "required": ["id", "directory", "canonical"], + "additionalProperties": false + }, + "Project.Icon": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "override": { + "type": "string" + }, + "color": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Project.Time": { + "type": "object", + "properties": { + "created": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "updated": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "initialized": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + } + }, + "required": ["created", "updated"], + "additionalProperties": false + }, + "Project.Vcs": { + "type": "string", + "enum": ["git", "hg"] + }, + "Prompt.AgentAttachment": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "mention": { + "$ref": "#/components/schemas/Prompt.Mention" + } + }, + "required": ["name"], + "additionalProperties": false + }, + "Prompt.Base64": { + "type": "string", + "allOf": [ + { + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" + } + ] + }, + "Prompt.FileAttachment": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Prompt.Base64" + }, + "mime": { + "type": "string" + }, + "source": { + "$ref": "#/components/schemas/Prompt.FileSource" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "mention": { + "$ref": "#/components/schemas/Prompt.Mention" + } + }, + "required": ["data", "mime", "source"], + "additionalProperties": false + }, + "Prompt.FileSource": { + "anyOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["inline"] + } + }, + "required": ["type"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["uri"] + }, + "uri": { + "type": "string" + } + }, + "required": ["type", "uri"], + "additionalProperties": false + } + ] + }, + "Prompt.Mention": { + "type": "object", + "properties": { + "start": { + "type": "number" + }, + "end": { + "type": "number" + }, + "text": { + "type": "string" + } + }, + "required": ["start", "end", "text"], + "additionalProperties": false + }, + "Prompt.SkillAttachment": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "mention": { + "$ref": "#/components/schemas/Prompt.Mention" + } + }, + "required": ["id", "name"], + "additionalProperties": false + }, + "PromptInput.FileAttachment": { + "type": "object", + "properties": { + "uri": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "mention": { + "$ref": "#/components/schemas/Prompt.Mention" + } + }, + "required": ["uri"], + "additionalProperties": false + }, + "PromptInput.SkillAttachment": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "mention": { + "$ref": "#/components/schemas/Prompt.Mention" + } + }, + "required": ["id"], + "additionalProperties": false + }, + "Provider.Info": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "integrationID": { + "type": "string" + }, + "name": { + "type": "string" + }, + "activation": { + "type": "string", + "enum": ["auto", "enabled", "disabled"] + }, + "package": { + "type": "string" + }, + "settings": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "headers": { + "$ref": "#/components/schemas/Objects_3f161562db4a" + }, + "body": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + } + }, + "required": ["id", "name", "activation", "package"], + "additionalProperties": false + }, + "Provider.Request": { + "type": "object", + "properties": { + "settings": { + "$ref": "#/components/schemas/Provider.Settings" + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "body": { + "type": "object" + } + }, + "required": ["settings", "headers", "body"], + "additionalProperties": false + }, + "Provider.Settings": { + "type": "object" + }, + "ProviderNotFoundErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["ProviderNotFoundError"] + }, + "providerID": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "providerID", "message"], + "additionalProperties": false + }, + "Pty": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^pty" + } + ] + }, + "title": { + "type": "string" + }, + "command": { + "type": "string" + }, + "args": { + "type": "array", + "items": { + "type": "string" + } + }, + "cwd": { + "type": "string" + }, + "status": { + "type": "string", + "enum": ["running", "exited"] + }, + "pid": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "exitCode": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + } + }, + "required": ["id", "title", "command", "args", "cwd", "status", "pid"], + "additionalProperties": false + }, + "PtyNotFoundErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["PtyNotFoundError"] + }, + "ptyID": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "ptyID", "message"], + "additionalProperties": false + }, + "PtyTicket.ConnectToken": { + "type": "object", + "properties": { + "ticket": { + "type": "string" + }, + "expires_in": { + "type": "integer", + "allOf": [ + { + "exclusiveMinimum": 0 + } + ] + } + }, + "required": ["ticket", "expires_in"], + "additionalProperties": false + }, + "Reference.GitSource": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["git"] + }, + "repository": { + "type": "string" + }, + "branch": { + "type": "string" + }, + "description": { + "type": "string" + }, + "hidden": { + "type": "boolean" + } + }, + "required": ["type", "repository"], + "additionalProperties": false + }, + "Reference.Info": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "description": { + "type": "string" + }, + "hidden": { + "type": "boolean" + }, + "source": { + "$ref": "#/components/schemas/Reference.Source" + } + }, + "required": ["name", "path", "source"], + "additionalProperties": false + }, + "Reference.LocalSource": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["local"] + }, + "path": { + "type": "string" + }, + "description": { + "type": "string" + }, + "hidden": { + "type": "boolean" + } + }, + "required": ["type", "path"], + "additionalProperties": false + }, + "Reference.Source": { + "anyOf": [ + { + "$ref": "#/components/schemas/Reference.LocalSource" + }, + { + "$ref": "#/components/schemas/Reference.GitSource" + } + ] + }, + "ServiceHealth": { + "type": "object", + "properties": { + "healthy": { + "type": "boolean", + "enum": [true] + }, + "version": { + "type": "string" + }, + "pid": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + } + }, + "required": ["healthy", "version", "pid"], + "additionalProperties": false + }, + "ServiceUnavailableErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["ServiceUnavailableError"] + }, + "message": { + "type": "string" + }, + "service": { + "$ref": "#/components/schemas/Union_f090cb615c84" + } + }, + "required": ["_tag", "message"], + "additionalProperties": false + }, + "Session.ForkBoundary": { + "anyOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["before"] + }, + "messageID": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + } + }, + "required": ["type", "messageID"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["through"] + }, + "messageID": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + } + }, + "required": ["type", "messageID"], + "additionalProperties": false + } + ] + }, + "Session.ForkRequestBoundary": { + "anyOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["before"] + }, + "messageID": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + } + }, + "required": ["type", "messageID"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["through"] + } + }, + "required": ["type"], + "additionalProperties": false + } + ] + }, + "Session.Inbox.Compaction": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "sessionID": { + "type": "string", + "allOf": [ + { + "pattern": "^ses" + } + ] + }, + "timeCreated": { + "type": "number" + }, + "type": { + "type": "string", + "enum": ["compaction"] + }, + "payload": { + "$ref": "#/components/schemas/Session.Inbox.CompactionPayload" + }, + "delivery": { + "$ref": "#/components/schemas/Session.Inbox.Delivery" + } + }, + "required": ["id", "sessionID", "timeCreated", "type", "payload", "delivery"], + "additionalProperties": false + }, + "Session.Inbox.CompactionPayload": { + "anyOf": [ + { + "type": "object" + }, + { + "type": "array" + } + ] + }, + "Session.Inbox.Delivery": { + "type": "string", + "enum": ["steer", "queue"] + }, + "Session.Inbox.Info": { + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Inbox.User" + }, + { + "$ref": "#/components/schemas/Session.Inbox.Synthetic" + }, + { + "$ref": "#/components/schemas/Session.Inbox.Compaction" + }, + { + "$ref": "#/components/schemas/Session.Inbox.Move" + } + ] + }, + "Session.Inbox.Move": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "sessionID": { + "type": "string", + "allOf": [ + { + "pattern": "^ses" + } + ] + }, + "timeCreated": { + "type": "number" + }, + "type": { + "type": "string", + "enum": ["move"] + }, + "payload": { + "$ref": "#/components/schemas/Session.Inbox.MovePayload" + }, + "delivery": { + "$ref": "#/components/schemas/Session.Inbox.Delivery" + } + }, + "required": ["id", "sessionID", "timeCreated", "type", "payload", "delivery"], + "additionalProperties": false + }, + "Session.Inbox.MovePayload": { + "type": "object", + "properties": { + "location": { + "$ref": "#/components/schemas/Location.Ref" + }, + "projectID": { + "type": "string" + }, + "subpath": { + "type": "string" + } + }, + "required": ["location", "projectID"], + "additionalProperties": false + }, + "Session.Inbox.Synthetic": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "sessionID": { + "type": "string", + "allOf": [ + { + "pattern": "^ses" + } + ] + }, + "timeCreated": { + "type": "number" + }, + "type": { + "type": "string", + "enum": ["synthetic"] + }, + "payload": { + "$ref": "#/components/schemas/Session.Inbox.SyntheticPayload" + }, + "delivery": { + "$ref": "#/components/schemas/Session.Inbox.Delivery" + } + }, + "required": ["id", "sessionID", "timeCreated", "type", "payload", "delivery"], + "additionalProperties": false + }, + "Session.Inbox.SyntheticPayload": { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "description": { + "type": "string" + }, + "metadata": { + "type": "object" + } + }, + "required": ["text"], + "additionalProperties": false + }, + "Session.Inbox.User": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "sessionID": { + "type": "string", + "allOf": [ + { + "pattern": "^ses" + } + ] + }, + "timeCreated": { + "type": "number" + }, + "type": { + "type": "string", + "enum": ["user"] + }, + "payload": { + "$ref": "#/components/schemas/Session.Inbox.UserPayload" + }, + "delivery": { + "$ref": "#/components/schemas/Session.Inbox.Delivery" + } + }, + "required": ["id", "sessionID", "timeCreated", "type", "payload", "delivery"], + "additionalProperties": false + }, + "Session.Inbox.UserPayload": { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "files": { + "$ref": "#/components/schemas/Arrays_042d796a7901" + }, + "agents": { + "$ref": "#/components/schemas/Arrays_e1027de4b984" + }, + "skills": { + "$ref": "#/components/schemas/Arrays_92aa8803e81f" + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + } + }, + "required": ["text"], + "additionalProperties": false + }, + "Session.Info": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^ses" + } + ] + }, + "parentID": { + "type": "string", + "allOf": [ + { + "pattern": "^ses" + } + ] + }, + "fork": { + "type": "object", + "properties": { + "sessionID": { + "type": "string", + "allOf": [ + { + "pattern": "^ses" + } + ] + }, + "boundary": { + "$ref": "#/components/schemas/Session.ForkBoundary" + } + }, + "required": ["sessionID", "boundary"], + "additionalProperties": false + }, + "projectID": { + "type": "string" + }, + "agent": { + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/Model.Ref" + }, + "cost": { + "$ref": "#/components/schemas/Money.USD" + }, + "tokens": { + "$ref": "#/components/schemas/TokenUsage.Info" + }, + "outcome": { + "type": "string", + "enum": ["succeeded", "failed", "interrupted"] + }, + "time": { + "type": "object", + "properties": { + "created": { + "type": "number" + }, + "updated": { + "type": "number" + }, + "idle": { + "type": "number" + }, + "viewed": { + "type": "number" + }, + "archived": { + "type": "number" + } + }, + "required": ["created", "updated"], + "additionalProperties": false + }, + "title": { + "type": "string" + }, + "location": { + "$ref": "#/components/schemas/Location.Ref" + }, + "subpath": { + "type": "string" + }, + "revert": { + "$ref": "#/components/schemas/Session.Revert" + } + }, + "required": ["id", "projectID", "cost", "tokens", "time", "location"], + "additionalProperties": false + }, + "Session.Message.AgentSelected": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + }, + "type": { + "type": "string", + "enum": ["agent-switched"] + }, + "agent": { + "type": "string" + }, + "previous": { + "type": "string" + } + }, + "required": ["id", "time", "type", "agent"], + "additionalProperties": false + }, + "Session.Message.Assistant": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "type": "object", + "properties": { + "created": { + "type": "number" + }, + "completed": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": ["assistant"] + }, + "agent": { + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/Model.Ref" + }, + "content": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Message.Assistant.Text" + }, + { + "$ref": "#/components/schemas/Session.Message.Assistant.Reasoning" + }, + { + "$ref": "#/components/schemas/Session.Message.Assistant.Tool" + } + ] + } + }, + "snapshot": { + "type": "object", + "properties": { + "start": { + "type": "string" + }, + "end": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "finish": { + "type": "string", + "enum": ["stop", "length", "tool-calls", "content-filter", "error", "unknown"] + }, + "rawFinish": { + "type": "string" + }, + "providerState": { + "$ref": "#/components/schemas/Session.Message.ProviderState_4" + }, + "cost": { + "$ref": "#/components/schemas/Money.USD" + }, + "tokens": { + "$ref": "#/components/schemas/TokenUsage.Info" + }, + "error": { + "$ref": "#/components/schemas/Session.StructuredError" + }, + "retry": { + "$ref": "#/components/schemas/Session.Message.Assistant.Retry" + } + }, + "required": ["id", "time", "type", "agent", "model", "content"], + "additionalProperties": false + }, + "Session.Message.Assistant.Reasoning": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["reasoning"] + }, + "text": { + "type": "string" + }, + "state": { + "$ref": "#/components/schemas/Session.Message.ProviderState_1" + }, + "time": { + "type": "object", + "properties": { + "created": { + "type": "number" + }, + "completed": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false + } + }, + "required": ["type", "text"], + "additionalProperties": false + }, + "Session.Message.Assistant.Retry": { + "type": "object", + "properties": { + "attempt": { + "type": "integer", + "allOf": [ + { + "exclusiveMinimum": 0 + } + ] + }, + "at": { + "type": "number" + }, + "error": { + "$ref": "#/components/schemas/Session.StructuredError" + } + }, + "required": ["attempt", "at", "error"], + "additionalProperties": false + }, + "Session.Message.Assistant.Text": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["text"] + }, + "text": { + "type": "string" + }, + "state": { + "$ref": "#/components/schemas/Session.Message.ProviderState" + } + }, + "required": ["type", "text"], + "additionalProperties": false + }, + "Session.Message.Assistant.Tool": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["tool"] + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "executed": { + "type": "boolean" + }, + "providerState": { + "$ref": "#/components/schemas/Session.Message.ProviderState_2" + }, + "providerResultState": { + "$ref": "#/components/schemas/Session.Message.ProviderState_3" + }, + "state": { + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Message.ToolState.Streaming" + }, + { + "$ref": "#/components/schemas/Session.Message.ToolState.Running" + }, + { + "$ref": "#/components/schemas/Session.Message.ToolState.Completed" + }, + { + "$ref": "#/components/schemas/Session.Message.ToolState.Error" + } + ] + }, + "time": { + "type": "object", + "properties": { + "created": { + "type": "number" + }, + "ran": { + "type": "number" + }, + "completed": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false + } + }, + "required": ["type", "id", "name", "state", "time"], + "additionalProperties": false + }, + "Session.Message.Compaction": { + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Message.Compaction.Running" + }, + { + "$ref": "#/components/schemas/Session.Message.Compaction.Completed" + }, + { + "$ref": "#/components/schemas/Session.Message.Compaction.Failed" + } + ] + }, + "Session.Message.Compaction.Completed": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["compaction"] + }, + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + }, + "status": { + "type": "string", + "enum": ["completed"] + }, + "reason": { + "type": "string", + "enum": ["auto", "manual"] + }, + "summary": { + "type": "string" + }, + "recent": { + "type": "string" + } + }, + "required": ["type", "id", "time", "status", "reason", "summary", "recent"], + "additionalProperties": false + }, + "Session.Message.Compaction.Failed": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["compaction"] + }, + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + }, + "status": { + "type": "string", + "enum": ["failed"] + }, + "reason": { + "type": "string", + "enum": ["auto", "manual"] + }, + "error": { + "$ref": "#/components/schemas/Session.StructuredError" + } + }, + "required": ["type", "id", "time", "status", "reason", "error"], + "additionalProperties": false + }, + "Session.Message.Compaction.Running": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["compaction"] + }, + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + }, + "status": { + "type": "string", + "enum": ["running"] + }, + "reason": { + "type": "string", + "enum": ["auto", "manual"] + }, + "summary": { + "type": "string" + }, + "recent": { + "type": "string" + } + }, + "required": ["type", "id", "time", "status", "reason", "summary", "recent"], + "additionalProperties": false + }, + "Session.Message.Info": { + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Message.AgentSelected" + }, + { + "$ref": "#/components/schemas/Session.Message.ModelSelected" + }, + { + "$ref": "#/components/schemas/Session.Message.LocationSwitched" + }, + { + "$ref": "#/components/schemas/Session.Message.User" + }, + { + "$ref": "#/components/schemas/Session.Message.Synthetic" + }, + { + "$ref": "#/components/schemas/Session.Message.System" + }, + { + "$ref": "#/components/schemas/Session.Message.Skill" + }, + { + "$ref": "#/components/schemas/Session.Message.Shell" + }, + { + "$ref": "#/components/schemas/Session.Message.Assistant" + }, + { + "$ref": "#/components/schemas/Session.Message.Compaction" + } + ] + }, + "Session.Message.LocationSwitched": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + }, + "type": { + "type": "string", + "enum": ["location-switched"] + }, + "location": { + "$ref": "#/components/schemas/Location.Ref" + }, + "projectID": { + "type": "string" + }, + "subpath": { + "type": "string" + }, + "previous": { + "type": "object", + "properties": { + "location": { + "$ref": "#/components/schemas/Location.Ref" + }, + "projectID": { + "type": "string" + }, + "subpath": { + "type": "string" + } + }, + "required": ["location"], + "additionalProperties": false + } + }, + "required": ["id", "time", "type", "location"], + "additionalProperties": false + }, + "Session.Message.ModelSelected": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + }, + "type": { + "type": "string", + "enum": ["model-switched"] + }, + "model": { + "$ref": "#/components/schemas/Model.Ref" + }, + "previous": { + "$ref": "#/components/schemas/Model.Ref" + } + }, + "required": ["id", "time", "type", "model"], + "additionalProperties": false + }, + "Session.Message.ProviderState": { + "type": "object" + }, + "Session.Message.ProviderState_1": { + "type": "object" + }, + "Session.Message.ProviderState_2": { + "type": "object" + }, + "Session.Message.ProviderState_3": { + "type": "object" + }, + "Session.Message.ProviderState_4": { + "type": "object" + }, + "Session.Message.Shell": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "type": "object", + "properties": { + "created": { + "type": "number" + }, + "completed": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": ["shell"] + }, + "shellID": { + "type": "string", + "allOf": [ + { + "pattern": "^sh_" + } + ] + }, + "command": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/Union_b6d68a8b3572" + }, + "exit": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/components/schemas/Union_97d8d2942510" + } + ] + }, + "output": { + "$ref": "#/components/schemas/Objects_9d53a00b1efb" + } + }, + "required": ["id", "time", "type", "shellID", "command", "status"], + "additionalProperties": false + }, + "Session.Message.Skill": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + }, + "type": { + "type": "string", + "enum": ["skill"] + }, + "skill": { + "type": "string" + }, + "name": { + "type": "string" + }, + "text": { + "type": "string" + } + }, + "required": ["id", "time", "type", "skill", "name", "text"], + "additionalProperties": false + }, + "Session.Message.Synthetic": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + }, + "text": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["synthetic"] + } + }, + "required": ["id", "time", "text", "type"], + "additionalProperties": false + }, + "Session.Message.System": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + }, + "type": { + "type": "string", + "enum": ["system"] + }, + "text": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": ["id", "time", "type", "text"], + "additionalProperties": false + }, + "Session.Message.ToolState.Completed": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["completed"] + }, + "input": { + "type": "object" + }, + "content": { + "type": "array", + "prefixItems": [ + { + "$ref": "#/components/schemas/Tool.Content" + } + ], + "minItems": 1, + "items": { + "$ref": "#/components/schemas/Tool.Content" + } + }, + "metadata": { + "type": "object" + } + }, + "required": ["status", "input", "content"], + "additionalProperties": false + }, + "Session.Message.ToolState.Error": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["error"] + }, + "input": { + "type": "object" + }, + "error": { + "$ref": "#/components/schemas/Session.StructuredError" + }, + "content": { + "type": "array", + "prefixItems": [ + { + "$ref": "#/components/schemas/Tool.Content" + } + ], + "minItems": 1, + "items": { + "$ref": "#/components/schemas/Tool.Content" + } + }, + "metadata": { + "type": "object" + } + }, + "required": ["status", "input", "error"], + "additionalProperties": false + }, + "Session.Message.ToolState.Running": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["running"] + }, + "input": { + "type": "object" + }, + "metadata": { + "type": "object" + } + }, + "required": ["status", "input", "metadata"], + "additionalProperties": false + }, + "Session.Message.ToolState.Streaming": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["streaming"] + }, + "input": { + "type": "string" + } + }, + "required": ["status", "input"], + "additionalProperties": false + }, + "Session.Message.User": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + }, + "text": { + "type": "string" + }, + "files": { + "$ref": "#/components/schemas/Arrays_042d796a7901" + }, + "agents": { + "$ref": "#/components/schemas/Arrays_e1027de4b984" + }, + "skills": { + "$ref": "#/components/schemas/Arrays_92aa8803e81f" + }, + "type": { + "type": "string", + "enum": ["user"] + } + }, + "required": ["id", "time", "text", "type"], + "additionalProperties": false + }, + "Session.Revert": { + "type": "object", + "properties": { + "messageID": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "partID": { + "type": "string" + }, + "snapshot": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FileDiff.Info" + } + } + }, + "required": ["messageID"], + "additionalProperties": false + }, + "Session.StructuredError": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer", + "allOf": [ + { + "minimum": 100, + "maximum": 599 + } + ] + } + }, + "required": ["type", "message"], + "additionalProperties": false + }, + "SessionActive": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["running"] + } + }, + "required": ["type"], + "additionalProperties": false + }, + "SessionBusyErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["SessionBusyError"] + }, + "sessionID": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "sessionID", "message"], + "additionalProperties": false + }, + "SessionGenerateResponse": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "text": { + "type": "string" + } + }, + "required": ["text"], + "additionalProperties": false + } + }, + "required": ["data"], + "additionalProperties": false + }, + "SessionLogItemEncoded": { + "type": "string", + "contentMediaType": "application/json" + }, + "SessionMessagesResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Session.Message.Info" + } + }, + "cursor": { + "type": "object", + "properties": { + "previous": { + "$ref": "#/components/schemas/Union_f090cb615c84" + }, + "next": { + "$ref": "#/components/schemas/Union_f090cb615c84" + } + }, + "additionalProperties": false + } + }, + "required": ["data", "cursor"], + "additionalProperties": false + }, + "SessionNotFoundErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["SessionNotFoundError"] + }, + "sessionID": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "sessionID", "message"], + "additionalProperties": false + }, + "SessionTransfer.Data": { + "type": "object", + "properties": { + "info": { + "$ref": "#/components/schemas/Session.Info" + }, + "messages": { + "$ref": "#/components/schemas/Arrays_fa246a9267ec" + } + }, + "required": ["info", "messages"], + "additionalProperties": false + }, + "SessionsResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Session.Info" + } + }, + "cursor": { + "type": "object", + "properties": { + "previous": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "next": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + }, + "required": ["data", "cursor"], + "additionalProperties": false + }, + "Shell.Info": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^sh_" + } + ] + }, + "status": { + "$ref": "#/components/schemas/Union_b6d68a8b3572" + }, + "command": { + "type": "string" + }, + "cwd": { + "type": "string" + }, + "shell": { + "type": "string" + }, + "file": { + "type": "string" + }, + "pid": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "exit": { + "type": "number" + }, + "metadata": { + "type": "object" + }, + "time": { + "type": "object", + "properties": { + "started": { + "type": "number" + }, + "completed": { + "type": "number" + } + }, + "required": ["started"], + "additionalProperties": false + } + }, + "required": ["id", "status", "command", "cwd", "shell", "file", "metadata", "time"], + "additionalProperties": false + }, + "ShellNotFoundErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["ShellNotFoundError"] + }, + "id": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "id", "message"], + "additionalProperties": false + }, + "Skill.Info": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "slash": { + "type": "boolean" + }, + "autoinvoke": { + "type": "boolean" + }, + "location": { + "type": "string" + }, + "content": { + "type": "string" + } + }, + "required": ["id", "name", "location", "content"], + "additionalProperties": false + }, + "SkillNotFoundErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["SkillNotFoundError"] + }, + "skill": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "skill", "message"], + "additionalProperties": false + }, + "TokenUsage.Info": { + "type": "object", + "properties": { + "input": { + "type": "number" + }, + "output": { + "type": "number" + }, + "reasoning": { + "type": "number" + }, + "cache": { + "type": "object", + "properties": { + "read": { + "type": "number" + }, + "write": { + "type": "number" + } + }, + "required": ["read", "write"], + "additionalProperties": false + } + }, + "required": ["input", "output", "reasoning", "cache"], + "additionalProperties": false + }, + "Tool.Content": { + "anyOf": [ + { + "$ref": "#/components/schemas/Tool.TextContent" + }, + { + "$ref": "#/components/schemas/Tool.FileContent" + } + ] + }, + "Tool.FileContent": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["file"] + }, + "uri": { + "type": "string" + }, + "mime": { + "type": "string" + }, + "name": { + "$ref": "#/components/schemas/Union_f090cb615c84" + } + }, + "required": ["type", "uri", "mime"], + "additionalProperties": false + }, + "Tool.TextContent": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["text"] + }, + "text": { + "type": "string" + } + }, + "required": ["type", "text"], + "additionalProperties": false + }, + "UnauthorizedErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["UnauthorizedError"] + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "message"], + "additionalProperties": false + }, + "Union_00be4ed53f19": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/components/schemas/Union_97d8d2942510" + } + ] + }, + "Union_1f50b1b03235": { + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Inbox.Delivery" + }, + { + "type": "null" + } + ] + }, + "Union_5ee94d3ca88d": { + "anyOf": [ + { + "$ref": "#/components/schemas/Location.Ref" + }, + { + "type": "null" + } + ] + }, + "Union_636af7bc29f5": { + "anyOf": [ + { + "$ref": "#/components/schemas/Form.Answer" + }, + { + "type": "null" + } + ] + }, + "Union_6a162d0a021d": { + "anyOf": [ + { + "$ref": "#/components/schemas/Model.Ref" + }, + { + "type": "null" + } + ] + }, + "Union_6a1762611a44": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] + }, + "Union_85ca62cf1a33": { + "anyOf": [ + { + "type": "string", + "allOf": [ + { + "pattern": "^[^/#]+\\/[^#]+(?:#[^#]+)?$" + } + ] + }, + { + "type": "object", + "properties": { + "providerID": { + "type": "string", + "allOf": [ + { + "pattern": "^[^/#]+$" + } + ] + }, + "model": { + "type": "string", + "allOf": [ + { + "pattern": "^[^#]+$" + } + ] + }, + "variant": { + "type": "string", + "allOf": [ + { + "pattern": "^[^#]+$" + } + ] + } + }, + "required": ["providerID", "model"], + "additionalProperties": false + } + ] + }, + "Union_97d8d2942510": { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + }, + "Union_b6d68a8b3572": { + "type": "string", + "enum": ["running", "exited", "timeout", "killed"] + }, + "Union_e13209ef6bf4": { + "anyOf": [ + { + "type": "string", + "enum": ["true", "false"] + }, + { + "type": "null" + } + ] + }, + "Union_f090cb615c84": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "Union_f8b4c9e24aa0": { + "anyOf": [ + { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + { + "type": "null" + } + ] + }, + "Union_ffefb7e3c81d": { + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "$ref": "#/components/schemas/Union_f090cb615c84" + }, + "workspace": { + "$ref": "#/components/schemas/Union_f090cb615c84" + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] + }, + "UnknownErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["UnknownError"] + }, + "message": { + "type": "string" + }, + "ref": { + "$ref": "#/components/schemas/Union_f090cb615c84" + } + }, + "required": ["_tag", "message"], + "additionalProperties": false + }, + "V2EventEncoded": { + "type": "string", + "contentMediaType": "application/json" + }, + "Vcs.Branch": { + "type": "object", + "properties": { + "current": { + "type": "string" + }, + "default": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Vcs.FileStatus": { + "type": "object", + "properties": { + "file": { + "type": "string" + }, + "additions": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "deletions": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "status": { + "type": "string", + "enum": ["added", "deleted", "modified"] + } + }, + "required": ["file", "additions", "deletions", "status"], + "additionalProperties": false + }, + "Vcs.Info": { + "type": "object", + "properties": { + "branch": { + "$ref": "#/components/schemas/Vcs.Branch" + } + }, + "required": ["branch"], + "additionalProperties": false + }, + "Vcs.Mode": { + "type": "string", + "enum": ["working", "branch"] + }, + "WebSearch.Provider": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": ["id", "name"], + "additionalProperties": false + }, + "WebSearch.ResponseEncoded": { + "type": "object", + "properties": { + "providerID": { + "type": "string" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WebSearch.Result" + } + } + }, + "required": ["providerID", "results"], + "additionalProperties": false + }, + "WebSearch.Result": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "title": { + "type": "string" + }, + "content": { + "type": "string" + }, + "time": { + "type": "object", + "properties": { + "published": { + "type": "number" + } + }, + "additionalProperties": false + } + }, + "required": ["url", "time"], + "additionalProperties": false + }, + "Worktree.Directory": { + "type": "object", + "properties": { + "directory": { + "type": "string" + }, + "strategy": { + "type": "string" + } + }, + "required": ["directory"], + "additionalProperties": false + }, + "Worktree.Info": { + "type": "object", + "properties": { + "directory": { + "type": "string" + } + }, + "required": ["directory"], + "additionalProperties": false + }, + "Worktree.List": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Worktree.Directory" + } + }, + "WorktreeErrorEncoded": { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": ["WorktreeError"] + }, + "data": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "forceRequired": { + "$ref": "#/components/schemas/Union_6a1762611a44" + } + }, + "required": ["message"], + "additionalProperties": false + } + }, + "required": ["name", "data"], + "additionalProperties": false } }, "securitySchemes": {} diff --git a/packages/protocol/script/generate-openapi.ts b/packages/protocol/script/generate-openapi.ts index a23ecf8a6a4..61c4ddecd11 100644 --- a/packages/protocol/script/generate-openapi.ts +++ b/packages/protocol/script/generate-openapi.ts @@ -2,8 +2,12 @@ import { OpenApi } from "effect/unstable/httpapi" import { format } from "prettier" import { fileURLToPath } from "url" import { ClientApi } from "../src/client.js" +import { stabilizeOpenApi } from "./openapi-stabilize.js" -const document = await format(JSON.stringify(OpenApi.fromApi(ClientApi), null, 2), { parser: "json", printWidth: 120 }) +const document = await format(JSON.stringify(stabilizeOpenApi(OpenApi.fromApi(ClientApi)), null, 2), { + parser: "json", + printWidth: 120, +}) const target = fileURLToPath(new URL("../openapi.json", import.meta.url)) if (process.argv.includes("--check")) { diff --git a/packages/protocol/script/openapi-stabilize.ts b/packages/protocol/script/openapi-stabilize.ts new file mode 100644 index 00000000000..c962ef6a41b --- /dev/null +++ b/packages/protocol/script/openapi-stabilize.ts @@ -0,0 +1,73 @@ +// Effect gives shared anonymous schemas encounter-order names (`Union_3`). Replace those names +// with a hash of their canonical shape and sort components so unrelated additions stay local. +export function stabilizeOpenApi(source: object) { + const document = source as { + components: { schemas: Record } + } + const schemas = document.components.schemas + const reference = (name: string) => `#/components/schemas/${name}` + const families = ["Union", "Objects", "Arrays"].filter((name) => `${name}_` in schemas) + const anonymous = new Map( + Object.keys(schemas) + .filter((name) => families.some((family) => new RegExp(`^${family}_\\d*$`).test(name))) + .map((name) => [name, schemas[name]]), + ) + + const canonical = (node: unknown, seen = new Set()): unknown => { + if (Array.isArray(node)) return node.map((item) => canonical(item, seen)) + if (typeof node !== "object" || node === null) return node + const $ref = "$ref" in node && typeof node.$ref === "string" ? node.$ref : undefined + const name = $ref?.startsWith(reference("")) ? $ref.slice(reference("").length) : undefined + if (name !== undefined && anonymous.has(name)) { + if (seen.has(name)) throw new Error(`Recursive anonymous OpenAPI component: ${name}`) + return Object.fromEntries([ + ["$ref", canonical(anonymous.get(name), new Set([...seen, name]))], + ...Object.entries(node) + .filter(([key]) => key !== "$ref") + .sort(([left], [right]) => (left < right ? -1 : left > right ? 1 : 0)) + .map(([key, value]) => [key, canonical(value, seen)]), + ]) + } + return Object.fromEntries( + Object.entries(node) + .sort(([left], [right]) => (left < right ? -1 : left > right ? 1 : 0)) + .map(([key, value]) => [key, canonical(value, seen)]), + ) + } + const renames = new Map( + [...anonymous].map(([name, schema]) => { + const hash = new Bun.CryptoHasher("sha256") + .update(JSON.stringify(canonical(schema))) + .digest("hex") + .slice(0, 12) + return [name, `${name.replace(/_\d*$/, "")}_${hash}`] as const + }), + ) + const rewrite = (node: unknown): unknown => { + if (Array.isArray(node)) return node.map(rewrite) + if (typeof node !== "object" || node === null) return node + return Object.fromEntries( + Object.entries(node).map(([key, value]) => { + if (key !== "$ref" || typeof value !== "string" || !value.startsWith(reference(""))) { + return [key, rewrite(value)] + } + const name = value.slice(reference("").length) + return [key, reference(renames.get(name) ?? name)] + }), + ) + } + const result = rewrite(document) as typeof document + const stable = new Map() + for (const [name, schema] of Object.entries(result.components.schemas)) { + const target = renames.get(name) ?? name + const previous = stable.get(target) + if (previous !== undefined && JSON.stringify(canonical(previous)) !== JSON.stringify(canonical(schema))) { + throw new Error(`Content-addressed OpenAPI component collision: ${target}`) + } + stable.set(target, schema) + } + result.components.schemas = Object.fromEntries( + [...stable].sort(([left], [right]) => (left < right ? -1 : left > right ? 1 : 0)), + ) + return result +} diff --git a/packages/protocol/test/openapi-stabilize.test.ts b/packages/protocol/test/openapi-stabilize.test.ts new file mode 100644 index 00000000000..4532b8f0051 --- /dev/null +++ b/packages/protocol/test/openapi-stabilize.test.ts @@ -0,0 +1,77 @@ +import { expect, test } from "bun:test" +import { stabilizeOpenApi } from "../script/openapi-stabilize.js" + +test("content-addresses anonymous components without changing reference siblings", () => { + const result = stabilizeOpenApi({ + components: { + schemas: { + Union_: { anyOf: [{ type: "string" }, { type: "null" }] }, + Union_2: { type: "number" }, + OAuth_2: { type: "string" }, + }, + }, + paths: { + "/test": { + schema: { $ref: "#/components/schemas/Union_", description: "nullable value" }, + }, + }, + }) as { + components: { schemas: Record } + paths: { "/test": { schema: { $ref: string; description: string } } } + } + + expect(result.paths["/test"].schema.description).toBe("nullable value") + expect(result.paths["/test"].schema.$ref).toMatch(/^#\/components\/schemas\/Union_[a-f0-9]{12}$/) + expect(result.components.schemas.OAuth_2).toEqual({ type: "string" }) +}) + +test("keeps anonymous names stable across encounter order and nested ordinals", () => { + const generate = (nested: string, parent: string) => + stabilizeOpenApi({ + components: { + schemas: { + Union_: { type: "boolean" }, + Arrays_: { type: "array", items: { type: "boolean" } }, + [parent]: { type: "array", items: { $ref: `#/components/schemas/${nested}` } }, + [nested]: { type: "string" }, + }, + }, + }) as { components: { schemas: Record } } + + expect(generate("Union_1", "Arrays_2")).toEqual(generate("Union_9", "Arrays_7")) +}) + +test("merges structurally identical anonymous components", () => { + const result = stabilizeOpenApi({ + components: { + schemas: { + Union_: { type: "string" }, + Union_2: { type: "string" }, + }, + }, + }) as { components: { schemas: Record } } + + expect(Object.keys(result.components.schemas)).toHaveLength(1) +}) + +test("includes reference siblings in anonymous component hashes", () => { + const result = stabilizeOpenApi({ + components: { + schemas: { + Union_: { type: "string" }, + Arrays_: { type: "array", items: { $ref: "#/components/schemas/Union_", description: "first" } }, + Arrays_2: { type: "array", items: { $ref: "#/components/schemas/Union_", description: "second" } }, + }, + }, + }) as { components: { schemas: Record } } + + expect(Object.keys(result.components.schemas).filter((name) => name.startsWith("Arrays_"))).toHaveLength(2) +}) + +test("preserves authored synthetic-looking names without an anonymous family root", () => { + const result = stabilizeOpenApi({ + components: { schemas: { Union_2: { type: "string" } } }, + }) as { components: { schemas: Record } } + + expect(result.components.schemas.Union_2).toEqual({ type: "string" }) +}) diff --git a/packages/schema/src/session-status-event.ts b/packages/schema/src/session-status-event.ts index 03e69402159..da37144d2e8 100644 --- a/packages/schema/src/session-status-event.ts +++ b/packages/schema/src/session-status-event.ts @@ -34,6 +34,8 @@ export type Info = Schema.Schema.Type export const Status = Event.ephemeral({ type: "session.status", + // The bare SessionStatus identifier belongs to the status union above. + identifier: "SessionStatusUpdated", schema: { sessionID: SessionID, status: Info, diff --git a/packages/www/openapi.json b/packages/www/openapi.json index c30875e4ad6..2a0a4ab9435 100644 --- a/packages/www/openapi.json +++ b/packages/www/openapi.json @@ -109,7 +109,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -162,7 +162,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -236,7 +236,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -309,7 +309,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -428,7 +428,7 @@ "name": "search", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_" + "$ref": "#/components/schemas/Union_f090cb615c84" }, "required": false }, @@ -637,16 +637,16 @@ ] }, "title": { - "$ref": "#/components/schemas/Union_" + "$ref": "#/components/schemas/Union_f090cb615c84" }, "agent": { - "$ref": "#/components/schemas/Union_2" + "$ref": "#/components/schemas/Union_f090cb615c84" }, "model": { - "$ref": "#/components/schemas/Union_3" + "$ref": "#/components/schemas/Union_6a162d0a021d" }, "location": { - "$ref": "#/components/schemas/Union_4" + "$ref": "#/components/schemas/Union_5ee94d3ca88d" } }, "additionalProperties": false @@ -724,10 +724,10 @@ "$ref": "#/components/schemas/Session.Info" }, "messages": { - "$ref": "#/components/schemas/Arrays_" + "$ref": "#/components/schemas/Arrays_fa246a9267ec" }, "location": { - "$ref": "#/components/schemas/Union_4" + "$ref": "#/components/schemas/Union_5ee94d3ca88d" } }, "required": ["info", "messages"], @@ -761,7 +761,7 @@ "name": "sanitize", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_7" + "$ref": "#/components/schemas/Union_e13209ef6bf4" }, "required": false } @@ -1459,7 +1459,7 @@ ] }, "delivery": { - "$ref": "#/components/schemas/Union_8" + "$ref": "#/components/schemas/Union_1f50b1b03235" } }, "required": ["directory"], @@ -1573,28 +1573,28 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/Union_9" + "$ref": "#/components/schemas/Union_f8b4c9e24aa0" }, "text": { "type": "string" }, "files": { - "$ref": "#/components/schemas/Arrays_4" + "$ref": "#/components/schemas/Arrays_3ff7cb2a474f" }, "agents": { - "$ref": "#/components/schemas/Arrays_5" + "$ref": "#/components/schemas/Arrays_e1027de4b984" }, "skills": { - "$ref": "#/components/schemas/Arrays_6" + "$ref": "#/components/schemas/Arrays_c17502465996" }, "metadata": { - "$ref": "#/components/schemas/Objects_3" + "$ref": "#/components/schemas/Objects_a2c799262a3c" }, "delivery": { - "$ref": "#/components/schemas/Union_8" + "$ref": "#/components/schemas/Union_1f50b1b03235" }, "resume": { - "$ref": "#/components/schemas/Union_10" + "$ref": "#/components/schemas/Union_6a1762611a44" } }, "required": ["text"], @@ -1721,34 +1721,34 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/Union_9" + "$ref": "#/components/schemas/Union_f8b4c9e24aa0" }, "command": { "type": "string" }, "arguments": { - "$ref": "#/components/schemas/Union_" + "$ref": "#/components/schemas/Union_f090cb615c84" }, "agent": { - "$ref": "#/components/schemas/Union_2" + "$ref": "#/components/schemas/Union_f090cb615c84" }, "model": { - "$ref": "#/components/schemas/Union_3" + "$ref": "#/components/schemas/Union_6a162d0a021d" }, "files": { - "$ref": "#/components/schemas/Arrays_4" + "$ref": "#/components/schemas/Arrays_3ff7cb2a474f" }, "agents": { - "$ref": "#/components/schemas/Arrays_5" + "$ref": "#/components/schemas/Arrays_e1027de4b984" }, "skills": { - "$ref": "#/components/schemas/Arrays_6" + "$ref": "#/components/schemas/Arrays_c17502465996" }, "delivery": { - "$ref": "#/components/schemas/Union_8" + "$ref": "#/components/schemas/Union_1f50b1b03235" }, "resume": { - "$ref": "#/components/schemas/Union_10" + "$ref": "#/components/schemas/Union_6a1762611a44" } }, "required": ["command"], @@ -1834,13 +1834,13 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/Union_9" + "$ref": "#/components/schemas/Union_f8b4c9e24aa0" }, "skill": { "type": "string" }, "resume": { - "$ref": "#/components/schemas/Union_10" + "$ref": "#/components/schemas/Union_6a1762611a44" } }, "required": ["skill"], @@ -1947,22 +1947,22 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/Union_9" + "$ref": "#/components/schemas/Union_f8b4c9e24aa0" }, "text": { "type": "string" }, "description": { - "$ref": "#/components/schemas/Union_" + "$ref": "#/components/schemas/Union_f090cb615c84" }, "metadata": { - "$ref": "#/components/schemas/Objects_" + "$ref": "#/components/schemas/Objects_a2c799262a3c" }, "delivery": { - "$ref": "#/components/schemas/Union_8" + "$ref": "#/components/schemas/Union_1f50b1b03235" }, "resume": { - "$ref": "#/components/schemas/Union_10" + "$ref": "#/components/schemas/Union_6a1762611a44" } }, "required": ["text"], @@ -2167,10 +2167,10 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/Union_9" + "$ref": "#/components/schemas/Union_f8b4c9e24aa0" }, "delivery": { - "$ref": "#/components/schemas/Union_8" + "$ref": "#/components/schemas/Union_1f50b1b03235" } }, "additionalProperties": false @@ -2373,7 +2373,7 @@ ] }, "files": { - "$ref": "#/components/schemas/Union_10" + "$ref": "#/components/schemas/Union_6a1762611a44" } }, "required": ["messageID"], @@ -3344,7 +3344,7 @@ "name": "follow", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_7" + "$ref": "#/components/schemas/Union_e13209ef6bf4" }, "required": false } @@ -3499,7 +3499,7 @@ "name": "continue", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_7" + "$ref": "#/components/schemas/Union_e13209ef6bf4" }, "required": false } @@ -4011,7 +4011,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4087,7 +4087,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4167,7 +4167,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4236,7 +4236,7 @@ "type": "string" }, "model": { - "$ref": "#/components/schemas/Union_3" + "$ref": "#/components/schemas/Union_6a162d0a021d" } }, "required": ["prompt"], @@ -4257,7 +4257,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4341,7 +4341,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4424,7 +4424,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4498,7 +4498,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4568,7 +4568,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4646,7 +4646,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4698,10 +4698,10 @@ "type": "string" }, "answer": { - "$ref": "#/components/schemas/Union_12" + "$ref": "#/components/schemas/Union_636af7bc29f5" }, "label": { - "$ref": "#/components/schemas/Union_" + "$ref": "#/components/schemas/Union_f090cb615c84" } }, "required": ["key"], @@ -4730,7 +4730,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4799,10 +4799,10 @@ "type": "string" }, "answer": { - "$ref": "#/components/schemas/Union_12" + "$ref": "#/components/schemas/Union_636af7bc29f5" }, "label": { - "$ref": "#/components/schemas/Union_" + "$ref": "#/components/schemas/Union_f090cb615c84" } }, "required": ["methodID"], @@ -4839,7 +4839,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4916,7 +4916,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4978,7 +4978,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5027,7 +5027,7 @@ "type": "object", "properties": { "code": { - "$ref": "#/components/schemas/Union_" + "$ref": "#/components/schemas/Union_f090cb615c84" } }, "additionalProperties": false @@ -5055,7 +5055,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5124,7 +5124,7 @@ "type": "string" }, "label": { - "$ref": "#/components/schemas/Union_" + "$ref": "#/components/schemas/Union_f090cb615c84" } }, "required": ["methodID"], @@ -5161,7 +5161,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5238,7 +5238,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5284,7 +5284,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5358,7 +5358,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5434,7 +5434,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5498,7 +5498,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5562,7 +5562,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5618,7 +5618,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5689,7 +5689,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5758,7 +5758,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5849,7 +5849,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5902,7 +5902,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -6519,7 +6519,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -6806,19 +6806,19 @@ "type": "string" }, "resources": { - "$ref": "#/components/schemas/Arrays_8" + "$ref": "#/components/schemas/Arrays_681004346c78" }, "save": { - "$ref": "#/components/schemas/Arrays_9" + "$ref": "#/components/schemas/Arrays_681004346c78" }, "metadata": { - "$ref": "#/components/schemas/Objects_9" + "$ref": "#/components/schemas/Objects_a2c799262a3c" }, "source": { "$ref": "#/components/schemas/Permission.Source" }, "agent": { - "$ref": "#/components/schemas/Union_2" + "$ref": "#/components/schemas/Union_f090cb615c84" } }, "required": ["action", "resources"], @@ -7097,7 +7097,7 @@ "$ref": "#/components/schemas/Permission.Reply" }, "message": { - "$ref": "#/components/schemas/Union_" + "$ref": "#/components/schemas/Union_f090cb615c84" } }, "required": ["reply"], @@ -7118,7 +7118,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -7172,7 +7172,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -7253,7 +7253,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -7351,7 +7351,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -7417,7 +7417,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -7606,7 +7606,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -7670,7 +7670,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -7780,7 +7780,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -7864,7 +7864,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -7987,7 +7987,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -8056,7 +8056,7 @@ "name": "x-opencode-ticket", "in": "header", "schema": { - "$ref": "#/components/schemas/Union_" + "$ref": "#/components/schemas/Union_f090cb615c84" }, "required": false }, @@ -8064,7 +8064,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -8252,7 +8252,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -8316,7 +8316,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -8423,7 +8423,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -8507,7 +8507,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -8576,7 +8576,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -8684,7 +8684,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -8730,7 +8730,7 @@ "$ref": "#/components/schemas/Location.InfoEncoded" }, "data": { - "$ref": "#/components/schemas/Objects_2" + "$ref": "#/components/schemas/Objects_9d53a00b1efb" } }, "required": ["location", "data"], @@ -8783,7 +8783,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -9102,7 +9102,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -9165,7 +9165,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -9231,7 +9231,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -9363,7 +9363,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -9528,7 +9528,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -9604,7 +9604,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -9704,7 +9704,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -9754,192 +9754,9 @@ }, "components": { "schemas": { - "ServiceHealth": { - "type": "object", - "properties": { - "healthy": { - "type": "boolean", - "enum": [true] - }, - "version": { - "type": "string" - }, - "pid": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - } - }, - "required": ["healthy", "version", "pid"], - "additionalProperties": false - }, - "UnauthorizedErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["UnauthorizedError"] - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "message"], - "additionalProperties": false - }, - "Union_": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "InvalidRequestErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["InvalidRequestError"] - }, - "message": { - "type": "string" - }, - "kind": { - "$ref": "#/components/schemas/Union_" - }, - "field": { - "$ref": "#/components/schemas/Union_" - } - }, - "required": ["_tag", "message"], - "additionalProperties": false - }, - "Union_1": { - "anyOf": [ - { - "type": "object", - "properties": { - "directory": { - "$ref": "#/components/schemas/Union_" - }, - "workspace": { - "$ref": "#/components/schemas/Union_" - } - }, - "additionalProperties": false - }, - { - "type": "null" - } - ] - }, - "Location.InfoEncoded": { - "type": "object", - "properties": { - "directory": { - "type": "string" - }, - "workspaceID": { - "type": "string", - "allOf": [ - { - "pattern": "^wrk" - } - ] - }, - "project": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "directory": { - "type": "string" - }, - "canonical": { - "type": "string" - } - }, - "required": ["id", "directory", "canonical"], - "additionalProperties": false - } - }, - "required": ["directory", "project"], - "additionalProperties": false - }, - "Model.Ref": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "providerID": { - "type": "string" - }, - "variant": { - "type": "string" - } - }, - "required": ["id", "providerID"], - "additionalProperties": false - }, - "Provider.Settings": { - "type": "object" - }, - "Provider.Request": { - "type": "object", - "properties": { - "settings": { - "$ref": "#/components/schemas/Provider.Settings" - }, - "headers": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "body": { - "type": "object" - } - }, - "required": ["settings", "headers", "body"], - "additionalProperties": false - }, "Agent.Color": { "type": "string" }, - "Permission.Effect": { - "type": "string", - "enum": ["allow", "deny", "ask"] - }, - "Permission.Rule": { - "type": "object", - "properties": { - "action": { - "type": "string" - }, - "resource": { - "type": "string" - }, - "effect": { - "$ref": "#/components/schemas/Permission.Effect" - } - }, - "required": ["action", "resource", "effect"], - "additionalProperties": false - }, - "Permission.Ruleset": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Permission.Rule" - } - }, "Agent.Info": { "type": "object", "properties": { @@ -10003,3877 +9820,53 @@ "required": ["_tag", "agentID", "message"], "additionalProperties": false }, - "Plugin.Source": { - "anyOf": [ - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["builtin"] - } - }, - "required": ["type"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["package"] - }, - "package": { - "type": "string" - } - }, - "required": ["type", "package"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["local"] - }, - "path": { - "type": "string" - } - }, - "required": ["type", "path"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["sdk"] - } - }, - "required": ["type"], - "additionalProperties": false - } - ] - }, - "Plugin.Info": { - "anyOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "source": { - "$ref": "#/components/schemas/Plugin.Source" - }, - "status": { - "type": "string", - "enum": ["active"] - }, - "tui": { - "type": "boolean" - } - }, - "required": ["id", "source", "status", "tui"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "source": { - "$ref": "#/components/schemas/Plugin.Source" - }, - "status": { - "type": "string", - "enum": ["failed"] - }, - "error": { - "type": "string" - }, - "tui": { - "type": "boolean" - } - }, - "required": ["source", "status", "error", "tui"], - "additionalProperties": false - } - ] - }, - "Session.ForkBoundary": { - "anyOf": [ - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["before"] - }, - "messageID": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - } - }, - "required": ["type", "messageID"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["through"] - }, - "messageID": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - } - }, - "required": ["type", "messageID"], - "additionalProperties": false - } - ] - }, - "Money.USD": { - "type": "number" - }, - "TokenUsage.Info": { - "type": "object", - "properties": { - "input": { - "type": "number" - }, - "output": { - "type": "number" - }, - "reasoning": { - "type": "number" - }, - "cache": { - "type": "object", - "properties": { - "read": { - "type": "number" - }, - "write": { - "type": "number" - } - }, - "required": ["read", "write"], - "additionalProperties": false - } - }, - "required": ["input", "output", "reasoning", "cache"], - "additionalProperties": false - }, - "Location.Ref": { - "type": "object", - "properties": { - "directory": { - "type": "string" - }, - "workspaceID": { - "type": "string", - "allOf": [ - { - "pattern": "^wrk" - } - ] - } - }, - "required": ["directory"], - "additionalProperties": false - }, - "FileDiff.Info": { - "type": "object", - "properties": { - "file": { - "type": "string" - }, - "patch": { - "type": "string" - }, - "additions": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "deletions": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "status": { - "type": "string", - "enum": ["added", "deleted", "modified"] - } - }, - "required": ["file", "patch", "additions", "deletions", "status"], - "additionalProperties": false - }, - "Session.Revert": { - "type": "object", - "properties": { - "messageID": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "partID": { - "type": "string" - }, - "snapshot": { - "type": "string" - }, - "files": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FileDiff.Info" - } - } - }, - "required": ["messageID"], - "additionalProperties": false - }, - "Session.Info": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] - }, - "parentID": { - "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] - }, - "fork": { - "type": "object", - "properties": { - "sessionID": { - "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] - }, - "boundary": { - "$ref": "#/components/schemas/Session.ForkBoundary" - } - }, - "required": ["sessionID", "boundary"], - "additionalProperties": false - }, - "projectID": { - "type": "string" - }, - "agent": { - "type": "string" - }, - "model": { - "$ref": "#/components/schemas/Model.Ref" - }, - "cost": { - "$ref": "#/components/schemas/Money.USD" - }, - "tokens": { - "$ref": "#/components/schemas/TokenUsage.Info" - }, - "outcome": { - "type": "string", - "enum": ["succeeded", "failed", "interrupted"] - }, - "time": { - "type": "object", - "properties": { - "created": { - "type": "number" - }, - "updated": { - "type": "number" - }, - "idle": { - "type": "number" - }, - "viewed": { - "type": "number" - }, - "archived": { - "type": "number" - } - }, - "required": ["created", "updated"], - "additionalProperties": false - }, - "title": { - "type": "string" - }, - "location": { - "$ref": "#/components/schemas/Location.Ref" - }, - "subpath": { - "type": "string" - }, - "revert": { - "$ref": "#/components/schemas/Session.Revert" - } - }, - "required": ["id", "projectID", "cost", "tokens", "time", "location"], - "additionalProperties": false - }, - "SessionsResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Session.Info" - } - }, - "cursor": { - "type": "object", - "properties": { - "previous": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "next": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "additionalProperties": false - } - }, - "required": ["data", "cursor"], - "additionalProperties": false - }, - "InvalidCursorErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["InvalidCursorError"] - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "message"], - "additionalProperties": false - }, - "Union_2": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "Union_3": { - "anyOf": [ - { - "$ref": "#/components/schemas/Model.Ref" - }, - { - "type": "null" - } - ] - }, - "Union_4": { - "anyOf": [ - { - "$ref": "#/components/schemas/Location.Ref" - }, - { - "type": "null" - } - ] - }, - "Objects_": { - "type": "object" - }, - "Objects_1": { - "type": "object", - "properties": { - "created": { - "type": "number" - } - }, - "required": ["created"], - "additionalProperties": false - }, - "Session.Message.AgentSelected": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "$ref": "#/components/schemas/Objects_1" - }, - "type": { - "type": "string", - "enum": ["agent-switched"] - }, - "agent": { - "type": "string" - }, - "previous": { - "type": "string" - } - }, - "required": ["id", "time", "type", "agent"], - "additionalProperties": false - }, - "Session.Message.ModelSelected": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "$ref": "#/components/schemas/Objects_1" - }, - "type": { - "type": "string", - "enum": ["model-switched"] - }, - "model": { - "$ref": "#/components/schemas/Model.Ref" - }, - "previous": { - "$ref": "#/components/schemas/Model.Ref" - } - }, - "required": ["id", "time", "type", "model"], - "additionalProperties": false - }, - "Session.Message.LocationSwitched": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "$ref": "#/components/schemas/Objects_1" - }, - "type": { - "type": "string", - "enum": ["location-switched"] - }, - "location": { - "$ref": "#/components/schemas/Location.Ref" - }, - "projectID": { - "type": "string" - }, - "subpath": { - "type": "string" - }, - "previous": { - "type": "object", - "properties": { - "location": { - "$ref": "#/components/schemas/Location.Ref" - }, - "projectID": { - "type": "string" - }, - "subpath": { - "type": "string" - } - }, - "required": ["location"], - "additionalProperties": false - } - }, - "required": ["id", "time", "type", "location"], - "additionalProperties": false - }, - "Prompt.Base64": { - "type": "string", - "allOf": [ - { - "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" - } - ] - }, - "Prompt.FileSource": { - "anyOf": [ - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["inline"] - } - }, - "required": ["type"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["uri"] - }, - "uri": { - "type": "string" - } - }, - "required": ["type", "uri"], - "additionalProperties": false - } - ] - }, - "Prompt.Mention": { - "type": "object", - "properties": { - "start": { - "type": "number" - }, - "end": { - "type": "number" - }, - "text": { - "type": "string" - } - }, - "required": ["start", "end", "text"], - "additionalProperties": false - }, - "Prompt.FileAttachment": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/Prompt.Base64" - }, - "mime": { - "type": "string" - }, - "source": { - "$ref": "#/components/schemas/Prompt.FileSource" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "mention": { - "$ref": "#/components/schemas/Prompt.Mention" - } - }, - "required": ["data", "mime", "source"], - "additionalProperties": false - }, - "Arrays_1": { + "Arrays_042d796a7901": { "type": "array", "items": { "$ref": "#/components/schemas/Prompt.FileAttachment" } }, - "Prompt.AgentAttachment": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "mention": { - "$ref": "#/components/schemas/Prompt.Mention" - } - }, - "required": ["name"], - "additionalProperties": false - }, - "Arrays_2": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Prompt.AgentAttachment" - } - }, - "Prompt.SkillAttachment": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "mention": { - "$ref": "#/components/schemas/Prompt.Mention" - } - }, - "required": ["id", "name"], - "additionalProperties": false - }, - "Arrays_3": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Prompt.SkillAttachment" - } - }, - "Session.Message.User": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "$ref": "#/components/schemas/Objects_1" - }, - "text": { - "type": "string" - }, - "files": { - "$ref": "#/components/schemas/Arrays_1" - }, - "agents": { - "$ref": "#/components/schemas/Arrays_2" - }, - "skills": { - "$ref": "#/components/schemas/Arrays_3" - }, - "type": { - "type": "string", - "enum": ["user"] - } - }, - "required": ["id", "time", "text", "type"], - "additionalProperties": false - }, - "Session.Message.Synthetic": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "$ref": "#/components/schemas/Objects_1" - }, - "text": { - "type": "string" - }, - "description": { - "type": "string" - }, - "type": { - "type": "string", - "enum": ["synthetic"] - } - }, - "required": ["id", "time", "text", "type"], - "additionalProperties": false - }, - "Session.Message.System": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "$ref": "#/components/schemas/Objects_1" - }, - "type": { - "type": "string", - "enum": ["system"] - }, - "text": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "required": ["id", "time", "type", "text"], - "additionalProperties": false - }, - "Session.Message.Skill": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "$ref": "#/components/schemas/Objects_1" - }, - "type": { - "type": "string", - "enum": ["skill"] - }, - "skill": { - "type": "string" - }, - "name": { - "type": "string" - }, - "text": { - "type": "string" - } - }, - "required": ["id", "time", "type", "skill", "name", "text"], - "additionalProperties": false - }, - "Union_5": { - "type": "string", - "enum": ["running", "exited", "timeout", "killed"] - }, - "Union_6": { - "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] - }, - "Objects_2": { - "type": "object", - "properties": { - "output": { - "type": "string" - }, - "cursor": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "size": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "truncated": { - "type": "boolean" - } - }, - "required": ["output", "cursor", "size", "truncated"], - "additionalProperties": false - }, - "Session.Message.Shell": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "type": "object", - "properties": { - "created": { - "type": "number" - }, - "completed": { - "type": "number" - } - }, - "required": ["created"], - "additionalProperties": false - }, - "type": { - "type": "string", - "enum": ["shell"] - }, - "shellID": { - "type": "string", - "allOf": [ - { - "pattern": "^sh_" - } - ] - }, - "command": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/Union_5" - }, - "exit": { - "anyOf": [ - { - "type": "number" - }, - { - "$ref": "#/components/schemas/Union_6" - } - ] - }, - "output": { - "$ref": "#/components/schemas/Objects_2" - } - }, - "required": ["id", "time", "type", "shellID", "command", "status"], - "additionalProperties": false - }, - "Session.Message.ProviderState": { - "type": "object" - }, - "Session.Message.Assistant.Text": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["text"] - }, - "text": { - "type": "string" - }, - "state": { - "$ref": "#/components/schemas/Session.Message.ProviderState" - } - }, - "required": ["type", "text"], - "additionalProperties": false - }, - "Session.Message.ProviderState_1": { - "type": "object" - }, - "Session.Message.Assistant.Reasoning": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["reasoning"] - }, - "text": { - "type": "string" - }, - "state": { - "$ref": "#/components/schemas/Session.Message.ProviderState_1" - }, - "time": { - "type": "object", - "properties": { - "created": { - "type": "number" - }, - "completed": { - "type": "number" - } - }, - "required": ["created"], - "additionalProperties": false - } - }, - "required": ["type", "text"], - "additionalProperties": false - }, - "Session.Message.ProviderState_2": { - "type": "object" - }, - "Session.Message.ProviderState_3": { - "type": "object" - }, - "Session.Message.ToolState.Streaming": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["streaming"] - }, - "input": { - "type": "string" - } - }, - "required": ["status", "input"], - "additionalProperties": false - }, - "Session.Message.ToolState.Running": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["running"] - }, - "input": { - "type": "object" - }, - "metadata": { - "type": "object" - } - }, - "required": ["status", "input", "metadata"], - "additionalProperties": false - }, - "Tool.TextContent": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["text"] - }, - "text": { - "type": "string" - } - }, - "required": ["type", "text"], - "additionalProperties": false - }, - "Tool.FileContent": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["file"] - }, - "uri": { - "type": "string" - }, - "mime": { - "type": "string" - }, - "name": { - "$ref": "#/components/schemas/Union_" - } - }, - "required": ["type", "uri", "mime"], - "additionalProperties": false - }, - "Tool.Content": { - "anyOf": [ - { - "$ref": "#/components/schemas/Tool.TextContent" - }, - { - "$ref": "#/components/schemas/Tool.FileContent" - } - ] - }, - "Session.Message.ToolState.Completed": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["completed"] - }, - "input": { - "type": "object" - }, - "content": { - "type": "array", - "prefixItems": [ - { - "$ref": "#/components/schemas/Tool.Content" - } - ], - "minItems": 1, - "items": { - "$ref": "#/components/schemas/Tool.Content" - } - }, - "metadata": { - "type": "object" - } - }, - "required": ["status", "input", "content"], - "additionalProperties": false - }, - "Session.StructuredError": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "message": { - "type": "string" - }, - "status": { - "type": "integer", - "allOf": [ - { - "minimum": 100, - "maximum": 599 - } - ] - } - }, - "required": ["type", "message"], - "additionalProperties": false - }, - "Session.Message.ToolState.Error": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["error"] - }, - "input": { - "type": "object" - }, - "error": { - "$ref": "#/components/schemas/Session.StructuredError" - }, - "content": { - "type": "array", - "prefixItems": [ - { - "$ref": "#/components/schemas/Tool.Content" - } - ], - "minItems": 1, - "items": { - "$ref": "#/components/schemas/Tool.Content" - } - }, - "metadata": { - "type": "object" - } - }, - "required": ["status", "input", "error"], - "additionalProperties": false - }, - "Session.Message.Assistant.Tool": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["tool"] - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "executed": { - "type": "boolean" - }, - "providerState": { - "$ref": "#/components/schemas/Session.Message.ProviderState_2" - }, - "providerResultState": { - "$ref": "#/components/schemas/Session.Message.ProviderState_3" - }, - "state": { - "anyOf": [ - { - "$ref": "#/components/schemas/Session.Message.ToolState.Streaming" - }, - { - "$ref": "#/components/schemas/Session.Message.ToolState.Running" - }, - { - "$ref": "#/components/schemas/Session.Message.ToolState.Completed" - }, - { - "$ref": "#/components/schemas/Session.Message.ToolState.Error" - } - ] - }, - "time": { - "type": "object", - "properties": { - "created": { - "type": "number" - }, - "ran": { - "type": "number" - }, - "completed": { - "type": "number" - } - }, - "required": ["created"], - "additionalProperties": false - } - }, - "required": ["type", "id", "name", "state", "time"], - "additionalProperties": false - }, - "Session.Message.ProviderState_4": { - "type": "object" - }, - "Session.Message.Assistant.Retry": { - "type": "object", - "properties": { - "attempt": { - "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] - }, - "at": { - "type": "number" - }, - "error": { - "$ref": "#/components/schemas/Session.StructuredError" - } - }, - "required": ["attempt", "at", "error"], - "additionalProperties": false - }, - "Session.Message.Assistant": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "type": "object", - "properties": { - "created": { - "type": "number" - }, - "completed": { - "type": "number" - } - }, - "required": ["created"], - "additionalProperties": false - }, - "type": { - "type": "string", - "enum": ["assistant"] - }, - "agent": { - "type": "string" - }, - "model": { - "$ref": "#/components/schemas/Model.Ref" - }, - "content": { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/Session.Message.Assistant.Text" - }, - { - "$ref": "#/components/schemas/Session.Message.Assistant.Reasoning" - }, - { - "$ref": "#/components/schemas/Session.Message.Assistant.Tool" - } - ] - } - }, - "snapshot": { - "type": "object", - "properties": { - "start": { - "type": "string" - }, - "end": { - "type": "string" - }, - "files": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "finish": { - "type": "string", - "enum": ["stop", "length", "tool-calls", "content-filter", "error", "unknown"] - }, - "rawFinish": { - "type": "string" - }, - "providerState": { - "$ref": "#/components/schemas/Session.Message.ProviderState_4" - }, - "cost": { - "$ref": "#/components/schemas/Money.USD" - }, - "tokens": { - "$ref": "#/components/schemas/TokenUsage.Info" - }, - "error": { - "$ref": "#/components/schemas/Session.StructuredError" - }, - "retry": { - "$ref": "#/components/schemas/Session.Message.Assistant.Retry" - } - }, - "required": ["id", "time", "type", "agent", "model", "content"], - "additionalProperties": false - }, - "Session.Message.Compaction.Running": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["compaction"] - }, - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "$ref": "#/components/schemas/Objects_1" - }, - "status": { - "type": "string", - "enum": ["running"] - }, - "reason": { - "type": "string", - "enum": ["auto", "manual"] - }, - "summary": { - "type": "string" - }, - "recent": { - "type": "string" - } - }, - "required": ["type", "id", "time", "status", "reason", "summary", "recent"], - "additionalProperties": false - }, - "Session.Message.Compaction.Completed": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["compaction"] - }, - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "$ref": "#/components/schemas/Objects_1" - }, - "status": { - "type": "string", - "enum": ["completed"] - }, - "reason": { - "type": "string", - "enum": ["auto", "manual"] - }, - "summary": { - "type": "string" - }, - "recent": { - "type": "string" - } - }, - "required": ["type", "id", "time", "status", "reason", "summary", "recent"], - "additionalProperties": false - }, - "Session.Message.Compaction.Failed": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["compaction"] - }, - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "$ref": "#/components/schemas/Objects_1" - }, - "status": { - "type": "string", - "enum": ["failed"] - }, - "reason": { - "type": "string", - "enum": ["auto", "manual"] - }, - "error": { - "$ref": "#/components/schemas/Session.StructuredError" - } - }, - "required": ["type", "id", "time", "status", "reason", "error"], - "additionalProperties": false - }, - "Session.Message.Compaction": { - "anyOf": [ - { - "$ref": "#/components/schemas/Session.Message.Compaction.Running" - }, - { - "$ref": "#/components/schemas/Session.Message.Compaction.Completed" - }, - { - "$ref": "#/components/schemas/Session.Message.Compaction.Failed" - } - ] - }, - "Session.Message.Info": { - "anyOf": [ - { - "$ref": "#/components/schemas/Session.Message.AgentSelected" - }, - { - "$ref": "#/components/schemas/Session.Message.ModelSelected" - }, - { - "$ref": "#/components/schemas/Session.Message.LocationSwitched" - }, - { - "$ref": "#/components/schemas/Session.Message.User" - }, - { - "$ref": "#/components/schemas/Session.Message.Synthetic" - }, - { - "$ref": "#/components/schemas/Session.Message.System" - }, - { - "$ref": "#/components/schemas/Session.Message.Skill" - }, - { - "$ref": "#/components/schemas/Session.Message.Shell" - }, - { - "$ref": "#/components/schemas/Session.Message.Assistant" - }, - { - "$ref": "#/components/schemas/Session.Message.Compaction" - } - ] - }, - "Arrays_": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Session.Message.Info" - } - }, - "ConflictErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["ConflictError"] - }, - "message": { - "type": "string" - }, - "resource": { - "$ref": "#/components/schemas/Union_" - } - }, - "required": ["_tag", "message"], - "additionalProperties": false - }, - "Union_7": { - "anyOf": [ - { - "type": "string", - "enum": ["true", "false"] - }, - { - "type": "null" - } - ] - }, - "SessionTransfer.Data": { - "type": "object", - "properties": { - "info": { - "$ref": "#/components/schemas/Session.Info" - }, - "messages": { - "$ref": "#/components/schemas/Arrays_" - } - }, - "required": ["info", "messages"], - "additionalProperties": false - }, - "SessionNotFoundErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["SessionNotFoundError"] - }, - "sessionID": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "sessionID", "message"], - "additionalProperties": false - }, - "UnknownErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["UnknownError"] - }, - "message": { - "type": "string" - }, - "ref": { - "$ref": "#/components/schemas/Union_" - } - }, - "required": ["_tag", "message"], - "additionalProperties": false - }, - "SessionActive": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["running"] - } - }, - "required": ["type"], - "additionalProperties": false - }, - "Session.ForkRequestBoundary": { - "anyOf": [ - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["before"] - }, - "messageID": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - } - }, - "required": ["type", "messageID"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["through"] - } - }, - "required": ["type"], - "additionalProperties": false - } - ] - }, - "MessageNotFoundErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["MessageNotFoundError"] - }, - "sessionID": { - "type": "string" - }, - "messageID": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "sessionID", "messageID", "message"], - "additionalProperties": false - }, - "Session.Inbox.Delivery": { - "type": "string", - "enum": ["steer", "queue"] - }, - "Union_8": { - "anyOf": [ - { - "$ref": "#/components/schemas/Session.Inbox.Delivery" - }, - { - "type": "null" - } - ] - }, - "Union_9": { - "anyOf": [ - { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - { - "type": "null" - } - ] - }, - "PromptInput.FileAttachment": { - "type": "object", - "properties": { - "uri": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "mention": { - "$ref": "#/components/schemas/Prompt.Mention" - } - }, - "required": ["uri"], - "additionalProperties": false - }, - "Arrays_4": { + "Arrays_3ff7cb2a474f": { "type": "array", "items": { "$ref": "#/components/schemas/PromptInput.FileAttachment" } }, - "Arrays_5": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Prompt.AgentAttachment" - } - }, - "PromptInput.SkillAttachment": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "mention": { - "$ref": "#/components/schemas/Prompt.Mention" - } - }, - "required": ["id"], - "additionalProperties": false - }, - "Arrays_6": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PromptInput.SkillAttachment" - } - }, - "Objects_3": { - "type": "object" - }, - "Union_10": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "Session.Inbox.UserPayload": { - "type": "object", - "properties": { - "text": { - "type": "string" - }, - "files": { - "$ref": "#/components/schemas/Arrays_1" - }, - "agents": { - "$ref": "#/components/schemas/Arrays_2" - }, - "skills": { - "$ref": "#/components/schemas/Arrays_3" - }, - "metadata": { - "$ref": "#/components/schemas/Objects_3" - } - }, - "required": ["text"], - "additionalProperties": false - }, - "Session.Inbox.User": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "sessionID": { - "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] - }, - "timeCreated": { - "type": "number" - }, - "type": { - "type": "string", - "enum": ["user"] - }, - "payload": { - "$ref": "#/components/schemas/Session.Inbox.UserPayload" - }, - "delivery": { - "$ref": "#/components/schemas/Session.Inbox.Delivery" - } - }, - "required": ["id", "sessionID", "timeCreated", "type", "payload", "delivery"], - "additionalProperties": false - }, - "CommandNotFoundErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["CommandNotFoundError"] - }, - "command": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "command", "message"], - "additionalProperties": false - }, - "CommandEvaluationErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["CommandEvaluationError"] - }, - "command": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "command", "message"], - "additionalProperties": false - }, - "SkillNotFoundErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["SkillNotFoundError"] - }, - "skill": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "skill", "message"], - "additionalProperties": false - }, - "Session.Inbox.SyntheticPayload": { - "type": "object", - "properties": { - "text": { - "type": "string" - }, - "description": { - "type": "string" - }, - "metadata": { - "type": "object" - } - }, - "required": ["text"], - "additionalProperties": false - }, - "Session.Inbox.Synthetic": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "sessionID": { - "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] - }, - "timeCreated": { - "type": "number" - }, - "type": { - "type": "string", - "enum": ["synthetic"] - }, - "payload": { - "$ref": "#/components/schemas/Session.Inbox.SyntheticPayload" - }, - "delivery": { - "$ref": "#/components/schemas/Session.Inbox.Delivery" - } - }, - "required": ["id", "sessionID", "timeCreated", "type", "payload", "delivery"], - "additionalProperties": false - }, - "Session.Inbox.CompactionPayload": { - "anyOf": [ - { - "type": "object" - }, - { - "type": "array" - } - ] - }, - "Session.Inbox.Compaction": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "sessionID": { - "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] - }, - "timeCreated": { - "type": "number" - }, - "type": { - "type": "string", - "enum": ["compaction"] - }, - "payload": { - "$ref": "#/components/schemas/Session.Inbox.CompactionPayload" - }, - "delivery": { - "$ref": "#/components/schemas/Session.Inbox.Delivery" - } - }, - "required": ["id", "sessionID", "timeCreated", "type", "payload", "delivery"], - "additionalProperties": false - }, - "ServiceUnavailableErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["ServiceUnavailableError"] - }, - "message": { - "type": "string" - }, - "service": { - "$ref": "#/components/schemas/Union_" - } - }, - "required": ["_tag", "message"], - "additionalProperties": false - }, - "SessionBusyErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["SessionBusyError"] - }, - "sessionID": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "sessionID", "message"], - "additionalProperties": false - }, - "Session.Inbox.MovePayload": { - "type": "object", - "properties": { - "location": { - "$ref": "#/components/schemas/Location.Ref" - }, - "projectID": { - "type": "string" - }, - "subpath": { - "type": "string" - } - }, - "required": ["location", "projectID"], - "additionalProperties": false - }, - "Session.Inbox.Move": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "sessionID": { - "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] - }, - "timeCreated": { - "type": "number" - }, - "type": { - "type": "string", - "enum": ["move"] - }, - "payload": { - "$ref": "#/components/schemas/Session.Inbox.MovePayload" - }, - "delivery": { - "$ref": "#/components/schemas/Session.Inbox.Delivery" - } - }, - "required": ["id", "sessionID", "timeCreated", "type", "payload", "delivery"], - "additionalProperties": false - }, - "Session.Inbox.Info": { - "anyOf": [ - { - "$ref": "#/components/schemas/Session.Inbox.User" - }, - { - "$ref": "#/components/schemas/Session.Inbox.Synthetic" - }, - { - "$ref": "#/components/schemas/Session.Inbox.Compaction" - }, - { - "$ref": "#/components/schemas/Session.Inbox.Move" - } - ] - }, - "InstructionEntry.Key": { - "type": "string", - "allOf": [ - { - "pattern": "^[a-z0-9][a-z0-9._-]*$", - "description": "Instruction entry key (lowercase alphanumerics plus . _ -)" - } - ] - }, - "InstructionEntry.Info": { - "type": "object", - "properties": { - "key": { - "$ref": "#/components/schemas/InstructionEntry.Key" - }, - "value": { - "description": "JSON value attached to the session's instructions" - } - }, - "required": ["key", "value"], - "additionalProperties": false - }, - "InstructionEntryValueTooLargeErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["InstructionEntryValueTooLargeError"] - }, - "actualBytes": { - "type": "integer" - }, - "maxBytes": { - "type": "integer" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "actualBytes", "maxBytes", "message"], - "additionalProperties": false - }, - "SessionGenerateResponse": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "text": { - "type": "string" - } - }, - "required": ["text"], - "additionalProperties": false - } - }, - "required": ["data"], - "additionalProperties": false - }, - "SessionLogItemEncoded": { - "type": "string", - "contentMediaType": "application/json" - }, - "SessionMessagesResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Session.Message.Info" - } - }, - "cursor": { - "type": "object", - "properties": { - "previous": { - "$ref": "#/components/schemas/Union_" - }, - "next": { - "$ref": "#/components/schemas/Union_" - } - }, - "additionalProperties": false - } - }, - "required": ["data", "cursor"], - "additionalProperties": false - }, - "Model.ReasoningField": { - "anyOf": [ - { - "type": "string", - "enum": ["reasoning", "reasoning_content", "reasoning_text"] - }, - { - "type": "string" - } - ] - }, - "Model.MaxTokensField": { - "type": "string", - "enum": ["max_completion_tokens", "max_tokens"] - }, - "Model.Compatibility": { - "type": "object", - "properties": { - "reasoningField": { - "$ref": "#/components/schemas/Model.ReasoningField" - }, - "maxTokensField": { - "$ref": "#/components/schemas/Model.MaxTokensField" - }, - "requireFinishReason": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "Objects_4": { - "type": "object" - }, - "Objects_5": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "Objects_6": { - "type": "object" - }, - "Model.Capabilities": { - "type": "object", - "properties": { - "tools": { - "type": "boolean" - }, - "input": { - "type": "array", - "items": { - "type": "string" - } - }, - "output": { - "type": "array", - "items": { - "type": "string" - } - }, - "responsesWebsockets": { - "type": "boolean" - } - }, - "required": ["tools", "input", "output"], - "additionalProperties": false - }, - "Model.Variant": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "settings": { - "$ref": "#/components/schemas/Objects_4" - }, - "headers": { - "$ref": "#/components/schemas/Objects_5" - }, - "body": { - "$ref": "#/components/schemas/Objects_6" - } - }, - "required": ["id"], - "additionalProperties": false - }, - "Money.USDPerMillionTokens": { - "type": "number" - }, - "Model.Cost": { - "type": "object", - "properties": { - "tier": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["context"] - }, - "size": { - "type": "integer" - } - }, - "required": ["type", "size"], - "additionalProperties": false - }, - "input": { - "$ref": "#/components/schemas/Money.USDPerMillionTokens" - }, - "output": { - "$ref": "#/components/schemas/Money.USDPerMillionTokens" - }, - "cache": { - "type": "object", - "properties": { - "read": { - "$ref": "#/components/schemas/Money.USDPerMillionTokens" - }, - "write": { - "$ref": "#/components/schemas/Money.USDPerMillionTokens" - } - }, - "required": ["read", "write"], - "additionalProperties": false - } - }, - "required": ["input", "output", "cache"], - "additionalProperties": false - }, - "Model.Info": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "modelID": { - "type": "string" - }, - "providerID": { - "type": "string" - }, - "family": { - "type": "string" - }, - "name": { - "type": "string" - }, - "compatibility": { - "$ref": "#/components/schemas/Model.Compatibility" - }, - "package": { - "type": "string" - }, - "settings": { - "$ref": "#/components/schemas/Objects_4" - }, - "headers": { - "$ref": "#/components/schemas/Objects_5" - }, - "body": { - "$ref": "#/components/schemas/Objects_6" - }, - "capabilities": { - "$ref": "#/components/schemas/Model.Capabilities" - }, - "variants": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Model.Variant" - } - }, - "time": { - "type": "object", - "properties": { - "released": { - "type": "number" - } - }, - "required": ["released"], - "additionalProperties": false - }, - "cost": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Model.Cost" - } - }, - "status": { - "type": "string", - "enum": ["alpha", "beta", "deprecated", "active"] - }, - "enabled": { - "type": "boolean" - }, - "limit": { - "type": "object", - "properties": { - "context": { - "type": "integer" - }, - "input": { - "type": "integer" - }, - "output": { - "type": "integer" - } - }, - "required": ["context", "output"], - "additionalProperties": false - } - }, - "required": [ - "id", - "modelID", - "providerID", - "name", - "capabilities", - "variants", - "time", - "cost", - "status", - "enabled", - "limit" - ], - "additionalProperties": false - }, - "GenerateTextResponse": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "text": { - "type": "string" - } - }, - "required": ["text"], - "additionalProperties": false - } - }, - "required": ["data"], - "additionalProperties": false - }, - "Provider.Info": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "integrationID": { - "type": "string" - }, - "name": { - "type": "string" - }, - "activation": { - "type": "string", - "enum": ["auto", "enabled", "disabled"] - }, - "package": { - "type": "string" - }, - "settings": { - "$ref": "#/components/schemas/Objects_4" - }, - "headers": { - "$ref": "#/components/schemas/Objects_5" - }, - "body": { - "$ref": "#/components/schemas/Objects_6" - } - }, - "required": ["id", "name", "activation", "package"], - "additionalProperties": false - }, - "ProviderNotFoundErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["ProviderNotFoundError"] - }, - "providerID": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "providerID", "message"], - "additionalProperties": false - }, - "Union_11": { - "anyOf": [ - { - "type": "number" - }, - { - "$ref": "#/components/schemas/Union_6" - } - ] - }, - "Form.When": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "op": { - "type": "string", - "enum": ["eq", "neq"] - }, - "value": { - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/Union_11" - }, - { - "type": "boolean" - } - ] - } - }, - "required": ["key", "op", "value"], - "additionalProperties": false - }, - "Arrays_7": { + "Arrays_4df8e9fdc8e1": { "type": "array", "items": { "$ref": "#/components/schemas/Form.When" } }, - "Form.Option": { - "type": "object", - "properties": { - "value": { - "type": "string" - }, - "label": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "required": ["value", "label"], - "additionalProperties": false - }, - "Form.StringField": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "required": { - "type": "boolean" - }, - "when": { - "$ref": "#/components/schemas/Arrays_7" - }, - "type": { - "type": "string", - "enum": ["string"] - }, - "format": { - "type": "string", - "enum": ["email", "uri", "date", "date-time"] - }, - "minLength": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "maxLength": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "pattern": { - "type": "string" - }, - "placeholder": { - "type": "string" - }, - "default": { - "type": "string" - }, - "options": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Form.Option" - } - }, - "custom": { - "type": "boolean" - } - }, - "required": ["key", "type"], - "additionalProperties": false - }, - "Form.NumberField": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "required": { - "type": "boolean" - }, - "when": { - "$ref": "#/components/schemas/Arrays_7" - }, - "type": { - "type": "string", - "enum": ["number"] - }, - "minimum": { - "anyOf": [ - { - "type": "number" - }, - { - "$ref": "#/components/schemas/Union_6" - } - ] - }, - "maximum": { - "anyOf": [ - { - "type": "number" - }, - { - "$ref": "#/components/schemas/Union_6" - } - ] - }, - "default": { - "anyOf": [ - { - "type": "number" - }, - { - "$ref": "#/components/schemas/Union_6" - } - ] - } - }, - "required": ["key", "type"], - "additionalProperties": false - }, - "Form.IntegerField": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "required": { - "type": "boolean" - }, - "when": { - "$ref": "#/components/schemas/Arrays_7" - }, - "type": { - "type": "string", - "enum": ["integer"] - }, - "minimum": { - "anyOf": [ - { - "type": "number" - }, - { - "$ref": "#/components/schemas/Union_6" - } - ] - }, - "maximum": { - "anyOf": [ - { - "type": "number" - }, - { - "$ref": "#/components/schemas/Union_6" - } - ] - }, - "default": { - "anyOf": [ - { - "type": "number" - }, - { - "$ref": "#/components/schemas/Union_6" - } - ] - } - }, - "required": ["key", "type"], - "additionalProperties": false - }, - "Form.BooleanField": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "required": { - "type": "boolean" - }, - "when": { - "$ref": "#/components/schemas/Arrays_7" - }, - "type": { - "type": "string", - "enum": ["boolean"] - }, - "default": { - "type": "boolean" - } - }, - "required": ["key", "type"], - "additionalProperties": false - }, - "Form.MultiselectField": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "required": { - "type": "boolean" - }, - "when": { - "$ref": "#/components/schemas/Arrays_7" - }, - "type": { - "type": "string", - "enum": ["multiselect"] - }, - "options": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Form.Option" - } - }, - "minItems": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "maxItems": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "custom": { - "type": "boolean" - }, - "default": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": ["key", "type", "options"], - "additionalProperties": false - }, - "Form.ExternalField": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "type": { - "type": "string", - "enum": ["external"] - }, - "url": { - "type": "string" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "required": ["key", "type", "url"], - "additionalProperties": false - }, - "Form.Field": { - "anyOf": [ - { - "$ref": "#/components/schemas/Form.StringField" - }, - { - "$ref": "#/components/schemas/Form.NumberField" - }, - { - "$ref": "#/components/schemas/Form.IntegerField" - }, - { - "$ref": "#/components/schemas/Form.BooleanField" - }, - { - "$ref": "#/components/schemas/Form.MultiselectField" - }, - { - "$ref": "#/components/schemas/Form.ExternalField" - } - ] - }, - "Form.Fields": { - "type": "array", - "prefixItems": [ - { - "$ref": "#/components/schemas/Form.Field" - } - ], - "minItems": 1, - "items": { - "$ref": "#/components/schemas/Form.Field" - } - }, - "Integration.OAuthMethod": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": ["oauth"] - }, - "label": { - "type": "string" - }, - "form": { - "$ref": "#/components/schemas/Form.Fields" - } - }, - "required": ["id", "type", "label"], - "additionalProperties": false - }, - "Integration.CommandMethod": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": ["command"] - }, - "label": { - "type": "string" - }, - "command": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": ["id", "type", "label", "command"], - "additionalProperties": false - }, - "Form.Fields_1": { - "type": "array", - "prefixItems": [ - { - "$ref": "#/components/schemas/Form.Field" - } - ], - "minItems": 1, - "items": { - "$ref": "#/components/schemas/Form.Field" - } - }, - "Integration.KeyMethod": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["key"] - }, - "label": { - "type": "string" - }, - "form": { - "$ref": "#/components/schemas/Form.Fields_1" - } - }, - "required": ["type"], - "additionalProperties": false - }, - "Integration.EnvMethod": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["env"] - }, - "names": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": ["type", "names"], - "additionalProperties": false - }, - "Integration.Method": { - "anyOf": [ - { - "$ref": "#/components/schemas/Integration.OAuthMethod" - }, - { - "$ref": "#/components/schemas/Integration.CommandMethod" - }, - { - "$ref": "#/components/schemas/Integration.KeyMethod" - }, - { - "$ref": "#/components/schemas/Integration.EnvMethod" - } - ] - }, - "Connection.CredentialInfo": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["credential"] - }, - "id": { - "type": "string" - }, - "label": { - "type": "string" - } - }, - "required": ["type", "id", "label"], - "additionalProperties": false - }, - "Connection.EnvInfo": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["env"] - }, - "name": { - "type": "string" - } - }, - "required": ["type", "name"], - "additionalProperties": false - }, - "Connection.Info": { - "anyOf": [ - { - "$ref": "#/components/schemas/Connection.CredentialInfo" - }, - { - "$ref": "#/components/schemas/Connection.EnvInfo" - } - ] - }, - "Integration.Info": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "methods": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Integration.Method" - } - }, - "connections": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Connection.Info" - } - } - }, - "required": ["id", "name", "methods", "connections"], - "additionalProperties": false - }, - "Form.Value": { - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/Union_11" - }, - { - "type": "boolean" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "Form.Answer": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Form.Value" - } - }, - "Union_12": { - "anyOf": [ - { - "$ref": "#/components/schemas/Form.Answer" - }, - { - "type": "null" - } - ] - }, - "Objects_7": { - "type": "object", - "properties": { - "created": { - "$ref": "#/components/schemas/Union_11" - }, - "expires": { - "$ref": "#/components/schemas/Union_11" - } - }, - "required": ["created", "expires"], - "additionalProperties": false - }, - "Integration.AttemptEncoded": { - "type": "object", - "properties": { - "attemptID": { - "type": "string" - }, - "url": { - "type": "string" - }, - "instructions": { - "type": "string" - }, - "mode": { - "type": "string", - "enum": ["auto", "code"] - }, - "time": { - "$ref": "#/components/schemas/Objects_7" - } - }, - "required": ["attemptID", "url", "instructions", "mode", "time"], - "additionalProperties": false - }, - "Integration.AttemptStatus": { - "anyOf": [ - { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["pending"] - }, - "time": { - "$ref": "#/components/schemas/Objects_7" - } - }, - "required": ["status", "time"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["complete"] - }, - "time": { - "$ref": "#/components/schemas/Objects_7" - } - }, - "required": ["status", "time"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["failed"] - }, - "message": { - "type": "string" - }, - "time": { - "$ref": "#/components/schemas/Objects_7" - } - }, - "required": ["status", "message", "time"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["expired"] - }, - "time": { - "$ref": "#/components/schemas/Objects_7" - } - }, - "required": ["status", "time"], - "additionalProperties": false - } - ] - }, - "Integration.CommandAttempt": { - "type": "object", - "properties": { - "attemptID": { - "type": "string" - }, - "time": { - "$ref": "#/components/schemas/Objects_7" - } - }, - "required": ["attemptID", "time"], - "additionalProperties": false - }, - "Integration.CommandAttemptStatus": { - "anyOf": [ - { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["pending"] - }, - "message": { - "type": "string" - }, - "time": { - "$ref": "#/components/schemas/Objects_7" - } - }, - "required": ["status", "time"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["complete"] - }, - "time": { - "$ref": "#/components/schemas/Objects_7" - } - }, - "required": ["status", "time"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["failed"] - }, - "message": { - "type": "string" - }, - "time": { - "$ref": "#/components/schemas/Objects_7" - } - }, - "required": ["status", "message", "time"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["expired"] - }, - "time": { - "$ref": "#/components/schemas/Objects_7" - } - }, - "required": ["status", "time"], - "additionalProperties": false - } - ] - }, - "Mcp.Status.Connected": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["connected"] - } - }, - "required": ["status"], - "additionalProperties": false - }, - "Mcp.Status.Pending": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["pending"] - } - }, - "required": ["status"], - "additionalProperties": false - }, - "Mcp.Status.Disabled": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["disabled"] - } - }, - "required": ["status"], - "additionalProperties": false - }, - "Mcp.Status.Failed": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["failed"] - }, - "error": { - "type": "string" - } - }, - "required": ["status", "error"], - "additionalProperties": false - }, - "Mcp.Status.NeedsAuth": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["needs_auth"] - } - }, - "required": ["status"], - "additionalProperties": false - }, - "Mcp.Server": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "status": { - "anyOf": [ - { - "$ref": "#/components/schemas/Mcp.Status.Connected" - }, - { - "$ref": "#/components/schemas/Mcp.Status.Pending" - }, - { - "$ref": "#/components/schemas/Mcp.Status.Disabled" - }, - { - "$ref": "#/components/schemas/Mcp.Status.Failed" - }, - { - "$ref": "#/components/schemas/Mcp.Status.NeedsAuth" - } - ] - }, - "integrationID": { - "type": "string" - } - }, - "required": ["name", "status"], - "additionalProperties": false - }, - "Objects_8": { - "type": "object", - "properties": { - "startup": { - "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] - }, - "catalog": { - "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] - }, - "execution": { - "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] - } - }, - "additionalProperties": false - }, - "Mcp.LocalConfigEncoded": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["local"] - }, - "command": { - "type": "array", - "items": { - "type": "string" - } - }, - "cwd": { - "type": "string" - }, - "environment": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "disabled": { - "type": "boolean" - }, - "codemode": { - "type": "boolean" - }, - "timeout": { - "$ref": "#/components/schemas/Objects_8" - } - }, - "required": ["type", "command"], - "additionalProperties": false - }, - "Mcp.OAuthConfigEncoded": { - "type": "object", - "properties": { - "client_id": { - "type": "string" - }, - "client_secret": { - "type": "string" - }, - "scope": { - "type": "string" - }, - "callback_port": { - "type": "integer", - "allOf": [ - { - "minimum": 1, - "maximum": 65535 - } - ] - }, - "redirect_uri": { - "type": "string" - } - }, - "additionalProperties": false - }, - "Mcp.RemoteConfigEncoded": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["remote"] - }, - "url": { - "type": "string" - }, - "headers": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "oauth": { - "anyOf": [ - { - "$ref": "#/components/schemas/Mcp.OAuthConfigEncoded" - }, - { - "type": "boolean", - "enum": [false] - } - ] - }, - "disabled": { - "type": "boolean" - }, - "codemode": { - "type": "boolean" - }, - "timeout": { - "$ref": "#/components/schemas/Objects_8" - } - }, - "required": ["type", "url"], - "additionalProperties": false - }, - "McpServerNotFoundErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["McpServerNotFoundError"] - }, - "server": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "server", "message"], - "additionalProperties": false - }, - "Mcp.Resource": { - "type": "object", - "properties": { - "server": { - "type": "string" - }, - "name": { - "type": "string" - }, - "uri": { - "type": "string" - }, - "description": { - "type": "string" - }, - "mimeType": { - "type": "string" - } - }, - "required": ["server", "name", "uri"], - "additionalProperties": false - }, - "Mcp.ResourceTemplate": { - "type": "object", - "properties": { - "server": { - "type": "string" - }, - "name": { - "type": "string" - }, - "uriTemplate": { - "type": "string" - }, - "description": { - "type": "string" - }, - "mimeType": { - "type": "string" - } - }, - "required": ["server", "name", "uriTemplate"], - "additionalProperties": false - }, - "Mcp.ResourceCatalog": { - "type": "object", - "properties": { - "resources": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Mcp.Resource" - } - }, - "templates": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Mcp.ResourceTemplate" - } - } - }, - "required": ["resources", "templates"], - "additionalProperties": false - }, - "Project.Vcs": { - "type": "string", - "enum": ["git", "hg"] - }, - "Project.Icon": { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "override": { - "type": "string" - }, - "color": { - "type": "string" - } - }, - "additionalProperties": false - }, - "Project.Commands": { - "type": "object", - "properties": { - "start": { - "type": "string", - "description": "Startup script to run when creating a new workspace (worktree)" - } - }, - "additionalProperties": false - }, - "Project.Time": { - "type": "object", - "properties": { - "created": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "updated": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "initialized": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - } - }, - "required": ["created", "updated"], - "additionalProperties": false - }, - "Project": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "canonical": { - "type": "string" - }, - "vcs": { - "$ref": "#/components/schemas/Project.Vcs" - }, - "name": { - "type": "string" - }, - "icon": { - "$ref": "#/components/schemas/Project.Icon" - }, - "commands": { - "$ref": "#/components/schemas/Project.Commands" - }, - "time": { - "$ref": "#/components/schemas/Project.Time" - }, - "sandboxes": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": ["id", "canonical", "time", "sandboxes"], - "additionalProperties": false - }, - "Project.Current": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "directory": { - "type": "string" - }, - "canonical": { - "type": "string" - } - }, - "required": ["id", "directory", "canonical"], - "additionalProperties": false - }, - "Form.Metadata": { - "type": "object" - }, - "Form.Fields_2": { - "type": "array", - "prefixItems": [ - { - "$ref": "#/components/schemas/Form.Field" - } - ], - "minItems": 1, - "items": { - "$ref": "#/components/schemas/Form.Field" - } - }, - "Form.Info": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^frm_" - } - ] - }, - "sessionID": { - "type": "string" - }, - "title": { - "type": "string" - }, - "metadata": { - "$ref": "#/components/schemas/Form.Metadata" - }, - "fields": { - "$ref": "#/components/schemas/Form.Fields_2" - } - }, - "required": ["id", "sessionID", "title", "fields"], - "additionalProperties": false - }, - "Form.CreatePayload": { - "type": "object", - "properties": { - "id": { - "anyOf": [ - { - "type": "string", - "allOf": [ - { - "pattern": "^frm_" - } - ] - }, - { - "type": "null" - } - ] - }, - "title": { - "type": "string" - }, - "metadata": { - "$ref": "#/components/schemas/Form.Metadata" - }, - "fields": { - "$ref": "#/components/schemas/Form.Fields_2" - } - }, - "required": ["title", "fields"], - "additionalProperties": false - }, - "FormNotFoundErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["FormNotFoundError"] - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "id", "message"], - "additionalProperties": false - }, - "Form.State": { - "anyOf": [ - { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["pending"] - } - }, - "required": ["status"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["answered"] - }, - "answer": { - "$ref": "#/components/schemas/Form.Answer" - } - }, - "required": ["status", "answer"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["cancelled"] - } - }, - "required": ["status"], - "additionalProperties": false - } - ] - }, - "Form.Reply": { - "type": "object", - "properties": { - "answer": { - "$ref": "#/components/schemas/Form.Answer" - } - }, - "required": ["answer"], - "additionalProperties": false - }, - "FormAlreadySettledErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["FormAlreadySettledError"] - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "id", "message"], - "additionalProperties": false - }, - "FormInvalidAnswerErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["FormInvalidAnswerError"] - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "id", "message"], - "additionalProperties": false - }, - "Arrays_8": { + "Arrays_681004346c78": { "type": "array", "items": { "type": "string" } }, - "Arrays_9": { + "Arrays_92aa8803e81f": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/Prompt.SkillAttachment" } }, - "Objects_9": { - "type": "object" + "Arrays_c17502465996": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PromptInput.SkillAttachment" + } }, - "Permission.Source": { - "anyOf": [ - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["tool"] - }, - "messageID": { - "type": "string" - }, - "id": { - "type": "string" - } - }, - "required": ["type", "messageID", "id"], - "additionalProperties": false - } - ] + "Arrays_e1027de4b984": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Prompt.AgentAttachment" + } }, - "Permission.Request": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^per" - } - ] - }, - "sessionID": { - "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] - }, - "action": { - "type": "string" - }, - "resources": { - "$ref": "#/components/schemas/Arrays_8" - }, - "save": { - "$ref": "#/components/schemas/Arrays_9" - }, - "metadata": { - "$ref": "#/components/schemas/Objects_9" - }, - "source": { - "$ref": "#/components/schemas/Permission.Source" - } - }, - "required": ["id", "sessionID", "action", "resources"], - "additionalProperties": false - }, - "PermissionSaved.Info": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "projectID": { - "type": "string" - }, - "action": { - "type": "string" - }, - "resource": { - "type": "string" - } - }, - "required": ["id", "projectID", "action", "resource"], - "additionalProperties": false - }, - "PermissionNotFoundErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["PermissionNotFoundError"] - }, - "requestID": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "requestID", "message"], - "additionalProperties": false - }, - "Permission.Reply": { - "type": "string", - "enum": ["once", "always", "reject"] - }, - "FileSystem.Entry": { - "type": "object", - "properties": { - "path": { - "type": "string" - }, - "type": { - "type": "string", - "enum": ["file", "directory"] - } - }, - "required": ["path", "type"], - "additionalProperties": false + "Arrays_fa246a9267ec": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Session.Message.Info" + } }, "Command.Info": { "type": "object", @@ -13900,515 +9893,54 @@ "required": ["name", "template"], "additionalProperties": false }, - "Skill.Info": { + "CommandEvaluationErrorEncoded": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "slash": { - "type": "boolean" - }, - "autoinvoke": { - "type": "boolean" - }, - "location": { - "type": "string" - }, - "content": { - "type": "string" - } - }, - "required": ["id", "name", "location", "content"], - "additionalProperties": false - }, - "V2EventEncoded": { - "type": "string", - "contentMediaType": "application/json" - }, - "Pty": { - "type": "object", - "properties": { - "id": { + "_tag": { "type": "string", - "allOf": [ - { - "pattern": "^pty" - } - ] - }, - "title": { - "type": "string" + "enum": ["CommandEvaluationError"] }, "command": { "type": "string" }, - "args": { - "type": "array", - "items": { - "type": "string" - } - }, - "cwd": { - "type": "string" - }, - "status": { - "type": "string", - "enum": ["running", "exited"] - }, - "pid": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "exitCode": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - } - }, - "required": ["id", "title", "command", "args", "cwd", "status", "pid"], - "additionalProperties": false - }, - "PtyNotFoundErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["PtyNotFoundError"] - }, - "ptyID": { - "type": "string" - }, "message": { "type": "string" } }, - "required": ["_tag", "ptyID", "message"], + "required": ["_tag", "command", "message"], "additionalProperties": false }, - "PtyTicket.ConnectToken": { - "type": "object", - "properties": { - "ticket": { - "type": "string" - }, - "expires_in": { - "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] - } - }, - "required": ["ticket", "expires_in"], - "additionalProperties": false - }, - "ForbiddenErrorEncoded": { + "CommandNotFoundErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", - "enum": ["ForbiddenError"] - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "message"], - "additionalProperties": false - }, - "Shell.Info": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^sh_" - } - ] - }, - "status": { - "$ref": "#/components/schemas/Union_5" + "enum": ["CommandNotFoundError"] }, "command": { "type": "string" }, - "cwd": { - "type": "string" - }, - "shell": { - "type": "string" - }, - "file": { - "type": "string" - }, - "pid": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "exit": { - "type": "number" - }, - "metadata": { - "type": "object" - }, - "time": { - "type": "object", - "properties": { - "started": { - "type": "number" - }, - "completed": { - "type": "number" - } - }, - "required": ["started"], - "additionalProperties": false - } - }, - "required": ["id", "status", "command", "cwd", "shell", "file", "metadata", "time"], - "additionalProperties": false - }, - "ShellNotFoundErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["ShellNotFoundError"] - }, - "id": { - "type": "string" - }, "message": { "type": "string" } }, - "required": ["_tag", "id", "message"], + "required": ["_tag", "command", "message"], "additionalProperties": false }, - "Reference.LocalSource": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["local"] - }, - "path": { - "type": "string" - }, - "description": { - "type": "string" - }, - "hidden": { - "type": "boolean" - } - }, - "required": ["type", "path"], - "additionalProperties": false - }, - "Reference.GitSource": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["git"] - }, - "repository": { - "type": "string" - }, - "branch": { - "type": "string" - }, - "description": { - "type": "string" - }, - "hidden": { - "type": "boolean" - } - }, - "required": ["type", "repository"], - "additionalProperties": false - }, - "Reference.Source": { - "anyOf": [ - { - "$ref": "#/components/schemas/Reference.LocalSource" - }, - { - "$ref": "#/components/schemas/Reference.GitSource" - } - ] - }, - "Reference.Info": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "description": { - "type": "string" - }, - "hidden": { - "type": "boolean" - }, - "source": { - "$ref": "#/components/schemas/Reference.Source" - } - }, - "required": ["name", "path", "source"], - "additionalProperties": false - }, - "Worktree.Directory": { - "type": "object", - "properties": { - "directory": { - "type": "string" - }, - "strategy": { - "type": "string" - } - }, - "required": ["directory"], - "additionalProperties": false - }, - "Worktree.List": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Worktree.Directory" - } - }, - "Worktree.Info": { - "type": "object", - "properties": { - "directory": { - "type": "string" - } - }, - "required": ["directory"], - "additionalProperties": false - }, - "WorktreeErrorEncoded": { - "type": "object", - "properties": { - "name": { - "type": "string", - "enum": ["WorktreeError"] - }, - "data": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "forceRequired": { - "$ref": "#/components/schemas/Union_10" - } - }, - "required": ["message"], - "additionalProperties": false - } - }, - "required": ["name", "data"], - "additionalProperties": false - }, - "Vcs.Branch": { - "type": "object", - "properties": { - "current": { - "type": "string" - }, - "default": { - "type": "string" - } - }, - "additionalProperties": false - }, - "Vcs.Info": { - "type": "object", - "properties": { - "branch": { - "$ref": "#/components/schemas/Vcs.Branch" - } - }, - "required": ["branch"], - "additionalProperties": false - }, - "Vcs.FileStatus": { - "type": "object", - "properties": { - "file": { - "type": "string" - }, - "additions": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "deletions": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "status": { - "type": "string", - "enum": ["added", "deleted", "modified"] - } - }, - "required": ["file", "additions", "deletions", "status"], - "additionalProperties": false - }, - "Vcs.Mode": { - "type": "string", - "enum": ["working", "branch"] - }, - "WebSearch.Provider": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": ["id", "name"], - "additionalProperties": false - }, - "WebSearch.Result": { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "title": { - "type": "string" - }, - "content": { - "type": "string" - }, - "time": { - "type": "object", - "properties": { - "published": { - "type": "number" - } - }, - "additionalProperties": false - } - }, - "required": ["url", "time"], - "additionalProperties": false - }, - "WebSearch.ResponseEncoded": { - "type": "object", - "properties": { - "providerID": { - "type": "string" - }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WebSearch.Result" - } - } - }, - "required": ["providerID", "results"], - "additionalProperties": false - }, - "Union_13": { - "anyOf": [ - { - "type": "string", - "allOf": [ - { - "pattern": "^[^/#]+\\/[^#]+(?:#[^#]+)?$" - } - ] - }, - { - "type": "object", - "properties": { - "providerID": { - "type": "string", - "allOf": [ - { - "pattern": "^[^/#]+$" - } - ] - }, - "model": { - "type": "string", - "allOf": [ - { - "pattern": "^[^#]+$" - } - ] - }, - "variant": { - "type": "string", - "allOf": [ - { - "pattern": "^[^#]+$" - } - ] - } - }, - "required": ["providerID", "model"], - "additionalProperties": false - } - ] - }, - "Objects_10": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "Objects_11": { - "type": "object" - }, "Config.AgentEncoded": { "type": "object", "properties": { "model": { - "$ref": "#/components/schemas/Union_13" + "$ref": "#/components/schemas/Union_85ca62cf1a33" }, "request": { "type": "object", "properties": { "headers": { - "$ref": "#/components/schemas/Objects_10" + "$ref": "#/components/schemas/Objects_3f161562db4a" }, "body": { - "$ref": "#/components/schemas/Objects_11" + "$ref": "#/components/schemas/Objects_a2c799262a3c" } }, "additionalProperties": false @@ -14451,6 +9983,103 @@ }, "additionalProperties": false }, + "Config.AgentsDirectoryEncoded": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["agents"] + }, + "path": { + "type": "string" + } + }, + "required": ["type", "path"], + "additionalProperties": false + }, + "Config.ClaudeDirectoryEncoded": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["claude"] + }, + "path": { + "type": "string" + } + }, + "required": ["type", "path"], + "additionalProperties": false + }, + "Config.CommandEncoded": { + "type": "object", + "properties": { + "template": { + "type": "string" + }, + "description": { + "type": "string" + }, + "agent": { + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/Union_85ca62cf1a33" + }, + "subtask": { + "type": "boolean" + } + }, + "required": ["template"], + "additionalProperties": false + }, + "Config.DirectoryEncoded": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["directory"] + }, + "path": { + "type": "string" + } + }, + "required": ["type", "path"], + "additionalProperties": false + }, + "Config.DocumentEncoded": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["document"] + }, + "path": { + "type": "string" + }, + "info": { + "$ref": "#/components/schemas/Config.InfoEncoded" + } + }, + "required": ["type", "info"], + "additionalProperties": false + }, + "Config.Entry": { + "anyOf": [ + { + "$ref": "#/components/schemas/Config.DocumentEncoded" + }, + { + "$ref": "#/components/schemas/Config.DirectoryEncoded" + }, + { + "$ref": "#/components/schemas/Config.AgentsDirectoryEncoded" + }, + { + "$ref": "#/components/schemas/Config.ClaudeDirectoryEncoded" + } + ] + }, "Config.Formatter.EntryEncoded": { "type": "object", "properties": { @@ -14478,298 +10107,6 @@ }, "additionalProperties": false }, - "Config.LSP.ServerEncoded": { - "type": "object", - "properties": { - "command": { - "type": "array", - "items": { - "type": "string" - } - }, - "extensions": { - "type": "array", - "items": { - "type": "string" - } - }, - "disabled": { - "type": "boolean" - }, - "env": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "initialization": { - "type": "object" - } - }, - "required": ["command"], - "additionalProperties": false - }, - "Config.CommandEncoded": { - "type": "object", - "properties": { - "template": { - "type": "string" - }, - "description": { - "type": "string" - }, - "agent": { - "type": "string" - }, - "model": { - "$ref": "#/components/schemas/Union_13" - }, - "subtask": { - "type": "boolean" - } - }, - "required": ["template"], - "additionalProperties": false - }, - "Config.Reference.GitEncoded": { - "type": "object", - "properties": { - "repository": { - "type": "string" - }, - "branch": { - "type": "string" - }, - "description": { - "type": "string" - }, - "hidden": { - "type": "boolean" - } - }, - "required": ["repository"], - "additionalProperties": false - }, - "Config.Reference.LocalEncoded": { - "type": "object", - "properties": { - "path": { - "type": "string" - }, - "description": { - "type": "string" - }, - "hidden": { - "type": "boolean" - } - }, - "required": ["path"], - "additionalProperties": false - }, - "ConfigWebSearch.InfoEncoded": { - "type": "object", - "properties": { - "provider": { - "anyOf": [ - { - "type": "string", - "enum": ["random"] - }, - { - "type": "string" - } - ] - } - }, - "required": ["provider"], - "additionalProperties": false - }, - "Config.Plugin.EntryEncoded": { - "type": "object", - "properties": { - "package": { - "type": "string" - }, - "options": { - "type": "object" - } - }, - "required": ["package"], - "additionalProperties": false - }, - "Config.WarmingEncoded": { - "type": "object", - "properties": { - "prompt": { - "type": "string" - }, - "interval": { - "type": "string" - }, - "duration": { - "type": "string" - } - }, - "additionalProperties": false - }, - "Config.Model.CostEncoded": { - "type": "object", - "properties": { - "tier": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["context"] - }, - "size": { - "type": "integer" - } - }, - "required": ["type", "size"], - "additionalProperties": false - }, - "input": { - "$ref": "#/components/schemas/Money.USDPerMillionTokens" - }, - "output": { - "$ref": "#/components/schemas/Money.USDPerMillionTokens" - }, - "cache": { - "type": "object", - "properties": { - "read": { - "$ref": "#/components/schemas/Money.USDPerMillionTokens" - }, - "write": { - "$ref": "#/components/schemas/Money.USDPerMillionTokens" - } - }, - "additionalProperties": false - } - }, - "required": ["input", "output"], - "additionalProperties": false - }, - "Config.ModelEncoded": { - "type": "object", - "properties": { - "modelID": { - "type": "string" - }, - "family": { - "type": "string" - }, - "name": { - "type": "string" - }, - "compatibility": { - "$ref": "#/components/schemas/Model.Compatibility" - }, - "package": { - "type": "string" - }, - "settings": { - "$ref": "#/components/schemas/Objects_11" - }, - "headers": { - "$ref": "#/components/schemas/Objects_10" - }, - "body": { - "$ref": "#/components/schemas/Objects_11" - }, - "capabilities": { - "$ref": "#/components/schemas/Model.Capabilities" - }, - "variants": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "settings": { - "$ref": "#/components/schemas/Objects_11" - }, - "headers": { - "$ref": "#/components/schemas/Objects_10" - }, - "body": { - "$ref": "#/components/schemas/Objects_11" - } - }, - "required": ["id"], - "additionalProperties": false - } - }, - "cost": { - "anyOf": [ - { - "$ref": "#/components/schemas/Config.Model.CostEncoded" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/Config.Model.CostEncoded" - } - } - ] - }, - "disabled": { - "type": "boolean" - }, - "limit": { - "type": "object", - "properties": { - "context": { - "type": "integer" - }, - "input": { - "type": "integer" - }, - "output": { - "type": "integer" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - "Config.ProviderEncoded": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "env": { - "type": "array", - "items": { - "type": "string" - } - }, - "package": { - "type": "string" - }, - "settings": { - "$ref": "#/components/schemas/Objects_11" - }, - "headers": { - "$ref": "#/components/schemas/Objects_10" - }, - "body": { - "$ref": "#/components/schemas/Objects_11" - }, - "models": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Config.ModelEncoded" - } - } - }, - "additionalProperties": false - }, "Config.InfoEncoded": { "type": "object", "properties": { @@ -14780,7 +10117,7 @@ "type": "string" }, "model": { - "$ref": "#/components/schemas/Union_13" + "$ref": "#/components/schemas/Union_85ca62cf1a33" }, "default_agent": { "type": "string" @@ -14942,7 +10279,7 @@ "type": "object", "properties": { "timeout": { - "$ref": "#/components/schemas/Objects_8" + "$ref": "#/components/schemas/Objects_7b507c2fd81f" }, "servers": { "type": "object", @@ -15106,80 +10443,4700 @@ }, "additionalProperties": false }, - "Config.DocumentEncoded": { + "Config.LSP.ServerEncoded": { + "type": "object", + "properties": { + "command": { + "type": "array", + "items": { + "type": "string" + } + }, + "extensions": { + "type": "array", + "items": { + "type": "string" + } + }, + "disabled": { + "type": "boolean" + }, + "env": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "initialization": { + "type": "object" + } + }, + "required": ["command"], + "additionalProperties": false + }, + "Config.Model.CostEncoded": { + "type": "object", + "properties": { + "tier": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["context"] + }, + "size": { + "type": "integer" + } + }, + "required": ["type", "size"], + "additionalProperties": false + }, + "input": { + "$ref": "#/components/schemas/Money.USDPerMillionTokens" + }, + "output": { + "$ref": "#/components/schemas/Money.USDPerMillionTokens" + }, + "cache": { + "type": "object", + "properties": { + "read": { + "$ref": "#/components/schemas/Money.USDPerMillionTokens" + }, + "write": { + "$ref": "#/components/schemas/Money.USDPerMillionTokens" + } + }, + "additionalProperties": false + } + }, + "required": ["input", "output"], + "additionalProperties": false + }, + "Config.ModelEncoded": { + "type": "object", + "properties": { + "modelID": { + "type": "string" + }, + "family": { + "type": "string" + }, + "name": { + "type": "string" + }, + "compatibility": { + "$ref": "#/components/schemas/Model.Compatibility" + }, + "package": { + "type": "string" + }, + "settings": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "headers": { + "$ref": "#/components/schemas/Objects_3f161562db4a" + }, + "body": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "capabilities": { + "$ref": "#/components/schemas/Model.Capabilities" + }, + "variants": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "settings": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "headers": { + "$ref": "#/components/schemas/Objects_3f161562db4a" + }, + "body": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + } + }, + "required": ["id"], + "additionalProperties": false + } + }, + "cost": { + "anyOf": [ + { + "$ref": "#/components/schemas/Config.Model.CostEncoded" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Config.Model.CostEncoded" + } + } + ] + }, + "disabled": { + "type": "boolean" + }, + "limit": { + "type": "object", + "properties": { + "context": { + "type": "integer" + }, + "input": { + "type": "integer" + }, + "output": { + "type": "integer" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "Config.Plugin.EntryEncoded": { + "type": "object", + "properties": { + "package": { + "type": "string" + }, + "options": { + "type": "object" + } + }, + "required": ["package"], + "additionalProperties": false + }, + "Config.ProviderEncoded": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "env": { + "type": "array", + "items": { + "type": "string" + } + }, + "package": { + "type": "string" + }, + "settings": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "headers": { + "$ref": "#/components/schemas/Objects_3f161562db4a" + }, + "body": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "models": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Config.ModelEncoded" + } + } + }, + "additionalProperties": false + }, + "Config.Reference.GitEncoded": { + "type": "object", + "properties": { + "repository": { + "type": "string" + }, + "branch": { + "type": "string" + }, + "description": { + "type": "string" + }, + "hidden": { + "type": "boolean" + } + }, + "required": ["repository"], + "additionalProperties": false + }, + "Config.Reference.LocalEncoded": { + "type": "object", + "properties": { + "path": { + "type": "string" + }, + "description": { + "type": "string" + }, + "hidden": { + "type": "boolean" + } + }, + "required": ["path"], + "additionalProperties": false + }, + "Config.WarmingEncoded": { + "type": "object", + "properties": { + "prompt": { + "type": "string" + }, + "interval": { + "type": "string" + }, + "duration": { + "type": "string" + } + }, + "additionalProperties": false + }, + "ConfigWebSearch.InfoEncoded": { + "type": "object", + "properties": { + "provider": { + "anyOf": [ + { + "type": "string", + "enum": ["random"] + }, + { + "type": "string" + } + ] + } + }, + "required": ["provider"], + "additionalProperties": false + }, + "ConflictErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["ConflictError"] + }, + "message": { + "type": "string" + }, + "resource": { + "$ref": "#/components/schemas/Union_f090cb615c84" + } + }, + "required": ["_tag", "message"], + "additionalProperties": false + }, + "Connection.CredentialInfo": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["document"] + "enum": ["credential"] }, - "path": { + "id": { "type": "string" }, - "info": { - "$ref": "#/components/schemas/Config.InfoEncoded" + "label": { + "type": "string" } }, - "required": ["type", "info"], + "required": ["type", "id", "label"], "additionalProperties": false }, - "Config.DirectoryEncoded": { + "Connection.EnvInfo": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["directory"] + "enum": ["env"] }, - "path": { + "name": { "type": "string" } }, - "required": ["type", "path"], + "required": ["type", "name"], "additionalProperties": false }, - "Config.AgentsDirectoryEncoded": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["agents"] - }, - "path": { - "type": "string" - } - }, - "required": ["type", "path"], - "additionalProperties": false - }, - "Config.ClaudeDirectoryEncoded": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["claude"] - }, - "path": { - "type": "string" - } - }, - "required": ["type", "path"], - "additionalProperties": false - }, - "Config.Entry": { + "Connection.Info": { "anyOf": [ { - "$ref": "#/components/schemas/Config.DocumentEncoded" + "$ref": "#/components/schemas/Connection.CredentialInfo" }, { - "$ref": "#/components/schemas/Config.DirectoryEncoded" - }, - { - "$ref": "#/components/schemas/Config.AgentsDirectoryEncoded" - }, - { - "$ref": "#/components/schemas/Config.ClaudeDirectoryEncoded" + "$ref": "#/components/schemas/Connection.EnvInfo" } ] + }, + "FileDiff.Info": { + "type": "object", + "properties": { + "file": { + "type": "string" + }, + "patch": { + "type": "string" + }, + "additions": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "deletions": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "status": { + "type": "string", + "enum": ["added", "deleted", "modified"] + } + }, + "required": ["file", "patch", "additions", "deletions", "status"], + "additionalProperties": false + }, + "FileSystem.Entry": { + "type": "object", + "properties": { + "path": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["file", "directory"] + } + }, + "required": ["path", "type"], + "additionalProperties": false + }, + "ForbiddenErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["ForbiddenError"] + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "message"], + "additionalProperties": false + }, + "Form.Answer": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Form.Value" + } + }, + "Form.BooleanField": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "required": { + "type": "boolean" + }, + "when": { + "$ref": "#/components/schemas/Arrays_4df8e9fdc8e1" + }, + "type": { + "type": "string", + "enum": ["boolean"] + }, + "default": { + "type": "boolean" + } + }, + "required": ["key", "type"], + "additionalProperties": false + }, + "Form.CreatePayload": { + "type": "object", + "properties": { + "id": { + "anyOf": [ + { + "type": "string", + "allOf": [ + { + "pattern": "^frm_" + } + ] + }, + { + "type": "null" + } + ] + }, + "title": { + "type": "string" + }, + "metadata": { + "$ref": "#/components/schemas/Form.Metadata" + }, + "fields": { + "$ref": "#/components/schemas/Form.Fields_2" + } + }, + "required": ["title", "fields"], + "additionalProperties": false + }, + "Form.ExternalField": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["external"] + }, + "url": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": ["key", "type", "url"], + "additionalProperties": false + }, + "Form.Field": { + "anyOf": [ + { + "$ref": "#/components/schemas/Form.StringField" + }, + { + "$ref": "#/components/schemas/Form.NumberField" + }, + { + "$ref": "#/components/schemas/Form.IntegerField" + }, + { + "$ref": "#/components/schemas/Form.BooleanField" + }, + { + "$ref": "#/components/schemas/Form.MultiselectField" + }, + { + "$ref": "#/components/schemas/Form.ExternalField" + } + ] + }, + "Form.Fields": { + "type": "array", + "prefixItems": [ + { + "$ref": "#/components/schemas/Form.Field" + } + ], + "minItems": 1, + "items": { + "$ref": "#/components/schemas/Form.Field" + } + }, + "Form.Fields_1": { + "type": "array", + "prefixItems": [ + { + "$ref": "#/components/schemas/Form.Field" + } + ], + "minItems": 1, + "items": { + "$ref": "#/components/schemas/Form.Field" + } + }, + "Form.Fields_2": { + "type": "array", + "prefixItems": [ + { + "$ref": "#/components/schemas/Form.Field" + } + ], + "minItems": 1, + "items": { + "$ref": "#/components/schemas/Form.Field" + } + }, + "Form.Info": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^frm_" + } + ] + }, + "sessionID": { + "type": "string" + }, + "title": { + "type": "string" + }, + "metadata": { + "$ref": "#/components/schemas/Form.Metadata" + }, + "fields": { + "$ref": "#/components/schemas/Form.Fields_2" + } + }, + "required": ["id", "sessionID", "title", "fields"], + "additionalProperties": false + }, + "Form.IntegerField": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "required": { + "type": "boolean" + }, + "when": { + "$ref": "#/components/schemas/Arrays_4df8e9fdc8e1" + }, + "type": { + "type": "string", + "enum": ["integer"] + }, + "minimum": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/components/schemas/Union_97d8d2942510" + } + ] + }, + "maximum": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/components/schemas/Union_97d8d2942510" + } + ] + }, + "default": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/components/schemas/Union_97d8d2942510" + } + ] + } + }, + "required": ["key", "type"], + "additionalProperties": false + }, + "Form.Metadata": { + "type": "object" + }, + "Form.MultiselectField": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "required": { + "type": "boolean" + }, + "when": { + "$ref": "#/components/schemas/Arrays_4df8e9fdc8e1" + }, + "type": { + "type": "string", + "enum": ["multiselect"] + }, + "options": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Form.Option" + } + }, + "minItems": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "maxItems": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "custom": { + "type": "boolean" + }, + "default": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": ["key", "type", "options"], + "additionalProperties": false + }, + "Form.NumberField": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "required": { + "type": "boolean" + }, + "when": { + "$ref": "#/components/schemas/Arrays_4df8e9fdc8e1" + }, + "type": { + "type": "string", + "enum": ["number"] + }, + "minimum": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/components/schemas/Union_97d8d2942510" + } + ] + }, + "maximum": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/components/schemas/Union_97d8d2942510" + } + ] + }, + "default": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/components/schemas/Union_97d8d2942510" + } + ] + } + }, + "required": ["key", "type"], + "additionalProperties": false + }, + "Form.Option": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": ["value", "label"], + "additionalProperties": false + }, + "Form.Reply": { + "type": "object", + "properties": { + "answer": { + "$ref": "#/components/schemas/Form.Answer" + } + }, + "required": ["answer"], + "additionalProperties": false + }, + "Form.State": { + "anyOf": [ + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["pending"] + } + }, + "required": ["status"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["answered"] + }, + "answer": { + "$ref": "#/components/schemas/Form.Answer" + } + }, + "required": ["status", "answer"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["cancelled"] + } + }, + "required": ["status"], + "additionalProperties": false + } + ] + }, + "Form.StringField": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "required": { + "type": "boolean" + }, + "when": { + "$ref": "#/components/schemas/Arrays_4df8e9fdc8e1" + }, + "type": { + "type": "string", + "enum": ["string"] + }, + "format": { + "type": "string", + "enum": ["email", "uri", "date", "date-time"] + }, + "minLength": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "maxLength": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "pattern": { + "type": "string" + }, + "placeholder": { + "type": "string" + }, + "default": { + "type": "string" + }, + "options": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Form.Option" + } + }, + "custom": { + "type": "boolean" + } + }, + "required": ["key", "type"], + "additionalProperties": false + }, + "Form.Value": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/Union_00be4ed53f19" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Form.When": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "op": { + "type": "string", + "enum": ["eq", "neq"] + }, + "value": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/Union_00be4ed53f19" + }, + { + "type": "boolean" + } + ] + } + }, + "required": ["key", "op", "value"], + "additionalProperties": false + }, + "FormAlreadySettledErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["FormAlreadySettledError"] + }, + "id": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "id", "message"], + "additionalProperties": false + }, + "FormInvalidAnswerErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["FormInvalidAnswerError"] + }, + "id": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "id", "message"], + "additionalProperties": false + }, + "FormNotFoundErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["FormNotFoundError"] + }, + "id": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "id", "message"], + "additionalProperties": false + }, + "GenerateTextResponse": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "text": { + "type": "string" + } + }, + "required": ["text"], + "additionalProperties": false + } + }, + "required": ["data"], + "additionalProperties": false + }, + "InstructionEntry.Info": { + "type": "object", + "properties": { + "key": { + "$ref": "#/components/schemas/InstructionEntry.Key" + }, + "value": { + "description": "JSON value attached to the session's instructions" + } + }, + "required": ["key", "value"], + "additionalProperties": false + }, + "InstructionEntry.Key": { + "type": "string", + "allOf": [ + { + "pattern": "^[a-z0-9][a-z0-9._-]*$", + "description": "Instruction entry key (lowercase alphanumerics plus . _ -)" + } + ] + }, + "InstructionEntryValueTooLargeErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["InstructionEntryValueTooLargeError"] + }, + "actualBytes": { + "type": "integer" + }, + "maxBytes": { + "type": "integer" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "actualBytes", "maxBytes", "message"], + "additionalProperties": false + }, + "Integration.AttemptEncoded": { + "type": "object", + "properties": { + "attemptID": { + "type": "string" + }, + "url": { + "type": "string" + }, + "instructions": { + "type": "string" + }, + "mode": { + "type": "string", + "enum": ["auto", "code"] + }, + "time": { + "$ref": "#/components/schemas/Objects_03af97aacac9" + } + }, + "required": ["attemptID", "url", "instructions", "mode", "time"], + "additionalProperties": false + }, + "Integration.AttemptStatus": { + "anyOf": [ + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["pending"] + }, + "time": { + "$ref": "#/components/schemas/Objects_03af97aacac9" + } + }, + "required": ["status", "time"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["complete"] + }, + "time": { + "$ref": "#/components/schemas/Objects_03af97aacac9" + } + }, + "required": ["status", "time"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["failed"] + }, + "message": { + "type": "string" + }, + "time": { + "$ref": "#/components/schemas/Objects_03af97aacac9" + } + }, + "required": ["status", "message", "time"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["expired"] + }, + "time": { + "$ref": "#/components/schemas/Objects_03af97aacac9" + } + }, + "required": ["status", "time"], + "additionalProperties": false + } + ] + }, + "Integration.CommandAttempt": { + "type": "object", + "properties": { + "attemptID": { + "type": "string" + }, + "time": { + "$ref": "#/components/schemas/Objects_03af97aacac9" + } + }, + "required": ["attemptID", "time"], + "additionalProperties": false + }, + "Integration.CommandAttemptStatus": { + "anyOf": [ + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["pending"] + }, + "message": { + "type": "string" + }, + "time": { + "$ref": "#/components/schemas/Objects_03af97aacac9" + } + }, + "required": ["status", "time"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["complete"] + }, + "time": { + "$ref": "#/components/schemas/Objects_03af97aacac9" + } + }, + "required": ["status", "time"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["failed"] + }, + "message": { + "type": "string" + }, + "time": { + "$ref": "#/components/schemas/Objects_03af97aacac9" + } + }, + "required": ["status", "message", "time"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["expired"] + }, + "time": { + "$ref": "#/components/schemas/Objects_03af97aacac9" + } + }, + "required": ["status", "time"], + "additionalProperties": false + } + ] + }, + "Integration.CommandMethod": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["command"] + }, + "label": { + "type": "string" + }, + "command": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": ["id", "type", "label", "command"], + "additionalProperties": false + }, + "Integration.EnvMethod": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["env"] + }, + "names": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": ["type", "names"], + "additionalProperties": false + }, + "Integration.Info": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "methods": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Integration.Method" + } + }, + "connections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Connection.Info" + } + } + }, + "required": ["id", "name", "methods", "connections"], + "additionalProperties": false + }, + "Integration.KeyMethod": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["key"] + }, + "label": { + "type": "string" + }, + "form": { + "$ref": "#/components/schemas/Form.Fields_1" + } + }, + "required": ["type"], + "additionalProperties": false + }, + "Integration.Method": { + "anyOf": [ + { + "$ref": "#/components/schemas/Integration.OAuthMethod" + }, + { + "$ref": "#/components/schemas/Integration.CommandMethod" + }, + { + "$ref": "#/components/schemas/Integration.KeyMethod" + }, + { + "$ref": "#/components/schemas/Integration.EnvMethod" + } + ] + }, + "Integration.OAuthMethod": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["oauth"] + }, + "label": { + "type": "string" + }, + "form": { + "$ref": "#/components/schemas/Form.Fields" + } + }, + "required": ["id", "type", "label"], + "additionalProperties": false + }, + "InvalidCursorErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["InvalidCursorError"] + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "message"], + "additionalProperties": false + }, + "InvalidRequestErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["InvalidRequestError"] + }, + "message": { + "type": "string" + }, + "kind": { + "$ref": "#/components/schemas/Union_f090cb615c84" + }, + "field": { + "$ref": "#/components/schemas/Union_f090cb615c84" + } + }, + "required": ["_tag", "message"], + "additionalProperties": false + }, + "Location.InfoEncoded": { + "type": "object", + "properties": { + "directory": { + "type": "string" + }, + "workspaceID": { + "type": "string", + "allOf": [ + { + "pattern": "^wrk" + } + ] + }, + "project": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "directory": { + "type": "string" + }, + "canonical": { + "type": "string" + } + }, + "required": ["id", "directory", "canonical"], + "additionalProperties": false + } + }, + "required": ["directory", "project"], + "additionalProperties": false + }, + "Location.Ref": { + "type": "object", + "properties": { + "directory": { + "type": "string" + }, + "workspaceID": { + "type": "string", + "allOf": [ + { + "pattern": "^wrk" + } + ] + } + }, + "required": ["directory"], + "additionalProperties": false + }, + "Mcp.LocalConfigEncoded": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["local"] + }, + "command": { + "type": "array", + "items": { + "type": "string" + } + }, + "cwd": { + "type": "string" + }, + "environment": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "disabled": { + "type": "boolean" + }, + "codemode": { + "type": "boolean" + }, + "timeout": { + "$ref": "#/components/schemas/Objects_7b507c2fd81f" + } + }, + "required": ["type", "command"], + "additionalProperties": false + }, + "Mcp.OAuthConfigEncoded": { + "type": "object", + "properties": { + "client_id": { + "type": "string" + }, + "client_secret": { + "type": "string" + }, + "scope": { + "type": "string" + }, + "callback_port": { + "type": "integer", + "allOf": [ + { + "minimum": 1, + "maximum": 65535 + } + ] + }, + "redirect_uri": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Mcp.RemoteConfigEncoded": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["remote"] + }, + "url": { + "type": "string" + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "oauth": { + "anyOf": [ + { + "$ref": "#/components/schemas/Mcp.OAuthConfigEncoded" + }, + { + "type": "boolean", + "enum": [false] + } + ] + }, + "disabled": { + "type": "boolean" + }, + "codemode": { + "type": "boolean" + }, + "timeout": { + "$ref": "#/components/schemas/Objects_7b507c2fd81f" + } + }, + "required": ["type", "url"], + "additionalProperties": false + }, + "Mcp.Resource": { + "type": "object", + "properties": { + "server": { + "type": "string" + }, + "name": { + "type": "string" + }, + "uri": { + "type": "string" + }, + "description": { + "type": "string" + }, + "mimeType": { + "type": "string" + } + }, + "required": ["server", "name", "uri"], + "additionalProperties": false + }, + "Mcp.ResourceCatalog": { + "type": "object", + "properties": { + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Mcp.Resource" + } + }, + "templates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Mcp.ResourceTemplate" + } + } + }, + "required": ["resources", "templates"], + "additionalProperties": false + }, + "Mcp.ResourceTemplate": { + "type": "object", + "properties": { + "server": { + "type": "string" + }, + "name": { + "type": "string" + }, + "uriTemplate": { + "type": "string" + }, + "description": { + "type": "string" + }, + "mimeType": { + "type": "string" + } + }, + "required": ["server", "name", "uriTemplate"], + "additionalProperties": false + }, + "Mcp.Server": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/Mcp.Status.Connected" + }, + { + "$ref": "#/components/schemas/Mcp.Status.Pending" + }, + { + "$ref": "#/components/schemas/Mcp.Status.Disabled" + }, + { + "$ref": "#/components/schemas/Mcp.Status.Failed" + }, + { + "$ref": "#/components/schemas/Mcp.Status.NeedsAuth" + } + ] + }, + "integrationID": { + "type": "string" + } + }, + "required": ["name", "status"], + "additionalProperties": false + }, + "Mcp.Status.Connected": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["connected"] + } + }, + "required": ["status"], + "additionalProperties": false + }, + "Mcp.Status.Disabled": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["disabled"] + } + }, + "required": ["status"], + "additionalProperties": false + }, + "Mcp.Status.Failed": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["failed"] + }, + "error": { + "type": "string" + } + }, + "required": ["status", "error"], + "additionalProperties": false + }, + "Mcp.Status.NeedsAuth": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["needs_auth"] + } + }, + "required": ["status"], + "additionalProperties": false + }, + "Mcp.Status.Pending": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["pending"] + } + }, + "required": ["status"], + "additionalProperties": false + }, + "McpServerNotFoundErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["McpServerNotFoundError"] + }, + "server": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "server", "message"], + "additionalProperties": false + }, + "MessageNotFoundErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["MessageNotFoundError"] + }, + "sessionID": { + "type": "string" + }, + "messageID": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "sessionID", "messageID", "message"], + "additionalProperties": false + }, + "Model.Capabilities": { + "type": "object", + "properties": { + "tools": { + "type": "boolean" + }, + "input": { + "type": "array", + "items": { + "type": "string" + } + }, + "output": { + "type": "array", + "items": { + "type": "string" + } + }, + "responsesWebsockets": { + "type": "boolean" + } + }, + "required": ["tools", "input", "output"], + "additionalProperties": false + }, + "Model.Compatibility": { + "type": "object", + "properties": { + "reasoningField": { + "$ref": "#/components/schemas/Model.ReasoningField" + }, + "maxTokensField": { + "$ref": "#/components/schemas/Model.MaxTokensField" + }, + "requireFinishReason": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "Model.Cost": { + "type": "object", + "properties": { + "tier": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["context"] + }, + "size": { + "type": "integer" + } + }, + "required": ["type", "size"], + "additionalProperties": false + }, + "input": { + "$ref": "#/components/schemas/Money.USDPerMillionTokens" + }, + "output": { + "$ref": "#/components/schemas/Money.USDPerMillionTokens" + }, + "cache": { + "type": "object", + "properties": { + "read": { + "$ref": "#/components/schemas/Money.USDPerMillionTokens" + }, + "write": { + "$ref": "#/components/schemas/Money.USDPerMillionTokens" + } + }, + "required": ["read", "write"], + "additionalProperties": false + } + }, + "required": ["input", "output", "cache"], + "additionalProperties": false + }, + "Model.Info": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "modelID": { + "type": "string" + }, + "providerID": { + "type": "string" + }, + "family": { + "type": "string" + }, + "name": { + "type": "string" + }, + "compatibility": { + "$ref": "#/components/schemas/Model.Compatibility" + }, + "package": { + "type": "string" + }, + "settings": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "headers": { + "$ref": "#/components/schemas/Objects_3f161562db4a" + }, + "body": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "capabilities": { + "$ref": "#/components/schemas/Model.Capabilities" + }, + "variants": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Model.Variant" + } + }, + "time": { + "type": "object", + "properties": { + "released": { + "type": "number" + } + }, + "required": ["released"], + "additionalProperties": false + }, + "cost": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Model.Cost" + } + }, + "status": { + "type": "string", + "enum": ["alpha", "beta", "deprecated", "active"] + }, + "enabled": { + "type": "boolean" + }, + "limit": { + "type": "object", + "properties": { + "context": { + "type": "integer" + }, + "input": { + "type": "integer" + }, + "output": { + "type": "integer" + } + }, + "required": ["context", "output"], + "additionalProperties": false + } + }, + "required": [ + "id", + "modelID", + "providerID", + "name", + "capabilities", + "variants", + "time", + "cost", + "status", + "enabled", + "limit" + ], + "additionalProperties": false + }, + "Model.MaxTokensField": { + "type": "string", + "enum": ["max_completion_tokens", "max_tokens"] + }, + "Model.ReasoningField": { + "anyOf": [ + { + "type": "string", + "enum": ["reasoning", "reasoning_content", "reasoning_text"] + }, + { + "type": "string" + } + ] + }, + "Model.Ref": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "providerID": { + "type": "string" + }, + "variant": { + "type": "string" + } + }, + "required": ["id", "providerID"], + "additionalProperties": false + }, + "Model.Variant": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "settings": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "headers": { + "$ref": "#/components/schemas/Objects_3f161562db4a" + }, + "body": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + } + }, + "required": ["id"], + "additionalProperties": false + }, + "Money.USD": { + "type": "number" + }, + "Money.USDPerMillionTokens": { + "type": "number" + }, + "Objects_03af97aacac9": { + "type": "object", + "properties": { + "created": { + "$ref": "#/components/schemas/Union_00be4ed53f19" + }, + "expires": { + "$ref": "#/components/schemas/Union_00be4ed53f19" + } + }, + "required": ["created", "expires"], + "additionalProperties": false + }, + "Objects_3f161562db4a": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "Objects_7b507c2fd81f": { + "type": "object", + "properties": { + "startup": { + "type": "integer", + "allOf": [ + { + "exclusiveMinimum": 0 + } + ] + }, + "catalog": { + "type": "integer", + "allOf": [ + { + "exclusiveMinimum": 0 + } + ] + }, + "execution": { + "type": "integer", + "allOf": [ + { + "exclusiveMinimum": 0 + } + ] + } + }, + "additionalProperties": false + }, + "Objects_9d53a00b1efb": { + "type": "object", + "properties": { + "output": { + "type": "string" + }, + "cursor": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "size": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "truncated": { + "type": "boolean" + } + }, + "required": ["output", "cursor", "size", "truncated"], + "additionalProperties": false + }, + "Objects_a2c799262a3c": { + "type": "object" + }, + "Objects_d7bbfd8ec2f6": { + "type": "object", + "properties": { + "created": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false + }, + "Permission.Effect": { + "type": "string", + "enum": ["allow", "deny", "ask"] + }, + "Permission.Reply": { + "type": "string", + "enum": ["once", "always", "reject"] + }, + "Permission.Request": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^per" + } + ] + }, + "sessionID": { + "type": "string", + "allOf": [ + { + "pattern": "^ses" + } + ] + }, + "action": { + "type": "string" + }, + "resources": { + "$ref": "#/components/schemas/Arrays_681004346c78" + }, + "save": { + "$ref": "#/components/schemas/Arrays_681004346c78" + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "source": { + "$ref": "#/components/schemas/Permission.Source" + } + }, + "required": ["id", "sessionID", "action", "resources"], + "additionalProperties": false + }, + "Permission.Rule": { + "type": "object", + "properties": { + "action": { + "type": "string" + }, + "resource": { + "type": "string" + }, + "effect": { + "$ref": "#/components/schemas/Permission.Effect" + } + }, + "required": ["action", "resource", "effect"], + "additionalProperties": false + }, + "Permission.Ruleset": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Permission.Rule" + } + }, + "Permission.Source": { + "anyOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["tool"] + }, + "messageID": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "required": ["type", "messageID", "id"], + "additionalProperties": false + } + ] + }, + "PermissionNotFoundErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["PermissionNotFoundError"] + }, + "requestID": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "requestID", "message"], + "additionalProperties": false + }, + "PermissionSaved.Info": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "projectID": { + "type": "string" + }, + "action": { + "type": "string" + }, + "resource": { + "type": "string" + } + }, + "required": ["id", "projectID", "action", "resource"], + "additionalProperties": false + }, + "Plugin.Info": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "source": { + "$ref": "#/components/schemas/Plugin.Source" + }, + "status": { + "type": "string", + "enum": ["active"] + }, + "tui": { + "type": "boolean" + } + }, + "required": ["id", "source", "status", "tui"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "source": { + "$ref": "#/components/schemas/Plugin.Source" + }, + "status": { + "type": "string", + "enum": ["failed"] + }, + "error": { + "type": "string" + }, + "tui": { + "type": "boolean" + } + }, + "required": ["source", "status", "error", "tui"], + "additionalProperties": false + } + ] + }, + "Plugin.Source": { + "anyOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["builtin"] + } + }, + "required": ["type"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["package"] + }, + "package": { + "type": "string" + } + }, + "required": ["type", "package"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["local"] + }, + "path": { + "type": "string" + } + }, + "required": ["type", "path"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["sdk"] + } + }, + "required": ["type"], + "additionalProperties": false + } + ] + }, + "Project": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "canonical": { + "type": "string" + }, + "vcs": { + "$ref": "#/components/schemas/Project.Vcs" + }, + "name": { + "type": "string" + }, + "icon": { + "$ref": "#/components/schemas/Project.Icon" + }, + "commands": { + "$ref": "#/components/schemas/Project.Commands" + }, + "time": { + "$ref": "#/components/schemas/Project.Time" + }, + "sandboxes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": ["id", "canonical", "time", "sandboxes"], + "additionalProperties": false + }, + "Project.Commands": { + "type": "object", + "properties": { + "start": { + "type": "string", + "description": "Startup script to run when creating a new workspace (worktree)" + } + }, + "additionalProperties": false + }, + "Project.Current": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "directory": { + "type": "string" + }, + "canonical": { + "type": "string" + } + }, + "required": ["id", "directory", "canonical"], + "additionalProperties": false + }, + "Project.Icon": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "override": { + "type": "string" + }, + "color": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Project.Time": { + "type": "object", + "properties": { + "created": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "updated": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "initialized": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + } + }, + "required": ["created", "updated"], + "additionalProperties": false + }, + "Project.Vcs": { + "type": "string", + "enum": ["git", "hg"] + }, + "Prompt.AgentAttachment": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "mention": { + "$ref": "#/components/schemas/Prompt.Mention" + } + }, + "required": ["name"], + "additionalProperties": false + }, + "Prompt.Base64": { + "type": "string", + "allOf": [ + { + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" + } + ] + }, + "Prompt.FileAttachment": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Prompt.Base64" + }, + "mime": { + "type": "string" + }, + "source": { + "$ref": "#/components/schemas/Prompt.FileSource" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "mention": { + "$ref": "#/components/schemas/Prompt.Mention" + } + }, + "required": ["data", "mime", "source"], + "additionalProperties": false + }, + "Prompt.FileSource": { + "anyOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["inline"] + } + }, + "required": ["type"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["uri"] + }, + "uri": { + "type": "string" + } + }, + "required": ["type", "uri"], + "additionalProperties": false + } + ] + }, + "Prompt.Mention": { + "type": "object", + "properties": { + "start": { + "type": "number" + }, + "end": { + "type": "number" + }, + "text": { + "type": "string" + } + }, + "required": ["start", "end", "text"], + "additionalProperties": false + }, + "Prompt.SkillAttachment": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "mention": { + "$ref": "#/components/schemas/Prompt.Mention" + } + }, + "required": ["id", "name"], + "additionalProperties": false + }, + "PromptInput.FileAttachment": { + "type": "object", + "properties": { + "uri": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "mention": { + "$ref": "#/components/schemas/Prompt.Mention" + } + }, + "required": ["uri"], + "additionalProperties": false + }, + "PromptInput.SkillAttachment": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "mention": { + "$ref": "#/components/schemas/Prompt.Mention" + } + }, + "required": ["id"], + "additionalProperties": false + }, + "Provider.Info": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "integrationID": { + "type": "string" + }, + "name": { + "type": "string" + }, + "activation": { + "type": "string", + "enum": ["auto", "enabled", "disabled"] + }, + "package": { + "type": "string" + }, + "settings": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "headers": { + "$ref": "#/components/schemas/Objects_3f161562db4a" + }, + "body": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + } + }, + "required": ["id", "name", "activation", "package"], + "additionalProperties": false + }, + "Provider.Request": { + "type": "object", + "properties": { + "settings": { + "$ref": "#/components/schemas/Provider.Settings" + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "body": { + "type": "object" + } + }, + "required": ["settings", "headers", "body"], + "additionalProperties": false + }, + "Provider.Settings": { + "type": "object" + }, + "ProviderNotFoundErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["ProviderNotFoundError"] + }, + "providerID": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "providerID", "message"], + "additionalProperties": false + }, + "Pty": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^pty" + } + ] + }, + "title": { + "type": "string" + }, + "command": { + "type": "string" + }, + "args": { + "type": "array", + "items": { + "type": "string" + } + }, + "cwd": { + "type": "string" + }, + "status": { + "type": "string", + "enum": ["running", "exited"] + }, + "pid": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "exitCode": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + } + }, + "required": ["id", "title", "command", "args", "cwd", "status", "pid"], + "additionalProperties": false + }, + "PtyNotFoundErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["PtyNotFoundError"] + }, + "ptyID": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "ptyID", "message"], + "additionalProperties": false + }, + "PtyTicket.ConnectToken": { + "type": "object", + "properties": { + "ticket": { + "type": "string" + }, + "expires_in": { + "type": "integer", + "allOf": [ + { + "exclusiveMinimum": 0 + } + ] + } + }, + "required": ["ticket", "expires_in"], + "additionalProperties": false + }, + "Reference.GitSource": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["git"] + }, + "repository": { + "type": "string" + }, + "branch": { + "type": "string" + }, + "description": { + "type": "string" + }, + "hidden": { + "type": "boolean" + } + }, + "required": ["type", "repository"], + "additionalProperties": false + }, + "Reference.Info": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "description": { + "type": "string" + }, + "hidden": { + "type": "boolean" + }, + "source": { + "$ref": "#/components/schemas/Reference.Source" + } + }, + "required": ["name", "path", "source"], + "additionalProperties": false + }, + "Reference.LocalSource": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["local"] + }, + "path": { + "type": "string" + }, + "description": { + "type": "string" + }, + "hidden": { + "type": "boolean" + } + }, + "required": ["type", "path"], + "additionalProperties": false + }, + "Reference.Source": { + "anyOf": [ + { + "$ref": "#/components/schemas/Reference.LocalSource" + }, + { + "$ref": "#/components/schemas/Reference.GitSource" + } + ] + }, + "ServiceHealth": { + "type": "object", + "properties": { + "healthy": { + "type": "boolean", + "enum": [true] + }, + "version": { + "type": "string" + }, + "pid": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + } + }, + "required": ["healthy", "version", "pid"], + "additionalProperties": false + }, + "ServiceUnavailableErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["ServiceUnavailableError"] + }, + "message": { + "type": "string" + }, + "service": { + "$ref": "#/components/schemas/Union_f090cb615c84" + } + }, + "required": ["_tag", "message"], + "additionalProperties": false + }, + "Session.ForkBoundary": { + "anyOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["before"] + }, + "messageID": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + } + }, + "required": ["type", "messageID"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["through"] + }, + "messageID": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + } + }, + "required": ["type", "messageID"], + "additionalProperties": false + } + ] + }, + "Session.ForkRequestBoundary": { + "anyOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["before"] + }, + "messageID": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + } + }, + "required": ["type", "messageID"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["through"] + } + }, + "required": ["type"], + "additionalProperties": false + } + ] + }, + "Session.Inbox.Compaction": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "sessionID": { + "type": "string", + "allOf": [ + { + "pattern": "^ses" + } + ] + }, + "timeCreated": { + "type": "number" + }, + "type": { + "type": "string", + "enum": ["compaction"] + }, + "payload": { + "$ref": "#/components/schemas/Session.Inbox.CompactionPayload" + }, + "delivery": { + "$ref": "#/components/schemas/Session.Inbox.Delivery" + } + }, + "required": ["id", "sessionID", "timeCreated", "type", "payload", "delivery"], + "additionalProperties": false + }, + "Session.Inbox.CompactionPayload": { + "anyOf": [ + { + "type": "object" + }, + { + "type": "array" + } + ] + }, + "Session.Inbox.Delivery": { + "type": "string", + "enum": ["steer", "queue"] + }, + "Session.Inbox.Info": { + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Inbox.User" + }, + { + "$ref": "#/components/schemas/Session.Inbox.Synthetic" + }, + { + "$ref": "#/components/schemas/Session.Inbox.Compaction" + }, + { + "$ref": "#/components/schemas/Session.Inbox.Move" + } + ] + }, + "Session.Inbox.Move": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "sessionID": { + "type": "string", + "allOf": [ + { + "pattern": "^ses" + } + ] + }, + "timeCreated": { + "type": "number" + }, + "type": { + "type": "string", + "enum": ["move"] + }, + "payload": { + "$ref": "#/components/schemas/Session.Inbox.MovePayload" + }, + "delivery": { + "$ref": "#/components/schemas/Session.Inbox.Delivery" + } + }, + "required": ["id", "sessionID", "timeCreated", "type", "payload", "delivery"], + "additionalProperties": false + }, + "Session.Inbox.MovePayload": { + "type": "object", + "properties": { + "location": { + "$ref": "#/components/schemas/Location.Ref" + }, + "projectID": { + "type": "string" + }, + "subpath": { + "type": "string" + } + }, + "required": ["location", "projectID"], + "additionalProperties": false + }, + "Session.Inbox.Synthetic": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "sessionID": { + "type": "string", + "allOf": [ + { + "pattern": "^ses" + } + ] + }, + "timeCreated": { + "type": "number" + }, + "type": { + "type": "string", + "enum": ["synthetic"] + }, + "payload": { + "$ref": "#/components/schemas/Session.Inbox.SyntheticPayload" + }, + "delivery": { + "$ref": "#/components/schemas/Session.Inbox.Delivery" + } + }, + "required": ["id", "sessionID", "timeCreated", "type", "payload", "delivery"], + "additionalProperties": false + }, + "Session.Inbox.SyntheticPayload": { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "description": { + "type": "string" + }, + "metadata": { + "type": "object" + } + }, + "required": ["text"], + "additionalProperties": false + }, + "Session.Inbox.User": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "sessionID": { + "type": "string", + "allOf": [ + { + "pattern": "^ses" + } + ] + }, + "timeCreated": { + "type": "number" + }, + "type": { + "type": "string", + "enum": ["user"] + }, + "payload": { + "$ref": "#/components/schemas/Session.Inbox.UserPayload" + }, + "delivery": { + "$ref": "#/components/schemas/Session.Inbox.Delivery" + } + }, + "required": ["id", "sessionID", "timeCreated", "type", "payload", "delivery"], + "additionalProperties": false + }, + "Session.Inbox.UserPayload": { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "files": { + "$ref": "#/components/schemas/Arrays_042d796a7901" + }, + "agents": { + "$ref": "#/components/schemas/Arrays_e1027de4b984" + }, + "skills": { + "$ref": "#/components/schemas/Arrays_92aa8803e81f" + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + } + }, + "required": ["text"], + "additionalProperties": false + }, + "Session.Info": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^ses" + } + ] + }, + "parentID": { + "type": "string", + "allOf": [ + { + "pattern": "^ses" + } + ] + }, + "fork": { + "type": "object", + "properties": { + "sessionID": { + "type": "string", + "allOf": [ + { + "pattern": "^ses" + } + ] + }, + "boundary": { + "$ref": "#/components/schemas/Session.ForkBoundary" + } + }, + "required": ["sessionID", "boundary"], + "additionalProperties": false + }, + "projectID": { + "type": "string" + }, + "agent": { + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/Model.Ref" + }, + "cost": { + "$ref": "#/components/schemas/Money.USD" + }, + "tokens": { + "$ref": "#/components/schemas/TokenUsage.Info" + }, + "outcome": { + "type": "string", + "enum": ["succeeded", "failed", "interrupted"] + }, + "time": { + "type": "object", + "properties": { + "created": { + "type": "number" + }, + "updated": { + "type": "number" + }, + "idle": { + "type": "number" + }, + "viewed": { + "type": "number" + }, + "archived": { + "type": "number" + } + }, + "required": ["created", "updated"], + "additionalProperties": false + }, + "title": { + "type": "string" + }, + "location": { + "$ref": "#/components/schemas/Location.Ref" + }, + "subpath": { + "type": "string" + }, + "revert": { + "$ref": "#/components/schemas/Session.Revert" + } + }, + "required": ["id", "projectID", "cost", "tokens", "time", "location"], + "additionalProperties": false + }, + "Session.Message.AgentSelected": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + }, + "type": { + "type": "string", + "enum": ["agent-switched"] + }, + "agent": { + "type": "string" + }, + "previous": { + "type": "string" + } + }, + "required": ["id", "time", "type", "agent"], + "additionalProperties": false + }, + "Session.Message.Assistant": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "type": "object", + "properties": { + "created": { + "type": "number" + }, + "completed": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": ["assistant"] + }, + "agent": { + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/Model.Ref" + }, + "content": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Message.Assistant.Text" + }, + { + "$ref": "#/components/schemas/Session.Message.Assistant.Reasoning" + }, + { + "$ref": "#/components/schemas/Session.Message.Assistant.Tool" + } + ] + } + }, + "snapshot": { + "type": "object", + "properties": { + "start": { + "type": "string" + }, + "end": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "finish": { + "type": "string", + "enum": ["stop", "length", "tool-calls", "content-filter", "error", "unknown"] + }, + "rawFinish": { + "type": "string" + }, + "providerState": { + "$ref": "#/components/schemas/Session.Message.ProviderState_4" + }, + "cost": { + "$ref": "#/components/schemas/Money.USD" + }, + "tokens": { + "$ref": "#/components/schemas/TokenUsage.Info" + }, + "error": { + "$ref": "#/components/schemas/Session.StructuredError" + }, + "retry": { + "$ref": "#/components/schemas/Session.Message.Assistant.Retry" + } + }, + "required": ["id", "time", "type", "agent", "model", "content"], + "additionalProperties": false + }, + "Session.Message.Assistant.Reasoning": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["reasoning"] + }, + "text": { + "type": "string" + }, + "state": { + "$ref": "#/components/schemas/Session.Message.ProviderState_1" + }, + "time": { + "type": "object", + "properties": { + "created": { + "type": "number" + }, + "completed": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false + } + }, + "required": ["type", "text"], + "additionalProperties": false + }, + "Session.Message.Assistant.Retry": { + "type": "object", + "properties": { + "attempt": { + "type": "integer", + "allOf": [ + { + "exclusiveMinimum": 0 + } + ] + }, + "at": { + "type": "number" + }, + "error": { + "$ref": "#/components/schemas/Session.StructuredError" + } + }, + "required": ["attempt", "at", "error"], + "additionalProperties": false + }, + "Session.Message.Assistant.Text": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["text"] + }, + "text": { + "type": "string" + }, + "state": { + "$ref": "#/components/schemas/Session.Message.ProviderState" + } + }, + "required": ["type", "text"], + "additionalProperties": false + }, + "Session.Message.Assistant.Tool": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["tool"] + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "executed": { + "type": "boolean" + }, + "providerState": { + "$ref": "#/components/schemas/Session.Message.ProviderState_2" + }, + "providerResultState": { + "$ref": "#/components/schemas/Session.Message.ProviderState_3" + }, + "state": { + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Message.ToolState.Streaming" + }, + { + "$ref": "#/components/schemas/Session.Message.ToolState.Running" + }, + { + "$ref": "#/components/schemas/Session.Message.ToolState.Completed" + }, + { + "$ref": "#/components/schemas/Session.Message.ToolState.Error" + } + ] + }, + "time": { + "type": "object", + "properties": { + "created": { + "type": "number" + }, + "ran": { + "type": "number" + }, + "completed": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false + } + }, + "required": ["type", "id", "name", "state", "time"], + "additionalProperties": false + }, + "Session.Message.Compaction": { + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Message.Compaction.Running" + }, + { + "$ref": "#/components/schemas/Session.Message.Compaction.Completed" + }, + { + "$ref": "#/components/schemas/Session.Message.Compaction.Failed" + } + ] + }, + "Session.Message.Compaction.Completed": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["compaction"] + }, + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + }, + "status": { + "type": "string", + "enum": ["completed"] + }, + "reason": { + "type": "string", + "enum": ["auto", "manual"] + }, + "summary": { + "type": "string" + }, + "recent": { + "type": "string" + } + }, + "required": ["type", "id", "time", "status", "reason", "summary", "recent"], + "additionalProperties": false + }, + "Session.Message.Compaction.Failed": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["compaction"] + }, + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + }, + "status": { + "type": "string", + "enum": ["failed"] + }, + "reason": { + "type": "string", + "enum": ["auto", "manual"] + }, + "error": { + "$ref": "#/components/schemas/Session.StructuredError" + } + }, + "required": ["type", "id", "time", "status", "reason", "error"], + "additionalProperties": false + }, + "Session.Message.Compaction.Running": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["compaction"] + }, + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + }, + "status": { + "type": "string", + "enum": ["running"] + }, + "reason": { + "type": "string", + "enum": ["auto", "manual"] + }, + "summary": { + "type": "string" + }, + "recent": { + "type": "string" + } + }, + "required": ["type", "id", "time", "status", "reason", "summary", "recent"], + "additionalProperties": false + }, + "Session.Message.Info": { + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Message.AgentSelected" + }, + { + "$ref": "#/components/schemas/Session.Message.ModelSelected" + }, + { + "$ref": "#/components/schemas/Session.Message.LocationSwitched" + }, + { + "$ref": "#/components/schemas/Session.Message.User" + }, + { + "$ref": "#/components/schemas/Session.Message.Synthetic" + }, + { + "$ref": "#/components/schemas/Session.Message.System" + }, + { + "$ref": "#/components/schemas/Session.Message.Skill" + }, + { + "$ref": "#/components/schemas/Session.Message.Shell" + }, + { + "$ref": "#/components/schemas/Session.Message.Assistant" + }, + { + "$ref": "#/components/schemas/Session.Message.Compaction" + } + ] + }, + "Session.Message.LocationSwitched": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + }, + "type": { + "type": "string", + "enum": ["location-switched"] + }, + "location": { + "$ref": "#/components/schemas/Location.Ref" + }, + "projectID": { + "type": "string" + }, + "subpath": { + "type": "string" + }, + "previous": { + "type": "object", + "properties": { + "location": { + "$ref": "#/components/schemas/Location.Ref" + }, + "projectID": { + "type": "string" + }, + "subpath": { + "type": "string" + } + }, + "required": ["location"], + "additionalProperties": false + } + }, + "required": ["id", "time", "type", "location"], + "additionalProperties": false + }, + "Session.Message.ModelSelected": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + }, + "type": { + "type": "string", + "enum": ["model-switched"] + }, + "model": { + "$ref": "#/components/schemas/Model.Ref" + }, + "previous": { + "$ref": "#/components/schemas/Model.Ref" + } + }, + "required": ["id", "time", "type", "model"], + "additionalProperties": false + }, + "Session.Message.ProviderState": { + "type": "object" + }, + "Session.Message.ProviderState_1": { + "type": "object" + }, + "Session.Message.ProviderState_2": { + "type": "object" + }, + "Session.Message.ProviderState_3": { + "type": "object" + }, + "Session.Message.ProviderState_4": { + "type": "object" + }, + "Session.Message.Shell": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "type": "object", + "properties": { + "created": { + "type": "number" + }, + "completed": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": ["shell"] + }, + "shellID": { + "type": "string", + "allOf": [ + { + "pattern": "^sh_" + } + ] + }, + "command": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/Union_b6d68a8b3572" + }, + "exit": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/components/schemas/Union_97d8d2942510" + } + ] + }, + "output": { + "$ref": "#/components/schemas/Objects_9d53a00b1efb" + } + }, + "required": ["id", "time", "type", "shellID", "command", "status"], + "additionalProperties": false + }, + "Session.Message.Skill": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + }, + "type": { + "type": "string", + "enum": ["skill"] + }, + "skill": { + "type": "string" + }, + "name": { + "type": "string" + }, + "text": { + "type": "string" + } + }, + "required": ["id", "time", "type", "skill", "name", "text"], + "additionalProperties": false + }, + "Session.Message.Synthetic": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + }, + "text": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["synthetic"] + } + }, + "required": ["id", "time", "text", "type"], + "additionalProperties": false + }, + "Session.Message.System": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + }, + "type": { + "type": "string", + "enum": ["system"] + }, + "text": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": ["id", "time", "type", "text"], + "additionalProperties": false + }, + "Session.Message.ToolState.Completed": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["completed"] + }, + "input": { + "type": "object" + }, + "content": { + "type": "array", + "prefixItems": [ + { + "$ref": "#/components/schemas/Tool.Content" + } + ], + "minItems": 1, + "items": { + "$ref": "#/components/schemas/Tool.Content" + } + }, + "metadata": { + "type": "object" + } + }, + "required": ["status", "input", "content"], + "additionalProperties": false + }, + "Session.Message.ToolState.Error": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["error"] + }, + "input": { + "type": "object" + }, + "error": { + "$ref": "#/components/schemas/Session.StructuredError" + }, + "content": { + "type": "array", + "prefixItems": [ + { + "$ref": "#/components/schemas/Tool.Content" + } + ], + "minItems": 1, + "items": { + "$ref": "#/components/schemas/Tool.Content" + } + }, + "metadata": { + "type": "object" + } + }, + "required": ["status", "input", "error"], + "additionalProperties": false + }, + "Session.Message.ToolState.Running": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["running"] + }, + "input": { + "type": "object" + }, + "metadata": { + "type": "object" + } + }, + "required": ["status", "input", "metadata"], + "additionalProperties": false + }, + "Session.Message.ToolState.Streaming": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["streaming"] + }, + "input": { + "type": "string" + } + }, + "required": ["status", "input"], + "additionalProperties": false + }, + "Session.Message.User": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + }, + "text": { + "type": "string" + }, + "files": { + "$ref": "#/components/schemas/Arrays_042d796a7901" + }, + "agents": { + "$ref": "#/components/schemas/Arrays_e1027de4b984" + }, + "skills": { + "$ref": "#/components/schemas/Arrays_92aa8803e81f" + }, + "type": { + "type": "string", + "enum": ["user"] + } + }, + "required": ["id", "time", "text", "type"], + "additionalProperties": false + }, + "Session.Revert": { + "type": "object", + "properties": { + "messageID": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "partID": { + "type": "string" + }, + "snapshot": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FileDiff.Info" + } + } + }, + "required": ["messageID"], + "additionalProperties": false + }, + "Session.StructuredError": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer", + "allOf": [ + { + "minimum": 100, + "maximum": 599 + } + ] + } + }, + "required": ["type", "message"], + "additionalProperties": false + }, + "SessionActive": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["running"] + } + }, + "required": ["type"], + "additionalProperties": false + }, + "SessionBusyErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["SessionBusyError"] + }, + "sessionID": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "sessionID", "message"], + "additionalProperties": false + }, + "SessionGenerateResponse": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "text": { + "type": "string" + } + }, + "required": ["text"], + "additionalProperties": false + } + }, + "required": ["data"], + "additionalProperties": false + }, + "SessionLogItemEncoded": { + "type": "string", + "contentMediaType": "application/json" + }, + "SessionMessagesResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Session.Message.Info" + } + }, + "cursor": { + "type": "object", + "properties": { + "previous": { + "$ref": "#/components/schemas/Union_f090cb615c84" + }, + "next": { + "$ref": "#/components/schemas/Union_f090cb615c84" + } + }, + "additionalProperties": false + } + }, + "required": ["data", "cursor"], + "additionalProperties": false + }, + "SessionNotFoundErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["SessionNotFoundError"] + }, + "sessionID": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "sessionID", "message"], + "additionalProperties": false + }, + "SessionTransfer.Data": { + "type": "object", + "properties": { + "info": { + "$ref": "#/components/schemas/Session.Info" + }, + "messages": { + "$ref": "#/components/schemas/Arrays_fa246a9267ec" + } + }, + "required": ["info", "messages"], + "additionalProperties": false + }, + "SessionsResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Session.Info" + } + }, + "cursor": { + "type": "object", + "properties": { + "previous": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "next": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + }, + "required": ["data", "cursor"], + "additionalProperties": false + }, + "Shell.Info": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^sh_" + } + ] + }, + "status": { + "$ref": "#/components/schemas/Union_b6d68a8b3572" + }, + "command": { + "type": "string" + }, + "cwd": { + "type": "string" + }, + "shell": { + "type": "string" + }, + "file": { + "type": "string" + }, + "pid": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "exit": { + "type": "number" + }, + "metadata": { + "type": "object" + }, + "time": { + "type": "object", + "properties": { + "started": { + "type": "number" + }, + "completed": { + "type": "number" + } + }, + "required": ["started"], + "additionalProperties": false + } + }, + "required": ["id", "status", "command", "cwd", "shell", "file", "metadata", "time"], + "additionalProperties": false + }, + "ShellNotFoundErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["ShellNotFoundError"] + }, + "id": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "id", "message"], + "additionalProperties": false + }, + "Skill.Info": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "slash": { + "type": "boolean" + }, + "autoinvoke": { + "type": "boolean" + }, + "location": { + "type": "string" + }, + "content": { + "type": "string" + } + }, + "required": ["id", "name", "location", "content"], + "additionalProperties": false + }, + "SkillNotFoundErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["SkillNotFoundError"] + }, + "skill": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "skill", "message"], + "additionalProperties": false + }, + "TokenUsage.Info": { + "type": "object", + "properties": { + "input": { + "type": "number" + }, + "output": { + "type": "number" + }, + "reasoning": { + "type": "number" + }, + "cache": { + "type": "object", + "properties": { + "read": { + "type": "number" + }, + "write": { + "type": "number" + } + }, + "required": ["read", "write"], + "additionalProperties": false + } + }, + "required": ["input", "output", "reasoning", "cache"], + "additionalProperties": false + }, + "Tool.Content": { + "anyOf": [ + { + "$ref": "#/components/schemas/Tool.TextContent" + }, + { + "$ref": "#/components/schemas/Tool.FileContent" + } + ] + }, + "Tool.FileContent": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["file"] + }, + "uri": { + "type": "string" + }, + "mime": { + "type": "string" + }, + "name": { + "$ref": "#/components/schemas/Union_f090cb615c84" + } + }, + "required": ["type", "uri", "mime"], + "additionalProperties": false + }, + "Tool.TextContent": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["text"] + }, + "text": { + "type": "string" + } + }, + "required": ["type", "text"], + "additionalProperties": false + }, + "UnauthorizedErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["UnauthorizedError"] + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "message"], + "additionalProperties": false + }, + "Union_00be4ed53f19": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/components/schemas/Union_97d8d2942510" + } + ] + }, + "Union_1f50b1b03235": { + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Inbox.Delivery" + }, + { + "type": "null" + } + ] + }, + "Union_5ee94d3ca88d": { + "anyOf": [ + { + "$ref": "#/components/schemas/Location.Ref" + }, + { + "type": "null" + } + ] + }, + "Union_636af7bc29f5": { + "anyOf": [ + { + "$ref": "#/components/schemas/Form.Answer" + }, + { + "type": "null" + } + ] + }, + "Union_6a162d0a021d": { + "anyOf": [ + { + "$ref": "#/components/schemas/Model.Ref" + }, + { + "type": "null" + } + ] + }, + "Union_6a1762611a44": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] + }, + "Union_85ca62cf1a33": { + "anyOf": [ + { + "type": "string", + "allOf": [ + { + "pattern": "^[^/#]+\\/[^#]+(?:#[^#]+)?$" + } + ] + }, + { + "type": "object", + "properties": { + "providerID": { + "type": "string", + "allOf": [ + { + "pattern": "^[^/#]+$" + } + ] + }, + "model": { + "type": "string", + "allOf": [ + { + "pattern": "^[^#]+$" + } + ] + }, + "variant": { + "type": "string", + "allOf": [ + { + "pattern": "^[^#]+$" + } + ] + } + }, + "required": ["providerID", "model"], + "additionalProperties": false + } + ] + }, + "Union_97d8d2942510": { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + }, + "Union_b6d68a8b3572": { + "type": "string", + "enum": ["running", "exited", "timeout", "killed"] + }, + "Union_e13209ef6bf4": { + "anyOf": [ + { + "type": "string", + "enum": ["true", "false"] + }, + { + "type": "null" + } + ] + }, + "Union_f090cb615c84": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "Union_f8b4c9e24aa0": { + "anyOf": [ + { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + { + "type": "null" + } + ] + }, + "Union_ffefb7e3c81d": { + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "$ref": "#/components/schemas/Union_f090cb615c84" + }, + "workspace": { + "$ref": "#/components/schemas/Union_f090cb615c84" + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] + }, + "UnknownErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["UnknownError"] + }, + "message": { + "type": "string" + }, + "ref": { + "$ref": "#/components/schemas/Union_f090cb615c84" + } + }, + "required": ["_tag", "message"], + "additionalProperties": false + }, + "V2EventEncoded": { + "type": "string", + "contentMediaType": "application/json" + }, + "Vcs.Branch": { + "type": "object", + "properties": { + "current": { + "type": "string" + }, + "default": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Vcs.FileStatus": { + "type": "object", + "properties": { + "file": { + "type": "string" + }, + "additions": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "deletions": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "status": { + "type": "string", + "enum": ["added", "deleted", "modified"] + } + }, + "required": ["file", "additions", "deletions", "status"], + "additionalProperties": false + }, + "Vcs.Info": { + "type": "object", + "properties": { + "branch": { + "$ref": "#/components/schemas/Vcs.Branch" + } + }, + "required": ["branch"], + "additionalProperties": false + }, + "Vcs.Mode": { + "type": "string", + "enum": ["working", "branch"] + }, + "WebSearch.Provider": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": ["id", "name"], + "additionalProperties": false + }, + "WebSearch.ResponseEncoded": { + "type": "object", + "properties": { + "providerID": { + "type": "string" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WebSearch.Result" + } + } + }, + "required": ["providerID", "results"], + "additionalProperties": false + }, + "WebSearch.Result": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "title": { + "type": "string" + }, + "content": { + "type": "string" + }, + "time": { + "type": "object", + "properties": { + "published": { + "type": "number" + } + }, + "additionalProperties": false + } + }, + "required": ["url", "time"], + "additionalProperties": false + }, + "Worktree.Directory": { + "type": "object", + "properties": { + "directory": { + "type": "string" + }, + "strategy": { + "type": "string" + } + }, + "required": ["directory"], + "additionalProperties": false + }, + "Worktree.Info": { + "type": "object", + "properties": { + "directory": { + "type": "string" + } + }, + "required": ["directory"], + "additionalProperties": false + }, + "Worktree.List": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Worktree.Directory" + } + }, + "WorktreeErrorEncoded": { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": ["WorktreeError"] + }, + "data": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "forceRequired": { + "$ref": "#/components/schemas/Union_6a1762611a44" + } + }, + "required": ["message"], + "additionalProperties": false + } + }, + "required": ["name", "data"], + "additionalProperties": false } }, "securitySchemes": {} diff --git a/packages/www/public/openapi.json b/packages/www/public/openapi.json index c30875e4ad6..2a0a4ab9435 100644 --- a/packages/www/public/openapi.json +++ b/packages/www/public/openapi.json @@ -109,7 +109,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -162,7 +162,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -236,7 +236,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -309,7 +309,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -428,7 +428,7 @@ "name": "search", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_" + "$ref": "#/components/schemas/Union_f090cb615c84" }, "required": false }, @@ -637,16 +637,16 @@ ] }, "title": { - "$ref": "#/components/schemas/Union_" + "$ref": "#/components/schemas/Union_f090cb615c84" }, "agent": { - "$ref": "#/components/schemas/Union_2" + "$ref": "#/components/schemas/Union_f090cb615c84" }, "model": { - "$ref": "#/components/schemas/Union_3" + "$ref": "#/components/schemas/Union_6a162d0a021d" }, "location": { - "$ref": "#/components/schemas/Union_4" + "$ref": "#/components/schemas/Union_5ee94d3ca88d" } }, "additionalProperties": false @@ -724,10 +724,10 @@ "$ref": "#/components/schemas/Session.Info" }, "messages": { - "$ref": "#/components/schemas/Arrays_" + "$ref": "#/components/schemas/Arrays_fa246a9267ec" }, "location": { - "$ref": "#/components/schemas/Union_4" + "$ref": "#/components/schemas/Union_5ee94d3ca88d" } }, "required": ["info", "messages"], @@ -761,7 +761,7 @@ "name": "sanitize", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_7" + "$ref": "#/components/schemas/Union_e13209ef6bf4" }, "required": false } @@ -1459,7 +1459,7 @@ ] }, "delivery": { - "$ref": "#/components/schemas/Union_8" + "$ref": "#/components/schemas/Union_1f50b1b03235" } }, "required": ["directory"], @@ -1573,28 +1573,28 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/Union_9" + "$ref": "#/components/schemas/Union_f8b4c9e24aa0" }, "text": { "type": "string" }, "files": { - "$ref": "#/components/schemas/Arrays_4" + "$ref": "#/components/schemas/Arrays_3ff7cb2a474f" }, "agents": { - "$ref": "#/components/schemas/Arrays_5" + "$ref": "#/components/schemas/Arrays_e1027de4b984" }, "skills": { - "$ref": "#/components/schemas/Arrays_6" + "$ref": "#/components/schemas/Arrays_c17502465996" }, "metadata": { - "$ref": "#/components/schemas/Objects_3" + "$ref": "#/components/schemas/Objects_a2c799262a3c" }, "delivery": { - "$ref": "#/components/schemas/Union_8" + "$ref": "#/components/schemas/Union_1f50b1b03235" }, "resume": { - "$ref": "#/components/schemas/Union_10" + "$ref": "#/components/schemas/Union_6a1762611a44" } }, "required": ["text"], @@ -1721,34 +1721,34 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/Union_9" + "$ref": "#/components/schemas/Union_f8b4c9e24aa0" }, "command": { "type": "string" }, "arguments": { - "$ref": "#/components/schemas/Union_" + "$ref": "#/components/schemas/Union_f090cb615c84" }, "agent": { - "$ref": "#/components/schemas/Union_2" + "$ref": "#/components/schemas/Union_f090cb615c84" }, "model": { - "$ref": "#/components/schemas/Union_3" + "$ref": "#/components/schemas/Union_6a162d0a021d" }, "files": { - "$ref": "#/components/schemas/Arrays_4" + "$ref": "#/components/schemas/Arrays_3ff7cb2a474f" }, "agents": { - "$ref": "#/components/schemas/Arrays_5" + "$ref": "#/components/schemas/Arrays_e1027de4b984" }, "skills": { - "$ref": "#/components/schemas/Arrays_6" + "$ref": "#/components/schemas/Arrays_c17502465996" }, "delivery": { - "$ref": "#/components/schemas/Union_8" + "$ref": "#/components/schemas/Union_1f50b1b03235" }, "resume": { - "$ref": "#/components/schemas/Union_10" + "$ref": "#/components/schemas/Union_6a1762611a44" } }, "required": ["command"], @@ -1834,13 +1834,13 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/Union_9" + "$ref": "#/components/schemas/Union_f8b4c9e24aa0" }, "skill": { "type": "string" }, "resume": { - "$ref": "#/components/schemas/Union_10" + "$ref": "#/components/schemas/Union_6a1762611a44" } }, "required": ["skill"], @@ -1947,22 +1947,22 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/Union_9" + "$ref": "#/components/schemas/Union_f8b4c9e24aa0" }, "text": { "type": "string" }, "description": { - "$ref": "#/components/schemas/Union_" + "$ref": "#/components/schemas/Union_f090cb615c84" }, "metadata": { - "$ref": "#/components/schemas/Objects_" + "$ref": "#/components/schemas/Objects_a2c799262a3c" }, "delivery": { - "$ref": "#/components/schemas/Union_8" + "$ref": "#/components/schemas/Union_1f50b1b03235" }, "resume": { - "$ref": "#/components/schemas/Union_10" + "$ref": "#/components/schemas/Union_6a1762611a44" } }, "required": ["text"], @@ -2167,10 +2167,10 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/Union_9" + "$ref": "#/components/schemas/Union_f8b4c9e24aa0" }, "delivery": { - "$ref": "#/components/schemas/Union_8" + "$ref": "#/components/schemas/Union_1f50b1b03235" } }, "additionalProperties": false @@ -2373,7 +2373,7 @@ ] }, "files": { - "$ref": "#/components/schemas/Union_10" + "$ref": "#/components/schemas/Union_6a1762611a44" } }, "required": ["messageID"], @@ -3344,7 +3344,7 @@ "name": "follow", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_7" + "$ref": "#/components/schemas/Union_e13209ef6bf4" }, "required": false } @@ -3499,7 +3499,7 @@ "name": "continue", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_7" + "$ref": "#/components/schemas/Union_e13209ef6bf4" }, "required": false } @@ -4011,7 +4011,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4087,7 +4087,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4167,7 +4167,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4236,7 +4236,7 @@ "type": "string" }, "model": { - "$ref": "#/components/schemas/Union_3" + "$ref": "#/components/schemas/Union_6a162d0a021d" } }, "required": ["prompt"], @@ -4257,7 +4257,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4341,7 +4341,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4424,7 +4424,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4498,7 +4498,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4568,7 +4568,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4646,7 +4646,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4698,10 +4698,10 @@ "type": "string" }, "answer": { - "$ref": "#/components/schemas/Union_12" + "$ref": "#/components/schemas/Union_636af7bc29f5" }, "label": { - "$ref": "#/components/schemas/Union_" + "$ref": "#/components/schemas/Union_f090cb615c84" } }, "required": ["key"], @@ -4730,7 +4730,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4799,10 +4799,10 @@ "type": "string" }, "answer": { - "$ref": "#/components/schemas/Union_12" + "$ref": "#/components/schemas/Union_636af7bc29f5" }, "label": { - "$ref": "#/components/schemas/Union_" + "$ref": "#/components/schemas/Union_f090cb615c84" } }, "required": ["methodID"], @@ -4839,7 +4839,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4916,7 +4916,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -4978,7 +4978,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5027,7 +5027,7 @@ "type": "object", "properties": { "code": { - "$ref": "#/components/schemas/Union_" + "$ref": "#/components/schemas/Union_f090cb615c84" } }, "additionalProperties": false @@ -5055,7 +5055,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5124,7 +5124,7 @@ "type": "string" }, "label": { - "$ref": "#/components/schemas/Union_" + "$ref": "#/components/schemas/Union_f090cb615c84" } }, "required": ["methodID"], @@ -5161,7 +5161,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5238,7 +5238,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5284,7 +5284,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5358,7 +5358,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5434,7 +5434,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5498,7 +5498,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5562,7 +5562,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5618,7 +5618,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5689,7 +5689,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5758,7 +5758,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5849,7 +5849,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -5902,7 +5902,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -6519,7 +6519,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -6806,19 +6806,19 @@ "type": "string" }, "resources": { - "$ref": "#/components/schemas/Arrays_8" + "$ref": "#/components/schemas/Arrays_681004346c78" }, "save": { - "$ref": "#/components/schemas/Arrays_9" + "$ref": "#/components/schemas/Arrays_681004346c78" }, "metadata": { - "$ref": "#/components/schemas/Objects_9" + "$ref": "#/components/schemas/Objects_a2c799262a3c" }, "source": { "$ref": "#/components/schemas/Permission.Source" }, "agent": { - "$ref": "#/components/schemas/Union_2" + "$ref": "#/components/schemas/Union_f090cb615c84" } }, "required": ["action", "resources"], @@ -7097,7 +7097,7 @@ "$ref": "#/components/schemas/Permission.Reply" }, "message": { - "$ref": "#/components/schemas/Union_" + "$ref": "#/components/schemas/Union_f090cb615c84" } }, "required": ["reply"], @@ -7118,7 +7118,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -7172,7 +7172,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -7253,7 +7253,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -7351,7 +7351,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -7417,7 +7417,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -7606,7 +7606,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -7670,7 +7670,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -7780,7 +7780,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -7864,7 +7864,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -7987,7 +7987,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -8056,7 +8056,7 @@ "name": "x-opencode-ticket", "in": "header", "schema": { - "$ref": "#/components/schemas/Union_" + "$ref": "#/components/schemas/Union_f090cb615c84" }, "required": false }, @@ -8064,7 +8064,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -8252,7 +8252,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -8316,7 +8316,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -8423,7 +8423,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -8507,7 +8507,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -8576,7 +8576,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -8684,7 +8684,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -8730,7 +8730,7 @@ "$ref": "#/components/schemas/Location.InfoEncoded" }, "data": { - "$ref": "#/components/schemas/Objects_2" + "$ref": "#/components/schemas/Objects_9d53a00b1efb" } }, "required": ["location", "data"], @@ -8783,7 +8783,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -9102,7 +9102,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -9165,7 +9165,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -9231,7 +9231,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -9363,7 +9363,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -9528,7 +9528,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -9604,7 +9604,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -9704,7 +9704,7 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_1" + "$ref": "#/components/schemas/Union_ffefb7e3c81d" }, "required": false, "style": "deepObject", @@ -9754,192 +9754,9 @@ }, "components": { "schemas": { - "ServiceHealth": { - "type": "object", - "properties": { - "healthy": { - "type": "boolean", - "enum": [true] - }, - "version": { - "type": "string" - }, - "pid": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - } - }, - "required": ["healthy", "version", "pid"], - "additionalProperties": false - }, - "UnauthorizedErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["UnauthorizedError"] - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "message"], - "additionalProperties": false - }, - "Union_": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "InvalidRequestErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["InvalidRequestError"] - }, - "message": { - "type": "string" - }, - "kind": { - "$ref": "#/components/schemas/Union_" - }, - "field": { - "$ref": "#/components/schemas/Union_" - } - }, - "required": ["_tag", "message"], - "additionalProperties": false - }, - "Union_1": { - "anyOf": [ - { - "type": "object", - "properties": { - "directory": { - "$ref": "#/components/schemas/Union_" - }, - "workspace": { - "$ref": "#/components/schemas/Union_" - } - }, - "additionalProperties": false - }, - { - "type": "null" - } - ] - }, - "Location.InfoEncoded": { - "type": "object", - "properties": { - "directory": { - "type": "string" - }, - "workspaceID": { - "type": "string", - "allOf": [ - { - "pattern": "^wrk" - } - ] - }, - "project": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "directory": { - "type": "string" - }, - "canonical": { - "type": "string" - } - }, - "required": ["id", "directory", "canonical"], - "additionalProperties": false - } - }, - "required": ["directory", "project"], - "additionalProperties": false - }, - "Model.Ref": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "providerID": { - "type": "string" - }, - "variant": { - "type": "string" - } - }, - "required": ["id", "providerID"], - "additionalProperties": false - }, - "Provider.Settings": { - "type": "object" - }, - "Provider.Request": { - "type": "object", - "properties": { - "settings": { - "$ref": "#/components/schemas/Provider.Settings" - }, - "headers": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "body": { - "type": "object" - } - }, - "required": ["settings", "headers", "body"], - "additionalProperties": false - }, "Agent.Color": { "type": "string" }, - "Permission.Effect": { - "type": "string", - "enum": ["allow", "deny", "ask"] - }, - "Permission.Rule": { - "type": "object", - "properties": { - "action": { - "type": "string" - }, - "resource": { - "type": "string" - }, - "effect": { - "$ref": "#/components/schemas/Permission.Effect" - } - }, - "required": ["action", "resource", "effect"], - "additionalProperties": false - }, - "Permission.Ruleset": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Permission.Rule" - } - }, "Agent.Info": { "type": "object", "properties": { @@ -10003,3877 +9820,53 @@ "required": ["_tag", "agentID", "message"], "additionalProperties": false }, - "Plugin.Source": { - "anyOf": [ - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["builtin"] - } - }, - "required": ["type"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["package"] - }, - "package": { - "type": "string" - } - }, - "required": ["type", "package"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["local"] - }, - "path": { - "type": "string" - } - }, - "required": ["type", "path"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["sdk"] - } - }, - "required": ["type"], - "additionalProperties": false - } - ] - }, - "Plugin.Info": { - "anyOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "source": { - "$ref": "#/components/schemas/Plugin.Source" - }, - "status": { - "type": "string", - "enum": ["active"] - }, - "tui": { - "type": "boolean" - } - }, - "required": ["id", "source", "status", "tui"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "source": { - "$ref": "#/components/schemas/Plugin.Source" - }, - "status": { - "type": "string", - "enum": ["failed"] - }, - "error": { - "type": "string" - }, - "tui": { - "type": "boolean" - } - }, - "required": ["source", "status", "error", "tui"], - "additionalProperties": false - } - ] - }, - "Session.ForkBoundary": { - "anyOf": [ - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["before"] - }, - "messageID": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - } - }, - "required": ["type", "messageID"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["through"] - }, - "messageID": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - } - }, - "required": ["type", "messageID"], - "additionalProperties": false - } - ] - }, - "Money.USD": { - "type": "number" - }, - "TokenUsage.Info": { - "type": "object", - "properties": { - "input": { - "type": "number" - }, - "output": { - "type": "number" - }, - "reasoning": { - "type": "number" - }, - "cache": { - "type": "object", - "properties": { - "read": { - "type": "number" - }, - "write": { - "type": "number" - } - }, - "required": ["read", "write"], - "additionalProperties": false - } - }, - "required": ["input", "output", "reasoning", "cache"], - "additionalProperties": false - }, - "Location.Ref": { - "type": "object", - "properties": { - "directory": { - "type": "string" - }, - "workspaceID": { - "type": "string", - "allOf": [ - { - "pattern": "^wrk" - } - ] - } - }, - "required": ["directory"], - "additionalProperties": false - }, - "FileDiff.Info": { - "type": "object", - "properties": { - "file": { - "type": "string" - }, - "patch": { - "type": "string" - }, - "additions": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "deletions": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "status": { - "type": "string", - "enum": ["added", "deleted", "modified"] - } - }, - "required": ["file", "patch", "additions", "deletions", "status"], - "additionalProperties": false - }, - "Session.Revert": { - "type": "object", - "properties": { - "messageID": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "partID": { - "type": "string" - }, - "snapshot": { - "type": "string" - }, - "files": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FileDiff.Info" - } - } - }, - "required": ["messageID"], - "additionalProperties": false - }, - "Session.Info": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] - }, - "parentID": { - "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] - }, - "fork": { - "type": "object", - "properties": { - "sessionID": { - "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] - }, - "boundary": { - "$ref": "#/components/schemas/Session.ForkBoundary" - } - }, - "required": ["sessionID", "boundary"], - "additionalProperties": false - }, - "projectID": { - "type": "string" - }, - "agent": { - "type": "string" - }, - "model": { - "$ref": "#/components/schemas/Model.Ref" - }, - "cost": { - "$ref": "#/components/schemas/Money.USD" - }, - "tokens": { - "$ref": "#/components/schemas/TokenUsage.Info" - }, - "outcome": { - "type": "string", - "enum": ["succeeded", "failed", "interrupted"] - }, - "time": { - "type": "object", - "properties": { - "created": { - "type": "number" - }, - "updated": { - "type": "number" - }, - "idle": { - "type": "number" - }, - "viewed": { - "type": "number" - }, - "archived": { - "type": "number" - } - }, - "required": ["created", "updated"], - "additionalProperties": false - }, - "title": { - "type": "string" - }, - "location": { - "$ref": "#/components/schemas/Location.Ref" - }, - "subpath": { - "type": "string" - }, - "revert": { - "$ref": "#/components/schemas/Session.Revert" - } - }, - "required": ["id", "projectID", "cost", "tokens", "time", "location"], - "additionalProperties": false - }, - "SessionsResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Session.Info" - } - }, - "cursor": { - "type": "object", - "properties": { - "previous": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "next": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "additionalProperties": false - } - }, - "required": ["data", "cursor"], - "additionalProperties": false - }, - "InvalidCursorErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["InvalidCursorError"] - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "message"], - "additionalProperties": false - }, - "Union_2": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "Union_3": { - "anyOf": [ - { - "$ref": "#/components/schemas/Model.Ref" - }, - { - "type": "null" - } - ] - }, - "Union_4": { - "anyOf": [ - { - "$ref": "#/components/schemas/Location.Ref" - }, - { - "type": "null" - } - ] - }, - "Objects_": { - "type": "object" - }, - "Objects_1": { - "type": "object", - "properties": { - "created": { - "type": "number" - } - }, - "required": ["created"], - "additionalProperties": false - }, - "Session.Message.AgentSelected": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "$ref": "#/components/schemas/Objects_1" - }, - "type": { - "type": "string", - "enum": ["agent-switched"] - }, - "agent": { - "type": "string" - }, - "previous": { - "type": "string" - } - }, - "required": ["id", "time", "type", "agent"], - "additionalProperties": false - }, - "Session.Message.ModelSelected": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "$ref": "#/components/schemas/Objects_1" - }, - "type": { - "type": "string", - "enum": ["model-switched"] - }, - "model": { - "$ref": "#/components/schemas/Model.Ref" - }, - "previous": { - "$ref": "#/components/schemas/Model.Ref" - } - }, - "required": ["id", "time", "type", "model"], - "additionalProperties": false - }, - "Session.Message.LocationSwitched": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "$ref": "#/components/schemas/Objects_1" - }, - "type": { - "type": "string", - "enum": ["location-switched"] - }, - "location": { - "$ref": "#/components/schemas/Location.Ref" - }, - "projectID": { - "type": "string" - }, - "subpath": { - "type": "string" - }, - "previous": { - "type": "object", - "properties": { - "location": { - "$ref": "#/components/schemas/Location.Ref" - }, - "projectID": { - "type": "string" - }, - "subpath": { - "type": "string" - } - }, - "required": ["location"], - "additionalProperties": false - } - }, - "required": ["id", "time", "type", "location"], - "additionalProperties": false - }, - "Prompt.Base64": { - "type": "string", - "allOf": [ - { - "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" - } - ] - }, - "Prompt.FileSource": { - "anyOf": [ - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["inline"] - } - }, - "required": ["type"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["uri"] - }, - "uri": { - "type": "string" - } - }, - "required": ["type", "uri"], - "additionalProperties": false - } - ] - }, - "Prompt.Mention": { - "type": "object", - "properties": { - "start": { - "type": "number" - }, - "end": { - "type": "number" - }, - "text": { - "type": "string" - } - }, - "required": ["start", "end", "text"], - "additionalProperties": false - }, - "Prompt.FileAttachment": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/Prompt.Base64" - }, - "mime": { - "type": "string" - }, - "source": { - "$ref": "#/components/schemas/Prompt.FileSource" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "mention": { - "$ref": "#/components/schemas/Prompt.Mention" - } - }, - "required": ["data", "mime", "source"], - "additionalProperties": false - }, - "Arrays_1": { + "Arrays_042d796a7901": { "type": "array", "items": { "$ref": "#/components/schemas/Prompt.FileAttachment" } }, - "Prompt.AgentAttachment": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "mention": { - "$ref": "#/components/schemas/Prompt.Mention" - } - }, - "required": ["name"], - "additionalProperties": false - }, - "Arrays_2": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Prompt.AgentAttachment" - } - }, - "Prompt.SkillAttachment": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "mention": { - "$ref": "#/components/schemas/Prompt.Mention" - } - }, - "required": ["id", "name"], - "additionalProperties": false - }, - "Arrays_3": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Prompt.SkillAttachment" - } - }, - "Session.Message.User": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "$ref": "#/components/schemas/Objects_1" - }, - "text": { - "type": "string" - }, - "files": { - "$ref": "#/components/schemas/Arrays_1" - }, - "agents": { - "$ref": "#/components/schemas/Arrays_2" - }, - "skills": { - "$ref": "#/components/schemas/Arrays_3" - }, - "type": { - "type": "string", - "enum": ["user"] - } - }, - "required": ["id", "time", "text", "type"], - "additionalProperties": false - }, - "Session.Message.Synthetic": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "$ref": "#/components/schemas/Objects_1" - }, - "text": { - "type": "string" - }, - "description": { - "type": "string" - }, - "type": { - "type": "string", - "enum": ["synthetic"] - } - }, - "required": ["id", "time", "text", "type"], - "additionalProperties": false - }, - "Session.Message.System": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "$ref": "#/components/schemas/Objects_1" - }, - "type": { - "type": "string", - "enum": ["system"] - }, - "text": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "required": ["id", "time", "type", "text"], - "additionalProperties": false - }, - "Session.Message.Skill": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "$ref": "#/components/schemas/Objects_1" - }, - "type": { - "type": "string", - "enum": ["skill"] - }, - "skill": { - "type": "string" - }, - "name": { - "type": "string" - }, - "text": { - "type": "string" - } - }, - "required": ["id", "time", "type", "skill", "name", "text"], - "additionalProperties": false - }, - "Union_5": { - "type": "string", - "enum": ["running", "exited", "timeout", "killed"] - }, - "Union_6": { - "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] - }, - "Objects_2": { - "type": "object", - "properties": { - "output": { - "type": "string" - }, - "cursor": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "size": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "truncated": { - "type": "boolean" - } - }, - "required": ["output", "cursor", "size", "truncated"], - "additionalProperties": false - }, - "Session.Message.Shell": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "type": "object", - "properties": { - "created": { - "type": "number" - }, - "completed": { - "type": "number" - } - }, - "required": ["created"], - "additionalProperties": false - }, - "type": { - "type": "string", - "enum": ["shell"] - }, - "shellID": { - "type": "string", - "allOf": [ - { - "pattern": "^sh_" - } - ] - }, - "command": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/Union_5" - }, - "exit": { - "anyOf": [ - { - "type": "number" - }, - { - "$ref": "#/components/schemas/Union_6" - } - ] - }, - "output": { - "$ref": "#/components/schemas/Objects_2" - } - }, - "required": ["id", "time", "type", "shellID", "command", "status"], - "additionalProperties": false - }, - "Session.Message.ProviderState": { - "type": "object" - }, - "Session.Message.Assistant.Text": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["text"] - }, - "text": { - "type": "string" - }, - "state": { - "$ref": "#/components/schemas/Session.Message.ProviderState" - } - }, - "required": ["type", "text"], - "additionalProperties": false - }, - "Session.Message.ProviderState_1": { - "type": "object" - }, - "Session.Message.Assistant.Reasoning": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["reasoning"] - }, - "text": { - "type": "string" - }, - "state": { - "$ref": "#/components/schemas/Session.Message.ProviderState_1" - }, - "time": { - "type": "object", - "properties": { - "created": { - "type": "number" - }, - "completed": { - "type": "number" - } - }, - "required": ["created"], - "additionalProperties": false - } - }, - "required": ["type", "text"], - "additionalProperties": false - }, - "Session.Message.ProviderState_2": { - "type": "object" - }, - "Session.Message.ProviderState_3": { - "type": "object" - }, - "Session.Message.ToolState.Streaming": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["streaming"] - }, - "input": { - "type": "string" - } - }, - "required": ["status", "input"], - "additionalProperties": false - }, - "Session.Message.ToolState.Running": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["running"] - }, - "input": { - "type": "object" - }, - "metadata": { - "type": "object" - } - }, - "required": ["status", "input", "metadata"], - "additionalProperties": false - }, - "Tool.TextContent": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["text"] - }, - "text": { - "type": "string" - } - }, - "required": ["type", "text"], - "additionalProperties": false - }, - "Tool.FileContent": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["file"] - }, - "uri": { - "type": "string" - }, - "mime": { - "type": "string" - }, - "name": { - "$ref": "#/components/schemas/Union_" - } - }, - "required": ["type", "uri", "mime"], - "additionalProperties": false - }, - "Tool.Content": { - "anyOf": [ - { - "$ref": "#/components/schemas/Tool.TextContent" - }, - { - "$ref": "#/components/schemas/Tool.FileContent" - } - ] - }, - "Session.Message.ToolState.Completed": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["completed"] - }, - "input": { - "type": "object" - }, - "content": { - "type": "array", - "prefixItems": [ - { - "$ref": "#/components/schemas/Tool.Content" - } - ], - "minItems": 1, - "items": { - "$ref": "#/components/schemas/Tool.Content" - } - }, - "metadata": { - "type": "object" - } - }, - "required": ["status", "input", "content"], - "additionalProperties": false - }, - "Session.StructuredError": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "message": { - "type": "string" - }, - "status": { - "type": "integer", - "allOf": [ - { - "minimum": 100, - "maximum": 599 - } - ] - } - }, - "required": ["type", "message"], - "additionalProperties": false - }, - "Session.Message.ToolState.Error": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["error"] - }, - "input": { - "type": "object" - }, - "error": { - "$ref": "#/components/schemas/Session.StructuredError" - }, - "content": { - "type": "array", - "prefixItems": [ - { - "$ref": "#/components/schemas/Tool.Content" - } - ], - "minItems": 1, - "items": { - "$ref": "#/components/schemas/Tool.Content" - } - }, - "metadata": { - "type": "object" - } - }, - "required": ["status", "input", "error"], - "additionalProperties": false - }, - "Session.Message.Assistant.Tool": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["tool"] - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "executed": { - "type": "boolean" - }, - "providerState": { - "$ref": "#/components/schemas/Session.Message.ProviderState_2" - }, - "providerResultState": { - "$ref": "#/components/schemas/Session.Message.ProviderState_3" - }, - "state": { - "anyOf": [ - { - "$ref": "#/components/schemas/Session.Message.ToolState.Streaming" - }, - { - "$ref": "#/components/schemas/Session.Message.ToolState.Running" - }, - { - "$ref": "#/components/schemas/Session.Message.ToolState.Completed" - }, - { - "$ref": "#/components/schemas/Session.Message.ToolState.Error" - } - ] - }, - "time": { - "type": "object", - "properties": { - "created": { - "type": "number" - }, - "ran": { - "type": "number" - }, - "completed": { - "type": "number" - } - }, - "required": ["created"], - "additionalProperties": false - } - }, - "required": ["type", "id", "name", "state", "time"], - "additionalProperties": false - }, - "Session.Message.ProviderState_4": { - "type": "object" - }, - "Session.Message.Assistant.Retry": { - "type": "object", - "properties": { - "attempt": { - "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] - }, - "at": { - "type": "number" - }, - "error": { - "$ref": "#/components/schemas/Session.StructuredError" - } - }, - "required": ["attempt", "at", "error"], - "additionalProperties": false - }, - "Session.Message.Assistant": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "type": "object", - "properties": { - "created": { - "type": "number" - }, - "completed": { - "type": "number" - } - }, - "required": ["created"], - "additionalProperties": false - }, - "type": { - "type": "string", - "enum": ["assistant"] - }, - "agent": { - "type": "string" - }, - "model": { - "$ref": "#/components/schemas/Model.Ref" - }, - "content": { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/Session.Message.Assistant.Text" - }, - { - "$ref": "#/components/schemas/Session.Message.Assistant.Reasoning" - }, - { - "$ref": "#/components/schemas/Session.Message.Assistant.Tool" - } - ] - } - }, - "snapshot": { - "type": "object", - "properties": { - "start": { - "type": "string" - }, - "end": { - "type": "string" - }, - "files": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "finish": { - "type": "string", - "enum": ["stop", "length", "tool-calls", "content-filter", "error", "unknown"] - }, - "rawFinish": { - "type": "string" - }, - "providerState": { - "$ref": "#/components/schemas/Session.Message.ProviderState_4" - }, - "cost": { - "$ref": "#/components/schemas/Money.USD" - }, - "tokens": { - "$ref": "#/components/schemas/TokenUsage.Info" - }, - "error": { - "$ref": "#/components/schemas/Session.StructuredError" - }, - "retry": { - "$ref": "#/components/schemas/Session.Message.Assistant.Retry" - } - }, - "required": ["id", "time", "type", "agent", "model", "content"], - "additionalProperties": false - }, - "Session.Message.Compaction.Running": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["compaction"] - }, - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "$ref": "#/components/schemas/Objects_1" - }, - "status": { - "type": "string", - "enum": ["running"] - }, - "reason": { - "type": "string", - "enum": ["auto", "manual"] - }, - "summary": { - "type": "string" - }, - "recent": { - "type": "string" - } - }, - "required": ["type", "id", "time", "status", "reason", "summary", "recent"], - "additionalProperties": false - }, - "Session.Message.Compaction.Completed": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["compaction"] - }, - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "$ref": "#/components/schemas/Objects_1" - }, - "status": { - "type": "string", - "enum": ["completed"] - }, - "reason": { - "type": "string", - "enum": ["auto", "manual"] - }, - "summary": { - "type": "string" - }, - "recent": { - "type": "string" - } - }, - "required": ["type", "id", "time", "status", "reason", "summary", "recent"], - "additionalProperties": false - }, - "Session.Message.Compaction.Failed": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["compaction"] - }, - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/Objects_" - }, - "time": { - "$ref": "#/components/schemas/Objects_1" - }, - "status": { - "type": "string", - "enum": ["failed"] - }, - "reason": { - "type": "string", - "enum": ["auto", "manual"] - }, - "error": { - "$ref": "#/components/schemas/Session.StructuredError" - } - }, - "required": ["type", "id", "time", "status", "reason", "error"], - "additionalProperties": false - }, - "Session.Message.Compaction": { - "anyOf": [ - { - "$ref": "#/components/schemas/Session.Message.Compaction.Running" - }, - { - "$ref": "#/components/schemas/Session.Message.Compaction.Completed" - }, - { - "$ref": "#/components/schemas/Session.Message.Compaction.Failed" - } - ] - }, - "Session.Message.Info": { - "anyOf": [ - { - "$ref": "#/components/schemas/Session.Message.AgentSelected" - }, - { - "$ref": "#/components/schemas/Session.Message.ModelSelected" - }, - { - "$ref": "#/components/schemas/Session.Message.LocationSwitched" - }, - { - "$ref": "#/components/schemas/Session.Message.User" - }, - { - "$ref": "#/components/schemas/Session.Message.Synthetic" - }, - { - "$ref": "#/components/schemas/Session.Message.System" - }, - { - "$ref": "#/components/schemas/Session.Message.Skill" - }, - { - "$ref": "#/components/schemas/Session.Message.Shell" - }, - { - "$ref": "#/components/schemas/Session.Message.Assistant" - }, - { - "$ref": "#/components/schemas/Session.Message.Compaction" - } - ] - }, - "Arrays_": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Session.Message.Info" - } - }, - "ConflictErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["ConflictError"] - }, - "message": { - "type": "string" - }, - "resource": { - "$ref": "#/components/schemas/Union_" - } - }, - "required": ["_tag", "message"], - "additionalProperties": false - }, - "Union_7": { - "anyOf": [ - { - "type": "string", - "enum": ["true", "false"] - }, - { - "type": "null" - } - ] - }, - "SessionTransfer.Data": { - "type": "object", - "properties": { - "info": { - "$ref": "#/components/schemas/Session.Info" - }, - "messages": { - "$ref": "#/components/schemas/Arrays_" - } - }, - "required": ["info", "messages"], - "additionalProperties": false - }, - "SessionNotFoundErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["SessionNotFoundError"] - }, - "sessionID": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "sessionID", "message"], - "additionalProperties": false - }, - "UnknownErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["UnknownError"] - }, - "message": { - "type": "string" - }, - "ref": { - "$ref": "#/components/schemas/Union_" - } - }, - "required": ["_tag", "message"], - "additionalProperties": false - }, - "SessionActive": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["running"] - } - }, - "required": ["type"], - "additionalProperties": false - }, - "Session.ForkRequestBoundary": { - "anyOf": [ - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["before"] - }, - "messageID": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - } - }, - "required": ["type", "messageID"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["through"] - } - }, - "required": ["type"], - "additionalProperties": false - } - ] - }, - "MessageNotFoundErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["MessageNotFoundError"] - }, - "sessionID": { - "type": "string" - }, - "messageID": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "sessionID", "messageID", "message"], - "additionalProperties": false - }, - "Session.Inbox.Delivery": { - "type": "string", - "enum": ["steer", "queue"] - }, - "Union_8": { - "anyOf": [ - { - "$ref": "#/components/schemas/Session.Inbox.Delivery" - }, - { - "type": "null" - } - ] - }, - "Union_9": { - "anyOf": [ - { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - { - "type": "null" - } - ] - }, - "PromptInput.FileAttachment": { - "type": "object", - "properties": { - "uri": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "mention": { - "$ref": "#/components/schemas/Prompt.Mention" - } - }, - "required": ["uri"], - "additionalProperties": false - }, - "Arrays_4": { + "Arrays_3ff7cb2a474f": { "type": "array", "items": { "$ref": "#/components/schemas/PromptInput.FileAttachment" } }, - "Arrays_5": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Prompt.AgentAttachment" - } - }, - "PromptInput.SkillAttachment": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "mention": { - "$ref": "#/components/schemas/Prompt.Mention" - } - }, - "required": ["id"], - "additionalProperties": false - }, - "Arrays_6": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PromptInput.SkillAttachment" - } - }, - "Objects_3": { - "type": "object" - }, - "Union_10": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "Session.Inbox.UserPayload": { - "type": "object", - "properties": { - "text": { - "type": "string" - }, - "files": { - "$ref": "#/components/schemas/Arrays_1" - }, - "agents": { - "$ref": "#/components/schemas/Arrays_2" - }, - "skills": { - "$ref": "#/components/schemas/Arrays_3" - }, - "metadata": { - "$ref": "#/components/schemas/Objects_3" - } - }, - "required": ["text"], - "additionalProperties": false - }, - "Session.Inbox.User": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "sessionID": { - "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] - }, - "timeCreated": { - "type": "number" - }, - "type": { - "type": "string", - "enum": ["user"] - }, - "payload": { - "$ref": "#/components/schemas/Session.Inbox.UserPayload" - }, - "delivery": { - "$ref": "#/components/schemas/Session.Inbox.Delivery" - } - }, - "required": ["id", "sessionID", "timeCreated", "type", "payload", "delivery"], - "additionalProperties": false - }, - "CommandNotFoundErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["CommandNotFoundError"] - }, - "command": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "command", "message"], - "additionalProperties": false - }, - "CommandEvaluationErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["CommandEvaluationError"] - }, - "command": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "command", "message"], - "additionalProperties": false - }, - "SkillNotFoundErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["SkillNotFoundError"] - }, - "skill": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "skill", "message"], - "additionalProperties": false - }, - "Session.Inbox.SyntheticPayload": { - "type": "object", - "properties": { - "text": { - "type": "string" - }, - "description": { - "type": "string" - }, - "metadata": { - "type": "object" - } - }, - "required": ["text"], - "additionalProperties": false - }, - "Session.Inbox.Synthetic": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "sessionID": { - "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] - }, - "timeCreated": { - "type": "number" - }, - "type": { - "type": "string", - "enum": ["synthetic"] - }, - "payload": { - "$ref": "#/components/schemas/Session.Inbox.SyntheticPayload" - }, - "delivery": { - "$ref": "#/components/schemas/Session.Inbox.Delivery" - } - }, - "required": ["id", "sessionID", "timeCreated", "type", "payload", "delivery"], - "additionalProperties": false - }, - "Session.Inbox.CompactionPayload": { - "anyOf": [ - { - "type": "object" - }, - { - "type": "array" - } - ] - }, - "Session.Inbox.Compaction": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "sessionID": { - "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] - }, - "timeCreated": { - "type": "number" - }, - "type": { - "type": "string", - "enum": ["compaction"] - }, - "payload": { - "$ref": "#/components/schemas/Session.Inbox.CompactionPayload" - }, - "delivery": { - "$ref": "#/components/schemas/Session.Inbox.Delivery" - } - }, - "required": ["id", "sessionID", "timeCreated", "type", "payload", "delivery"], - "additionalProperties": false - }, - "ServiceUnavailableErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["ServiceUnavailableError"] - }, - "message": { - "type": "string" - }, - "service": { - "$ref": "#/components/schemas/Union_" - } - }, - "required": ["_tag", "message"], - "additionalProperties": false - }, - "SessionBusyErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["SessionBusyError"] - }, - "sessionID": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "sessionID", "message"], - "additionalProperties": false - }, - "Session.Inbox.MovePayload": { - "type": "object", - "properties": { - "location": { - "$ref": "#/components/schemas/Location.Ref" - }, - "projectID": { - "type": "string" - }, - "subpath": { - "type": "string" - } - }, - "required": ["location", "projectID"], - "additionalProperties": false - }, - "Session.Inbox.Move": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - "sessionID": { - "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] - }, - "timeCreated": { - "type": "number" - }, - "type": { - "type": "string", - "enum": ["move"] - }, - "payload": { - "$ref": "#/components/schemas/Session.Inbox.MovePayload" - }, - "delivery": { - "$ref": "#/components/schemas/Session.Inbox.Delivery" - } - }, - "required": ["id", "sessionID", "timeCreated", "type", "payload", "delivery"], - "additionalProperties": false - }, - "Session.Inbox.Info": { - "anyOf": [ - { - "$ref": "#/components/schemas/Session.Inbox.User" - }, - { - "$ref": "#/components/schemas/Session.Inbox.Synthetic" - }, - { - "$ref": "#/components/schemas/Session.Inbox.Compaction" - }, - { - "$ref": "#/components/schemas/Session.Inbox.Move" - } - ] - }, - "InstructionEntry.Key": { - "type": "string", - "allOf": [ - { - "pattern": "^[a-z0-9][a-z0-9._-]*$", - "description": "Instruction entry key (lowercase alphanumerics plus . _ -)" - } - ] - }, - "InstructionEntry.Info": { - "type": "object", - "properties": { - "key": { - "$ref": "#/components/schemas/InstructionEntry.Key" - }, - "value": { - "description": "JSON value attached to the session's instructions" - } - }, - "required": ["key", "value"], - "additionalProperties": false - }, - "InstructionEntryValueTooLargeErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["InstructionEntryValueTooLargeError"] - }, - "actualBytes": { - "type": "integer" - }, - "maxBytes": { - "type": "integer" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "actualBytes", "maxBytes", "message"], - "additionalProperties": false - }, - "SessionGenerateResponse": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "text": { - "type": "string" - } - }, - "required": ["text"], - "additionalProperties": false - } - }, - "required": ["data"], - "additionalProperties": false - }, - "SessionLogItemEncoded": { - "type": "string", - "contentMediaType": "application/json" - }, - "SessionMessagesResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Session.Message.Info" - } - }, - "cursor": { - "type": "object", - "properties": { - "previous": { - "$ref": "#/components/schemas/Union_" - }, - "next": { - "$ref": "#/components/schemas/Union_" - } - }, - "additionalProperties": false - } - }, - "required": ["data", "cursor"], - "additionalProperties": false - }, - "Model.ReasoningField": { - "anyOf": [ - { - "type": "string", - "enum": ["reasoning", "reasoning_content", "reasoning_text"] - }, - { - "type": "string" - } - ] - }, - "Model.MaxTokensField": { - "type": "string", - "enum": ["max_completion_tokens", "max_tokens"] - }, - "Model.Compatibility": { - "type": "object", - "properties": { - "reasoningField": { - "$ref": "#/components/schemas/Model.ReasoningField" - }, - "maxTokensField": { - "$ref": "#/components/schemas/Model.MaxTokensField" - }, - "requireFinishReason": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "Objects_4": { - "type": "object" - }, - "Objects_5": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "Objects_6": { - "type": "object" - }, - "Model.Capabilities": { - "type": "object", - "properties": { - "tools": { - "type": "boolean" - }, - "input": { - "type": "array", - "items": { - "type": "string" - } - }, - "output": { - "type": "array", - "items": { - "type": "string" - } - }, - "responsesWebsockets": { - "type": "boolean" - } - }, - "required": ["tools", "input", "output"], - "additionalProperties": false - }, - "Model.Variant": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "settings": { - "$ref": "#/components/schemas/Objects_4" - }, - "headers": { - "$ref": "#/components/schemas/Objects_5" - }, - "body": { - "$ref": "#/components/schemas/Objects_6" - } - }, - "required": ["id"], - "additionalProperties": false - }, - "Money.USDPerMillionTokens": { - "type": "number" - }, - "Model.Cost": { - "type": "object", - "properties": { - "tier": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["context"] - }, - "size": { - "type": "integer" - } - }, - "required": ["type", "size"], - "additionalProperties": false - }, - "input": { - "$ref": "#/components/schemas/Money.USDPerMillionTokens" - }, - "output": { - "$ref": "#/components/schemas/Money.USDPerMillionTokens" - }, - "cache": { - "type": "object", - "properties": { - "read": { - "$ref": "#/components/schemas/Money.USDPerMillionTokens" - }, - "write": { - "$ref": "#/components/schemas/Money.USDPerMillionTokens" - } - }, - "required": ["read", "write"], - "additionalProperties": false - } - }, - "required": ["input", "output", "cache"], - "additionalProperties": false - }, - "Model.Info": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "modelID": { - "type": "string" - }, - "providerID": { - "type": "string" - }, - "family": { - "type": "string" - }, - "name": { - "type": "string" - }, - "compatibility": { - "$ref": "#/components/schemas/Model.Compatibility" - }, - "package": { - "type": "string" - }, - "settings": { - "$ref": "#/components/schemas/Objects_4" - }, - "headers": { - "$ref": "#/components/schemas/Objects_5" - }, - "body": { - "$ref": "#/components/schemas/Objects_6" - }, - "capabilities": { - "$ref": "#/components/schemas/Model.Capabilities" - }, - "variants": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Model.Variant" - } - }, - "time": { - "type": "object", - "properties": { - "released": { - "type": "number" - } - }, - "required": ["released"], - "additionalProperties": false - }, - "cost": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Model.Cost" - } - }, - "status": { - "type": "string", - "enum": ["alpha", "beta", "deprecated", "active"] - }, - "enabled": { - "type": "boolean" - }, - "limit": { - "type": "object", - "properties": { - "context": { - "type": "integer" - }, - "input": { - "type": "integer" - }, - "output": { - "type": "integer" - } - }, - "required": ["context", "output"], - "additionalProperties": false - } - }, - "required": [ - "id", - "modelID", - "providerID", - "name", - "capabilities", - "variants", - "time", - "cost", - "status", - "enabled", - "limit" - ], - "additionalProperties": false - }, - "GenerateTextResponse": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "text": { - "type": "string" - } - }, - "required": ["text"], - "additionalProperties": false - } - }, - "required": ["data"], - "additionalProperties": false - }, - "Provider.Info": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "integrationID": { - "type": "string" - }, - "name": { - "type": "string" - }, - "activation": { - "type": "string", - "enum": ["auto", "enabled", "disabled"] - }, - "package": { - "type": "string" - }, - "settings": { - "$ref": "#/components/schemas/Objects_4" - }, - "headers": { - "$ref": "#/components/schemas/Objects_5" - }, - "body": { - "$ref": "#/components/schemas/Objects_6" - } - }, - "required": ["id", "name", "activation", "package"], - "additionalProperties": false - }, - "ProviderNotFoundErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["ProviderNotFoundError"] - }, - "providerID": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "providerID", "message"], - "additionalProperties": false - }, - "Union_11": { - "anyOf": [ - { - "type": "number" - }, - { - "$ref": "#/components/schemas/Union_6" - } - ] - }, - "Form.When": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "op": { - "type": "string", - "enum": ["eq", "neq"] - }, - "value": { - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/Union_11" - }, - { - "type": "boolean" - } - ] - } - }, - "required": ["key", "op", "value"], - "additionalProperties": false - }, - "Arrays_7": { + "Arrays_4df8e9fdc8e1": { "type": "array", "items": { "$ref": "#/components/schemas/Form.When" } }, - "Form.Option": { - "type": "object", - "properties": { - "value": { - "type": "string" - }, - "label": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "required": ["value", "label"], - "additionalProperties": false - }, - "Form.StringField": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "required": { - "type": "boolean" - }, - "when": { - "$ref": "#/components/schemas/Arrays_7" - }, - "type": { - "type": "string", - "enum": ["string"] - }, - "format": { - "type": "string", - "enum": ["email", "uri", "date", "date-time"] - }, - "minLength": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "maxLength": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "pattern": { - "type": "string" - }, - "placeholder": { - "type": "string" - }, - "default": { - "type": "string" - }, - "options": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Form.Option" - } - }, - "custom": { - "type": "boolean" - } - }, - "required": ["key", "type"], - "additionalProperties": false - }, - "Form.NumberField": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "required": { - "type": "boolean" - }, - "when": { - "$ref": "#/components/schemas/Arrays_7" - }, - "type": { - "type": "string", - "enum": ["number"] - }, - "minimum": { - "anyOf": [ - { - "type": "number" - }, - { - "$ref": "#/components/schemas/Union_6" - } - ] - }, - "maximum": { - "anyOf": [ - { - "type": "number" - }, - { - "$ref": "#/components/schemas/Union_6" - } - ] - }, - "default": { - "anyOf": [ - { - "type": "number" - }, - { - "$ref": "#/components/schemas/Union_6" - } - ] - } - }, - "required": ["key", "type"], - "additionalProperties": false - }, - "Form.IntegerField": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "required": { - "type": "boolean" - }, - "when": { - "$ref": "#/components/schemas/Arrays_7" - }, - "type": { - "type": "string", - "enum": ["integer"] - }, - "minimum": { - "anyOf": [ - { - "type": "number" - }, - { - "$ref": "#/components/schemas/Union_6" - } - ] - }, - "maximum": { - "anyOf": [ - { - "type": "number" - }, - { - "$ref": "#/components/schemas/Union_6" - } - ] - }, - "default": { - "anyOf": [ - { - "type": "number" - }, - { - "$ref": "#/components/schemas/Union_6" - } - ] - } - }, - "required": ["key", "type"], - "additionalProperties": false - }, - "Form.BooleanField": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "required": { - "type": "boolean" - }, - "when": { - "$ref": "#/components/schemas/Arrays_7" - }, - "type": { - "type": "string", - "enum": ["boolean"] - }, - "default": { - "type": "boolean" - } - }, - "required": ["key", "type"], - "additionalProperties": false - }, - "Form.MultiselectField": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "required": { - "type": "boolean" - }, - "when": { - "$ref": "#/components/schemas/Arrays_7" - }, - "type": { - "type": "string", - "enum": ["multiselect"] - }, - "options": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Form.Option" - } - }, - "minItems": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "maxItems": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "custom": { - "type": "boolean" - }, - "default": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": ["key", "type", "options"], - "additionalProperties": false - }, - "Form.ExternalField": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "type": { - "type": "string", - "enum": ["external"] - }, - "url": { - "type": "string" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "required": ["key", "type", "url"], - "additionalProperties": false - }, - "Form.Field": { - "anyOf": [ - { - "$ref": "#/components/schemas/Form.StringField" - }, - { - "$ref": "#/components/schemas/Form.NumberField" - }, - { - "$ref": "#/components/schemas/Form.IntegerField" - }, - { - "$ref": "#/components/schemas/Form.BooleanField" - }, - { - "$ref": "#/components/schemas/Form.MultiselectField" - }, - { - "$ref": "#/components/schemas/Form.ExternalField" - } - ] - }, - "Form.Fields": { - "type": "array", - "prefixItems": [ - { - "$ref": "#/components/schemas/Form.Field" - } - ], - "minItems": 1, - "items": { - "$ref": "#/components/schemas/Form.Field" - } - }, - "Integration.OAuthMethod": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": ["oauth"] - }, - "label": { - "type": "string" - }, - "form": { - "$ref": "#/components/schemas/Form.Fields" - } - }, - "required": ["id", "type", "label"], - "additionalProperties": false - }, - "Integration.CommandMethod": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": ["command"] - }, - "label": { - "type": "string" - }, - "command": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": ["id", "type", "label", "command"], - "additionalProperties": false - }, - "Form.Fields_1": { - "type": "array", - "prefixItems": [ - { - "$ref": "#/components/schemas/Form.Field" - } - ], - "minItems": 1, - "items": { - "$ref": "#/components/schemas/Form.Field" - } - }, - "Integration.KeyMethod": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["key"] - }, - "label": { - "type": "string" - }, - "form": { - "$ref": "#/components/schemas/Form.Fields_1" - } - }, - "required": ["type"], - "additionalProperties": false - }, - "Integration.EnvMethod": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["env"] - }, - "names": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": ["type", "names"], - "additionalProperties": false - }, - "Integration.Method": { - "anyOf": [ - { - "$ref": "#/components/schemas/Integration.OAuthMethod" - }, - { - "$ref": "#/components/schemas/Integration.CommandMethod" - }, - { - "$ref": "#/components/schemas/Integration.KeyMethod" - }, - { - "$ref": "#/components/schemas/Integration.EnvMethod" - } - ] - }, - "Connection.CredentialInfo": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["credential"] - }, - "id": { - "type": "string" - }, - "label": { - "type": "string" - } - }, - "required": ["type", "id", "label"], - "additionalProperties": false - }, - "Connection.EnvInfo": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["env"] - }, - "name": { - "type": "string" - } - }, - "required": ["type", "name"], - "additionalProperties": false - }, - "Connection.Info": { - "anyOf": [ - { - "$ref": "#/components/schemas/Connection.CredentialInfo" - }, - { - "$ref": "#/components/schemas/Connection.EnvInfo" - } - ] - }, - "Integration.Info": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "methods": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Integration.Method" - } - }, - "connections": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Connection.Info" - } - } - }, - "required": ["id", "name", "methods", "connections"], - "additionalProperties": false - }, - "Form.Value": { - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/Union_11" - }, - { - "type": "boolean" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "Form.Answer": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Form.Value" - } - }, - "Union_12": { - "anyOf": [ - { - "$ref": "#/components/schemas/Form.Answer" - }, - { - "type": "null" - } - ] - }, - "Objects_7": { - "type": "object", - "properties": { - "created": { - "$ref": "#/components/schemas/Union_11" - }, - "expires": { - "$ref": "#/components/schemas/Union_11" - } - }, - "required": ["created", "expires"], - "additionalProperties": false - }, - "Integration.AttemptEncoded": { - "type": "object", - "properties": { - "attemptID": { - "type": "string" - }, - "url": { - "type": "string" - }, - "instructions": { - "type": "string" - }, - "mode": { - "type": "string", - "enum": ["auto", "code"] - }, - "time": { - "$ref": "#/components/schemas/Objects_7" - } - }, - "required": ["attemptID", "url", "instructions", "mode", "time"], - "additionalProperties": false - }, - "Integration.AttemptStatus": { - "anyOf": [ - { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["pending"] - }, - "time": { - "$ref": "#/components/schemas/Objects_7" - } - }, - "required": ["status", "time"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["complete"] - }, - "time": { - "$ref": "#/components/schemas/Objects_7" - } - }, - "required": ["status", "time"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["failed"] - }, - "message": { - "type": "string" - }, - "time": { - "$ref": "#/components/schemas/Objects_7" - } - }, - "required": ["status", "message", "time"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["expired"] - }, - "time": { - "$ref": "#/components/schemas/Objects_7" - } - }, - "required": ["status", "time"], - "additionalProperties": false - } - ] - }, - "Integration.CommandAttempt": { - "type": "object", - "properties": { - "attemptID": { - "type": "string" - }, - "time": { - "$ref": "#/components/schemas/Objects_7" - } - }, - "required": ["attemptID", "time"], - "additionalProperties": false - }, - "Integration.CommandAttemptStatus": { - "anyOf": [ - { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["pending"] - }, - "message": { - "type": "string" - }, - "time": { - "$ref": "#/components/schemas/Objects_7" - } - }, - "required": ["status", "time"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["complete"] - }, - "time": { - "$ref": "#/components/schemas/Objects_7" - } - }, - "required": ["status", "time"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["failed"] - }, - "message": { - "type": "string" - }, - "time": { - "$ref": "#/components/schemas/Objects_7" - } - }, - "required": ["status", "message", "time"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["expired"] - }, - "time": { - "$ref": "#/components/schemas/Objects_7" - } - }, - "required": ["status", "time"], - "additionalProperties": false - } - ] - }, - "Mcp.Status.Connected": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["connected"] - } - }, - "required": ["status"], - "additionalProperties": false - }, - "Mcp.Status.Pending": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["pending"] - } - }, - "required": ["status"], - "additionalProperties": false - }, - "Mcp.Status.Disabled": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["disabled"] - } - }, - "required": ["status"], - "additionalProperties": false - }, - "Mcp.Status.Failed": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["failed"] - }, - "error": { - "type": "string" - } - }, - "required": ["status", "error"], - "additionalProperties": false - }, - "Mcp.Status.NeedsAuth": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["needs_auth"] - } - }, - "required": ["status"], - "additionalProperties": false - }, - "Mcp.Server": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "status": { - "anyOf": [ - { - "$ref": "#/components/schemas/Mcp.Status.Connected" - }, - { - "$ref": "#/components/schemas/Mcp.Status.Pending" - }, - { - "$ref": "#/components/schemas/Mcp.Status.Disabled" - }, - { - "$ref": "#/components/schemas/Mcp.Status.Failed" - }, - { - "$ref": "#/components/schemas/Mcp.Status.NeedsAuth" - } - ] - }, - "integrationID": { - "type": "string" - } - }, - "required": ["name", "status"], - "additionalProperties": false - }, - "Objects_8": { - "type": "object", - "properties": { - "startup": { - "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] - }, - "catalog": { - "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] - }, - "execution": { - "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] - } - }, - "additionalProperties": false - }, - "Mcp.LocalConfigEncoded": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["local"] - }, - "command": { - "type": "array", - "items": { - "type": "string" - } - }, - "cwd": { - "type": "string" - }, - "environment": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "disabled": { - "type": "boolean" - }, - "codemode": { - "type": "boolean" - }, - "timeout": { - "$ref": "#/components/schemas/Objects_8" - } - }, - "required": ["type", "command"], - "additionalProperties": false - }, - "Mcp.OAuthConfigEncoded": { - "type": "object", - "properties": { - "client_id": { - "type": "string" - }, - "client_secret": { - "type": "string" - }, - "scope": { - "type": "string" - }, - "callback_port": { - "type": "integer", - "allOf": [ - { - "minimum": 1, - "maximum": 65535 - } - ] - }, - "redirect_uri": { - "type": "string" - } - }, - "additionalProperties": false - }, - "Mcp.RemoteConfigEncoded": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["remote"] - }, - "url": { - "type": "string" - }, - "headers": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "oauth": { - "anyOf": [ - { - "$ref": "#/components/schemas/Mcp.OAuthConfigEncoded" - }, - { - "type": "boolean", - "enum": [false] - } - ] - }, - "disabled": { - "type": "boolean" - }, - "codemode": { - "type": "boolean" - }, - "timeout": { - "$ref": "#/components/schemas/Objects_8" - } - }, - "required": ["type", "url"], - "additionalProperties": false - }, - "McpServerNotFoundErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["McpServerNotFoundError"] - }, - "server": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "server", "message"], - "additionalProperties": false - }, - "Mcp.Resource": { - "type": "object", - "properties": { - "server": { - "type": "string" - }, - "name": { - "type": "string" - }, - "uri": { - "type": "string" - }, - "description": { - "type": "string" - }, - "mimeType": { - "type": "string" - } - }, - "required": ["server", "name", "uri"], - "additionalProperties": false - }, - "Mcp.ResourceTemplate": { - "type": "object", - "properties": { - "server": { - "type": "string" - }, - "name": { - "type": "string" - }, - "uriTemplate": { - "type": "string" - }, - "description": { - "type": "string" - }, - "mimeType": { - "type": "string" - } - }, - "required": ["server", "name", "uriTemplate"], - "additionalProperties": false - }, - "Mcp.ResourceCatalog": { - "type": "object", - "properties": { - "resources": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Mcp.Resource" - } - }, - "templates": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Mcp.ResourceTemplate" - } - } - }, - "required": ["resources", "templates"], - "additionalProperties": false - }, - "Project.Vcs": { - "type": "string", - "enum": ["git", "hg"] - }, - "Project.Icon": { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "override": { - "type": "string" - }, - "color": { - "type": "string" - } - }, - "additionalProperties": false - }, - "Project.Commands": { - "type": "object", - "properties": { - "start": { - "type": "string", - "description": "Startup script to run when creating a new workspace (worktree)" - } - }, - "additionalProperties": false - }, - "Project.Time": { - "type": "object", - "properties": { - "created": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "updated": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "initialized": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - } - }, - "required": ["created", "updated"], - "additionalProperties": false - }, - "Project": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "canonical": { - "type": "string" - }, - "vcs": { - "$ref": "#/components/schemas/Project.Vcs" - }, - "name": { - "type": "string" - }, - "icon": { - "$ref": "#/components/schemas/Project.Icon" - }, - "commands": { - "$ref": "#/components/schemas/Project.Commands" - }, - "time": { - "$ref": "#/components/schemas/Project.Time" - }, - "sandboxes": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": ["id", "canonical", "time", "sandboxes"], - "additionalProperties": false - }, - "Project.Current": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "directory": { - "type": "string" - }, - "canonical": { - "type": "string" - } - }, - "required": ["id", "directory", "canonical"], - "additionalProperties": false - }, - "Form.Metadata": { - "type": "object" - }, - "Form.Fields_2": { - "type": "array", - "prefixItems": [ - { - "$ref": "#/components/schemas/Form.Field" - } - ], - "minItems": 1, - "items": { - "$ref": "#/components/schemas/Form.Field" - } - }, - "Form.Info": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^frm_" - } - ] - }, - "sessionID": { - "type": "string" - }, - "title": { - "type": "string" - }, - "metadata": { - "$ref": "#/components/schemas/Form.Metadata" - }, - "fields": { - "$ref": "#/components/schemas/Form.Fields_2" - } - }, - "required": ["id", "sessionID", "title", "fields"], - "additionalProperties": false - }, - "Form.CreatePayload": { - "type": "object", - "properties": { - "id": { - "anyOf": [ - { - "type": "string", - "allOf": [ - { - "pattern": "^frm_" - } - ] - }, - { - "type": "null" - } - ] - }, - "title": { - "type": "string" - }, - "metadata": { - "$ref": "#/components/schemas/Form.Metadata" - }, - "fields": { - "$ref": "#/components/schemas/Form.Fields_2" - } - }, - "required": ["title", "fields"], - "additionalProperties": false - }, - "FormNotFoundErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["FormNotFoundError"] - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "id", "message"], - "additionalProperties": false - }, - "Form.State": { - "anyOf": [ - { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["pending"] - } - }, - "required": ["status"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["answered"] - }, - "answer": { - "$ref": "#/components/schemas/Form.Answer" - } - }, - "required": ["status", "answer"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["cancelled"] - } - }, - "required": ["status"], - "additionalProperties": false - } - ] - }, - "Form.Reply": { - "type": "object", - "properties": { - "answer": { - "$ref": "#/components/schemas/Form.Answer" - } - }, - "required": ["answer"], - "additionalProperties": false - }, - "FormAlreadySettledErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["FormAlreadySettledError"] - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "id", "message"], - "additionalProperties": false - }, - "FormInvalidAnswerErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["FormInvalidAnswerError"] - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "id", "message"], - "additionalProperties": false - }, - "Arrays_8": { + "Arrays_681004346c78": { "type": "array", "items": { "type": "string" } }, - "Arrays_9": { + "Arrays_92aa8803e81f": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/Prompt.SkillAttachment" } }, - "Objects_9": { - "type": "object" + "Arrays_c17502465996": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PromptInput.SkillAttachment" + } }, - "Permission.Source": { - "anyOf": [ - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["tool"] - }, - "messageID": { - "type": "string" - }, - "id": { - "type": "string" - } - }, - "required": ["type", "messageID", "id"], - "additionalProperties": false - } - ] + "Arrays_e1027de4b984": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Prompt.AgentAttachment" + } }, - "Permission.Request": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^per" - } - ] - }, - "sessionID": { - "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] - }, - "action": { - "type": "string" - }, - "resources": { - "$ref": "#/components/schemas/Arrays_8" - }, - "save": { - "$ref": "#/components/schemas/Arrays_9" - }, - "metadata": { - "$ref": "#/components/schemas/Objects_9" - }, - "source": { - "$ref": "#/components/schemas/Permission.Source" - } - }, - "required": ["id", "sessionID", "action", "resources"], - "additionalProperties": false - }, - "PermissionSaved.Info": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "projectID": { - "type": "string" - }, - "action": { - "type": "string" - }, - "resource": { - "type": "string" - } - }, - "required": ["id", "projectID", "action", "resource"], - "additionalProperties": false - }, - "PermissionNotFoundErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["PermissionNotFoundError"] - }, - "requestID": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "requestID", "message"], - "additionalProperties": false - }, - "Permission.Reply": { - "type": "string", - "enum": ["once", "always", "reject"] - }, - "FileSystem.Entry": { - "type": "object", - "properties": { - "path": { - "type": "string" - }, - "type": { - "type": "string", - "enum": ["file", "directory"] - } - }, - "required": ["path", "type"], - "additionalProperties": false + "Arrays_fa246a9267ec": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Session.Message.Info" + } }, "Command.Info": { "type": "object", @@ -13900,515 +9893,54 @@ "required": ["name", "template"], "additionalProperties": false }, - "Skill.Info": { + "CommandEvaluationErrorEncoded": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "slash": { - "type": "boolean" - }, - "autoinvoke": { - "type": "boolean" - }, - "location": { - "type": "string" - }, - "content": { - "type": "string" - } - }, - "required": ["id", "name", "location", "content"], - "additionalProperties": false - }, - "V2EventEncoded": { - "type": "string", - "contentMediaType": "application/json" - }, - "Pty": { - "type": "object", - "properties": { - "id": { + "_tag": { "type": "string", - "allOf": [ - { - "pattern": "^pty" - } - ] - }, - "title": { - "type": "string" + "enum": ["CommandEvaluationError"] }, "command": { "type": "string" }, - "args": { - "type": "array", - "items": { - "type": "string" - } - }, - "cwd": { - "type": "string" - }, - "status": { - "type": "string", - "enum": ["running", "exited"] - }, - "pid": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "exitCode": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - } - }, - "required": ["id", "title", "command", "args", "cwd", "status", "pid"], - "additionalProperties": false - }, - "PtyNotFoundErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["PtyNotFoundError"] - }, - "ptyID": { - "type": "string" - }, "message": { "type": "string" } }, - "required": ["_tag", "ptyID", "message"], + "required": ["_tag", "command", "message"], "additionalProperties": false }, - "PtyTicket.ConnectToken": { - "type": "object", - "properties": { - "ticket": { - "type": "string" - }, - "expires_in": { - "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] - } - }, - "required": ["ticket", "expires_in"], - "additionalProperties": false - }, - "ForbiddenErrorEncoded": { + "CommandNotFoundErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", - "enum": ["ForbiddenError"] - }, - "message": { - "type": "string" - } - }, - "required": ["_tag", "message"], - "additionalProperties": false - }, - "Shell.Info": { - "type": "object", - "properties": { - "id": { - "type": "string", - "allOf": [ - { - "pattern": "^sh_" - } - ] - }, - "status": { - "$ref": "#/components/schemas/Union_5" + "enum": ["CommandNotFoundError"] }, "command": { "type": "string" }, - "cwd": { - "type": "string" - }, - "shell": { - "type": "string" - }, - "file": { - "type": "string" - }, - "pid": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "exit": { - "type": "number" - }, - "metadata": { - "type": "object" - }, - "time": { - "type": "object", - "properties": { - "started": { - "type": "number" - }, - "completed": { - "type": "number" - } - }, - "required": ["started"], - "additionalProperties": false - } - }, - "required": ["id", "status", "command", "cwd", "shell", "file", "metadata", "time"], - "additionalProperties": false - }, - "ShellNotFoundErrorEncoded": { - "type": "object", - "properties": { - "_tag": { - "type": "string", - "enum": ["ShellNotFoundError"] - }, - "id": { - "type": "string" - }, "message": { "type": "string" } }, - "required": ["_tag", "id", "message"], + "required": ["_tag", "command", "message"], "additionalProperties": false }, - "Reference.LocalSource": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["local"] - }, - "path": { - "type": "string" - }, - "description": { - "type": "string" - }, - "hidden": { - "type": "boolean" - } - }, - "required": ["type", "path"], - "additionalProperties": false - }, - "Reference.GitSource": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["git"] - }, - "repository": { - "type": "string" - }, - "branch": { - "type": "string" - }, - "description": { - "type": "string" - }, - "hidden": { - "type": "boolean" - } - }, - "required": ["type", "repository"], - "additionalProperties": false - }, - "Reference.Source": { - "anyOf": [ - { - "$ref": "#/components/schemas/Reference.LocalSource" - }, - { - "$ref": "#/components/schemas/Reference.GitSource" - } - ] - }, - "Reference.Info": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "description": { - "type": "string" - }, - "hidden": { - "type": "boolean" - }, - "source": { - "$ref": "#/components/schemas/Reference.Source" - } - }, - "required": ["name", "path", "source"], - "additionalProperties": false - }, - "Worktree.Directory": { - "type": "object", - "properties": { - "directory": { - "type": "string" - }, - "strategy": { - "type": "string" - } - }, - "required": ["directory"], - "additionalProperties": false - }, - "Worktree.List": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Worktree.Directory" - } - }, - "Worktree.Info": { - "type": "object", - "properties": { - "directory": { - "type": "string" - } - }, - "required": ["directory"], - "additionalProperties": false - }, - "WorktreeErrorEncoded": { - "type": "object", - "properties": { - "name": { - "type": "string", - "enum": ["WorktreeError"] - }, - "data": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "forceRequired": { - "$ref": "#/components/schemas/Union_10" - } - }, - "required": ["message"], - "additionalProperties": false - } - }, - "required": ["name", "data"], - "additionalProperties": false - }, - "Vcs.Branch": { - "type": "object", - "properties": { - "current": { - "type": "string" - }, - "default": { - "type": "string" - } - }, - "additionalProperties": false - }, - "Vcs.Info": { - "type": "object", - "properties": { - "branch": { - "$ref": "#/components/schemas/Vcs.Branch" - } - }, - "required": ["branch"], - "additionalProperties": false - }, - "Vcs.FileStatus": { - "type": "object", - "properties": { - "file": { - "type": "string" - }, - "additions": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "deletions": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "status": { - "type": "string", - "enum": ["added", "deleted", "modified"] - } - }, - "required": ["file", "additions", "deletions", "status"], - "additionalProperties": false - }, - "Vcs.Mode": { - "type": "string", - "enum": ["working", "branch"] - }, - "WebSearch.Provider": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": ["id", "name"], - "additionalProperties": false - }, - "WebSearch.Result": { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "title": { - "type": "string" - }, - "content": { - "type": "string" - }, - "time": { - "type": "object", - "properties": { - "published": { - "type": "number" - } - }, - "additionalProperties": false - } - }, - "required": ["url", "time"], - "additionalProperties": false - }, - "WebSearch.ResponseEncoded": { - "type": "object", - "properties": { - "providerID": { - "type": "string" - }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WebSearch.Result" - } - } - }, - "required": ["providerID", "results"], - "additionalProperties": false - }, - "Union_13": { - "anyOf": [ - { - "type": "string", - "allOf": [ - { - "pattern": "^[^/#]+\\/[^#]+(?:#[^#]+)?$" - } - ] - }, - { - "type": "object", - "properties": { - "providerID": { - "type": "string", - "allOf": [ - { - "pattern": "^[^/#]+$" - } - ] - }, - "model": { - "type": "string", - "allOf": [ - { - "pattern": "^[^#]+$" - } - ] - }, - "variant": { - "type": "string", - "allOf": [ - { - "pattern": "^[^#]+$" - } - ] - } - }, - "required": ["providerID", "model"], - "additionalProperties": false - } - ] - }, - "Objects_10": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "Objects_11": { - "type": "object" - }, "Config.AgentEncoded": { "type": "object", "properties": { "model": { - "$ref": "#/components/schemas/Union_13" + "$ref": "#/components/schemas/Union_85ca62cf1a33" }, "request": { "type": "object", "properties": { "headers": { - "$ref": "#/components/schemas/Objects_10" + "$ref": "#/components/schemas/Objects_3f161562db4a" }, "body": { - "$ref": "#/components/schemas/Objects_11" + "$ref": "#/components/schemas/Objects_a2c799262a3c" } }, "additionalProperties": false @@ -14451,6 +9983,103 @@ }, "additionalProperties": false }, + "Config.AgentsDirectoryEncoded": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["agents"] + }, + "path": { + "type": "string" + } + }, + "required": ["type", "path"], + "additionalProperties": false + }, + "Config.ClaudeDirectoryEncoded": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["claude"] + }, + "path": { + "type": "string" + } + }, + "required": ["type", "path"], + "additionalProperties": false + }, + "Config.CommandEncoded": { + "type": "object", + "properties": { + "template": { + "type": "string" + }, + "description": { + "type": "string" + }, + "agent": { + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/Union_85ca62cf1a33" + }, + "subtask": { + "type": "boolean" + } + }, + "required": ["template"], + "additionalProperties": false + }, + "Config.DirectoryEncoded": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["directory"] + }, + "path": { + "type": "string" + } + }, + "required": ["type", "path"], + "additionalProperties": false + }, + "Config.DocumentEncoded": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["document"] + }, + "path": { + "type": "string" + }, + "info": { + "$ref": "#/components/schemas/Config.InfoEncoded" + } + }, + "required": ["type", "info"], + "additionalProperties": false + }, + "Config.Entry": { + "anyOf": [ + { + "$ref": "#/components/schemas/Config.DocumentEncoded" + }, + { + "$ref": "#/components/schemas/Config.DirectoryEncoded" + }, + { + "$ref": "#/components/schemas/Config.AgentsDirectoryEncoded" + }, + { + "$ref": "#/components/schemas/Config.ClaudeDirectoryEncoded" + } + ] + }, "Config.Formatter.EntryEncoded": { "type": "object", "properties": { @@ -14478,298 +10107,6 @@ }, "additionalProperties": false }, - "Config.LSP.ServerEncoded": { - "type": "object", - "properties": { - "command": { - "type": "array", - "items": { - "type": "string" - } - }, - "extensions": { - "type": "array", - "items": { - "type": "string" - } - }, - "disabled": { - "type": "boolean" - }, - "env": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "initialization": { - "type": "object" - } - }, - "required": ["command"], - "additionalProperties": false - }, - "Config.CommandEncoded": { - "type": "object", - "properties": { - "template": { - "type": "string" - }, - "description": { - "type": "string" - }, - "agent": { - "type": "string" - }, - "model": { - "$ref": "#/components/schemas/Union_13" - }, - "subtask": { - "type": "boolean" - } - }, - "required": ["template"], - "additionalProperties": false - }, - "Config.Reference.GitEncoded": { - "type": "object", - "properties": { - "repository": { - "type": "string" - }, - "branch": { - "type": "string" - }, - "description": { - "type": "string" - }, - "hidden": { - "type": "boolean" - } - }, - "required": ["repository"], - "additionalProperties": false - }, - "Config.Reference.LocalEncoded": { - "type": "object", - "properties": { - "path": { - "type": "string" - }, - "description": { - "type": "string" - }, - "hidden": { - "type": "boolean" - } - }, - "required": ["path"], - "additionalProperties": false - }, - "ConfigWebSearch.InfoEncoded": { - "type": "object", - "properties": { - "provider": { - "anyOf": [ - { - "type": "string", - "enum": ["random"] - }, - { - "type": "string" - } - ] - } - }, - "required": ["provider"], - "additionalProperties": false - }, - "Config.Plugin.EntryEncoded": { - "type": "object", - "properties": { - "package": { - "type": "string" - }, - "options": { - "type": "object" - } - }, - "required": ["package"], - "additionalProperties": false - }, - "Config.WarmingEncoded": { - "type": "object", - "properties": { - "prompt": { - "type": "string" - }, - "interval": { - "type": "string" - }, - "duration": { - "type": "string" - } - }, - "additionalProperties": false - }, - "Config.Model.CostEncoded": { - "type": "object", - "properties": { - "tier": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["context"] - }, - "size": { - "type": "integer" - } - }, - "required": ["type", "size"], - "additionalProperties": false - }, - "input": { - "$ref": "#/components/schemas/Money.USDPerMillionTokens" - }, - "output": { - "$ref": "#/components/schemas/Money.USDPerMillionTokens" - }, - "cache": { - "type": "object", - "properties": { - "read": { - "$ref": "#/components/schemas/Money.USDPerMillionTokens" - }, - "write": { - "$ref": "#/components/schemas/Money.USDPerMillionTokens" - } - }, - "additionalProperties": false - } - }, - "required": ["input", "output"], - "additionalProperties": false - }, - "Config.ModelEncoded": { - "type": "object", - "properties": { - "modelID": { - "type": "string" - }, - "family": { - "type": "string" - }, - "name": { - "type": "string" - }, - "compatibility": { - "$ref": "#/components/schemas/Model.Compatibility" - }, - "package": { - "type": "string" - }, - "settings": { - "$ref": "#/components/schemas/Objects_11" - }, - "headers": { - "$ref": "#/components/schemas/Objects_10" - }, - "body": { - "$ref": "#/components/schemas/Objects_11" - }, - "capabilities": { - "$ref": "#/components/schemas/Model.Capabilities" - }, - "variants": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "settings": { - "$ref": "#/components/schemas/Objects_11" - }, - "headers": { - "$ref": "#/components/schemas/Objects_10" - }, - "body": { - "$ref": "#/components/schemas/Objects_11" - } - }, - "required": ["id"], - "additionalProperties": false - } - }, - "cost": { - "anyOf": [ - { - "$ref": "#/components/schemas/Config.Model.CostEncoded" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/Config.Model.CostEncoded" - } - } - ] - }, - "disabled": { - "type": "boolean" - }, - "limit": { - "type": "object", - "properties": { - "context": { - "type": "integer" - }, - "input": { - "type": "integer" - }, - "output": { - "type": "integer" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - "Config.ProviderEncoded": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "env": { - "type": "array", - "items": { - "type": "string" - } - }, - "package": { - "type": "string" - }, - "settings": { - "$ref": "#/components/schemas/Objects_11" - }, - "headers": { - "$ref": "#/components/schemas/Objects_10" - }, - "body": { - "$ref": "#/components/schemas/Objects_11" - }, - "models": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Config.ModelEncoded" - } - } - }, - "additionalProperties": false - }, "Config.InfoEncoded": { "type": "object", "properties": { @@ -14780,7 +10117,7 @@ "type": "string" }, "model": { - "$ref": "#/components/schemas/Union_13" + "$ref": "#/components/schemas/Union_85ca62cf1a33" }, "default_agent": { "type": "string" @@ -14942,7 +10279,7 @@ "type": "object", "properties": { "timeout": { - "$ref": "#/components/schemas/Objects_8" + "$ref": "#/components/schemas/Objects_7b507c2fd81f" }, "servers": { "type": "object", @@ -15106,80 +10443,4700 @@ }, "additionalProperties": false }, - "Config.DocumentEncoded": { + "Config.LSP.ServerEncoded": { + "type": "object", + "properties": { + "command": { + "type": "array", + "items": { + "type": "string" + } + }, + "extensions": { + "type": "array", + "items": { + "type": "string" + } + }, + "disabled": { + "type": "boolean" + }, + "env": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "initialization": { + "type": "object" + } + }, + "required": ["command"], + "additionalProperties": false + }, + "Config.Model.CostEncoded": { + "type": "object", + "properties": { + "tier": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["context"] + }, + "size": { + "type": "integer" + } + }, + "required": ["type", "size"], + "additionalProperties": false + }, + "input": { + "$ref": "#/components/schemas/Money.USDPerMillionTokens" + }, + "output": { + "$ref": "#/components/schemas/Money.USDPerMillionTokens" + }, + "cache": { + "type": "object", + "properties": { + "read": { + "$ref": "#/components/schemas/Money.USDPerMillionTokens" + }, + "write": { + "$ref": "#/components/schemas/Money.USDPerMillionTokens" + } + }, + "additionalProperties": false + } + }, + "required": ["input", "output"], + "additionalProperties": false + }, + "Config.ModelEncoded": { + "type": "object", + "properties": { + "modelID": { + "type": "string" + }, + "family": { + "type": "string" + }, + "name": { + "type": "string" + }, + "compatibility": { + "$ref": "#/components/schemas/Model.Compatibility" + }, + "package": { + "type": "string" + }, + "settings": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "headers": { + "$ref": "#/components/schemas/Objects_3f161562db4a" + }, + "body": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "capabilities": { + "$ref": "#/components/schemas/Model.Capabilities" + }, + "variants": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "settings": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "headers": { + "$ref": "#/components/schemas/Objects_3f161562db4a" + }, + "body": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + } + }, + "required": ["id"], + "additionalProperties": false + } + }, + "cost": { + "anyOf": [ + { + "$ref": "#/components/schemas/Config.Model.CostEncoded" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Config.Model.CostEncoded" + } + } + ] + }, + "disabled": { + "type": "boolean" + }, + "limit": { + "type": "object", + "properties": { + "context": { + "type": "integer" + }, + "input": { + "type": "integer" + }, + "output": { + "type": "integer" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "Config.Plugin.EntryEncoded": { + "type": "object", + "properties": { + "package": { + "type": "string" + }, + "options": { + "type": "object" + } + }, + "required": ["package"], + "additionalProperties": false + }, + "Config.ProviderEncoded": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "env": { + "type": "array", + "items": { + "type": "string" + } + }, + "package": { + "type": "string" + }, + "settings": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "headers": { + "$ref": "#/components/schemas/Objects_3f161562db4a" + }, + "body": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "models": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Config.ModelEncoded" + } + } + }, + "additionalProperties": false + }, + "Config.Reference.GitEncoded": { + "type": "object", + "properties": { + "repository": { + "type": "string" + }, + "branch": { + "type": "string" + }, + "description": { + "type": "string" + }, + "hidden": { + "type": "boolean" + } + }, + "required": ["repository"], + "additionalProperties": false + }, + "Config.Reference.LocalEncoded": { + "type": "object", + "properties": { + "path": { + "type": "string" + }, + "description": { + "type": "string" + }, + "hidden": { + "type": "boolean" + } + }, + "required": ["path"], + "additionalProperties": false + }, + "Config.WarmingEncoded": { + "type": "object", + "properties": { + "prompt": { + "type": "string" + }, + "interval": { + "type": "string" + }, + "duration": { + "type": "string" + } + }, + "additionalProperties": false + }, + "ConfigWebSearch.InfoEncoded": { + "type": "object", + "properties": { + "provider": { + "anyOf": [ + { + "type": "string", + "enum": ["random"] + }, + { + "type": "string" + } + ] + } + }, + "required": ["provider"], + "additionalProperties": false + }, + "ConflictErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["ConflictError"] + }, + "message": { + "type": "string" + }, + "resource": { + "$ref": "#/components/schemas/Union_f090cb615c84" + } + }, + "required": ["_tag", "message"], + "additionalProperties": false + }, + "Connection.CredentialInfo": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["document"] + "enum": ["credential"] }, - "path": { + "id": { "type": "string" }, - "info": { - "$ref": "#/components/schemas/Config.InfoEncoded" + "label": { + "type": "string" } }, - "required": ["type", "info"], + "required": ["type", "id", "label"], "additionalProperties": false }, - "Config.DirectoryEncoded": { + "Connection.EnvInfo": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["directory"] + "enum": ["env"] }, - "path": { + "name": { "type": "string" } }, - "required": ["type", "path"], + "required": ["type", "name"], "additionalProperties": false }, - "Config.AgentsDirectoryEncoded": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["agents"] - }, - "path": { - "type": "string" - } - }, - "required": ["type", "path"], - "additionalProperties": false - }, - "Config.ClaudeDirectoryEncoded": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["claude"] - }, - "path": { - "type": "string" - } - }, - "required": ["type", "path"], - "additionalProperties": false - }, - "Config.Entry": { + "Connection.Info": { "anyOf": [ { - "$ref": "#/components/schemas/Config.DocumentEncoded" + "$ref": "#/components/schemas/Connection.CredentialInfo" }, { - "$ref": "#/components/schemas/Config.DirectoryEncoded" - }, - { - "$ref": "#/components/schemas/Config.AgentsDirectoryEncoded" - }, - { - "$ref": "#/components/schemas/Config.ClaudeDirectoryEncoded" + "$ref": "#/components/schemas/Connection.EnvInfo" } ] + }, + "FileDiff.Info": { + "type": "object", + "properties": { + "file": { + "type": "string" + }, + "patch": { + "type": "string" + }, + "additions": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "deletions": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "status": { + "type": "string", + "enum": ["added", "deleted", "modified"] + } + }, + "required": ["file", "patch", "additions", "deletions", "status"], + "additionalProperties": false + }, + "FileSystem.Entry": { + "type": "object", + "properties": { + "path": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["file", "directory"] + } + }, + "required": ["path", "type"], + "additionalProperties": false + }, + "ForbiddenErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["ForbiddenError"] + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "message"], + "additionalProperties": false + }, + "Form.Answer": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Form.Value" + } + }, + "Form.BooleanField": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "required": { + "type": "boolean" + }, + "when": { + "$ref": "#/components/schemas/Arrays_4df8e9fdc8e1" + }, + "type": { + "type": "string", + "enum": ["boolean"] + }, + "default": { + "type": "boolean" + } + }, + "required": ["key", "type"], + "additionalProperties": false + }, + "Form.CreatePayload": { + "type": "object", + "properties": { + "id": { + "anyOf": [ + { + "type": "string", + "allOf": [ + { + "pattern": "^frm_" + } + ] + }, + { + "type": "null" + } + ] + }, + "title": { + "type": "string" + }, + "metadata": { + "$ref": "#/components/schemas/Form.Metadata" + }, + "fields": { + "$ref": "#/components/schemas/Form.Fields_2" + } + }, + "required": ["title", "fields"], + "additionalProperties": false + }, + "Form.ExternalField": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["external"] + }, + "url": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": ["key", "type", "url"], + "additionalProperties": false + }, + "Form.Field": { + "anyOf": [ + { + "$ref": "#/components/schemas/Form.StringField" + }, + { + "$ref": "#/components/schemas/Form.NumberField" + }, + { + "$ref": "#/components/schemas/Form.IntegerField" + }, + { + "$ref": "#/components/schemas/Form.BooleanField" + }, + { + "$ref": "#/components/schemas/Form.MultiselectField" + }, + { + "$ref": "#/components/schemas/Form.ExternalField" + } + ] + }, + "Form.Fields": { + "type": "array", + "prefixItems": [ + { + "$ref": "#/components/schemas/Form.Field" + } + ], + "minItems": 1, + "items": { + "$ref": "#/components/schemas/Form.Field" + } + }, + "Form.Fields_1": { + "type": "array", + "prefixItems": [ + { + "$ref": "#/components/schemas/Form.Field" + } + ], + "minItems": 1, + "items": { + "$ref": "#/components/schemas/Form.Field" + } + }, + "Form.Fields_2": { + "type": "array", + "prefixItems": [ + { + "$ref": "#/components/schemas/Form.Field" + } + ], + "minItems": 1, + "items": { + "$ref": "#/components/schemas/Form.Field" + } + }, + "Form.Info": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^frm_" + } + ] + }, + "sessionID": { + "type": "string" + }, + "title": { + "type": "string" + }, + "metadata": { + "$ref": "#/components/schemas/Form.Metadata" + }, + "fields": { + "$ref": "#/components/schemas/Form.Fields_2" + } + }, + "required": ["id", "sessionID", "title", "fields"], + "additionalProperties": false + }, + "Form.IntegerField": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "required": { + "type": "boolean" + }, + "when": { + "$ref": "#/components/schemas/Arrays_4df8e9fdc8e1" + }, + "type": { + "type": "string", + "enum": ["integer"] + }, + "minimum": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/components/schemas/Union_97d8d2942510" + } + ] + }, + "maximum": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/components/schemas/Union_97d8d2942510" + } + ] + }, + "default": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/components/schemas/Union_97d8d2942510" + } + ] + } + }, + "required": ["key", "type"], + "additionalProperties": false + }, + "Form.Metadata": { + "type": "object" + }, + "Form.MultiselectField": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "required": { + "type": "boolean" + }, + "when": { + "$ref": "#/components/schemas/Arrays_4df8e9fdc8e1" + }, + "type": { + "type": "string", + "enum": ["multiselect"] + }, + "options": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Form.Option" + } + }, + "minItems": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "maxItems": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "custom": { + "type": "boolean" + }, + "default": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": ["key", "type", "options"], + "additionalProperties": false + }, + "Form.NumberField": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "required": { + "type": "boolean" + }, + "when": { + "$ref": "#/components/schemas/Arrays_4df8e9fdc8e1" + }, + "type": { + "type": "string", + "enum": ["number"] + }, + "minimum": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/components/schemas/Union_97d8d2942510" + } + ] + }, + "maximum": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/components/schemas/Union_97d8d2942510" + } + ] + }, + "default": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/components/schemas/Union_97d8d2942510" + } + ] + } + }, + "required": ["key", "type"], + "additionalProperties": false + }, + "Form.Option": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": ["value", "label"], + "additionalProperties": false + }, + "Form.Reply": { + "type": "object", + "properties": { + "answer": { + "$ref": "#/components/schemas/Form.Answer" + } + }, + "required": ["answer"], + "additionalProperties": false + }, + "Form.State": { + "anyOf": [ + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["pending"] + } + }, + "required": ["status"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["answered"] + }, + "answer": { + "$ref": "#/components/schemas/Form.Answer" + } + }, + "required": ["status", "answer"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["cancelled"] + } + }, + "required": ["status"], + "additionalProperties": false + } + ] + }, + "Form.StringField": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "required": { + "type": "boolean" + }, + "when": { + "$ref": "#/components/schemas/Arrays_4df8e9fdc8e1" + }, + "type": { + "type": "string", + "enum": ["string"] + }, + "format": { + "type": "string", + "enum": ["email", "uri", "date", "date-time"] + }, + "minLength": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "maxLength": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "pattern": { + "type": "string" + }, + "placeholder": { + "type": "string" + }, + "default": { + "type": "string" + }, + "options": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Form.Option" + } + }, + "custom": { + "type": "boolean" + } + }, + "required": ["key", "type"], + "additionalProperties": false + }, + "Form.Value": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/Union_00be4ed53f19" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Form.When": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "op": { + "type": "string", + "enum": ["eq", "neq"] + }, + "value": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/Union_00be4ed53f19" + }, + { + "type": "boolean" + } + ] + } + }, + "required": ["key", "op", "value"], + "additionalProperties": false + }, + "FormAlreadySettledErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["FormAlreadySettledError"] + }, + "id": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "id", "message"], + "additionalProperties": false + }, + "FormInvalidAnswerErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["FormInvalidAnswerError"] + }, + "id": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "id", "message"], + "additionalProperties": false + }, + "FormNotFoundErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["FormNotFoundError"] + }, + "id": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "id", "message"], + "additionalProperties": false + }, + "GenerateTextResponse": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "text": { + "type": "string" + } + }, + "required": ["text"], + "additionalProperties": false + } + }, + "required": ["data"], + "additionalProperties": false + }, + "InstructionEntry.Info": { + "type": "object", + "properties": { + "key": { + "$ref": "#/components/schemas/InstructionEntry.Key" + }, + "value": { + "description": "JSON value attached to the session's instructions" + } + }, + "required": ["key", "value"], + "additionalProperties": false + }, + "InstructionEntry.Key": { + "type": "string", + "allOf": [ + { + "pattern": "^[a-z0-9][a-z0-9._-]*$", + "description": "Instruction entry key (lowercase alphanumerics plus . _ -)" + } + ] + }, + "InstructionEntryValueTooLargeErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["InstructionEntryValueTooLargeError"] + }, + "actualBytes": { + "type": "integer" + }, + "maxBytes": { + "type": "integer" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "actualBytes", "maxBytes", "message"], + "additionalProperties": false + }, + "Integration.AttemptEncoded": { + "type": "object", + "properties": { + "attemptID": { + "type": "string" + }, + "url": { + "type": "string" + }, + "instructions": { + "type": "string" + }, + "mode": { + "type": "string", + "enum": ["auto", "code"] + }, + "time": { + "$ref": "#/components/schemas/Objects_03af97aacac9" + } + }, + "required": ["attemptID", "url", "instructions", "mode", "time"], + "additionalProperties": false + }, + "Integration.AttemptStatus": { + "anyOf": [ + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["pending"] + }, + "time": { + "$ref": "#/components/schemas/Objects_03af97aacac9" + } + }, + "required": ["status", "time"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["complete"] + }, + "time": { + "$ref": "#/components/schemas/Objects_03af97aacac9" + } + }, + "required": ["status", "time"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["failed"] + }, + "message": { + "type": "string" + }, + "time": { + "$ref": "#/components/schemas/Objects_03af97aacac9" + } + }, + "required": ["status", "message", "time"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["expired"] + }, + "time": { + "$ref": "#/components/schemas/Objects_03af97aacac9" + } + }, + "required": ["status", "time"], + "additionalProperties": false + } + ] + }, + "Integration.CommandAttempt": { + "type": "object", + "properties": { + "attemptID": { + "type": "string" + }, + "time": { + "$ref": "#/components/schemas/Objects_03af97aacac9" + } + }, + "required": ["attemptID", "time"], + "additionalProperties": false + }, + "Integration.CommandAttemptStatus": { + "anyOf": [ + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["pending"] + }, + "message": { + "type": "string" + }, + "time": { + "$ref": "#/components/schemas/Objects_03af97aacac9" + } + }, + "required": ["status", "time"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["complete"] + }, + "time": { + "$ref": "#/components/schemas/Objects_03af97aacac9" + } + }, + "required": ["status", "time"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["failed"] + }, + "message": { + "type": "string" + }, + "time": { + "$ref": "#/components/schemas/Objects_03af97aacac9" + } + }, + "required": ["status", "message", "time"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["expired"] + }, + "time": { + "$ref": "#/components/schemas/Objects_03af97aacac9" + } + }, + "required": ["status", "time"], + "additionalProperties": false + } + ] + }, + "Integration.CommandMethod": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["command"] + }, + "label": { + "type": "string" + }, + "command": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": ["id", "type", "label", "command"], + "additionalProperties": false + }, + "Integration.EnvMethod": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["env"] + }, + "names": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": ["type", "names"], + "additionalProperties": false + }, + "Integration.Info": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "methods": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Integration.Method" + } + }, + "connections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Connection.Info" + } + } + }, + "required": ["id", "name", "methods", "connections"], + "additionalProperties": false + }, + "Integration.KeyMethod": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["key"] + }, + "label": { + "type": "string" + }, + "form": { + "$ref": "#/components/schemas/Form.Fields_1" + } + }, + "required": ["type"], + "additionalProperties": false + }, + "Integration.Method": { + "anyOf": [ + { + "$ref": "#/components/schemas/Integration.OAuthMethod" + }, + { + "$ref": "#/components/schemas/Integration.CommandMethod" + }, + { + "$ref": "#/components/schemas/Integration.KeyMethod" + }, + { + "$ref": "#/components/schemas/Integration.EnvMethod" + } + ] + }, + "Integration.OAuthMethod": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["oauth"] + }, + "label": { + "type": "string" + }, + "form": { + "$ref": "#/components/schemas/Form.Fields" + } + }, + "required": ["id", "type", "label"], + "additionalProperties": false + }, + "InvalidCursorErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["InvalidCursorError"] + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "message"], + "additionalProperties": false + }, + "InvalidRequestErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["InvalidRequestError"] + }, + "message": { + "type": "string" + }, + "kind": { + "$ref": "#/components/schemas/Union_f090cb615c84" + }, + "field": { + "$ref": "#/components/schemas/Union_f090cb615c84" + } + }, + "required": ["_tag", "message"], + "additionalProperties": false + }, + "Location.InfoEncoded": { + "type": "object", + "properties": { + "directory": { + "type": "string" + }, + "workspaceID": { + "type": "string", + "allOf": [ + { + "pattern": "^wrk" + } + ] + }, + "project": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "directory": { + "type": "string" + }, + "canonical": { + "type": "string" + } + }, + "required": ["id", "directory", "canonical"], + "additionalProperties": false + } + }, + "required": ["directory", "project"], + "additionalProperties": false + }, + "Location.Ref": { + "type": "object", + "properties": { + "directory": { + "type": "string" + }, + "workspaceID": { + "type": "string", + "allOf": [ + { + "pattern": "^wrk" + } + ] + } + }, + "required": ["directory"], + "additionalProperties": false + }, + "Mcp.LocalConfigEncoded": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["local"] + }, + "command": { + "type": "array", + "items": { + "type": "string" + } + }, + "cwd": { + "type": "string" + }, + "environment": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "disabled": { + "type": "boolean" + }, + "codemode": { + "type": "boolean" + }, + "timeout": { + "$ref": "#/components/schemas/Objects_7b507c2fd81f" + } + }, + "required": ["type", "command"], + "additionalProperties": false + }, + "Mcp.OAuthConfigEncoded": { + "type": "object", + "properties": { + "client_id": { + "type": "string" + }, + "client_secret": { + "type": "string" + }, + "scope": { + "type": "string" + }, + "callback_port": { + "type": "integer", + "allOf": [ + { + "minimum": 1, + "maximum": 65535 + } + ] + }, + "redirect_uri": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Mcp.RemoteConfigEncoded": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["remote"] + }, + "url": { + "type": "string" + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "oauth": { + "anyOf": [ + { + "$ref": "#/components/schemas/Mcp.OAuthConfigEncoded" + }, + { + "type": "boolean", + "enum": [false] + } + ] + }, + "disabled": { + "type": "boolean" + }, + "codemode": { + "type": "boolean" + }, + "timeout": { + "$ref": "#/components/schemas/Objects_7b507c2fd81f" + } + }, + "required": ["type", "url"], + "additionalProperties": false + }, + "Mcp.Resource": { + "type": "object", + "properties": { + "server": { + "type": "string" + }, + "name": { + "type": "string" + }, + "uri": { + "type": "string" + }, + "description": { + "type": "string" + }, + "mimeType": { + "type": "string" + } + }, + "required": ["server", "name", "uri"], + "additionalProperties": false + }, + "Mcp.ResourceCatalog": { + "type": "object", + "properties": { + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Mcp.Resource" + } + }, + "templates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Mcp.ResourceTemplate" + } + } + }, + "required": ["resources", "templates"], + "additionalProperties": false + }, + "Mcp.ResourceTemplate": { + "type": "object", + "properties": { + "server": { + "type": "string" + }, + "name": { + "type": "string" + }, + "uriTemplate": { + "type": "string" + }, + "description": { + "type": "string" + }, + "mimeType": { + "type": "string" + } + }, + "required": ["server", "name", "uriTemplate"], + "additionalProperties": false + }, + "Mcp.Server": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/Mcp.Status.Connected" + }, + { + "$ref": "#/components/schemas/Mcp.Status.Pending" + }, + { + "$ref": "#/components/schemas/Mcp.Status.Disabled" + }, + { + "$ref": "#/components/schemas/Mcp.Status.Failed" + }, + { + "$ref": "#/components/schemas/Mcp.Status.NeedsAuth" + } + ] + }, + "integrationID": { + "type": "string" + } + }, + "required": ["name", "status"], + "additionalProperties": false + }, + "Mcp.Status.Connected": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["connected"] + } + }, + "required": ["status"], + "additionalProperties": false + }, + "Mcp.Status.Disabled": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["disabled"] + } + }, + "required": ["status"], + "additionalProperties": false + }, + "Mcp.Status.Failed": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["failed"] + }, + "error": { + "type": "string" + } + }, + "required": ["status", "error"], + "additionalProperties": false + }, + "Mcp.Status.NeedsAuth": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["needs_auth"] + } + }, + "required": ["status"], + "additionalProperties": false + }, + "Mcp.Status.Pending": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["pending"] + } + }, + "required": ["status"], + "additionalProperties": false + }, + "McpServerNotFoundErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["McpServerNotFoundError"] + }, + "server": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "server", "message"], + "additionalProperties": false + }, + "MessageNotFoundErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["MessageNotFoundError"] + }, + "sessionID": { + "type": "string" + }, + "messageID": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "sessionID", "messageID", "message"], + "additionalProperties": false + }, + "Model.Capabilities": { + "type": "object", + "properties": { + "tools": { + "type": "boolean" + }, + "input": { + "type": "array", + "items": { + "type": "string" + } + }, + "output": { + "type": "array", + "items": { + "type": "string" + } + }, + "responsesWebsockets": { + "type": "boolean" + } + }, + "required": ["tools", "input", "output"], + "additionalProperties": false + }, + "Model.Compatibility": { + "type": "object", + "properties": { + "reasoningField": { + "$ref": "#/components/schemas/Model.ReasoningField" + }, + "maxTokensField": { + "$ref": "#/components/schemas/Model.MaxTokensField" + }, + "requireFinishReason": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "Model.Cost": { + "type": "object", + "properties": { + "tier": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["context"] + }, + "size": { + "type": "integer" + } + }, + "required": ["type", "size"], + "additionalProperties": false + }, + "input": { + "$ref": "#/components/schemas/Money.USDPerMillionTokens" + }, + "output": { + "$ref": "#/components/schemas/Money.USDPerMillionTokens" + }, + "cache": { + "type": "object", + "properties": { + "read": { + "$ref": "#/components/schemas/Money.USDPerMillionTokens" + }, + "write": { + "$ref": "#/components/schemas/Money.USDPerMillionTokens" + } + }, + "required": ["read", "write"], + "additionalProperties": false + } + }, + "required": ["input", "output", "cache"], + "additionalProperties": false + }, + "Model.Info": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "modelID": { + "type": "string" + }, + "providerID": { + "type": "string" + }, + "family": { + "type": "string" + }, + "name": { + "type": "string" + }, + "compatibility": { + "$ref": "#/components/schemas/Model.Compatibility" + }, + "package": { + "type": "string" + }, + "settings": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "headers": { + "$ref": "#/components/schemas/Objects_3f161562db4a" + }, + "body": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "capabilities": { + "$ref": "#/components/schemas/Model.Capabilities" + }, + "variants": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Model.Variant" + } + }, + "time": { + "type": "object", + "properties": { + "released": { + "type": "number" + } + }, + "required": ["released"], + "additionalProperties": false + }, + "cost": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Model.Cost" + } + }, + "status": { + "type": "string", + "enum": ["alpha", "beta", "deprecated", "active"] + }, + "enabled": { + "type": "boolean" + }, + "limit": { + "type": "object", + "properties": { + "context": { + "type": "integer" + }, + "input": { + "type": "integer" + }, + "output": { + "type": "integer" + } + }, + "required": ["context", "output"], + "additionalProperties": false + } + }, + "required": [ + "id", + "modelID", + "providerID", + "name", + "capabilities", + "variants", + "time", + "cost", + "status", + "enabled", + "limit" + ], + "additionalProperties": false + }, + "Model.MaxTokensField": { + "type": "string", + "enum": ["max_completion_tokens", "max_tokens"] + }, + "Model.ReasoningField": { + "anyOf": [ + { + "type": "string", + "enum": ["reasoning", "reasoning_content", "reasoning_text"] + }, + { + "type": "string" + } + ] + }, + "Model.Ref": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "providerID": { + "type": "string" + }, + "variant": { + "type": "string" + } + }, + "required": ["id", "providerID"], + "additionalProperties": false + }, + "Model.Variant": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "settings": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "headers": { + "$ref": "#/components/schemas/Objects_3f161562db4a" + }, + "body": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + } + }, + "required": ["id"], + "additionalProperties": false + }, + "Money.USD": { + "type": "number" + }, + "Money.USDPerMillionTokens": { + "type": "number" + }, + "Objects_03af97aacac9": { + "type": "object", + "properties": { + "created": { + "$ref": "#/components/schemas/Union_00be4ed53f19" + }, + "expires": { + "$ref": "#/components/schemas/Union_00be4ed53f19" + } + }, + "required": ["created", "expires"], + "additionalProperties": false + }, + "Objects_3f161562db4a": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "Objects_7b507c2fd81f": { + "type": "object", + "properties": { + "startup": { + "type": "integer", + "allOf": [ + { + "exclusiveMinimum": 0 + } + ] + }, + "catalog": { + "type": "integer", + "allOf": [ + { + "exclusiveMinimum": 0 + } + ] + }, + "execution": { + "type": "integer", + "allOf": [ + { + "exclusiveMinimum": 0 + } + ] + } + }, + "additionalProperties": false + }, + "Objects_9d53a00b1efb": { + "type": "object", + "properties": { + "output": { + "type": "string" + }, + "cursor": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "size": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "truncated": { + "type": "boolean" + } + }, + "required": ["output", "cursor", "size", "truncated"], + "additionalProperties": false + }, + "Objects_a2c799262a3c": { + "type": "object" + }, + "Objects_d7bbfd8ec2f6": { + "type": "object", + "properties": { + "created": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false + }, + "Permission.Effect": { + "type": "string", + "enum": ["allow", "deny", "ask"] + }, + "Permission.Reply": { + "type": "string", + "enum": ["once", "always", "reject"] + }, + "Permission.Request": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^per" + } + ] + }, + "sessionID": { + "type": "string", + "allOf": [ + { + "pattern": "^ses" + } + ] + }, + "action": { + "type": "string" + }, + "resources": { + "$ref": "#/components/schemas/Arrays_681004346c78" + }, + "save": { + "$ref": "#/components/schemas/Arrays_681004346c78" + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "source": { + "$ref": "#/components/schemas/Permission.Source" + } + }, + "required": ["id", "sessionID", "action", "resources"], + "additionalProperties": false + }, + "Permission.Rule": { + "type": "object", + "properties": { + "action": { + "type": "string" + }, + "resource": { + "type": "string" + }, + "effect": { + "$ref": "#/components/schemas/Permission.Effect" + } + }, + "required": ["action", "resource", "effect"], + "additionalProperties": false + }, + "Permission.Ruleset": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Permission.Rule" + } + }, + "Permission.Source": { + "anyOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["tool"] + }, + "messageID": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "required": ["type", "messageID", "id"], + "additionalProperties": false + } + ] + }, + "PermissionNotFoundErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["PermissionNotFoundError"] + }, + "requestID": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "requestID", "message"], + "additionalProperties": false + }, + "PermissionSaved.Info": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "projectID": { + "type": "string" + }, + "action": { + "type": "string" + }, + "resource": { + "type": "string" + } + }, + "required": ["id", "projectID", "action", "resource"], + "additionalProperties": false + }, + "Plugin.Info": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "source": { + "$ref": "#/components/schemas/Plugin.Source" + }, + "status": { + "type": "string", + "enum": ["active"] + }, + "tui": { + "type": "boolean" + } + }, + "required": ["id", "source", "status", "tui"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "source": { + "$ref": "#/components/schemas/Plugin.Source" + }, + "status": { + "type": "string", + "enum": ["failed"] + }, + "error": { + "type": "string" + }, + "tui": { + "type": "boolean" + } + }, + "required": ["source", "status", "error", "tui"], + "additionalProperties": false + } + ] + }, + "Plugin.Source": { + "anyOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["builtin"] + } + }, + "required": ["type"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["package"] + }, + "package": { + "type": "string" + } + }, + "required": ["type", "package"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["local"] + }, + "path": { + "type": "string" + } + }, + "required": ["type", "path"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["sdk"] + } + }, + "required": ["type"], + "additionalProperties": false + } + ] + }, + "Project": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "canonical": { + "type": "string" + }, + "vcs": { + "$ref": "#/components/schemas/Project.Vcs" + }, + "name": { + "type": "string" + }, + "icon": { + "$ref": "#/components/schemas/Project.Icon" + }, + "commands": { + "$ref": "#/components/schemas/Project.Commands" + }, + "time": { + "$ref": "#/components/schemas/Project.Time" + }, + "sandboxes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": ["id", "canonical", "time", "sandboxes"], + "additionalProperties": false + }, + "Project.Commands": { + "type": "object", + "properties": { + "start": { + "type": "string", + "description": "Startup script to run when creating a new workspace (worktree)" + } + }, + "additionalProperties": false + }, + "Project.Current": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "directory": { + "type": "string" + }, + "canonical": { + "type": "string" + } + }, + "required": ["id", "directory", "canonical"], + "additionalProperties": false + }, + "Project.Icon": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "override": { + "type": "string" + }, + "color": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Project.Time": { + "type": "object", + "properties": { + "created": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "updated": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "initialized": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + } + }, + "required": ["created", "updated"], + "additionalProperties": false + }, + "Project.Vcs": { + "type": "string", + "enum": ["git", "hg"] + }, + "Prompt.AgentAttachment": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "mention": { + "$ref": "#/components/schemas/Prompt.Mention" + } + }, + "required": ["name"], + "additionalProperties": false + }, + "Prompt.Base64": { + "type": "string", + "allOf": [ + { + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" + } + ] + }, + "Prompt.FileAttachment": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Prompt.Base64" + }, + "mime": { + "type": "string" + }, + "source": { + "$ref": "#/components/schemas/Prompt.FileSource" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "mention": { + "$ref": "#/components/schemas/Prompt.Mention" + } + }, + "required": ["data", "mime", "source"], + "additionalProperties": false + }, + "Prompt.FileSource": { + "anyOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["inline"] + } + }, + "required": ["type"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["uri"] + }, + "uri": { + "type": "string" + } + }, + "required": ["type", "uri"], + "additionalProperties": false + } + ] + }, + "Prompt.Mention": { + "type": "object", + "properties": { + "start": { + "type": "number" + }, + "end": { + "type": "number" + }, + "text": { + "type": "string" + } + }, + "required": ["start", "end", "text"], + "additionalProperties": false + }, + "Prompt.SkillAttachment": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "mention": { + "$ref": "#/components/schemas/Prompt.Mention" + } + }, + "required": ["id", "name"], + "additionalProperties": false + }, + "PromptInput.FileAttachment": { + "type": "object", + "properties": { + "uri": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "mention": { + "$ref": "#/components/schemas/Prompt.Mention" + } + }, + "required": ["uri"], + "additionalProperties": false + }, + "PromptInput.SkillAttachment": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "mention": { + "$ref": "#/components/schemas/Prompt.Mention" + } + }, + "required": ["id"], + "additionalProperties": false + }, + "Provider.Info": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "integrationID": { + "type": "string" + }, + "name": { + "type": "string" + }, + "activation": { + "type": "string", + "enum": ["auto", "enabled", "disabled"] + }, + "package": { + "type": "string" + }, + "settings": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "headers": { + "$ref": "#/components/schemas/Objects_3f161562db4a" + }, + "body": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + } + }, + "required": ["id", "name", "activation", "package"], + "additionalProperties": false + }, + "Provider.Request": { + "type": "object", + "properties": { + "settings": { + "$ref": "#/components/schemas/Provider.Settings" + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "body": { + "type": "object" + } + }, + "required": ["settings", "headers", "body"], + "additionalProperties": false + }, + "Provider.Settings": { + "type": "object" + }, + "ProviderNotFoundErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["ProviderNotFoundError"] + }, + "providerID": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "providerID", "message"], + "additionalProperties": false + }, + "Pty": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^pty" + } + ] + }, + "title": { + "type": "string" + }, + "command": { + "type": "string" + }, + "args": { + "type": "array", + "items": { + "type": "string" + } + }, + "cwd": { + "type": "string" + }, + "status": { + "type": "string", + "enum": ["running", "exited"] + }, + "pid": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "exitCode": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + } + }, + "required": ["id", "title", "command", "args", "cwd", "status", "pid"], + "additionalProperties": false + }, + "PtyNotFoundErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["PtyNotFoundError"] + }, + "ptyID": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "ptyID", "message"], + "additionalProperties": false + }, + "PtyTicket.ConnectToken": { + "type": "object", + "properties": { + "ticket": { + "type": "string" + }, + "expires_in": { + "type": "integer", + "allOf": [ + { + "exclusiveMinimum": 0 + } + ] + } + }, + "required": ["ticket", "expires_in"], + "additionalProperties": false + }, + "Reference.GitSource": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["git"] + }, + "repository": { + "type": "string" + }, + "branch": { + "type": "string" + }, + "description": { + "type": "string" + }, + "hidden": { + "type": "boolean" + } + }, + "required": ["type", "repository"], + "additionalProperties": false + }, + "Reference.Info": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "description": { + "type": "string" + }, + "hidden": { + "type": "boolean" + }, + "source": { + "$ref": "#/components/schemas/Reference.Source" + } + }, + "required": ["name", "path", "source"], + "additionalProperties": false + }, + "Reference.LocalSource": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["local"] + }, + "path": { + "type": "string" + }, + "description": { + "type": "string" + }, + "hidden": { + "type": "boolean" + } + }, + "required": ["type", "path"], + "additionalProperties": false + }, + "Reference.Source": { + "anyOf": [ + { + "$ref": "#/components/schemas/Reference.LocalSource" + }, + { + "$ref": "#/components/schemas/Reference.GitSource" + } + ] + }, + "ServiceHealth": { + "type": "object", + "properties": { + "healthy": { + "type": "boolean", + "enum": [true] + }, + "version": { + "type": "string" + }, + "pid": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + } + }, + "required": ["healthy", "version", "pid"], + "additionalProperties": false + }, + "ServiceUnavailableErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["ServiceUnavailableError"] + }, + "message": { + "type": "string" + }, + "service": { + "$ref": "#/components/schemas/Union_f090cb615c84" + } + }, + "required": ["_tag", "message"], + "additionalProperties": false + }, + "Session.ForkBoundary": { + "anyOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["before"] + }, + "messageID": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + } + }, + "required": ["type", "messageID"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["through"] + }, + "messageID": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + } + }, + "required": ["type", "messageID"], + "additionalProperties": false + } + ] + }, + "Session.ForkRequestBoundary": { + "anyOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["before"] + }, + "messageID": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + } + }, + "required": ["type", "messageID"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["through"] + } + }, + "required": ["type"], + "additionalProperties": false + } + ] + }, + "Session.Inbox.Compaction": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "sessionID": { + "type": "string", + "allOf": [ + { + "pattern": "^ses" + } + ] + }, + "timeCreated": { + "type": "number" + }, + "type": { + "type": "string", + "enum": ["compaction"] + }, + "payload": { + "$ref": "#/components/schemas/Session.Inbox.CompactionPayload" + }, + "delivery": { + "$ref": "#/components/schemas/Session.Inbox.Delivery" + } + }, + "required": ["id", "sessionID", "timeCreated", "type", "payload", "delivery"], + "additionalProperties": false + }, + "Session.Inbox.CompactionPayload": { + "anyOf": [ + { + "type": "object" + }, + { + "type": "array" + } + ] + }, + "Session.Inbox.Delivery": { + "type": "string", + "enum": ["steer", "queue"] + }, + "Session.Inbox.Info": { + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Inbox.User" + }, + { + "$ref": "#/components/schemas/Session.Inbox.Synthetic" + }, + { + "$ref": "#/components/schemas/Session.Inbox.Compaction" + }, + { + "$ref": "#/components/schemas/Session.Inbox.Move" + } + ] + }, + "Session.Inbox.Move": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "sessionID": { + "type": "string", + "allOf": [ + { + "pattern": "^ses" + } + ] + }, + "timeCreated": { + "type": "number" + }, + "type": { + "type": "string", + "enum": ["move"] + }, + "payload": { + "$ref": "#/components/schemas/Session.Inbox.MovePayload" + }, + "delivery": { + "$ref": "#/components/schemas/Session.Inbox.Delivery" + } + }, + "required": ["id", "sessionID", "timeCreated", "type", "payload", "delivery"], + "additionalProperties": false + }, + "Session.Inbox.MovePayload": { + "type": "object", + "properties": { + "location": { + "$ref": "#/components/schemas/Location.Ref" + }, + "projectID": { + "type": "string" + }, + "subpath": { + "type": "string" + } + }, + "required": ["location", "projectID"], + "additionalProperties": false + }, + "Session.Inbox.Synthetic": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "sessionID": { + "type": "string", + "allOf": [ + { + "pattern": "^ses" + } + ] + }, + "timeCreated": { + "type": "number" + }, + "type": { + "type": "string", + "enum": ["synthetic"] + }, + "payload": { + "$ref": "#/components/schemas/Session.Inbox.SyntheticPayload" + }, + "delivery": { + "$ref": "#/components/schemas/Session.Inbox.Delivery" + } + }, + "required": ["id", "sessionID", "timeCreated", "type", "payload", "delivery"], + "additionalProperties": false + }, + "Session.Inbox.SyntheticPayload": { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "description": { + "type": "string" + }, + "metadata": { + "type": "object" + } + }, + "required": ["text"], + "additionalProperties": false + }, + "Session.Inbox.User": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "sessionID": { + "type": "string", + "allOf": [ + { + "pattern": "^ses" + } + ] + }, + "timeCreated": { + "type": "number" + }, + "type": { + "type": "string", + "enum": ["user"] + }, + "payload": { + "$ref": "#/components/schemas/Session.Inbox.UserPayload" + }, + "delivery": { + "$ref": "#/components/schemas/Session.Inbox.Delivery" + } + }, + "required": ["id", "sessionID", "timeCreated", "type", "payload", "delivery"], + "additionalProperties": false + }, + "Session.Inbox.UserPayload": { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "files": { + "$ref": "#/components/schemas/Arrays_042d796a7901" + }, + "agents": { + "$ref": "#/components/schemas/Arrays_e1027de4b984" + }, + "skills": { + "$ref": "#/components/schemas/Arrays_92aa8803e81f" + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + } + }, + "required": ["text"], + "additionalProperties": false + }, + "Session.Info": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^ses" + } + ] + }, + "parentID": { + "type": "string", + "allOf": [ + { + "pattern": "^ses" + } + ] + }, + "fork": { + "type": "object", + "properties": { + "sessionID": { + "type": "string", + "allOf": [ + { + "pattern": "^ses" + } + ] + }, + "boundary": { + "$ref": "#/components/schemas/Session.ForkBoundary" + } + }, + "required": ["sessionID", "boundary"], + "additionalProperties": false + }, + "projectID": { + "type": "string" + }, + "agent": { + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/Model.Ref" + }, + "cost": { + "$ref": "#/components/schemas/Money.USD" + }, + "tokens": { + "$ref": "#/components/schemas/TokenUsage.Info" + }, + "outcome": { + "type": "string", + "enum": ["succeeded", "failed", "interrupted"] + }, + "time": { + "type": "object", + "properties": { + "created": { + "type": "number" + }, + "updated": { + "type": "number" + }, + "idle": { + "type": "number" + }, + "viewed": { + "type": "number" + }, + "archived": { + "type": "number" + } + }, + "required": ["created", "updated"], + "additionalProperties": false + }, + "title": { + "type": "string" + }, + "location": { + "$ref": "#/components/schemas/Location.Ref" + }, + "subpath": { + "type": "string" + }, + "revert": { + "$ref": "#/components/schemas/Session.Revert" + } + }, + "required": ["id", "projectID", "cost", "tokens", "time", "location"], + "additionalProperties": false + }, + "Session.Message.AgentSelected": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + }, + "type": { + "type": "string", + "enum": ["agent-switched"] + }, + "agent": { + "type": "string" + }, + "previous": { + "type": "string" + } + }, + "required": ["id", "time", "type", "agent"], + "additionalProperties": false + }, + "Session.Message.Assistant": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "type": "object", + "properties": { + "created": { + "type": "number" + }, + "completed": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": ["assistant"] + }, + "agent": { + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/Model.Ref" + }, + "content": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Message.Assistant.Text" + }, + { + "$ref": "#/components/schemas/Session.Message.Assistant.Reasoning" + }, + { + "$ref": "#/components/schemas/Session.Message.Assistant.Tool" + } + ] + } + }, + "snapshot": { + "type": "object", + "properties": { + "start": { + "type": "string" + }, + "end": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "finish": { + "type": "string", + "enum": ["stop", "length", "tool-calls", "content-filter", "error", "unknown"] + }, + "rawFinish": { + "type": "string" + }, + "providerState": { + "$ref": "#/components/schemas/Session.Message.ProviderState_4" + }, + "cost": { + "$ref": "#/components/schemas/Money.USD" + }, + "tokens": { + "$ref": "#/components/schemas/TokenUsage.Info" + }, + "error": { + "$ref": "#/components/schemas/Session.StructuredError" + }, + "retry": { + "$ref": "#/components/schemas/Session.Message.Assistant.Retry" + } + }, + "required": ["id", "time", "type", "agent", "model", "content"], + "additionalProperties": false + }, + "Session.Message.Assistant.Reasoning": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["reasoning"] + }, + "text": { + "type": "string" + }, + "state": { + "$ref": "#/components/schemas/Session.Message.ProviderState_1" + }, + "time": { + "type": "object", + "properties": { + "created": { + "type": "number" + }, + "completed": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false + } + }, + "required": ["type", "text"], + "additionalProperties": false + }, + "Session.Message.Assistant.Retry": { + "type": "object", + "properties": { + "attempt": { + "type": "integer", + "allOf": [ + { + "exclusiveMinimum": 0 + } + ] + }, + "at": { + "type": "number" + }, + "error": { + "$ref": "#/components/schemas/Session.StructuredError" + } + }, + "required": ["attempt", "at", "error"], + "additionalProperties": false + }, + "Session.Message.Assistant.Text": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["text"] + }, + "text": { + "type": "string" + }, + "state": { + "$ref": "#/components/schemas/Session.Message.ProviderState" + } + }, + "required": ["type", "text"], + "additionalProperties": false + }, + "Session.Message.Assistant.Tool": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["tool"] + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "executed": { + "type": "boolean" + }, + "providerState": { + "$ref": "#/components/schemas/Session.Message.ProviderState_2" + }, + "providerResultState": { + "$ref": "#/components/schemas/Session.Message.ProviderState_3" + }, + "state": { + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Message.ToolState.Streaming" + }, + { + "$ref": "#/components/schemas/Session.Message.ToolState.Running" + }, + { + "$ref": "#/components/schemas/Session.Message.ToolState.Completed" + }, + { + "$ref": "#/components/schemas/Session.Message.ToolState.Error" + } + ] + }, + "time": { + "type": "object", + "properties": { + "created": { + "type": "number" + }, + "ran": { + "type": "number" + }, + "completed": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false + } + }, + "required": ["type", "id", "name", "state", "time"], + "additionalProperties": false + }, + "Session.Message.Compaction": { + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Message.Compaction.Running" + }, + { + "$ref": "#/components/schemas/Session.Message.Compaction.Completed" + }, + { + "$ref": "#/components/schemas/Session.Message.Compaction.Failed" + } + ] + }, + "Session.Message.Compaction.Completed": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["compaction"] + }, + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + }, + "status": { + "type": "string", + "enum": ["completed"] + }, + "reason": { + "type": "string", + "enum": ["auto", "manual"] + }, + "summary": { + "type": "string" + }, + "recent": { + "type": "string" + } + }, + "required": ["type", "id", "time", "status", "reason", "summary", "recent"], + "additionalProperties": false + }, + "Session.Message.Compaction.Failed": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["compaction"] + }, + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + }, + "status": { + "type": "string", + "enum": ["failed"] + }, + "reason": { + "type": "string", + "enum": ["auto", "manual"] + }, + "error": { + "$ref": "#/components/schemas/Session.StructuredError" + } + }, + "required": ["type", "id", "time", "status", "reason", "error"], + "additionalProperties": false + }, + "Session.Message.Compaction.Running": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["compaction"] + }, + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + }, + "status": { + "type": "string", + "enum": ["running"] + }, + "reason": { + "type": "string", + "enum": ["auto", "manual"] + }, + "summary": { + "type": "string" + }, + "recent": { + "type": "string" + } + }, + "required": ["type", "id", "time", "status", "reason", "summary", "recent"], + "additionalProperties": false + }, + "Session.Message.Info": { + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Message.AgentSelected" + }, + { + "$ref": "#/components/schemas/Session.Message.ModelSelected" + }, + { + "$ref": "#/components/schemas/Session.Message.LocationSwitched" + }, + { + "$ref": "#/components/schemas/Session.Message.User" + }, + { + "$ref": "#/components/schemas/Session.Message.Synthetic" + }, + { + "$ref": "#/components/schemas/Session.Message.System" + }, + { + "$ref": "#/components/schemas/Session.Message.Skill" + }, + { + "$ref": "#/components/schemas/Session.Message.Shell" + }, + { + "$ref": "#/components/schemas/Session.Message.Assistant" + }, + { + "$ref": "#/components/schemas/Session.Message.Compaction" + } + ] + }, + "Session.Message.LocationSwitched": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + }, + "type": { + "type": "string", + "enum": ["location-switched"] + }, + "location": { + "$ref": "#/components/schemas/Location.Ref" + }, + "projectID": { + "type": "string" + }, + "subpath": { + "type": "string" + }, + "previous": { + "type": "object", + "properties": { + "location": { + "$ref": "#/components/schemas/Location.Ref" + }, + "projectID": { + "type": "string" + }, + "subpath": { + "type": "string" + } + }, + "required": ["location"], + "additionalProperties": false + } + }, + "required": ["id", "time", "type", "location"], + "additionalProperties": false + }, + "Session.Message.ModelSelected": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + }, + "type": { + "type": "string", + "enum": ["model-switched"] + }, + "model": { + "$ref": "#/components/schemas/Model.Ref" + }, + "previous": { + "$ref": "#/components/schemas/Model.Ref" + } + }, + "required": ["id", "time", "type", "model"], + "additionalProperties": false + }, + "Session.Message.ProviderState": { + "type": "object" + }, + "Session.Message.ProviderState_1": { + "type": "object" + }, + "Session.Message.ProviderState_2": { + "type": "object" + }, + "Session.Message.ProviderState_3": { + "type": "object" + }, + "Session.Message.ProviderState_4": { + "type": "object" + }, + "Session.Message.Shell": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "type": "object", + "properties": { + "created": { + "type": "number" + }, + "completed": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": ["shell"] + }, + "shellID": { + "type": "string", + "allOf": [ + { + "pattern": "^sh_" + } + ] + }, + "command": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/Union_b6d68a8b3572" + }, + "exit": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/components/schemas/Union_97d8d2942510" + } + ] + }, + "output": { + "$ref": "#/components/schemas/Objects_9d53a00b1efb" + } + }, + "required": ["id", "time", "type", "shellID", "command", "status"], + "additionalProperties": false + }, + "Session.Message.Skill": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + }, + "type": { + "type": "string", + "enum": ["skill"] + }, + "skill": { + "type": "string" + }, + "name": { + "type": "string" + }, + "text": { + "type": "string" + } + }, + "required": ["id", "time", "type", "skill", "name", "text"], + "additionalProperties": false + }, + "Session.Message.Synthetic": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + }, + "text": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["synthetic"] + } + }, + "required": ["id", "time", "text", "type"], + "additionalProperties": false + }, + "Session.Message.System": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + }, + "type": { + "type": "string", + "enum": ["system"] + }, + "text": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": ["id", "time", "type", "text"], + "additionalProperties": false + }, + "Session.Message.ToolState.Completed": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["completed"] + }, + "input": { + "type": "object" + }, + "content": { + "type": "array", + "prefixItems": [ + { + "$ref": "#/components/schemas/Tool.Content" + } + ], + "minItems": 1, + "items": { + "$ref": "#/components/schemas/Tool.Content" + } + }, + "metadata": { + "type": "object" + } + }, + "required": ["status", "input", "content"], + "additionalProperties": false + }, + "Session.Message.ToolState.Error": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["error"] + }, + "input": { + "type": "object" + }, + "error": { + "$ref": "#/components/schemas/Session.StructuredError" + }, + "content": { + "type": "array", + "prefixItems": [ + { + "$ref": "#/components/schemas/Tool.Content" + } + ], + "minItems": 1, + "items": { + "$ref": "#/components/schemas/Tool.Content" + } + }, + "metadata": { + "type": "object" + } + }, + "required": ["status", "input", "error"], + "additionalProperties": false + }, + "Session.Message.ToolState.Running": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["running"] + }, + "input": { + "type": "object" + }, + "metadata": { + "type": "object" + } + }, + "required": ["status", "input", "metadata"], + "additionalProperties": false + }, + "Session.Message.ToolState.Streaming": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["streaming"] + }, + "input": { + "type": "string" + } + }, + "required": ["status", "input"], + "additionalProperties": false + }, + "Session.Message.User": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/Objects_a2c799262a3c" + }, + "time": { + "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + }, + "text": { + "type": "string" + }, + "files": { + "$ref": "#/components/schemas/Arrays_042d796a7901" + }, + "agents": { + "$ref": "#/components/schemas/Arrays_e1027de4b984" + }, + "skills": { + "$ref": "#/components/schemas/Arrays_92aa8803e81f" + }, + "type": { + "type": "string", + "enum": ["user"] + } + }, + "required": ["id", "time", "text", "type"], + "additionalProperties": false + }, + "Session.Revert": { + "type": "object", + "properties": { + "messageID": { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + "partID": { + "type": "string" + }, + "snapshot": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FileDiff.Info" + } + } + }, + "required": ["messageID"], + "additionalProperties": false + }, + "Session.StructuredError": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer", + "allOf": [ + { + "minimum": 100, + "maximum": 599 + } + ] + } + }, + "required": ["type", "message"], + "additionalProperties": false + }, + "SessionActive": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["running"] + } + }, + "required": ["type"], + "additionalProperties": false + }, + "SessionBusyErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["SessionBusyError"] + }, + "sessionID": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "sessionID", "message"], + "additionalProperties": false + }, + "SessionGenerateResponse": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "text": { + "type": "string" + } + }, + "required": ["text"], + "additionalProperties": false + } + }, + "required": ["data"], + "additionalProperties": false + }, + "SessionLogItemEncoded": { + "type": "string", + "contentMediaType": "application/json" + }, + "SessionMessagesResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Session.Message.Info" + } + }, + "cursor": { + "type": "object", + "properties": { + "previous": { + "$ref": "#/components/schemas/Union_f090cb615c84" + }, + "next": { + "$ref": "#/components/schemas/Union_f090cb615c84" + } + }, + "additionalProperties": false + } + }, + "required": ["data", "cursor"], + "additionalProperties": false + }, + "SessionNotFoundErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["SessionNotFoundError"] + }, + "sessionID": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "sessionID", "message"], + "additionalProperties": false + }, + "SessionTransfer.Data": { + "type": "object", + "properties": { + "info": { + "$ref": "#/components/schemas/Session.Info" + }, + "messages": { + "$ref": "#/components/schemas/Arrays_fa246a9267ec" + } + }, + "required": ["info", "messages"], + "additionalProperties": false + }, + "SessionsResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Session.Info" + } + }, + "cursor": { + "type": "object", + "properties": { + "previous": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "next": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + }, + "required": ["data", "cursor"], + "additionalProperties": false + }, + "Shell.Info": { + "type": "object", + "properties": { + "id": { + "type": "string", + "allOf": [ + { + "pattern": "^sh_" + } + ] + }, + "status": { + "$ref": "#/components/schemas/Union_b6d68a8b3572" + }, + "command": { + "type": "string" + }, + "cwd": { + "type": "string" + }, + "shell": { + "type": "string" + }, + "file": { + "type": "string" + }, + "pid": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "exit": { + "type": "number" + }, + "metadata": { + "type": "object" + }, + "time": { + "type": "object", + "properties": { + "started": { + "type": "number" + }, + "completed": { + "type": "number" + } + }, + "required": ["started"], + "additionalProperties": false + } + }, + "required": ["id", "status", "command", "cwd", "shell", "file", "metadata", "time"], + "additionalProperties": false + }, + "ShellNotFoundErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["ShellNotFoundError"] + }, + "id": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "id", "message"], + "additionalProperties": false + }, + "Skill.Info": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "slash": { + "type": "boolean" + }, + "autoinvoke": { + "type": "boolean" + }, + "location": { + "type": "string" + }, + "content": { + "type": "string" + } + }, + "required": ["id", "name", "location", "content"], + "additionalProperties": false + }, + "SkillNotFoundErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["SkillNotFoundError"] + }, + "skill": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "skill", "message"], + "additionalProperties": false + }, + "TokenUsage.Info": { + "type": "object", + "properties": { + "input": { + "type": "number" + }, + "output": { + "type": "number" + }, + "reasoning": { + "type": "number" + }, + "cache": { + "type": "object", + "properties": { + "read": { + "type": "number" + }, + "write": { + "type": "number" + } + }, + "required": ["read", "write"], + "additionalProperties": false + } + }, + "required": ["input", "output", "reasoning", "cache"], + "additionalProperties": false + }, + "Tool.Content": { + "anyOf": [ + { + "$ref": "#/components/schemas/Tool.TextContent" + }, + { + "$ref": "#/components/schemas/Tool.FileContent" + } + ] + }, + "Tool.FileContent": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["file"] + }, + "uri": { + "type": "string" + }, + "mime": { + "type": "string" + }, + "name": { + "$ref": "#/components/schemas/Union_f090cb615c84" + } + }, + "required": ["type", "uri", "mime"], + "additionalProperties": false + }, + "Tool.TextContent": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["text"] + }, + "text": { + "type": "string" + } + }, + "required": ["type", "text"], + "additionalProperties": false + }, + "UnauthorizedErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["UnauthorizedError"] + }, + "message": { + "type": "string" + } + }, + "required": ["_tag", "message"], + "additionalProperties": false + }, + "Union_00be4ed53f19": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/components/schemas/Union_97d8d2942510" + } + ] + }, + "Union_1f50b1b03235": { + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Inbox.Delivery" + }, + { + "type": "null" + } + ] + }, + "Union_5ee94d3ca88d": { + "anyOf": [ + { + "$ref": "#/components/schemas/Location.Ref" + }, + { + "type": "null" + } + ] + }, + "Union_636af7bc29f5": { + "anyOf": [ + { + "$ref": "#/components/schemas/Form.Answer" + }, + { + "type": "null" + } + ] + }, + "Union_6a162d0a021d": { + "anyOf": [ + { + "$ref": "#/components/schemas/Model.Ref" + }, + { + "type": "null" + } + ] + }, + "Union_6a1762611a44": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] + }, + "Union_85ca62cf1a33": { + "anyOf": [ + { + "type": "string", + "allOf": [ + { + "pattern": "^[^/#]+\\/[^#]+(?:#[^#]+)?$" + } + ] + }, + { + "type": "object", + "properties": { + "providerID": { + "type": "string", + "allOf": [ + { + "pattern": "^[^/#]+$" + } + ] + }, + "model": { + "type": "string", + "allOf": [ + { + "pattern": "^[^#]+$" + } + ] + }, + "variant": { + "type": "string", + "allOf": [ + { + "pattern": "^[^#]+$" + } + ] + } + }, + "required": ["providerID", "model"], + "additionalProperties": false + } + ] + }, + "Union_97d8d2942510": { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + }, + "Union_b6d68a8b3572": { + "type": "string", + "enum": ["running", "exited", "timeout", "killed"] + }, + "Union_e13209ef6bf4": { + "anyOf": [ + { + "type": "string", + "enum": ["true", "false"] + }, + { + "type": "null" + } + ] + }, + "Union_f090cb615c84": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "Union_f8b4c9e24aa0": { + "anyOf": [ + { + "type": "string", + "allOf": [ + { + "pattern": "^msg_" + } + ] + }, + { + "type": "null" + } + ] + }, + "Union_ffefb7e3c81d": { + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "$ref": "#/components/schemas/Union_f090cb615c84" + }, + "workspace": { + "$ref": "#/components/schemas/Union_f090cb615c84" + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] + }, + "UnknownErrorEncoded": { + "type": "object", + "properties": { + "_tag": { + "type": "string", + "enum": ["UnknownError"] + }, + "message": { + "type": "string" + }, + "ref": { + "$ref": "#/components/schemas/Union_f090cb615c84" + } + }, + "required": ["_tag", "message"], + "additionalProperties": false + }, + "V2EventEncoded": { + "type": "string", + "contentMediaType": "application/json" + }, + "Vcs.Branch": { + "type": "object", + "properties": { + "current": { + "type": "string" + }, + "default": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Vcs.FileStatus": { + "type": "object", + "properties": { + "file": { + "type": "string" + }, + "additions": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "deletions": { + "type": "integer", + "allOf": [ + { + "minimum": 0 + } + ] + }, + "status": { + "type": "string", + "enum": ["added", "deleted", "modified"] + } + }, + "required": ["file", "additions", "deletions", "status"], + "additionalProperties": false + }, + "Vcs.Info": { + "type": "object", + "properties": { + "branch": { + "$ref": "#/components/schemas/Vcs.Branch" + } + }, + "required": ["branch"], + "additionalProperties": false + }, + "Vcs.Mode": { + "type": "string", + "enum": ["working", "branch"] + }, + "WebSearch.Provider": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": ["id", "name"], + "additionalProperties": false + }, + "WebSearch.ResponseEncoded": { + "type": "object", + "properties": { + "providerID": { + "type": "string" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WebSearch.Result" + } + } + }, + "required": ["providerID", "results"], + "additionalProperties": false + }, + "WebSearch.Result": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "title": { + "type": "string" + }, + "content": { + "type": "string" + }, + "time": { + "type": "object", + "properties": { + "published": { + "type": "number" + } + }, + "additionalProperties": false + } + }, + "required": ["url", "time"], + "additionalProperties": false + }, + "Worktree.Directory": { + "type": "object", + "properties": { + "directory": { + "type": "string" + }, + "strategy": { + "type": "string" + } + }, + "required": ["directory"], + "additionalProperties": false + }, + "Worktree.Info": { + "type": "object", + "properties": { + "directory": { + "type": "string" + } + }, + "required": ["directory"], + "additionalProperties": false + }, + "Worktree.List": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Worktree.Directory" + } + }, + "WorktreeErrorEncoded": { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": ["WorktreeError"] + }, + "data": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "forceRequired": { + "$ref": "#/components/schemas/Union_6a1762611a44" + } + }, + "required": ["message"], + "additionalProperties": false + } + }, + "required": ["name", "data"], + "additionalProperties": false } }, "securitySchemes": {}