From 668d569da68d3601afdd7cf86f1e53db67ab2034 Mon Sep 17 00:00:00 2001 From: James Long Date: Wed, 12 Aug 2026 21:57:21 +0000 Subject: [PATCH] refactor(server): expose global worktree api --- packages/client/script/build.ts | 4 +- packages/client/src/effect/api/api.ts | 50 +- .../client/src/effect/generated/client.ts | 55 +- packages/client/src/effect/index.ts | 2 +- .../client/src/promise/generated/client.ts | 62 +- .../client/src/promise/generated/types.ts | 66 +- packages/client/test/promise.test.ts | 51 +- packages/protocol/openapi.json | 5858 +++++++++++++---- packages/protocol/src/api.ts | 6 +- packages/protocol/src/client.ts | 2 +- packages/protocol/src/groups/project-copy.ts | 56 - packages/protocol/src/groups/project.ts | 17 +- packages/protocol/src/groups/worktree.ts | 76 + packages/server/src/handlers.ts | 4 +- packages/server/src/handlers/project-copy.ts | 68 - packages/server/src/handlers/project.ts | 3 - packages/server/src/handlers/worktree.ts | 53 + packages/server/src/routes.ts | 2 + packages/server/test/worktree.test.ts | 71 + 19 files changed, 4833 insertions(+), 1673 deletions(-) delete mode 100644 packages/protocol/src/groups/project-copy.ts create mode 100644 packages/protocol/src/groups/worktree.ts delete mode 100644 packages/server/src/handlers/project-copy.ts create mode 100644 packages/server/src/handlers/worktree.ts create mode 100644 packages/server/test/worktree.test.ts diff --git a/packages/client/script/build.ts b/packages/client/script/build.ts index 005721ec47c..544d5229fa8 100644 --- a/packages/client/script/build.ts +++ b/packages/client/script/build.ts @@ -19,7 +19,7 @@ import { Permission } from "@opencode-ai/schema/permission" import { PermissionSaved } from "@opencode-ai/schema/permission-saved" import { Plugin } from "@opencode-ai/schema/plugin" import { Project } from "@opencode-ai/schema/project" -import { ProjectCopy } from "@opencode-ai/schema/project-copy" +import { Worktree } from "@opencode-ai/schema/worktree" import { AgentAttachment, FileAttachment, Prompt, PromptMention } from "@opencode-ai/schema/prompt" import { PromptInput } from "@opencode-ai/schema/prompt-input" import { Provider } from "@opencode-ai/schema/provider" @@ -60,7 +60,7 @@ const effectTypeReferences = [ ...namespaceTypes("PermissionSaved", "@opencode-ai/schema/permission-saved", PermissionSaved), ...namespaceTypes("Plugin", "@opencode-ai/schema/plugin", Plugin), ...namespaceTypes("Project", "@opencode-ai/schema/project", Project), - ...namespaceTypes("ProjectCopy", "@opencode-ai/schema/project-copy", ProjectCopy), + ...namespaceTypes("Worktree", "@opencode-ai/schema/worktree", Worktree), ...namespaceTypes("PromptInput", "@opencode-ai/schema/prompt-input", PromptInput), ...namespaceTypes("Provider", "@opencode-ai/schema/provider", Provider), ...namespaceTypes("Pty", "@opencode-ai/schema/pty", Pty), diff --git a/packages/client/src/effect/api/api.ts b/packages/client/src/effect/api/api.ts index cb116cfcaf3..b385201dbdd 100644 --- a/packages/client/src/effect/api/api.ts +++ b/packages/client/src/effect/api/api.ts @@ -34,7 +34,7 @@ import type { OpenCodeEvent } from "@opencode-ai/protocol/groups/event" import type { Pty } from "@opencode-ai/schema/pty" import type { Question } from "@opencode-ai/schema/question" import type { Reference } from "@opencode-ai/schema/reference" -import type { ProjectCopy } from "@opencode-ai/schema/project-copy" +import type { Worktree } from "@opencode-ai/schema/worktree" import type { Vcs } from "@opencode-ai/schema/vcs" import type { FileDiff } from "@opencode-ai/schema/file-diff" import type { WebSearch } from "@opencode-ai/schema/websearch" @@ -1230,17 +1230,9 @@ export type Endpoint13_1Input = { export type Endpoint13_1Output = Project.Current export type ProjectCurrentOperation = (input?: Endpoint13_1Input) => Effect.Effect -export type Endpoint13_2Input = { - readonly projectID: Project.ID - readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined -} -export type Endpoint13_2Output = Project.Directories -export type ProjectDirectoriesOperation = (input: Endpoint13_2Input) => Effect.Effect - export interface ProjectApi { readonly list: ProjectListOperation readonly current: ProjectCurrentOperation - readonly directories: ProjectDirectoriesOperation } export type Endpoint14_0Input = { @@ -1549,36 +1541,36 @@ export interface ReferenceApi { readonly list: ReferenceListOperation } -export type Endpoint24_0Input = { - readonly projectID: Project.ID - readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined - readonly strategy: ProjectCopy.StrategyID - readonly directory: AbsolutePath - readonly name?: string | undefined -} -export type Endpoint24_0Output = ProjectCopy.Copy -export type ProjectCopyCreateOperation = (input: Endpoint24_0Input) => Effect.Effect +export type Endpoint24_0Input = { readonly projectID: Project.ID } +export type Endpoint24_0Output = Worktree.List +export type WorktreeListOperation = (input: Endpoint24_0Input) => Effect.Effect export type Endpoint24_1Input = { readonly projectID: Project.ID - readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined + readonly strategy: Worktree.StrategyID readonly directory: AbsolutePath - readonly force: boolean + readonly name?: string | undefined } -export type Endpoint24_1Output = void -export type ProjectCopyRemoveOperation = (input: Endpoint24_1Input) => Effect.Effect +export type Endpoint24_1Output = Worktree.Info +export type WorktreeCreateOperation = (input: Endpoint24_1Input) => Effect.Effect export type Endpoint24_2Input = { readonly projectID: Project.ID - readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined + readonly directory: AbsolutePath + readonly force: boolean } export type Endpoint24_2Output = void -export type ProjectCopyRefreshOperation = (input: Endpoint24_2Input) => Effect.Effect +export type WorktreeRemoveOperation = (input: Endpoint24_2Input) => Effect.Effect -export interface ProjectCopyApi { - readonly create: ProjectCopyCreateOperation - readonly remove: ProjectCopyRemoveOperation - readonly refresh: ProjectCopyRefreshOperation +export type Endpoint24_3Input = { readonly projectID: Project.ID } +export type Endpoint24_3Output = void +export type WorktreeRefreshOperation = (input: Endpoint24_3Input) => Effect.Effect + +export interface WorktreeApi { + readonly list: WorktreeListOperation + readonly create: WorktreeCreateOperation + readonly remove: WorktreeRemoveOperation + readonly refresh: WorktreeRefreshOperation } export type Endpoint25_0Input = { @@ -1691,7 +1683,7 @@ export interface AppApi { readonly shell: ShellApi readonly question: QuestionApi readonly reference: ReferenceApi - readonly projectCopy: ProjectCopyApi + readonly worktree: WorktreeApi readonly vcs: VcsApi readonly debug: DebugApi readonly migration: MigrationApi diff --git a/packages/client/src/effect/generated/client.ts b/packages/client/src/effect/generated/client.ts index 33df187ba1a..7ff0309b17b 100644 --- a/packages/client/src/effect/generated/client.ts +++ b/packages/client/src/effect/generated/client.ts @@ -139,8 +139,6 @@ import type { Endpoint13_0Output, Endpoint13_1Input, Endpoint13_1Output, - Endpoint13_2Input, - Endpoint13_2Output, Endpoint14_0Input, Endpoint14_0Output, Endpoint14_1Input, @@ -216,6 +214,8 @@ import type { Endpoint24_1Output, Endpoint24_2Input, Endpoint24_2Output, + Endpoint24_3Input, + Endpoint24_3Output, Endpoint25_0Input, Endpoint25_0Output, Endpoint25_1Input, @@ -876,19 +876,7 @@ const Endpoint13_1 = (raw: RawClient["server.project"]) => (input?: Endpoint13_1 raw["project.current"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint13_2 = (raw: RawClient["server.project"]) => (input: Endpoint13_2Input) => - preserveEffect()( - raw["project.directories"]({ - params: { projectID: input["projectID"] }, - query: { location: input["location"] }, - }).pipe(Effect.mapError(mapClientError)), - ) - -const adaptGroup13 = (raw: RawClient["server.project"]) => ({ - list: Endpoint13_0(raw), - current: Endpoint13_1(raw), - directories: Endpoint13_2(raw), -}) +const adaptGroup13 = (raw: RawClient["server.project"]) => ({ list: Endpoint13_0(raw), current: Endpoint13_1(raw) }) const Endpoint14_0 = (raw: RawClient["server.form"]) => (input?: Endpoint14_0Input) => preserveEffect()( @@ -1212,36 +1200,37 @@ const Endpoint23_0 = (raw: RawClient["server.reference"]) => (input?: Endpoint23 const adaptGroup23 = (raw: RawClient["server.reference"]) => ({ list: Endpoint23_0(raw) }) -const Endpoint24_0 = (raw: RawClient["server.projectCopy"]) => (input: Endpoint24_0Input) => +const Endpoint24_0 = (raw: RawClient["server.worktree"]) => (input: Endpoint24_0Input) => preserveEffect()( - raw["projectCopy.create"]({ + raw["worktree.list"]({ params: { projectID: input["projectID"] } }).pipe(Effect.mapError(mapClientError)), + ) + +const Endpoint24_1 = (raw: RawClient["server.worktree"]) => (input: Endpoint24_1Input) => + preserveEffect()( + raw["worktree.create"]({ params: { projectID: input["projectID"] }, - query: { location: input["location"] }, payload: { strategy: input["strategy"], directory: input["directory"], name: input["name"] }, }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint24_1 = (raw: RawClient["server.projectCopy"]) => (input: Endpoint24_1Input) => - preserveEffect()( - raw["projectCopy.remove"]({ +const Endpoint24_2 = (raw: RawClient["server.worktree"]) => (input: Endpoint24_2Input) => + preserveEffect()( + raw["worktree.remove"]({ params: { projectID: input["projectID"] }, - query: { location: input["location"] }, payload: { directory: input["directory"], force: input["force"] }, }).pipe(Effect.mapError(mapClientError)), ) -const Endpoint24_2 = (raw: RawClient["server.projectCopy"]) => (input: Endpoint24_2Input) => - preserveEffect()( - raw["projectCopy.refresh"]({ - params: { projectID: input["projectID"] }, - query: { location: input["location"] }, - }).pipe(Effect.mapError(mapClientError)), +const Endpoint24_3 = (raw: RawClient["server.worktree"]) => (input: Endpoint24_3Input) => + preserveEffect()( + raw["worktree.refresh"]({ params: { projectID: input["projectID"] } }).pipe(Effect.mapError(mapClientError)), ) -const adaptGroup24 = (raw: RawClient["server.projectCopy"]) => ({ - create: Endpoint24_0(raw), - remove: Endpoint24_1(raw), - refresh: Endpoint24_2(raw), +const adaptGroup24 = (raw: RawClient["server.worktree"]) => ({ + list: Endpoint24_0(raw), + create: Endpoint24_1(raw), + remove: Endpoint24_2(raw), + refresh: Endpoint24_3(raw), }) const Endpoint25_0 = (raw: RawClient["server.vcs"]) => (input?: Endpoint25_0Input) => @@ -1334,7 +1323,7 @@ const adaptClient = (raw: RawClient) => ({ shell: adaptGroup21(raw["server.shell"]), question: adaptGroup22(raw["server.question"]), reference: adaptGroup23(raw["server.reference"]), - projectCopy: adaptGroup24(raw["server.projectCopy"]), + worktree: adaptGroup24(raw["server.worktree"]), vcs: adaptGroup25(raw["server.vcs"]), debug: adaptGroup26(raw["server.debug"]), migration: adaptGroup27(raw["server.migration"]), diff --git a/packages/client/src/effect/index.ts b/packages/client/src/effect/index.ts index b632e52655e..9c53d7f2a4d 100644 --- a/packages/client/src/effect/index.ts +++ b/packages/client/src/effect/index.ts @@ -33,7 +33,7 @@ export { Model } from "@opencode-ai/schema/model" export { Permission } from "@opencode-ai/schema/permission" export { PermissionSaved } from "@opencode-ai/schema/permission-saved" export { Project } from "@opencode-ai/schema/project" -export { ProjectCopy } from "@opencode-ai/schema/project-copy" +export { Worktree } from "@opencode-ai/schema/worktree" export { Provider } from "@opencode-ai/schema/provider" export { Pty } from "@opencode-ai/schema/pty" export { Question } from "@opencode-ai/schema/question" diff --git a/packages/client/src/promise/generated/client.ts b/packages/client/src/promise/generated/client.ts index 3a15218da5d..e258dd37ea1 100644 --- a/packages/client/src/promise/generated/client.ts +++ b/packages/client/src/promise/generated/client.ts @@ -133,8 +133,6 @@ import type { ProjectListOutput, ProjectCurrentInput, ProjectCurrentOutput, - ProjectDirectoriesInput, - ProjectDirectoriesOutput, FormRequestListInput, FormRequestListOutput, FormListInput, @@ -206,12 +204,14 @@ import type { QuestionRejectOutput, ReferenceListInput, ReferenceListOutput, - ProjectCopyCreateInput, - ProjectCopyCreateOutput, - ProjectCopyRemoveInput, - ProjectCopyRemoveOutput, - ProjectCopyRefreshInput, - ProjectCopyRefreshOutput, + WorktreeListInput, + WorktreeListOutput, + WorktreeCreateInput, + WorktreeCreateOutput, + WorktreeRemoveInput, + WorktreeRemoveOutput, + WorktreeRefreshInput, + WorktreeRefreshOutput, VcsGetInput, VcsGetOutput, VcsStatusInput, @@ -1255,18 +1255,6 @@ export function make(options: ClientOptions) { }, requestOptions, ), - directories: (input: ProjectDirectoriesInput, requestOptions?: RequestOptions) => - request( - { - method: "GET", - path: `/api/project/${encodeURIComponent(input.projectID)}/directories`, - query: { location: input["location"] }, - successStatus: 200, - declaredStatuses: [401, 400], - empty: false, - }, - requestOptions, - ), }, form: { request: { @@ -1736,13 +1724,23 @@ export function make(options: ClientOptions) { requestOptions, ), }, - projectCopy: { - create: (input: ProjectCopyCreateInput, requestOptions?: RequestOptions) => - request( + worktree: { + list: (input: WorktreeListInput, requestOptions?: RequestOptions) => + request( + { + method: "GET", + path: `/api/experimental/project/${encodeURIComponent(input.projectID)}/worktree`, + successStatus: 200, + declaredStatuses: [401, 400], + empty: false, + }, + requestOptions, + ), + create: (input: WorktreeCreateInput, requestOptions?: RequestOptions) => + request( { method: "POST", - path: `/api/experimental/project/${encodeURIComponent(input.projectID)}/copy`, - query: { location: input["location"] }, + path: `/api/experimental/project/${encodeURIComponent(input.projectID)}/worktree`, body: { strategy: input["strategy"], directory: input["directory"], name: input["name"] }, successStatus: 200, declaredStatuses: [400, 401], @@ -1750,12 +1748,11 @@ export function make(options: ClientOptions) { }, requestOptions, ), - remove: (input: ProjectCopyRemoveInput, requestOptions?: RequestOptions) => - request( + remove: (input: WorktreeRemoveInput, requestOptions?: RequestOptions) => + request( { method: "DELETE", - path: `/api/experimental/project/${encodeURIComponent(input.projectID)}/copy`, - query: { location: input["location"] }, + path: `/api/experimental/project/${encodeURIComponent(input.projectID)}/worktree`, body: { directory: input["directory"], force: input["force"] }, successStatus: 204, declaredStatuses: [400, 401], @@ -1763,12 +1760,11 @@ export function make(options: ClientOptions) { }, requestOptions, ), - refresh: (input: ProjectCopyRefreshInput, requestOptions?: RequestOptions) => - request( + refresh: (input: WorktreeRefreshInput, requestOptions?: RequestOptions) => + request( { method: "POST", - path: `/api/experimental/project/${encodeURIComponent(input.projectID)}/copy/refresh`, - query: { location: input["location"] }, + path: `/api/experimental/project/${encodeURIComponent(input.projectID)}/worktree/refresh`, successStatus: 204, declaredStatuses: [400, 401], empty: true, diff --git a/packages/client/src/promise/generated/types.ts b/packages/client/src/promise/generated/types.ts index cdc40a123ca..851e3cce645 100644 --- a/packages/client/src/promise/generated/types.ts +++ b/packages/client/src/promise/generated/types.ts @@ -291,8 +291,6 @@ export type ProjectTime = { created: number; updated: number; initialized?: numb export type ProjectCurrent = { id: string; directory: string; canonical: string } -export type ProjectDirectory = { directory: string; strategy?: string } - export type FormMetadata = { [x: string]: JsonValue } export type FormValue = string | number | boolean | Array @@ -370,7 +368,9 @@ export type ReferenceGitSource = { hidden?: boolean } -export type ProjectCopyCopy = { directory: string } +export type WorktreeDirectory = { directory: string; strategy?: string } + +export type WorktreeInfo = { directory: string } export type VcsBranch = { current?: string; default?: string } @@ -828,20 +828,20 @@ export type PluginUpdated = { data: {} } -export type ProjectDirectoriesUpdated = { +export type WorktreeUpdated = { id: string created: number metadata?: { [x: string]: any } - type: "project.directories.updated" + type: "worktree.updated" location?: LocationRef data: { projectID: string } } -export type ProjectDirectoryResolved = { +export type WorktreeResolved = { id: string created: number metadata?: { [x: string]: any } - type: "project.directory.resolved" + type: "worktree.resolved" durable: { aggregateID: string; seq: number; version: 1 } location?: LocationRef data: { projectID: string; directory: string; previous: string } @@ -1369,8 +1369,6 @@ export type Project = { sandboxes: Array } -export type ProjectDirectories = Array - export type FormAnswer = { [x: string]: FormValue } export type PermissionRequest = { @@ -1520,6 +1518,8 @@ export type SessionStatus2 = { export type ReferenceSource = ReferenceLocalSource | ReferenceGitSource +export type WorktreeList = Array + export type VcsInfo = { branch: VcsBranch } export type PermissionRuleset = Array @@ -2102,8 +2102,8 @@ export type V2Event = | PermissionReplied | PluginAdded | PluginUpdated - | ProjectDirectoriesUpdated - | ProjectDirectoryResolved + | WorktreeUpdated + | WorktreeResolved | CommandUpdated | ConfigUpdated | SkillUpdated @@ -2304,12 +2304,12 @@ export type QuestionNotFoundError = { export const isQuestionNotFoundError = (value: unknown): value is QuestionNotFoundError => typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "QuestionNotFoundError" -export type ProjectCopyError = { - readonly name: "ProjectCopyError" +export type WorktreeError = { + readonly name: "WorktreeError" readonly data: { readonly message: string; readonly forceRequired?: boolean | undefined } } -export const isProjectCopyError = (value: unknown): value is ProjectCopyError => - typeof value === "object" && value !== null && "name" in value && value["name"] === "ProjectCopyError" +export const isWorktreeError = (value: unknown): value is WorktreeError => + typeof value === "object" && value !== null && "name" in value && value["name"] === "WorktreeError" export type HealthGetOutput = ServiceHealth @@ -4348,15 +4348,6 @@ export type ProjectCurrentInput = { export type ProjectCurrentOutput = ProjectCurrent -export type ProjectDirectoriesInput = { - readonly projectID: { readonly projectID: string }["projectID"] - readonly location?: { - readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined - }["location"] -} - -export type ProjectDirectoriesOutput = ProjectDirectories - export type FormRequestListInput = { readonly location?: { readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined @@ -5642,37 +5633,30 @@ export type ReferenceListOutput = { data: Array } -export type ProjectCopyCreateInput = { +export type WorktreeListInput = { readonly projectID: { readonly projectID: string }["projectID"] } + +export type WorktreeListOutput = WorktreeList + +export type WorktreeCreateInput = { readonly projectID: { readonly projectID: string }["projectID"] - readonly location?: { - readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined - }["location"] readonly strategy: { readonly strategy: string; readonly directory: string; readonly name?: string }["strategy"] readonly directory: { readonly strategy: string; readonly directory: string; readonly name?: string }["directory"] readonly name?: { readonly strategy: string; readonly directory: string; readonly name?: string }["name"] } -export type ProjectCopyCreateOutput = ProjectCopyCopy +export type WorktreeCreateOutput = WorktreeInfo -export type ProjectCopyRemoveInput = { +export type WorktreeRemoveInput = { readonly projectID: { readonly projectID: string }["projectID"] - readonly location?: { - readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined - }["location"] readonly directory: { readonly directory: string; readonly force: boolean }["directory"] readonly force: { readonly directory: string; readonly force: boolean }["force"] } -export type ProjectCopyRemoveOutput = void +export type WorktreeRemoveOutput = void -export type ProjectCopyRefreshInput = { - readonly projectID: { readonly projectID: string }["projectID"] - readonly location?: { - readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined - }["location"] -} +export type WorktreeRefreshInput = { readonly projectID: { readonly projectID: string }["projectID"] } -export type ProjectCopyRefreshOutput = void +export type WorktreeRefreshOutput = void export type VcsGetInput = { readonly location?: { diff --git a/packages/client/test/promise.test.ts b/packages/client/test/promise.test.ts index ead7778e5d3..16cff94c4af 100644 --- a/packages/client/test/promise.test.ts +++ b/packages/client/test/promise.test.ts @@ -29,7 +29,7 @@ test("exposes every standard HTTP API group", () => { "shell", "question", "reference", - "projectCopy", + "worktree", "vcs", "debug", "migration", @@ -49,7 +49,8 @@ test("exposes every standard HTTP API group", () => { expect(Object.keys(client.vcs)).toEqual(["get", "status", "diff"]) expect(Object.keys(client.pty)).toEqual(["list", "create", "get", "update", "remove"]) expect(Object.keys(client.shell)).toEqual(["list", "create", "get", "timeout", "output", "remove"]) - expect(Object.keys(client.project)).toEqual(["list", "current", "directories"]) + expect(Object.keys(client.project)).toEqual(["list", "current"]) + expect(Object.keys(client.worktree)).toEqual(["list", "create", "remove", "refresh"]) }) test("config.get returns ordered config entries for a location", async () => { @@ -251,30 +252,44 @@ test("file.read returns binary content from the public HTTP contract", async () ) }) -test("project methods use the public HTTP contract", async () => { - const requests: string[] = [] +test("worktree methods use the global project contract", async () => { + const requests: Request[] = [] const client = OpenCode.make({ baseUrl: "http://localhost:3000", - fetch: async (input) => { - const url = typeof input === "string" ? input : input instanceof URL ? input.href : input.url - requests.push(url) - if (url.includes("/directories")) return Response.json([]) - return Response.json({ id: "proj_test", directory: "/tmp/project" }) + fetch: async (input, init) => { + const request = input instanceof Request ? input : new Request(input, init) + requests.push(request) + if (request.method === "GET") return Response.json([{ directory: "/tmp/project" }]) + if (request.method === "POST" && !request.url.endsWith("/refresh")) + return Response.json({ directory: "/tmp/worktrees/api" }) + return new Response(null, { status: 204 }) }, }) - const current = await client.project.current({ location: { workspace: "wrk_test" } }) - const directories = await client.project.directories({ - projectID: current.id, - location: { directory: current.directory }, + expect(await client.worktree.list({ projectID: "proj_test" })).toEqual([{ directory: "/tmp/project" }]) + expect( + await client.worktree.create({ + projectID: "proj_test", + strategy: "git", + directory: "/tmp/worktrees", + name: "api", + }), + ).toEqual({ directory: "/tmp/worktrees/api" }) + await client.worktree.remove({ + projectID: "proj_test", + directory: "/tmp/worktrees/api", + force: false, }) + await client.worktree.refresh({ projectID: "proj_test" }) - expect(current).toEqual({ id: "proj_test", directory: "/tmp/project" }) - expect(directories).toEqual([]) - expect(requests).toEqual([ - "http://localhost:3000/api/project/current?location%5Bworkspace%5D=wrk_test", - "http://localhost:3000/api/project/proj_test/directories?location%5Bdirectory%5D=%2Ftmp%2Fproject", + expect(requests.map((request) => [request.method, request.url])).toEqual([ + ["GET", "http://localhost:3000/api/experimental/project/proj_test/worktree"], + ["POST", "http://localhost:3000/api/experimental/project/proj_test/worktree"], + ["DELETE", "http://localhost:3000/api/experimental/project/proj_test/worktree"], + ["POST", "http://localhost:3000/api/experimental/project/proj_test/worktree/refresh"], ]) + expect(await requests[1]?.json()).toEqual({ strategy: "git", directory: "/tmp/worktrees", name: "api" }) + expect(await requests[2]?.json()).toEqual({ directory: "/tmp/worktrees/api", force: false }) }) test("shell list and remove use the public HTTP contract", async () => { diff --git a/packages/protocol/openapi.json b/packages/protocol/openapi.json index 4d175c8a6da..088f846db6c 100644 --- a/packages/protocol/openapi.json +++ b/packages/protocol/openapi.json @@ -8,7 +8,9 @@ "paths": { "/api/health": { "get": { - "tags": ["health"], + "tags": [ + "health" + ], "operationId": "v2.health.get", "parameters": [], "security": [], @@ -50,7 +52,9 @@ }, "/api/service/stop": { "post": { - "tags": ["health"], + "tags": [ + "health" + ], "operationId": "v2.health.stop", "parameters": [], "security": [], @@ -102,7 +106,9 @@ }, "/api/server": { "get": { - "tags": ["server"], + "tags": [ + "server" + ], "operationId": "v2.server.get", "parameters": [], "security": [], @@ -121,7 +127,9 @@ } } }, - "required": ["urls"], + "required": [ + "urls" + ], "additionalProperties": false } } @@ -154,7 +162,9 @@ }, "/api/location": { "get": { - "tags": ["location"], + "tags": [ + "location" + ], "operationId": "v2.location.get", "parameters": [ { @@ -237,7 +247,9 @@ }, "/api/agent": { "get": { - "tags": ["agent"], + "tags": [ + "agent" + ], "operationId": "v2.agent.list", "parameters": [ { @@ -300,7 +312,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -333,7 +348,9 @@ }, "/api/agent/{agentID}": { "get": { - "tags": ["agent"], + "tags": [ + "agent" + ], "operationId": "v2.agent.get", "parameters": [ { @@ -401,7 +418,10 @@ "$ref": "#/components/schemas/Agent.Info" } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -444,7 +464,9 @@ }, "/api/plugin": { "get": { - "tags": ["plugin"], + "tags": [ + "plugin" + ], "operationId": "v2.plugin.list", "parameters": [ { @@ -507,7 +529,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -540,7 +565,9 @@ }, "/api/session": { "get": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.list", "parameters": [ { @@ -586,7 +613,10 @@ "anyOf": [ { "type": "string", - "enum": ["asc", "desc"] + "enum": [ + "asc", + "desc" + ] }, { "type": "null" @@ -628,7 +658,9 @@ }, { "type": "string", - "enum": ["null"] + "enum": [ + "null" + ] } ], "description": "Filter by parent session. Use null to return only root sessions." @@ -749,7 +781,9 @@ "summary": "List sessions" }, "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.create", "parameters": [], "security": [], @@ -765,7 +799,9 @@ "$ref": "#/components/schemas/Session.Info" } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -866,7 +902,9 @@ }, "/api/session/import": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.import", "parameters": [], "security": [], @@ -882,7 +920,9 @@ "$ref": "#/components/schemas/Session.Info" } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -947,7 +987,10 @@ ] } }, - "required": ["info", "messages"], + "required": [ + "info", + "messages" + ], "additionalProperties": false } } @@ -958,7 +1001,9 @@ }, "/api/session/{sessionID}/export": { "get": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.export", "parameters": [ { @@ -981,7 +1026,10 @@ "anyOf": [ { "type": "string", - "enum": ["true", "false"] + "enum": [ + "true", + "false" + ] }, { "type": "null" @@ -1004,7 +1052,9 @@ "$ref": "#/components/schemas/SessionTransfer.Data" } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -1057,7 +1107,9 @@ }, "/api/session/active": { "get": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.active", "parameters": [], "security": [], @@ -1078,7 +1130,9 @@ } } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -1111,7 +1165,9 @@ }, "/api/session/{sessionID}": { "get": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.get", "parameters": [ { @@ -1141,7 +1197,9 @@ "$ref": "#/components/schemas/Session.Info" } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -1182,7 +1240,9 @@ "summary": "Get session" }, "delete": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.remove", "parameters": [ { @@ -1248,7 +1308,9 @@ }, "/api/session/{sessionID}/fork": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.fork", "parameters": [ { @@ -1278,7 +1340,9 @@ "$ref": "#/components/schemas/Session.Info" } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -1344,7 +1408,9 @@ "$ref": "#/components/schemas/Session.ForkRequestBoundary" } }, - "required": ["boundary"], + "required": [ + "boundary" + ], "additionalProperties": false } } @@ -1355,7 +1421,9 @@ }, "/api/session/{sessionID}/agent": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.switchAgent", "parameters": [ { @@ -1427,7 +1495,9 @@ "type": "string" } }, - "required": ["agent"], + "required": [ + "agent" + ], "additionalProperties": false } } @@ -1438,7 +1508,9 @@ }, "/api/session/{sessionID}/model": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.switchModel", "parameters": [ { @@ -1510,7 +1582,9 @@ "$ref": "#/components/schemas/Model.Ref" } }, - "required": ["model"], + "required": [ + "model" + ], "additionalProperties": false } } @@ -1521,7 +1595,9 @@ }, "/api/session/{sessionID}/rename": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.rename", "parameters": [ { @@ -1593,7 +1669,9 @@ "type": "string" } }, - "required": ["title"], + "required": [ + "title" + ], "additionalProperties": false } } @@ -1604,7 +1682,9 @@ }, "/api/session/{sessionID}/move": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.move", "parameters": [ { @@ -1694,7 +1774,9 @@ ] } }, - "required": ["directory"], + "required": [ + "directory" + ], "additionalProperties": false } } @@ -1705,7 +1787,9 @@ }, "/api/session/{sessionID}/prompt": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.prompt", "parameters": [ { @@ -1735,7 +1819,9 @@ "$ref": "#/components/schemas/Session.Inbox.User" } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -1864,7 +1950,9 @@ ] } }, - "required": ["text"], + "required": [ + "text" + ], "additionalProperties": false } } @@ -1875,7 +1963,9 @@ }, "/api/session/{sessionID}/command": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.command", "parameters": [ { @@ -1905,7 +1995,9 @@ "$ref": "#/components/schemas/Session.Inbox.User" } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -2074,7 +2166,9 @@ ] } }, - "required": ["command"], + "required": [ + "command" + ], "additionalProperties": false } } @@ -2085,7 +2179,9 @@ }, "/api/session/{sessionID}/skill": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.skill", "parameters": [ { @@ -2185,7 +2281,9 @@ ] } }, - "required": ["skill"], + "required": [ + "skill" + ], "additionalProperties": false } } @@ -2196,7 +2294,9 @@ }, "/api/session/{sessionID}/synthetic": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.synthetic", "parameters": [ { @@ -2226,7 +2326,9 @@ "$ref": "#/components/schemas/Session.Inbox.Synthetic" } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -2340,7 +2442,9 @@ ] } }, - "required": ["text"], + "required": [ + "text" + ], "additionalProperties": false } } @@ -2351,7 +2455,9 @@ }, "/api/session/{sessionID}/shell": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.shell", "parameters": [ { @@ -2438,7 +2544,9 @@ "type": "string" } }, - "required": ["command"], + "required": [ + "command" + ], "additionalProperties": false } } @@ -2449,7 +2557,9 @@ }, "/api/session/{sessionID}/compact": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.compact", "parameters": [ { @@ -2479,7 +2589,9 @@ "$ref": "#/components/schemas/Session.Inbox.Compaction" } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -2577,7 +2689,9 @@ }, "/api/session/{sessionID}/wait": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.wait", "parameters": [ { @@ -2653,7 +2767,9 @@ }, "/api/session/{sessionID}/revert/stage": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.revert.stage", "parameters": [ { @@ -2683,7 +2799,9 @@ "$ref": "#/components/schemas/Session.Revert" } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -2777,7 +2895,9 @@ ] } }, - "required": ["messageID"], + "required": [ + "messageID" + ], "additionalProperties": false } } @@ -2788,7 +2908,9 @@ }, "/api/session/{sessionID}/revert/clear": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.revert.clear", "parameters": [ { @@ -2873,7 +2995,9 @@ }, "/api/session/{sessionID}/revert/commit": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.revert.commit", "parameters": [ { @@ -2948,7 +3072,9 @@ }, "/api/session/{sessionID}/context": { "get": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.context", "parameters": [ { @@ -2981,7 +3107,9 @@ } } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -3034,7 +3162,9 @@ }, "/api/session/{sessionID}/inbox": { "get": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.inbox.list", "parameters": [ { @@ -3067,7 +3197,9 @@ } } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -3110,7 +3242,9 @@ }, "/api/session/{sessionID}/inbox/{inboxID}": { "delete": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.inbox.cancel", "parameters": [ { @@ -3192,7 +3326,9 @@ }, "/api/session/{sessionID}/inbox/{inboxID}/steer": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.inbox.steer", "parameters": [ { @@ -3274,7 +3410,9 @@ }, "/api/session/{sessionID}/inbox/{inboxID}/queue": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.inbox.queue", "parameters": [ { @@ -3356,7 +3494,9 @@ }, "/api/session/{sessionID}/instructions/entries": { "get": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.instructions.entry.list", "parameters": [ { @@ -3389,7 +3529,9 @@ } } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -3439,7 +3581,9 @@ }, "/api/session/{sessionID}/instructions/entries/{key}": { "put": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.instructions.entry.put", "parameters": [ { @@ -3527,7 +3671,9 @@ "properties": { "value": {} }, - "required": ["value"], + "required": [ + "value" + ], "additionalProperties": false } } @@ -3536,7 +3682,9 @@ } }, "delete": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.instructions.entry.remove", "parameters": [ { @@ -3610,7 +3758,9 @@ }, "/api/session/{sessionID}/generate": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.generate", "parameters": [ { @@ -3699,7 +3849,9 @@ "type": "string" } }, - "required": ["prompt"], + "required": [ + "prompt" + ], "additionalProperties": false } } @@ -3710,7 +3862,9 @@ }, "/api/experimental/session/{sessionID}/log": { "get": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.log", "parameters": [ { @@ -3748,7 +3902,10 @@ "anyOf": [ { "type": "string", - "enum": ["true", "false"] + "enum": [ + "true", + "false" + ] }, { "type": "null" @@ -3784,7 +3941,11 @@ "$ref": "#/components/schemas/SessionLogItemJsonString" } }, - "required": ["id", "event", "data"], + "required": [ + "id", + "event", + "data" + ], "additionalProperties": false }, "x-effect-stream": { @@ -3798,13 +3959,18 @@ "properties": { "_tag": { "type": "string", - "enum": ["Fail"] + "enum": [ + "Fail" + ] }, "error": { "not": {} } }, - "required": ["_tag", "error"], + "required": [ + "_tag", + "error" + ], "additionalProperties": false }, { @@ -3812,11 +3978,16 @@ "properties": { "_tag": { "type": "string", - "enum": ["Die"] + "enum": [ + "Die" + ] }, "defect": {} }, - "required": ["_tag", "defect"], + "required": [ + "_tag", + "defect" + ], "additionalProperties": false }, { @@ -3824,7 +3995,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["Interrupt"] + "enum": [ + "Interrupt" + ] }, "fiberId": { "anyOf": [ @@ -3837,7 +4010,10 @@ ] } }, - "required": ["_tag", "fiberId"], + "required": [ + "_tag", + "fiberId" + ], "additionalProperties": false } ] @@ -3888,7 +4064,9 @@ }, "/api/session/{sessionID}/interrupt": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.interrupt", "parameters": [ { @@ -3911,7 +4089,10 @@ "anyOf": [ { "type": "string", - "enum": ["true", "false"] + "enum": [ + "true", + "false" + ] }, { "type": "null" @@ -3970,7 +4151,9 @@ }, "/api/session/{sessionID}/background": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.background", "parameters": [ { @@ -4036,7 +4219,9 @@ }, "/api/session/{sessionID}/message/{messageID}": { "get": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.message", "parameters": [ { @@ -4079,7 +4264,9 @@ "$ref": "#/components/schemas/Session.Message.Info" } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -4129,7 +4316,9 @@ }, "/api/session/{sessionID}/message": { "get": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.message.list", "parameters": [ { @@ -4168,7 +4357,10 @@ "anyOf": [ { "type": "string", - "enum": ["asc", "desc"] + "enum": [ + "asc", + "desc" + ] }, { "type": "null" @@ -4261,7 +4453,9 @@ }, "/api/model": { "get": { - "tags": ["model"], + "tags": [ + "model" + ], "operationId": "v2.model.list", "parameters": [ { @@ -4324,7 +4518,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -4367,7 +4564,9 @@ }, "/api/model/default": { "get": { - "tags": ["model"], + "tags": [ + "model" + ], "operationId": "v2.model.default", "parameters": [ { @@ -4434,7 +4633,10 @@ ] } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -4477,7 +4679,9 @@ }, "/api/generate": { "post": { - "tags": ["generate"], + "tags": [ + "generate" + ], "operationId": "v2.generate.text", "parameters": [ { @@ -4593,7 +4797,9 @@ ] } }, - "required": ["prompt"], + "required": [ + "prompt" + ], "additionalProperties": false } } @@ -4604,7 +4810,9 @@ }, "/api/provider": { "get": { - "tags": ["provider"], + "tags": [ + "provider" + ], "operationId": "v2.provider.list", "parameters": [ { @@ -4667,7 +4875,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -4710,7 +4921,9 @@ }, "/api/provider/{providerID}": { "get": { - "tags": ["provider"], + "tags": [ + "provider" + ], "operationId": "v2.provider.get", "parameters": [ { @@ -4778,7 +4991,10 @@ "$ref": "#/components/schemas/Provider.Info" } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -4831,7 +5047,9 @@ }, "/api/integration": { "get": { - "tags": ["integration"], + "tags": [ + "integration" + ], "operationId": "v2.integration.list", "parameters": [ { @@ -4894,7 +5112,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -4927,7 +5148,9 @@ }, "/api/integration/{integrationID}": { "get": { - "tags": ["integration"], + "tags": [ + "integration" + ], "operationId": "v2.integration.get", "parameters": [ { @@ -5002,7 +5225,10 @@ ] } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -5035,7 +5261,9 @@ }, "/api/experimental/integration/wellknown": { "post": { - "tags": ["integration"], + "tags": [ + "integration" + ], "operationId": "v2.experimental.integration.wellknown.add", "parameters": [ { @@ -5124,7 +5352,9 @@ "type": "string" } }, - "required": ["url"], + "required": [ + "url" + ], "additionalProperties": false } } @@ -5135,7 +5365,9 @@ }, "/api/integration/{integrationID}/connect/key": { "post": { - "tags": ["integration"], + "tags": [ + "integration" + ], "operationId": "v2.integration.connect.key", "parameters": [ { @@ -5252,7 +5484,9 @@ ] } }, - "required": ["key"], + "required": [ + "key" + ], "additionalProperties": false } } @@ -5263,7 +5497,9 @@ }, "/api/integration/{integrationID}/connect/oauth": { "post": { - "tags": ["integration"], + "tags": [ + "integration" + ], "operationId": "v2.integration.oauth.connect", "parameters": [ { @@ -5331,7 +5567,10 @@ "$ref": "#/components/schemas/Integration.Attempt" } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -5397,7 +5636,9 @@ ] } }, - "required": ["methodID"], + "required": [ + "methodID" + ], "additionalProperties": false } } @@ -5408,7 +5649,9 @@ }, "/api/integration/{integrationID}/connect/oauth/{attemptID}": { "get": { - "tags": ["integration"], + "tags": [ + "integration" + ], "operationId": "v2.integration.oauth.status", "parameters": [ { @@ -5484,7 +5727,10 @@ "$ref": "#/components/schemas/Integration.AttemptStatus" } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -5515,7 +5761,9 @@ "summary": "Get OAuth attempt status" }, "delete": { - "tags": ["integration"], + "tags": [ + "integration" + ], "operationId": "v2.integration.oauth.cancel", "parameters": [ { @@ -5607,7 +5855,9 @@ }, "/api/integration/{integrationID}/connect/oauth/{attemptID}/complete": { "post": { - "tags": ["integration"], + "tags": [ + "integration" + ], "operationId": "v2.integration.oauth.complete", "parameters": [ { @@ -5729,7 +5979,9 @@ }, "/api/integration/{integrationID}/connect/command": { "post": { - "tags": ["integration"], + "tags": [ + "integration" + ], "operationId": "v2.integration.command.connect", "parameters": [ { @@ -5797,7 +6049,10 @@ "$ref": "#/components/schemas/Integration.CommandAttempt" } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -5853,7 +6108,9 @@ ] } }, - "required": ["methodID"], + "required": [ + "methodID" + ], "additionalProperties": false } } @@ -5864,7 +6121,9 @@ }, "/api/integration/{integrationID}/connect/command/{attemptID}": { "get": { - "tags": ["integration"], + "tags": [ + "integration" + ], "operationId": "v2.integration.command.status", "parameters": [ { @@ -5940,7 +6199,10 @@ "$ref": "#/components/schemas/Integration.CommandAttemptStatus" } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -5971,7 +6233,9 @@ "summary": "Get command attempt status" }, "delete": { - "tags": ["integration"], + "tags": [ + "integration" + ], "operationId": "v2.integration.command.cancel", "parameters": [ { @@ -6063,7 +6327,9 @@ }, "/api/mcp": { "get": { - "tags": ["mcp"], + "tags": [ + "mcp" + ], "operationId": "v2.mcp.list", "parameters": [ { @@ -6126,7 +6392,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -6159,7 +6428,9 @@ }, "/api/mcp/{server}": { "put": { - "tags": ["mcp"], + "tags": [ + "mcp" + ], "operationId": "v2.mcp.add", "parameters": [ { @@ -6256,7 +6527,9 @@ ] } }, - "required": ["config"], + "required": [ + "config" + ], "additionalProperties": false } } @@ -6265,7 +6538,9 @@ } }, "delete": { - "tags": ["mcp"], + "tags": [ + "mcp" + ], "operationId": "v2.mcp.remove", "parameters": [ { @@ -6359,7 +6634,9 @@ }, "/api/mcp/{server}/connect": { "post": { - "tags": ["mcp"], + "tags": [ + "mcp" + ], "operationId": "v2.mcp.connect", "parameters": [ { @@ -6453,7 +6730,9 @@ }, "/api/mcp/{server}/disconnect": { "post": { - "tags": ["mcp"], + "tags": [ + "mcp" + ], "operationId": "v2.mcp.disconnect", "parameters": [ { @@ -6547,7 +6826,9 @@ }, "/api/mcp/resource": { "get": { - "tags": ["mcp"], + "tags": [ + "mcp" + ], "operationId": "v2.mcp.resource.catalog", "parameters": [ { @@ -6607,7 +6888,10 @@ "$ref": "#/components/schemas/Mcp.ResourceCatalog" } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -6640,7 +6924,9 @@ }, "/api/credential/{credentialID}": { "patch": { - "tags": ["credential"], + "tags": [ + "credential" + ], "operationId": "v2.credential.update", "parameters": [ { @@ -6730,7 +7016,9 @@ "type": "string" } }, - "required": ["label"], + "required": [ + "label" + ], "additionalProperties": false } } @@ -6739,7 +7027,9 @@ } }, "delete": { - "tags": ["credential"], + "tags": [ + "credential" + ], "operationId": "v2.credential.remove", "parameters": [ { @@ -6823,7 +7113,9 @@ }, "/api/project": { "get": { - "tags": ["project"], + "tags": [ + "project" + ], "operationId": "v2.project.list", "parameters": [], "security": [], @@ -6868,7 +7160,9 @@ }, "/api/project/current": { "get": { - "tags": ["project"], + "tags": [ + "project" + ], "operationId": "v2.project.current", "parameters": [ { @@ -6949,100 +7243,11 @@ "summary": "Get current project" } }, - "/api/project/{projectID}/directories": { - "get": { - "tags": ["project"], - "operationId": "v2.project.directories", - "parameters": [ - { - "name": "projectID", - "in": "path", - "schema": { - "type": "string" - }, - "required": true - }, - { - "name": "location", - "in": "query", - "schema": { - "anyOf": [ - { - "type": "object", - "properties": { - "directory": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "workspace": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "additionalProperties": false - }, - { - "type": "null" - } - ] - }, - "required": false, - "style": "deepObject", - "explode": true - } - ], - "security": [], - "responses": { - "200": { - "description": "Project.Directories", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Project.Directories" - } - } - } - }, - "400": { - "description": "InvalidRequestError", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidRequestError" - } - } - } - }, - "401": { - "description": "UnauthorizedError", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnauthorizedError" - } - } - } - } - }, - "description": "List known local absolute directories for a project.", - "summary": "List project directories" - } - }, "/api/form/request": { "get": { - "tags": ["form"], + "tags": [ + "form" + ], "operationId": "v2.form.request.list", "parameters": [ { @@ -7105,7 +7310,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -7138,7 +7346,9 @@ }, "/api/session/{sessionID}/form": { "get": { - "tags": ["form"], + "tags": [ + "form" + ], "operationId": "v2.session.form.list", "parameters": [ { @@ -7166,7 +7376,9 @@ } } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -7214,7 +7426,9 @@ "summary": "List session forms" }, "post": { - "tags": ["form"], + "tags": [ + "form" + ], "operationId": "v2.session.form.create", "parameters": [ { @@ -7239,7 +7453,9 @@ "$ref": "#/components/schemas/Form.Info" } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -7316,7 +7532,9 @@ }, "/api/session/{sessionID}/form/{formID}": { "get": { - "tags": ["form"], + "tags": [ + "form" + ], "operationId": "v2.session.form.get", "parameters": [ { @@ -7354,7 +7572,9 @@ "$ref": "#/components/schemas/Form.Info" } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -7407,7 +7627,9 @@ }, "/api/session/{sessionID}/form/{formID}/state": { "get": { - "tags": ["form"], + "tags": [ + "form" + ], "operationId": "v2.session.form.state", "parameters": [ { @@ -7445,7 +7667,9 @@ "$ref": "#/components/schemas/Form.State" } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -7498,7 +7722,9 @@ }, "/api/session/{sessionID}/form/{formID}/reply": { "post": { - "tags": ["form"], + "tags": [ + "form" + ], "operationId": "v2.session.form.reply", "parameters": [ { @@ -7602,7 +7828,9 @@ }, "/api/session/{sessionID}/form/{formID}/cancel": { "post": { - "tags": ["form"], + "tags": [ + "form" + ], "operationId": "v2.session.form.cancel", "parameters": [ { @@ -7689,7 +7917,9 @@ }, "/api/permission/request": { "get": { - "tags": ["permission"], + "tags": [ + "permission" + ], "operationId": "v2.permission.request.list", "parameters": [ { @@ -7752,7 +7982,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -7785,7 +8018,9 @@ }, "/api/permission/saved": { "get": { - "tags": ["permission"], + "tags": [ + "permission" + ], "operationId": "v2.permission.saved.list", "parameters": [ { @@ -7820,7 +8055,9 @@ } } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -7853,7 +8090,9 @@ }, "/api/permission/saved/{id}": { "delete": { - "tags": ["permission"], + "tags": [ + "permission" + ], "operationId": "v2.permission.saved.remove", "parameters": [ { @@ -7897,7 +8136,9 @@ }, "/api/session/{sessionID}/permission": { "post": { - "tags": ["permission"], + "tags": [ + "permission" + ], "operationId": "v2.session.permission.create", "parameters": [ { @@ -7938,11 +8179,16 @@ "$ref": "#/components/schemas/Permission.Effect" } }, - "required": ["id", "effect"], + "required": [ + "id", + "effect" + ], "additionalProperties": false } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -8041,7 +8287,10 @@ ] } }, - "required": ["action", "resources"], + "required": [ + "action", + "resources" + ], "additionalProperties": false } } @@ -8050,7 +8299,9 @@ } }, "get": { - "tags": ["permission"], + "tags": [ + "permission" + ], "operationId": "v2.session.permission.list", "parameters": [ { @@ -8083,7 +8334,9 @@ } } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -8133,7 +8386,9 @@ }, "/api/session/{sessionID}/permission/{requestID}": { "get": { - "tags": ["permission"], + "tags": [ + "permission" + ], "operationId": "v2.session.permission.get", "parameters": [ { @@ -8176,7 +8431,9 @@ "$ref": "#/components/schemas/Permission.Request" } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -8229,7 +8486,9 @@ }, "/api/session/{sessionID}/permission/{requestID}/reply": { "post": { - "tags": ["permission"], + "tags": [ + "permission" + ], "operationId": "v2.session.permission.reply", "parameters": [ { @@ -8327,7 +8586,9 @@ ] } }, - "required": ["reply"], + "required": [ + "reply" + ], "additionalProperties": false } } @@ -8338,7 +8599,9 @@ }, "/api/fs/read/*": { "get": { - "tags": ["filesystem"], + "tags": [ + "filesystem" + ], "operationId": "v2.fs.read", "parameters": [ { @@ -8422,7 +8685,9 @@ }, "/api/fs/list": { "get": { - "tags": ["filesystem"], + "tags": [ + "filesystem" + ], "operationId": "v2.fs.list", "parameters": [ { @@ -8500,7 +8765,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -8533,7 +8801,9 @@ }, "/api/fs/find": { "get": { - "tags": ["filesystem"], + "tags": [ + "filesystem" + ], "operationId": "v2.fs.find", "parameters": [ { @@ -8589,7 +8859,10 @@ "in": "query", "schema": { "type": "string", - "enum": ["file", "directory"] + "enum": [ + "file", + "directory" + ] }, "required": false }, @@ -8628,7 +8901,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -8661,7 +8937,9 @@ }, "/api/command": { "get": { - "tags": ["command"], + "tags": [ + "command" + ], "operationId": "v2.command.list", "parameters": [ { @@ -8724,7 +9002,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -8757,7 +9038,9 @@ }, "/api/skill": { "get": { - "tags": ["skill"], + "tags": [ + "skill" + ], "operationId": "v2.skill.list", "parameters": [ { @@ -8820,7 +9103,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -8853,7 +9139,9 @@ }, "/api/event": { "get": { - "tags": ["event"], + "tags": [ + "event" + ], "operationId": "v2.event.subscribe", "parameters": [], "security": [], @@ -8882,7 +9170,11 @@ "$ref": "#/components/schemas/V2EventJsonString" } }, - "required": ["id", "event", "data"], + "required": [ + "id", + "event", + "data" + ], "additionalProperties": false }, "x-effect-stream": { @@ -8896,13 +9188,18 @@ "properties": { "_tag": { "type": "string", - "enum": ["Fail"] + "enum": [ + "Fail" + ] }, "error": { "not": {} } }, - "required": ["_tag", "error"], + "required": [ + "_tag", + "error" + ], "additionalProperties": false }, { @@ -8910,11 +9207,16 @@ "properties": { "_tag": { "type": "string", - "enum": ["Die"] + "enum": [ + "Die" + ] }, "defect": {} }, - "required": ["_tag", "defect"], + "required": [ + "_tag", + "defect" + ], "additionalProperties": false }, { @@ -8922,7 +9224,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["Interrupt"] + "enum": [ + "Interrupt" + ] }, "fiberId": { "anyOf": [ @@ -8935,7 +9239,10 @@ ] } }, - "required": ["_tag", "fiberId"], + "required": [ + "_tag", + "fiberId" + ], "additionalProperties": false } ] @@ -8976,7 +9283,9 @@ }, "/api/pty": { "get": { - "tags": ["pty"], + "tags": [ + "pty" + ], "operationId": "v2.pty.list", "parameters": [ { @@ -9039,7 +9348,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -9070,7 +9382,9 @@ "summary": "List PTY sessions" }, "post": { - "tags": ["pty"], + "tags": [ + "pty" + ], "operationId": "v2.pty.create", "parameters": [ { @@ -9130,7 +9444,10 @@ "$ref": "#/components/schemas/Pty" } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -9197,7 +9514,9 @@ }, "/api/pty/{ptyID}": { "get": { - "tags": ["pty"], + "tags": [ + "pty" + ], "operationId": "v2.pty.get", "parameters": [ { @@ -9270,7 +9589,10 @@ "$ref": "#/components/schemas/Pty" } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -9311,7 +9633,9 @@ "summary": "Get PTY session" }, "put": { - "tags": ["pty"], + "tags": [ + "pty" + ], "operationId": "v2.pty.update", "parameters": [ { @@ -9384,7 +9708,10 @@ "$ref": "#/components/schemas/Pty" } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -9452,7 +9779,10 @@ ] } }, - "required": ["rows", "cols"], + "required": [ + "rows", + "cols" + ], "additionalProperties": false } }, @@ -9464,7 +9794,9 @@ } }, "delete": { - "tags": ["pty"], + "tags": [ + "pty" + ], "operationId": "v2.pty.remove", "parameters": [ { @@ -9563,7 +9895,9 @@ }, "/api/pty/{ptyID}/connect-token": { "post": { - "tags": ["pty"], + "tags": [ + "pty" + ], "operationId": "v2.pty.connect.token", "parameters": [ { @@ -9636,7 +9970,10 @@ "$ref": "#/components/schemas/PtyTicket.ConnectToken" } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -9689,7 +10026,9 @@ }, "/api/pty/{ptyID}/connect": { "get": { - "tags": ["pty"], + "tags": [ + "pty" + ], "operationId": "v2.pty.connect", "parameters": [ { @@ -9794,7 +10133,9 @@ }, "/api/shell": { "get": { - "tags": ["shell"], + "tags": [ + "shell" + ], "operationId": "v2.shell.list", "parameters": [ { @@ -9857,7 +10198,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -9888,7 +10232,9 @@ "summary": "List running shell commands" }, "post": { - "tags": ["shell"], + "tags": [ + "shell" + ], "operationId": "v2.shell.create", "parameters": [ { @@ -9948,7 +10294,10 @@ "$ref": "#/components/schemas/Shell.Info1" } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -10001,7 +10350,10 @@ "type": "object" } }, - "required": ["command", "timeout"], + "required": [ + "command", + "timeout" + ], "additionalProperties": false } } @@ -10012,7 +10364,9 @@ }, "/api/shell/{id}": { "get": { - "tags": ["shell"], + "tags": [ + "shell" + ], "operationId": "v2.shell.get", "parameters": [ { @@ -10085,7 +10439,10 @@ "$ref": "#/components/schemas/Shell.Info1" } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -10126,7 +10483,9 @@ "summary": "Get shell command" }, "delete": { - "tags": ["shell"], + "tags": [ + "shell" + ], "operationId": "v2.shell.remove", "parameters": [ { @@ -10225,7 +10584,9 @@ }, "/api/shell/{id}/timeout": { "patch": { - "tags": ["shell"], + "tags": [ + "shell" + ], "operationId": "v2.shell.timeout", "parameters": [ { @@ -10298,7 +10659,10 @@ "$ref": "#/components/schemas/Shell.Info1" } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -10352,7 +10716,9 @@ ] } }, - "required": ["timeout"], + "required": [ + "timeout" + ], "additionalProperties": false } } @@ -10363,7 +10729,9 @@ }, "/api/shell/{id}/output": { "get": { - "tags": ["shell"], + "tags": [ + "shell" + ], "operationId": "v2.shell.output", "parameters": [ { @@ -10484,11 +10852,19 @@ "type": "boolean" } }, - "required": ["output", "cursor", "size", "truncated"], + "required": [ + "output", + "cursor", + "size", + "truncated" + ], "additionalProperties": false } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -10531,7 +10907,9 @@ }, "/api/question/request": { "get": { - "tags": ["question"], + "tags": [ + "question" + ], "operationId": "v2.question.request.list", "parameters": [ { @@ -10594,7 +10972,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -10627,7 +11008,9 @@ }, "/api/session/{sessionID}/question": { "get": { - "tags": ["question"], + "tags": [ + "question" + ], "operationId": "v2.session.question.list", "parameters": [ { @@ -10660,7 +11043,9 @@ } } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -10710,7 +11095,9 @@ }, "/api/session/{sessionID}/question/{requestID}/reply": { "post": { - "tags": ["question"], + "tags": [ + "question" + ], "operationId": "v2.session.question.reply", "parameters": [ { @@ -10802,7 +11189,9 @@ }, "/api/session/{sessionID}/question/{requestID}/reject": { "post": { - "tags": ["question"], + "tags": [ + "question" + ], "operationId": "v2.session.question.reject", "parameters": [ { @@ -10884,7 +11273,9 @@ }, "/api/reference": { "get": { - "tags": ["reference"], + "tags": [ + "reference" + ], "operationId": "v2.reference.list", "parameters": [ { @@ -10947,7 +11338,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -10978,10 +11372,12 @@ "summary": "List references" } }, - "/api/experimental/project/{projectID}/copy": { - "post": { - "tags": ["projectCopy"], - "operationId": "v2.projectCopy.create", + "/api/experimental/project/{projectID}/worktree": { + "get": { + "tags": [ + "worktree" + ], + "operationId": "v2.worktree.list", "parameters": [ { "name": "projectID", @@ -10990,68 +11386,79 @@ "type": "string" }, "required": true - }, - { - "name": "location", - "in": "query", - "schema": { - "anyOf": [ - { - "type": "object", - "properties": { - "directory": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "workspace": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "additionalProperties": false - }, - { - "type": "null" - } - ] - }, - "required": false, - "style": "deepObject", - "explode": true } ], "security": [], "responses": { "200": { - "description": "ProjectCopy.Copy", + "description": "Worktree.List", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProjectCopy.Copy" + "$ref": "#/components/schemas/Worktree.List" } } } }, "400": { - "description": "ProjectCopyError | InvalidRequestError", + "description": "InvalidRequestError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestError" + } + } + } + }, + "401": { + "description": "UnauthorizedError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } + } + }, + "description": "List known local worktrees for a project.", + "summary": "List worktrees" + }, + "post": { + "tags": [ + "worktree" + ], + "operationId": "v2.worktree.create", + "parameters": [ + { + "name": "projectID", + "in": "path", + "schema": { + "type": "string" + }, + "required": true + } + ], + "security": [], + "responses": { + "200": { + "description": "Worktree.Info", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Worktree.Info" + } + } + } + }, + "400": { + "description": "WorktreeError | InvalidRequestError", "content": { "application/json": { "schema": { "anyOf": [ { - "$ref": "#/components/schemas/ProjectCopyError" + "$ref": "#/components/schemas/WorktreeError" }, { "$ref": "#/components/schemas/InvalidRequestError" @@ -11072,6 +11479,8 @@ } } }, + "description": "Create a worktree for a project.", + "summary": "Create worktree", "requestBody": { "content": { "application/json": { @@ -11088,7 +11497,10 @@ "type": "string" } }, - "required": ["strategy", "directory"], + "required": [ + "strategy", + "directory" + ], "additionalProperties": false } } @@ -11097,8 +11509,10 @@ } }, "delete": { - "tags": ["projectCopy"], - "operationId": "v2.projectCopy.remove", + "tags": [ + "worktree" + ], + "operationId": "v2.worktree.remove", "parameters": [ { "name": "projectID", @@ -11107,46 +11521,6 @@ "type": "string" }, "required": true - }, - { - "name": "location", - "in": "query", - "schema": { - "anyOf": [ - { - "type": "object", - "properties": { - "directory": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "workspace": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "additionalProperties": false - }, - { - "type": "null" - } - ] - }, - "required": false, - "style": "deepObject", - "explode": true } ], "security": [], @@ -11155,13 +11529,13 @@ "description": "" }, "400": { - "description": "ProjectCopyError | InvalidRequestError", + "description": "WorktreeError | InvalidRequestError", "content": { "application/json": { "schema": { "anyOf": [ { - "$ref": "#/components/schemas/ProjectCopyError" + "$ref": "#/components/schemas/WorktreeError" }, { "$ref": "#/components/schemas/InvalidRequestError" @@ -11182,6 +11556,8 @@ } } }, + "description": "Remove a managed worktree from a project.", + "summary": "Remove worktree", "requestBody": { "content": { "application/json": { @@ -11195,7 +11571,10 @@ "type": "boolean" } }, - "required": ["directory", "force"], + "required": [ + "directory", + "force" + ], "additionalProperties": false } } @@ -11204,10 +11583,12 @@ } } }, - "/api/experimental/project/{projectID}/copy/refresh": { + "/api/experimental/project/{projectID}/worktree/refresh": { "post": { - "tags": ["projectCopy"], - "operationId": "v2.projectCopy.refresh", + "tags": [ + "worktree" + ], + "operationId": "v2.worktree.refresh", "parameters": [ { "name": "projectID", @@ -11216,46 +11597,6 @@ "type": "string" }, "required": true - }, - { - "name": "location", - "in": "query", - "schema": { - "anyOf": [ - { - "type": "object", - "properties": { - "directory": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "workspace": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "additionalProperties": false - }, - { - "type": "null" - } - ] - }, - "required": false, - "style": "deepObject", - "explode": true } ], "security": [], @@ -11264,13 +11605,13 @@ "description": "" }, "400": { - "description": "ProjectCopyError | InvalidRequestError", + "description": "WorktreeError | InvalidRequestError", "content": { "application/json": { "schema": { "anyOf": [ { - "$ref": "#/components/schemas/ProjectCopyError" + "$ref": "#/components/schemas/WorktreeError" }, { "$ref": "#/components/schemas/InvalidRequestError" @@ -11290,12 +11631,16 @@ } } } - } + }, + "description": "Reconcile stored worktrees with the project repositories.", + "summary": "Refresh worktrees" } }, "/api/vcs": { "get": { - "tags": ["vcs"], + "tags": [ + "vcs" + ], "operationId": "v2.vcs.get", "parameters": [ { @@ -11355,7 +11700,10 @@ "$ref": "#/components/schemas/Vcs.Info" } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -11388,7 +11736,9 @@ }, "/api/vcs/status": { "get": { - "tags": ["vcs"], + "tags": [ + "vcs" + ], "operationId": "v2.vcs.status", "parameters": [ { @@ -11451,7 +11801,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -11484,7 +11837,9 @@ }, "/api/vcs/diff": { "get": { - "tags": ["vcs"], + "tags": [ + "vcs" + ], "operationId": "v2.vcs.diff", "parameters": [ { @@ -11570,7 +11925,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -11603,7 +11961,9 @@ }, "/api/debug/location": { "get": { - "tags": ["debug"], + "tags": [ + "debug" + ], "operationId": "v2.debug.location.list", "parameters": [], "security": [], @@ -11646,7 +12006,9 @@ "summary": "List loaded locations" }, "delete": { - "tags": ["debug"], + "tags": [ + "debug" + ], "operationId": "v2.debug.location.evict", "parameters": [ { @@ -11722,7 +12084,9 @@ }, "/api/experimental/migration/v1": { "get": { - "tags": ["migration"], + "tags": [ + "migration" + ], "operationId": "v2.experimental.migration.v1.status", "parameters": [], "security": [], @@ -11738,10 +12102,15 @@ "properties": { "status": { "type": "string", - "enum": ["required", "completed"] + "enum": [ + "required", + "completed" + ] } }, - "required": ["status"], + "required": [ + "status" + ], "additionalProperties": false }, { @@ -11749,7 +12118,9 @@ "properties": { "status": { "type": "string", - "enum": ["running"] + "enum": [ + "running" + ] }, "progress": { "type": "object", @@ -11788,11 +12159,16 @@ ] } }, - "required": ["label"], + "required": [ + "label" + ], "additionalProperties": false } }, - "required": ["status", "progress"], + "required": [ + "status", + "progress" + ], "additionalProperties": false }, { @@ -11800,13 +12176,18 @@ "properties": { "status": { "type": "string", - "enum": ["error"] + "enum": [ + "error" + ] }, "error": { "type": "string" } }, - "required": ["status", "error"], + "required": [ + "status", + "error" + ], "additionalProperties": false } ] @@ -11841,7 +12222,9 @@ }, "/api/websearch/provider": { "get": { - "tags": ["websearch"], + "tags": [ + "websearch" + ], "operationId": "v2.websearch.providers", "parameters": [ { @@ -11904,7 +12287,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -11947,7 +12333,9 @@ }, "/api/websearch": { "post": { - "tags": ["websearch"], + "tags": [ + "websearch" + ], "operationId": "v2.websearch.query", "parameters": [ { @@ -12007,7 +12395,10 @@ "$ref": "#/components/schemas/WebSearch.Response" } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -12066,7 +12457,9 @@ "type": "string" } }, - "required": ["query"], + "required": [ + "query" + ], "additionalProperties": false } } @@ -12077,7 +12470,9 @@ }, "/api/config": { "get": { - "tags": ["config"], + "tags": [ + "config" + ], "operationId": "v2.config.get", "parameters": [ { @@ -12169,7 +12564,9 @@ "properties": { "healthy": { "type": "boolean", - "enum": [true] + "enum": [ + true + ] }, "version": { "type": "string" @@ -12183,7 +12580,11 @@ ] } }, - "required": ["healthy", "version", "pid"], + "required": [ + "healthy", + "version", + "pid" + ], "additionalProperties": false }, "UnauthorizedError": { @@ -12191,13 +12592,18 @@ "properties": { "_tag": { "type": "string", - "enum": ["UnauthorizedError"] + "enum": [ + "UnauthorizedError" + ] }, "message": { "type": "string" } }, - "required": ["_tag", "message"], + "required": [ + "_tag", + "message" + ], "additionalProperties": false }, "InvalidRequestError": { @@ -12205,7 +12611,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["InvalidRequestError"] + "enum": [ + "InvalidRequestError" + ] }, "message": { "type": "string" @@ -12231,7 +12639,10 @@ ] } }, - "required": ["_tag", "message"], + "required": [ + "_tag", + "message" + ], "additionalProperties": false }, "ServiceStopRequest": { @@ -12241,7 +12652,9 @@ "type": "string" } }, - "required": ["instanceID"], + "required": [ + "instanceID" + ], "additionalProperties": false }, "ServiceStopResponse": { @@ -12251,7 +12664,9 @@ "type": "boolean" } }, - "required": ["accepted"], + "required": [ + "accepted" + ], "additionalProperties": false }, "Location.Info": { @@ -12281,11 +12696,18 @@ "type": "string" } }, - "required": ["id", "directory", "canonical"], + "required": [ + "id", + "directory", + "canonical" + ], "additionalProperties": false } }, - "required": ["directory", "project"], + "required": [ + "directory", + "project" + ], "additionalProperties": false }, "Model.Ref": { @@ -12301,7 +12723,10 @@ "type": "string" } }, - "required": ["id", "providerID"], + "required": [ + "id", + "providerID" + ], "additionalProperties": false }, "Provider.Settings": { @@ -12323,7 +12748,11 @@ "type": "object" } }, - "required": ["settings", "headers", "body"], + "required": [ + "settings", + "headers", + "body" + ], "additionalProperties": false }, "Agent.Color": { @@ -12331,7 +12760,11 @@ }, "Permission.Effect": { "type": "string", - "enum": ["allow", "deny", "ask"] + "enum": [ + "allow", + "deny", + "ask" + ] }, "Permission.Rule": { "type": "object", @@ -12346,7 +12779,11 @@ "$ref": "#/components/schemas/Permission.Effect" } }, - "required": ["action", "resource", "effect"], + "required": [ + "action", + "resource", + "effect" + ], "additionalProperties": false }, "Permission.Ruleset": { @@ -12378,7 +12815,11 @@ }, "mode": { "type": "string", - "enum": ["subagent", "primary", "all"] + "enum": [ + "subagent", + "primary", + "all" + ] }, "hidden": { "type": "boolean" @@ -12398,7 +12839,14 @@ "$ref": "#/components/schemas/Permission.Ruleset" } }, - "required": ["id", "name", "request", "mode", "hidden", "permissions"], + "required": [ + "id", + "name", + "request", + "mode", + "hidden", + "permissions" + ], "additionalProperties": false }, "AgentNotFoundError": { @@ -12406,7 +12854,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["AgentNotFoundError"] + "enum": [ + "AgentNotFoundError" + ] }, "agentID": { "type": "string" @@ -12415,7 +12865,11 @@ "type": "string" } }, - "required": ["_tag", "agentID", "message"], + "required": [ + "_tag", + "agentID", + "message" + ], "additionalProperties": false }, "Plugin.Info": { @@ -12425,7 +12879,9 @@ "type": "string" } }, - "required": ["id"], + "required": [ + "id" + ], "additionalProperties": false }, "Session.ForkBoundary": { @@ -12435,7 +12891,9 @@ "properties": { "type": { "type": "string", - "enum": ["before"] + "enum": [ + "before" + ] }, "messageID": { "type": "string", @@ -12446,7 +12904,10 @@ ] } }, - "required": ["type", "messageID"], + "required": [ + "type", + "messageID" + ], "additionalProperties": false }, { @@ -12454,7 +12915,9 @@ "properties": { "type": { "type": "string", - "enum": ["through"] + "enum": [ + "through" + ] }, "messageID": { "type": "string", @@ -12465,7 +12928,10 @@ ] } }, - "required": ["type", "messageID"], + "required": [ + "type", + "messageID" + ], "additionalProperties": false } ] @@ -12495,11 +12961,19 @@ "type": "number" } }, - "required": ["read", "write"], + "required": [ + "read", + "write" + ], "additionalProperties": false } }, - "required": ["input", "output", "reasoning", "cache"], + "required": [ + "input", + "output", + "reasoning", + "cache" + ], "additionalProperties": false }, "Location.Ref": { @@ -12517,7 +12991,9 @@ ] } }, - "required": ["directory"], + "required": [ + "directory" + ], "additionalProperties": false }, "FileDiff.Info": { @@ -12547,10 +13023,20 @@ }, "status": { "type": "string", - "enum": ["added", "deleted", "modified"] + "enum": [ + "added", + "deleted", + "modified" + ] } }, - "required": ["file", "patch", "additions", "deletions", "status"], + "required": [ + "file", + "patch", + "additions", + "deletions", + "status" + ], "additionalProperties": false }, "Session.Revert": { @@ -12577,7 +13063,9 @@ } } }, - "required": ["messageID"], + "required": [ + "messageID" + ], "additionalProperties": false }, "Session.Info": { @@ -12614,7 +13102,10 @@ "$ref": "#/components/schemas/Session.ForkBoundary" } }, - "required": ["sessionID", "boundary"], + "required": [ + "sessionID", + "boundary" + ], "additionalProperties": false }, "projectID": { @@ -12645,7 +13136,10 @@ "type": "number" } }, - "required": ["created", "updated"], + "required": [ + "created", + "updated" + ], "additionalProperties": false }, "title": { @@ -12661,7 +13155,14 @@ "$ref": "#/components/schemas/Session.Revert" } }, - "required": ["id", "projectID", "cost", "tokens", "time", "location"], + "required": [ + "id", + "projectID", + "cost", + "tokens", + "time", + "location" + ], "additionalProperties": false }, "SessionsResponse": { @@ -12700,7 +13201,10 @@ "additionalProperties": false } }, - "required": ["data", "cursor"], + "required": [ + "data", + "cursor" + ], "additionalProperties": false }, "InvalidCursorError": { @@ -12708,13 +13212,18 @@ "properties": { "_tag": { "type": "string", - "enum": ["InvalidCursorError"] + "enum": [ + "InvalidCursorError" + ] }, "message": { "type": "string" } }, - "required": ["_tag", "message"], + "required": [ + "_tag", + "message" + ], "additionalProperties": false }, "InvalidRequestError1": { @@ -12722,7 +13231,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["InvalidRequestError"] + "enum": [ + "InvalidRequestError" + ] }, "message": { "type": "string" @@ -12748,7 +13259,10 @@ ] } }, - "required": ["_tag", "message"], + "required": [ + "_tag", + "message" + ], "additionalProperties": false }, "Session.Message.AgentSelected": { @@ -12772,12 +13286,16 @@ "type": "number" } }, - "required": ["created"], + "required": [ + "created" + ], "additionalProperties": false }, "type": { "type": "string", - "enum": ["agent-switched"] + "enum": [ + "agent-switched" + ] }, "agent": { "type": "string" @@ -12786,7 +13304,12 @@ "type": "string" } }, - "required": ["id", "time", "type", "agent"], + "required": [ + "id", + "time", + "type", + "agent" + ], "additionalProperties": false }, "Session.Message.ModelSelected": { @@ -12810,12 +13333,16 @@ "type": "number" } }, - "required": ["created"], + "required": [ + "created" + ], "additionalProperties": false }, "type": { "type": "string", - "enum": ["model-switched"] + "enum": [ + "model-switched" + ] }, "model": { "$ref": "#/components/schemas/Model.Ref" @@ -12824,7 +13351,12 @@ "$ref": "#/components/schemas/Model.Ref" } }, - "required": ["id", "time", "type", "model"], + "required": [ + "id", + "time", + "type", + "model" + ], "additionalProperties": false }, "Session.Message.LocationSwitched": { @@ -12848,12 +13380,16 @@ "type": "number" } }, - "required": ["created"], + "required": [ + "created" + ], "additionalProperties": false }, "type": { "type": "string", - "enum": ["location-switched"] + "enum": [ + "location-switched" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -12877,11 +13413,18 @@ "type": "string" } }, - "required": ["location"], + "required": [ + "location" + ], "additionalProperties": false } }, - "required": ["id", "time", "type", "location"], + "required": [ + "id", + "time", + "type", + "location" + ], "additionalProperties": false }, "Prompt.Base64": { @@ -12899,10 +13442,14 @@ "properties": { "type": { "type": "string", - "enum": ["inline"] + "enum": [ + "inline" + ] } }, - "required": ["type"], + "required": [ + "type" + ], "additionalProperties": false }, { @@ -12910,13 +13457,18 @@ "properties": { "type": { "type": "string", - "enum": ["uri"] + "enum": [ + "uri" + ] }, "uri": { "type": "string" } }, - "required": ["type", "uri"], + "required": [ + "type", + "uri" + ], "additionalProperties": false } ] @@ -12934,7 +13486,11 @@ "type": "string" } }, - "required": ["start", "end", "text"], + "required": [ + "start", + "end", + "text" + ], "additionalProperties": false }, "Prompt.FileAttachment": { @@ -12959,7 +13515,11 @@ "$ref": "#/components/schemas/Prompt.Mention" } }, - "required": ["data", "mime", "source"], + "required": [ + "data", + "mime", + "source" + ], "additionalProperties": false }, "Prompt.AgentAttachment": { @@ -12972,7 +13532,9 @@ "$ref": "#/components/schemas/Prompt.Mention" } }, - "required": ["name"], + "required": [ + "name" + ], "additionalProperties": false }, "Prompt.SkillAttachment": { @@ -12991,7 +13553,11 @@ "$ref": "#/components/schemas/Prompt.Mention" } }, - "required": ["id", "name", "text"], + "required": [ + "id", + "name", + "text" + ], "additionalProperties": false }, "Session.Message.User": { @@ -13015,7 +13581,9 @@ "type": "number" } }, - "required": ["created"], + "required": [ + "created" + ], "additionalProperties": false }, "text": { @@ -13041,10 +13609,17 @@ }, "type": { "type": "string", - "enum": ["user"] + "enum": [ + "user" + ] } }, - "required": ["id", "time", "text", "type"], + "required": [ + "id", + "time", + "text", + "type" + ], "additionalProperties": false }, "Session.Message.Synthetic": { @@ -13068,7 +13643,9 @@ "type": "number" } }, - "required": ["created"], + "required": [ + "created" + ], "additionalProperties": false }, "text": { @@ -13079,10 +13656,17 @@ }, "type": { "type": "string", - "enum": ["synthetic"] + "enum": [ + "synthetic" + ] } }, - "required": ["id", "time", "text", "type"], + "required": [ + "id", + "time", + "text", + "type" + ], "additionalProperties": false }, "Session.Message.System": { @@ -13106,12 +13690,16 @@ "type": "number" } }, - "required": ["created"], + "required": [ + "created" + ], "additionalProperties": false }, "type": { "type": "string", - "enum": ["system"] + "enum": [ + "system" + ] }, "text": { "type": "string" @@ -13120,7 +13708,12 @@ "type": "string" } }, - "required": ["id", "time", "type", "text"], + "required": [ + "id", + "time", + "type", + "text" + ], "additionalProperties": false }, "Session.Message.Skill": { @@ -13144,12 +13737,16 @@ "type": "number" } }, - "required": ["created"], + "required": [ + "created" + ], "additionalProperties": false }, "type": { "type": "string", - "enum": ["skill"] + "enum": [ + "skill" + ] }, "skill": { "type": "string" @@ -13161,7 +13758,14 @@ "type": "string" } }, - "required": ["id", "time", "type", "skill", "name", "text"], + "required": [ + "id", + "time", + "type", + "skill", + "name", + "text" + ], "additionalProperties": false }, "Session.Message.Shell": { @@ -13188,12 +13792,16 @@ "type": "number" } }, - "required": ["created"], + "required": [ + "created" + ], "additionalProperties": false }, "type": { "type": "string", - "enum": ["shell"] + "enum": [ + "shell" + ] }, "shellID": { "type": "string", @@ -13208,7 +13816,12 @@ }, "status": { "type": "string", - "enum": ["running", "exited", "timeout", "killed"] + "enum": [ + "running", + "exited", + "timeout", + "killed" + ] }, "exit": { "anyOf": [ @@ -13219,21 +13832,31 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] }, { "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] + "enum": [ + "Infinity", + "-Infinity", + "NaN" + ] } ] }, @@ -13263,11 +13886,23 @@ "type": "boolean" } }, - "required": ["output", "cursor", "size", "truncated"], + "required": [ + "output", + "cursor", + "size", + "truncated" + ], "additionalProperties": false } }, - "required": ["id", "time", "type", "shellID", "command", "status"], + "required": [ + "id", + "time", + "type", + "shellID", + "command", + "status" + ], "additionalProperties": false }, "Session.Message.ProviderState": { @@ -13278,7 +13913,9 @@ "properties": { "type": { "type": "string", - "enum": ["text"] + "enum": [ + "text" + ] }, "text": { "type": "string" @@ -13287,7 +13924,10 @@ "$ref": "#/components/schemas/Session.Message.ProviderState" } }, - "required": ["type", "text"], + "required": [ + "type", + "text" + ], "additionalProperties": false }, "Session.Message.Assistant.Reasoning": { @@ -13295,7 +13935,9 @@ "properties": { "type": { "type": "string", - "enum": ["reasoning"] + "enum": [ + "reasoning" + ] }, "text": { "type": "string" @@ -13313,11 +13955,16 @@ "type": "number" } }, - "required": ["created"], + "required": [ + "created" + ], "additionalProperties": false } }, - "required": ["type", "text"], + "required": [ + "type", + "text" + ], "additionalProperties": false }, "Session.Message.ToolState.Streaming": { @@ -13325,13 +13972,18 @@ "properties": { "status": { "type": "string", - "enum": ["streaming"] + "enum": [ + "streaming" + ] }, "input": { "type": "string" } }, - "required": ["status", "input"], + "required": [ + "status", + "input" + ], "additionalProperties": false }, "Session.Message.ToolState.Running": { @@ -13339,7 +13991,9 @@ "properties": { "status": { "type": "string", - "enum": ["running"] + "enum": [ + "running" + ] }, "input": { "type": "object" @@ -13348,7 +14002,11 @@ "type": "object" } }, - "required": ["status", "input", "metadata"], + "required": [ + "status", + "input", + "metadata" + ], "additionalProperties": false }, "Tool.TextContent": { @@ -13356,13 +14014,18 @@ "properties": { "type": { "type": "string", - "enum": ["text"] + "enum": [ + "text" + ] }, "text": { "type": "string" } }, - "required": ["type", "text"], + "required": [ + "type", + "text" + ], "additionalProperties": false }, "Tool.FileContent": { @@ -13370,7 +14033,9 @@ "properties": { "type": { "type": "string", - "enum": ["file"] + "enum": [ + "file" + ] }, "uri": { "type": "string" @@ -13389,7 +14054,11 @@ ] } }, - "required": ["type", "uri", "mime"], + "required": [ + "type", + "uri", + "mime" + ], "additionalProperties": false }, "Tool.Content": { @@ -13407,7 +14076,9 @@ "properties": { "status": { "type": "string", - "enum": ["completed"] + "enum": [ + "completed" + ] }, "input": { "type": "object" @@ -13428,7 +14099,11 @@ "type": "object" } }, - "required": ["status", "input", "content"], + "required": [ + "status", + "input", + "content" + ], "additionalProperties": false }, "Session.StructuredError": { @@ -13450,7 +14125,10 @@ ] } }, - "required": ["type", "message"], + "required": [ + "type", + "message" + ], "additionalProperties": false }, "Session.Message.ToolState.Error": { @@ -13458,7 +14136,9 @@ "properties": { "status": { "type": "string", - "enum": ["error"] + "enum": [ + "error" + ] }, "input": { "type": "object" @@ -13482,7 +14162,11 @@ "type": "object" } }, - "required": ["status", "input", "error"], + "required": [ + "status", + "input", + "error" + ], "additionalProperties": false }, "Session.Message.Assistant.Tool": { @@ -13490,7 +14174,9 @@ "properties": { "type": { "type": "string", - "enum": ["tool"] + "enum": [ + "tool" + ] }, "id": { "type": "string" @@ -13536,11 +14222,19 @@ "type": "number" } }, - "required": ["created"], + "required": [ + "created" + ], "additionalProperties": false } }, - "required": ["type", "id", "name", "state", "time"], + "required": [ + "type", + "id", + "name", + "state", + "time" + ], "additionalProperties": false }, "Session.Message.Assistant.Retry": { @@ -13561,7 +14255,11 @@ "$ref": "#/components/schemas/Session.StructuredError" } }, - "required": ["attempt", "at", "error"], + "required": [ + "attempt", + "at", + "error" + ], "additionalProperties": false }, "Session.Message.Assistant": { @@ -13588,12 +14286,16 @@ "type": "number" } }, - "required": ["created"], + "required": [ + "created" + ], "additionalProperties": false }, "type": { "type": "string", - "enum": ["assistant"] + "enum": [ + "assistant" + ] }, "agent": { "type": "string" @@ -13637,7 +14339,14 @@ }, "finish": { "type": "string", - "enum": ["stop", "length", "tool-calls", "content-filter", "error", "unknown"] + "enum": [ + "stop", + "length", + "tool-calls", + "content-filter", + "error", + "unknown" + ] }, "cost": { "$ref": "#/components/schemas/Money.USD" @@ -13652,7 +14361,14 @@ "$ref": "#/components/schemas/Session.Message.Assistant.Retry" } }, - "required": ["id", "time", "type", "agent", "model", "content"], + "required": [ + "id", + "time", + "type", + "agent", + "model", + "content" + ], "additionalProperties": false }, "Session.Message.Compaction.Running": { @@ -13660,7 +14376,9 @@ "properties": { "type": { "type": "string", - "enum": ["compaction"] + "enum": [ + "compaction" + ] }, "id": { "type": "string", @@ -13680,16 +14398,23 @@ "type": "number" } }, - "required": ["created"], + "required": [ + "created" + ], "additionalProperties": false }, "status": { "type": "string", - "enum": ["running"] + "enum": [ + "running" + ] }, "reason": { "type": "string", - "enum": ["auto", "manual"] + "enum": [ + "auto", + "manual" + ] }, "summary": { "type": "string" @@ -13698,7 +14423,15 @@ "type": "string" } }, - "required": ["type", "id", "time", "status", "reason", "summary", "recent"], + "required": [ + "type", + "id", + "time", + "status", + "reason", + "summary", + "recent" + ], "additionalProperties": false }, "Session.Message.Compaction.Completed": { @@ -13706,7 +14439,9 @@ "properties": { "type": { "type": "string", - "enum": ["compaction"] + "enum": [ + "compaction" + ] }, "id": { "type": "string", @@ -13726,16 +14461,23 @@ "type": "number" } }, - "required": ["created"], + "required": [ + "created" + ], "additionalProperties": false }, "status": { "type": "string", - "enum": ["completed"] + "enum": [ + "completed" + ] }, "reason": { "type": "string", - "enum": ["auto", "manual"] + "enum": [ + "auto", + "manual" + ] }, "summary": { "type": "string" @@ -13744,7 +14486,15 @@ "type": "string" } }, - "required": ["type", "id", "time", "status", "reason", "summary", "recent"], + "required": [ + "type", + "id", + "time", + "status", + "reason", + "summary", + "recent" + ], "additionalProperties": false }, "Session.Message.Compaction.Failed": { @@ -13752,7 +14502,9 @@ "properties": { "type": { "type": "string", - "enum": ["compaction"] + "enum": [ + "compaction" + ] }, "id": { "type": "string", @@ -13772,22 +14524,36 @@ "type": "number" } }, - "required": ["created"], + "required": [ + "created" + ], "additionalProperties": false }, "status": { "type": "string", - "enum": ["failed"] + "enum": [ + "failed" + ] }, "reason": { "type": "string", - "enum": ["auto", "manual"] + "enum": [ + "auto", + "manual" + ] }, "error": { "$ref": "#/components/schemas/Session.StructuredError" } }, - "required": ["type", "id", "time", "status", "reason", "error"], + "required": [ + "type", + "id", + "time", + "status", + "reason", + "error" + ], "additionalProperties": false }, "Session.Message.Compaction": { @@ -13842,7 +14608,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["ConflictError"] + "enum": [ + "ConflictError" + ] }, "message": { "type": "string" @@ -13858,7 +14626,10 @@ ] } }, - "required": ["_tag", "message"], + "required": [ + "_tag", + "message" + ], "additionalProperties": false }, "SessionTransfer.Data": { @@ -13874,7 +14645,10 @@ } } }, - "required": ["info", "messages"], + "required": [ + "info", + "messages" + ], "additionalProperties": false }, "SessionNotFoundError": { @@ -13882,7 +14656,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["SessionNotFoundError"] + "enum": [ + "SessionNotFoundError" + ] }, "sessionID": { "type": "string" @@ -13891,7 +14667,11 @@ "type": "string" } }, - "required": ["_tag", "sessionID", "message"], + "required": [ + "_tag", + "sessionID", + "message" + ], "additionalProperties": false }, "UnknownError": { @@ -13899,7 +14679,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["UnknownError"] + "enum": [ + "UnknownError" + ] }, "message": { "type": "string" @@ -13915,7 +14697,10 @@ ] } }, - "required": ["_tag", "message"], + "required": [ + "_tag", + "message" + ], "additionalProperties": false }, "SessionActive": { @@ -13923,10 +14708,14 @@ "properties": { "type": { "type": "string", - "enum": ["running"] + "enum": [ + "running" + ] } }, - "required": ["type"], + "required": [ + "type" + ], "additionalProperties": false }, "Session.ForkRequestBoundary": { @@ -13936,7 +14725,9 @@ "properties": { "type": { "type": "string", - "enum": ["before"] + "enum": [ + "before" + ] }, "messageID": { "type": "string", @@ -13947,7 +14738,10 @@ ] } }, - "required": ["type", "messageID"], + "required": [ + "type", + "messageID" + ], "additionalProperties": false }, { @@ -13955,10 +14749,14 @@ "properties": { "type": { "type": "string", - "enum": ["through"] + "enum": [ + "through" + ] } }, - "required": ["type"], + "required": [ + "type" + ], "additionalProperties": false } ] @@ -13968,7 +14766,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["MessageNotFoundError"] + "enum": [ + "MessageNotFoundError" + ] }, "sessionID": { "type": "string" @@ -13980,12 +14780,20 @@ "type": "string" } }, - "required": ["_tag", "sessionID", "messageID", "message"], + "required": [ + "_tag", + "sessionID", + "messageID", + "message" + ], "additionalProperties": false }, "Session.Inbox.Delivery": { "type": "string", - "enum": ["steer", "queue"] + "enum": [ + "steer", + "queue" + ] }, "PromptInput.FileAttachment": { "type": "object", @@ -14003,7 +14811,9 @@ "$ref": "#/components/schemas/Prompt.Mention" } }, - "required": ["uri"], + "required": [ + "uri" + ], "additionalProperties": false }, "PromptInput.SkillAttachment": { @@ -14016,7 +14826,9 @@ "$ref": "#/components/schemas/Prompt.Mention" } }, - "required": ["id"], + "required": [ + "id" + ], "additionalProperties": false }, "Session.Inbox.UserPayload": { @@ -14047,7 +14859,9 @@ "type": "object" } }, - "required": ["text"], + "required": [ + "text" + ], "additionalProperties": false }, "Session.Inbox.User": { @@ -14074,7 +14888,9 @@ }, "type": { "type": "string", - "enum": ["user"] + "enum": [ + "user" + ] }, "payload": { "$ref": "#/components/schemas/Session.Inbox.UserPayload" @@ -14083,7 +14899,14 @@ "$ref": "#/components/schemas/Session.Inbox.Delivery" } }, - "required": ["id", "sessionID", "timeCreated", "type", "payload", "delivery"], + "required": [ + "id", + "sessionID", + "timeCreated", + "type", + "payload", + "delivery" + ], "additionalProperties": false }, "CommandNotFoundError": { @@ -14091,7 +14914,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["CommandNotFoundError"] + "enum": [ + "CommandNotFoundError" + ] }, "command": { "type": "string" @@ -14100,7 +14925,11 @@ "type": "string" } }, - "required": ["_tag", "command", "message"], + "required": [ + "_tag", + "command", + "message" + ], "additionalProperties": false }, "CommandEvaluationError": { @@ -14108,7 +14937,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["CommandEvaluationError"] + "enum": [ + "CommandEvaluationError" + ] }, "command": { "type": "string" @@ -14117,7 +14948,11 @@ "type": "string" } }, - "required": ["_tag", "command", "message"], + "required": [ + "_tag", + "command", + "message" + ], "additionalProperties": false }, "SkillNotFoundError": { @@ -14125,7 +14960,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["SkillNotFoundError"] + "enum": [ + "SkillNotFoundError" + ] }, "skill": { "type": "string" @@ -14134,7 +14971,11 @@ "type": "string" } }, - "required": ["_tag", "skill", "message"], + "required": [ + "_tag", + "skill", + "message" + ], "additionalProperties": false }, "Session.Inbox.SyntheticPayload": { @@ -14150,7 +14991,9 @@ "type": "object" } }, - "required": ["text"], + "required": [ + "text" + ], "additionalProperties": false }, "Session.Inbox.Synthetic": { @@ -14177,7 +15020,9 @@ }, "type": { "type": "string", - "enum": ["synthetic"] + "enum": [ + "synthetic" + ] }, "payload": { "$ref": "#/components/schemas/Session.Inbox.SyntheticPayload" @@ -14186,7 +15031,14 @@ "$ref": "#/components/schemas/Session.Inbox.Delivery" } }, - "required": ["id", "sessionID", "timeCreated", "type", "payload", "delivery"], + "required": [ + "id", + "sessionID", + "timeCreated", + "type", + "payload", + "delivery" + ], "additionalProperties": false }, "Session.Inbox.CompactionPayload": { @@ -14223,7 +15075,9 @@ }, "type": { "type": "string", - "enum": ["compaction"] + "enum": [ + "compaction" + ] }, "payload": { "$ref": "#/components/schemas/Session.Inbox.CompactionPayload" @@ -14232,7 +15086,14 @@ "$ref": "#/components/schemas/Session.Inbox.Delivery" } }, - "required": ["id", "sessionID", "timeCreated", "type", "payload", "delivery"], + "required": [ + "id", + "sessionID", + "timeCreated", + "type", + "payload", + "delivery" + ], "additionalProperties": false }, "ServiceUnavailableError": { @@ -14240,7 +15101,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["ServiceUnavailableError"] + "enum": [ + "ServiceUnavailableError" + ] }, "message": { "type": "string" @@ -14256,7 +15119,10 @@ ] } }, - "required": ["_tag", "message"], + "required": [ + "_tag", + "message" + ], "additionalProperties": false }, "SessionBusyError": { @@ -14264,7 +15130,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["SessionBusyError"] + "enum": [ + "SessionBusyError" + ] }, "sessionID": { "type": "string" @@ -14273,7 +15141,11 @@ "type": "string" } }, - "required": ["_tag", "sessionID", "message"], + "required": [ + "_tag", + "sessionID", + "message" + ], "additionalProperties": false }, "Session.Inbox.MovePayload": { @@ -14289,7 +15161,10 @@ "type": "string" } }, - "required": ["location", "projectID"], + "required": [ + "location", + "projectID" + ], "additionalProperties": false }, "Session.Inbox.Move": { @@ -14316,7 +15191,9 @@ }, "type": { "type": "string", - "enum": ["move"] + "enum": [ + "move" + ] }, "payload": { "$ref": "#/components/schemas/Session.Inbox.MovePayload" @@ -14325,7 +15202,14 @@ "$ref": "#/components/schemas/Session.Inbox.Delivery" } }, - "required": ["id", "sessionID", "timeCreated", "type", "payload", "delivery"], + "required": [ + "id", + "sessionID", + "timeCreated", + "type", + "payload", + "delivery" + ], "additionalProperties": false }, "Session.Inbox.Info": { @@ -14361,7 +15245,10 @@ }, "value": {} }, - "required": ["key", "value"], + "required": [ + "key", + "value" + ], "additionalProperties": false }, "InstructionEntryValueTooLargeError": { @@ -14369,7 +15256,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["InstructionEntryValueTooLargeError"] + "enum": [ + "InstructionEntryValueTooLargeError" + ] }, "actualBytes": { "type": "integer" @@ -14381,7 +15270,12 @@ "type": "string" } }, - "required": ["_tag", "actualBytes", "maxBytes", "message"], + "required": [ + "_tag", + "actualBytes", + "maxBytes", + "message" + ], "additionalProperties": false }, "SessionGenerateResponse": { @@ -14394,11 +15288,15 @@ "type": "string" } }, - "required": ["text"], + "required": [ + "text" + ], "additionalProperties": false } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false }, "session.created": { @@ -14420,7 +15318,9 @@ }, "type": { "type": "string", - "enum": ["session.created"] + "enum": [ + "session.created" + ] }, "durable": { "type": "object", @@ -14438,10 +15338,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -14491,11 +15397,23 @@ "type": "string" } }, - "required": ["sessionID", "projectID", "location", "slug", "version"], + "required": [ + "sessionID", + "projectID", + "location", + "slug", + "version" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "session.agent.selected": { @@ -14517,7 +15435,9 @@ }, "type": { "type": "string", - "enum": ["session.agent.selected"] + "enum": [ + "session.agent.selected" + ] }, "durable": { "type": "object", @@ -14535,10 +15455,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -14562,11 +15488,20 @@ "type": "string" } }, - "required": ["sessionID", "agent"], + "required": [ + "sessionID", + "agent" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "session.model.selected": { @@ -14588,7 +15523,9 @@ }, "type": { "type": "string", - "enum": ["session.model.selected"] + "enum": [ + "session.model.selected" + ] }, "durable": { "type": "object", @@ -14606,10 +15543,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -14633,11 +15576,20 @@ "$ref": "#/components/schemas/Model.Ref" } }, - "required": ["sessionID", "model"], + "required": [ + "sessionID", + "model" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "session.moved": { @@ -14659,7 +15611,9 @@ }, "type": { "type": "string", - "enum": ["session.moved"] + "enum": [ + "session.moved" + ] }, "durable": { "type": "object", @@ -14677,10 +15631,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -14707,11 +15667,21 @@ "type": "string" } }, - "required": ["sessionID", "location", "projectID"], + "required": [ + "sessionID", + "location", + "projectID" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "session.renamed": { @@ -14733,7 +15703,9 @@ }, "type": { "type": "string", - "enum": ["session.renamed"] + "enum": [ + "session.renamed" + ] }, "durable": { "type": "object", @@ -14751,10 +15723,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -14775,11 +15753,20 @@ "type": "string" } }, - "required": ["sessionID", "title"], + "required": [ + "sessionID", + "title" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "session.deleted": { @@ -14801,7 +15788,9 @@ }, "type": { "type": "string", - "enum": ["session.deleted"] + "enum": [ + "session.deleted" + ] }, "durable": { "type": "object", @@ -14819,10 +15808,16 @@ }, "version": { "type": "number", - "enum": [2] + "enum": [ + 2 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -14840,11 +15835,19 @@ ] } }, - "required": ["sessionID"], + "required": [ + "sessionID" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "session.forked": { @@ -14866,7 +15869,9 @@ }, "type": { "type": "string", - "enum": ["session.forked"] + "enum": [ + "session.forked" + ] }, "durable": { "type": "object", @@ -14884,10 +15889,16 @@ }, "version": { "type": "number", - "enum": [2] + "enum": [ + 2 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -14929,11 +15940,21 @@ } } }, - "required": ["sessionID", "parentID", "boundary"], + "required": [ + "sessionID", + "parentID", + "boundary" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "session.inbox.delivered": { @@ -14955,7 +15976,9 @@ }, "type": { "type": "string", - "enum": ["session.inbox.delivered"] + "enum": [ + "session.inbox.delivered" + ] }, "durable": { "type": "object", @@ -14973,10 +15996,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -15002,11 +16031,20 @@ ] } }, - "required": ["sessionID", "inboxID"], + "required": [ + "sessionID", + "inboxID" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "Session.Inbox.UserPayload1": { @@ -15037,7 +16075,9 @@ "type": "object" } }, - "required": ["text"], + "required": [ + "text" + ], "additionalProperties": false }, "Session.Inbox.SyntheticPayload1": { @@ -15053,7 +16093,9 @@ "type": "object" } }, - "required": ["text"], + "required": [ + "text" + ], "additionalProperties": false }, "Session.Inbox.Item": { @@ -15063,7 +16105,9 @@ "properties": { "type": { "type": "string", - "enum": ["user"] + "enum": [ + "user" + ] }, "payload": { "$ref": "#/components/schemas/Session.Inbox.UserPayload1" @@ -15072,7 +16116,11 @@ "$ref": "#/components/schemas/Session.Inbox.Delivery" } }, - "required": ["type", "payload", "delivery"], + "required": [ + "type", + "payload", + "delivery" + ], "additionalProperties": false }, { @@ -15080,7 +16128,9 @@ "properties": { "type": { "type": "string", - "enum": ["synthetic"] + "enum": [ + "synthetic" + ] }, "payload": { "$ref": "#/components/schemas/Session.Inbox.SyntheticPayload1" @@ -15089,7 +16139,11 @@ "$ref": "#/components/schemas/Session.Inbox.Delivery" } }, - "required": ["type", "payload", "delivery"], + "required": [ + "type", + "payload", + "delivery" + ], "additionalProperties": false }, { @@ -15097,7 +16151,9 @@ "properties": { "type": { "type": "string", - "enum": ["compaction"] + "enum": [ + "compaction" + ] }, "payload": { "$ref": "#/components/schemas/Session.Inbox.CompactionPayload" @@ -15106,7 +16162,11 @@ "$ref": "#/components/schemas/Session.Inbox.Delivery" } }, - "required": ["type", "payload", "delivery"], + "required": [ + "type", + "payload", + "delivery" + ], "additionalProperties": false }, { @@ -15114,7 +16174,9 @@ "properties": { "type": { "type": "string", - "enum": ["move"] + "enum": [ + "move" + ] }, "payload": { "$ref": "#/components/schemas/Session.Inbox.MovePayload" @@ -15123,7 +16185,11 @@ "$ref": "#/components/schemas/Session.Inbox.Delivery" } }, - "required": ["type", "payload", "delivery"], + "required": [ + "type", + "payload", + "delivery" + ], "additionalProperties": false } ] @@ -15147,7 +16213,9 @@ }, "type": { "type": "string", - "enum": ["session.inbox.enqueued"] + "enum": [ + "session.inbox.enqueued" + ] }, "durable": { "type": "object", @@ -15165,10 +16233,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -15197,11 +16271,21 @@ "$ref": "#/components/schemas/Session.Inbox.Item" } }, - "required": ["sessionID", "inboxID", "item"], + "required": [ + "sessionID", + "inboxID", + "item" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "session.inbox.cancelled": { @@ -15223,7 +16307,9 @@ }, "type": { "type": "string", - "enum": ["session.inbox.cancelled"] + "enum": [ + "session.inbox.cancelled" + ] }, "durable": { "type": "object", @@ -15241,10 +16327,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -15270,11 +16362,20 @@ ] } }, - "required": ["sessionID", "inboxID"], + "required": [ + "sessionID", + "inboxID" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "session.inbox.delivery.changed": { @@ -15296,7 +16397,9 @@ }, "type": { "type": "string", - "enum": ["session.inbox.delivery.changed"] + "enum": [ + "session.inbox.delivery.changed" + ] }, "durable": { "type": "object", @@ -15314,10 +16417,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -15346,11 +16455,21 @@ "$ref": "#/components/schemas/Session.Inbox.Delivery" } }, - "required": ["sessionID", "inboxID", "delivery"], + "required": [ + "sessionID", + "inboxID", + "delivery" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "session.execution.started": { @@ -15372,7 +16491,9 @@ }, "type": { "type": "string", - "enum": ["session.execution.started"] + "enum": [ + "session.execution.started" + ] }, "durable": { "type": "object", @@ -15390,10 +16511,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -15411,11 +16538,19 @@ ] } }, - "required": ["sessionID"], + "required": [ + "sessionID" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "session.execution.succeeded": { @@ -15437,7 +16572,9 @@ }, "type": { "type": "string", - "enum": ["session.execution.succeeded"] + "enum": [ + "session.execution.succeeded" + ] }, "durable": { "type": "object", @@ -15455,10 +16592,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -15476,11 +16619,19 @@ ] } }, - "required": ["sessionID"], + "required": [ + "sessionID" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "session.execution.failed": { @@ -15502,7 +16653,9 @@ }, "type": { "type": "string", - "enum": ["session.execution.failed"] + "enum": [ + "session.execution.failed" + ] }, "durable": { "type": "object", @@ -15520,10 +16673,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -15544,11 +16703,20 @@ "$ref": "#/components/schemas/Session.StructuredError" } }, - "required": ["sessionID", "error"], + "required": [ + "sessionID", + "error" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "session.execution.interrupted": { @@ -15570,7 +16738,9 @@ }, "type": { "type": "string", - "enum": ["session.execution.interrupted"] + "enum": [ + "session.execution.interrupted" + ] }, "durable": { "type": "object", @@ -15588,10 +16758,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -15610,14 +16786,27 @@ }, "reason": { "type": "string", - "enum": ["user", "shutdown", "superseded"] + "enum": [ + "user", + "shutdown", + "superseded" + ] } }, - "required": ["sessionID", "reason"], + "required": [ + "sessionID", + "reason" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "session.instructions.updated": { @@ -15639,7 +16828,9 @@ }, "type": { "type": "string", - "enum": ["session.instructions.updated"] + "enum": [ + "session.instructions.updated" + ] }, "durable": { "type": "object", @@ -15657,10 +16848,16 @@ }, "version": { "type": "number", - "enum": [2] + "enum": [ + 2 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -15691,7 +16888,9 @@ }, { "type": "string", - "enum": ["removed"] + "enum": [ + "removed" + ] } ] } @@ -15700,11 +16899,20 @@ "type": "string" } }, - "required": ["sessionID", "delta"], + "required": [ + "sessionID", + "delta" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "session.synthetic": { @@ -15726,7 +16934,9 @@ }, "type": { "type": "string", - "enum": ["session.synthetic"] + "enum": [ + "session.synthetic" + ] }, "durable": { "type": "object", @@ -15744,10 +16954,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -15774,11 +16990,20 @@ "type": "object" } }, - "required": ["sessionID", "text"], + "required": [ + "sessionID", + "text" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "session.skill.activated": { @@ -15800,7 +17025,9 @@ }, "type": { "type": "string", - "enum": ["session.skill.activated"] + "enum": [ + "session.skill.activated" + ] }, "durable": { "type": "object", @@ -15818,10 +17045,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -15848,11 +17081,22 @@ "type": "string" } }, - "required": ["sessionID", "id", "name", "text"], + "required": [ + "sessionID", + "id", + "name", + "text" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "Shell.Info": { @@ -15868,7 +17112,12 @@ }, "status": { "type": "string", - "enum": ["running", "exited", "timeout", "killed"] + "enum": [ + "running", + "exited", + "timeout", + "killed" + ] }, "command": { "type": "string" @@ -15906,11 +17155,22 @@ "type": "number" } }, - "required": ["started"], + "required": [ + "started" + ], "additionalProperties": false } }, - "required": ["id", "status", "command", "cwd", "shell", "file", "metadata", "time"], + "required": [ + "id", + "status", + "command", + "cwd", + "shell", + "file", + "metadata", + "time" + ], "additionalProperties": false }, "session.shell.started": { @@ -15932,7 +17192,9 @@ }, "type": { "type": "string", - "enum": ["session.shell.started"] + "enum": [ + "session.shell.started" + ] }, "durable": { "type": "object", @@ -15950,10 +17212,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -15974,11 +17242,20 @@ "$ref": "#/components/schemas/Shell.Info" } }, - "required": ["sessionID", "shell"], + "required": [ + "sessionID", + "shell" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "session.shell.ended": { @@ -16000,7 +17277,9 @@ }, "type": { "type": "string", - "enum": ["session.shell.ended"] + "enum": [ + "session.shell.ended" + ] }, "durable": { "type": "object", @@ -16018,10 +17297,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -16067,15 +17352,30 @@ "type": "boolean" } }, - "required": ["output", "cursor", "size", "truncated"], + "required": [ + "output", + "cursor", + "size", + "truncated" + ], "additionalProperties": false } }, - "required": ["sessionID", "shell", "output"], + "required": [ + "sessionID", + "shell", + "output" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "session.step.started": { @@ -16097,7 +17397,9 @@ }, "type": { "type": "string", - "enum": ["session.step.started"] + "enum": [ + "session.step.started" + ] }, "durable": { "type": "object", @@ -16115,10 +17417,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -16153,11 +17461,22 @@ "type": "string" } }, - "required": ["sessionID", "assistantMessageID", "agent", "model"], + "required": [ + "sessionID", + "assistantMessageID", + "agent", + "model" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "session.step.ended": { @@ -16179,7 +17498,9 @@ }, "type": { "type": "string", - "enum": ["session.step.ended"] + "enum": [ + "session.step.ended" + ] }, "durable": { "type": "object", @@ -16197,10 +17518,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -16227,7 +17554,14 @@ }, "finish": { "type": "string", - "enum": ["stop", "length", "tool-calls", "content-filter", "error", "unknown"] + "enum": [ + "stop", + "length", + "tool-calls", + "content-filter", + "error", + "unknown" + ] }, "cost": { "$ref": "#/components/schemas/Money.USD" @@ -16245,11 +17579,23 @@ } } }, - "required": ["sessionID", "assistantMessageID", "finish", "cost", "tokens"], + "required": [ + "sessionID", + "assistantMessageID", + "finish", + "cost", + "tokens" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "session.step.failed": { @@ -16271,7 +17617,9 @@ }, "type": { "type": "string", - "enum": ["session.step.failed"] + "enum": [ + "session.step.failed" + ] }, "durable": { "type": "object", @@ -16289,10 +17637,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -16336,11 +17690,21 @@ } } }, - "required": ["sessionID", "assistantMessageID", "error"], + "required": [ + "sessionID", + "assistantMessageID", + "error" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "session.text.started": { @@ -16362,7 +17726,9 @@ }, "type": { "type": "string", - "enum": ["session.text.started"] + "enum": [ + "session.text.started" + ] }, "durable": { "type": "object", @@ -16380,10 +17746,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -16417,11 +17789,21 @@ ] } }, - "required": ["sessionID", "assistantMessageID", "ordinal"], + "required": [ + "sessionID", + "assistantMessageID", + "ordinal" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "Session.Message.ProviderState4": { @@ -16446,7 +17828,9 @@ }, "type": { "type": "string", - "enum": ["session.text.ended"] + "enum": [ + "session.text.ended" + ] }, "durable": { "type": "object", @@ -16464,10 +17848,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -16507,11 +17897,22 @@ "$ref": "#/components/schemas/Session.Message.ProviderState4" } }, - "required": ["sessionID", "assistantMessageID", "ordinal", "text"], + "required": [ + "sessionID", + "assistantMessageID", + "ordinal", + "text" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "Session.Message.ProviderState5": { @@ -16536,7 +17937,9 @@ }, "type": { "type": "string", - "enum": ["session.reasoning.started"] + "enum": [ + "session.reasoning.started" + ] }, "durable": { "type": "object", @@ -16554,10 +17957,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -16594,11 +18003,21 @@ "$ref": "#/components/schemas/Session.Message.ProviderState5" } }, - "required": ["sessionID", "assistantMessageID", "ordinal"], + "required": [ + "sessionID", + "assistantMessageID", + "ordinal" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "Session.Message.ProviderState6": { @@ -16623,7 +18042,9 @@ }, "type": { "type": "string", - "enum": ["session.reasoning.ended"] + "enum": [ + "session.reasoning.ended" + ] }, "durable": { "type": "object", @@ -16641,10 +18062,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -16684,11 +18111,22 @@ "$ref": "#/components/schemas/Session.Message.ProviderState6" } }, - "required": ["sessionID", "assistantMessageID", "ordinal", "text"], + "required": [ + "sessionID", + "assistantMessageID", + "ordinal", + "text" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "session.tool.input.started": { @@ -16710,7 +18148,9 @@ }, "type": { "type": "string", - "enum": ["session.tool.input.started"] + "enum": [ + "session.tool.input.started" + ] }, "durable": { "type": "object", @@ -16728,10 +18168,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -16763,11 +18209,22 @@ "type": "string" } }, - "required": ["sessionID", "assistantMessageID", "id", "name"], + "required": [ + "sessionID", + "assistantMessageID", + "id", + "name" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "session.tool.input.ended": { @@ -16789,7 +18246,9 @@ }, "type": { "type": "string", - "enum": ["session.tool.input.ended"] + "enum": [ + "session.tool.input.ended" + ] }, "durable": { "type": "object", @@ -16807,10 +18266,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -16842,11 +18307,22 @@ "type": "string" } }, - "required": ["sessionID", "assistantMessageID", "id", "text"], + "required": [ + "sessionID", + "assistantMessageID", + "id", + "text" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "Session.Message.ProviderState7": { @@ -16871,7 +18347,9 @@ }, "type": { "type": "string", - "enum": ["session.tool.called"] + "enum": [ + "session.tool.called" + ] }, "durable": { "type": "object", @@ -16889,10 +18367,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -16930,11 +18414,23 @@ "$ref": "#/components/schemas/Session.Message.ProviderState7" } }, - "required": ["sessionID", "assistantMessageID", "id", "input", "executed"], + "required": [ + "sessionID", + "assistantMessageID", + "id", + "input", + "executed" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "Tool.FileContent1": { @@ -16942,7 +18438,9 @@ "properties": { "type": { "type": "string", - "enum": ["file"] + "enum": [ + "file" + ] }, "uri": { "type": "string" @@ -16961,7 +18459,11 @@ ] } }, - "required": ["type", "uri", "mime"], + "required": [ + "type", + "uri", + "mime" + ], "additionalProperties": false }, "Tool.Content1": { @@ -16996,7 +18498,9 @@ }, "type": { "type": "string", - "enum": ["session.tool.success"] + "enum": [ + "session.tool.success" + ] }, "durable": { "type": "object", @@ -17014,10 +18518,16 @@ }, "version": { "type": "number", - "enum": [2] + "enum": [ + 2 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -17067,11 +18577,23 @@ "$ref": "#/components/schemas/Session.Message.ProviderState8" } }, - "required": ["sessionID", "assistantMessageID", "id", "content", "executed"], + "required": [ + "sessionID", + "assistantMessageID", + "id", + "content", + "executed" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "Session.Message.ProviderState9": { @@ -17096,7 +18618,9 @@ }, "type": { "type": "string", - "enum": ["session.tool.failed"] + "enum": [ + "session.tool.failed" + ] }, "durable": { "type": "object", @@ -17114,10 +18638,16 @@ }, "version": { "type": "number", - "enum": [2] + "enum": [ + 2 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -17170,11 +18700,23 @@ "$ref": "#/components/schemas/Session.Message.ProviderState9" } }, - "required": ["sessionID", "assistantMessageID", "id", "error", "executed"], + "required": [ + "sessionID", + "assistantMessageID", + "id", + "error", + "executed" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "session.retry.scheduled": { @@ -17196,7 +18738,9 @@ }, "type": { "type": "string", - "enum": ["session.retry.scheduled"] + "enum": [ + "session.retry.scheduled" + ] }, "durable": { "type": "object", @@ -17214,10 +18758,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -17262,11 +18812,23 @@ "$ref": "#/components/schemas/Session.StructuredError" } }, - "required": ["sessionID", "assistantMessageID", "attempt", "at", "error"], + "required": [ + "sessionID", + "assistantMessageID", + "attempt", + "at", + "error" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "session.compaction.started": { @@ -17288,7 +18850,9 @@ }, "type": { "type": "string", - "enum": ["session.compaction.started"] + "enum": [ + "session.compaction.started" + ] }, "durable": { "type": "object", @@ -17306,10 +18870,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -17328,7 +18898,10 @@ }, "reason": { "type": "string", - "enum": ["auto", "manual"] + "enum": [ + "auto", + "manual" + ] }, "recent": { "type": "string" @@ -17342,11 +18915,21 @@ ] } }, - "required": ["sessionID", "reason", "recent"], + "required": [ + "sessionID", + "reason", + "recent" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "session.compaction.ended": { @@ -17368,7 +18951,9 @@ }, "type": { "type": "string", - "enum": ["session.compaction.ended"] + "enum": [ + "session.compaction.ended" + ] }, "durable": { "type": "object", @@ -17386,10 +18971,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -17408,7 +18999,10 @@ }, "reason": { "type": "string", - "enum": ["auto", "manual"] + "enum": [ + "auto", + "manual" + ] }, "text": { "type": "string" @@ -17417,11 +19011,22 @@ "type": "string" } }, - "required": ["sessionID", "reason", "text", "recent"], + "required": [ + "sessionID", + "reason", + "text", + "recent" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "session.compaction.failed": { @@ -17443,7 +19048,9 @@ }, "type": { "type": "string", - "enum": ["session.compaction.failed"] + "enum": [ + "session.compaction.failed" + ] }, "durable": { "type": "object", @@ -17461,10 +19068,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -17483,7 +19096,10 @@ }, "reason": { "type": "string", - "enum": ["auto", "manual"] + "enum": [ + "auto", + "manual" + ] }, "error": { "$ref": "#/components/schemas/Session.StructuredError" @@ -17497,11 +19113,21 @@ ] } }, - "required": ["sessionID", "reason", "error"], + "required": [ + "sessionID", + "reason", + "error" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "session.revert.staged": { @@ -17523,7 +19149,9 @@ }, "type": { "type": "string", - "enum": ["session.revert.staged"] + "enum": [ + "session.revert.staged" + ] }, "durable": { "type": "object", @@ -17541,10 +19169,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -17565,11 +19199,20 @@ "$ref": "#/components/schemas/Session.Revert" } }, - "required": ["sessionID", "revert"], + "required": [ + "sessionID", + "revert" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "session.revert.cleared": { @@ -17591,7 +19234,9 @@ }, "type": { "type": "string", - "enum": ["session.revert.cleared"] + "enum": [ + "session.revert.cleared" + ] }, "durable": { "type": "object", @@ -17609,10 +19254,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -17630,11 +19281,19 @@ ] } }, - "required": ["sessionID"], + "required": [ + "sessionID" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "session.revert.committed": { @@ -17656,7 +19315,9 @@ }, "type": { "type": "string", - "enum": ["session.revert.committed"] + "enum": [ + "session.revert.committed" + ] }, "durable": { "type": "object", @@ -17674,10 +19335,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -17703,11 +19370,20 @@ ] } }, - "required": ["sessionID", "to"], + "required": [ + "sessionID", + "to" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "session.usage.recorded": { @@ -17729,7 +19405,9 @@ }, "type": { "type": "string", - "enum": ["session.usage.recorded"] + "enum": [ + "session.usage.recorded" + ] }, "durable": { "type": "object", @@ -17747,10 +19425,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -17769,7 +19453,10 @@ }, "source": { "type": "string", - "enum": ["title", "compaction"] + "enum": [ + "title", + "compaction" + ] }, "cost": { "$ref": "#/components/schemas/Money.USD" @@ -17778,11 +19465,22 @@ "$ref": "#/components/schemas/TokenUsage.Info" } }, - "required": ["sessionID", "source", "cost", "tokens"], + "required": [ + "sessionID", + "source", + "cost", + "tokens" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "Session.Event.Durable": { @@ -17914,7 +19612,9 @@ "properties": { "type": { "type": "string", - "enum": ["log.synced"] + "enum": [ + "log.synced" + ] }, "aggregateID": { "type": "string" @@ -17928,7 +19628,10 @@ ] } }, - "required": ["type", "aggregateID"], + "required": [ + "type", + "aggregateID" + ], "additionalProperties": false, "description": "Marker emitted once when a log read reaches its captured watermark. The reader holds every event committed at or below seq." }, @@ -17985,14 +19688,21 @@ "additionalProperties": false } }, - "required": ["data", "cursor"], + "required": [ + "data", + "cursor" + ], "additionalProperties": false }, "Model.ReasoningField": { "anyOf": [ { "type": "string", - "enum": ["reasoning", "reasoning_content", "reasoning_text"] + "enum": [ + "reasoning", + "reasoning_content", + "reasoning_text" + ] }, { "type": "string" @@ -18001,7 +19711,10 @@ }, "Model.MaxTokensField": { "type": "string", - "enum": ["max_completion_tokens", "max_tokens"] + "enum": [ + "max_completion_tokens", + "max_tokens" + ] }, "Model.Compatibility": { "type": "object", @@ -18037,7 +19750,11 @@ } } }, - "required": ["tools", "input", "output"], + "required": [ + "tools", + "input", + "output" + ], "additionalProperties": false }, "Model.Variant": { @@ -18059,7 +19776,9 @@ "type": "object" } }, - "required": ["id"], + "required": [ + "id" + ], "additionalProperties": false }, "Money.USDPerMillionTokens": { @@ -18073,13 +19792,18 @@ "properties": { "type": { "type": "string", - "enum": ["context"] + "enum": [ + "context" + ] }, "size": { "type": "integer" } }, - "required": ["type", "size"], + "required": [ + "type", + "size" + ], "additionalProperties": false }, "input": { @@ -18098,11 +19822,18 @@ "$ref": "#/components/schemas/Money.USDPerMillionTokens" } }, - "required": ["read", "write"], + "required": [ + "read", + "write" + ], "additionalProperties": false } }, - "required": ["input", "output", "cache"], + "required": [ + "input", + "output", + "cache" + ], "additionalProperties": false }, "Model.Info": { @@ -18157,7 +19888,9 @@ "type": "number" } }, - "required": ["released"], + "required": [ + "released" + ], "additionalProperties": false }, "cost": { @@ -18168,7 +19901,12 @@ }, "status": { "type": "string", - "enum": ["alpha", "beta", "deprecated", "active"] + "enum": [ + "alpha", + "beta", + "deprecated", + "active" + ] }, "enabled": { "type": "boolean" @@ -18186,7 +19924,10 @@ "type": "integer" } }, - "required": ["context", "output"], + "required": [ + "context", + "output" + ], "additionalProperties": false } }, @@ -18215,11 +19956,15 @@ "type": "string" } }, - "required": ["text"], + "required": [ + "text" + ], "additionalProperties": false } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false }, "Provider.Info": { @@ -18253,7 +19998,11 @@ "type": "object" } }, - "required": ["id", "name", "package"], + "required": [ + "id", + "name", + "package" + ], "additionalProperties": false }, "ProviderNotFoundError": { @@ -18261,7 +20010,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["ProviderNotFoundError"] + "enum": [ + "ProviderNotFoundError" + ] }, "providerID": { "type": "string" @@ -18270,7 +20021,11 @@ "type": "string" } }, - "required": ["_tag", "providerID", "message"], + "required": [ + "_tag", + "providerID", + "message" + ], "additionalProperties": false }, "Form.When": { @@ -18281,7 +20036,10 @@ }, "op": { "type": "string", - "enum": ["eq", "neq"] + "enum": [ + "eq", + "neq" + ] }, "value": { "anyOf": [ @@ -18297,21 +20055,31 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] }, { "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] + "enum": [ + "Infinity", + "-Infinity", + "NaN" + ] } ] }, @@ -18321,7 +20089,11 @@ ] } }, - "required": ["key", "op", "value"], + "required": [ + "key", + "op", + "value" + ], "additionalProperties": false }, "Form.Option": { @@ -18337,7 +20109,10 @@ "type": "string" } }, - "required": ["value", "label"], + "required": [ + "value", + "label" + ], "additionalProperties": false }, "Form.StringField": { @@ -18363,11 +20138,18 @@ }, "type": { "type": "string", - "enum": ["string"] + "enum": [ + "string" + ] }, "format": { "type": "string", - "enum": ["email", "uri", "date", "date-time"] + "enum": [ + "email", + "uri", + "date", + "date-time" + ] }, "minLength": { "type": "integer", @@ -18404,7 +20186,10 @@ "type": "boolean" } }, - "required": ["key", "type"], + "required": [ + "key", + "type" + ], "additionalProperties": false }, "Form.NumberField": { @@ -18430,7 +20215,9 @@ }, "type": { "type": "string", - "enum": ["number"] + "enum": [ + "number" + ] }, "minimum": { "anyOf": [ @@ -18441,21 +20228,31 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] }, { "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] + "enum": [ + "Infinity", + "-Infinity", + "NaN" + ] } ] }, @@ -18468,21 +20265,31 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] }, { "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] + "enum": [ + "Infinity", + "-Infinity", + "NaN" + ] } ] }, @@ -18495,26 +20302,39 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] }, { "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] + "enum": [ + "Infinity", + "-Infinity", + "NaN" + ] } ] } }, - "required": ["key", "type"], + "required": [ + "key", + "type" + ], "additionalProperties": false }, "Form.IntegerField": { @@ -18540,7 +20360,9 @@ }, "type": { "type": "string", - "enum": ["integer"] + "enum": [ + "integer" + ] }, "minimum": { "anyOf": [ @@ -18551,21 +20373,31 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] }, { "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] + "enum": [ + "Infinity", + "-Infinity", + "NaN" + ] } ] }, @@ -18578,21 +20410,31 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] }, { "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] + "enum": [ + "Infinity", + "-Infinity", + "NaN" + ] } ] }, @@ -18605,26 +20447,39 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] }, { "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] + "enum": [ + "Infinity", + "-Infinity", + "NaN" + ] } ] } }, - "required": ["key", "type"], + "required": [ + "key", + "type" + ], "additionalProperties": false }, "Form.BooleanField": { @@ -18650,13 +20505,18 @@ }, "type": { "type": "string", - "enum": ["boolean"] + "enum": [ + "boolean" + ] }, "default": { "type": "boolean" } }, - "required": ["key", "type"], + "required": [ + "key", + "type" + ], "additionalProperties": false }, "Form.MultiselectField": { @@ -18682,7 +20542,9 @@ }, "type": { "type": "string", - "enum": ["multiselect"] + "enum": [ + "multiselect" + ] }, "options": { "type": "array", @@ -18716,7 +20578,11 @@ } } }, - "required": ["key", "type", "options"], + "required": [ + "key", + "type", + "options" + ], "additionalProperties": false }, "Form.ExternalField": { @@ -18727,7 +20593,9 @@ }, "type": { "type": "string", - "enum": ["external"] + "enum": [ + "external" + ] }, "url": { "type": "string" @@ -18739,7 +20607,11 @@ "type": "string" } }, - "required": ["key", "type", "url"], + "required": [ + "key", + "type", + "url" + ], "additionalProperties": false }, "Form.Field": { @@ -18784,7 +20656,9 @@ }, "type": { "type": "string", - "enum": ["oauth"] + "enum": [ + "oauth" + ] }, "label": { "type": "string" @@ -18793,7 +20667,11 @@ "$ref": "#/components/schemas/Form.Fields" } }, - "required": ["id", "type", "label"], + "required": [ + "id", + "type", + "label" + ], "additionalProperties": false }, "Integration.CommandMethod": { @@ -18804,7 +20682,9 @@ }, "type": { "type": "string", - "enum": ["command"] + "enum": [ + "command" + ] }, "label": { "type": "string" @@ -18816,7 +20696,12 @@ } } }, - "required": ["id", "type", "label", "command"], + "required": [ + "id", + "type", + "label", + "command" + ], "additionalProperties": false }, "Integration.KeyMethod": { @@ -18824,7 +20709,9 @@ "properties": { "type": { "type": "string", - "enum": ["key"] + "enum": [ + "key" + ] }, "label": { "type": "string" @@ -18833,7 +20720,9 @@ "$ref": "#/components/schemas/Form.Fields" } }, - "required": ["type"], + "required": [ + "type" + ], "additionalProperties": false }, "Integration.EnvMethod": { @@ -18841,7 +20730,9 @@ "properties": { "type": { "type": "string", - "enum": ["env"] + "enum": [ + "env" + ] }, "names": { "type": "array", @@ -18850,7 +20741,10 @@ } } }, - "required": ["type", "names"], + "required": [ + "type", + "names" + ], "additionalProperties": false }, "Integration.Method": { @@ -18874,7 +20768,9 @@ "properties": { "type": { "type": "string", - "enum": ["credential"] + "enum": [ + "credential" + ] }, "id": { "type": "string" @@ -18883,7 +20779,11 @@ "type": "string" } }, - "required": ["type", "id", "label"], + "required": [ + "type", + "id", + "label" + ], "additionalProperties": false }, "Connection.EnvInfo": { @@ -18891,13 +20791,18 @@ "properties": { "type": { "type": "string", - "enum": ["env"] + "enum": [ + "env" + ] }, "name": { "type": "string" } }, - "required": ["type", "name"], + "required": [ + "type", + "name" + ], "additionalProperties": false }, "Connection.Info": { @@ -18932,7 +20837,12 @@ } } }, - "required": ["id", "name", "methods", "connections"], + "required": [ + "id", + "name", + "methods", + "connections" + ], "additionalProperties": false }, "Form.Value": { @@ -18949,21 +20859,31 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] }, { "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] + "enum": [ + "Infinity", + "-Infinity", + "NaN" + ] } ] }, @@ -18998,7 +20918,10 @@ }, "mode": { "type": "string", - "enum": ["auto", "code"] + "enum": [ + "auto", + "code" + ] }, "time": { "type": "object", @@ -19012,21 +20935,31 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] }, { "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] + "enum": [ + "Infinity", + "-Infinity", + "NaN" + ] } ] }, @@ -19039,30 +20972,49 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] }, { "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] + "enum": [ + "Infinity", + "-Infinity", + "NaN" + ] } ] } }, - "required": ["created", "expires"], + "required": [ + "created", + "expires" + ], "additionalProperties": false } }, - "required": ["attemptID", "url", "instructions", "mode", "time"], + "required": [ + "attemptID", + "url", + "instructions", + "mode", + "time" + ], "additionalProperties": false }, "Integration.AttemptStatus": { @@ -19072,7 +21024,9 @@ "properties": { "status": { "type": "string", - "enum": ["pending"] + "enum": [ + "pending" + ] }, "time": { "type": "object", @@ -19086,21 +21040,31 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] }, { "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] + "enum": [ + "Infinity", + "-Infinity", + "NaN" + ] } ] }, @@ -19113,30 +21077,46 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] }, { "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] + "enum": [ + "Infinity", + "-Infinity", + "NaN" + ] } ] } }, - "required": ["created", "expires"], + "required": [ + "created", + "expires" + ], "additionalProperties": false } }, - "required": ["status", "time"], + "required": [ + "status", + "time" + ], "additionalProperties": false }, { @@ -19144,7 +21124,9 @@ "properties": { "status": { "type": "string", - "enum": ["complete"] + "enum": [ + "complete" + ] }, "time": { "type": "object", @@ -19158,21 +21140,31 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] }, { "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] + "enum": [ + "Infinity", + "-Infinity", + "NaN" + ] } ] }, @@ -19185,30 +21177,46 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] }, { "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] + "enum": [ + "Infinity", + "-Infinity", + "NaN" + ] } ] } }, - "required": ["created", "expires"], + "required": [ + "created", + "expires" + ], "additionalProperties": false } }, - "required": ["status", "time"], + "required": [ + "status", + "time" + ], "additionalProperties": false }, { @@ -19216,7 +21224,9 @@ "properties": { "status": { "type": "string", - "enum": ["failed"] + "enum": [ + "failed" + ] }, "message": { "type": "string" @@ -19233,21 +21243,31 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] }, { "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] + "enum": [ + "Infinity", + "-Infinity", + "NaN" + ] } ] }, @@ -19260,30 +21280,47 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] }, { "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] + "enum": [ + "Infinity", + "-Infinity", + "NaN" + ] } ] } }, - "required": ["created", "expires"], + "required": [ + "created", + "expires" + ], "additionalProperties": false } }, - "required": ["status", "message", "time"], + "required": [ + "status", + "message", + "time" + ], "additionalProperties": false }, { @@ -19291,7 +21328,9 @@ "properties": { "status": { "type": "string", - "enum": ["expired"] + "enum": [ + "expired" + ] }, "time": { "type": "object", @@ -19305,21 +21344,31 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] }, { "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] + "enum": [ + "Infinity", + "-Infinity", + "NaN" + ] } ] }, @@ -19332,30 +21381,46 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] }, { "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] + "enum": [ + "Infinity", + "-Infinity", + "NaN" + ] } ] } }, - "required": ["created", "expires"], + "required": [ + "created", + "expires" + ], "additionalProperties": false } }, - "required": ["status", "time"], + "required": [ + "status", + "time" + ], "additionalProperties": false } ] @@ -19378,21 +21443,31 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] }, { "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] + "enum": [ + "Infinity", + "-Infinity", + "NaN" + ] } ] }, @@ -19405,30 +21480,46 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] }, { "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] + "enum": [ + "Infinity", + "-Infinity", + "NaN" + ] } ] } }, - "required": ["created", "expires"], + "required": [ + "created", + "expires" + ], "additionalProperties": false } }, - "required": ["attemptID", "time"], + "required": [ + "attemptID", + "time" + ], "additionalProperties": false }, "Integration.CommandAttemptStatus": { @@ -19438,7 +21529,9 @@ "properties": { "status": { "type": "string", - "enum": ["pending"] + "enum": [ + "pending" + ] }, "message": { "type": "string" @@ -19455,21 +21548,31 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] }, { "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] + "enum": [ + "Infinity", + "-Infinity", + "NaN" + ] } ] }, @@ -19482,30 +21585,46 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] }, { "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] + "enum": [ + "Infinity", + "-Infinity", + "NaN" + ] } ] } }, - "required": ["created", "expires"], + "required": [ + "created", + "expires" + ], "additionalProperties": false } }, - "required": ["status", "time"], + "required": [ + "status", + "time" + ], "additionalProperties": false }, { @@ -19513,7 +21632,9 @@ "properties": { "status": { "type": "string", - "enum": ["complete"] + "enum": [ + "complete" + ] }, "time": { "type": "object", @@ -19527,21 +21648,31 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] }, { "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] + "enum": [ + "Infinity", + "-Infinity", + "NaN" + ] } ] }, @@ -19554,30 +21685,46 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] }, { "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] + "enum": [ + "Infinity", + "-Infinity", + "NaN" + ] } ] } }, - "required": ["created", "expires"], + "required": [ + "created", + "expires" + ], "additionalProperties": false } }, - "required": ["status", "time"], + "required": [ + "status", + "time" + ], "additionalProperties": false }, { @@ -19585,7 +21732,9 @@ "properties": { "status": { "type": "string", - "enum": ["failed"] + "enum": [ + "failed" + ] }, "message": { "type": "string" @@ -19602,21 +21751,31 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] }, { "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] + "enum": [ + "Infinity", + "-Infinity", + "NaN" + ] } ] }, @@ -19629,30 +21788,47 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] }, { "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] + "enum": [ + "Infinity", + "-Infinity", + "NaN" + ] } ] } }, - "required": ["created", "expires"], + "required": [ + "created", + "expires" + ], "additionalProperties": false } }, - "required": ["status", "message", "time"], + "required": [ + "status", + "message", + "time" + ], "additionalProperties": false }, { @@ -19660,7 +21836,9 @@ "properties": { "status": { "type": "string", - "enum": ["expired"] + "enum": [ + "expired" + ] }, "time": { "type": "object", @@ -19674,21 +21852,31 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] }, { "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] + "enum": [ + "Infinity", + "-Infinity", + "NaN" + ] } ] }, @@ -19701,30 +21889,46 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] }, { "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] + "enum": [ + "Infinity", + "-Infinity", + "NaN" + ] } ] } }, - "required": ["created", "expires"], + "required": [ + "created", + "expires" + ], "additionalProperties": false } }, - "required": ["status", "time"], + "required": [ + "status", + "time" + ], "additionalProperties": false } ] @@ -19734,10 +21938,14 @@ "properties": { "status": { "type": "string", - "enum": ["connected"] + "enum": [ + "connected" + ] } }, - "required": ["status"], + "required": [ + "status" + ], "additionalProperties": false }, "Mcp.Status.Pending": { @@ -19745,10 +21953,14 @@ "properties": { "status": { "type": "string", - "enum": ["pending"] + "enum": [ + "pending" + ] } }, - "required": ["status"], + "required": [ + "status" + ], "additionalProperties": false }, "Mcp.Status.Disabled": { @@ -19756,10 +21968,14 @@ "properties": { "status": { "type": "string", - "enum": ["disabled"] + "enum": [ + "disabled" + ] } }, - "required": ["status"], + "required": [ + "status" + ], "additionalProperties": false }, "Mcp.Status.Failed": { @@ -19767,13 +21983,18 @@ "properties": { "status": { "type": "string", - "enum": ["failed"] + "enum": [ + "failed" + ] }, "error": { "type": "string" } }, - "required": ["status", "error"], + "required": [ + "status", + "error" + ], "additionalProperties": false }, "Mcp.Status.NeedsAuth": { @@ -19781,10 +22002,14 @@ "properties": { "status": { "type": "string", - "enum": ["needs_auth"] + "enum": [ + "needs_auth" + ] } }, - "required": ["status"], + "required": [ + "status" + ], "additionalProperties": false }, "Mcp.Server": { @@ -19816,7 +22041,10 @@ "type": "string" } }, - "required": ["name", "status"], + "required": [ + "name", + "status" + ], "additionalProperties": false }, "Mcp.LocalConfig": { @@ -19824,7 +22052,9 @@ "properties": { "type": { "type": "string", - "enum": ["local"] + "enum": [ + "local" + ] }, "command": { "type": "array", @@ -19878,7 +22108,10 @@ "additionalProperties": false } }, - "required": ["type", "command"], + "required": [ + "type", + "command" + ], "additionalProperties": false }, "Mcp.OAuthConfig": { @@ -19913,7 +22146,9 @@ "properties": { "type": { "type": "string", - "enum": ["remote"] + "enum": [ + "remote" + ] }, "url": { "type": "string" @@ -19931,7 +22166,9 @@ }, { "type": "boolean", - "enum": [false] + "enum": [ + false + ] } ] }, @@ -19972,7 +22209,10 @@ "additionalProperties": false } }, - "required": ["type", "url"], + "required": [ + "type", + "url" + ], "additionalProperties": false }, "McpServerNotFoundError": { @@ -19980,7 +22220,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["McpServerNotFoundError"] + "enum": [ + "McpServerNotFoundError" + ] }, "server": { "type": "string" @@ -19989,7 +22231,11 @@ "type": "string" } }, - "required": ["_tag", "server", "message"], + "required": [ + "_tag", + "server", + "message" + ], "additionalProperties": false }, "Mcp.Resource": { @@ -20011,7 +22257,11 @@ "type": "string" } }, - "required": ["server", "name", "uri"], + "required": [ + "server", + "name", + "uri" + ], "additionalProperties": false }, "Mcp.ResourceTemplate": { @@ -20033,7 +22283,11 @@ "type": "string" } }, - "required": ["server", "name", "uriTemplate"], + "required": [ + "server", + "name", + "uriTemplate" + ], "additionalProperties": false }, "Mcp.ResourceCatalog": { @@ -20052,12 +22306,18 @@ } } }, - "required": ["resources", "templates"], + "required": [ + "resources", + "templates" + ], "additionalProperties": false }, "Project.Vcs": { "type": "string", - "enum": ["git", "hg"] + "enum": [ + "git", + "hg" + ] }, "Project.Icon": { "type": "object", @@ -20112,7 +22372,10 @@ ] } }, - "required": ["created", "updated"], + "required": [ + "created", + "updated" + ], "additionalProperties": false }, "Project": { @@ -20146,7 +22409,12 @@ } } }, - "required": ["id", "canonical", "time", "sandboxes"], + "required": [ + "id", + "canonical", + "time", + "sandboxes" + ], "additionalProperties": false }, "Project.Current": { @@ -20162,28 +22430,13 @@ "type": "string" } }, - "required": ["id", "directory", "canonical"], + "required": [ + "id", + "directory", + "canonical" + ], "additionalProperties": false }, - "Project.Directory": { - "type": "object", - "properties": { - "directory": { - "type": "string" - }, - "strategy": { - "type": "string" - } - }, - "required": ["directory"], - "additionalProperties": false - }, - "Project.Directories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Project.Directory" - } - }, "Form.Metadata": { "type": "object" }, @@ -20211,7 +22464,12 @@ "$ref": "#/components/schemas/Form.Fields" } }, - "required": ["id", "sessionID", "title", "fields"], + "required": [ + "id", + "sessionID", + "title", + "fields" + ], "additionalProperties": false }, "Form.CreatePayload": { @@ -20242,7 +22500,10 @@ "$ref": "#/components/schemas/Form.Fields" } }, - "required": ["title", "fields"], + "required": [ + "title", + "fields" + ], "additionalProperties": false }, "FormNotFoundError": { @@ -20250,7 +22511,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["FormNotFoundError"] + "enum": [ + "FormNotFoundError" + ] }, "id": { "type": "string" @@ -20259,7 +22522,11 @@ "type": "string" } }, - "required": ["_tag", "id", "message"], + "required": [ + "_tag", + "id", + "message" + ], "additionalProperties": false }, "Form.State": { @@ -20269,10 +22536,14 @@ "properties": { "status": { "type": "string", - "enum": ["pending"] + "enum": [ + "pending" + ] } }, - "required": ["status"], + "required": [ + "status" + ], "additionalProperties": false }, { @@ -20280,13 +22551,18 @@ "properties": { "status": { "type": "string", - "enum": ["answered"] + "enum": [ + "answered" + ] }, "answer": { "$ref": "#/components/schemas/Form.Answer" } }, - "required": ["status", "answer"], + "required": [ + "status", + "answer" + ], "additionalProperties": false }, { @@ -20294,10 +22570,14 @@ "properties": { "status": { "type": "string", - "enum": ["cancelled"] + "enum": [ + "cancelled" + ] } }, - "required": ["status"], + "required": [ + "status" + ], "additionalProperties": false } ] @@ -20309,7 +22589,9 @@ "$ref": "#/components/schemas/Form.Answer" } }, - "required": ["answer"], + "required": [ + "answer" + ], "additionalProperties": false }, "FormAlreadySettledError": { @@ -20317,7 +22599,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["FormAlreadySettledError"] + "enum": [ + "FormAlreadySettledError" + ] }, "id": { "type": "string" @@ -20326,7 +22610,11 @@ "type": "string" } }, - "required": ["_tag", "id", "message"], + "required": [ + "_tag", + "id", + "message" + ], "additionalProperties": false }, "FormInvalidAnswerError": { @@ -20334,7 +22622,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["FormInvalidAnswerError"] + "enum": [ + "FormInvalidAnswerError" + ] }, "id": { "type": "string" @@ -20343,7 +22633,11 @@ "type": "string" } }, - "required": ["_tag", "id", "message"], + "required": [ + "_tag", + "id", + "message" + ], "additionalProperties": false }, "Permission.Source": { @@ -20353,7 +22647,9 @@ "properties": { "type": { "type": "string", - "enum": ["tool"] + "enum": [ + "tool" + ] }, "messageID": { "type": "string" @@ -20362,7 +22658,11 @@ "type": "string" } }, - "required": ["type", "messageID", "id"], + "required": [ + "type", + "messageID", + "id" + ], "additionalProperties": false } ] @@ -20408,7 +22708,12 @@ "$ref": "#/components/schemas/Permission.Source" } }, - "required": ["id", "sessionID", "action", "resources"], + "required": [ + "id", + "sessionID", + "action", + "resources" + ], "additionalProperties": false }, "PermissionSaved.Info": { @@ -20427,7 +22732,12 @@ "type": "string" } }, - "required": ["id", "projectID", "action", "resource"], + "required": [ + "id", + "projectID", + "action", + "resource" + ], "additionalProperties": false }, "PermissionNotFoundError": { @@ -20435,7 +22745,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["PermissionNotFoundError"] + "enum": [ + "PermissionNotFoundError" + ] }, "requestID": { "type": "string" @@ -20444,12 +22756,20 @@ "type": "string" } }, - "required": ["_tag", "requestID", "message"], + "required": [ + "_tag", + "requestID", + "message" + ], "additionalProperties": false }, "Permission.Reply": { "type": "string", - "enum": ["once", "always", "reject"] + "enum": [ + "once", + "always", + "reject" + ] }, "FileSystem.Entry": { "type": "object", @@ -20459,10 +22779,16 @@ }, "type": { "type": "string", - "enum": ["file", "directory"] + "enum": [ + "file", + "directory" + ] } }, - "required": ["path", "type"], + "required": [ + "path", + "type" + ], "additionalProperties": false }, "Command.Info": { @@ -20487,7 +22813,10 @@ "type": "boolean" } }, - "required": ["name", "template"], + "required": [ + "name", + "template" + ], "additionalProperties": false }, "Skill.Info": { @@ -20515,7 +22844,12 @@ "type": "string" } }, - "required": ["id", "name", "location", "content"], + "required": [ + "id", + "name", + "location", + "content" + ], "additionalProperties": false }, "models-dev.refreshed": { @@ -20537,7 +22871,9 @@ }, "type": { "type": "string", - "enum": ["models-dev.refreshed"] + "enum": [ + "models-dev.refreshed" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -20553,7 +22889,12 @@ ] } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "integration.updated": { @@ -20575,7 +22916,9 @@ }, "type": { "type": "string", - "enum": ["integration.updated"] + "enum": [ + "integration.updated" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -20591,7 +22934,12 @@ ] } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "integration.connection.updated": { @@ -20613,7 +22961,9 @@ }, "type": { "type": "string", - "enum": ["integration.connection.updated"] + "enum": [ + "integration.connection.updated" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -20625,11 +22975,18 @@ "type": "string" } }, - "required": ["integrationID"], + "required": [ + "integrationID" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "catalog.updated": { @@ -20651,7 +23008,9 @@ }, "type": { "type": "string", - "enum": ["catalog.updated"] + "enum": [ + "catalog.updated" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -20667,7 +23026,12 @@ ] } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "agent.updated": { @@ -20689,7 +23053,9 @@ }, "type": { "type": "string", - "enum": ["agent.updated"] + "enum": [ + "agent.updated" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -20705,7 +23071,12 @@ ] } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "session.usage.updated": { @@ -20727,7 +23098,9 @@ }, "type": { "type": "string", - "enum": ["session.usage.updated"] + "enum": [ + "session.usage.updated" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -20750,11 +23123,20 @@ "$ref": "#/components/schemas/TokenUsage.Info" } }, - "required": ["sessionID", "cost", "tokens"], + "required": [ + "sessionID", + "cost", + "tokens" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "session.text.delta": { @@ -20776,7 +23158,9 @@ }, "type": { "type": "string", - "enum": ["session.text.delta"] + "enum": [ + "session.text.delta" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -20812,11 +23196,21 @@ "type": "string" } }, - "required": ["sessionID", "assistantMessageID", "ordinal", "delta"], + "required": [ + "sessionID", + "assistantMessageID", + "ordinal", + "delta" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "session.reasoning.delta": { @@ -20838,7 +23232,9 @@ }, "type": { "type": "string", - "enum": ["session.reasoning.delta"] + "enum": [ + "session.reasoning.delta" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -20874,11 +23270,21 @@ "type": "string" } }, - "required": ["sessionID", "assistantMessageID", "ordinal", "delta"], + "required": [ + "sessionID", + "assistantMessageID", + "ordinal", + "delta" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "session.tool.input.delta": { @@ -20900,7 +23306,9 @@ }, "type": { "type": "string", - "enum": ["session.tool.input.delta"] + "enum": [ + "session.tool.input.delta" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -20931,11 +23339,21 @@ "type": "string" } }, - "required": ["sessionID", "assistantMessageID", "id", "delta"], + "required": [ + "sessionID", + "assistantMessageID", + "id", + "delta" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "session.tool.progress": { @@ -20957,7 +23375,9 @@ }, "type": { "type": "string", - "enum": ["session.tool.progress"] + "enum": [ + "session.tool.progress" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -20988,11 +23408,21 @@ "type": "object" } }, - "required": ["sessionID", "assistantMessageID", "id", "metadata"], + "required": [ + "sessionID", + "assistantMessageID", + "id", + "metadata" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "session.compaction.delta": { @@ -21014,7 +23444,9 @@ }, "type": { "type": "string", - "enum": ["session.compaction.delta"] + "enum": [ + "session.compaction.delta" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -21034,11 +23466,19 @@ "type": "string" } }, - "required": ["sessionID", "text"], + "required": [ + "sessionID", + "text" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "filesystem.changed": { @@ -21060,7 +23500,9 @@ }, "type": { "type": "string", - "enum": ["filesystem.changed"] + "enum": [ + "filesystem.changed" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -21073,14 +23515,26 @@ }, "event": { "type": "string", - "enum": ["add", "change", "unlink"] + "enum": [ + "add", + "change", + "unlink" + ] } }, - "required": ["file", "event"], + "required": [ + "file", + "event" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "reference.updated": { @@ -21102,7 +23556,9 @@ }, "type": { "type": "string", - "enum": ["reference.updated"] + "enum": [ + "reference.updated" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -21118,7 +23574,12 @@ ] } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "permission.asked": { @@ -21140,7 +23601,9 @@ }, "type": { "type": "string", - "enum": ["permission.asked"] + "enum": [ + "permission.asked" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -21186,11 +23649,21 @@ "$ref": "#/components/schemas/Permission.Source" } }, - "required": ["id", "sessionID", "action", "resources"], + "required": [ + "id", + "sessionID", + "action", + "resources" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "permission.replied": { @@ -21212,7 +23685,9 @@ }, "type": { "type": "string", - "enum": ["permission.replied"] + "enum": [ + "permission.replied" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -21240,11 +23715,20 @@ "$ref": "#/components/schemas/Permission.Reply" } }, - "required": ["sessionID", "requestID", "reply"], + "required": [ + "sessionID", + "requestID", + "reply" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "plugin.added": { @@ -21266,7 +23750,9 @@ }, "type": { "type": "string", - "enum": ["plugin.added"] + "enum": [ + "plugin.added" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -21278,11 +23764,18 @@ "type": "string" } }, - "required": ["id"], + "required": [ + "id" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "plugin.updated": { @@ -21304,7 +23797,9 @@ }, "type": { "type": "string", - "enum": ["plugin.updated"] + "enum": [ + "plugin.updated" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -21320,10 +23815,15 @@ ] } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, - "project.directories.updated": { + "worktree.updated": { "type": "object", "properties": { "id": { @@ -21342,7 +23842,9 @@ }, "type": { "type": "string", - "enum": ["project.directories.updated"] + "enum": [ + "worktree.updated" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -21354,14 +23856,21 @@ "type": "string" } }, - "required": ["projectID"], + "required": [ + "projectID" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, - "project.directory.resolved": { + "worktree.resolved": { "type": "object", "properties": { "id": { @@ -21380,7 +23889,9 @@ }, "type": { "type": "string", - "enum": ["project.directory.resolved"] + "enum": [ + "worktree.resolved" + ] }, "durable": { "type": "object", @@ -21398,10 +23909,16 @@ }, "version": { "type": "number", - "enum": [1] + "enum": [ + 1 + ] } }, - "required": ["aggregateID", "seq", "version"], + "required": [ + "aggregateID", + "seq", + "version" + ], "additionalProperties": false }, "location": { @@ -21420,11 +23937,21 @@ "type": "string" } }, - "required": ["projectID", "directory", "previous"], + "required": [ + "projectID", + "directory", + "previous" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "durable", "data"], + "required": [ + "id", + "created", + "type", + "durable", + "data" + ], "additionalProperties": false }, "command.updated": { @@ -21446,7 +23973,9 @@ }, "type": { "type": "string", - "enum": ["command.updated"] + "enum": [ + "command.updated" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -21462,7 +23991,12 @@ ] } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "config.updated": { @@ -21484,7 +24018,9 @@ }, "type": { "type": "string", - "enum": ["config.updated"] + "enum": [ + "config.updated" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -21500,7 +24036,12 @@ ] } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "skill.updated": { @@ -21522,7 +24063,9 @@ }, "type": { "type": "string", - "enum": ["skill.updated"] + "enum": [ + "skill.updated" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -21538,7 +24081,12 @@ ] } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "Pty": { @@ -21569,7 +24117,10 @@ }, "status": { "type": "string", - "enum": ["running", "exited"] + "enum": [ + "running", + "exited" + ] }, "pid": { "type": "integer", @@ -21588,7 +24139,15 @@ ] } }, - "required": ["id", "title", "command", "args", "cwd", "status", "pid"], + "required": [ + "id", + "title", + "command", + "args", + "cwd", + "status", + "pid" + ], "additionalProperties": false }, "pty.created": { @@ -21610,7 +24169,9 @@ }, "type": { "type": "string", - "enum": ["pty.created"] + "enum": [ + "pty.created" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -21622,11 +24183,18 @@ "$ref": "#/components/schemas/Pty" } }, - "required": ["info"], + "required": [ + "info" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "pty.updated": { @@ -21648,7 +24216,9 @@ }, "type": { "type": "string", - "enum": ["pty.updated"] + "enum": [ + "pty.updated" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -21660,11 +24230,18 @@ "$ref": "#/components/schemas/Pty" } }, - "required": ["info"], + "required": [ + "info" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "pty.exited": { @@ -21686,7 +24263,9 @@ }, "type": { "type": "string", - "enum": ["pty.exited"] + "enum": [ + "pty.exited" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -21711,11 +24290,19 @@ ] } }, - "required": ["id", "exitCode"], + "required": [ + "id", + "exitCode" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "pty.deleted": { @@ -21737,7 +24324,9 @@ }, "type": { "type": "string", - "enum": ["pty.deleted"] + "enum": [ + "pty.deleted" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -21754,11 +24343,18 @@ ] } }, - "required": ["id"], + "required": [ + "id" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "shell.created": { @@ -21780,7 +24376,9 @@ }, "type": { "type": "string", - "enum": ["shell.created"] + "enum": [ + "shell.created" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -21792,11 +24390,18 @@ "$ref": "#/components/schemas/Shell.Info" } }, - "required": ["info"], + "required": [ + "info" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "shell.exited": { @@ -21818,7 +24423,9 @@ }, "type": { "type": "string", - "enum": ["shell.exited"] + "enum": [ + "shell.exited" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -21839,14 +24446,27 @@ }, "status": { "type": "string", - "enum": ["running", "exited", "timeout", "killed"] + "enum": [ + "running", + "exited", + "timeout", + "killed" + ] } }, - "required": ["id", "status"], + "required": [ + "id", + "status" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "shell.deleted": { @@ -21868,7 +24488,9 @@ }, "type": { "type": "string", - "enum": ["shell.deleted"] + "enum": [ + "shell.deleted" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -21885,11 +24507,18 @@ ] } }, - "required": ["id"], + "required": [ + "id" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "Question.Option": { @@ -21904,7 +24533,10 @@ "description": "Explanation of choice" } }, - "required": ["label", "description"], + "required": [ + "label", + "description" + ], "additionalProperties": false }, "Question.Info": { @@ -21932,7 +24564,11 @@ "type": "boolean" } }, - "required": ["question", "header", "options"], + "required": [ + "question", + "header", + "options" + ], "additionalProperties": false }, "Question.Tool": { @@ -21945,7 +24581,10 @@ "type": "string" } }, - "required": ["messageID", "id"], + "required": [ + "messageID", + "id" + ], "additionalProperties": false }, "question.asked": { @@ -21967,7 +24606,9 @@ }, "type": { "type": "string", - "enum": ["question.asked"] + "enum": [ + "question.asked" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -22002,11 +24643,20 @@ "$ref": "#/components/schemas/Question.Tool" } }, - "required": ["id", "sessionID", "questions"], + "required": [ + "id", + "sessionID", + "questions" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "Question.Answer": { @@ -22034,7 +24684,9 @@ }, "type": { "type": "string", - "enum": ["question.replied"] + "enum": [ + "question.replied" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -22065,11 +24717,20 @@ } } }, - "required": ["sessionID", "requestID", "answers"], + "required": [ + "sessionID", + "requestID", + "answers" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "question.rejected": { @@ -22091,7 +24752,9 @@ }, "type": { "type": "string", - "enum": ["question.rejected"] + "enum": [ + "question.rejected" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -22116,11 +24779,19 @@ ] } }, - "required": ["sessionID", "requestID"], + "required": [ + "sessionID", + "requestID" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "Form.Metadata1": { @@ -22134,7 +24805,10 @@ }, "op": { "type": "string", - "enum": ["eq", "neq"] + "enum": [ + "eq", + "neq" + ] }, "value": { "anyOf": [ @@ -22148,15 +24822,21 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] }, @@ -22166,7 +24846,11 @@ ] } }, - "required": ["key", "op", "value"], + "required": [ + "key", + "op", + "value" + ], "additionalProperties": false }, "Form.StringField1": { @@ -22192,11 +24876,18 @@ }, "type": { "type": "string", - "enum": ["string"] + "enum": [ + "string" + ] }, "format": { "type": "string", - "enum": ["email", "uri", "date", "date-time"] + "enum": [ + "email", + "uri", + "date", + "date-time" + ] }, "minLength": { "type": "integer", @@ -22233,7 +24924,10 @@ "type": "boolean" } }, - "required": ["key", "type"], + "required": [ + "key", + "type" + ], "additionalProperties": false }, "Form.NumberField1": { @@ -22259,7 +24953,9 @@ }, "type": { "type": "string", - "enum": ["number"] + "enum": [ + "number" + ] }, "minimum": { "anyOf": [ @@ -22268,15 +24964,21 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] }, @@ -22287,15 +24989,21 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] }, @@ -22306,20 +25014,29 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] } }, - "required": ["key", "type"], + "required": [ + "key", + "type" + ], "additionalProperties": false }, "Form.IntegerField1": { @@ -22345,7 +25062,9 @@ }, "type": { "type": "string", - "enum": ["integer"] + "enum": [ + "integer" + ] }, "minimum": { "anyOf": [ @@ -22354,15 +25073,21 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] }, @@ -22373,15 +25098,21 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] }, @@ -22392,20 +25123,29 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] } }, - "required": ["key", "type"], + "required": [ + "key", + "type" + ], "additionalProperties": false }, "Form.BooleanField1": { @@ -22431,13 +25171,18 @@ }, "type": { "type": "string", - "enum": ["boolean"] + "enum": [ + "boolean" + ] }, "default": { "type": "boolean" } }, - "required": ["key", "type"], + "required": [ + "key", + "type" + ], "additionalProperties": false }, "Form.MultiselectField1": { @@ -22463,7 +25208,9 @@ }, "type": { "type": "string", - "enum": ["multiselect"] + "enum": [ + "multiselect" + ] }, "options": { "type": "array", @@ -22497,7 +25244,11 @@ } } }, - "required": ["key", "type", "options"], + "required": [ + "key", + "type", + "options" + ], "additionalProperties": false }, "Form.Field1": { @@ -22558,7 +25309,12 @@ "$ref": "#/components/schemas/Form.Fields3" } }, - "required": ["id", "sessionID", "title", "fields"], + "required": [ + "id", + "sessionID", + "title", + "fields" + ], "additionalProperties": false }, "form.created": { @@ -22580,7 +25336,9 @@ }, "type": { "type": "string", - "enum": ["form.created"] + "enum": [ + "form.created" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -22592,11 +25350,18 @@ "$ref": "#/components/schemas/Form.Info1" } }, - "required": ["form"], + "required": [ + "form" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "Form.Value1": { @@ -22611,15 +25376,21 @@ }, { "type": "string", - "enum": ["NaN"] + "enum": [ + "NaN" + ] }, { "type": "string", - "enum": ["Infinity"] + "enum": [ + "Infinity" + ] }, { "type": "string", - "enum": ["-Infinity"] + "enum": [ + "-Infinity" + ] } ] }, @@ -22659,7 +25430,9 @@ }, "type": { "type": "string", - "enum": ["form.replied"] + "enum": [ + "form.replied" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -22682,11 +25455,20 @@ "$ref": "#/components/schemas/Form.Answer1" } }, - "required": ["id", "sessionID", "answer"], + "required": [ + "id", + "sessionID", + "answer" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "form.cancelled": { @@ -22708,7 +25490,9 @@ }, "type": { "type": "string", - "enum": ["form.cancelled"] + "enum": [ + "form.cancelled" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -22728,11 +25512,19 @@ "type": "string" } }, - "required": ["id", "sessionID"], + "required": [ + "id", + "sessionID" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "websearch.updated": { @@ -22754,7 +25546,9 @@ }, "type": { "type": "string", - "enum": ["websearch.updated"] + "enum": [ + "websearch.updated" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -22770,7 +25564,12 @@ ] } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "SessionStatus": { @@ -22780,10 +25579,14 @@ "properties": { "type": { "type": "string", - "enum": ["idle"] + "enum": [ + "idle" + ] } }, - "required": ["type"], + "required": [ + "type" + ], "additionalProperties": false }, { @@ -22791,7 +25594,9 @@ "properties": { "type": { "type": "string", - "enum": ["retry"] + "enum": [ + "retry" + ] }, "attempt": { "type": "integer", @@ -22826,7 +25631,13 @@ "type": "string" } }, - "required": ["reason", "provider", "title", "message", "label"], + "required": [ + "reason", + "provider", + "title", + "message", + "label" + ], "additionalProperties": false }, "next": { @@ -22838,7 +25649,12 @@ ] } }, - "required": ["type", "attempt", "message", "next"], + "required": [ + "type", + "attempt", + "message", + "next" + ], "additionalProperties": false }, { @@ -22846,10 +25662,14 @@ "properties": { "type": { "type": "string", - "enum": ["busy"] + "enum": [ + "busy" + ] } }, - "required": ["type"], + "required": [ + "type" + ], "additionalProperties": false } ] @@ -22873,7 +25693,9 @@ }, "type": { "type": "string", - "enum": ["session.status"] + "enum": [ + "session.status" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -22893,11 +25715,19 @@ "$ref": "#/components/schemas/SessionStatus" } }, - "required": ["sessionID", "status"], + "required": [ + "sessionID", + "status" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "session.idle": { @@ -22919,7 +25749,9 @@ }, "type": { "type": "string", - "enum": ["session.idle"] + "enum": [ + "session.idle" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -22936,11 +25768,18 @@ ] } }, - "required": ["sessionID"], + "required": [ + "sessionID" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "tui.prompt.append": { @@ -22962,7 +25801,9 @@ }, "type": { "type": "string", - "enum": ["tui.prompt.append"] + "enum": [ + "tui.prompt.append" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -22974,11 +25815,18 @@ "type": "string" } }, - "required": ["text"], + "required": [ + "text" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "tui.command.execute": { @@ -23000,7 +25848,9 @@ }, "type": { "type": "string", - "enum": ["tui.command.execute"] + "enum": [ + "tui.command.execute" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -23038,11 +25888,18 @@ ] } }, - "required": ["command"], + "required": [ + "command" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "tui.toast.show": { @@ -23064,7 +25921,9 @@ }, "type": { "type": "string", - "enum": ["tui.toast.show"] + "enum": [ + "tui.toast.show" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -23080,7 +25939,12 @@ }, "variant": { "type": "string", - "enum": ["info", "success", "warning", "error"] + "enum": [ + "info", + "success", + "warning", + "error" + ] }, "duration": { "anyOf": [ @@ -23098,11 +25962,19 @@ ] } }, - "required": ["message", "variant"], + "required": [ + "message", + "variant" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "tui.session.select": { @@ -23124,7 +25996,9 @@ }, "type": { "type": "string", - "enum": ["tui.session.select"] + "enum": [ + "tui.session.select" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -23142,11 +26016,18 @@ ] } }, - "required": ["sessionID"], + "required": [ + "sessionID" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "installation.updated": { @@ -23168,7 +26049,9 @@ }, "type": { "type": "string", - "enum": ["installation.updated"] + "enum": [ + "installation.updated" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -23180,11 +26063,18 @@ "type": "string" } }, - "required": ["version"], + "required": [ + "version" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "installation.update-available": { @@ -23206,7 +26096,9 @@ }, "type": { "type": "string", - "enum": ["installation.update-available"] + "enum": [ + "installation.update-available" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -23218,11 +26110,18 @@ "type": "string" } }, - "required": ["version"], + "required": [ + "version" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "vcs.branch.updated": { @@ -23244,7 +26143,9 @@ }, "type": { "type": "string", - "enum": ["vcs.branch.updated"] + "enum": [ + "vcs.branch.updated" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -23259,7 +26160,12 @@ "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "mcp.status.changed": { @@ -23281,7 +26187,9 @@ }, "type": { "type": "string", - "enum": ["mcp.status.changed"] + "enum": [ + "mcp.status.changed" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -23293,11 +26201,18 @@ "type": "string" } }, - "required": ["server"], + "required": [ + "server" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "mcp.resources.changed": { @@ -23319,7 +26234,9 @@ }, "type": { "type": "string", - "enum": ["mcp.resources.changed"] + "enum": [ + "mcp.resources.changed" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -23331,11 +26248,18 @@ "type": "string" } }, - "required": ["server"], + "required": [ + "server" + ], "additionalProperties": false } }, - "required": ["id", "created", "type", "data"], + "required": [ + "id", + "created", + "type", + "data" + ], "additionalProperties": false }, "V2Event.server.connected": { @@ -23371,7 +26295,9 @@ }, "type": { "type": "string", - "enum": ["server.connected"] + "enum": [ + "server.connected" + ] }, "data": { "anyOf": [ @@ -23384,7 +26310,11 @@ ] } }, - "required": ["id", "type", "data"], + "required": [ + "id", + "type", + "data" + ], "additionalProperties": false }, "V2Event": { @@ -23558,10 +26488,10 @@ "$ref": "#/components/schemas/plugin.updated" }, { - "$ref": "#/components/schemas/project.directories.updated" + "$ref": "#/components/schemas/worktree.updated" }, { - "$ref": "#/components/schemas/project.directory.resolved" + "$ref": "#/components/schemas/worktree.resolved" }, { "$ref": "#/components/schemas/command.updated" @@ -23664,7 +26594,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["PtyNotFoundError"] + "enum": [ + "PtyNotFoundError" + ] }, "ptyID": { "type": "string" @@ -23673,7 +26605,11 @@ "type": "string" } }, - "required": ["_tag", "ptyID", "message"], + "required": [ + "_tag", + "ptyID", + "message" + ], "additionalProperties": false }, "PtyTicket.ConnectToken": { @@ -23691,7 +26627,10 @@ ] } }, - "required": ["ticket", "expires_in"], + "required": [ + "ticket", + "expires_in" + ], "additionalProperties": false }, "ForbiddenError": { @@ -23699,13 +26638,18 @@ "properties": { "_tag": { "type": "string", - "enum": ["ForbiddenError"] + "enum": [ + "ForbiddenError" + ] }, "message": { "type": "string" } }, - "required": ["_tag", "message"], + "required": [ + "_tag", + "message" + ], "additionalProperties": false }, "Shell.Info1": { @@ -23721,7 +26665,12 @@ }, "status": { "type": "string", - "enum": ["running", "exited", "timeout", "killed"] + "enum": [ + "running", + "exited", + "timeout", + "killed" + ] }, "command": { "type": "string" @@ -23759,11 +26708,22 @@ "type": "number" } }, - "required": ["started"], + "required": [ + "started" + ], "additionalProperties": false } }, - "required": ["id", "status", "command", "cwd", "shell", "file", "metadata", "time"], + "required": [ + "id", + "status", + "command", + "cwd", + "shell", + "file", + "metadata", + "time" + ], "additionalProperties": false }, "ShellNotFoundError": { @@ -23771,7 +26731,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["ShellNotFoundError"] + "enum": [ + "ShellNotFoundError" + ] }, "id": { "type": "string" @@ -23780,7 +26742,11 @@ "type": "string" } }, - "required": ["_tag", "id", "message"], + "required": [ + "_tag", + "id", + "message" + ], "additionalProperties": false }, "Question.Request": { @@ -23813,7 +26779,11 @@ "$ref": "#/components/schemas/Question.Tool" } }, - "required": ["id", "sessionID", "questions"], + "required": [ + "id", + "sessionID", + "questions" + ], "additionalProperties": false }, "Question.Reply": { @@ -23827,7 +26797,9 @@ "description": "User answers in order of questions (each answer is an array of selected labels)" } }, - "required": ["answers"], + "required": [ + "answers" + ], "additionalProperties": false }, "QuestionNotFoundError": { @@ -23835,7 +26807,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["QuestionNotFoundError"] + "enum": [ + "QuestionNotFoundError" + ] }, "requestID": { "type": "string" @@ -23844,7 +26818,11 @@ "type": "string" } }, - "required": ["_tag", "requestID", "message"], + "required": [ + "_tag", + "requestID", + "message" + ], "additionalProperties": false }, "Reference.LocalSource": { @@ -23852,7 +26830,9 @@ "properties": { "type": { "type": "string", - "enum": ["local"] + "enum": [ + "local" + ] }, "path": { "type": "string" @@ -23864,7 +26844,10 @@ "type": "boolean" } }, - "required": ["type", "path"], + "required": [ + "type", + "path" + ], "additionalProperties": false }, "Reference.GitSource": { @@ -23872,7 +26855,9 @@ "properties": { "type": { "type": "string", - "enum": ["git"] + "enum": [ + "git" + ] }, "repository": { "type": "string" @@ -23887,7 +26872,10 @@ "type": "boolean" } }, - "required": ["type", "repository"], + "required": [ + "type", + "repository" + ], "additionalProperties": false }, "Reference.Source": { @@ -23919,25 +26907,54 @@ "$ref": "#/components/schemas/Reference.Source" } }, - "required": ["name", "path", "source"], + "required": [ + "name", + "path", + "source" + ], "additionalProperties": false }, - "ProjectCopy.Copy": { + "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"], + "required": [ + "directory" + ], "additionalProperties": false }, - "ProjectCopyError": { + "WorktreeError": { "type": "object", "properties": { "name": { "type": "string", - "enum": ["ProjectCopyError"] + "enum": [ + "WorktreeError" + ] }, "data": { "type": "object", @@ -23956,11 +26973,16 @@ ] } }, - "required": ["message"], + "required": [ + "message" + ], "additionalProperties": false } }, - "required": ["name", "data"], + "required": [ + "name", + "data" + ], "additionalProperties": false }, "Vcs.Branch": { @@ -23982,7 +27004,9 @@ "$ref": "#/components/schemas/Vcs.Branch" } }, - "required": ["branch"], + "required": [ + "branch" + ], "additionalProperties": false }, "Vcs.FileStatus": { @@ -24009,15 +27033,27 @@ }, "status": { "type": "string", - "enum": ["added", "deleted", "modified"] + "enum": [ + "added", + "deleted", + "modified" + ] } }, - "required": ["file", "additions", "deletions", "status"], + "required": [ + "file", + "additions", + "deletions", + "status" + ], "additionalProperties": false }, "Vcs.Mode": { "type": "string", - "enum": ["working", "branch"] + "enum": [ + "working", + "branch" + ] }, "WebSearch.Provider": { "type": "object", @@ -24029,7 +27065,10 @@ "type": "string" } }, - "required": ["id", "name"], + "required": [ + "id", + "name" + ], "additionalProperties": false }, "WebSearch.Result": { @@ -24054,7 +27093,10 @@ "additionalProperties": false } }, - "required": ["url", "time"], + "required": [ + "url", + "time" + ], "additionalProperties": false }, "WebSearch.Response": { @@ -24070,7 +27112,10 @@ } } }, - "required": ["providerID", "results"], + "required": [ + "providerID", + "results" + ], "additionalProperties": false }, "Config.Agent": { @@ -24114,7 +27159,10 @@ ] } }, - "required": ["providerID", "model"], + "required": [ + "providerID", + "model" + ], "additionalProperties": false } ] @@ -24142,7 +27190,11 @@ }, "mode": { "type": "string", - "enum": ["subagent", "primary", "all"] + "enum": [ + "subagent", + "primary", + "all" + ] }, "hidden": { "type": "boolean" @@ -24227,7 +27279,9 @@ "type": "object" } }, - "required": ["command"], + "required": [ + "command" + ], "additionalProperties": false }, "Config.Command": { @@ -24280,7 +27334,10 @@ ] } }, - "required": ["providerID", "model"], + "required": [ + "providerID", + "model" + ], "additionalProperties": false } ] @@ -24289,7 +27346,9 @@ "type": "boolean" } }, - "required": ["template"], + "required": [ + "template" + ], "additionalProperties": false }, "Config.Reference.Git": { @@ -24308,7 +27367,9 @@ "type": "boolean" } }, - "required": ["repository"], + "required": [ + "repository" + ], "additionalProperties": false }, "Config.Reference.Local": { @@ -24324,7 +27385,9 @@ "type": "boolean" } }, - "required": ["path"], + "required": [ + "path" + ], "additionalProperties": false }, "Config.Plugin.Entry": { @@ -24337,7 +27400,9 @@ "type": "object" } }, - "required": ["package"], + "required": [ + "package" + ], "additionalProperties": false }, "Config.Warming": { @@ -24363,13 +27428,18 @@ "properties": { "type": { "type": "string", - "enum": ["context"] + "enum": [ + "context" + ] }, "size": { "type": "integer" } }, - "required": ["type", "size"], + "required": [ + "type", + "size" + ], "additionalProperties": false }, "input": { @@ -24391,7 +27461,10 @@ "additionalProperties": false } }, - "required": ["input", "output"], + "required": [ + "input", + "output" + ], "additionalProperties": false }, "Config.Model": { @@ -24448,7 +27521,9 @@ "type": "object" } }, - "required": ["id"], + "required": [ + "id" + ], "additionalProperties": false } }, @@ -24569,7 +27644,10 @@ ] } }, - "required": ["providerID", "model"], + "required": [ + "providerID", + "model" + ], "additionalProperties": false } ] @@ -24584,13 +27662,19 @@ }, { "type": "string", - "enum": ["notify"] + "enum": [ + "notify" + ] } ] }, "share": { "type": "string", - "enum": ["manual", "auto", "disabled"] + "enum": [ + "manual", + "auto", + "disabled" + ] }, "enterprise": { "type": "object", @@ -24655,10 +27739,14 @@ "properties": { "disabled": { "type": "boolean", - "enum": [true] + "enum": [ + true + ] } }, - "required": ["disabled"], + "required": [ + "disabled" + ], "additionalProperties": false }, { @@ -24851,7 +27939,9 @@ "type": "string" } }, - "required": ["provider"], + "required": [ + "provider" + ], "additionalProperties": false }, "plugins": { @@ -24901,17 +27991,26 @@ "properties": { "action": { "type": "string", - "enum": ["provider.use"] + "enum": [ + "provider.use" + ] }, "resource": { "type": "string" }, "effect": { "type": "string", - "enum": ["allow", "deny"] + "enum": [ + "allow", + "deny" + ] } }, - "required": ["action", "resource", "effect"], + "required": [ + "action", + "resource", + "effect" + ], "additionalProperties": false } } @@ -24926,7 +28025,9 @@ "properties": { "type": { "type": "string", - "enum": ["document"] + "enum": [ + "document" + ] }, "path": { "type": "string" @@ -24935,7 +28036,10 @@ "$ref": "#/components/schemas/Config.Info" } }, - "required": ["type", "info"], + "required": [ + "type", + "info" + ], "additionalProperties": false }, "Config.Directory": { @@ -24943,13 +28047,18 @@ "properties": { "type": { "type": "string", - "enum": ["directory"] + "enum": [ + "directory" + ] }, "path": { "type": "string" } }, - "required": ["type", "path"], + "required": [ + "type", + "path" + ], "additionalProperties": false }, "Config.File": { @@ -24957,13 +28066,18 @@ "properties": { "type": { "type": "string", - "enum": ["file"] + "enum": [ + "file" + ] }, "path": { "type": "string" } }, - "required": ["type", "path"], + "required": [ + "type", + "path" + ], "additionalProperties": false }, "Config.AgentsDirectory": { @@ -24971,13 +28085,18 @@ "properties": { "type": { "type": "string", - "enum": ["agents"] + "enum": [ + "agents" + ] }, "path": { "type": "string" } }, - "required": ["type", "path"], + "required": [ + "type", + "path" + ], "additionalProperties": false }, "Config.ClaudeDirectory": { @@ -24985,13 +28104,18 @@ "properties": { "type": { "type": "string", - "enum": ["claude"] + "enum": [ + "claude" + ] }, "path": { "type": "string" } }, - "required": ["type", "path"], + "required": [ + "type", + "path" + ], "additionalProperties": false }, "Config.Entry": { @@ -25067,7 +28191,7 @@ }, { "name": "project", - "description": "Location-scoped project routes." + "description": "Project routes." }, { "name": "form", @@ -25110,8 +28234,8 @@ "description": "Location-scoped project references." }, { - "name": "projectCopy", - "description": "Project copy management routes." + "name": "worktree", + "description": "Project worktree management routes." }, { "name": "vcs", diff --git a/packages/protocol/src/api.ts b/packages/protocol/src/api.ts index 7e9b279527e..3732b839fb4 100644 --- a/packages/protocol/src/api.ts +++ b/packages/protocol/src/api.ts @@ -29,7 +29,7 @@ import { WebSearchGroup } from "./groups/websearch.js" import { McpGroup } from "./groups/mcp.js" import { CredentialGroup } from "./groups/credential.js" import { ProjectGroup } from "./groups/project.js" -import { ProjectCopyGroup } from "./groups/project-copy.js" +import { WorktreeGroup } from "./groups/worktree.js" import { VcsGroup } from "./groups/vcs.js" import { MigrationGroup } from "./groups/migration.js" import { ConfigGroup } from "./groups/config.js" @@ -52,7 +52,6 @@ type LocationGroups = | HttpApiGroup.AddMiddleware | HttpApiGroup.AddMiddleware | HttpApiGroup.AddMiddleware - | HttpApiGroup.AddMiddleware | HttpApiGroup.AddMiddleware | HttpApiGroup.AddMiddleware @@ -89,6 +88,7 @@ type ApiGroups< | typeof ServerGroup | typeof DebugGroup | typeof MigrationGroup + | typeof WorktreeGroup | LocationGroups | FormGroups | SessionGroups @@ -172,7 +172,7 @@ const makeApiFromGroup = < .add(ShellGroup.middleware(locationMiddleware)) .add(makeQuestionGroup(locationMiddleware, sessionLocationMiddleware)) .add(ReferenceGroup.middleware(locationMiddleware)) - .add(ProjectCopyGroup.middleware(locationMiddleware)) + .add(WorktreeGroup) .add(VcsGroup.middleware(locationMiddleware)) .add(DebugGroup) .add(MigrationGroup) diff --git a/packages/protocol/src/client.ts b/packages/protocol/src/client.ts index d84aeeeb4aa..93ba6b386e1 100644 --- a/packages/protocol/src/client.ts +++ b/packages/protocol/src/client.ts @@ -60,7 +60,7 @@ export const groupNames = { "server.question": "question", "server.reference": "reference", "server.project": "project", - "server.projectCopy": "projectCopy", + "server.worktree": "worktree", "server.vcs": "vcs", "server.config": "config", } as const diff --git a/packages/protocol/src/groups/project-copy.ts b/packages/protocol/src/groups/project-copy.ts deleted file mode 100644 index 3ac63a1969c..00000000000 --- a/packages/protocol/src/groups/project-copy.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { ProjectCopy } from "@opencode-ai/schema/project-copy" -import { Project } from "@opencode-ai/schema/project" -import { Schema, Struct } from "effect" -import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/unstable/httpapi" -import { LocationQuery, locationQueryOpenApi } from "./location.js" - -const root = "/api/experimental/project/:projectID/copy" - -export class ProjectCopyError extends Schema.ErrorClass("ProjectCopyError")( - { - name: Schema.Literal("ProjectCopyError"), - data: Schema.Struct({ - message: Schema.String, - forceRequired: Schema.optional(Schema.Boolean), - }), - }, - { httpApiStatus: 400 }, -) {} - -const CreatePayload = Schema.Struct(Struct.omit(ProjectCopy.CreateInput.fields, ["projectID", "sourceDirectory"])) -const RemovePayload = Schema.Struct(Struct.omit(ProjectCopy.RemoveInput.fields, ["projectID"])) - -export const ProjectCopyGroup = HttpApiGroup.make("server.projectCopy") - .add( - HttpApiEndpoint.post("projectCopy.create", root, { - params: { projectID: Project.ID }, - query: LocationQuery, - payload: CreatePayload, - success: ProjectCopy.Copy, - error: ProjectCopyError, - }) - .annotateMerge(locationQueryOpenApi) - .annotateMerge(OpenApi.annotations({ identifier: "v2.projectCopy.create" })), - ) - .add( - HttpApiEndpoint.delete("projectCopy.remove", root, { - params: { projectID: Project.ID }, - query: LocationQuery, - payload: RemovePayload, - success: HttpApiSchema.NoContent, - error: ProjectCopyError, - }) - .annotateMerge(locationQueryOpenApi) - .annotateMerge(OpenApi.annotations({ identifier: "v2.projectCopy.remove" })), - ) - .add( - HttpApiEndpoint.post("projectCopy.refresh", `${root}/refresh`, { - params: { projectID: Project.ID }, - query: LocationQuery, - success: HttpApiSchema.NoContent, - error: ProjectCopyError, - }) - .annotateMerge(locationQueryOpenApi) - .annotateMerge(OpenApi.annotations({ identifier: "v2.projectCopy.refresh" })), - ) - .annotateMerge(OpenApi.annotations({ title: "projectCopy", description: "Project copy management routes." })) diff --git a/packages/protocol/src/groups/project.ts b/packages/protocol/src/groups/project.ts index a62f1d072f7..3e60a437667 100644 --- a/packages/protocol/src/groups/project.ts +++ b/packages/protocol/src/groups/project.ts @@ -31,24 +31,9 @@ export const ProjectGroup = HttpApiGroup.make("server.project") }), ), ) - .add( - HttpApiEndpoint.get("project.directories", `${root}/:projectID/directories`, { - params: { projectID: Project.ID }, - query: LocationQuery, - success: Project.Directories, - }) - .annotateMerge(locationQueryOpenApi) - .annotateMerge( - OpenApi.annotations({ - identifier: "v2.project.directories", - summary: "List project directories", - description: "List known local absolute directories for a project.", - }), - ), - ) .annotateMerge( OpenApi.annotations({ title: "project", - description: "Location-scoped project routes.", + description: "Project routes.", }), ) diff --git a/packages/protocol/src/groups/worktree.ts b/packages/protocol/src/groups/worktree.ts new file mode 100644 index 00000000000..5c7af2dcb5d --- /dev/null +++ b/packages/protocol/src/groups/worktree.ts @@ -0,0 +1,76 @@ +import { Project } from "@opencode-ai/schema/project" +import { Worktree } from "@opencode-ai/schema/worktree" +import { Schema, Struct } from "effect" +import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/unstable/httpapi" + +const root = "/api/experimental/project/:projectID/worktree" + +export class WorktreeError extends Schema.ErrorClass("WorktreeError")( + { + name: Schema.Literal("WorktreeError"), + data: Schema.Struct({ + message: Schema.String, + forceRequired: Schema.optional(Schema.Boolean), + }), + }, + { httpApiStatus: 400 }, +) {} + +const CreatePayload = Schema.Struct(Struct.omit(Worktree.CreateInput.fields, ["projectID"])) +const RemovePayload = Schema.Struct(Struct.omit(Worktree.RemoveInput.fields, ["projectID"])) + +export const WorktreeGroup = HttpApiGroup.make("server.worktree") + .add( + HttpApiEndpoint.get("worktree.list", root, { + params: { projectID: Project.ID }, + success: Worktree.List, + }).annotateMerge( + OpenApi.annotations({ + identifier: "v2.worktree.list", + summary: "List worktrees", + description: "List known local worktrees for a project.", + }), + ), + ) + .add( + HttpApiEndpoint.post("worktree.create", root, { + params: { projectID: Project.ID }, + payload: CreatePayload, + success: Worktree.Info, + error: WorktreeError, + }).annotateMerge( + OpenApi.annotations({ + identifier: "v2.worktree.create", + summary: "Create worktree", + description: "Create a worktree for a project.", + }), + ), + ) + .add( + HttpApiEndpoint.delete("worktree.remove", root, { + params: { projectID: Project.ID }, + payload: RemovePayload, + success: HttpApiSchema.NoContent, + error: WorktreeError, + }).annotateMerge( + OpenApi.annotations({ + identifier: "v2.worktree.remove", + summary: "Remove worktree", + description: "Remove a managed worktree from a project.", + }), + ), + ) + .add( + HttpApiEndpoint.post("worktree.refresh", `${root}/refresh`, { + params: { projectID: Project.ID }, + success: HttpApiSchema.NoContent, + error: WorktreeError, + }).annotateMerge( + OpenApi.annotations({ + identifier: "v2.worktree.refresh", + summary: "Refresh worktrees", + description: "Reconcile stored worktrees with the project repositories.", + }), + ), + ) + .annotateMerge(OpenApi.annotations({ title: "worktree", description: "Project worktree management routes." })) diff --git a/packages/server/src/handlers.ts b/packages/server/src/handlers.ts index 28f29166fd8..cd2c4d4a7a4 100644 --- a/packages/server/src/handlers.ts +++ b/packages/server/src/handlers.ts @@ -25,7 +25,7 @@ import { WebSearchHandler } from "./handlers/websearch" import { McpHandler } from "./handlers/mcp" import { CredentialHandler } from "./handlers/credential" import { ProjectHandler } from "./handlers/project" -import { ProjectCopyHandler } from "./handlers/project-copy" +import { WorktreeHandler } from "./handlers/worktree" import { VcsHandler } from "./handlers/vcs" import { EventFeed } from "./event-feed" import { MigrationHandler } from "./handlers/migration" @@ -59,7 +59,7 @@ export const handlers = Layer.mergeAll( ShellHandler, QuestionHandler, ReferenceHandler, - ProjectCopyHandler, + WorktreeHandler, VcsHandler, ConfigHandler, ) diff --git a/packages/server/src/handlers/project-copy.ts b/packages/server/src/handlers/project-copy.ts deleted file mode 100644 index 3733db6771a..00000000000 --- a/packages/server/src/handlers/project-copy.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { Location } from "@opencode-ai/core/location" -import { ProjectCopy } from "@opencode-ai/core/project/copy" -import { Git } from "@opencode-ai/core/git" -import { Effect } from "effect" -import { HttpApiBuilder, HttpApiSchema } from "effect/unstable/httpapi" -import { Api } from "../api" -import { ProjectCopyError } from "@opencode-ai/protocol/groups/project-copy" - -export const ProjectCopyHandler = HttpApiBuilder.group(Api, "server.projectCopy", (handlers) => - Effect.succeed( - handlers - .handle("projectCopy.create", (ctx) => - Effect.gen(function* () { - const copies = yield* ProjectCopy.Service - const location = yield* Location.Service - return yield* badRequest( - copies.create({ - ...ctx.payload, - projectID: ctx.params.projectID, - sourceDirectory: location.project.directory, - }), - ) - }), - ) - .handle("projectCopy.remove", (ctx) => - ProjectCopy.Service.use((copies) => - badRequest(copies.remove({ ...ctx.payload, projectID: ctx.params.projectID })).pipe( - Effect.as(HttpApiSchema.NoContent.make()), - ), - ), - ) - .handle("projectCopy.refresh", (ctx) => - ProjectCopy.Service.use((copies) => - badRequest(copies.refresh({ projectID: ctx.params.projectID })).pipe( - Effect.as(HttpApiSchema.NoContent.make()), - ), - ), - ), - ), -) - -function badRequest(effect: Effect.Effect) { - return effect.pipe( - Effect.mapError( - (error) => - new ProjectCopyError({ - name: "ProjectCopyError", - data: { - message: message(error), - forceRequired: error instanceof Git.WorktreeError ? error.forceRequired : undefined, - }, - }), - ), - ) -} - -function message(error: ProjectCopy.Error) { - if (error instanceof ProjectCopy.SourceDirectoryNotFoundError) - return `Project copy source not found: ${error.directory}` - if (error instanceof ProjectCopy.DestinationExistsError) - return `Project copy destination already exists: ${error.directory}` - if (error instanceof ProjectCopy.DirectoryUnavailableError) - return `Project copy directory unavailable: ${error.directory}` - if (error instanceof ProjectCopy.InvalidDirectoryError) return `Invalid project copy directory: ${error.directory}` - if (error instanceof ProjectCopy.StrategyUnavailableError) - return `Project copy strategy unavailable: ${error.strategy}` - return error.message -} diff --git a/packages/server/src/handlers/project.ts b/packages/server/src/handlers/project.ts index e02aa814aa2..5f9aca37307 100644 --- a/packages/server/src/handlers/project.ts +++ b/packages/server/src/handlers/project.ts @@ -15,8 +15,5 @@ export const ProjectHandler = HttpApiBuilder.group(Api, "server.project", (handl canonical: location.project.canonical, }), ), - ) - .handle("project.directories", (ctx) => - Project.Service.use((project) => project.directories({ projectID: ctx.params.projectID })), ), ) diff --git a/packages/server/src/handlers/worktree.ts b/packages/server/src/handlers/worktree.ts new file mode 100644 index 00000000000..c2ccfdc2502 --- /dev/null +++ b/packages/server/src/handlers/worktree.ts @@ -0,0 +1,53 @@ +import { Git } from "@opencode-ai/core/git" +import { Worktree } from "@opencode-ai/core/worktree" +import { WorktreeError } from "@opencode-ai/protocol/groups/worktree" +import { Effect } from "effect" +import { HttpApiBuilder, HttpApiSchema } from "effect/unstable/httpapi" +import { Api } from "../api" + +export const WorktreeHandler = HttpApiBuilder.group(Api, "server.worktree", (handlers) => + Effect.gen(function* () { + const worktrees = yield* Worktree.Service + + return handlers + .handle("worktree.list", (ctx) => worktrees.list(ctx.params.projectID)) + .handle("worktree.create", (ctx) => + badRequest(worktrees.create({ ...ctx.payload, projectID: ctx.params.projectID })), + ) + .handle("worktree.remove", (ctx) => + badRequest(worktrees.remove({ ...ctx.payload, projectID: ctx.params.projectID })).pipe( + Effect.as(HttpApiSchema.NoContent.make()), + ), + ) + .handle("worktree.refresh", (ctx) => + badRequest(worktrees.refresh({ projectID: ctx.params.projectID })).pipe( + Effect.as(HttpApiSchema.NoContent.make()), + ), + ) + }), +) + +function badRequest(effect: Effect.Effect) { + return effect.pipe( + Effect.mapError( + (error) => + new WorktreeError({ + name: "WorktreeError", + data: { + message: message(error), + forceRequired: error instanceof Git.WorktreeError ? error.forceRequired : undefined, + }, + }), + ), + ) +} + +function message(error: Worktree.Error) { + if (error instanceof Worktree.SourceDirectoryNotFoundError) + return `Worktree source not found for project: ${error.projectID}` + if (error instanceof Worktree.DestinationExistsError) return `Worktree destination already exists: ${error.directory}` + if (error instanceof Worktree.DirectoryUnavailableError) return `Worktree directory unavailable: ${error.directory}` + if (error instanceof Worktree.InvalidDirectoryError) return `Invalid worktree directory: ${error.directory}` + if (error instanceof Worktree.StrategyUnavailableError) return `Worktree strategy unavailable: ${error.strategy}` + return error.message +} diff --git a/packages/server/src/routes.ts b/packages/server/src/routes.ts index d3d22b59abc..26e35d4322e 100644 --- a/packages/server/src/routes.ts +++ b/packages/server/src/routes.ts @@ -28,6 +28,7 @@ import { PluginRuntime } from "@opencode-ai/core/plugin/runtime" import { SdkPlugins } from "@opencode-ai/core/plugin/sdk" import { WellKnown } from "@opencode-ai/core/wellknown" import { Workspace } from "@opencode-ai/core/workspace" +import { Worktree } from "@opencode-ai/core/worktree" import { Watcher } from "@opencode-ai/core/filesystem/watcher" import { HttpRouter } from "effect/unstable/http" import { HttpApiBuilder } from "effect/unstable/httpapi" @@ -52,6 +53,7 @@ const applicationServiceNodes = [ httpClient, Job.node, Project.node, + Worktree.node, Session.node, SessionTransfer.node, PluginRuntime.providerNode, diff --git a/packages/server/test/worktree.test.ts b/packages/server/test/worktree.test.ts new file mode 100644 index 00000000000..7b7dc5084ca --- /dev/null +++ b/packages/server/test/worktree.test.ts @@ -0,0 +1,71 @@ +import fs from "node:fs/promises" +import path from "node:path" +import { $ } from "bun" +import { expect } from "bun:test" +import { Effect } from "effect" +import { HttpServer } from "effect/unstable/http" +import { tmpdir } from "../../core/test/fixture/tmpdir" +import { it } from "../../core/test/lib/effect" +import { ServerProcess } from "../src/process" + +it.live("lists, creates, and removes worktrees by project ID", () => + Effect.acquireUseRelease( + Effect.promise(() => tmpdir("opencode-worktree-endpoint-")), + (tmp) => + Effect.gen(function* () { + const project = path.join(tmp.path, "project") + const destination = path.join(tmp.path, "worktrees") + yield* Effect.promise(() => fs.mkdir(project, { recursive: true })) + yield* Effect.promise(() => $`git init`.cwd(project).quiet()) + yield* Effect.promise(() => $`git config user.email test@opencode.test`.cwd(project).quiet()) + yield* Effect.promise(() => $`git config user.name Test`.cwd(project).quiet()) + yield* Effect.promise(() => $`git commit --allow-empty -m root`.cwd(project).quiet()) + const server = yield* ServerProcess.start({ + hostname: "127.0.0.1", + port: 0, + password: "secret", + app: { version: "test-version" }, + database: { path: ":memory:" }, + config: { directory: path.join(tmp.path, "config") }, + fs: { filewatcher: false }, + }) + const base = HttpServer.formatAddress(server.address) + const headers = { authorization: `Basic ${btoa("opencode:secret")}` } + const location = new URL("/api/location", base) + location.searchParams.set("location[directory]", project) + const resolved = yield* Effect.promise(() => fetch(location, { headers }).then((response) => response.json())) + if (!isRecord(resolved) || !isRecord(resolved.project) || typeof resolved.project.id !== "string") + throw new Error("Expected resolved project") + const url = new URL(`/api/experimental/project/${resolved.project.id}/worktree`, base) + + const initial = yield* Effect.promise(() => fetch(url, { headers }).then((response) => response.json())) + expect(initial).toEqual([{ directory: project }]) + + const created = yield* Effect.promise(() => + fetch(url, { + method: "POST", + headers: { ...headers, "content-type": "application/json" }, + body: JSON.stringify({ strategy: "git", directory: destination, name: "api" }), + }).then((response) => response.json()), + ) + expect(created).toEqual({ directory: path.join(destination, "api") }) + + const listed = yield* Effect.promise(() => fetch(url, { headers }).then((response) => response.json())) + expect(listed).toContainEqual({ directory: path.join(destination, "api"), strategy: "git" }) + + const removed = yield* Effect.promise(() => + fetch(url, { + method: "DELETE", + headers: { ...headers, "content-type": "application/json" }, + body: JSON.stringify({ directory: path.join(destination, "api"), force: false }), + }), + ) + expect(removed.status).toBe(204) + }), + (tmp) => Effect.promise(() => tmp[Symbol.asyncDispose]()), + ), +) + +function isRecord(value: unknown): value is Record { + return typeof value === "object" && value !== null && !Array.isArray(value) +}