From 61b2f1d0cb6835e7d227d156f5d0234a4391ebeb Mon Sep 17 00:00:00 2001 From: Johnny Amancio Date: Thu, 30 Jul 2026 16:20:25 +0200 Subject: [PATCH] fix: repair generated artifacts and branding after the v1.17.13 merge Generation was failing. Upstream added a guard in this range that rejects duplicate session event variants, and Kilo's tool-content codec on the shared event schema was tripping it, so openapi.json and the SDK were stale and a temp packages/sdk/js/openapi.json got committed by accident. Move the codec off the event schema into core/src/kilocode/event-storage.ts, keyed by event type and applied only at the SQL boundary. Session events are on the wire now (SessionEvent.Durable backs /api/session/{id}/history), so a transform there forked the generated API. Shipped readers still parse old rows and the wire contract goes back to upstream's. Drops the consumer-side normalizers in the TUI and sync-v2 that existed only to undo the widening. Also: restore the Kilo HttpApi title and a few branding strings, balance five kilocode_change markers, drop a duplicate TUI palette entry, and teach check-model-tool-network about the LayerNode wiring that replaced Layer.provide(ToolNetwork.httpLayer). --- packages/core/src/event.ts | 27 +- packages/core/src/kilocode/event-storage.ts | 30 + .../code-with-ai/platforms/cli-reference.md | 2 +- packages/llm/src/schema/messages.ts | 3 +- packages/opencode/src/acp/service.ts | 2 +- .../opencode/src/kilocode/plugins/sync-v2.tsx | 5 +- .../src/kilocode/session/tool-content.ts | 34 - packages/opencode/src/provider/auth.ts | 3 +- .../instance/httpapi/groups/question.ts | 2 +- packages/opencode/src/tool/registry.ts | 2 - .../opencode/test/session/compaction.test.ts | 1 - packages/protocol/src/api.ts | 2 +- packages/protocol/src/groups/session.ts | 4 +- packages/schema/src/session-event.ts | 6 +- packages/sdk/js/openapi.json | 1 - packages/sdk/js/src/v2/gen/client.gen.ts | 10 +- .../sdk/js/src/v2/gen/client/client.gen.ts | 286 +- packages/sdk/js/src/v2/gen/client/index.ts | 16 +- .../sdk/js/src/v2/gen/client/types.gen.ts | 175 +- .../sdk/js/src/v2/gen/client/utils.gen.ts | 279 +- packages/sdk/js/src/v2/gen/core/auth.gen.ts | 27 +- .../js/src/v2/gen/core/bodySerializer.gen.ts | 94 +- packages/sdk/js/src/v2/gen/core/params.gen.ts | 133 +- .../js/src/v2/gen/core/pathSerializer.gen.ts | 174 +- .../src/v2/gen/core/queryKeySerializer.gen.ts | 109 +- .../src/v2/gen/core/serverSentEvents.gen.ts | 193 +- packages/sdk/js/src/v2/gen/core/types.gen.ts | 76 +- packages/sdk/js/src/v2/gen/core/utils.gen.ts | 122 +- packages/sdk/js/src/v2/gen/sdk.gen.ts | 18310 ++++---- packages/sdk/js/src/v2/gen/types.gen.ts | 35565 ++++++++-------- packages/sdk/openapi.json | 205 +- packages/tui/src/app.tsx | 14 +- .../tui/src/component/error-component.tsx | 9 +- packages/tui/src/context/data.tsx | 34 +- script/check-model-tool-network.ts | 4 +- 35 files changed, 30067 insertions(+), 25892 deletions(-) create mode 100644 packages/core/src/kilocode/event-storage.ts delete mode 100644 packages/opencode/src/kilocode/session/tool-content.ts delete mode 100644 packages/sdk/js/openapi.json diff --git a/packages/core/src/event.ts b/packages/core/src/event.ts index c92ac0ac2ce..c38de61ef30 100644 --- a/packages/core/src/event.ts +++ b/packages/core/src/event.ts @@ -6,6 +6,7 @@ import type { Data, Definition, Payload } from "@opencode-ai/schema/event" import { and, asc, eq, gt, inArray } from "drizzle-orm" import { Database } from "./database/database" import { EventSequenceTable, EventTable } from "./event/sql" +import * as EventStorage from "./kilocode/event-storage" // kilocode_change - released tool content shapes import { Location } from "./location" import { makeGlobalNode } from "./effect/app-node" import { isDeepStrictEqual } from "node:util" @@ -56,7 +57,7 @@ const decodeSerializedEvent = (event: SerializedEvent): Payload => { id: event.id, type: definition.type, durable: { aggregateID: event.aggregateID, seq: event.seq, version: definition.durable.version }, - data: Schema.decodeUnknownSync(definition.data)(event.data), + data: Schema.decodeUnknownSync(definition.data)(EventStorage.decode(definition.type, event.data)), // kilocode_change } } @@ -89,18 +90,19 @@ export const readAggregate = Effect.fn("EventV2.readAggregate")(function* ( .pipe(Effect.orDie) const page = rows.slice(0, input.limit) const decode = Schema.decodeUnknownSync(input.manifest.schema) - const events = page.map((event) => - decode({ + const events = page.map((event) => { + const type = input.manifest.definitions.get(event.type)?.type ?? event.type + return decode({ id: event.id, - type: input.manifest.definitions.get(event.type)?.type ?? event.type, + type, durable: { aggregateID: event.aggregate_id, seq: event.seq, version: input.manifest.definitions.get(event.type)?.durable?.version, }, - data: event.data, - }), - ) + data: EventStorage.decode(type, event.data), // kilocode_change + }) + }) return { events, hasMore: rows.length > input.limit, @@ -247,10 +249,11 @@ export const layerWith = (options?: LayerOptions) => .get() .pipe(Effect.orDie) const latest = row?.seq ?? -1 - const encoded = Schema.encodeUnknownSync(definition.data)(event.data) as Record< - string, - unknown - > + // kilocode_change - persist tool content in the released shape + const encoded = EventStorage.encode( + definition.type, + Schema.encodeUnknownSync(definition.data)(event.data), + ) as Record if (input?.strictOwner && row?.ownerID && row.ownerID !== input.ownerID) { yield* Effect.die( new InvalidDurableEventError({ @@ -452,7 +455,7 @@ export const layerWith = (options?: LayerOptions) => const payload = { id: event.id, type: definition.type, - data: Schema.decodeUnknownSync(definition.data)(event.data), + data: Schema.decodeUnknownSync(definition.data)(EventStorage.decode(definition.type, event.data)), // kilocode_change } as Payload const committed = yield* commitDurableEvent(definition, payload, { seq: event.seq, diff --git a/packages/core/src/kilocode/event-storage.ts b/packages/core/src/kilocode/event-storage.ts new file mode 100644 index 00000000000..44b83af7214 --- /dev/null +++ b/packages/core/src/kilocode/event-storage.ts @@ -0,0 +1,30 @@ +// kilocode_change start - released readers persist tool content in the pre-1.17.13 shapes +// +// Kilo has shipped durable rows whose `content` uses `{type:"media"}` or `{type:"file",source}`. +// Before v1.17.13 the codec lived on the event schema, but upstream moved session events onto the +// wire (`SessionEvent.Durable` backs `/api/session/{id}/history`), so a schema-level transform now +// forks the generated OpenAPI surface into duplicate variants. Keyed on event type and applied only +// where rows enter and leave SQL, so the wire contract stays upstream's. +import { Schema } from "effect" +import { StoredToolContent } from "@opencode-ai/llm" + +const decodeContent = Schema.decodeUnknownSync(Schema.Array(StoredToolContent)) +const encodeContent = Schema.encodeUnknownSync(Schema.Array(StoredToolContent)) + +/** Durable event types carrying tool `content`. Unversioned, matching `Definition["type"]`. */ +const CONTENT_TYPES = new Set(["session.next.tool.progress", "session.next.tool.success"]) + +const mapContent = (type: string, data: unknown, convert: (content: readonly unknown[]) => unknown) => { + if (!CONTENT_TYPES.has(type)) return data + if (typeof data !== "object" || data === null) return data + const content = (data as { readonly content?: unknown }).content + if (!Array.isArray(content)) return data + return { ...(data as Record), content: convert(content) } +} + +/** Released or current persisted `data` -> the shape `definition.data` expects. */ +export const decode = (type: string, data: unknown) => mapContent(type, data, (content) => decodeContent(content)) + +/** Encoded `definition.data` -> the persisted shape released readers still parse. */ +export const encode = (type: string, data: unknown) => mapContent(type, data, (content) => encodeContent(content)) +// kilocode_change end diff --git a/packages/kilo-docs/pages/code-with-ai/platforms/cli-reference.md b/packages/kilo-docs/pages/code-with-ai/platforms/cli-reference.md index 476794a8934..33965949eab 100644 --- a/packages/kilo-docs/pages/code-with-ai/platforms/cli-reference.md +++ b/packages/kilo-docs/pages/code-with-ai/platforms/cli-reference.md @@ -200,7 +200,7 @@ Options: --variant model variant (provider-specific reasoning effort, e.g., high, max, minimal) [string] --thinking show thinking blocks [boolean] -i, --interactive run in direct interactive split-footer mode [boolean] [default: false] - --auto auto-approve all permissions (for autonomous/pipeline usage) [boolean] [default: false] + --auto auto-approve permissions that are not explicitly denied (dangerous!) [boolean] [default: false] ``` ## kilo debug diff --git a/packages/llm/src/schema/messages.ts b/packages/llm/src/schema/messages.ts index 21376d45b0d..73d64ac5d02 100644 --- a/packages/llm/src/schema/messages.ts +++ b/packages/llm/src/schema/messages.ts @@ -44,6 +44,7 @@ export { ToolContent, ToolFileContent, ToolTextContent } export { StoredToolContent } from "@opencode-ai/schema/llm" // kilocode_change - shared with the durable event schema +// kilocode_change start - Kilo keeps a tolerant tool-result value union const toolResultValueSchema = Schema.Union([ Schema.Struct({ type: Schema.Literal("json"), value: Schema.Unknown }), Schema.Struct({ type: Schema.Literal("text"), value: Schema.Unknown }), @@ -65,7 +66,7 @@ export const ToolResultValue = Object.assign(toolResultValueSchema, { if (isToolResultValue(value)) return value if (type === "content") return { type, value: Array.isArray(value) ? value : [] } return { type, value } -// kilocode_change end + // kilocode_change end }, }) // kilocode_change diff --git a/packages/opencode/src/acp/service.ts b/packages/opencode/src/acp/service.ts index 3774c1a67ce..39ace2961ce 100644 --- a/packages/opencode/src/acp/service.ts +++ b/packages/opencode/src/acp/service.ts @@ -868,7 +868,7 @@ const promptResponse = Effect.fn("ACP.promptResponse")(function* ( function promptErrorMessage(error: AssistantError) { if ("message" in error.data && typeof error.data.message === "string") return error.data.message - return "OpenCode prompt failed" + return "Kilo prompt failed" // kilocode_change - user-visible ACP error } function sendUsageUpdate( diff --git a/packages/opencode/src/kilocode/plugins/sync-v2.tsx b/packages/opencode/src/kilocode/plugins/sync-v2.tsx index 6b34cbdab7e..1985d6a7f67 100644 --- a/packages/opencode/src/kilocode/plugins/sync-v2.tsx +++ b/packages/opencode/src/kilocode/plugins/sync-v2.tsx @@ -10,7 +10,6 @@ import type { import { createStore, produce, reconcile } from "solid-js/store" import { createSimpleContext } from "@tui/context/helper" import { useSDK } from "@tui/context/sdk" -import { normalizeToolContent } from "@/kilocode/session/tool-content" function activeAssistant(messages: SessionMessage[]) { const index = messages.findIndex((message) => message.type === "assistant" && !message.time.completed) @@ -318,7 +317,7 @@ export const { use: useSyncV2, provider: SyncProviderV2 } = createSimpleContext( ) if (match?.state.status !== "running") return match.state.structured = event.properties.structured - match.state.content = normalizeToolContent(event.properties.content) + match.state.content = event.properties.content }) break case "session.next.tool.success": @@ -332,7 +331,7 @@ export const { use: useSyncV2, provider: SyncProviderV2 } = createSimpleContext( status: "completed", input: match.state.input, structured: event.properties.structured, - content: normalizeToolContent(event.properties.content), + content: event.properties.content, result: event.properties.result, } match.provider = { diff --git a/packages/opencode/src/kilocode/session/tool-content.ts b/packages/opencode/src/kilocode/session/tool-content.ts deleted file mode 100644 index e1e6b7300af..00000000000 --- a/packages/opencode/src/kilocode/session/tool-content.ts +++ /dev/null @@ -1,34 +0,0 @@ -import type { LlmToolContent } from "@kilocode/sdk/v2" - -/** - * Released Kilo installs persisted tool content as `{ type: "media", ... }` or - * `{ type: "file", source: { ... } }`. Durable events replay those rows verbatim, so - * consumers that store the current `LlmToolContent` shape must normalize first. - */ -export function normalizeToolContent(items: readonly unknown[]): LlmToolContent[] { - return items.map((item) => { - const value = item as Record - if (value.type === "media") - return { - type: "file" as const, - uri: String(value.data).startsWith("data:") ? value.data : `data:${value.mediaType};base64,${value.data}`, - mime: value.mediaType, - ...(value.filename === undefined ? {} : { name: value.filename }), - } - if (value.type === "file" && value.source !== undefined) { - const source = value.source - return { - type: "file" as const, - uri: - source.type === "data" - ? `data:${value.mime};base64,${source.data}` - : source.type === "url" - ? source.url - : source.uri, - mime: value.mime, - ...(value.name === undefined ? {} : { name: value.name }), - } - } - return value - }) as LlmToolContent[] -} diff --git a/packages/opencode/src/provider/auth.ts b/packages/opencode/src/provider/auth.ts index 58d34f5a718..304e275a43f 100644 --- a/packages/opencode/src/provider/auth.ts +++ b/packages/opencode/src/provider/auth.ts @@ -117,8 +117,7 @@ const layer: Layer.Layer( Effect.fn("ProviderAuth.state")(function* () { const plugins = yield* plugin.list() diff --git a/packages/opencode/src/server/routes/instance/httpapi/groups/question.ts b/packages/opencode/src/server/routes/instance/httpapi/groups/question.ts index e9e63429db2..33c310cbfec 100644 --- a/packages/opencode/src/server/routes/instance/httpapi/groups/question.ts +++ b/packages/opencode/src/server/routes/instance/httpapi/groups/question.ts @@ -67,7 +67,7 @@ export const QuestionApi = HttpApi.make("question") ) .annotateMerge( OpenApi.annotations({ - title: "opencode HttpApi", + title: "Kilo HttpApi", // kilocode_change version: "0.0.1", description: "Effect HttpApi surface for instance routes.", }), diff --git a/packages/opencode/src/tool/registry.ts b/packages/opencode/src/tool/registry.ts index f18fc6fc361..f4088af943f 100644 --- a/packages/opencode/src/tool/registry.ts +++ b/packages/opencode/src/tool/registry.ts @@ -397,8 +397,6 @@ const layer = Layer.effect( export const defaultLayer: Layer.Layer = Layer.suspend(() => AppNodeBuilder.build(node)) // kilocode_change - build from the LayerNode graph -// kilocode_change end - function isZodType(value: unknown): value is z.ZodType { return typeof value === "object" && value !== null && "_zod" in value } diff --git a/packages/opencode/test/session/compaction.test.ts b/packages/opencode/test/session/compaction.test.ts index c7dffd5a181..fbb683ac9ed 100644 --- a/packages/opencode/test/session/compaction.test.ts +++ b/packages/opencode/test/session/compaction.test.ts @@ -1292,7 +1292,6 @@ describe("session.compaction.process", () => { yield* Deferred.await(ready).pipe(Effect.timeout("5 seconds")) yield* Fiber.interrupt(fiber) const exit = yield* Fiber.await(fiber) - // kilocode_change end expect(Exit.isFailure(exit)).toBe(true) if (Exit.isFailure(exit)) { diff --git a/packages/protocol/src/api.ts b/packages/protocol/src/api.ts index 0d37fd64409..c7d52f855ef 100644 --- a/packages/protocol/src/api.ts +++ b/packages/protocol/src/api.ts @@ -55,7 +55,7 @@ const makeApiFromGroup = < .add(ProjectCopyGroup.middleware(locationMiddleware)) .annotateMerge( OpenApi.annotations({ - title: "opencode HttpApi", + title: "Kilo HttpApi", // kilocode_change - public API grouping is Kilo-branded version: "0.0.1", description: "Experimental HttpApi surface for selected instance routes.", }), diff --git a/packages/protocol/src/groups/session.ts b/packages/protocol/src/groups/session.ts index af67097b619..61e87e302ac 100644 --- a/packages/protocol/src/groups/session.ts +++ b/packages/protocol/src/groups/session.ts @@ -160,7 +160,7 @@ export const makeSessionGroup = < identifier: "v2.session.active", summary: "List active sessions", description: - "Retrieve foreground Session drains currently owned by this OpenCode process. Sessions absent from the result are inactive.", + "Retrieve foreground Session drains currently owned by this Kilo process. Sessions absent from the result are inactive.", }), ), ) @@ -362,7 +362,7 @@ export const makeSessionGroup = < OpenApi.annotations({ identifier: "v2.session.interrupt", summary: "Interrupt session execution", - description: "Interrupt active execution owned by this OpenCode process. Idle interruption is a no-op.", + description: "Interrupt active execution owned by this Kilo process. Idle interruption is a no-op.", }), ), ) diff --git a/packages/schema/src/session-event.ts b/packages/schema/src/session-event.ts index 11a9cf9c90c..db044c91f77 100644 --- a/packages/schema/src/session-event.ts +++ b/packages/schema/src/session-event.ts @@ -3,7 +3,7 @@ export * as SessionEvent from "./session-event" import { Schema } from "effect" import { optional } from "./schema" import { Event } from "./event" -import { ProviderMetadata, StoredToolContent, ToolContent } from "./llm" // kilocode_change - durable events decode released content +import { ProviderMetadata, ToolContent } from "./llm" import { Delivery } from "./session-delivery" import { Model } from "./model" import { DateTimeUtcFromMillis, NonNegativeInt, RelativePath } from "./schema" @@ -334,7 +334,7 @@ export namespace Tool { schema: { ...ToolBase, structured: Schema.Record(Schema.String, Schema.Unknown), - content: Schema.Array(StoredToolContent), // kilocode_change + content: Schema.Array(ToolContent), }, }) export type Progress = typeof Progress.Type @@ -345,7 +345,7 @@ export namespace Tool { schema: { ...ToolBase, structured: Schema.Record(Schema.String, Schema.Unknown), - content: Schema.Array(StoredToolContent), // kilocode_change + content: Schema.Array(ToolContent), outputPaths: Schema.Array(Schema.String).pipe(optional), result: Schema.Unknown.pipe(optional), provider: Schema.Struct({ diff --git a/packages/sdk/js/openapi.json b/packages/sdk/js/openapi.json deleted file mode 100644 index db454aaeeb5..00000000000 --- a/packages/sdk/js/openapi.json +++ /dev/null @@ -1 +0,0 @@ -{"openapi":"3.1.0","info":{"title":"kilo","version":"1.0.0","description":"kilo api"},"paths":{"/auth/{providerID}":{"put":{"tags":["control"],"operationId":"auth.set","parameters":[{"name":"providerID","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successfully set authentication credentials","content":{"application/json":{"schema":{"type":"boolean","description":"Successfully set authentication credentials"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Set authentication credentials","summary":"Set auth credentials","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Auth"}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.auth.set({\n ...\n})"}]},"delete":{"tags":["control"],"operationId":"auth.remove","parameters":[{"name":"providerID","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successfully removed authentication credentials","content":{"application/json":{"schema":{"type":"boolean","description":"Successfully removed authentication credentials"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Remove authentication credentials","summary":"Remove auth credentials","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.auth.remove({\n ...\n})"}]}},"/log":{"post":{"tags":["control"],"operationId":"app.log","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Log entry written successfully","content":{"application/json":{"schema":{"type":"boolean","description":"Log entry written successfully"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Write a log entry to the server logs with specified level and metadata.","summary":"Write log","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"service":{"type":"string","description":"Service name for the log entry"},"level":{"type":"string","enum":["debug","info","error","warn"],"description":"Log level"},"message":{"type":"string","description":"Log message"},"extra":{"type":"object"}},"required":["service","level","message"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.app.log({\n ...\n})"}]}},"/experimental/control-plane/move-session":{"post":{"tags":["controlPlane"],"operationId":"experimental.controlPlane.moveSession","parameters":[],"responses":{"204":{"description":"Session moved"},"400":{"description":"MoveSessionError | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MoveSessionError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Move a session to another project directory, optionally transferring local changes.","summary":"Move session","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"destination":{"$ref":"#/components/schemas/MoveSessionDestination"},"moveChanges":{"type":"boolean"}},"required":["sessionID","destination"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.experimental.controlPlane.moveSession({\n ...\n})"}]}},"/global/health":{"get":{"tags":["global"],"operationId":"global.health","parameters":[],"responses":{"200":{"description":"Health information","content":{"application/json":{"schema":{"type":"object","properties":{"healthy":{"type":"boolean","enum":[true]},"version":{"type":"string"}},"required":["healthy","version"],"additionalProperties":false,"description":"Health information"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Get health information about the Kilo server.","summary":"Get health","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.global.health({\n ...\n})"}]}},"/global/event":{"get":{"tags":["global"],"operationId":"global.event","parameters":[],"responses":{"200":{"description":"Event stream","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/GlobalEvent"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Subscribe to global events from the Kilo system using server-sent events.","summary":"Get global events","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.global.event({\n ...\n})"}]}},"/global/config":{"get":{"tags":["global"],"operationId":"global.config.get","parameters":[],"responses":{"200":{"description":"Get global config info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Config"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Retrieve the current global Kilo configuration settings and preferences.","summary":"Get global configuration","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.global.config.get({\n ...\n})"}]},"patch":{"tags":["global"],"operationId":"global.config.update","parameters":[],"responses":{"200":{"description":"Successfully updated global config","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Config"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Update global Kilo configuration settings and preferences.","summary":"Update global configuration","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Config"}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.global.config.update({\n ...\n})"}]}},"/global/dispose":{"post":{"tags":["global"],"operationId":"global.dispose","parameters":[],"responses":{"200":{"description":"Global disposed","content":{"application/json":{"schema":{"type":"boolean","description":"Global disposed"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Clean up and dispose all Kilo instances, releasing all resources.","summary":"Dispose instance","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.global.dispose({\n ...\n})"}]}},"/global/upgrade":{"post":{"tags":["global"],"operationId":"global.upgrade","parameters":[],"responses":{"200":{"description":"Upgrade result","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"version":{"type":"string"}},"required":["success","version"],"additionalProperties":false},{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"string"}},"required":["success","error"],"additionalProperties":false}],"description":"Upgrade result"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Upgrade kilo to the specified version or latest if not specified.","summary":"Upgrade kilo","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"target":{"type":"string"}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.global.upgrade({\n ...\n})"}]}},"/event":{"get":{"tags":["event"],"operationId":"event.subscribe","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Event stream","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/Event"}}}}},"description":"Get events","summary":"Subscribe to events","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.event.subscribe({\n ...\n})"}]}},"/config":{"get":{"tags":["config"],"operationId":"config.get","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Get config info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Config"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Retrieve the current Kilo configuration settings and preferences.","summary":"Get configuration","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.config.get({\n ...\n})"}]},"patch":{"tags":["config"],"operationId":"config.update","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Successfully updated config","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Config"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Update Kilo configuration settings and preferences.","summary":"Update configuration","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Config"}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.config.update({\n ...\n})"}]}},"/config/warnings":{"get":{"tags":["config"],"operationId":"config.warnings","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Config warnings","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"},"detail":{"type":"string"}},"required":["path","message"],"additionalProperties":false},"description":"Config warnings"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Get warnings generated during config loading (e.g., invalid JSON, schema errors).","summary":"Get config warnings","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.config.warnings({\n ...\n})"}]}},"/config/providers":{"get":{"tags":["config"],"operationId":"config.providers","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"List of providers","content":{"application/json":{"schema":{"type":"object","properties":{"providers":{"type":"array","items":{"$ref":"#/components/schemas/Provider"}},"default":{"type":"object","additionalProperties":{"type":"string"}}},"required":["providers","default"],"additionalProperties":false,"description":"List of providers"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Get a list of all configured AI providers and their default models.","summary":"List config providers","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.config.providers({\n ...\n})"}]}},"/experimental/capabilities":{"get":{"tags":["experimental"],"operationId":"experimental.capabilities.get","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Experimental capabilities","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentalCapabilities"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Get experimental features enabled on the Kilo server.","summary":"Get experimental capabilities","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.experimental.capabilities.get({\n ...\n})"}]}},"/experimental/console":{"get":{"tags":["experimental"],"operationId":"experimental.console.get","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Active Console provider metadata","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsoleState"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"500":{"description":"InternalServerError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/effect_HttpApiError_InternalServerError"}}}}},"description":"Get the active Console org name and the set of provider IDs managed by that Console org.","summary":"Get active Console provider metadata","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.experimental.console.get({\n ...\n})"}]}},"/experimental/console/orgs":{"get":{"tags":["experimental"],"operationId":"experimental.console.listOrgs","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Switchable Console orgs","content":{"application/json":{"schema":{"type":"object","properties":{"orgs":{"type":"array","items":{"type":"object","properties":{"accountID":{"type":"string"},"accountEmail":{"type":"string"},"accountUrl":{"type":"string"},"orgID":{"type":"string"},"orgName":{"type":"string"},"active":{"type":"boolean"}},"required":["accountID","accountEmail","accountUrl","orgID","orgName","active"],"additionalProperties":false}}},"required":["orgs"],"additionalProperties":false,"description":"Switchable Console orgs"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"500":{"description":"InternalServerError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/effect_HttpApiError_InternalServerError"}}}}},"description":"Get the available Console orgs across logged-in accounts, including the current active org.","summary":"List switchable Console orgs","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.experimental.console.listOrgs({\n ...\n})"}]}},"/experimental/console/switch":{"post":{"tags":["experimental"],"operationId":"experimental.console.switchOrg","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Switch success","content":{"application/json":{"schema":{"type":"boolean","description":"Switch success"}}}}},"description":"Persist a new active Console account/org selection for the current local Kilo state.","summary":"Switch active Console org","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"accountID":{"type":"string"},"orgID":{"type":"string"}},"required":["accountID","orgID"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.experimental.console.switchOrg({\n ...\n})"}]}},"/experimental/tool":{"get":{"tags":["experimental"],"operationId":"tool.list","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false},{"name":"provider","in":"query","schema":{"type":"string"},"required":true},{"name":"model","in":"query","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Tools","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolList"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Get a list of available tools with their JSON schema parameters for a specific provider and model combination.","summary":"List tools","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.tool.list({\n ...\n})"}]}},"/experimental/tool/ids":{"get":{"tags":["experimental"],"operationId":"tool.ids","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Tool IDs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolIDs"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.","summary":"List tool IDs","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.tool.ids({\n ...\n})"}]}},"/experimental/worktree":{"get":{"tags":["experimental"],"operationId":"worktree.list","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"List of worktrees","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorktreeListItem"},"description":"List of worktrees"}}}},"400":{"description":"WorktreeError | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WorktreeError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"List all git worktrees for the current project and whether Kilo manages them.","summary":"List worktrees","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.worktree.list({\n ...\n})"}]},"post":{"tags":["experimental"],"operationId":"worktree.create","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Worktree created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Worktree"}}}},"400":{"description":"WorktreeError | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WorktreeError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Create a new git worktree for the current project and run any configured startup scripts.","summary":"Create worktree","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorktreeCreateInput"}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.worktree.create({\n ...\n})"}]},"delete":{"tags":["experimental"],"operationId":"worktree.remove","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Worktree removed","content":{"application/json":{"schema":{"type":"boolean","description":"Worktree removed"}}}},"400":{"description":"WorktreeError | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WorktreeError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Remove a git worktree and delete its branch.","summary":"Remove worktree","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorktreeRemoveInput"}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.worktree.remove({\n ...\n})"}]}},"/experimental/worktree/reset":{"post":{"tags":["experimental"],"operationId":"worktree.reset","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Worktree reset","content":{"application/json":{"schema":{"type":"boolean","description":"Worktree reset"}}}},"400":{"description":"WorktreeError | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WorktreeError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Reset a worktree branch to the primary default branch.","summary":"Reset worktree","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorktreeResetInput"}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.worktree.reset({\n ...\n})"}]}},"/experimental/worktree/diff":{"get":{"tags":["experimental"],"operationId":"worktree.diff","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false},{"name":"base","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"File diffs","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SnapshotFileDiff"},"description":"File diffs"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Get file diffs for a worktree compared to its base branch. Includes uncommitted changes.","summary":"Get worktree diff","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.worktree.diff({\n ...\n})"}]}},"/experimental/worktree/diff/summary":{"get":{"tags":["experimental"],"operationId":"worktree.diffSummary","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false},{"name":"base","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Diff summary items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorktreeDiffItem"},"description":"Diff summary items"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Get lightweight file diff metadata for a worktree compared to its base branch.","summary":"Get worktree diff summary","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.worktree.diffSummary({\n ...\n})"}]}},"/experimental/worktree/diff/file":{"get":{"tags":["experimental"],"operationId":"worktree.diffFile","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false},{"name":"base","in":"query","schema":{"type":"string"},"required":false},{"name":"file","in":"query","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Diff detail item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorktreeDiffItem"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Get full diff contents for one worktree file compared to its base branch.","summary":"Get worktree diff detail","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.worktree.diffFile({\n ...\n})"}]}},"/experimental/session":{"get":{"tags":["experimental"],"operationId":"experimental.session.list","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false},{"name":"projectID","in":"query","schema":{"type":"string"},"required":false},{"name":"worktrees","in":"query","schema":{"type":"boolean"},"required":false},{"name":"current","in":"query","schema":{"type":"string","enum":["true","false"]},"required":false},{"name":"roots","in":"query","schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"required":false},{"name":"start","in":"query","schema":{"type":"number"},"required":false},{"name":"cursor","in":"query","schema":{"type":"number"},"required":false},{"name":"search","in":"query","schema":{"type":"string"},"required":false},{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"archived","in":"query","schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"required":false}],"responses":{"200":{"description":"List of sessions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GlobalSession"},"description":"List of sessions"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Get a list of all Kilo sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.","summary":"List sessions","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.experimental.session.list({\n ...\n})"}]}},"/experimental/session/{sessionID}/background":{"post":{"tags":["experimental"],"operationId":"experimental.session.background","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Backgrounded subagents","content":{"application/json":{"schema":{"type":"boolean","description":"Backgrounded subagents"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Detach any synchronous subagents currently blocking the session and continue them in the background.","summary":"Background subagents","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.experimental.session.background({\n ...\n})"}]}},"/experimental/resource":{"get":{"tags":["experimental"],"operationId":"experimental.resource.list","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"MCP resources","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/McpResource"},"description":"MCP resources"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Get all available MCP resources from connected servers. Optionally filter by name.","summary":"Get MCP resources","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.experimental.resource.list({\n ...\n})"}]}},"/find":{"get":{"tags":["file"],"operationId":"find.text","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false},{"name":"pattern","in":"query","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Matches","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"path":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"],"additionalProperties":false},"lines":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"],"additionalProperties":false},"line_number":{"type":"integer","minimum":0},"absolute_offset":{"type":"integer","minimum":0},"submatches":{"type":"array","items":{"type":"object","properties":{"match":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"],"additionalProperties":false},"start":{"type":"integer","minimum":0},"end":{"type":"integer","minimum":0}},"required":["match","start","end"],"additionalProperties":false}}},"required":["path","lines","line_number","absolute_offset","submatches"],"additionalProperties":false},"description":"Matches"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Search for text patterns across files in the project using ripgrep.","summary":"Find text","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.find.text({\n ...\n})"}]}},"/find/file":{"get":{"tags":["file"],"operationId":"find.files","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false},{"name":"query","in":"query","schema":{"type":"string"},"required":true},{"name":"dirs","in":"query","schema":{"type":"string","enum":["true","false"]},"required":false},{"name":"type","in":"query","schema":{"type":"string","enum":["file","directory"]},"required":false},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200},"required":false}],"responses":{"200":{"description":"File paths","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"description":"File paths"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Search for files or directories by name or pattern in the project directory.","summary":"Find files","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.find.files({\n ...\n})"}]}},"/find/symbol":{"get":{"tags":["file"],"operationId":"find.symbols","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false},{"name":"query","in":"query","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Symbols","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Symbol"},"description":"Symbols"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Search for workspace symbols like functions, classes, and variables using LSP.","summary":"Find symbols","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.find.symbols({\n ...\n})"}]}},"/file":{"get":{"tags":["file"],"operationId":"file.list","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false},{"name":"path","in":"query","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Files and directories","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FileNode"},"description":"Files and directories"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"List files and directories in a specified path.","summary":"List files","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.file.list({\n ...\n})"}]}},"/file/content":{"get":{"tags":["file"],"operationId":"file.read","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false},{"name":"path","in":"query","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"File content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileContent"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Read the content of a specified file.","summary":"Read file","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.file.read({\n ...\n})"}]}},"/file/status":{"get":{"tags":["file"],"operationId":"file.status","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"File status","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/File"},"description":"File status"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Get the git status of all files in the project.","summary":"Get file status","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.file.status({\n ...\n})"}]}},"/instance/dispose":{"post":{"tags":["instance"],"operationId":"instance.dispose","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Instance disposed","content":{"application/json":{"schema":{"type":"boolean","description":"Instance disposed"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Clean up and dispose the current Kilo instance, releasing all resources.","summary":"Dispose instance","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.instance.dispose({\n ...\n})"}]}},"/path":{"get":{"tags":["instance"],"operationId":"path.get","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Path","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Path"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Retrieve the current working directory and related path information for the Kilo instance.","summary":"Get paths","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.path.get({\n ...\n})"}]}},"/vcs":{"get":{"tags":["instance"],"operationId":"vcs.get","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"VCS info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VcsInfo"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Retrieve version control system (VCS) information for the current project, such as git branch.","summary":"Get VCS info","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.vcs.get({\n ...\n})"}]}},"/vcs/status":{"get":{"tags":["instance"],"operationId":"vcs.status","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"VCS status","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VcsFileStatus"},"description":"VCS status"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Retrieve changed files in the current working tree without patches.","summary":"Get VCS status","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.vcs.status({\n ...\n})"}]}},"/vcs/diff":{"get":{"tags":["instance"],"operationId":"vcs.diff","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false},{"name":"mode","in":"query","schema":{"type":"string","enum":["git","branch"]},"required":true},{"name":"context","in":"query","schema":{"type":"integer","minimum":0},"required":false}],"responses":{"200":{"description":"VCS diff","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VcsFileDiff"},"description":"VCS diff"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Retrieve the current git diff for the working tree or against the default branch.","summary":"Get VCS diff","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.vcs.diff({\n ...\n})"}]}},"/vcs/diff/raw":{"get":{"tags":["instance"],"operationId":"vcs.diff.raw","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Raw VCS diff","content":{"text/x-diff; charset=utf-8":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Retrieve a raw patch for current uncommitted changes.","summary":"Get raw VCS diff","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.vcs.diff.raw({\n ...\n})"}]}},"/vcs/apply":{"post":{"tags":["instance"],"operationId":"vcs.apply","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"VCS patch applied","content":{"application/json":{"schema":{"type":"object","properties":{"applied":{"type":"boolean"}},"required":["applied"],"additionalProperties":false,"description":"VCS patch applied"}}}},"400":{"description":"VcsApplyError | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/VcsApplyError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Apply a raw patch to the current working tree.","summary":"Apply VCS patch","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"patch":{"type":"string"}},"required":["patch"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.vcs.apply({\n ...\n})"}]}},"/command":{"get":{"tags":["instance"],"operationId":"command.list","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"List of commands","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Command"},"description":"List of commands"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Get a list of all available commands in the Kilo system.","summary":"List commands","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.command.list({\n ...\n})"}]}},"/agent":{"get":{"tags":["instance"],"operationId":"app.agents","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"List of agents","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Agent"},"description":"List of agents"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Get a list of all available AI agents in the Kilo system.","summary":"List agents","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.app.agents({\n ...\n})"}]}},"/skill":{"get":{"tags":["instance"],"operationId":"app.skills","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"List of skills","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"location":{"type":"string"},"content":{"type":"string"}},"required":["name","location","content"],"additionalProperties":false},"description":"List of skills"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Get a list of all available skills in the Kilo system.","summary":"List skills","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.app.skills({\n ...\n})"}]}},"/lsp":{"get":{"tags":["instance"],"operationId":"lsp.status","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"LSP server status","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LSPStatus"},"description":"LSP server status"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Get LSP server status","summary":"Get LSP status","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.lsp.status({\n ...\n})"}]}},"/formatter":{"get":{"tags":["instance"],"operationId":"formatter.status","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Formatter status","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FormatterStatus"},"description":"Formatter status"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Get formatter status","summary":"Get formatter status","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.formatter.status({\n ...\n})"}]}},"/mcp":{"get":{"tags":["mcp"],"operationId":"mcp.status","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"MCP server status","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MCPStatus"},"description":"MCP server status"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Get the status of all Model Context Protocol (MCP) servers.","summary":"Get MCP status","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.mcp.status({\n ...\n})"}]},"post":{"tags":["mcp"],"operationId":"mcp.add","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"MCP server added successfully","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MCPStatus"},"description":"MCP server added successfully"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Dynamically add a new Model Context Protocol (MCP) server to the system.","summary":"Add MCP server","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"config":{"anyOf":[{"$ref":"#/components/schemas/McpLocalConfig"},{"$ref":"#/components/schemas/McpRemoteConfig"}]}},"required":["name","config"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.mcp.add({\n ...\n})"}]}},"/mcp/{name}/auth":{"post":{"tags":["mcp"],"operationId":"mcp.auth.start","parameters":[{"name":"name","in":"path","schema":{"type":"string"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"OAuth flow started","content":{"application/json":{"schema":{"type":"object","properties":{"authorizationUrl":{"type":"string"},"oauthState":{"type":"string"}},"required":["authorizationUrl","oauthState"],"additionalProperties":false,"description":"OAuth flow started"}}}},"400":{"description":"McpUnsupportedOAuthError | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/McpUnsupportedOAuthError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"McpServerNotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerNotFoundError"}}}}},"description":"Start OAuth authentication flow for a Model Context Protocol (MCP) server.","summary":"Start MCP OAuth","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.mcp.auth.start({\n ...\n})"}]},"delete":{"tags":["mcp"],"operationId":"mcp.auth.remove","parameters":[{"name":"name","in":"path","schema":{"type":"string"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"OAuth credentials removed","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"],"additionalProperties":false,"description":"OAuth credentials removed"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"404":{"description":"McpServerNotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerNotFoundError"}}}}},"description":"Remove OAuth credentials for an MCP server.","summary":"Remove MCP OAuth","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.mcp.auth.remove({\n ...\n})"}]}},"/mcp/{name}/auth/callback":{"post":{"tags":["mcp"],"operationId":"mcp.auth.callback","parameters":[{"name":"name","in":"path","schema":{"type":"string"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"OAuth authentication completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPStatus"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"McpServerNotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerNotFoundError"}}}}},"description":"Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.","summary":"Complete MCP OAuth","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"}},"required":["code"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.mcp.auth.callback({\n ...\n})"}]}},"/mcp/{name}/auth/authenticate":{"post":{"tags":["mcp"],"operationId":"mcp.auth.authenticate","parameters":[{"name":"name","in":"path","schema":{"type":"string"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"OAuth authentication completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPStatus"}}}},"400":{"description":"McpUnsupportedOAuthError | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/McpUnsupportedOAuthError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"McpServerNotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerNotFoundError"}}}}},"description":"Start OAuth flow and wait for callback (opens browser).","summary":"Authenticate MCP OAuth","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.mcp.auth.authenticate({\n ...\n})"}]}},"/mcp/{name}/connect":{"post":{"tags":["mcp"],"operationId":"mcp.connect","parameters":[{"name":"name","in":"path","schema":{"type":"string"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"MCP server connected successfully","content":{"application/json":{"schema":{"type":"boolean","description":"MCP server connected successfully"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"404":{"description":"McpServerNotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerNotFoundError"}}}}},"description":"Connect an MCP server.","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.mcp.connect({\n ...\n})"}]}},"/mcp/{name}/disconnect":{"post":{"tags":["mcp"],"operationId":"mcp.disconnect","parameters":[{"name":"name","in":"path","schema":{"type":"string"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"MCP server disconnected successfully","content":{"application/json":{"schema":{"type":"boolean","description":"MCP server disconnected successfully"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"404":{"description":"McpServerNotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerNotFoundError"}}}}},"description":"Disconnect an MCP server.","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.mcp.disconnect({\n ...\n})"}]}},"/project":{"get":{"tags":["project"],"operationId":"project.list","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"List of projects","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Project"},"description":"List of projects"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Get a list of projects that have been opened with Kilo.","summary":"List all projects","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.project.list({\n ...\n})"}]}},"/project/current":{"get":{"tags":["project"],"operationId":"project.current","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Current project information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Retrieve the currently active project that Kilo is working with.","summary":"Get current project","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.project.current({\n ...\n})"}]}},"/project/git/init":{"post":{"tags":["project"],"operationId":"project.initGit","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Project information after git initialization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Create a git repository for the current project and return the refreshed project info.","summary":"Initialize git repository","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.project.initGit({\n ...\n})"}]}},"/project/{projectID}":{"patch":{"tags":["project"],"operationId":"project.update","parameters":[{"name":"projectID","in":"path","schema":{"type":"string"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Updated project information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"ProjectNotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectNotFoundError"}}}}},"description":"Update project properties such as name, icon, and commands.","summary":"Update project","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"icon":{"$ref":"#/components/schemas/ProjectIcon"},"commands":{"$ref":"#/components/schemas/ProjectCommands"}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.project.update({\n ...\n})"}]}},"/project/{projectID}/directories":{"get":{"tags":["project"],"operationId":"project.directories","parameters":[{"name":"projectID","in":"path","schema":{"type":"string"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Project directories","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectDirectories"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"List known local absolute directories for a project.","summary":"List project directories","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.project.directories({\n ...\n})"}]}},"/experimental/project/{projectID}/copy/generate-name":{"post":{"tags":["projectCopy"],"operationId":"experimental.projectCopy.generateName","parameters":[{"name":"projectID","in":"path","schema":{"type":"string"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Generate a short name for a project copy from task context.","summary":"Generate project copy name","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"context":{"type":"string"}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.experimental.projectCopy.generateName({\n ...\n})"}]}},"/pty/shells":{"get":{"tags":["pty"],"operationId":"pty.shells","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"List of shells","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"name":{"type":"string"},"acceptable":{"type":"boolean"}},"required":["path","name","acceptable"],"additionalProperties":false},"description":"List of shells"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Get a list of available shells on the system.","summary":"List available shells","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.pty.shells({\n ...\n})"}]}},"/pty":{"get":{"tags":["pty"],"operationId":"pty.list","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"List of sessions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Pty"},"description":"List of sessions"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Get a list of all active pseudo-terminal (PTY) sessions managed by Kilo.","summary":"List PTY sessions","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.pty.list({\n ...\n})"}]},"post":{"tags":["pty"],"operationId":"pty.create","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Created session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pty"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Create a new pseudo-terminal (PTY) session for running shell commands and processes.","summary":"Create PTY session","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"command":{"type":"string"},"args":{"type":"array","items":{"type":"string"}},"cwd":{"type":"string"},"title":{"type":"string"},"env":{"type":"object","additionalProperties":{"type":"string"}}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.pty.create({\n ...\n})"}]}},"/pty/{ptyID}":{"get":{"tags":["pty"],"operationId":"pty.get","parameters":[{"name":"ptyID","in":"path","schema":{"type":"string","pattern":"^pty.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Session info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pty"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"404":{"description":"PtyNotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PtyNotFoundError"}}}}},"description":"Retrieve detailed information about a specific pseudo-terminal (PTY) session.","summary":"Get PTY session","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.pty.get({\n ...\n})"}]},"put":{"tags":["pty"],"operationId":"pty.update","parameters":[{"name":"ptyID","in":"path","schema":{"type":"string","pattern":"^pty.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Updated session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pty"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"PtyNotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PtyNotFoundError"}}}}},"description":"Update properties of an existing pseudo-terminal (PTY) session.","summary":"Update PTY session","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"size":{"type":"object","properties":{"rows":{"type":"integer","exclusiveMinimum":0},"cols":{"type":"integer","exclusiveMinimum":0}},"required":["rows","cols"],"additionalProperties":false},"sessionID":{"anyOf":[{"type":"string","pattern":"^ses"},{"type":"null"}]}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.pty.update({\n ...\n})"}]},"delete":{"tags":["pty"],"operationId":"pty.remove","parameters":[{"name":"ptyID","in":"path","schema":{"type":"string","pattern":"^pty.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Session removed","content":{"application/json":{"schema":{"type":"boolean","description":"Session removed"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"404":{"description":"PtyNotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PtyNotFoundError"}}}}},"description":"Remove and terminate a specific pseudo-terminal (PTY) session.","summary":"Remove PTY session","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.pty.remove({\n ...\n})"}]}},"/pty/{ptyID}/connect-token":{"post":{"tags":["pty"],"operationId":"pty.connectToken","parameters":[{"name":"ptyID","in":"path","schema":{"type":"string","pattern":"^pty.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"WebSocket connect token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PtyTicketConnectToken"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"403":{"description":"PtyForbiddenError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PtyForbiddenError"}}}},"404":{"description":"PtyNotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PtyNotFoundError"}}}}},"description":"Create a short-lived ticket for opening a PTY WebSocket connection.","summary":"Create PTY WebSocket token","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.pty.connectToken({\n ...\n})"}]}},"/question":{"get":{"tags":["question"],"operationId":"question.list","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"List of pending questions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/QuestionRequest"},"description":"List of pending questions"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Get all pending question requests across all sessions.","summary":"List pending questions","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.question.list({\n ...\n})"}]}},"/question/{requestID}/reply":{"post":{"tags":["question"],"operationId":"question.reply","parameters":[{"name":"requestID","in":"path","schema":{"type":"string","pattern":"^que.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Question answered successfully","content":{"application/json":{"schema":{"type":"boolean","description":"Question answered successfully"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"QuestionNotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionNotFoundError"}}}}},"description":"Provide answers to a question request from the AI assistant.","summary":"Reply to question request","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"answers":{"type":"array","items":{"$ref":"#/components/schemas/QuestionAnswer"},"description":"User answers in order of questions (each answer is an array of selected labels)"}},"required":["answers"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.question.reply({\n ...\n})"}]}},"/question/{requestID}/reject":{"post":{"tags":["question"],"operationId":"question.reject","parameters":[{"name":"requestID","in":"path","schema":{"type":"string","pattern":"^que.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Question rejected successfully","content":{"application/json":{"schema":{"type":"boolean","description":"Question rejected successfully"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"QuestionNotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionNotFoundError"}}}}},"description":"Reject a question request from the AI assistant.","summary":"Reject question request","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.question.reject({\n ...\n})"}]}},"/permission":{"get":{"tags":["permission"],"operationId":"permission.list","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"List of pending permissions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PermissionRequest"},"description":"List of pending permissions"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Get all pending permission requests across all sessions.","summary":"List pending permissions","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.permission.list({\n ...\n})"}]}},"/permission/{requestID}/reply":{"post":{"tags":["permission"],"operationId":"permission.reply","parameters":[{"name":"requestID","in":"path","schema":{"type":"string","pattern":"^per.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Permission processed successfully","content":{"application/json":{"schema":{"type":"boolean","description":"Permission processed successfully"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"PermissionNotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionNotFoundError"}}}}},"description":"Approve or deny a permission request from the AI assistant.","summary":"Respond to permission request","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reply":{"type":"string","enum":["once","always","reject"]},"message":{"type":"string"}},"required":["reply"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.permission.reply({\n ...\n})"}]}},"/permission/{requestID}/always-rules":{"post":{"tags":["permission"],"operationId":"permission.saveAlwaysRules","parameters":[{"name":"requestID","in":"path","schema":{"type":"string","pattern":"^per.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Always-rules saved","content":{"application/json":{"schema":{"type":"boolean","description":"Always-rules saved"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"404":{"description":"PermissionNotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionNotFoundError"}}}}},"description":"Save approved/denied always-rules for a pending permission request.","summary":"Save always-allow/deny permission rules","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"approvedAlways":{"type":"array","items":{"type":"string"}},"deniedAlways":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.permission.saveAlwaysRules({\n ...\n})"}]}},"/permission/allow-everything":{"post":{"tags":["permission"],"operationId":"permission.allowEverything","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"boolean","description":"Success"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"PermissionNotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionNotFoundError"}}}}},"description":"Enable or disable allowing all permissions without prompts.","summary":"Allow everything","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"enable":{"type":"boolean"},"requestID":{"type":"string"},"sessionID":{"type":"string"}},"required":["enable"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.permission.allowEverything({\n ...\n})"}]}},"/provider":{"get":{"tags":["provider"],"operationId":"provider.list","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"List of providers","content":{"application/json":{"schema":{"type":"object","properties":{"all":{"type":"array","items":{"$ref":"#/components/schemas/Provider"}},"default":{"type":"object","additionalProperties":{"type":"string"}},"connected":{"type":"array","items":{"type":"string"}},"failed":{"type":"array","items":{"type":"string"}}},"required":["all","default","connected","failed"],"additionalProperties":false,"description":"List of providers"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Get a list of all available AI providers, including both available and connected ones.","summary":"List providers","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.provider.list({\n ...\n})"}]}},"/provider/auth":{"get":{"tags":["provider"],"operationId":"provider.auth","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Provider auth methods","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/ProviderAuthMethod"}},"description":"Provider auth methods"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Retrieve available authentication methods for all AI providers.","summary":"Get provider auth methods","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.provider.auth({\n ...\n})"}]}},"/provider/{providerID}/oauth/authorize":{"post":{"tags":["provider"],"operationId":"provider.oauth.authorize","parameters":[{"name":"providerID","in":"path","schema":{"type":"string"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Authorization URL and method","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderAuthAuthorization"}}}},"400":{"description":"ProviderAuthError | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ProviderAuthError1"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Start the OAuth authorization flow for a provider.","summary":"Start OAuth authorization","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"method":{"type":"number","description":"Auth method index"},"inputs":{"type":"object","additionalProperties":{"type":"string"}}},"required":["method"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.provider.oauth.authorize({\n ...\n})"}]}},"/provider/{providerID}/oauth/callback":{"post":{"tags":["provider"],"operationId":"provider.oauth.callback","parameters":[{"name":"providerID","in":"path","schema":{"type":"string"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"OAuth callback processed successfully","content":{"application/json":{"schema":{"type":"boolean","description":"OAuth callback processed successfully"}}}},"400":{"description":"ProviderAuthError | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ProviderAuthError1"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Handle the OAuth callback from a provider after user authorization.","summary":"Handle OAuth callback","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"method":{"type":"number","description":"Auth method index"},"code":{"type":"string"}},"required":["method"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.provider.oauth.callback({\n ...\n})"}]}},"/session":{"get":{"tags":["session"],"operationId":"session.list","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false},{"name":"scope","in":"query","schema":{"type":"string","enum":["project"]},"required":false},{"name":"path","in":"query","schema":{"type":"string"},"required":false},{"name":"roots","in":"query","schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"required":false},{"name":"start","in":"query","schema":{"type":"number"},"required":false},{"name":"search","in":"query","schema":{"type":"string"},"required":false},{"name":"limit","in":"query","schema":{"type":"number"},"required":false}],"responses":{"200":{"description":"List of sessions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Session1"},"description":"List of sessions"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Get a list of all Kilo sessions, sorted by most recently updated.","summary":"List sessions","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.session.list({\n ...\n})"}]},"post":{"tags":["session"],"operationId":"session.create","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Successfully created session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session3"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Create a new Kilo session for interacting with AI assistants and managing conversations.","summary":"Create session","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"parentID":{"type":"string","pattern":"^ses"},"title":{"type":"string"},"agent":{"type":"string"},"model":{"type":"object","properties":{"id":{"type":"string"},"providerID":{"type":"string"},"variant":{"type":"string"}},"required":["id","providerID"],"additionalProperties":false},"metadata":{"type":"object"},"permission":{"$ref":"#/components/schemas/PermissionRuleset"},"platform":{"type":"string"},"workspaceID":{"type":"string","pattern":"^wrk"},"sandboxInheritanceToken":{"type":"string"}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.session.create({\n ...\n})"}]}},"/session/status":{"get":{"tags":["session"],"operationId":"session.status","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Get session status","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/SessionStatus"},"description":"Get session status"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Retrieve the current status of all sessions, including active, idle, and completed states.","summary":"Get session status","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.session.status({\n ...\n})"}]}},"/session/{sessionID}":{"get":{"tags":["session"],"operationId":"session.get","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Get session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session2"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Retrieve detailed information about a specific Kilo session.","summary":"Get session","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.session.get({\n ...\n})"}]},"delete":{"tags":["session"],"operationId":"session.delete","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Successfully deleted session","content":{"application/json":{"schema":{"type":"boolean","description":"Successfully deleted session"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Delete a session and permanently remove all associated data, including messages and history.","summary":"Delete session","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.session.delete({\n ...\n})"}]},"patch":{"tags":["session"],"operationId":"session.update","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Successfully updated session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session4"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Update properties of an existing session, such as title or other metadata.","summary":"Update session","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"metadata":{"type":"object"},"permission":{"$ref":"#/components/schemas/PermissionRuleset"},"time":{"type":"object","properties":{"archived":{"type":"number"}},"additionalProperties":false}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.session.update({\n ...\n})"}]}},"/session/{sessionID}/children":{"get":{"tags":["session"],"operationId":"session.children","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"List of children","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Session1"},"description":"List of children"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Retrieve all child sessions that were forked from the specified parent session.","summary":"Get session children","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.session.children({\n ...\n})"}]}},"/session/{sessionID}/todo":{"get":{"tags":["session"],"operationId":"session.todo","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Todo list","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Todo"},"description":"Todo list"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Retrieve the todo list associated with a specific session, showing tasks and action items.","summary":"Get session todos","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.session.todo({\n ...\n})"}]}},"/session/{sessionID}/diff":{"get":{"tags":["session"],"operationId":"session.diff","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false},{"name":"messageID","in":"query","schema":{"type":"string","pattern":"^msg"},"required":false}],"responses":{"200":{"description":"Successfully retrieved diff","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SnapshotFileDiff"},"description":"Successfully retrieved diff"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Get the file changes (diff) that resulted from a specific user message in the session.","summary":"Get message diff","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.session.diff({\n ...\n})"}]}},"/session/{sessionID}/message":{"get":{"tags":["session"],"operationId":"session.messages","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false},{"name":"limit","in":"query","schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"required":false},{"name":"before","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"List of messages","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"info":{"$ref":"#/components/schemas/Message"},"parts":{"type":"array","items":{"$ref":"#/components/schemas/Part"}}},"required":["info","parts"],"additionalProperties":false},"description":"List of messages"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Retrieve all messages in a session, including user prompts and AI responses.","summary":"Get session messages","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.session.messages({\n ...\n})"}]},"post":{"tags":["session"],"operationId":"session.prompt","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Created message","content":{"application/json":{"schema":{"type":"object","required":["info","parts"],"properties":{"info":{"$ref":"#/components/schemas/AssistantMessage"},"parts":{"type":"array","items":{"$ref":"#/components/schemas/Part"}}}}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Create and send a new message to a session, streaming the AI response.","summary":"Send message","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"messageID":{"type":"string","pattern":"^msg"},"model":{"type":"object","properties":{"providerID":{"type":"string"},"modelID":{"type":"string"}},"required":["providerID","modelID"],"additionalProperties":false},"agent":{"type":"string"},"noReply":{"type":"boolean"},"tools":{"type":"object","additionalProperties":{"type":"boolean"}},"format":{"$ref":"#/components/schemas/OutputFormat"},"system":{"type":"string"},"variant":{"type":"string"},"snapshotInitialization":{"type":"string","enum":["wait"]},"editorContext":{"type":"object","properties":{"directory":{"type":"string"},"worktree":{"type":"string"},"visibleFiles":{"type":"array","items":{"type":"string"}},"openTabs":{"type":"array","items":{"type":"string"}},"activeFile":{"type":"string"},"shell":{"type":"string"}},"additionalProperties":false},"parts":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/TextPartInput"},{"$ref":"#/components/schemas/FilePartInput"},{"$ref":"#/components/schemas/AgentPartInput"},{"$ref":"#/components/schemas/SubtaskPartInput"}]}}},"required":["parts"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.session.prompt({\n ...\n})"}]}},"/session/{sessionID}/message/{messageID}":{"get":{"tags":["session"],"operationId":"session.message","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"messageID","in":"path","schema":{"type":"string","pattern":"^msg.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Message","content":{"application/json":{"schema":{"type":"object","properties":{"info":{"$ref":"#/components/schemas/Message"},"parts":{"type":"array","items":{"$ref":"#/components/schemas/Part"}}},"required":["info","parts"],"additionalProperties":false,"description":"Message"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Retrieve a specific message from a session by its message ID.","summary":"Get message","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.session.message({\n ...\n})"}]},"delete":{"tags":["session"],"operationId":"session.deleteMessage","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"messageID","in":"path","schema":{"type":"string","pattern":"^msg.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Successfully deleted message","content":{"application/json":{"schema":{"type":"boolean","description":"Successfully deleted message"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"SessionBusyError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionBusyError"}}}}},"description":"Permanently delete a specific message and all of its parts from a session without reverting file changes.","summary":"Delete message","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.session.deleteMessage({\n ...\n})"}]}},"/session/{sessionID}/fork":{"post":{"tags":["session"],"operationId":"session.fork","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session5"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Create a new session by forking an existing session at a specific message point.","summary":"Fork session","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"messageID":{"type":"string","pattern":"^msg"}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.session.fork({\n ...\n})"}]}},"/session/{sessionID}/abort":{"post":{"tags":["session"],"operationId":"session.abort","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Aborted session","content":{"application/json":{"schema":{"type":"boolean","description":"Aborted session"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Abort an active session and stop any ongoing AI processing or command execution.","summary":"Abort session","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.session.abort({\n ...\n})"}]}},"/session/{sessionID}/init":{"post":{"tags":["session"],"operationId":"session.init","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"boolean","description":"200"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Analyze the current application and create an AGENTS.md file with project-specific agent configurations.","summary":"Initialize session","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"modelID":{"type":"string"},"providerID":{"type":"string"},"messageID":{"type":"string","pattern":"^msg"}},"required":["modelID","providerID","messageID"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.session.init({\n ...\n})"}]}},"/session/{sessionID}/share":{"post":{"tags":["session"],"operationId":"session.share","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Successfully shared session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session6"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"500":{"description":"InternalServerError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/effect_HttpApiError_InternalServerError"}}}}},"description":"Create a shareable link for a session, allowing others to view the conversation.","summary":"Share session","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.session.share({\n ...\n})"}]},"delete":{"tags":["session"],"operationId":"session.unshare","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Successfully unshared session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session7"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"500":{"description":"InternalServerError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/effect_HttpApiError_InternalServerError"}}}}},"description":"Remove the shareable link for a session, making it private again.","summary":"Unshare session","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.session.unshare({\n ...\n})"}]}},"/session/{sessionID}/summarize":{"post":{"tags":["session"],"operationId":"session.summarize","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Summarized session","content":{"application/json":{"schema":{"type":"boolean","description":"Summarized session"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Generate a concise summary of the session using AI compaction to preserve key information.","summary":"Summarize session","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"providerID":{"type":"string"},"modelID":{"type":"string"},"auto":{"type":"boolean"}},"required":["providerID","modelID"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.session.summarize({\n ...\n})"}]}},"/session/{sessionID}/prompt_async":{"post":{"tags":["session"],"operationId":"session.prompt_async","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"204":{"description":"Prompt accepted"},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.","summary":"Send async message","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"messageID":{"type":"string","pattern":"^msg"},"model":{"type":"object","properties":{"providerID":{"type":"string"},"modelID":{"type":"string"}},"required":["providerID","modelID"],"additionalProperties":false},"agent":{"type":"string"},"noReply":{"type":"boolean"},"tools":{"type":"object","additionalProperties":{"type":"boolean"}},"format":{"$ref":"#/components/schemas/OutputFormat"},"system":{"type":"string"},"variant":{"type":"string"},"snapshotInitialization":{"type":"string","enum":["wait"]},"editorContext":{"type":"object","properties":{"directory":{"type":"string"},"worktree":{"type":"string"},"visibleFiles":{"type":"array","items":{"type":"string"}},"openTabs":{"type":"array","items":{"type":"string"}},"activeFile":{"type":"string"},"shell":{"type":"string"}},"additionalProperties":false},"parts":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/TextPartInput"},{"$ref":"#/components/schemas/FilePartInput"},{"$ref":"#/components/schemas/AgentPartInput"},{"$ref":"#/components/schemas/SubtaskPartInput"}]}}},"required":["parts"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.session.prompt_async({\n ...\n})"}]}},"/session/{sessionID}/command":{"post":{"tags":["session"],"operationId":"session.command","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Created message","content":{"application/json":{"schema":{"type":"object","required":["info","parts"],"properties":{"info":{"$ref":"#/components/schemas/AssistantMessage"},"parts":{"type":"array","items":{"$ref":"#/components/schemas/Part"}}}}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Send a new command to a session for execution by the AI assistant.","summary":"Send command","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"messageID":{"type":"string","pattern":"^msg"},"agent":{"type":"string"},"model":{"type":"string"},"arguments":{"type":"string"},"command":{"type":"string"},"variant":{"type":"string"},"snapshotInitialization":{"type":"string","enum":["wait"]},"parts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^prt"},"type":{"type":"string","enum":["file"]},"mime":{"type":"string"},"filename":{"type":"string"},"url":{"type":"string"},"source":{"$ref":"#/components/schemas/FilePartSource"}},"required":["type","mime","url"],"additionalProperties":false}}},"required":["arguments","command"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.session.command({\n ...\n})"}]}},"/session/{sessionID}/shell":{"post":{"tags":["session"],"operationId":"session.shell","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Created message","content":{"application/json":{"schema":{"type":"object","properties":{"info":{"$ref":"#/components/schemas/Message"},"parts":{"type":"array","items":{"$ref":"#/components/schemas/Part"}}},"required":["info","parts"],"additionalProperties":false,"description":"Created message"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"SessionBusyError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionBusyError"}}}}},"description":"Execute a shell command within the session context and return the AI's response.","summary":"Run shell command","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"messageID":{"type":"string","pattern":"^msg"},"agent":{"type":"string"},"model":{"type":"object","properties":{"providerID":{"type":"string"},"modelID":{"type":"string"}},"required":["providerID","modelID"],"additionalProperties":false},"command":{"type":"string"}},"required":["agent","command"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.session.shell({\n ...\n})"}]}},"/session/{sessionID}/revert":{"post":{"tags":["session"],"operationId":"session.revert","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Updated session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session8"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"SessionBusyError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionBusyError"}}}}},"description":"Revert a specific message in a session, undoing its effects and restoring the previous state.","summary":"Revert message","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"messageID":{"type":"string","pattern":"^msg"},"partID":{"type":"string","pattern":"^prt"}},"required":["messageID"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.session.revert({\n ...\n})"}]}},"/session/{sessionID}/unrevert":{"post":{"tags":["session"],"operationId":"session.unrevert","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Updated session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session9"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"SessionBusyError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionBusyError"}}}}},"description":"Restore all previously reverted messages in a session.","summary":"Restore reverted messages","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.session.unrevert({\n ...\n})"}]}},"/session/{sessionID}/permissions/{permissionID}":{"post":{"tags":["session"],"operationId":"permission.respond","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"permissionID","in":"path","schema":{"type":"string","pattern":"^per.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Permission processed successfully","content":{"application/json":{"schema":{"type":"boolean","description":"Permission processed successfully"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"NotFoundError | PermissionNotFoundError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NotFoundError"},{"$ref":"#/components/schemas/PermissionNotFoundError"}]}}}}},"description":"Approve or deny a permission request from the AI assistant.","summary":"Respond to permission","deprecated":true,"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"response":{"type":"string","enum":["once","always","reject"]}},"required":["response"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.permission.respond({\n ...\n})"}]}},"/session/{sessionID}/message/{messageID}/part/{partID}":{"delete":{"tags":["session"],"operationId":"part.delete","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"messageID","in":"path","schema":{"type":"string","pattern":"^msg.*"},"required":true},{"name":"partID","in":"path","schema":{"type":"string","pattern":"^prt.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Successfully deleted part","content":{"application/json":{"schema":{"type":"boolean","description":"Successfully deleted part"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Delete a part from a message.","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.part.delete({\n ...\n})"}]},"patch":{"tags":["session"],"operationId":"part.update","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"messageID","in":"path","schema":{"type":"string","pattern":"^msg.*"},"required":true},{"name":"partID","in":"path","schema":{"type":"string","pattern":"^prt.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Successfully updated part","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Part"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Update a part in a message.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Part"}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.part.update({\n ...\n})"}]}},"/session/viewed":{"post":{"tags":["session"],"operationId":"session.viewed","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Viewed sessions updated","content":{"application/json":{"schema":{"type":"boolean","description":"Viewed sessions updated"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Notify the server which sessions the user is currently viewing, or clear all.","summary":"Set viewed sessions","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"viewer":{"type":"object","properties":{"id":{"type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$","format":"uuid"},"active":{"type":"boolean"}},"required":["id","active"],"additionalProperties":false},"attached":{"type":"array","items":{"type":"string","pattern":"^ses","maxLength":234},"maxItems":1000},"visible":{"type":"array","items":{"type":"string","pattern":"^ses","maxLength":234},"maxItems":199}},"required":["viewer","attached","visible"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.session.viewed({\n ...\n})"}]}},"/sync/start":{"post":{"tags":["sync"],"operationId":"sync.start","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Workspace sync started","content":{"application/json":{"schema":{"type":"boolean","description":"Workspace sync started"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Start sync loops for workspaces in the current project that have active sessions.","summary":"Start workspace sync","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.sync.start({\n ...\n})"}]}},"/sync/replay":{"post":{"tags":["sync"],"operationId":"sync.replay","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Replayed sync events","content":{"application/json":{"schema":{"type":"object","properties":{"sessionID":{"type":"string"}},"required":["sessionID"],"additionalProperties":false,"description":"Replayed sync events"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Validate and replay a complete sync event history.","summary":"Replay sync events","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"directory":{"type":"string"},"events":{"type":"array","minItems":1,"items":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"aggregateID":{"type":"string"},"seq":{"type":"integer","minimum":0},"type":{"type":"string"},"data":{"type":"object"}},"required":["id","aggregateID","seq","type","data"],"additionalProperties":false}}},"required":["directory","events"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.sync.replay({\n ...\n})"}]}},"/sync/steal":{"post":{"tags":["sync"],"operationId":"sync.steal","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Session stolen into workspace","content":{"application/json":{"schema":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"}},"required":["sessionID"],"additionalProperties":false,"description":"Session stolen into workspace"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Update a session to belong to the current workspace through the sync event system.","summary":"Steal session into workspace","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"}},"required":["sessionID"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.sync.steal({\n ...\n})"}]}},"/sync/history":{"post":{"tags":["sync"],"operationId":"sync.history.list","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Sync events","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"aggregate_id":{"type":"string"},"seq":{"type":"integer","minimum":0},"type":{"type":"string"},"data":{"type":"object"}},"required":["id","aggregate_id","seq","type","data"],"additionalProperties":false},"description":"Sync events"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"List sync events for all aggregates. Keys are aggregate IDs the client already knows about, values are the last known sequence ID. Events with seq > value are returned for those aggregates. Aggregates not listed in the input get their full history.","summary":"List sync events","requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"integer","minimum":0}}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.sync.history.list({\n ...\n})"}]}},"/tui/append-prompt":{"post":{"tags":["tui"],"operationId":"tui.appendPrompt","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Prompt processed successfully","content":{"application/json":{"schema":{"type":"boolean","description":"Prompt processed successfully"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Append prompt to the TUI.","summary":"Append TUI prompt","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.tui.appendPrompt({\n ...\n})"}]}},"/tui/open-help":{"post":{"tags":["tui"],"operationId":"tui.openHelp","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Help dialog opened successfully","content":{"application/json":{"schema":{"type":"boolean","description":"Help dialog opened successfully"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Open the help dialog in the TUI to display user assistance information.","summary":"Open help dialog","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.tui.openHelp({\n ...\n})"}]}},"/tui/open-sessions":{"post":{"tags":["tui"],"operationId":"tui.openSessions","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Session dialog opened successfully","content":{"application/json":{"schema":{"type":"boolean","description":"Session dialog opened successfully"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Open the session dialog.","summary":"Open sessions dialog","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.tui.openSessions({\n ...\n})"}]}},"/tui/open-themes":{"post":{"tags":["tui"],"operationId":"tui.openThemes","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Theme dialog opened successfully","content":{"application/json":{"schema":{"type":"boolean","description":"Theme dialog opened successfully"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Open the theme dialog.","summary":"Open themes dialog","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.tui.openThemes({\n ...\n})"}]}},"/tui/open-models":{"post":{"tags":["tui"],"operationId":"tui.openModels","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Model dialog opened successfully","content":{"application/json":{"schema":{"type":"boolean","description":"Model dialog opened successfully"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Open the model dialog.","summary":"Open models dialog","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.tui.openModels({\n ...\n})"}]}},"/tui/submit-prompt":{"post":{"tags":["tui"],"operationId":"tui.submitPrompt","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Prompt submitted successfully","content":{"application/json":{"schema":{"type":"boolean","description":"Prompt submitted successfully"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Submit the prompt.","summary":"Submit TUI prompt","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.tui.submitPrompt({\n ...\n})"}]}},"/tui/clear-prompt":{"post":{"tags":["tui"],"operationId":"tui.clearPrompt","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Prompt cleared successfully","content":{"application/json":{"schema":{"type":"boolean","description":"Prompt cleared successfully"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Clear the prompt.","summary":"Clear TUI prompt","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.tui.clearPrompt({\n ...\n})"}]}},"/tui/execute-command":{"post":{"tags":["tui"],"operationId":"tui.executeCommand","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Command executed successfully","content":{"application/json":{"schema":{"type":"boolean","description":"Command executed successfully"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Execute a TUI command.","summary":"Execute TUI command","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"command":{"type":"string"}},"required":["command"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.tui.executeCommand({\n ...\n})"}]}},"/tui/show-toast":{"post":{"tags":["tui"],"operationId":"tui.showToast","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Toast notification shown successfully","content":{"application/json":{"schema":{"type":"boolean","description":"Toast notification shown successfully"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Show a toast notification in the TUI.","summary":"Show TUI toast","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"message":{"type":"string"},"variant":{"type":"string","enum":["info","success","warning","error"]},"duration":{"type":"integer","exclusiveMinimum":0}},"required":["message","variant"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.tui.showToast({\n ...\n})"}]}},"/tui/publish":{"post":{"tags":["tui"],"operationId":"tui.publish","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Event published successfully","content":{"application/json":{"schema":{"type":"boolean","description":"Event published successfully"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Publish a TUI event.","summary":"Publish TUI event","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/EventTuiPromptAppend"},{"$ref":"#/components/schemas/EventTuiCommandExecute"},{"$ref":"#/components/schemas/EventTuiToastShow"},{"$ref":"#/components/schemas/EventTuiSessionSelect"}]}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.tui.publish({\n ...\n})"}]}},"/tui/select-session":{"post":{"tags":["tui"],"operationId":"tui.selectSession","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Session selected successfully","content":{"application/json":{"schema":{"type":"boolean","description":"Session selected successfully"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Navigate the TUI to display the specified session.","summary":"Select session","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses","description":"Session ID to navigate to"}},"required":["sessionID"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.tui.selectSession({\n ...\n})"}]}},"/tui/control/next":{"get":{"tags":["tui"],"operationId":"tui.control.next","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Next TUI request","content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string"},"body":{}},"required":["path","body"],"additionalProperties":false,"description":"Next TUI request"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Retrieve the next TUI request from the queue for processing.","summary":"Get next TUI request","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.tui.control.next({\n ...\n})"}]}},"/tui/control/response":{"post":{"tags":["tui"],"operationId":"tui.control.response","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Response submitted successfully","content":{"application/json":{"schema":{"type":"boolean","description":"Response submitted successfully"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Submit a response to the TUI request queue to complete a pending request.","summary":"Submit TUI response","requestBody":{"content":{"application/json":{"schema":{}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.tui.control.response({\n ...\n})"}]}},"/experimental/workspace/adapter":{"get":{"tags":["workspace"],"operationId":"experimental.workspace.adapter.list","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Workspace adapters","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"required":["type","name","description"],"additionalProperties":false},"description":"Workspace adapters"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"List all available workspace adapters for the current project.","summary":"List workspace adapters","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"}]}},"/experimental/workspace":{"get":{"tags":["workspace"],"operationId":"experimental.workspace.list","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Workspaces","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Workspace"},"description":"Workspaces"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"List all workspaces.","summary":"List workspaces","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.experimental.workspace.list({\n ...\n})"}]},"post":{"tags":["workspace"],"operationId":"experimental.workspace.create","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Workspace created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}}},"400":{"description":"WorkspaceCreateError | BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WorkspaceCreateError"},{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Create a workspace for the current project.","summary":"Create workspace","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^wrk"},"type":{"type":"string"},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"extra":{"anyOf":[{},{"type":"null"}]}},"required":["type"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.experimental.workspace.create({\n ...\n})"}]}},"/experimental/workspace/sync-list":{"post":{"tags":["workspace"],"operationId":"experimental.workspace.syncList","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"204":{"description":"Workspace list synced"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Register missing workspaces returned by workspace adapters.","summary":"Sync workspace list","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.experimental.workspace.syncList({\n ...\n})"}]}},"/experimental/workspace/status":{"get":{"tags":["workspace"],"operationId":"experimental.workspace.status","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Workspace status","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceEventConnectionStatus"},"description":"Workspace status"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Get connection status for workspaces in the current project.","summary":"Workspace status","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.experimental.workspace.status({\n ...\n})"}]}},"/experimental/workspace/{id}":{"delete":{"tags":["workspace"],"operationId":"experimental.workspace.remove","parameters":[{"name":"id","in":"path","schema":{"type":"string","pattern":"^wrk.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Workspace removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Remove an existing workspace.","summary":"Remove workspace","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.experimental.workspace.remove({\n ...\n})"}]}},"/experimental/workspace/warp":{"post":{"tags":["workspace"],"operationId":"experimental.workspace.warp","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"204":{"description":"Session warped"},"400":{"description":"WorkspaceWarpError | VcsApplyError | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WorkspaceWarpError"},{"$ref":"#/components/schemas/VcsApplyError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Move a session's sync history into the target workspace, or detach it to the local project.","summary":"Warp session into workspace","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","pattern":"^wrk"},{"type":"null"}]},"sessionID":{"type":"string","pattern":"^ses"},"copyChanges":{"type":"boolean"}},"required":["id","sessionID"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.experimental.workspace.warp({\n ...\n})"}]}},"/agent-builder/preview":{"post":{"tags":["agent-builder"],"operationId":"agentBuilder.preview","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Agent markdown preview","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9][a-zA-Z0-9._-]*$"},"scope":{"type":"string","enum":["global","project"]},"path":{"type":"string"},"markdown":{"type":"string"}},"required":["id","scope","path","markdown"],"additionalProperties":false,"description":"Agent markdown preview"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Validate an agent builder payload and return the canonical agent markdown without writing it.","summary":"Preview agent markdown","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9][a-zA-Z0-9._-]*$"},"scope":{"type":"string","enum":["global","project"]},"description":{"type":"string"},"mode":{"type":"string","enum":["primary","subagent","all"]},"model":{"type":"string"},"color":{"type":"string"},"steps":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"tools":{"type":"array","items":{"type":"string"}},"permission":{"type":"object"},"prompt":{"type":"string","pattern":"\\S"}},"required":["id","prompt"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.agentBuilder.preview({\n ...\n})"}]}},"/agent-builder/{id}":{"put":{"tags":["agent-builder"],"operationId":"agentBuilder.save","parameters":[{"name":"id","in":"path","schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9][a-zA-Z0-9._-]*$"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Saved agent markdown","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9][a-zA-Z0-9._-]*$"},"scope":{"type":"string","enum":["global","project"]},"path":{"type":"string"},"markdown":{"type":"string"}},"required":["id","scope","path","markdown"],"additionalProperties":false,"description":"Saved agent markdown"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Save an agent builder payload as a canonical agent markdown file.","summary":"Save agent markdown","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9][a-zA-Z0-9._-]*$"},"scope":{"type":"string","enum":["global","project"]},"description":{"type":"string"},"mode":{"type":"string","enum":["primary","subagent","all"]},"model":{"type":"string"},"color":{"type":"string"},"steps":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"tools":{"type":"array","items":{"type":"string"}},"permission":{"type":"object"},"prompt":{"type":"string","pattern":"\\S"}},"required":["prompt"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.agentBuilder.save({\n ...\n})"}]}},"/background-process":{"get":{"tags":["background-process"],"operationId":"backgroundProcess.list","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"List of background processes","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BackgroundProcessInfo"},"description":"List of background processes"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"List tracked background processes for the current instance.","summary":"List background processes","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.backgroundProcess.list({\n ...\n})"}]}},"/background-process/{processID}":{"get":{"tags":["background-process"],"operationId":"backgroundProcess.get","parameters":[{"name":"processID","in":"path","schema":{"type":"string","pattern":"^bgp.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Background process info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackgroundProcessInfo"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Get status and retained output for one background process.","summary":"Get background process","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.backgroundProcess.get({\n ...\n})"}]}},"/background-process/{processID}/logs":{"get":{"tags":["background-process"],"operationId":"backgroundProcess.logs","parameters":[{"name":"processID","in":"path","schema":{"type":"string","pattern":"^bgp.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Background process logs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackgroundProcessLogs"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Get the retained output tail for one background process.","summary":"Get background process logs","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.backgroundProcess.logs({\n ...\n})"}]}},"/background-process/{processID}/stop":{"post":{"tags":["background-process"],"operationId":"backgroundProcess.stop","parameters":[{"name":"processID","in":"path","schema":{"type":"string","pattern":"^bgp.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Stopped background process","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackgroundProcessInfo"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Terminate a background process and its child process tree.","summary":"Stop background process","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.backgroundProcess.stop({\n ...\n})"}]}},"/background-process/{processID}/restart":{"post":{"tags":["background-process"],"operationId":"backgroundProcess.restart","parameters":[{"name":"processID","in":"path","schema":{"type":"string","pattern":"^bgp.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Restarted background process","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackgroundProcessInfo"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Stop and restart a background process with its original command.","summary":"Restart background process","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.backgroundProcess.restart({\n ...\n})"}]}},"/background-process/session/{sessionID}/stop":{"post":{"tags":["background-process"],"operationId":"backgroundProcess.stopSession","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Stopped session background processes","content":{"application/json":{"schema":{"type":"boolean","description":"Stopped session background processes"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Terminate and forget all background processes associated with one session.","summary":"Stop session background processes","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.backgroundProcess.stopSession({\n ...\n})"}]}},"/session/{sessionID}/branch-name":{"post":{"tags":["branch-name"],"operationId":"branchName.generate","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Generated branch name or null when the task is not clear yet","content":{"application/json":{"schema":{"type":"object","properties":{"branch":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["branch"],"additionalProperties":false,"description":"Generated branch name or null when the task is not clear yet"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Generate a task-focused branch name from the current conversation.","summary":"Generate branch name","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string"},"providerID":{"type":"string"},"modelID":{"type":"string"}},"required":["prompt"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.branchName.generate({\n ...\n})"}]}},"/commit-message":{"post":{"tags":["commit-message"],"operationId":"commitMessage.generate","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Generated commit message","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false,"description":"Generated commit message"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"422":{"description":"CommitMessageNoChangesError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommitMessageNoChangesError"}}}}},"description":"Generate a commit message using AI based on the current git diff.","summary":"Generate commit message","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string","description":"Workspace/repo path"},"selectedFiles":{"type":"array","items":{"type":"string"}},"previousMessage":{"type":"string"},"language":{"type":"string"}},"required":["path"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.commitMessage.generate({\n ...\n})"}]}},"/config/overlay":{"get":{"tags":["config-console"],"operationId":"config.overlay","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false},{"name":"scope","in":"query","schema":{"type":"string","enum":["global","project"],"default":"project"},"required":false}],"responses":{"200":{"description":"Resolved config overlay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigOverlayResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Resolve global, project, and effective config values with source metadata for inheritance-aware settings UI.","summary":"Get config overlay","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.config.overlay({\n ...\n})"}]},"patch":{"tags":["config-console"],"operationId":"config.overlayUpdate","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Effective configuration after patch","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Config"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Apply a minimal global or project config patch, including unset paths for reverting local overrides.","summary":"Patch config overlay","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","enum":["global","project"],"default":"project"},"set":{"type":"object"},"unset":{"type":"array","items":{"type":"array","items":{"type":"string"}}}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.config.overlayUpdate({\n ...\n})"}]}},"/config/sources":{"get":{"tags":["config-console"],"operationId":"config.sources","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Config source inventory","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigSourcesResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"List config source metadata in load order without exposing config contents or secrets.","summary":"List config sources","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.config.sources({\n ...\n})"}]}},"/config/effective":{"get":{"tags":["config-console"],"operationId":"config.effective","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Effective config info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Config"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Retrieve effective config for the current instance directory.","summary":"Get effective configuration","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.config.effective({\n ...\n})"}]}},"/config/rules":{"get":{"tags":["config-console"],"operationId":"config.rules","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false},{"name":"scope","in":"query","schema":{"const":"project","default":"project","type":"string"},"required":false}],"responses":{"200":{"description":"Project rules","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigRulesResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"List project instruction files used by Kilo and return their current contents.","summary":"Get project rules","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.config.rules({\n ...\n})"}]},"put":{"tags":["config-console"],"operationId":"config.rulesUpdate","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Project rules after update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigRulesResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Create or update the project AGENTS.md rules file.","summary":"Update project rules","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","enum":["project"],"default":"project"},"content":{"type":"string"}},"required":["content"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.config.rulesUpdate({\n ...\n})"}]}},"/config/model-state":{"get":{"tags":["config-console"],"operationId":"config.modelState","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Model state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigModelStateResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Retrieve TUI-compatible recent and favorite model selections.","summary":"Get model state","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.config.modelState({\n ...\n})"}]},"patch":{"tags":["config-console"],"operationId":"config.modelStateUpdate","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Updated model state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigModelStateResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Patch TUI-compatible model selections shared with Kilo Console.","summary":"Update model state","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"favorite":{"type":"array","items":{"type":"object","properties":{"providerID":{"type":"string"},"modelID":{"type":"string"}},"required":["providerID","modelID"],"additionalProperties":false}}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.config.modelStateUpdate({\n ...\n})"}]}},"/tui/config":{"get":{"tags":["config-console"],"operationId":"tui.config.get","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Effective TUI configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TuiConfigGetResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Retrieve the effective TUI configuration for the current instance directory.","summary":"Get TUI configuration","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.tui.config.get({\n ...\n})"}]},"patch":{"tags":["config-console"],"operationId":"tui.config.update","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false},{"name":"scope","in":"query","schema":{"type":"string","enum":["project","global"],"default":"project"},"required":false}],"responses":{"200":{"description":"Effective TUI configuration after the update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TuiConfigGetResponse"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Patch global or project TUI configuration and return the effective TUI configuration.","summary":"Update TUI configuration","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"$schema":{"type":"string"},"theme":{"type":"string"},"keybinds":{"type":"object","additionalProperties":{"type":"string"}},"plugin":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"array","prefixItems":[{"type":"string"},{"type":"object"}],"maxItems":2,"minItems":2}]}},"plugin_enabled":{"type":"object","additionalProperties":{"type":"boolean"}},"title_icon":{"type":"string","enum":["none","unicode","emojis"],"description":"Status icon style shown in terminal titles"},"scroll_speed":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"scroll_acceleration":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"diff_style":{"type":"string","enum":["auto","stacked"]},"mouse":{"type":"boolean"},"attention":{"type":"object","properties":{"enabled":{"type":"boolean"},"notifications":{"type":"boolean"},"sound":{"type":"boolean"},"volume":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"additionalProperties":false}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.tui.config.update({\n ...\n})"}]}},"/tui/keybinds":{"get":{"tags":["config-console"],"operationId":"tui.keybind.list","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"TUI keybind metadata","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TuiKeybindListResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"List valid TUI keybind commands, descriptions, groups, and default bindings from the CLI schema.","summary":"List TUI keybinds","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.tui.keybind.list({\n ...\n})"}]}},"/enhance-prompt":{"post":{"tags":["enhance-prompt"],"operationId":"enhancePrompt.enhance","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Enhanced prompt text","content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"],"additionalProperties":false,"description":"Enhanced prompt text"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Rewrite a user's draft prompt into a clearer, more specific, and more effective prompt.","summary":"Enhance prompt","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"description":"The user's draft prompt to enhance"}},"required":["text"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.enhancePrompt.enhance({\n ...\n})"}]}},"/indexing/status":{"get":{"tags":["indexing"],"operationId":"indexing.status","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Indexing status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexingStatus"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Retrieve the current code indexing status for the active project.","summary":"Get indexing status","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.indexing.status({\n ...\n})"}]}},"/indexing/warnings":{"get":{"tags":["indexing"],"operationId":"indexing.warnings","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Indexing warnings","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/IndexingWarning"},"description":"Indexing warnings"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Retrieve code indexing warnings for the active project.","summary":"Get indexing warnings","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.indexing.warnings({\n ...\n})"}]}},"/indexing/models":{"get":{"tags":["indexing"],"operationId":"indexing.models","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Kilo embedding model catalog","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KiloEmbeddingModelCatalog"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Retrieve the embedding models available through the active Kilo account.","summary":"List Kilo embedding models","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.indexing.models({\n ...\n})"}]}},"/instance/reload":{"post":{"tags":["instance-reload"],"operationId":"instance.reload","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Instance reloaded","content":{"application/json":{"schema":{"type":"boolean","description":"Instance reloaded"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"409":{"description":"ConflictError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}}},"description":"Atomically dispose and reboot the current Kilo instance, reloading config, skills, agents, commands, and MCP prompts from disk. Returns 409 if a session is actively running.","summary":"Reload instance","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.instance.reload({\n ...\n})"}]}},"/interactive-terminal":{"get":{"tags":["interactive-terminal"],"operationId":"interactiveTerminal.list","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"List of interactive terminals","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InteractiveTerminalSnapshot"},"description":"List of interactive terminals"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"List active human-driven terminal sessions for the current instance.","summary":"List interactive terminals","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.interactiveTerminal.list({\n ...\n})"}]}},"/interactive-terminal/{terminalID}":{"get":{"tags":["interactive-terminal"],"operationId":"interactiveTerminal.get","parameters":[{"name":"terminalID","in":"path","schema":{"type":"string"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Interactive terminal snapshot","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InteractiveTerminalSnapshot"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Get metadata and retained output for an active interactive terminal.","summary":"Get interactive terminal","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.interactiveTerminal.get({\n ...\n})"}]}},"/interactive-terminal/{terminalID}/input":{"post":{"tags":["interactive-terminal"],"operationId":"interactiveTerminal.write","parameters":[{"name":"terminalID","in":"path","schema":{"type":"string"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Input written","content":{"application/json":{"schema":{"type":"boolean","description":"Input written"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Send raw keyboard input to an active interactive terminal.","summary":"Write interactive terminal input","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InteractiveTerminalWriteInput"}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.interactiveTerminal.write({\n ...\n})"}]}},"/interactive-terminal/{terminalID}/resize":{"post":{"tags":["interactive-terminal"],"operationId":"interactiveTerminal.resize","parameters":[{"name":"terminalID","in":"path","schema":{"type":"string"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Terminal resized","content":{"application/json":{"schema":{"type":"boolean","description":"Terminal resized"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Resize an active interactive terminal's PTY.","summary":"Resize interactive terminal","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InteractiveTerminalResizeInput"}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.interactiveTerminal.resize({\n ...\n})"}]}},"/interactive-terminal/{terminalID}/close":{"post":{"tags":["interactive-terminal"],"operationId":"interactiveTerminal.close","parameters":[{"name":"terminalID","in":"path","schema":{"type":"string"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Terminal closed","content":{"application/json":{"schema":{"type":"boolean","description":"Terminal closed"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Terminate an active interactive terminal and unblock its tool call.","summary":"Close interactive terminal","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.interactiveTerminal.close({\n ...\n})"}]}},"/kilo/profile":{"get":{"tags":["kilo"],"operationId":"kilo.profile","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Profile data","content":{"application/json":{"schema":{"type":"object","properties":{"profile":{"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"},"organizations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"}},"required":["id","name","role"],"additionalProperties":false}},"selectedOrganizationId":{"type":"string"},"hasPersonalAccount":{"type":"boolean"}},"required":["email"],"additionalProperties":false},"balance":{"anyOf":[{"type":"object","properties":{"balance":{"type":"number"}},"required":["balance"],"additionalProperties":false},{"type":"null"}]},"kiloPass":{"anyOf":[{"type":"object","properties":{"currentPeriodBaseCreditsUsd":{"type":"number"},"currentPeriodUsageUsd":{"type":"number"},"currentPeriodBonusCreditsUsd":{"type":"number"},"nextBillingAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["currentPeriodBaseCreditsUsd","currentPeriodUsageUsd","currentPeriodBonusCreditsUsd"],"additionalProperties":false},{"type":"null"}]},"currentOrgId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["profile","balance","kiloPass","currentOrgId"],"additionalProperties":false,"description":"Profile data"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Fetch user profile and organizations from Kilo Gateway","summary":"Get Kilo Gateway profile","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.kilo.profile({\n ...\n})"}]}},"/kilo/auth-status":{"get":{"tags":["kilo"],"operationId":"kilo.authStatus","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Kilo authentication status","content":{"application/json":{"schema":{"type":"object","properties":{"authenticated":{"type":"boolean"},"type":{"type":"string","enum":["api","oauth"]}},"required":["authenticated"],"additionalProperties":false,"description":"Kilo authentication status"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Check whether a locally stored Kilo credential can authenticate Gateway requests","summary":"Get Kilo authentication status","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.kilo.authStatus({\n ...\n})"}]}},"/kilo/modes":{"get":{"tags":["kilo"],"operationId":"kilo.modes","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Organization modes list","content":{"application/json":{"schema":{"type":"object","properties":{"modes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organization_id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"created_by":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"config":{"type":"object","properties":{"roleDefinition":{"type":"string"},"whenToUse":{"type":"string"},"description":{"type":"string"},"customInstructions":{"type":"string"},"groups":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"array","prefixItems":[{"type":"string"},{"type":"object","properties":{"fileRegex":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}],"maxItems":2,"minItems":2}]}}},"additionalProperties":false}},"required":["id","organization_id","name","slug","created_by","created_at","updated_at","config"],"additionalProperties":false}}},"required":["modes"],"additionalProperties":false,"description":"Organization modes list"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Fetch custom modes defined for the current organization","summary":"Get organization custom modes","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.kilo.modes({\n ...\n})"}]}},"/kilo/fim":{"post":{"tags":["kilo"],"operationId":"kilo.fim","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Streaming FIM completion response","content":{"text/event-stream":{"schema":{"type":"object","properties":{"choices":{"type":"array","items":{"type":"object","properties":{"delta":{"type":"object","properties":{"content":{"type":"string"}}},"text":{"type":"string"}}}},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"number"},"completion_tokens":{"type":"number"}}},"cost":{"type":"number"}}}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Proxy a Fill-in-the-Middle completion request to the Kilo Gateway","summary":"FIM completion","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"prefix":{"type":"string"},"suffix":{"type":"string"},"provider":{"type":"string"},"model":{"type":"string"},"maxTokens":{"type":"number"},"temperature":{"type":"number"}},"required":["prefix","suffix"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.kilo.fim({\n ...\n})"}]}},"/kilo/edit":{"post":{"tags":["kilo"],"operationId":"kilo.edit","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Next Edit completion","content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string"},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"number"},"completion_tokens":{"type":"number"}},"additionalProperties":false}},"required":["content"],"additionalProperties":false,"description":"Next Edit completion"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Proxy a Mercury-style Next Edit request. The client supplies structured editor context; the gateway assembles the sentinel-tagged prompt and forwards to the upstream edit endpoint.","summary":"Next Edit completion","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string"},"model":{"type":"string"},"maxTokens":{"type":"number"},"currentFilePath":{"type":"string"},"currentFileContent":{"type":"string"},"cursorLine":{"type":"number"},"cursorCharacter":{"type":"number"},"editableRegionStartLine":{"type":"number"},"editableRegionEndLine":{"type":"number"},"recentlyViewedSnippets":{"type":"array","items":{"type":"object","properties":{"filepath":{"type":"string"},"content":{"type":"string"}},"required":["filepath","content"],"additionalProperties":false}},"editDiffHistory":{"type":"array","items":{"type":"string"}}},"required":["currentFilePath","currentFileContent","cursorLine","cursorCharacter","editableRegionStartLine","editableRegionEndLine","recentlyViewedSnippets","editDiffHistory"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.kilo.edit({\n ...\n})"}]}},"/kilo/audio/transcriptions":{"post":{"tags":["kilo"],"operationId":"kilo.audio.transcriptions","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Transcription response","content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"usage":{}},"required":["text"],"additionalProperties":false,"description":"Transcription response"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Proxy an audio transcription request to the Kilo Gateway","summary":"Speech to text transcription","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string"},"input_audio":{"type":"object","properties":{"data":{"type":"string"},"format":{"type":"string"}},"required":["data","format"],"additionalProperties":false},"language":{"type":"string"},"prompt":{"type":"string"},"temperature":{"type":"number"}},"required":["model","input_audio"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.kilo.audio.transcriptions({\n ...\n})"}]}},"/kilo/models/images":{"get":{"tags":["kilo"],"operationId":"kilo.models.images","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Image-capable model list","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"description":"Image-capable model list"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"List image-capable models from the Kilo Gateway OpenRouter passthrough","summary":"Image generation models","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.kilo.models.images({\n ...\n})"}]}},"/kilo/notifications":{"get":{"tags":["kilo"],"operationId":"kilo.notifications","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Notifications list","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"actionText":{"type":"string"},"actionURL":{"type":"string"}},"required":["actionText","actionURL"],"additionalProperties":false},"showIn":{"type":"array","items":{"type":"string"}},"suggestModelId":{"type":"string"}},"required":["id","title","message"],"additionalProperties":false},"description":"Notifications list"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Fetch notifications from Kilo Gateway for CLI display","summary":"Get Kilo notifications","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.kilo.notifications({\n ...\n})"}]}},"/kilo/organization":{"post":{"tags":["kilo"],"operationId":"kilo.organization.set","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Organization updated successfully","content":{"application/json":{"schema":{"type":"boolean","description":"Organization updated successfully"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Switch to a different Kilo Gateway organization","summary":"Update Kilo Gateway organization","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["organizationId"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.kilo.organization.set({\n ...\n})"}]}},"/kilo/claw/status":{"get":{"tags":["kilo"],"operationId":"kilo.claw.status","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Instance status","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"anyOf":[{"type":"string","enum":["provisioned","starting","restarting","recovering","running","stopped","destroying","restoring"]},{"type":"null"}]},"sandboxId":{"type":"string"},"flyRegion":{"type":"string"},"machineSize":{"type":"object","properties":{"cpus":{"type":"number"},"memory_mb":{"type":"number"}},"required":["cpus","memory_mb"],"additionalProperties":false},"openclawVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastStartedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastStoppedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"channelCount":{"type":"number"},"secretCount":{"type":"number"},"userId":{"type":"string"},"botName":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status"],"additionalProperties":false,"description":"Instance status"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"503":{"description":"ServiceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/effect_HttpApiError_ServiceUnavailable"}}}}},"description":"Fetch the user's KiloClaw instance status via the KiloClaw worker","summary":"Get KiloClaw instance status","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.kilo.claw.status({\n ...\n})"}]}},"/kilo/claw/chat-credentials":{"get":{"tags":["kilo"],"operationId":"kilo.claw.chatCredentials","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Kilo Chat credentials or null","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"token":{"type":"string"},"expiresAt":{"type":"string"},"kiloChatUrl":{"type":"string"},"eventServiceUrl":{"type":"string"}},"required":["token","expiresAt","kiloChatUrl","eventServiceUrl"],"additionalProperties":false},{"type":"null"}]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Returns the bearer token and endpoint URLs the client uses to talk to the Kilo Chat worker and the Event Service. The bearer is the user's existing long-lived Kilo JWT — kilo-chat and event-service both verify it directly with NEXTAUTH_SECRET, so no separate token mint is needed.","summary":"Get KiloClaw chat credentials","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.kilo.claw.chatCredentials({\n ...\n})"}]}},"/kilo/cloud-sessions":{"get":{"tags":["kilo"],"operationId":"kilo.cloudSessions","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false},{"name":"cursor","in":"query","schema":{"type":"string"},"required":false},{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"gitUrl","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Cloud sessions list","content":{"application/json":{"schema":{"type":"object","properties":{"cliSessions":{"type":"array","items":{"type":"object","properties":{"session_id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"version":{"type":"number"}},"required":["session_id","title","created_at","updated_at","version"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["cliSessions","nextCursor"],"additionalProperties":false,"description":"Cloud sessions list"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Fetch cloud CLI sessions from Kilo API","summary":"Get cloud sessions","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.kilo.cloudSessions({\n ...\n})"}]}},"/kilo/cloud/session/{id}":{"get":{"tags":["kilo"],"operationId":"kilo.cloud.session.get","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Cloud session data","content":{"application/json":{"schema":{"type":"object","properties":{"info":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"time":{"type":"object","properties":{"created":{"type":"number"},"updated":{"type":"number"}},"required":["created","updated"],"additionalProperties":false}},"required":["id","title","time"]},"messages":{"type":"array","items":{"type":"object","properties":{"info":{"type":"object","properties":{"id":{"type":"string"},"sessionID":{"type":"string"},"role":{"type":"string","enum":["user","assistant"]},"time":{"type":"object","properties":{"created":{"type":"number"},"completed":{"type":"number"}},"required":["created"],"additionalProperties":false}},"required":["id","sessionID","role","time"]},"parts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sessionID":{"type":"string"},"messageID":{"type":"string"},"type":{"type":"string"}},"required":["id","sessionID","messageID","type"]}}},"required":["info","parts"]}}},"required":["info","messages"],"additionalProperties":false,"description":"Cloud session data"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Fetch full session data from the Kilo cloud for preview","summary":"Get cloud session","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.kilo.cloud.session.get({\n ...\n})"}]}},"/kilo/cloud/session/import":{"post":{"tags":["kilo"],"operationId":"kilo.cloud.session.import","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Imported session info","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"time":{"type":"object","properties":{"created":{"type":"number"},"updated":{"type":"number"}},"required":["created","updated"],"additionalProperties":false}},"required":["id","title","time"],"description":"Imported session info"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"500":{"description":"CloudSessionImportError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloudSessionImportError"}}}}},"description":"Download a cloud-synced session and write it to local storage with fresh IDs.","summary":"Import session from cloud","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sessionId":{"type":"string"}},"required":["sessionId"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.kilo.cloud.session.import({\n ...\n})"}]}},"/kilocode/heap/snapshot":{"post":{"tags":["kilocode"],"operationId":"kilocode.heap.snapshot","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Heap snapshot file path","content":{"application/json":{"schema":{"type":"string","description":"Heap snapshot file path"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Write a heap snapshot for the CLI process to the log directory.","summary":"Write heap snapshot","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.kilocode.heap.snapshot({\n ...\n})"}]}},"/kilocode/agent/requirements":{"get":{"tags":["kilocode"],"operationId":"kilocode.agentRequirements","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false},{"name":"agent","in":"query","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Agent requirement status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRequirementResult"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Check whether the selected agent's requirements are available in the request directory.","summary":"Check agent requirements","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.kilocode.agentRequirements({\n ...\n})"}]}},"/kilocode/skill/remove":{"post":{"tags":["kilocode"],"operationId":"kilocode.removeSkill","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Skill removed","content":{"application/json":{"schema":{"type":"boolean","description":"Skill removed"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Remove a skill by deleting its manifest from disk and clearing it from cache.","summary":"Remove a skill","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"location":{"type":"string"}},"required":["location"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.kilocode.removeSkill({\n ...\n})"}]}},"/kilocode/agent/remove":{"post":{"tags":["kilocode"],"operationId":"kilocode.removeAgent","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Agent removed","content":{"application/json":{"schema":{"type":"boolean","description":"Agent removed"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Remove a custom (non-native) agent by deleting its markdown file from disk and refreshing state.","summary":"Remove a custom agent","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.kilocode.removeAgent({\n ...\n})"}]}},"/kilocode/notebook":{"get":{"tags":["kilocode"],"operationId":"kilocode.notebook.list","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Pending notebook host requests","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NotebookRequest"},"description":"Pending notebook host requests"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"List pending native notebook requests for the routed workspace.","summary":"List pending notebook requests","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.kilocode.notebook.list({\n ...\n})"}]}},"/kilocode/notebook/{requestID}/reply":{"post":{"tags":["kilocode"],"operationId":"kilocode.notebook.reply","parameters":[{"name":"requestID","in":"path","schema":{"$ref":"#/components/schemas/NotebookRequestID"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Notebook reply accepted","content":{"application/json":{"schema":{"type":"boolean","description":"Notebook reply accepted"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Complete a pending native notebook request with a structured result.","summary":"Reply to a notebook request","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/NotebookResult"}},"required":["result"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.kilocode.notebook.reply({\n ...\n})"}]}},"/kilocode/notebook/{requestID}/reject":{"post":{"tags":["kilocode"],"operationId":"kilocode.notebook.reject","parameters":[{"name":"requestID","in":"path","schema":{"$ref":"#/components/schemas/NotebookRequestID"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Notebook rejection accepted","content":{"application/json":{"schema":{"type":"boolean","description":"Notebook rejection accepted"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Complete a pending native notebook request with a structured host error.","summary":"Reject a notebook request","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/NotebookFailure"}},"required":["error"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.kilocode.notebook.reject({\n ...\n})"}]}},"/kilocode/agent-manager":{"get":{"tags":["kilocode"],"operationId":"kilocode.agentManager.list","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Pending Agent Manager host requests","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgentManagerRequest"},"description":"Pending Agent Manager host requests"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"List pending native Agent Manager orchestration requests for the routed workspace.","summary":"List pending Agent Manager requests","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.kilocode.agentManager.list({\n ...\n})"}]}},"/kilocode/agent-manager/{requestID}/reply":{"post":{"tags":["kilocode"],"operationId":"kilocode.agentManager.reply","parameters":[{"name":"requestID","in":"path","schema":{"$ref":"#/components/schemas/AgentManagerRequestID"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Agent Manager reply accepted","content":{"application/json":{"schema":{"type":"boolean","description":"Agent Manager reply accepted"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Complete a pending Agent Manager orchestration request with a structured result.","summary":"Reply to an Agent Manager request","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/AgentManagerResult"}},"required":["result"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.kilocode.agentManager.reply({\n ...\n})"}]}},"/kilocode/agent-manager/{requestID}/reject":{"post":{"tags":["kilocode"],"operationId":"kilocode.agentManager.reject","parameters":[{"name":"requestID","in":"path","schema":{"$ref":"#/components/schemas/AgentManagerRequestID"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Agent Manager rejection accepted","content":{"application/json":{"schema":{"type":"boolean","description":"Agent Manager rejection accepted"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Complete a pending Agent Manager orchestration request with a structured host error.","summary":"Reject an Agent Manager request","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/AgentManagerFailure"}},"required":["error"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.kilocode.agentManager.reject({\n ...\n})"}]}},"/session/{sessionID}/model-usage":{"get":{"tags":["kilocode"],"operationId":"kilocode.sessionModelUsage","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Model usage for a session tree","content":{"application/json":{"schema":{"type":"object","properties":{"sessionIDs":{"type":"array","items":{"type":"string","pattern":"^ses"}},"totals":{"type":"object","properties":{"steps":{"type":"integer","minimum":0},"cost":{"type":"number"},"tokens":{"type":"object","properties":{"input":{"type":"integer","minimum":0},"output":{"type":"integer","minimum":0},"reasoning":{"type":"integer","minimum":0},"cache":{"type":"object","properties":{"read":{"type":"integer","minimum":0},"write":{"type":"integer","minimum":0}},"required":["read","write"],"additionalProperties":false}},"required":["input","output","reasoning","cache"],"additionalProperties":false}},"required":["steps","cost","tokens"],"additionalProperties":false},"models":{"type":"array","items":{"type":"object","properties":{"providerID":{"type":"string"},"modelID":{"type":"string"},"steps":{"type":"integer","minimum":0},"cost":{"type":"number"},"tokens":{"type":"object","properties":{"input":{"type":"integer","minimum":0},"output":{"type":"integer","minimum":0},"reasoning":{"type":"integer","minimum":0},"cache":{"type":"object","properties":{"read":{"type":"integer","minimum":0},"write":{"type":"integer","minimum":0}},"required":["read","write"],"additionalProperties":false}},"required":["input","output","reasoning","cache"],"additionalProperties":false}},"required":["providerID","modelID","steps","cost","tokens"],"additionalProperties":false}}},"required":["sessionIDs","totals","models"],"additionalProperties":false,"description":"Model usage for a session tree"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Get token usage and direct cost by model for the complete top-level session tree.","summary":"Get session model usage","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.kilocode.sessionModelUsage({\n ...\n})"}]}},"/kilocode/anaconda-desktop/status":{"get":{"tags":["anaconda-desktop"],"operationId":"anacondaDesktop.status","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Anaconda Desktop setup status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnacondaDesktopStatus"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Discover the locally installed Anaconda Desktop and its active inference server.","summary":"Get Anaconda Desktop setup status","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.anacondaDesktop.status({\n ...\n})"}]}},"/kilocode/anaconda-desktop/open":{"post":{"tags":["anaconda-desktop"],"operationId":"anacondaDesktop.open","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Anaconda Desktop opened","content":{"application/json":{"schema":{"type":"boolean","enum":[true],"description":"Anaconda Desktop opened"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"409":{"description":"AnacondaDesktopConflictError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnacondaDesktopConflictError"}}}},"500":{"description":"AnacondaDesktopOperationError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnacondaDesktopOperationError"}}}}},"description":"Open the locally installed Anaconda Desktop application.","summary":"Open Anaconda Desktop","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.anacondaDesktop.open({\n ...\n})"}]}},"/kilocode/anaconda-desktop/sync":{"post":{"tags":["anaconda-desktop"],"operationId":"anacondaDesktop.sync","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Anaconda Desktop connection synchronized","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["ready"]},"serverID":{"type":"string","minLength":1},"serverName":{"type":"string","minLength":1},"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}},"required":["id","name"],"additionalProperties":false},"minItems":1},"context":{"type":"integer","minimum":0,"maximum":9007199254740991},"toolcall":{"type":"string","enum":["supported","unsupported","unknown"]}},"required":["type","serverID","models","context","toolcall"],"additionalProperties":false,"description":"Anaconda Desktop connection synchronized"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"409":{"description":"AnacondaDesktopConflictError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnacondaDesktopConflictError"}}}},"500":{"description":"AnacondaDesktopOperationError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnacondaDesktopOperationError"}}}}},"description":"Discover the active local inference server and replace Kilo provider authentication metadata.","summary":"Synchronize Anaconda Desktop provider","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"acknowledgeToolLimitations":{"type":"boolean"}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.anacondaDesktop.sync({\n ...\n})"}]}},"/network":{"get":{"tags":["network"],"operationId":"network.list","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"List of pending network reconnect requests","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SessionNetworkWait"},"description":"List of pending network reconnect requests"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Get all pending network reconnect requests across all sessions.","summary":"List pending network waits","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.network.list({\n ...\n})"}]}},"/network/{requestID}/reply":{"post":{"tags":["network"],"operationId":"network.reply","parameters":[{"name":"requestID","in":"path","schema":{"type":"string","pattern":"^que.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Network wait resumed successfully","content":{"application/json":{"schema":{"type":"boolean","description":"Network wait resumed successfully"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Resume a pending session after reconnecting network-dependent services.","summary":"Resume after network wait","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.network.reply({\n ...\n})"}]}},"/network/{requestID}/reject":{"post":{"tags":["network"],"operationId":"network.reject","parameters":[{"name":"requestID","in":"path","schema":{"type":"string","pattern":"^que.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Network wait rejected successfully","content":{"application/json":{"schema":{"type":"boolean","description":"Network wait rejected successfully"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Stop a pending session instead of resuming after network reconnect.","summary":"Reject network resume request","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.network.reject({\n ...\n})"}]}},"/remote/enable":{"post":{"tags":["remote"],"operationId":"remote.enable","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Remote connection enabled","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"connected":{"type":"boolean"}},"required":["enabled","connected"],"additionalProperties":false,"description":"Remote connection enabled"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Enable WebSocket connection to UserConnectionDO for real-time session relay and commands.","summary":"Enable remote connection","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.remote.enable({\n ...\n})"}]}},"/remote/disable":{"post":{"tags":["remote"],"operationId":"remote.disable","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Remote connection disabled","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"connected":{"type":"boolean"}},"required":["enabled","connected"],"additionalProperties":false,"description":"Remote connection disabled"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Close the remote WebSocket connection to UserConnectionDO.","summary":"Disable remote connection","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.remote.disable({\n ...\n})"}]}},"/remote/status":{"get":{"tags":["remote"],"operationId":"remote.status","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Remote connection status","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"connected":{"type":"boolean"}},"required":["enabled","connected"],"additionalProperties":false,"description":"Remote connection status"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Get the current state of the remote WebSocket connection.","summary":"Get remote connection status","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.remote.status({\n ...\n})"}]}},"/sandbox/support":{"get":{"tags":["sandbox"],"operationId":"sandbox.support","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Sandbox backend support","content":{"application/json":{"schema":{"type":"object","properties":{"available":{"type":"boolean"},"reason":{"type":"string"}},"required":["available"],"additionalProperties":false,"description":"Sandbox backend support"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Get sandbox backend availability without creating a session.","summary":"Get sandbox backend support","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.sandbox.support({\n ...\n})"}]}},"/session/{sessionID}/sandbox":{"get":{"tags":["sandbox"],"operationId":"sandbox.status","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Session sandbox status","content":{"application/json":{"schema":{"type":"object","properties":{"directory":{"type":"string"},"enabled":{"type":"boolean"},"available":{"type":"boolean"},"reason":{"type":"string"},"version":{"type":"integer"}},"required":["directory","enabled","available","version"],"additionalProperties":false,"description":"Session sandbox status"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Get the effective sandbox state for one session.","summary":"Get session sandbox status","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.sandbox.status({\n ...\n})"}]}},"/session/{sessionID}/sandbox/toggle":{"post":{"tags":["sandbox"],"operationId":"sandbox.toggle","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Updated session sandbox status","content":{"application/json":{"schema":{"type":"object","properties":{"directory":{"type":"string"},"enabled":{"type":"boolean"},"available":{"type":"boolean"},"reason":{"type":"string"},"version":{"type":"integer"}},"required":["directory","enabled","available","version"],"additionalProperties":false,"description":"Updated session sandbox status"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Toggle and persist the sandbox state for one session.","summary":"Toggle session sandbox","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.sandbox.toggle({\n ...\n})"}]}},"/kilocode/session-import/project":{"post":{"tags":["session-import"],"operationId":"kilocode.sessionImport.project","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Project import result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KilocodeSessionImportResult"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Insert or update a project row used by legacy session import.","summary":"Insert project for session import","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"worktree":{"type":"string"},"vcs":{"type":"string"},"name":{"type":"string"},"iconUrl":{"type":"string"},"iconColor":{"type":"string"},"timeCreated":{"type":"number"},"timeUpdated":{"type":"number"},"timeInitialized":{"type":"number"},"sandboxes":{"type":"array","items":{"type":"string"}},"commands":{"type":"object","properties":{"start":{"type":"string"}},"additionalProperties":false}},"required":["id","worktree","timeCreated","timeUpdated","sandboxes"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.kilocode.sessionImport.project({\n ...\n})"}]}},"/kilocode/session-import/session":{"post":{"tags":["session-import"],"operationId":"kilocode.sessionImport.session","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Session import result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KilocodeSessionImportResult"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Insert or update a session row used by legacy session import.","summary":"Insert session for session import","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"projectID":{"type":"string"},"force":{"type":"boolean"},"workspaceID":{"type":"string"},"parentID":{"type":"string"},"slug":{"type":"string"},"directory":{"type":"string"},"title":{"type":"string"},"version":{"type":"string"},"shareURL":{"type":"string"},"summary":{"type":"object","properties":{"additions":{"type":"number"},"deletions":{"type":"number"},"files":{"type":"number"},"diffs":{"type":"array","items":{"type":"object"}}},"required":["additions","deletions","files"],"additionalProperties":false},"revert":{"type":"object","properties":{"messageID":{"type":"string"},"partID":{"type":"string"},"snapshot":{"type":"string"},"diff":{"type":"string"},"workspace":{"type":"string","enum":["restored","snapshots-disabled","unavailable"]}},"required":["messageID"],"additionalProperties":false},"permission":{"type":"object"},"timeCreated":{"type":"number"},"timeUpdated":{"type":"number"},"timeCompacting":{"type":"number"},"timeArchived":{"type":"number"}},"required":["id","projectID","slug","directory","title","version","timeCreated","timeUpdated"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.kilocode.sessionImport.session({\n ...\n})"}]}},"/kilocode/session-import/message":{"post":{"tags":["session-import"],"operationId":"kilocode.sessionImport.message","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Message import result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KilocodeSessionImportResult"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Insert or update a message row used by legacy session import.","summary":"Insert message for session import","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"sessionID":{"type":"string"},"timeCreated":{"type":"number"},"data":{"anyOf":[{"type":"object","properties":{"role":{"type":"string","enum":["user"]},"time":{"type":"object","properties":{"created":{"type":"number"}},"required":["created"],"additionalProperties":false},"agent":{"type":"string"},"model":{"type":"object","properties":{"providerID":{"type":"string"},"modelID":{"type":"string"}},"required":["providerID","modelID"],"additionalProperties":false},"tools":{"type":"object","additionalProperties":{"type":"boolean"}}},"required":["role","time","agent","model"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["assistant"]},"time":{"type":"object","properties":{"created":{"type":"number"},"completed":{"type":"number"}},"required":["created"],"additionalProperties":false},"parentID":{"type":"string"},"modelID":{"type":"string"},"providerID":{"type":"string"},"mode":{"type":"string"},"agent":{"type":"string"},"path":{"type":"object","properties":{"cwd":{"type":"string"},"root":{"type":"string"}},"required":["cwd","root"],"additionalProperties":false},"summary":{"type":"boolean"},"cost":{"type":"number"},"tokens":{"type":"object","properties":{"total":{"type":"number"},"input":{"type":"number"},"output":{"type":"number"},"reasoning":{"type":"number"},"cache":{"type":"object","properties":{"read":{"type":"number"},"write":{"type":"number"}},"required":["read","write"],"additionalProperties":false}},"required":["input","output","reasoning","cache"],"additionalProperties":false},"structured":{},"variant":{"type":"string"},"finish":{"type":"string"}},"required":["role","time","parentID","modelID","providerID","mode","agent","path","cost","tokens"],"additionalProperties":false}]}},"required":["id","sessionID","timeCreated","data"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.kilocode.sessionImport.message({\n ...\n})"}]}},"/kilocode/session-import/part":{"post":{"tags":["session-import"],"operationId":"kilocode.sessionImport.part","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Part import result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KilocodeSessionImportResult"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Insert or update a part row used by legacy session import.","summary":"Insert part for session import","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"messageID":{"type":"string"},"sessionID":{"type":"string"},"timeCreated":{"type":"number"},"data":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"synthetic":{"type":"boolean"},"ignored":{"type":"boolean"},"time":{"type":"object","properties":{"start":{"type":"number"},"end":{"type":"number"}},"required":["start"],"additionalProperties":false},"metadata":{"type":"object"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["reasoning"]},"text":{"type":"string"},"metadata":{"type":"object"},"time":{"type":"object","properties":{"start":{"type":"number"},"end":{"type":"number"}},"required":["start"],"additionalProperties":false}},"required":["type","text","time"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool"]},"callID":{"type":"string"},"tool":{"type":"string"},"state":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending"]},"input":{"type":"object"},"raw":{"type":"string"}},"required":["status","input","raw"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["running"]},"input":{"type":"object"},"title":{"type":"string"},"metadata":{"type":"object"},"time":{"type":"object","properties":{"start":{"type":"number"}},"required":["start"],"additionalProperties":false}},"required":["status","input","time"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["completed"]},"input":{"type":"object"},"output":{"type":"string"},"title":{"type":"string"},"metadata":{"type":"object"},"time":{"type":"object","properties":{"start":{"type":"number"},"end":{"type":"number"},"compacted":{"type":"number"}},"required":["start","end"],"additionalProperties":false}},"required":["status","input","output","title","metadata","time"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"input":{"type":"object"},"error":{"type":"string"},"metadata":{"type":"object"},"time":{"type":"object","properties":{"start":{"type":"number"},"end":{"type":"number"}},"required":["start","end"],"additionalProperties":false}},"required":["status","input","error","time"],"additionalProperties":false}]},"metadata":{"type":"object"}},"required":["type","callID","tool","state"],"additionalProperties":false}]}},"required":["id","messageID","sessionID","data"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.kilocode.sessionImport.part({\n ...\n})"}]}},"/suggestion":{"get":{"tags":["suggestion"],"operationId":"suggestion.list","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"List of pending suggestions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SuggestionRequest"},"description":"List of pending suggestions"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}}},"description":"Get all pending suggestion requests across all sessions.","summary":"List pending suggestions","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.suggestion.list({\n ...\n})"}]}},"/suggestion/{requestID}/accept":{"post":{"tags":["suggestion"],"operationId":"suggestion.accept","parameters":[{"name":"requestID","in":"path","schema":{"type":"string"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Suggestion accepted successfully","content":{"application/json":{"schema":{"type":"boolean","description":"Suggestion accepted successfully"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Accept a suggestion request from the AI assistant.","summary":"Accept suggestion request","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"description":"Zero-based action index to accept"}},"required":["index"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.suggestion.accept({\n ...\n})"}]}},"/suggestion/{requestID}/dismiss":{"post":{"tags":["suggestion"],"operationId":"suggestion.dismiss","parameters":[{"name":"requestID","in":"path","schema":{"type":"string"},"required":true},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Suggestion dismissed successfully","content":{"application/json":{"schema":{"type":"boolean","description":"Suggestion dismissed successfully"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Dismiss a suggestion request from the AI assistant.","summary":"Dismiss suggestion request","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.suggestion.dismiss({\n ...\n})"}]}},"/telemetry/capture":{"post":{"tags":["telemetry"],"operationId":"telemetry.capture","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Event captured","content":{"application/json":{"schema":{"type":"boolean","description":"Event captured"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Forward a telemetry event to PostHog via kilo-telemetry.","summary":"Capture telemetry event","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"event":{"type":"string","description":"Event name"},"properties":{"type":"object"}},"required":["event"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.telemetry.capture({\n ...\n})"}]}},"/telemetry/setEnabled":{"post":{"tags":["telemetry"],"operationId":"telemetry.setEnabled","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"State updated","content":{"application/json":{"schema":{"type":"boolean","description":"State updated"}}}},"400":{"description":"BadRequest | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/effect_HttpApiError_BadRequest"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"description":"Update the PostHog client's opt-in/out state at runtime. The CLI reads KILO_TELEMETRY_LEVEL once at spawn — this route lets clients (e.g. the VS Code extension) propagate runtime telemetry consent changes.","summary":"Set PostHog telemetry enabled state","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.telemetry.setEnabled({\n ...\n})"}]}},"/memory/status":{"get":{"tags":["memory"],"operationId":"memory.status","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Memory status","content":{"application/json":{"schema":{"type":"object","properties":{"root":{"type":"string"},"state":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"enabled":{"type":"boolean"},"scope":{"type":"string","enum":["project"]},"autoInject":{"type":"boolean"},"autoConsolidate":{"type":"boolean"},"verbose":{"type":"boolean"},"capture":{"type":"object","properties":{"mode":{"type":"string","enum":["selective"]},"turnClose":{"type":"boolean"},"explicit":{"type":"boolean"},"maxOpsPerRun":{"type":"number"},"minIntervalMs":{"type":"number"},"timeoutMs":{"type":"number"}},"required":["mode","turnClose","explicit","maxOpsPerRun","minIntervalMs","timeoutMs"],"additionalProperties":false},"limits":{"type":"object","properties":{"maxProjectIndexBytes":{"type":"number"},"maxSessionFiles":{"type":"number"},"maxRecentSessions":{"type":"number"},"maxConsolidationInputBytes":{"type":"number"},"maxLineChars":{"type":"number"},"maxSessionLineChars":{"type":"number"}},"required":["maxProjectIndexBytes","maxSessionFiles","maxRecentSessions","maxConsolidationInputBytes","maxLineChars","maxSessionLineChars"],"additionalProperties":false},"stats":{"type":"object","properties":{"lastInjectedAt":{"type":"number"},"lastInjectedBytes":{"type":"number"},"lastInjectedTokens":{"type":"number"},"lastInjectedSessionID":{"type":"string"},"lastTypedConsolidationAt":{"type":"number"},"lastSessionSavedAt":{"type":"number"},"lastConsolidationCost":{"type":"number"},"lastConsolidationTokens":{"type":"number"},"lastOperationCount":{"type":"number"},"lastRecallAt":{"type":"number"},"lastRecallCount":{"type":"number"},"lastRecallSessionID":{"type":"string"}},"required":["lastInjectedAt","lastInjectedBytes","lastInjectedTokens","lastInjectedSessionID","lastTypedConsolidationAt","lastSessionSavedAt","lastConsolidationCost","lastConsolidationTokens","lastOperationCount","lastRecallAt","lastRecallCount","lastRecallSessionID"],"additionalProperties":false}},"required":["version","enabled","scope","autoInject","autoConsolidate","verbose","capture","limits","stats"],"additionalProperties":false},"exists":{"type":"object","properties":{"state":{"type":"boolean"},"index":{"type":"boolean"}},"required":["state","index"],"additionalProperties":false},"index":{"type":"object","properties":{"bytes":{"type":"number"},"estimatedTokens":{"type":"number"},"preview":{"type":"string"}},"required":["bytes","estimatedTokens","preview"],"additionalProperties":false}},"required":["root","state","exists","index"],"additionalProperties":false,"description":"Memory status"}}}},"400":{"description":"MemoryApiClientError | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MemoryApiClientError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"503":{"description":"MemoryApiServerError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryApiServerError"}}}}},"description":"Return memory state, index preview, and token estimate for the active workspace.","summary":"Get memory status","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.memory.status({\n ...\n})"}]}},"/memory/show":{"get":{"tags":["memory"],"operationId":"memory.show","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Memory source and index","content":{"application/json":{"schema":{"type":"object","properties":{"root":{"type":"string"},"state":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"enabled":{"type":"boolean"},"scope":{"type":"string","enum":["project"]},"autoInject":{"type":"boolean"},"autoConsolidate":{"type":"boolean"},"verbose":{"type":"boolean"},"capture":{"type":"object","properties":{"mode":{"type":"string","enum":["selective"]},"turnClose":{"type":"boolean"},"explicit":{"type":"boolean"},"maxOpsPerRun":{"type":"number"},"minIntervalMs":{"type":"number"},"timeoutMs":{"type":"number"}},"required":["mode","turnClose","explicit","maxOpsPerRun","minIntervalMs","timeoutMs"],"additionalProperties":false},"limits":{"type":"object","properties":{"maxProjectIndexBytes":{"type":"number"},"maxSessionFiles":{"type":"number"},"maxRecentSessions":{"type":"number"},"maxConsolidationInputBytes":{"type":"number"},"maxLineChars":{"type":"number"},"maxSessionLineChars":{"type":"number"}},"required":["maxProjectIndexBytes","maxSessionFiles","maxRecentSessions","maxConsolidationInputBytes","maxLineChars","maxSessionLineChars"],"additionalProperties":false},"stats":{"type":"object","properties":{"lastInjectedAt":{"type":"number"},"lastInjectedBytes":{"type":"number"},"lastInjectedTokens":{"type":"number"},"lastInjectedSessionID":{"type":"string"},"lastTypedConsolidationAt":{"type":"number"},"lastSessionSavedAt":{"type":"number"},"lastConsolidationCost":{"type":"number"},"lastConsolidationTokens":{"type":"number"},"lastOperationCount":{"type":"number"},"lastRecallAt":{"type":"number"},"lastRecallCount":{"type":"number"},"lastRecallSessionID":{"type":"string"}},"required":["lastInjectedAt","lastInjectedBytes","lastInjectedTokens","lastInjectedSessionID","lastTypedConsolidationAt","lastSessionSavedAt","lastConsolidationCost","lastConsolidationTokens","lastOperationCount","lastRecallAt","lastRecallCount","lastRecallSessionID"],"additionalProperties":false}},"required":["version","enabled","scope","autoInject","autoConsolidate","verbose","capture","limits","stats"],"additionalProperties":false},"sources":{"type":"object","properties":{"project":{"type":"string"},"environment":{"type":"string"},"corrections":{"type":"string"}},"required":["project","environment","corrections"],"additionalProperties":false},"index":{"type":"string"},"items":{"type":"string"},"changes":{"type":"string"},"decisions":{"type":"string"}},"required":["root","state","sources","index","items","changes","decisions"],"additionalProperties":false,"description":"Memory source and index"}}}},"400":{"description":"MemoryApiClientError | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MemoryApiClientError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"503":{"description":"MemoryApiServerError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryApiServerError"}}}}},"description":"Return source memory files, generated index, recent decision summary, and memory save decisions.","summary":"Show memory","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.memory.show({\n ...\n})"}]}},"/memory/enable":{"post":{"tags":["memory"],"operationId":"memory.enable","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Memory enabled","content":{"application/json":{"schema":{"type":"object","properties":{"root":{"type":"string"},"state":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"enabled":{"type":"boolean"},"scope":{"type":"string","enum":["project"]},"autoInject":{"type":"boolean"},"autoConsolidate":{"type":"boolean"},"verbose":{"type":"boolean"},"capture":{"type":"object","properties":{"mode":{"type":"string","enum":["selective"]},"turnClose":{"type":"boolean"},"explicit":{"type":"boolean"},"maxOpsPerRun":{"type":"number"},"minIntervalMs":{"type":"number"},"timeoutMs":{"type":"number"}},"required":["mode","turnClose","explicit","maxOpsPerRun","minIntervalMs","timeoutMs"],"additionalProperties":false},"limits":{"type":"object","properties":{"maxProjectIndexBytes":{"type":"number"},"maxSessionFiles":{"type":"number"},"maxRecentSessions":{"type":"number"},"maxConsolidationInputBytes":{"type":"number"},"maxLineChars":{"type":"number"},"maxSessionLineChars":{"type":"number"}},"required":["maxProjectIndexBytes","maxSessionFiles","maxRecentSessions","maxConsolidationInputBytes","maxLineChars","maxSessionLineChars"],"additionalProperties":false},"stats":{"type":"object","properties":{"lastInjectedAt":{"type":"number"},"lastInjectedBytes":{"type":"number"},"lastInjectedTokens":{"type":"number"},"lastInjectedSessionID":{"type":"string"},"lastTypedConsolidationAt":{"type":"number"},"lastSessionSavedAt":{"type":"number"},"lastConsolidationCost":{"type":"number"},"lastConsolidationTokens":{"type":"number"},"lastOperationCount":{"type":"number"},"lastRecallAt":{"type":"number"},"lastRecallCount":{"type":"number"},"lastRecallSessionID":{"type":"string"}},"required":["lastInjectedAt","lastInjectedBytes","lastInjectedTokens","lastInjectedSessionID","lastTypedConsolidationAt","lastSessionSavedAt","lastConsolidationCost","lastConsolidationTokens","lastOperationCount","lastRecallAt","lastRecallCount","lastRecallSessionID"],"additionalProperties":false}},"required":["version","enabled","scope","autoInject","autoConsolidate","verbose","capture","limits","stats"],"additionalProperties":false},"index":{"type":"object","properties":{"text":{"type":"string"},"bytes":{"type":"number"},"tokens":{"type":"number"},"truncated":{"type":"boolean"}},"required":["text","bytes","tokens","truncated"],"additionalProperties":false}},"required":["root","state","index"],"additionalProperties":false,"description":"Memory enabled"}}}},"400":{"description":"MemoryApiClientError | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MemoryApiClientError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"503":{"description":"MemoryApiServerError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryApiServerError"}}}}},"description":"Scaffold and enable project memory for the active workspace.","summary":"Enable memory","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.memory.enable({\n ...\n})"}]}},"/memory/disable":{"post":{"tags":["memory"],"operationId":"memory.disable","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Memory disabled","content":{"application/json":{"schema":{"type":"object","properties":{"root":{"type":"string"},"state":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"enabled":{"type":"boolean"},"scope":{"type":"string","enum":["project"]},"autoInject":{"type":"boolean"},"autoConsolidate":{"type":"boolean"},"verbose":{"type":"boolean"},"capture":{"type":"object","properties":{"mode":{"type":"string","enum":["selective"]},"turnClose":{"type":"boolean"},"explicit":{"type":"boolean"},"maxOpsPerRun":{"type":"number"},"minIntervalMs":{"type":"number"},"timeoutMs":{"type":"number"}},"required":["mode","turnClose","explicit","maxOpsPerRun","minIntervalMs","timeoutMs"],"additionalProperties":false},"limits":{"type":"object","properties":{"maxProjectIndexBytes":{"type":"number"},"maxSessionFiles":{"type":"number"},"maxRecentSessions":{"type":"number"},"maxConsolidationInputBytes":{"type":"number"},"maxLineChars":{"type":"number"},"maxSessionLineChars":{"type":"number"}},"required":["maxProjectIndexBytes","maxSessionFiles","maxRecentSessions","maxConsolidationInputBytes","maxLineChars","maxSessionLineChars"],"additionalProperties":false},"stats":{"type":"object","properties":{"lastInjectedAt":{"type":"number"},"lastInjectedBytes":{"type":"number"},"lastInjectedTokens":{"type":"number"},"lastInjectedSessionID":{"type":"string"},"lastTypedConsolidationAt":{"type":"number"},"lastSessionSavedAt":{"type":"number"},"lastConsolidationCost":{"type":"number"},"lastConsolidationTokens":{"type":"number"},"lastOperationCount":{"type":"number"},"lastRecallAt":{"type":"number"},"lastRecallCount":{"type":"number"},"lastRecallSessionID":{"type":"string"}},"required":["lastInjectedAt","lastInjectedBytes","lastInjectedTokens","lastInjectedSessionID","lastTypedConsolidationAt","lastSessionSavedAt","lastConsolidationCost","lastConsolidationTokens","lastOperationCount","lastRecallAt","lastRecallCount","lastRecallSessionID"],"additionalProperties":false}},"required":["version","enabled","scope","autoInject","autoConsolidate","verbose","capture","limits","stats"],"additionalProperties":false}},"required":["root","state"],"additionalProperties":false,"description":"Memory disabled"}}}},"400":{"description":"MemoryApiClientError | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MemoryApiClientError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"503":{"description":"MemoryApiServerError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryApiServerError"}}}}},"description":"Disable project memory without deleting local memory files.","summary":"Disable memory","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.memory.disable({\n ...\n})"}]}},"/memory/configure":{"post":{"tags":["memory"],"operationId":"memory.configure","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Memory configured","content":{"application/json":{"schema":{"type":"object","properties":{"root":{"type":"string"},"state":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"enabled":{"type":"boolean"},"scope":{"type":"string","enum":["project"]},"autoInject":{"type":"boolean"},"autoConsolidate":{"type":"boolean"},"verbose":{"type":"boolean"},"capture":{"type":"object","properties":{"mode":{"type":"string","enum":["selective"]},"turnClose":{"type":"boolean"},"explicit":{"type":"boolean"},"maxOpsPerRun":{"type":"number"},"minIntervalMs":{"type":"number"},"timeoutMs":{"type":"number"}},"required":["mode","turnClose","explicit","maxOpsPerRun","minIntervalMs","timeoutMs"],"additionalProperties":false},"limits":{"type":"object","properties":{"maxProjectIndexBytes":{"type":"number"},"maxSessionFiles":{"type":"number"},"maxRecentSessions":{"type":"number"},"maxConsolidationInputBytes":{"type":"number"},"maxLineChars":{"type":"number"},"maxSessionLineChars":{"type":"number"}},"required":["maxProjectIndexBytes","maxSessionFiles","maxRecentSessions","maxConsolidationInputBytes","maxLineChars","maxSessionLineChars"],"additionalProperties":false},"stats":{"type":"object","properties":{"lastInjectedAt":{"type":"number"},"lastInjectedBytes":{"type":"number"},"lastInjectedTokens":{"type":"number"},"lastInjectedSessionID":{"type":"string"},"lastTypedConsolidationAt":{"type":"number"},"lastSessionSavedAt":{"type":"number"},"lastConsolidationCost":{"type":"number"},"lastConsolidationTokens":{"type":"number"},"lastOperationCount":{"type":"number"},"lastRecallAt":{"type":"number"},"lastRecallCount":{"type":"number"},"lastRecallSessionID":{"type":"string"}},"required":["lastInjectedAt","lastInjectedBytes","lastInjectedTokens","lastInjectedSessionID","lastTypedConsolidationAt","lastSessionSavedAt","lastConsolidationCost","lastConsolidationTokens","lastOperationCount","lastRecallAt","lastRecallCount","lastRecallSessionID"],"additionalProperties":false}},"required":["version","enabled","scope","autoInject","autoConsolidate","verbose","capture","limits","stats"],"additionalProperties":false}},"required":["root","state"],"additionalProperties":false,"description":"Memory configured"}}}},"400":{"description":"MemoryApiClientError | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MemoryApiClientError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"503":{"description":"MemoryApiServerError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryApiServerError"}}}}},"description":"Update project memory settings such as automatic project fact capture.","summary":"Configure memory","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"autoConsolidate":{"type":"boolean"},"verbose":{"type":"boolean"}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.memory.configure({\n ...\n})"}]}},"/memory/rebuild":{"post":{"tags":["memory"],"operationId":"memory.rebuild","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Memory rebuilt","content":{"application/json":{"schema":{"type":"object","properties":{"root":{"type":"string"},"state":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"enabled":{"type":"boolean"},"scope":{"type":"string","enum":["project"]},"autoInject":{"type":"boolean"},"autoConsolidate":{"type":"boolean"},"verbose":{"type":"boolean"},"capture":{"type":"object","properties":{"mode":{"type":"string","enum":["selective"]},"turnClose":{"type":"boolean"},"explicit":{"type":"boolean"},"maxOpsPerRun":{"type":"number"},"minIntervalMs":{"type":"number"},"timeoutMs":{"type":"number"}},"required":["mode","turnClose","explicit","maxOpsPerRun","minIntervalMs","timeoutMs"],"additionalProperties":false},"limits":{"type":"object","properties":{"maxProjectIndexBytes":{"type":"number"},"maxSessionFiles":{"type":"number"},"maxRecentSessions":{"type":"number"},"maxConsolidationInputBytes":{"type":"number"},"maxLineChars":{"type":"number"},"maxSessionLineChars":{"type":"number"}},"required":["maxProjectIndexBytes","maxSessionFiles","maxRecentSessions","maxConsolidationInputBytes","maxLineChars","maxSessionLineChars"],"additionalProperties":false},"stats":{"type":"object","properties":{"lastInjectedAt":{"type":"number"},"lastInjectedBytes":{"type":"number"},"lastInjectedTokens":{"type":"number"},"lastInjectedSessionID":{"type":"string"},"lastTypedConsolidationAt":{"type":"number"},"lastSessionSavedAt":{"type":"number"},"lastConsolidationCost":{"type":"number"},"lastConsolidationTokens":{"type":"number"},"lastOperationCount":{"type":"number"},"lastRecallAt":{"type":"number"},"lastRecallCount":{"type":"number"},"lastRecallSessionID":{"type":"string"}},"required":["lastInjectedAt","lastInjectedBytes","lastInjectedTokens","lastInjectedSessionID","lastTypedConsolidationAt","lastSessionSavedAt","lastConsolidationCost","lastConsolidationTokens","lastOperationCount","lastRecallAt","lastRecallCount","lastRecallSessionID"],"additionalProperties":false}},"required":["version","enabled","scope","autoInject","autoConsolidate","verbose","capture","limits","stats"],"additionalProperties":false},"index":{"type":"object","properties":{"text":{"type":"string"},"bytes":{"type":"number"},"tokens":{"type":"number"},"truncated":{"type":"boolean"}},"required":["text","bytes","tokens","truncated"],"additionalProperties":false}},"required":["root","state","index"],"additionalProperties":false,"description":"Memory rebuilt"}}}},"400":{"description":"MemoryApiClientError | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MemoryApiClientError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"503":{"description":"MemoryApiServerError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryApiServerError"}}}}},"description":"Regenerate index.kmem from source memory files.","summary":"Rebuild memory index","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.memory.rebuild({\n ...\n})"}]}},"/memory/remember":{"post":{"tags":["memory"],"operationId":"memory.remember","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Memory operation result","content":{"application/json":{"schema":{"type":"object","properties":{"operationCount":{"type":"number"},"added":{"type":"number"},"removed":{"type":"number"},"skipped":{"type":"array","items":{"type":"object","properties":{"reason":{"type":"string","enum":["self_referential","out_of_scope","secret"]},"text":{"type":"string"}},"required":["reason"],"additionalProperties":false}},"index":{"type":"object","properties":{"text":{"type":"string"},"bytes":{"type":"number"},"tokens":{"type":"number"},"truncated":{"type":"boolean"}},"required":["text","bytes","tokens","truncated"],"additionalProperties":false}},"required":["operationCount","added","removed","skipped","index"],"additionalProperties":false,"description":"Memory operation result"}}}},"400":{"description":"MemoryApiClientError | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MemoryApiClientError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"503":{"description":"MemoryApiServerError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryApiServerError"}}}}},"description":"Persist explicit user-provided memory text through the deterministic operation pipeline.","summary":"Remember text","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":12000},"key":{"type":"string","maxLength":256},"file":{"type":"string","enum":["project.md","environment.md","corrections.md"]},"section":{"type":"string","maxLength":80,"pattern":"^[^\\x00-\\x1f\\x7f]*$"},"sessionID":{"type":"string","maxLength":128}},"required":["text"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.memory.remember({\n ...\n})"}]}},"/memory/correct":{"post":{"tags":["memory"],"operationId":"memory.correct","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Memory correction result","content":{"application/json":{"schema":{"type":"object","properties":{"operationCount":{"type":"number"},"added":{"type":"number"},"removed":{"type":"number"},"skipped":{"type":"array","items":{"type":"object","properties":{"reason":{"type":"string","enum":["self_referential","out_of_scope","secret"]},"text":{"type":"string"}},"required":["reason"],"additionalProperties":false}},"index":{"type":"object","properties":{"text":{"type":"string"},"bytes":{"type":"number"},"tokens":{"type":"number"},"truncated":{"type":"boolean"}},"required":["text","bytes","tokens","truncated"],"additionalProperties":false}},"required":["operationCount","added","removed","skipped","index"],"additionalProperties":false,"description":"Memory correction result"}}}},"400":{"description":"MemoryApiClientError | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MemoryApiClientError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"503":{"description":"MemoryApiServerError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryApiServerError"}}}}},"description":"Persist explicit corrective memory under corrections.md.","summary":"Remember correction","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":12000},"key":{"type":"string","maxLength":256},"sessionID":{"type":"string","maxLength":128}},"required":["text"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.memory.correct({\n ...\n})"}]}},"/memory/forget":{"post":{"tags":["memory"],"operationId":"memory.forget","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Memory forget result","content":{"application/json":{"schema":{"type":"object","properties":{"operationCount":{"type":"number"},"added":{"type":"number"},"removed":{"type":"number"},"skipped":{"type":"array","items":{"type":"object","properties":{"reason":{"type":"string","enum":["self_referential","out_of_scope","secret"]},"text":{"type":"string"}},"required":["reason"],"additionalProperties":false}},"index":{"type":"object","properties":{"text":{"type":"string"},"bytes":{"type":"number"},"tokens":{"type":"number"},"truncated":{"type":"boolean"}},"required":["text","bytes","tokens","truncated"],"additionalProperties":false}},"required":["operationCount","added","removed","skipped","index"],"additionalProperties":false,"description":"Memory forget result"}}}},"400":{"description":"MemoryApiClientError | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MemoryApiClientError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"503":{"description":"MemoryApiServerError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryApiServerError"}}}}},"description":"Remove memory lines by exact key, id, or normalized key text and rebuild the index.","summary":"Forget memory","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":12000},"sessionID":{"type":"string","maxLength":128}},"required":["query"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.memory.forget({\n ...\n})"}]}},"/memory/purge":{"post":{"tags":["memory"],"operationId":"memory.purge","parameters":[{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"workspace","in":"query","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"Memory purged","content":{"application/json":{"schema":{"type":"object","properties":{"root":{"type":"string"},"purged":{"type":"boolean"}},"required":["root","purged"],"additionalProperties":false,"description":"Memory purged"}}}},"400":{"description":"MemoryApiClientError | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MemoryApiClientError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"503":{"description":"MemoryApiServerError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryApiServerError"}}}}},"description":"Delete all project memory files for the active workspace.","summary":"Purge memory","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"boolean","enum":[true]}},"required":["confirm"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.memory.purge({\n ...\n})"}]}},"/api/health":{"get":{"tags":["opencode HttpApi"],"operationId":"v2.health.get","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"healthy":{"type":"boolean","enum":[true]}},"required":["healthy"],"additionalProperties":false}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"description":"Check whether the API server is ready to accept requests.","summary":"Check server health","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.health.get({\n ...\n})"}]}},"/api/location":{"get":{"tags":["opencode HttpApi"],"operationId":"v2.location.get","parameters":[{"name":"location","in":"query","schema":{"type":"object","properties":{"directory":{"type":"string"},"workspace":{"type":"string"}},"additionalProperties":false},"required":false,"style":"deepObject","explode":true}],"security":[],"responses":{"200":{"description":"Location.Info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationInfo"}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"description":"Resolve the requested location or the server default location.","summary":"Get location","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.location.get({\n ...\n})"}]}},"/api/agent":{"get":{"tags":["opencode HttpApi"],"operationId":"v2.agent.list","parameters":[{"name":"location","in":"query","schema":{"type":"object","properties":{"directory":{"type":"string"},"workspace":{"type":"string"}},"additionalProperties":false},"required":false,"style":"deepObject","explode":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"location":{"$ref":"#/components/schemas/LocationInfo"},"data":{"type":"array","items":{"$ref":"#/components/schemas/AgentV2Info"}}},"required":["location","data"],"additionalProperties":false}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"description":"Retrieve currently registered agents.","summary":"List agents","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.agent.list({\n ...\n})"}]}},"/api/session":{"get":{"tags":["sessions"],"operationId":"v2.session.list","parameters":[{"name":"workspace","in":"query","schema":{"type":"string","pattern":"^wrk"},"required":false},{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]},"required":false},{"name":"search","in":"query","schema":{"type":"string"},"required":false},{"name":"directory","in":"query","schema":{"type":"string"},"required":false},{"name":"project","in":"query","schema":{"type":"string"},"required":false},{"name":"subpath","in":"query","schema":{"type":"string"},"required":false},{"name":"cursor","in":"query","schema":{"type":"string","description":"Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response."},"required":false}],"security":[],"responses":{"200":{"description":"SessionsResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionsResponse"}}}},"400":{"description":"InvalidCursorError | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCursorError"},{"$ref":"#/components/schemas/InvalidRequestError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"description":"Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.","summary":"List sessions","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.session.list({\n ...\n})"}]},"post":{"tags":["sessions"],"operationId":"v2.session.create","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SessionV2Info"}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"description":"Create a session at the requested location.","summary":"Create session","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^ses"},"agent":{"type":"string"},"model":{"$ref":"#/components/schemas/ModelRef"},"location":{"$ref":"#/components/schemas/LocationRef"}},"additionalProperties":false}}},"required":true},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.session.create({\n ...\n})"}]}},"/api/session/active":{"get":{"tags":["sessions"],"operationId":"v2.session.active","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","patternProperties":{"^ses":{"$ref":"#/components/schemas/SessionActive"}}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"description":"Retrieve foreground Session drains currently owned by this Kilo process. Sessions absent from the result are inactive.","summary":"List active sessions","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.session.active({\n ...\n})"}]}},"/api/session/{sessionID}":{"get":{"tags":["sessions"],"operationId":"v2.session.get","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SessionV2Info"}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"SessionNotFoundError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SessionNotFoundError"},{"$ref":"#/components/schemas/SessionNotFoundError"}]}}}}},"description":"Retrieve a session by ID.","summary":"Get session","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.session.get({\n ...\n})"}]}},"/api/session/{sessionID}/agent":{"post":{"tags":["sessions"],"operationId":"v2.session.switchAgent","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true}],"security":[],"responses":{"204":{"description":""},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"SessionNotFoundError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SessionNotFoundError"},{"$ref":"#/components/schemas/SessionNotFoundError"}]}}}}},"description":"Switch the agent used by subsequent provider turns.","summary":"Switch session agent","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":"string"}},"required":["agent"],"additionalProperties":false}}},"required":true},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.session.switchAgent({\n ...\n})"}]}},"/api/session/{sessionID}/model":{"post":{"tags":["sessions"],"operationId":"v2.session.switchModel","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true}],"security":[],"responses":{"204":{"description":""},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"SessionNotFoundError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SessionNotFoundError"},{"$ref":"#/components/schemas/SessionNotFoundError"}]}}}}},"description":"Switch the model used by subsequent provider turns.","summary":"Switch session model","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"$ref":"#/components/schemas/ModelRef"}},"required":["model"],"additionalProperties":false}}},"required":true},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.session.switchModel({\n ...\n})"}]}},"/api/session/{sessionID}/prompt":{"post":{"tags":["sessions"],"operationId":"v2.session.prompt","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SessionInputAdmitted"}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"SessionNotFoundError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SessionNotFoundError"},{"$ref":"#/components/schemas/SessionNotFoundError"}]}}}},"409":{"description":"ConflictError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}}},"description":"Durably admit one session input and schedule agent-loop execution unless resume is false.","summary":"Send message","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^msg_"},"prompt":{"$ref":"#/components/schemas/PromptInput"},"delivery":{"type":"string","enum":["steer","queue"]},"resume":{"type":"boolean"}},"required":["prompt"],"additionalProperties":false}}},"required":true},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.session.prompt({\n ...\n})"}]}},"/api/session/{sessionID}/compact":{"post":{"tags":["sessions"],"operationId":"v2.session.compact","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true}],"security":[],"responses":{"204":{"description":""},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"SessionNotFoundError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SessionNotFoundError"},{"$ref":"#/components/schemas/SessionNotFoundError"}]}}}},"503":{"description":"ServiceUnavailableError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}}}},"description":"Compact a session conversation.","summary":"Compact session","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.session.compact({\n ...\n})"}]}},"/api/session/{sessionID}/wait":{"post":{"tags":["sessions"],"operationId":"v2.session.wait","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true}],"security":[],"responses":{"204":{"description":""},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"SessionNotFoundError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SessionNotFoundError"},{"$ref":"#/components/schemas/SessionNotFoundError"}]}}}},"503":{"description":"ServiceUnavailableError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}}}},"description":"Wait for a session agent loop to become idle.","summary":"Wait for session","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.session.wait({\n ...\n})"}]}},"/api/session/{sessionID}/revert/stage":{"post":{"tags":["sessions"],"operationId":"v2.session.revert.stage","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RevertState"}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"MessageNotFoundError | SessionNotFoundError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MessageNotFoundError"},{"$ref":"#/components/schemas/SessionNotFoundError"},{"$ref":"#/components/schemas/SessionNotFoundError"}]}}}},"500":{"description":"UnknownError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnknownError1"}}}}},"description":"Stage or move a reversible session boundary and optionally apply its file changes.","summary":"Stage session revert","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"messageID":{"type":"string","pattern":"^msg_"},"files":{"type":"boolean"}},"required":["messageID"],"additionalProperties":false}}},"required":true},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.session.revert.stage({\n ...\n})"}]}},"/api/session/{sessionID}/revert/clear":{"post":{"tags":["sessions"],"operationId":"v2.session.revert.clear","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true}],"security":[],"responses":{"204":{"description":""},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"SessionNotFoundError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SessionNotFoundError"},{"$ref":"#/components/schemas/SessionNotFoundError"}]}}}},"500":{"description":"UnknownError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnknownError1"}}}}},"summary":"Clear staged revert","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.session.revert.clear({\n ...\n})"}]}},"/api/session/{sessionID}/revert/commit":{"post":{"tags":["sessions"],"operationId":"v2.session.revert.commit","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true}],"security":[],"responses":{"204":{"description":""},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"SessionNotFoundError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SessionNotFoundError"},{"$ref":"#/components/schemas/SessionNotFoundError"}]}}}}},"summary":"Commit staged revert","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.session.revert.commit({\n ...\n})"}]}},"/api/session/{sessionID}/context":{"get":{"tags":["sessions"],"operationId":"v2.session.context","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SessionMessage"}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"SessionNotFoundError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SessionNotFoundError"},{"$ref":"#/components/schemas/SessionNotFoundError"}]}}}},"500":{"description":"UnknownError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnknownError1"}}}}},"description":"Retrieve the active context messages for a session (all messages after the last compaction).","summary":"Get session context","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.session.context({\n ...\n})"}]}},"/api/session/{sessionID}/history":{"get":{"tags":["sessions"],"operationId":"v2.session.history","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"limit","in":"query","schema":{"type":"string"},"required":false},{"name":"after","in":"query","schema":{"type":"string"},"required":false}],"security":[],"responses":{"200":{"description":"SessionHistory","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionHistory"}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"SessionNotFoundError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SessionNotFoundError"},{"$ref":"#/components/schemas/SessionNotFoundError"}]}}}}},"description":"Read one finite page of public durable Session events after an exclusive aggregate sequence. Newly committed events may appear on later pages.","summary":"Get session history","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.session.history({\n ...\n})"}]}},"/api/session/{sessionID}/event":{"get":{"tags":["sessions"],"operationId":"v2.session.events","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"after","in":"query","schema":{"type":"string"},"required":false}],"security":[],"responses":{"200":{"description":"Success","content":{"text/event-stream":{"schema":{"type":"object","properties":{"id":{"type":"string"},"event":{"type":"string"},"data":{"$ref":"#/components/schemas/SessionDurableEventStream"}},"required":["id","event","data"],"additionalProperties":false},"x-effect-stream":{"encoding":"sse","causeSchema":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["Fail"]},"error":{"not":{}}},"required":["_tag","error"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["Die"]},"defect":{}},"required":["_tag","defect"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["Interrupt"]},"fiberId":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["_tag","fiberId"],"additionalProperties":false}]}},"errorSchema":{"not":{}},"failureEvent":"effect/httpapi/stream/failure"}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"SessionNotFoundError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SessionNotFoundError"},{"$ref":"#/components/schemas/SessionNotFoundError"}]}}}}},"description":"Replay durable events after an aggregate sequence, then continue with new durable events.","summary":"Subscribe to session events","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.session.events({\n ...\n})"}]}},"/api/session/{sessionID}/interrupt":{"post":{"tags":["sessions"],"operationId":"v2.session.interrupt","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true}],"security":[],"responses":{"204":{"description":""},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"SessionNotFoundError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SessionNotFoundError"},{"$ref":"#/components/schemas/SessionNotFoundError"}]}}}}},"description":"Interrupt active execution owned by this Kilo process. Idle interruption is a no-op.","summary":"Interrupt session execution","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.session.interrupt({\n ...\n})"}]}},"/api/session/{sessionID}/message/{messageID}":{"get":{"tags":["sessions"],"operationId":"v2.session.message","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"messageID","in":"path","schema":{"type":"string","pattern":"^msg.*"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SessionMessage"}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"SessionNotFoundError | MessageNotFoundError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MessageNotFoundError"},{"$ref":"#/components/schemas/SessionNotFoundError"},{"$ref":"#/components/schemas/SessionNotFoundError"}]}}}}},"description":"Retrieve one projected message owned by the Session.","summary":"Get session message","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.session.message({\n ...\n})"}]}},"/api/session/{sessionID}/message":{"get":{"tags":["messages"],"operationId":"v2.session.messages","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]},"required":false},{"name":"cursor","in":"query","schema":{"type":"string","description":"Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."},"required":false}],"security":[],"responses":{"200":{"description":"SessionMessagesResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionMessagesResponse"}}}},"400":{"description":"InvalidCursorError | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCursorError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"SessionNotFoundError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SessionNotFoundError"},{"$ref":"#/components/schemas/SessionNotFoundError"}]}}}},"500":{"description":"UnknownError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnknownError1"}}}}},"description":"Retrieve projected messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.","summary":"Get session messages","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.session.messages({\n ...\n})"}]}},"/api/model":{"get":{"tags":["models"],"operationId":"v2.model.list","parameters":[{"name":"location","in":"query","schema":{"type":"object","properties":{"directory":{"type":"string"},"workspace":{"type":"string"}},"additionalProperties":false},"required":false,"style":"deepObject","explode":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"location":{"$ref":"#/components/schemas/LocationInfo"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ModelV2Info"}}},"required":["location","data"],"additionalProperties":false}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"503":{"description":"ServiceUnavailableError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}}}},"description":"Retrieve available models ordered by release date.","summary":"List models","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.model.list({\n ...\n})"}]}},"/api/provider":{"get":{"tags":["providers"],"operationId":"v2.provider.list","parameters":[{"name":"location","in":"query","schema":{"type":"object","properties":{"directory":{"type":"string"},"workspace":{"type":"string"}},"additionalProperties":false},"required":false,"style":"deepObject","explode":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"location":{"$ref":"#/components/schemas/LocationInfo"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ProviderV2Info"}}},"required":["location","data"],"additionalProperties":false}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"503":{"description":"ServiceUnavailableError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}}}},"description":"Retrieve active AI providers so clients can show provider availability and configuration.","summary":"List providers","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.provider.list({\n ...\n})"}]}},"/api/provider/{providerID}":{"get":{"tags":["providers"],"operationId":"v2.provider.get","parameters":[{"name":"providerID","in":"path","schema":{"type":"string"},"required":true},{"name":"location","in":"query","schema":{"type":"object","properties":{"directory":{"type":"string"},"workspace":{"type":"string"}},"additionalProperties":false},"required":false,"style":"deepObject","explode":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"location":{"$ref":"#/components/schemas/LocationInfo"},"data":{"$ref":"#/components/schemas/ProviderV2Info"}},"required":["location","data"],"additionalProperties":false}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"ProviderNotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderNotFoundError"}}}},"503":{"description":"ServiceUnavailableError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}}}},"description":"Retrieve a single AI provider so clients can inspect its availability and endpoint settings.","summary":"Get provider","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.provider.get({\n ...\n})"}]}},"/api/integration":{"get":{"tags":["integrations"],"operationId":"v2.integration.list","parameters":[{"name":"location","in":"query","schema":{"type":"object","properties":{"directory":{"type":"string"},"workspace":{"type":"string"}},"additionalProperties":false},"required":false,"style":"deepObject","explode":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"location":{"$ref":"#/components/schemas/LocationInfo"},"data":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationInfo"}}},"required":["location","data"],"additionalProperties":false}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"description":"Retrieve available integrations and their authentication methods.","summary":"List integrations","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.integration.list({\n ...\n})"}]}},"/api/integration/{integrationID}":{"get":{"tags":["integrations"],"operationId":"v2.integration.get","parameters":[{"name":"integrationID","in":"path","schema":{"type":"string"},"required":true},{"name":"location","in":"query","schema":{"type":"object","properties":{"directory":{"type":"string"},"workspace":{"type":"string"}},"additionalProperties":false},"required":false,"style":"deepObject","explode":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"location":{"$ref":"#/components/schemas/LocationInfo"},"data":{"$ref":"#/components/schemas/IntegrationInfo"}},"required":["location","data"],"additionalProperties":false}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"description":"Retrieve one integration and its authentication methods.","summary":"Get integration","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.integration.get({\n ...\n})"}]}},"/api/integration/{integrationID}/connect/key":{"post":{"tags":["integrations"],"operationId":"v2.integration.connect.key","parameters":[{"name":"integrationID","in":"path","schema":{"type":"string"},"required":true},{"name":"location","in":"query","schema":{"type":"object","properties":{"directory":{"type":"string"},"workspace":{"type":"string"}},"additionalProperties":false},"required":false,"style":"deepObject","explode":true}],"security":[],"responses":{"204":{"description":""},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidRequestError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"description":"Run a key authentication method and store the resulting credential.","summary":"Connect with key","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"}},"required":["key"],"additionalProperties":false}}},"required":true},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.integration.connect.key({\n ...\n})"}]}},"/api/integration/{integrationID}/connect/oauth":{"post":{"tags":["integrations"],"operationId":"v2.integration.connect.oauth","parameters":[{"name":"integrationID","in":"path","schema":{"type":"string"},"required":true},{"name":"location","in":"query","schema":{"type":"object","properties":{"directory":{"type":"string"},"workspace":{"type":"string"}},"additionalProperties":false},"required":false,"style":"deepObject","explode":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"location":{"$ref":"#/components/schemas/LocationInfo"},"data":{"$ref":"#/components/schemas/IntegrationAttempt"}},"required":["location","data"],"additionalProperties":false}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidRequestError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"description":"Start an OAuth attempt and return the authorization details.","summary":"Begin OAuth connection","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"methodID":{"type":"string"},"inputs":{"type":"object","additionalProperties":{"type":"string"}},"label":{"type":"string"}},"required":["methodID","inputs"],"additionalProperties":false}}},"required":true},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.integration.connect.oauth({\n ...\n})"}]}},"/api/integration/attempt/{attemptID}":{"get":{"tags":["integrations"],"operationId":"v2.integration.attempt.status","parameters":[{"name":"attemptID","in":"path","schema":{"type":"string"},"required":true},{"name":"location","in":"query","schema":{"type":"object","properties":{"directory":{"type":"string"},"workspace":{"type":"string"}},"additionalProperties":false},"required":false,"style":"deepObject","explode":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"location":{"$ref":"#/components/schemas/LocationInfo"},"data":{"$ref":"#/components/schemas/IntegrationAttemptStatus"}},"required":["location","data"],"additionalProperties":false}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"description":"Poll the current status of an OAuth attempt.","summary":"Get OAuth attempt status","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.integration.attempt.status({\n ...\n})"}]},"delete":{"tags":["integrations"],"operationId":"v2.integration.attempt.cancel","parameters":[{"name":"attemptID","in":"path","schema":{"type":"string"},"required":true},{"name":"location","in":"query","schema":{"type":"object","properties":{"directory":{"type":"string"},"workspace":{"type":"string"}},"additionalProperties":false},"required":false,"style":"deepObject","explode":true}],"security":[],"responses":{"204":{"description":""},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"description":"Cancel an OAuth attempt and release its resources.","summary":"Cancel OAuth connection","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.integration.attempt.cancel({\n ...\n})"}]}},"/api/integration/attempt/{attemptID}/complete":{"post":{"tags":["integrations"],"operationId":"v2.integration.attempt.complete","parameters":[{"name":"attemptID","in":"path","schema":{"type":"string"},"required":true},{"name":"location","in":"query","schema":{"type":"object","properties":{"directory":{"type":"string"},"workspace":{"type":"string"}},"additionalProperties":false},"required":false,"style":"deepObject","explode":true}],"security":[],"responses":{"204":{"description":""},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidRequestError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"description":"Complete a code-based OAuth attempt and store the resulting credential.","summary":"Complete OAuth connection","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"}},"additionalProperties":false}}},"required":true},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.integration.attempt.complete({\n ...\n})"}]}},"/api/credential/{credentialID}":{"patch":{"tags":["opencode HttpApi"],"operationId":"v2.credential.update","parameters":[{"name":"credentialID","in":"path","schema":{"type":"string"},"required":true},{"name":"location","in":"query","schema":{"type":"object","properties":{"directory":{"type":"string"},"workspace":{"type":"string"}},"additionalProperties":false},"required":false,"style":"deepObject","explode":true}],"security":[],"responses":{"204":{"description":""},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"description":"Update a stored credential label.","summary":"Update credential","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string"}},"required":["label"],"additionalProperties":false}}},"required":true},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.credential.update({\n ...\n})"}]},"delete":{"tags":["opencode HttpApi"],"operationId":"v2.credential.remove","parameters":[{"name":"credentialID","in":"path","schema":{"type":"string"},"required":true},{"name":"location","in":"query","schema":{"type":"object","properties":{"directory":{"type":"string"},"workspace":{"type":"string"}},"additionalProperties":false},"required":false,"style":"deepObject","explode":true}],"security":[],"responses":{"204":{"description":""},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"description":"Remove a stored integration credential.","summary":"Remove credential","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.credential.remove({\n ...\n})"}]}},"/api/permission/request":{"get":{"tags":["permissions"],"operationId":"v2.permission.request.list","parameters":[{"name":"location","in":"query","schema":{"type":"object","properties":{"directory":{"type":"string"},"workspace":{"type":"string"}},"additionalProperties":false},"required":false,"style":"deepObject","explode":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"location":{"$ref":"#/components/schemas/LocationInfo"},"data":{"type":"array","items":{"$ref":"#/components/schemas/PermissionV2Request"}}},"required":["location","data"],"additionalProperties":false}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"description":"Retrieve pending permission requests for a location.","summary":"List pending permission requests","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.permission.request.list({\n ...\n})"}]}},"/api/permission/saved":{"get":{"tags":["permissions"],"operationId":"v2.permission.saved.list","parameters":[{"name":"projectID","in":"query","schema":{"type":"string"},"required":false}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PermissionSavedInfo"}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"description":"Retrieve saved permissions, optionally filtered by project.","summary":"List saved permissions","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.permission.saved.list({\n ...\n})"}]}},"/api/permission/saved/{id}":{"delete":{"tags":["permissions"],"operationId":"v2.permission.saved.remove","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"204":{"description":""},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"description":"Remove a saved permission by ID.","summary":"Remove saved permission","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.permission.saved.remove({\n ...\n})"}]}},"/api/session/{sessionID}/permission":{"post":{"tags":["permissions"],"operationId":"v2.session.permission.create","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^per"},"effect":{"$ref":"#/components/schemas/PermissionV2Effect"}},"required":["id","effect"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"SessionNotFoundError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SessionNotFoundError"},{"$ref":"#/components/schemas/SessionNotFoundError"}]}}}}},"description":"Evaluate and, when approval is required, create a permission request for a session.","summary":"Create permission request","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^per"},"action":{"type":"string"},"resources":{"type":"array","items":{"type":"string"}},"save":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object"},"source":{"$ref":"#/components/schemas/PermissionV2Source"},"agent":{"type":"string"}},"required":["action","resources"],"additionalProperties":false}}},"required":true},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.session.permission.create({\n ...\n})"}]},"get":{"tags":["permissions"],"operationId":"v2.session.permission.list","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PermissionV2Request"}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"SessionNotFoundError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SessionNotFoundError"},{"$ref":"#/components/schemas/SessionNotFoundError"}]}}}}},"description":"Retrieve pending permission requests owned by a session.","summary":"List session permission requests","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.session.permission.list({\n ...\n})"}]}},"/api/session/{sessionID}/permission/{requestID}":{"get":{"tags":["permissions"],"operationId":"v2.session.permission.get","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"requestID","in":"path","schema":{"type":"string","pattern":"^per"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PermissionV2Request"}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"SessionNotFoundError | PermissionNotFoundError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PermissionNotFoundError"},{"$ref":"#/components/schemas/SessionNotFoundError"},{"$ref":"#/components/schemas/SessionNotFoundError"}]}}}}},"description":"Retrieve a pending permission request owned by a session.","summary":"Get permission request","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.session.permission.get({\n ...\n})"}]}},"/api/session/{sessionID}/permission/{requestID}/reply":{"post":{"tags":["permissions"],"operationId":"v2.session.permission.reply","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"requestID","in":"path","schema":{"type":"string","pattern":"^per"},"required":true}],"security":[],"responses":{"204":{"description":""},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"SessionNotFoundError | PermissionNotFoundError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PermissionNotFoundError"},{"$ref":"#/components/schemas/SessionNotFoundError"},{"$ref":"#/components/schemas/SessionNotFoundError"}]}}}}},"description":"Respond to a pending permission request owned by a session.","summary":"Reply to pending permission request","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reply":{"$ref":"#/components/schemas/PermissionV2Reply"},"message":{"type":"string"}},"required":["reply"],"additionalProperties":false}}},"required":true},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.session.permission.reply({\n ...\n})"}]}},"/api/fs/read/*":{"get":{"tags":["filesystem"],"operationId":"v2.fs.read","parameters":[{"name":"location","in":"query","schema":{"type":"object","properties":{"directory":{"type":"string"},"workspace":{"type":"string"}},"additionalProperties":false},"required":false,"style":"deepObject","explode":true},{"name":"path","in":"query","schema":{"type":"string"},"required":false}],"security":[],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"description":"Serve one file relative to the requested location.","summary":"Read file","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.fs.read({\n ...\n})"}]}},"/api/fs/list":{"get":{"tags":["filesystem"],"operationId":"v2.fs.list","parameters":[{"name":"location","in":"query","schema":{"type":"object","properties":{"directory":{"type":"string"},"workspace":{"type":"string"}},"additionalProperties":false},"required":false,"style":"deepObject","explode":true},{"name":"path","in":"query","schema":{"type":"string"},"required":false}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"location":{"$ref":"#/components/schemas/LocationInfo"},"data":{"type":"array","items":{"$ref":"#/components/schemas/FileSystemEntry"}}},"required":["location","data"],"additionalProperties":false}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"description":"List direct children of one directory relative to the requested location.","summary":"List directory","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.fs.list({\n ...\n})"}]}},"/api/fs/find":{"get":{"tags":["filesystem"],"operationId":"v2.fs.find","parameters":[{"name":"location","in":"query","schema":{"type":"object","properties":{"directory":{"type":"string"},"workspace":{"type":"string"}},"additionalProperties":false},"required":false,"style":"deepObject","explode":true},{"name":"query","in":"query","schema":{"type":"string"},"required":true},{"name":"type","in":"query","schema":{"type":"string","enum":["file","directory"]},"required":false},{"name":"limit","in":"query","schema":{"type":"string"},"required":false}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"location":{"$ref":"#/components/schemas/LocationInfo"},"data":{"type":"array","items":{"$ref":"#/components/schemas/FileSystemEntry"}}},"required":["location","data"],"additionalProperties":false}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"description":"Find recursively ranked filesystem entries relative to the requested location.","summary":"Find files","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.fs.find({\n ...\n})"}]}},"/api/command":{"get":{"tags":["commands"],"operationId":"v2.command.list","parameters":[{"name":"location","in":"query","schema":{"type":"object","properties":{"directory":{"type":"string"},"workspace":{"type":"string"}},"additionalProperties":false},"required":false,"style":"deepObject","explode":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"location":{"$ref":"#/components/schemas/LocationInfo"},"data":{"type":"array","items":{"$ref":"#/components/schemas/CommandV2Info"}}},"required":["location","data"],"additionalProperties":false}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"description":"Retrieve currently registered commands.","summary":"List commands","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.command.list({\n ...\n})"}]}},"/api/skill":{"get":{"tags":["skills"],"operationId":"v2.skill.list","parameters":[{"name":"location","in":"query","schema":{"type":"object","properties":{"directory":{"type":"string"},"workspace":{"type":"string"}},"additionalProperties":false},"required":false,"style":"deepObject","explode":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"location":{"$ref":"#/components/schemas/LocationInfo"},"data":{"type":"array","items":{"$ref":"#/components/schemas/SkillV2Info"}}},"required":["location","data"],"additionalProperties":false}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"description":"Retrieve currently registered skills.","summary":"List skills","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.skill.list({\n ...\n})"}]}},"/api/event":{"get":{"tags":["events"],"operationId":"v2.event.subscribe","parameters":[],"security":[],"responses":{"200":{"description":"Event stream","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/V2Event"}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"description":"Subscribe to native event payloads for the server.","summary":"Subscribe to events","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.event.subscribe({\n ...\n})"}]}},"/api/pty":{"get":{"tags":["pty"],"operationId":"v2.pty.list","parameters":[{"name":"location","in":"query","schema":{"type":"object","properties":{"directory":{"type":"string"},"workspace":{"type":"string"}},"additionalProperties":false},"required":false,"style":"deepObject","explode":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"location":{"$ref":"#/components/schemas/LocationInfo"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Pty"}}},"required":["location","data"],"additionalProperties":false}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"description":"List PTY sessions for a location, including exited sessions retained until removal.","summary":"List PTY sessions","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.pty.list({\n ...\n})"}]},"post":{"tags":["pty"],"operationId":"v2.pty.create","parameters":[{"name":"location","in":"query","schema":{"type":"object","properties":{"directory":{"type":"string"},"workspace":{"type":"string"}},"additionalProperties":false},"required":false,"style":"deepObject","explode":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"location":{"$ref":"#/components/schemas/LocationInfo"},"data":{"$ref":"#/components/schemas/Pty"}},"required":["location","data"],"additionalProperties":false}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"description":"Create a pseudo-terminal session for a location.","summary":"Create PTY session","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"command":{"type":"string"},"args":{"type":"array","items":{"type":"string"}},"cwd":{"type":"string"},"title":{"type":"string"},"env":{"type":"object","additionalProperties":{"type":"string"}}},"additionalProperties":false}}},"required":true},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.pty.create({\n ...\n})"}]}},"/api/pty/{ptyID}":{"get":{"tags":["pty"],"operationId":"v2.pty.get","parameters":[{"name":"ptyID","in":"path","schema":{"type":"string","pattern":"^pty.*"},"required":true},{"name":"location","in":"query","schema":{"type":"object","properties":{"directory":{"type":"string"},"workspace":{"type":"string"}},"additionalProperties":false},"required":false,"style":"deepObject","explode":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"location":{"$ref":"#/components/schemas/LocationInfo"},"data":{"$ref":"#/components/schemas/Pty"}},"required":["location","data"],"additionalProperties":false}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"PtyNotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PtyNotFoundError"}}}}},"description":"Get one PTY session, including its exit code once exited.","summary":"Get PTY session","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.pty.get({\n ...\n})"}]},"put":{"tags":["pty"],"operationId":"v2.pty.update","parameters":[{"name":"ptyID","in":"path","schema":{"type":"string","pattern":"^pty.*"},"required":true},{"name":"location","in":"query","schema":{"type":"object","properties":{"directory":{"type":"string"},"workspace":{"type":"string"}},"additionalProperties":false},"required":false,"style":"deepObject","explode":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"location":{"$ref":"#/components/schemas/LocationInfo"},"data":{"$ref":"#/components/schemas/Pty"}},"required":["location","data"],"additionalProperties":false}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"PtyNotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PtyNotFoundError"}}}}},"description":"Update the title or viewport size of one PTY session.","summary":"Update PTY session","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"size":{"type":"object","properties":{"rows":{"type":"integer","exclusiveMinimum":0},"cols":{"type":"integer","exclusiveMinimum":0}},"required":["rows","cols"],"additionalProperties":false}},"additionalProperties":false}}},"required":true},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.pty.update({\n ...\n})"}]},"delete":{"tags":["pty"],"operationId":"v2.pty.remove","parameters":[{"name":"ptyID","in":"path","schema":{"type":"string","pattern":"^pty.*"},"required":true},{"name":"location","in":"query","schema":{"type":"object","properties":{"directory":{"type":"string"},"workspace":{"type":"string"}},"additionalProperties":false},"required":false,"style":"deepObject","explode":true}],"security":[],"responses":{"204":{"description":""},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"PtyNotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PtyNotFoundError"}}}}},"description":"Terminate and remove one PTY session.","summary":"Remove PTY session","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.pty.remove({\n ...\n})"}]}},"/api/pty/{ptyID}/connect-token":{"post":{"tags":["pty"],"operationId":"v2.pty.connectToken","parameters":[{"name":"ptyID","in":"path","schema":{"type":"string","pattern":"^pty.*"},"required":true},{"name":"location","in":"query","schema":{"type":"object","properties":{"directory":{"type":"string"},"workspace":{"type":"string"}},"additionalProperties":false},"required":false,"style":"deepObject","explode":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"location":{"$ref":"#/components/schemas/LocationInfo"},"data":{"$ref":"#/components/schemas/PtyTicketConnectToken"}},"required":["location","data"],"additionalProperties":false}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"PtyNotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PtyNotFoundError"}}}}},"description":"Create a short-lived single-use ticket for opening a PTY WebSocket connection.","summary":"Create PTY WebSocket token","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.pty.connectToken({\n ...\n})"}]}},"/api/pty/{ptyID}/connect":{"get":{"tags":["pty"],"operationId":"v2.pty.connect","parameters":[{"name":"ptyID","in":"path","schema":{"type":"string","pattern":"^pty.*"},"required":true},{"in":"query","name":"location[directory]","schema":{"type":"string"}},{"in":"query","name":"location[workspace]","schema":{"type":"string"}},{"in":"query","name":"cursor","schema":{"type":"string"}},{"in":"query","name":"ticket","schema":{"type":"string"}}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"boolean"}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"PtyNotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PtyNotFoundError"}}}}},"description":"Establish a WebSocket connection streaming PTY output and accepting terminal input.","summary":"Connect to PTY session","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.pty.connect({\n ...\n})"}]}},"/api/question/request":{"get":{"tags":["session questions"],"operationId":"v2.question.request.list","parameters":[{"name":"location","in":"query","schema":{"type":"object","properties":{"directory":{"type":"string"},"workspace":{"type":"string"}},"additionalProperties":false},"required":false,"style":"deepObject","explode":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"location":{"$ref":"#/components/schemas/LocationInfo"},"data":{"type":"array","items":{"$ref":"#/components/schemas/QuestionV2Request"}}},"required":["location","data"],"additionalProperties":false}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"description":"Retrieve pending question requests for a location.","summary":"List pending question requests","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.question.request.list({\n ...\n})"}]}},"/api/session/{sessionID}/question":{"get":{"tags":["session questions"],"operationId":"v2.session.question.list","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/QuestionV2Request"}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"SessionNotFoundError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SessionNotFoundError"},{"$ref":"#/components/schemas/SessionNotFoundError"}]}}}}},"description":"Retrieve pending question requests owned by a session.","summary":"List session question requests","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.session.question.list({\n ...\n})"}]}},"/api/session/{sessionID}/question/{requestID}/reply":{"post":{"tags":["session questions"],"operationId":"v2.session.question.reply","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"requestID","in":"path","schema":{"type":"string","pattern":"^que"},"required":true}],"security":[],"responses":{"204":{"description":""},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"SessionNotFoundError | QuestionNotFoundError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/QuestionNotFoundError"},{"$ref":"#/components/schemas/SessionNotFoundError"},{"$ref":"#/components/schemas/SessionNotFoundError"}]}}}}},"description":"Answer a pending question request owned by a session.","summary":"Reply to pending question request","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionV2Reply"}}},"required":true},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.session.question.reply({\n ...\n})"}]}},"/api/session/{sessionID}/question/{requestID}/reject":{"post":{"tags":["session questions"],"operationId":"v2.session.question.reject","parameters":[{"name":"sessionID","in":"path","schema":{"type":"string","pattern":"^ses.*"},"required":true},{"name":"requestID","in":"path","schema":{"type":"string","pattern":"^que"},"required":true}],"security":[],"responses":{"204":{"description":""},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"404":{"description":"SessionNotFoundError | QuestionNotFoundError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/QuestionNotFoundError"},{"$ref":"#/components/schemas/SessionNotFoundError"},{"$ref":"#/components/schemas/SessionNotFoundError"}]}}}}},"description":"Reject a pending question request owned by a session.","summary":"Reject pending question request","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.session.question.reject({\n ...\n})"}]}},"/api/reference":{"get":{"tags":["reference"],"operationId":"v2.reference.list","parameters":[{"name":"location","in":"query","schema":{"type":"object","properties":{"directory":{"type":"string"},"workspace":{"type":"string"}},"additionalProperties":false},"required":false,"style":"deepObject","explode":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"location":{"$ref":"#/components/schemas/LocationInfo"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ReferenceInfo"}}},"required":["location","data"],"additionalProperties":false}}}},"400":{"description":"InvalidRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}},"description":"List references available in the requested location.","summary":"List references","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.reference.list({\n ...\n})"}]}},"/experimental/project/{projectID}/copy":{"post":{"tags":["projectCopy"],"operationId":"v2.projectCopy.create","parameters":[{"name":"projectID","in":"path","schema":{"type":"string"},"required":true},{"name":"location","in":"query","schema":{"type":"object","properties":{"directory":{"type":"string"},"workspace":{"type":"string"}},"additionalProperties":false},"required":false,"style":"deepObject","explode":true}],"responses":{"200":{"description":"ProjectCopy.Copy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectCopyCopy"}}}},"400":{"description":"ProjectCopyError | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ProjectCopyError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"strategy":{"type":"string"},"directory":{"type":"string"},"name":{"type":"string"}},"required":["strategy","directory"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.projectCopy.create({\n ...\n})"}]},"delete":{"tags":["projectCopy"],"operationId":"v2.projectCopy.remove","parameters":[{"name":"projectID","in":"path","schema":{"type":"string"},"required":true},{"name":"location","in":"query","schema":{"type":"object","properties":{"directory":{"type":"string"},"workspace":{"type":"string"}},"additionalProperties":false},"required":false,"style":"deepObject","explode":true}],"responses":{"204":{"description":""},"400":{"description":"ProjectCopyError | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ProjectCopyError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"directory":{"type":"string"},"force":{"type":"boolean"}},"required":["directory","force"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.projectCopy.remove({\n ...\n})"}]}},"/experimental/project/{projectID}/copy/refresh":{"post":{"tags":["projectCopy"],"operationId":"v2.projectCopy.refresh","parameters":[{"name":"projectID","in":"path","schema":{"type":"string"},"required":true},{"name":"location","in":"query","schema":{"type":"object","properties":{"directory":{"type":"string"},"workspace":{"type":"string"}},"additionalProperties":false},"required":false,"style":"deepObject","explode":true}],"responses":{"204":{"description":""},"400":{"description":"ProjectCopyError | InvalidRequestError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ProjectCopyError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}}},"x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.v2.projectCopy.refresh({\n ...\n})"}]}},"/pty/{ptyID}/connect":{"get":{"tags":["pty"],"operationId":"pty.connect","parameters":[{"name":"ptyID","in":"path","schema":{"type":"string","pattern":"^pty.*"},"required":true},{"in":"query","name":"directory","schema":{"type":"string"}},{"in":"query","name":"workspace","schema":{"type":"string"}},{"in":"query","name":"cursor","schema":{"type":"string"}},{"in":"query","name":"ticket","schema":{"type":"string"}}],"responses":{"200":{"description":"Connected session","content":{"application/json":{"schema":{"type":"boolean","description":"Connected session"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/effect_HttpApiError_Forbidden"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}}},"description":"Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.","summary":"Connect to PTY session","x-codeSamples":[{"lang":"js","source":"import { createKiloClient } from \"@kilocode/sdk\"\n\nconst client = createKiloClient()\nawait client.pty.connect({\n ...\n})"}]}}},"components":{"schemas":{"Event":{"anyOf":[{"$ref":"#/components/schemas/EventModels-devRefreshed1"},{"$ref":"#/components/schemas/EventIntegrationUpdated1"},{"$ref":"#/components/schemas/EventIntegrationConnectionUpdated1"},{"$ref":"#/components/schemas/EventCatalogUpdated1"},{"$ref":"#/components/schemas/EventSessionCreated1"},{"$ref":"#/components/schemas/EventSessionUpdated1"},{"$ref":"#/components/schemas/EventSessionDeleted1"},{"$ref":"#/components/schemas/EventMessageUpdated1"},{"$ref":"#/components/schemas/EventMessageRemoved1"},{"$ref":"#/components/schemas/EventMessagePartUpdated1"},{"$ref":"#/components/schemas/EventMessagePartRemoved1"},{"$ref":"#/components/schemas/EventSessionNextAgentSwitched1"},{"$ref":"#/components/schemas/EventSessionNextModelSwitched1"},{"$ref":"#/components/schemas/EventSessionNextMoved1"},{"$ref":"#/components/schemas/EventSessionNextPrompted1"},{"$ref":"#/components/schemas/EventSessionNextPromptAdmitted1"},{"$ref":"#/components/schemas/EventSessionNextContextUpdated1"},{"$ref":"#/components/schemas/EventSessionNextSynthetic1"},{"$ref":"#/components/schemas/EventSessionNextShellStarted1"},{"$ref":"#/components/schemas/EventSessionNextShellEnded1"},{"$ref":"#/components/schemas/EventSessionNextStepStarted1"},{"$ref":"#/components/schemas/EventSessionNextStepEnded1"},{"$ref":"#/components/schemas/EventSessionNextStepFailed1"},{"$ref":"#/components/schemas/EventSessionNextTextStarted1"},{"$ref":"#/components/schemas/EventSessionNextTextDelta1"},{"$ref":"#/components/schemas/EventSessionNextTextEnded1"},{"$ref":"#/components/schemas/EventSessionNextReasoningStarted1"},{"$ref":"#/components/schemas/EventSessionNextReasoningDelta1"},{"$ref":"#/components/schemas/EventSessionNextReasoningEnded1"},{"$ref":"#/components/schemas/EventSessionNextToolInputStarted1"},{"$ref":"#/components/schemas/EventSessionNextToolInputDelta1"},{"$ref":"#/components/schemas/EventSessionNextToolInputEnded1"},{"$ref":"#/components/schemas/EventSessionNextToolCalled1"},{"$ref":"#/components/schemas/EventSessionNextToolProgress1"},{"$ref":"#/components/schemas/EventSessionNextToolSuccess1"},{"$ref":"#/components/schemas/EventSessionNextToolFailed1"},{"$ref":"#/components/schemas/EventSessionNextRetried1"},{"$ref":"#/components/schemas/EventSessionNextCompactionStarted1"},{"$ref":"#/components/schemas/EventSessionNextCompactionDelta1"},{"$ref":"#/components/schemas/EventSessionNextCompactionEnded1"},{"$ref":"#/components/schemas/EventSessionNextRevertStaged1"},{"$ref":"#/components/schemas/EventSessionNextRevertCleared1"},{"$ref":"#/components/schemas/EventSessionNextRevertCommitted1"},{"$ref":"#/components/schemas/EventMessagePartDelta1"},{"$ref":"#/components/schemas/EventSessionDiff1"},{"$ref":"#/components/schemas/EventSessionError1"},{"$ref":"#/components/schemas/EventInstallationUpdated1"},{"$ref":"#/components/schemas/EventInstallationUpdate-available1"},{"$ref":"#/components/schemas/EventFileEdited1"},{"$ref":"#/components/schemas/EventReferenceUpdated1"},{"$ref":"#/components/schemas/EventPermissionV2Asked1"},{"$ref":"#/components/schemas/EventPermissionV2Replied1"},{"$ref":"#/components/schemas/EventPluginAdded1"},{"$ref":"#/components/schemas/EventProjectDirectoriesUpdated1"},{"$ref":"#/components/schemas/EventFileWatcherUpdated1"},{"$ref":"#/components/schemas/EventPtyCreated1"},{"$ref":"#/components/schemas/EventPtyUpdated1"},{"$ref":"#/components/schemas/EventPtyExited1"},{"$ref":"#/components/schemas/EventPtyDeleted1"},{"$ref":"#/components/schemas/EventQuestionV2Asked1"},{"$ref":"#/components/schemas/EventQuestionV2Replied1"},{"$ref":"#/components/schemas/EventQuestionV2Rejected1"},{"$ref":"#/components/schemas/EventTodoUpdated1"},{"$ref":"#/components/schemas/EventLspUpdated1"},{"$ref":"#/components/schemas/EventPermissionAsked1"},{"$ref":"#/components/schemas/EventPermissionReplied1"},{"$ref":"#/components/schemas/EventTuiPromptAppend1"},{"$ref":"#/components/schemas/EventTuiCommandExecute1"},{"$ref":"#/components/schemas/EventTuiToastShow1"},{"$ref":"#/components/schemas/EventTuiSessionSelect1"},{"$ref":"#/components/schemas/EventMcpToolsChanged1"},{"$ref":"#/components/schemas/EventMcpBrowserOpenFailed1"},{"$ref":"#/components/schemas/EventCommandExecuted1"},{"$ref":"#/components/schemas/EventProjectUpdated1"},{"$ref":"#/components/schemas/EventSessionStatus1"},{"$ref":"#/components/schemas/EventSessionIdle1"},{"$ref":"#/components/schemas/EventQuestionAsked1"},{"$ref":"#/components/schemas/EventQuestionReplied1"},{"$ref":"#/components/schemas/EventQuestionRejected1"},{"$ref":"#/components/schemas/EventSessionCompacted1"},{"$ref":"#/components/schemas/EventVcsBranchUpdated1"},{"$ref":"#/components/schemas/EventWorkspaceReady1"},{"$ref":"#/components/schemas/EventWorkspaceFailed1"},{"$ref":"#/components/schemas/EventWorkspaceStatus1"},{"$ref":"#/components/schemas/EventWorktreeReady1"},{"$ref":"#/components/schemas/EventWorktreeFailed1"},{"$ref":"#/components/schemas/EventServerConnected1"},{"$ref":"#/components/schemas/EventGlobalDisposed1"},{"$ref":"#/components/schemas/EventGlobalConfigUpdated1"},{"$ref":"#/components/schemas/EventServerInstanceDisposed"},{"$ref":"#/components/schemas/EventSessionTurnOpen"},{"$ref":"#/components/schemas/EventSessionTurnClose"},{"$ref":"#/components/schemas/EventSessionQueueChanged"},{"$ref":"#/components/schemas/EventSessionNetworkAsked"},{"$ref":"#/components/schemas/EventSessionNetworkReplied"},{"$ref":"#/components/schemas/EventSessionNetworkRejected"},{"$ref":"#/components/schemas/EventSessionNetworkRestored"},{"$ref":"#/components/schemas/EventBackground_processUpdated"},{"$ref":"#/components/schemas/EventBackground_processDeleted"},{"$ref":"#/components/schemas/EventInteractive_terminalUpdated"},{"$ref":"#/components/schemas/EventInteractive_terminalData"},{"$ref":"#/components/schemas/EventInteractive_terminalDeleted"},{"$ref":"#/components/schemas/EventSandboxStatusChanged"},{"$ref":"#/components/schemas/EventSuggestionShown"},{"$ref":"#/components/schemas/EventSuggestionAccepted"},{"$ref":"#/components/schemas/EventSuggestionDismissed"},{"$ref":"#/components/schemas/EventKilocodeAgent_managerStart"},{"$ref":"#/components/schemas/EventKilocodeAgent_managerRequested"},{"$ref":"#/components/schemas/EventKilocodeAgent_managerCancelled"},{"$ref":"#/components/schemas/EventKilocodeNotebookRequested"},{"$ref":"#/components/schemas/EventKilocodeNotebookCancelled"},{"$ref":"#/components/schemas/EventKilo-sessionsRemote-status-changed"},{"$ref":"#/components/schemas/EventLspClientDiagnostics"},{"$ref":"#/components/schemas/EventMemoryStatus1"},{"$ref":"#/components/schemas/EventMemoryUpdated1"},{"$ref":"#/components/schemas/EventMemoryError1"},{"$ref":"#/components/schemas/EventIndexingStatus"},{"$ref":"#/components/schemas/EventIndexingWarning"},{"$ref":"#/components/schemas/EventModels-devRefreshed"},{"$ref":"#/components/schemas/EventIntegrationUpdated"},{"$ref":"#/components/schemas/EventIntegrationConnectionUpdated"},{"$ref":"#/components/schemas/EventCatalogUpdated"},{"$ref":"#/components/schemas/EventSessionCreated"},{"$ref":"#/components/schemas/EventSessionUpdated"},{"$ref":"#/components/schemas/EventSessionDeleted"},{"$ref":"#/components/schemas/EventMessageUpdated"},{"$ref":"#/components/schemas/EventMessageRemoved"},{"$ref":"#/components/schemas/EventMessagePartUpdated"},{"$ref":"#/components/schemas/EventMessagePartRemoved"},{"$ref":"#/components/schemas/EventSessionNextAgentSwitched"},{"$ref":"#/components/schemas/EventSessionNextModelSwitched"},{"$ref":"#/components/schemas/EventSessionNextMoved"},{"$ref":"#/components/schemas/EventSessionNextPrompted"},{"$ref":"#/components/schemas/EventSessionNextPromptAdmitted"},{"$ref":"#/components/schemas/EventSessionNextContextUpdated"},{"$ref":"#/components/schemas/EventSessionNextSynthetic"},{"$ref":"#/components/schemas/EventSessionNextShellStarted"},{"$ref":"#/components/schemas/EventSessionNextShellEnded"},{"$ref":"#/components/schemas/EventSessionNextStepStarted"},{"$ref":"#/components/schemas/EventSessionNextStepEnded"},{"$ref":"#/components/schemas/EventSessionNextStepFailed"},{"$ref":"#/components/schemas/EventSessionNextTextStarted"},{"$ref":"#/components/schemas/EventSessionNextTextDelta"},{"$ref":"#/components/schemas/EventSessionNextTextEnded"},{"$ref":"#/components/schemas/EventSessionNextReasoningStarted"},{"$ref":"#/components/schemas/EventSessionNextReasoningDelta"},{"$ref":"#/components/schemas/EventSessionNextReasoningEnded"},{"$ref":"#/components/schemas/EventSessionNextToolInputStarted"},{"$ref":"#/components/schemas/EventSessionNextToolInputDelta"},{"$ref":"#/components/schemas/EventSessionNextToolInputEnded"},{"$ref":"#/components/schemas/EventSessionNextToolCalled"},{"$ref":"#/components/schemas/EventSessionNextToolProgress"},{"$ref":"#/components/schemas/EventSessionNextToolSuccess"},{"$ref":"#/components/schemas/EventSessionNextToolFailed"},{"$ref":"#/components/schemas/EventSessionNextRetried"},{"$ref":"#/components/schemas/EventSessionNextCompactionStarted"},{"$ref":"#/components/schemas/EventSessionNextCompactionDelta"},{"$ref":"#/components/schemas/EventSessionNextCompactionEnded"},{"$ref":"#/components/schemas/EventSessionNextRevertStaged"},{"$ref":"#/components/schemas/EventSessionNextRevertCleared"},{"$ref":"#/components/schemas/EventSessionNextRevertCommitted"},{"$ref":"#/components/schemas/EventMessagePartDelta"},{"$ref":"#/components/schemas/EventSessionDiff"},{"$ref":"#/components/schemas/EventSessionError"},{"$ref":"#/components/schemas/EventInstallationUpdated"},{"$ref":"#/components/schemas/EventInstallationUpdate-available"},{"$ref":"#/components/schemas/EventFileEdited"},{"$ref":"#/components/schemas/EventReferenceUpdated"},{"$ref":"#/components/schemas/EventPermissionV2Asked"},{"$ref":"#/components/schemas/EventPermissionV2Replied"},{"$ref":"#/components/schemas/EventPluginAdded"},{"$ref":"#/components/schemas/EventProjectDirectoriesUpdated"},{"$ref":"#/components/schemas/EventFileWatcherUpdated"},{"$ref":"#/components/schemas/EventPtyCreated"},{"$ref":"#/components/schemas/EventPtyUpdated"},{"$ref":"#/components/schemas/EventPtyExited"},{"$ref":"#/components/schemas/EventPtyDeleted"},{"$ref":"#/components/schemas/EventQuestionV2Asked"},{"$ref":"#/components/schemas/EventQuestionV2Replied"},{"$ref":"#/components/schemas/EventQuestionV2Rejected"},{"$ref":"#/components/schemas/EventTodoUpdated"},{"$ref":"#/components/schemas/EventLspUpdated"},{"$ref":"#/components/schemas/EventPermissionAsked"},{"$ref":"#/components/schemas/EventPermissionReplied"},{"$ref":"#/components/schemas/Event.tui.prompt.append"},{"$ref":"#/components/schemas/Event.tui.command.execute"},{"$ref":"#/components/schemas/EventTuiToastShow2"},{"$ref":"#/components/schemas/Event.tui.session.select"},{"$ref":"#/components/schemas/EventMcpToolsChanged"},{"$ref":"#/components/schemas/EventMcpBrowserOpenFailed"},{"$ref":"#/components/schemas/EventCommandExecuted"},{"$ref":"#/components/schemas/EventProjectUpdated"},{"$ref":"#/components/schemas/EventSessionStatus"},{"$ref":"#/components/schemas/EventSessionIdle"},{"$ref":"#/components/schemas/EventQuestionAsked"},{"$ref":"#/components/schemas/EventQuestionReplied"},{"$ref":"#/components/schemas/EventQuestionRejected"},{"$ref":"#/components/schemas/EventSessionCompacted"},{"$ref":"#/components/schemas/EventVcsBranchUpdated"},{"$ref":"#/components/schemas/EventWorkspaceReady"},{"$ref":"#/components/schemas/EventWorkspaceFailed"},{"$ref":"#/components/schemas/EventWorkspaceStatus"},{"$ref":"#/components/schemas/EventWorktreeReady"},{"$ref":"#/components/schemas/EventWorktreeFailed"},{"$ref":"#/components/schemas/EventServerConnected"},{"$ref":"#/components/schemas/EventGlobalDisposed"},{"$ref":"#/components/schemas/EventGlobalConfigUpdated"},{"$ref":"#/components/schemas/EventServerInstanceDisposed"}]},"QuestionReplied":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"requestID":{"type":"string","pattern":"^que"},"answers":{"type":"array","items":{"$ref":"#/components/schemas/QuestionAnswer"}}},"required":["sessionID","requestID","answers"],"additionalProperties":false},"QuestionRejected":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"requestID":{"type":"string","pattern":"^que"}},"required":["sessionID","requestID"],"additionalProperties":false},"OAuth":{"type":"object","properties":{"type":{"type":"string","enum":["oauth"]},"refresh":{"type":"string"},"access":{"type":"string"},"expires":{"type":"integer","minimum":0},"accountId":{"type":"string"},"enterpriseUrl":{"type":"string"}},"required":["type","refresh","access","expires"],"additionalProperties":false},"ApiAuth":{"type":"object","properties":{"type":{"type":"string","enum":["api"]},"key":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"}}},"required":["type","key"],"additionalProperties":false},"WellKnownAuth":{"type":"object","properties":{"type":{"type":"string","enum":["wellknown"]},"key":{"type":"string"},"token":{"type":"string"}},"required":["type","key","token"],"additionalProperties":false},"Auth":{"anyOf":[{"$ref":"#/components/schemas/OAuth"},{"$ref":"#/components/schemas/ApiAuth"},{"$ref":"#/components/schemas/WellKnownAuth"}]},"effect_HttpApiError_BadRequest":{"type":"object","properties":{"_tag":{"type":"string","enum":["BadRequest"]}},"required":["_tag"],"additionalProperties":false},"InvalidRequestError":{"type":"object","properties":{"_tag":{"type":"string","enum":["InvalidRequestError"]},"message":{"type":"string"},"kind":{"type":"string"},"field":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"MoveSessionError":{"type":"object","properties":{"name":{"type":"string","enum":["MoveSessionError"]},"data":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"required":["name","data"],"additionalProperties":false},"SessionNetworkWait":{"type":"object","properties":{"id":{"type":"string","pattern":"^que"},"sessionID":{"type":"string","pattern":"^ses"},"message":{"type":"string"},"restored":{"type":"boolean"},"time":{"type":"object","properties":{"created":{"type":"number"},"restored":{"type":"number"}},"required":["created"],"additionalProperties":false}},"required":["id","sessionID","message","restored","time"],"additionalProperties":false},"BackgroundProcessInfo":{"type":"object","properties":{"id":{"type":"string"},"sessionID":{"type":"string","pattern":"^ses"},"pid":{"type":"integer","exclusiveMinimum":0},"command":{"type":"string"},"cwd":{"type":"string"},"description":{"type":"string"},"ports":{"type":"array","items":{"type":"integer","exclusiveMinimum":0}},"status":{"type":"string","enum":["starting","running","ready","exited","failed","stopping","stopped"]},"lifetime":{"type":"string","enum":["session","parent","persistent"]},"ready":{"type":"boolean"},"exitCode":{"type":"integer","minimum":0},"signal":{"type":"string"},"output":{"type":"string"},"time":{"type":"object","properties":{"started":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0},"ended":{"type":"integer","minimum":0}},"required":["started","updated"],"additionalProperties":false}},"required":["id","sessionID","command","cwd","ports","status","lifetime","ready","output","time"],"additionalProperties":false},"InteractiveTerminalInfo":{"type":"object","properties":{"id":{"type":"string"},"sessionID":{"type":"string","pattern":"^ses"},"pid":{"type":"integer","exclusiveMinimum":0},"command":{"type":"string"},"cwd":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["running","closed"]},"cols":{"type":"integer","exclusiveMinimum":0},"rows":{"type":"integer","exclusiveMinimum":0},"exitCode":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"signal":{"type":"string"},"closedBy":{"type":"string","enum":["exit","user","abort"]},"time":{"type":"object","properties":{"started":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0},"ended":{"type":"integer","minimum":0}},"required":["started","updated"],"additionalProperties":false}},"required":["id","sessionID","pid","command","cwd","status","cols","rows","time"],"additionalProperties":false},"SuggestionRequest":{"type":"object","properties":{"id":{"type":"string","pattern":"^sug"},"sessionID":{"type":"string","pattern":"^ses"},"text":{"type":"string"},"actions":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","description":"Button or option label (1-5 words)"},"description":{"type":"string"},"prompt":{"type":"string","description":"Synthetic user prompt to inject when this action is accepted"}},"required":["label","prompt"],"additionalProperties":false},"minItems":1,"maxItems":2},"blocking":{"type":"boolean"},"tool":{"type":"object","properties":{"messageID":{"type":"string"},"callID":{"type":"string"}},"required":["messageID","callID"],"additionalProperties":false}},"required":["id","sessionID","text","actions"],"additionalProperties":false},"AgentManagerRequestID":{"type":"string"},"AgentManagerFilterState":{"type":"string","enum":["idle","busy","retry","offline","waiting"]},"AgentManagerOverviewFilter":{"type":"object","properties":{"sectionIDs":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":100},"states":{"type":"array","items":{"$ref":"#/components/schemas/AgentManagerFilterState"},"maxItems":5}},"additionalProperties":false},"AgentManagerOverviewRequest":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/AgentManagerRequestID"},"sessionID":{"type":"string","pattern":"^ses"},"operation":{"type":"string","enum":["overview"]},"filter":{"$ref":"#/components/schemas/AgentManagerOverviewFilter"}},"required":["id","sessionID","operation"],"additionalProperties":false},"AgentManagerPromptRequest":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/AgentManagerRequestID"},"sessionID":{"type":"string","pattern":"^ses"},"operation":{"type":"string","enum":["prompt"]},"targetSessionID":{"type":"string","pattern":"^ses"},"prompt":{"type":"string","minLength":1,"maxLength":100000}},"required":["id","sessionID","operation","targetSessionID","prompt"],"additionalProperties":false},"AgentManagerStopRequest":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/AgentManagerRequestID"},"sessionID":{"type":"string","pattern":"^ses"},"operation":{"type":"string","enum":["stop"]},"targetSessionID":{"type":"string","pattern":"^ses"}},"required":["id","sessionID","operation","targetSessionID"],"additionalProperties":false},"AgentManagerRequest":{"anyOf":[{"$ref":"#/components/schemas/AgentManagerOverviewRequest"},{"$ref":"#/components/schemas/AgentManagerPromptRequest"},{"$ref":"#/components/schemas/AgentManagerStopRequest"}]},"NotebookRequestID":{"type":"string"},"NotebookReadRequest":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/NotebookRequestID"},"sessionID":{"type":"string","pattern":"^ses"},"path":{"type":"string","minLength":1,"maxLength":4096},"operation":{"type":"string","enum":["read"]},"includeOutputs":{"type":"boolean"}},"required":["id","sessionID","path","operation","includeOutputs"],"additionalProperties":false},"NotebookEditRequest":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/NotebookRequestID"},"sessionID":{"type":"string","pattern":"^ses"},"path":{"type":"string","minLength":1,"maxLength":4096},"operation":{"type":"string","enum":["edit"]},"expectedRevision":{"type":"string","minLength":1,"maxLength":200,"description":"Opaque notebook content revision; pass it back unchanged and do not parse or increment it"},"index":{"type":"integer","minimum":0,"description":"Zero-based cell index"},"edit":{"anyOf":[{"type":"object","properties":{"action":{"type":"string","enum":["insert"]},"kind":{"type":"string","enum":["code","markdown"]},"language":{"type":"string","maxLength":200},"source":{"type":"string","maxLength":200000}},"required":["action","kind","source"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","enum":["replace"]},"kind":{"type":"string","enum":["code","markdown"]},"language":{"type":"string","maxLength":200},"source":{"type":"string","maxLength":200000}},"required":["action","kind","source"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","enum":["delete"]}},"required":["action"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","enum":["create"]}},"required":["action"],"additionalProperties":false}]}},"required":["id","sessionID","path","operation","index","edit"],"additionalProperties":false},"NotebookExecuteRequest":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/NotebookRequestID"},"sessionID":{"type":"string","pattern":"^ses"},"path":{"type":"string","minLength":1,"maxLength":4096},"operation":{"type":"string","enum":["execute"]},"expectedRevision":{"type":"string","minLength":1,"maxLength":200,"description":"Opaque notebook content revision; pass it back unchanged and do not parse or increment it"},"index":{"type":"integer","minimum":0,"description":"Zero-based cell index"}},"required":["id","sessionID","path","operation","expectedRevision","index"],"additionalProperties":false},"NotebookRequest":{"anyOf":[{"$ref":"#/components/schemas/NotebookReadRequest"},{"$ref":"#/components/schemas/NotebookEditRequest"},{"$ref":"#/components/schemas/NotebookExecuteRequest"}]},"IndexingStatusState":{"type":"string","enum":["Disabled","In Progress","Complete","Error","Standby"]},"IndexingStatus":{"type":"object","properties":{"state":{"$ref":"#/components/schemas/IndexingStatusState"},"message":{"type":"string"},"processedFiles":{"type":"integer","minimum":0},"totalFiles":{"type":"integer","minimum":0},"percent":{"type":"integer","minimum":0,"maximum":100}},"required":["state","message","processedFiles","totalFiles","percent"],"additionalProperties":false},"IndexingWarning":{"type":"object","properties":{"code":{"type":"string","enum":["qdrant.version-incompatible","qdrant.version-unavailable"]},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"SnapshotFileDiff":{"type":"object","properties":{"file":{"type":"string"},"patch":{"type":"string"},"additions":{"type":"number"},"deletions":{"type":"number"},"status":{"type":"string","enum":["added","deleted","modified"]}},"required":["additions","deletions"],"additionalProperties":false},"PermissionAction":{"type":"string","enum":["allow","deny","ask"]},"PermissionRule":{"type":"object","properties":{"permission":{"type":"string"},"pattern":{"type":"string"},"action":{"$ref":"#/components/schemas/PermissionAction"}},"required":["permission","pattern","action"],"additionalProperties":false},"PermissionRuleset":{"type":"array","items":{"$ref":"#/components/schemas/PermissionRule"}},"Session":{"type":"object","properties":{"id":{"type":"string","pattern":"^ses"},"slug":{"type":"string"},"projectID":{"type":"string"},"workspaceID":{"type":"string","pattern":"^wrk"},"directory":{"type":"string"},"path":{"type":"string"},"parentID":{"type":"string","pattern":"^ses"},"summary":{"type":"object","properties":{"additions":{"type":"number"},"deletions":{"type":"number"},"files":{"type":"number"},"diffs":{"type":"array","items":{"$ref":"#/components/schemas/SnapshotFileDiff"}}},"required":["additions","deletions","files"],"additionalProperties":false},"cost":{"type":"number"},"tokens":{"type":"object","properties":{"input":{"type":"number"},"output":{"type":"number"},"reasoning":{"type":"number"},"cache":{"type":"object","properties":{"read":{"type":"number"},"write":{"type":"number"}},"required":["read","write"],"additionalProperties":false}},"required":["input","output","reasoning","cache"],"additionalProperties":false},"share":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false},"title":{"type":"string"},"agent":{"type":"string"},"model":{"type":"object","properties":{"id":{"type":"string"},"providerID":{"type":"string"},"variant":{"type":"string"}},"required":["id","providerID"],"additionalProperties":false},"version":{"type":"string"},"metadata":{"type":"object"},"time":{"type":"object","properties":{"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0},"compacting":{"type":"integer","minimum":0},"archived":{"type":"number"}},"required":["created","updated"],"additionalProperties":false},"permission":{"$ref":"#/components/schemas/PermissionRuleset"},"revert":{"type":"object","properties":{"messageID":{"type":"string","pattern":"^msg"},"partID":{"type":"string","pattern":"^prt"},"snapshot":{"type":"string"},"diff":{"type":"string"}},"required":["messageID"],"additionalProperties":false}},"required":["id","slug","projectID","directory","title","version","time"],"additionalProperties":false},"OutputFormatText":{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},"JSONSchema":{"type":"object"},"OutputFormatJsonSchema":{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"]},"schema":{"$ref":"#/components/schemas/JSONSchema"},"retryCount":{"type":"integer","minimum":0}},"required":["type","schema"],"additionalProperties":false},"OutputFormat":{"anyOf":[{"$ref":"#/components/schemas/OutputFormatText"},{"$ref":"#/components/schemas/OutputFormatJsonSchema"}]},"UserMessage":{"type":"object","properties":{"id":{"type":"string","pattern":"^msg"},"sessionID":{"type":"string","pattern":"^ses"},"role":{"type":"string","enum":["user"]},"time":{"type":"object","properties":{"created":{"type":"number","minimum":0}},"required":["created"],"additionalProperties":false},"format":{"$ref":"#/components/schemas/OutputFormat"},"summary":{"type":"object","properties":{"title":{"type":"string"},"body":{"type":"string"},"diffs":{"type":"array","items":{"$ref":"#/components/schemas/SnapshotFileDiff"}}},"required":["diffs"],"additionalProperties":false},"agent":{"type":"string"},"model":{"type":"object","properties":{"providerID":{"type":"string"},"modelID":{"type":"string"},"variant":{"type":"string"}},"required":["providerID","modelID"],"additionalProperties":false},"system":{"type":"string"},"tools":{"type":"object","additionalProperties":{"type":"boolean"}},"editorContext":{"type":"object","properties":{"directory":{"type":"string"},"worktree":{"type":"string"},"visibleFiles":{"type":"array","items":{"type":"string"}},"openTabs":{"type":"array","items":{"type":"string"}},"activeFile":{"type":"string"},"shell":{"type":"string"}},"additionalProperties":false}},"required":["id","sessionID","role","time","agent","model"],"additionalProperties":false},"ProviderAuthError":{"type":"object","properties":{"name":{"type":"string","enum":["ProviderAuthError"]},"data":{"type":"object","properties":{"providerID":{"type":"string"},"message":{"type":"string"}},"required":["providerID","message"],"additionalProperties":false}},"required":["name","data"],"additionalProperties":false},"UnknownError":{"type":"object","properties":{"name":{"type":"string","enum":["UnknownError"]},"data":{"type":"object","properties":{"message":{"type":"string"},"ref":{"type":"string"}},"required":["message"],"additionalProperties":false}},"required":["name","data"],"additionalProperties":false},"MessageOutputLengthError":{"type":"object","properties":{"name":{"type":"string","enum":["MessageOutputLengthError"]},"data":{"type":"object","properties":{}}},"required":["name","data"],"additionalProperties":false},"MessageAbortedError":{"type":"object","properties":{"name":{"type":"string","enum":["MessageAbortedError"]},"data":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"required":["name","data"],"additionalProperties":false},"StructuredOutputError":{"type":"object","properties":{"name":{"type":"string","enum":["StructuredOutputError"]},"data":{"type":"object","properties":{"message":{"type":"string"},"retries":{"type":"integer","minimum":0}},"required":["message","retries"],"additionalProperties":false}},"required":["name","data"],"additionalProperties":false},"ContextOverflowError":{"type":"object","properties":{"name":{"type":"string","enum":["ContextOverflowError"]},"data":{"type":"object","properties":{"message":{"type":"string"},"responseBody":{"type":"string"}},"required":["message"],"additionalProperties":false}},"required":["name","data"],"additionalProperties":false},"ContentFilterError":{"type":"object","properties":{"name":{"type":"string","enum":["ContentFilterError"]},"data":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"required":["name","data"],"additionalProperties":false},"APIError":{"type":"object","properties":{"name":{"type":"string","enum":["APIError"]},"data":{"type":"object","properties":{"message":{"type":"string"},"statusCode":{"type":"integer","minimum":0},"isRetryable":{"type":"boolean"},"responseHeaders":{"type":"object","additionalProperties":{"type":"string"}},"responseBody":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"}}},"required":["message","isRetryable"],"additionalProperties":false}},"required":["name","data"],"additionalProperties":false},"AssistantMessage":{"type":"object","properties":{"id":{"type":"string","pattern":"^msg"},"sessionID":{"type":"string","pattern":"^ses"},"role":{"type":"string","enum":["assistant"]},"time":{"type":"object","properties":{"created":{"type":"integer","minimum":0},"completed":{"type":"integer","minimum":0}},"required":["created"],"additionalProperties":false},"error":{"anyOf":[{"$ref":"#/components/schemas/ProviderAuthError"},{"$ref":"#/components/schemas/UnknownError"},{"$ref":"#/components/schemas/MessageOutputLengthError"},{"$ref":"#/components/schemas/MessageAbortedError"},{"$ref":"#/components/schemas/StructuredOutputError"},{"$ref":"#/components/schemas/ContextOverflowError"},{"$ref":"#/components/schemas/ContentFilterError"},{"$ref":"#/components/schemas/APIError"}]},"parentID":{"type":"string","pattern":"^msg"},"modelID":{"type":"string"},"providerID":{"type":"string"},"mode":{"type":"string"},"agent":{"type":"string"},"path":{"type":"object","properties":{"cwd":{"type":"string"},"root":{"type":"string"}},"required":["cwd","root"],"additionalProperties":false},"summary":{"type":"boolean"},"cost":{"type":"number"},"tokens":{"type":"object","properties":{"total":{"type":"number"},"input":{"type":"number"},"output":{"type":"number"},"reasoning":{"type":"number"},"cache":{"type":"object","properties":{"read":{"type":"number"},"write":{"type":"number"}},"required":["read","write"],"additionalProperties":false}},"required":["input","output","reasoning","cache"],"additionalProperties":false},"structured":{},"variant":{"type":"string"},"finish":{"type":"string"}},"required":["id","sessionID","role","time","parentID","modelID","providerID","mode","agent","path","cost","tokens"],"additionalProperties":false},"Message":{"anyOf":[{"$ref":"#/components/schemas/UserMessage"},{"$ref":"#/components/schemas/AssistantMessage"}]},"TextPart":{"type":"object","properties":{"id":{"type":"string","pattern":"^prt"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg"},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"synthetic":{"type":"boolean"},"ignored":{"type":"boolean"},"time":{"type":"object","properties":{"start":{"type":"integer","minimum":0},"end":{"type":"integer","minimum":0}},"required":["start"],"additionalProperties":false},"metadata":{"type":"object"}},"required":["id","sessionID","messageID","type","text"],"additionalProperties":false},"SubtaskPart":{"type":"object","properties":{"id":{"type":"string","pattern":"^prt"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg"},"type":{"type":"string","enum":["subtask"]},"prompt":{"type":"string"},"description":{"type":"string"},"agent":{"type":"string"},"model":{"type":"object","properties":{"providerID":{"type":"string"},"modelID":{"type":"string"}},"required":["providerID","modelID"],"additionalProperties":false},"command":{"type":"string"}},"required":["id","sessionID","messageID","type","prompt","description","agent"],"additionalProperties":false},"ReasoningPart":{"type":"object","properties":{"id":{"type":"string","pattern":"^prt"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg"},"type":{"type":"string","enum":["reasoning"]},"text":{"type":"string"},"metadata":{"type":"object"},"time":{"type":"object","properties":{"start":{"type":"integer","minimum":0},"end":{"type":"integer","minimum":0}},"required":["start"],"additionalProperties":false}},"required":["id","sessionID","messageID","type","text","time"],"additionalProperties":false},"FilePartSourceText":{"type":"object","properties":{"value":{"type":"string"},"start":{"type":"number"},"end":{"type":"number"}},"required":["value","start","end"],"additionalProperties":false},"FileSource":{"type":"object","properties":{"text":{"$ref":"#/components/schemas/FilePartSourceText"},"type":{"type":"string","enum":["file"]},"path":{"type":"string"}},"required":["text","type","path"],"additionalProperties":false},"Range":{"type":"object","properties":{"start":{"type":"object","properties":{"line":{"type":"integer","minimum":0},"character":{"type":"integer","minimum":0}},"required":["line","character"],"additionalProperties":false},"end":{"type":"object","properties":{"line":{"type":"integer","minimum":0},"character":{"type":"integer","minimum":0}},"required":["line","character"],"additionalProperties":false}},"required":["start","end"],"additionalProperties":false},"SymbolSource":{"type":"object","properties":{"text":{"$ref":"#/components/schemas/FilePartSourceText"},"type":{"type":"string","enum":["symbol"]},"path":{"type":"string"},"range":{"$ref":"#/components/schemas/Range"},"name":{"type":"string"},"kind":{"type":"integer","minimum":0}},"required":["text","type","path","range","name","kind"],"additionalProperties":false},"ResourceSource":{"type":"object","properties":{"text":{"$ref":"#/components/schemas/FilePartSourceText"},"type":{"type":"string","enum":["resource"]},"clientName":{"type":"string"},"uri":{"type":"string"}},"required":["text","type","clientName","uri"],"additionalProperties":false},"FilePartSource":{"anyOf":[{"$ref":"#/components/schemas/FileSource"},{"$ref":"#/components/schemas/SymbolSource"},{"$ref":"#/components/schemas/ResourceSource"}]},"FilePart":{"type":"object","properties":{"id":{"type":"string","pattern":"^prt"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg"},"type":{"type":"string","enum":["file"]},"mime":{"type":"string"},"filename":{"type":"string"},"url":{"type":"string"},"source":{"$ref":"#/components/schemas/FilePartSource"}},"required":["id","sessionID","messageID","type","mime","url"],"additionalProperties":false},"ToolStatePending":{"type":"object","properties":{"status":{"type":"string","enum":["pending"]},"input":{"type":"object"},"raw":{"type":"string"}},"required":["status","input","raw"],"additionalProperties":false},"ToolStateRunning":{"type":"object","properties":{"status":{"type":"string","enum":["running"]},"input":{"type":"object"},"title":{"type":"string"},"metadata":{"type":"object"},"time":{"type":"object","properties":{"start":{"type":"integer","minimum":0}},"required":["start"],"additionalProperties":false}},"required":["status","input","time"],"additionalProperties":false},"ToolStateCompleted":{"type":"object","properties":{"status":{"type":"string","enum":["completed"]},"input":{"type":"object"},"output":{"type":"string"},"title":{"type":"string"},"metadata":{"type":"object"},"time":{"type":"object","properties":{"start":{"type":"integer","minimum":0},"end":{"type":"integer","minimum":0},"compacted":{"type":"integer","minimum":0}},"required":["start","end"],"additionalProperties":false},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/FilePart"}}},"required":["status","input","output","title","metadata","time"],"additionalProperties":false},"ToolStateError":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"input":{"type":"object"},"error":{"type":"string"},"metadata":{"type":"object"},"time":{"type":"object","properties":{"start":{"type":"integer","minimum":0},"end":{"type":"integer","minimum":0}},"required":["start","end"],"additionalProperties":false}},"required":["status","input","error","time"],"additionalProperties":false},"ToolState":{"anyOf":[{"$ref":"#/components/schemas/ToolStatePending"},{"$ref":"#/components/schemas/ToolStateRunning"},{"$ref":"#/components/schemas/ToolStateCompleted"},{"$ref":"#/components/schemas/ToolStateError"}]},"ToolPart":{"type":"object","properties":{"id":{"type":"string","pattern":"^prt"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg"},"type":{"type":"string","enum":["tool"]},"callID":{"type":"string"},"tool":{"type":"string"},"state":{"$ref":"#/components/schemas/ToolState"},"metadata":{"type":"object"}},"required":["id","sessionID","messageID","type","callID","tool","state"],"additionalProperties":false},"StepStartPart":{"type":"object","properties":{"id":{"type":"string","pattern":"^prt"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg"},"type":{"type":"string","enum":["step-start"]},"snapshot":{"type":"string"}},"required":["id","sessionID","messageID","type"],"additionalProperties":false},"StepFinishPart":{"type":"object","properties":{"id":{"type":"string","pattern":"^prt"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg"},"type":{"type":"string","enum":["step-finish"]},"reason":{"type":"string"},"snapshot":{"type":"string"},"model":{"type":"object","properties":{"providerID":{"type":"string"},"modelID":{"type":"string"}},"required":["providerID","modelID"],"additionalProperties":false},"generationID":{"type":"string"},"vercelID":{"type":"string"},"metrics":{"type":"object","properties":{"prompt":{"type":"number"},"generation":{"type":"number"},"source":{"type":"string","enum":["provider","computed"]}},"required":["source"],"additionalProperties":false},"time":{"type":"object","properties":{"start":{"type":"integer","minimum":0},"end":{"type":"integer","minimum":0},"elapsed":{"type":"number"}},"required":["start","end","elapsed"],"additionalProperties":false},"cost":{"type":"number"},"tokens":{"type":"object","properties":{"total":{"type":"number"},"input":{"type":"number"},"output":{"type":"number"},"reasoning":{"type":"number"},"cache":{"type":"object","properties":{"read":{"type":"number"},"write":{"type":"number"}},"required":["read","write"],"additionalProperties":false}},"required":["input","output","reasoning","cache"],"additionalProperties":false}},"required":["id","sessionID","messageID","type","reason","cost","tokens"],"additionalProperties":false},"SnapshotPart":{"type":"object","properties":{"id":{"type":"string","pattern":"^prt"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg"},"type":{"type":"string","enum":["snapshot"]},"snapshot":{"type":"string"}},"required":["id","sessionID","messageID","type","snapshot"],"additionalProperties":false},"PatchPart":{"type":"object","properties":{"id":{"type":"string","pattern":"^prt"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg"},"type":{"type":"string","enum":["patch"]},"hash":{"type":"string"},"files":{"type":"array","items":{"type":"string"}}},"required":["id","sessionID","messageID","type","hash","files"],"additionalProperties":false},"AgentPart":{"type":"object","properties":{"id":{"type":"string","pattern":"^prt"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg"},"type":{"type":"string","enum":["agent"]},"name":{"type":"string"},"source":{"type":"object","properties":{"value":{"type":"string"},"start":{"type":"integer","minimum":0},"end":{"type":"integer","minimum":0}},"required":["value","start","end"],"additionalProperties":false}},"required":["id","sessionID","messageID","type","name"],"additionalProperties":false},"RetryPart":{"type":"object","properties":{"id":{"type":"string","pattern":"^prt"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg"},"type":{"type":"string","enum":["retry"]},"attempt":{"type":"integer","minimum":0},"error":{"$ref":"#/components/schemas/APIError"},"time":{"type":"object","properties":{"created":{"type":"integer","minimum":0}},"required":["created"],"additionalProperties":false}},"required":["id","sessionID","messageID","type","attempt","error","time"],"additionalProperties":false},"CompactionPart":{"type":"object","properties":{"id":{"type":"string","pattern":"^prt"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg"},"type":{"type":"string","enum":["compaction"]},"auto":{"type":"boolean"},"overflow":{"type":"boolean"},"tail_start_id":{"type":"string","pattern":"^msg"}},"required":["id","sessionID","messageID","type","auto"],"additionalProperties":false},"Part":{"anyOf":[{"$ref":"#/components/schemas/TextPart"},{"$ref":"#/components/schemas/SubtaskPart"},{"$ref":"#/components/schemas/ReasoningPart"},{"$ref":"#/components/schemas/FilePart"},{"$ref":"#/components/schemas/ToolPart"},{"$ref":"#/components/schemas/StepStartPart"},{"$ref":"#/components/schemas/StepFinishPart"},{"$ref":"#/components/schemas/SnapshotPart"},{"$ref":"#/components/schemas/PatchPart"},{"$ref":"#/components/schemas/AgentPart"},{"$ref":"#/components/schemas/RetryPart"},{"$ref":"#/components/schemas/CompactionPart"}]},"Prompt":{"type":"object","properties":{"text":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/PromptFileAttachment"}},"agents":{"type":"array","items":{"$ref":"#/components/schemas/PromptAgentAttachment"}}},"required":["text"],"additionalProperties":false},"Pty":{"type":"object","properties":{"id":{"type":"string","pattern":"^pty"},"title":{"type":"string"},"command":{"type":"string"},"args":{"type":"array","items":{"type":"string"}},"cwd":{"type":"string"},"status":{"type":"string","enum":["running","exited"]},"pid":{"type":"integer","minimum":0},"exitCode":{"type":"integer","minimum":0},"sessionID":{"anyOf":[{"type":"string","pattern":"^ses"},{"type":"null"}]}},"required":["id","title","command","args","cwd","status","pid"],"additionalProperties":false},"Todo":{"type":"object","properties":{"content":{"type":"string","description":"Brief description of the task"},"status":{"type":"string","description":"Current status of the task: pending, in_progress, completed, cancelled"},"priority":{"type":"string","description":"Priority level of the task: high, medium, low"}},"required":["content","status","priority"],"additionalProperties":false},"Event.tui.prompt.append":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["tui.prompt.append"]},"properties":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"Event.tui.command.execute":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["tui.command.execute"]},"properties":{"type":"object","properties":{"command":{"anyOf":[{"type":"string","enum":["session.list","session.new","session.share","session.interrupt","session.compact","session.page.up","session.page.down","session.line.up","session.line.down","session.half.page.up","session.half.page.down","session.first","session.last","prompt.clear","prompt.submit","agent.cycle"]},{"type":"string"}]}},"required":["command"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"Event.tui.toast.show":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["tui.toast.show"]},"properties":{"type":"object","properties":{"title":{"type":"string"},"message":{"type":"string"},"variant":{"type":"string","enum":["info","success","warning","error"]},"duration":{"type":"integer","exclusiveMinimum":0}},"required":["message","variant"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"Event.tui.session.select":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["tui.session.select"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses","description":"Session ID to navigate to"}},"required":["sessionID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"SessionStatus":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["idle"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["retry"]},"attempt":{"type":"integer","minimum":0},"message":{"type":"string"},"action":{"type":"object","properties":{"reason":{"type":"string"},"provider":{"type":"string"},"title":{"type":"string"},"message":{"type":"string"},"label":{"type":"string"},"link":{"type":"string"}},"required":["reason","provider","title","message","label"],"additionalProperties":false},"next":{"type":"integer","minimum":0}},"required":["type","attempt","message","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["busy"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["offline"]},"requestID":{"type":"string","pattern":"^que"},"message":{"type":"string"}},"required":["type","requestID","message"],"additionalProperties":false}]},"QuestionOption":{"type":"object","properties":{"label":{"type":"string","description":"Display text (1-5 words, concise)"},"description":{"type":"string","description":"Explanation of choice"},"labelKey":{"type":"string"},"descriptionKey":{"type":"string"},"mode":{"type":"string"}},"required":["label","description"],"additionalProperties":false},"QuestionInfo":{"type":"object","properties":{"question":{"type":"string","description":"Complete question"},"header":{"type":"string","description":"Very short label (max 30 chars)"},"options":{"type":"array","items":{"$ref":"#/components/schemas/QuestionOption"},"description":"Available choices"},"multiple":{"type":"boolean"},"questionKey":{"type":"string"},"headerKey":{"type":"string"},"custom":{"type":"boolean"}},"required":["question","header","options"],"additionalProperties":false},"QuestionTool":{"type":"object","properties":{"messageID":{"type":"string","pattern":"^msg"},"callID":{"type":"string"}},"required":["messageID","callID"],"additionalProperties":false},"QuestionAnswer":{"type":"array","items":{"type":"string"}},"GlobalEvent":{"type":"object","properties":{"directory":{"type":"string"},"project":{"type":"string"},"workspace":{"type":"string"},"payload":{"anyOf":[{"$ref":"#/components/schemas/EventServerInstanceDisposed"},{"$ref":"#/components/schemas/EventSessionTurnOpen"},{"$ref":"#/components/schemas/EventSessionTurnClose"},{"$ref":"#/components/schemas/EventSessionQueueChanged"},{"$ref":"#/components/schemas/EventSessionNetworkAsked"},{"$ref":"#/components/schemas/EventSessionNetworkReplied"},{"$ref":"#/components/schemas/EventSessionNetworkRejected"},{"$ref":"#/components/schemas/EventSessionNetworkRestored"},{"$ref":"#/components/schemas/EventBackground_processUpdated"},{"$ref":"#/components/schemas/EventBackground_processDeleted"},{"$ref":"#/components/schemas/EventInteractive_terminalUpdated"},{"$ref":"#/components/schemas/EventInteractive_terminalData"},{"$ref":"#/components/schemas/EventInteractive_terminalDeleted"},{"$ref":"#/components/schemas/EventSandboxStatusChanged"},{"$ref":"#/components/schemas/EventSuggestionShown"},{"$ref":"#/components/schemas/EventSuggestionAccepted"},{"$ref":"#/components/schemas/EventSuggestionDismissed"},{"$ref":"#/components/schemas/EventKilocodeAgent_managerStart"},{"$ref":"#/components/schemas/EventKilocodeAgent_managerRequested"},{"$ref":"#/components/schemas/EventKilocodeAgent_managerCancelled"},{"$ref":"#/components/schemas/EventKilocodeNotebookRequested"},{"$ref":"#/components/schemas/EventKilocodeNotebookCancelled"},{"$ref":"#/components/schemas/EventKilo-sessionsRemote-status-changed"},{"$ref":"#/components/schemas/EventLspClientDiagnostics"},{"$ref":"#/components/schemas/EventMemoryStatus"},{"$ref":"#/components/schemas/EventMemoryUpdated"},{"$ref":"#/components/schemas/EventMemoryError"},{"$ref":"#/components/schemas/EventIndexingStatus"},{"$ref":"#/components/schemas/EventIndexingWarning"},{"$ref":"#/components/schemas/EventModels-devRefreshed"},{"$ref":"#/components/schemas/EventIntegrationUpdated"},{"$ref":"#/components/schemas/EventIntegrationConnectionUpdated"},{"$ref":"#/components/schemas/EventCatalogUpdated"},{"$ref":"#/components/schemas/EventSessionCreated"},{"$ref":"#/components/schemas/EventSessionUpdated"},{"$ref":"#/components/schemas/EventSessionDeleted"},{"$ref":"#/components/schemas/EventMessageUpdated"},{"$ref":"#/components/schemas/EventMessageRemoved"},{"$ref":"#/components/schemas/EventMessagePartUpdated"},{"$ref":"#/components/schemas/EventMessagePartRemoved"},{"$ref":"#/components/schemas/EventSessionNextAgentSwitched"},{"$ref":"#/components/schemas/EventSessionNextModelSwitched"},{"$ref":"#/components/schemas/EventSessionNextMoved"},{"$ref":"#/components/schemas/EventSessionNextPrompted"},{"$ref":"#/components/schemas/EventSessionNextPromptAdmitted"},{"$ref":"#/components/schemas/EventSessionNextContextUpdated"},{"$ref":"#/components/schemas/EventSessionNextSynthetic"},{"$ref":"#/components/schemas/EventSessionNextShellStarted"},{"$ref":"#/components/schemas/EventSessionNextShellEnded"},{"$ref":"#/components/schemas/EventSessionNextStepStarted"},{"$ref":"#/components/schemas/EventSessionNextStepEnded"},{"$ref":"#/components/schemas/EventSessionNextStepFailed"},{"$ref":"#/components/schemas/EventSessionNextTextStarted"},{"$ref":"#/components/schemas/EventSessionNextTextDelta"},{"$ref":"#/components/schemas/EventSessionNextTextEnded"},{"$ref":"#/components/schemas/EventSessionNextReasoningStarted"},{"$ref":"#/components/schemas/EventSessionNextReasoningDelta"},{"$ref":"#/components/schemas/EventSessionNextReasoningEnded"},{"$ref":"#/components/schemas/EventSessionNextToolInputStarted"},{"$ref":"#/components/schemas/EventSessionNextToolInputDelta"},{"$ref":"#/components/schemas/EventSessionNextToolInputEnded"},{"$ref":"#/components/schemas/EventSessionNextToolCalled"},{"$ref":"#/components/schemas/EventSessionNextToolProgress"},{"$ref":"#/components/schemas/EventSessionNextToolSuccess"},{"$ref":"#/components/schemas/EventSessionNextToolFailed"},{"$ref":"#/components/schemas/EventSessionNextRetried"},{"$ref":"#/components/schemas/EventSessionNextCompactionStarted"},{"$ref":"#/components/schemas/EventSessionNextCompactionDelta"},{"$ref":"#/components/schemas/EventSessionNextCompactionEnded"},{"$ref":"#/components/schemas/EventSessionNextRevertStaged"},{"$ref":"#/components/schemas/EventSessionNextRevertCleared"},{"$ref":"#/components/schemas/EventSessionNextRevertCommitted"},{"$ref":"#/components/schemas/EventMessagePartDelta"},{"$ref":"#/components/schemas/EventSessionDiff"},{"$ref":"#/components/schemas/EventSessionError"},{"$ref":"#/components/schemas/EventInstallationUpdated"},{"$ref":"#/components/schemas/EventInstallationUpdate-available"},{"$ref":"#/components/schemas/EventFileEdited"},{"$ref":"#/components/schemas/EventReferenceUpdated"},{"$ref":"#/components/schemas/EventPermissionV2Asked"},{"$ref":"#/components/schemas/EventPermissionV2Replied"},{"$ref":"#/components/schemas/EventPluginAdded"},{"$ref":"#/components/schemas/EventProjectDirectoriesUpdated"},{"$ref":"#/components/schemas/EventFileWatcherUpdated"},{"$ref":"#/components/schemas/EventPtyCreated"},{"$ref":"#/components/schemas/EventPtyUpdated"},{"$ref":"#/components/schemas/EventPtyExited"},{"$ref":"#/components/schemas/EventPtyDeleted"},{"$ref":"#/components/schemas/EventQuestionV2Asked"},{"$ref":"#/components/schemas/EventQuestionV2Replied"},{"$ref":"#/components/schemas/EventQuestionV2Rejected"},{"$ref":"#/components/schemas/EventTodoUpdated"},{"$ref":"#/components/schemas/EventLspUpdated"},{"$ref":"#/components/schemas/EventPermissionAsked"},{"$ref":"#/components/schemas/EventPermissionReplied"},{"$ref":"#/components/schemas/Event.tui.prompt.append"},{"$ref":"#/components/schemas/Event.tui.command.execute"},{"$ref":"#/components/schemas/Event.tui.toast.show"},{"$ref":"#/components/schemas/Event.tui.session.select"},{"$ref":"#/components/schemas/EventMcpToolsChanged"},{"$ref":"#/components/schemas/EventMcpBrowserOpenFailed"},{"$ref":"#/components/schemas/EventCommandExecuted"},{"$ref":"#/components/schemas/EventProjectUpdated"},{"$ref":"#/components/schemas/EventSessionStatus"},{"$ref":"#/components/schemas/EventSessionIdle"},{"$ref":"#/components/schemas/EventQuestionAsked"},{"$ref":"#/components/schemas/EventQuestionReplied"},{"$ref":"#/components/schemas/EventQuestionRejected"},{"$ref":"#/components/schemas/EventSessionCompacted"},{"$ref":"#/components/schemas/EventVcsBranchUpdated"},{"$ref":"#/components/schemas/EventWorkspaceReady"},{"$ref":"#/components/schemas/EventWorkspaceFailed"},{"$ref":"#/components/schemas/EventWorkspaceStatus"},{"$ref":"#/components/schemas/EventWorktreeReady"},{"$ref":"#/components/schemas/EventWorktreeFailed"},{"$ref":"#/components/schemas/EventServerConnected"},{"$ref":"#/components/schemas/EventGlobalDisposed"},{"$ref":"#/components/schemas/EventGlobalConfigUpdated"},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["models-dev.refreshed"]},"properties":{"type":"object","properties":{}}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["integration.updated"]},"properties":{"type":"object","properties":{}}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["integration.connection.updated"]},"properties":{"type":"object","properties":{"integrationID":{"type":"string"}},"required":["integrationID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["catalog.updated"]},"properties":{"type":"object","properties":{}}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.created"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"info":{"$ref":"#/components/schemas/Session"}},"required":["sessionID","info"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.updated"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"info":{"$ref":"#/components/schemas/Session"}},"required":["sessionID","info"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.deleted"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"info":{"$ref":"#/components/schemas/Session"}},"required":["sessionID","info"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["message.updated"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"info":{"$ref":"#/components/schemas/Message"}},"required":["sessionID","info"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["message.removed"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg"}},"required":["sessionID","messageID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["message.part.updated"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"part":{"$ref":"#/components/schemas/Part"},"time":{"type":"number"}},"required":["sessionID","part","time"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["message.part.removed"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg"},"partID":{"type":"string","pattern":"^prt"}},"required":["sessionID","messageID","partID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.agent.switched"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"agent":{"type":"string"}},"required":["timestamp","sessionID","messageID","agent"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.model.switched"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"model":{"$ref":"#/components/schemas/ModelRef"}},"required":["timestamp","sessionID","messageID","model"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.moved"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"location":{"$ref":"#/components/schemas/LocationRef"},"subdirectory":{"type":"string"}},"required":["timestamp","sessionID","location"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.prompted"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"prompt":{"$ref":"#/components/schemas/Prompt"},"delivery":{"type":"string","enum":["steer","queue"]}},"required":["timestamp","sessionID","messageID","prompt","delivery"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.prompt.admitted"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"prompt":{"$ref":"#/components/schemas/Prompt"},"delivery":{"type":"string","enum":["steer","queue"]}},"required":["timestamp","sessionID","messageID","prompt","delivery"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.context.updated"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"text":{"type":"string"}},"required":["timestamp","sessionID","messageID","text"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.synthetic"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"text":{"type":"string"}},"required":["timestamp","sessionID","messageID","text"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.shell.started"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"command":{"type":"string"}},"required":["timestamp","sessionID","messageID","callID","command"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.shell.ended"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"callID":{"type":"string"},"output":{"type":"string"}},"required":["timestamp","sessionID","callID","output"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.step.started"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"agent":{"type":"string"},"model":{"$ref":"#/components/schemas/ModelRef"},"snapshot":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","agent","model"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.step.ended"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"finish":{"type":"string"},"cost":{"type":"number"},"tokens":{"type":"object","properties":{"input":{"type":"number"},"output":{"type":"number"},"reasoning":{"type":"number"},"cache":{"type":"object","properties":{"read":{"type":"number"},"write":{"type":"number"}},"required":["read","write"],"additionalProperties":false}},"required":["input","output","reasoning","cache"],"additionalProperties":false},"snapshot":{"type":"string"},"files":{"type":"array","items":{"type":"string"}}},"required":["timestamp","sessionID","assistantMessageID","finish","cost","tokens"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.step.failed"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"error":{"$ref":"#/components/schemas/SessionErrorUnknown"}},"required":["timestamp","sessionID","assistantMessageID","error"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.text.started"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"textID":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","textID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.text.delta"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"textID":{"type":"string"},"delta":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","textID","delta"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.text.ended"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"textID":{"type":"string"},"text":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","textID","text"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.reasoning.started"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"reasoningID":{"type":"string"},"providerMetadata":{"$ref":"#/components/schemas/LLMProviderMetadata"}},"required":["timestamp","sessionID","assistantMessageID","reasoningID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.reasoning.delta"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"reasoningID":{"type":"string"},"delta":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","reasoningID","delta"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.reasoning.ended"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"reasoningID":{"type":"string"},"text":{"type":"string"},"providerMetadata":{"$ref":"#/components/schemas/LLMProviderMetadata"}},"required":["timestamp","sessionID","assistantMessageID","reasoningID","text"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.tool.input.started"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"name":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","callID","name"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.tool.input.delta"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"delta":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","callID","delta"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.tool.input.ended"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"text":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","callID","text"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.tool.called"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"tool":{"type":"string"},"input":{"type":"object"},"provider":{"type":"object","properties":{"executed":{"type":"boolean"},"metadata":{"$ref":"#/components/schemas/LLMProviderMetadata"}},"required":["executed"],"additionalProperties":false}},"required":["timestamp","sessionID","assistantMessageID","callID","tool","input","provider"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.tool.progress"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"structured":{"type":"object"},"content":{"type":"array","items":{"$ref":"#/components/schemas/LLMStoredToolContent"}}},"required":["timestamp","sessionID","assistantMessageID","callID","structured","content"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.tool.success"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"structured":{"type":"object"},"content":{"type":"array","items":{"$ref":"#/components/schemas/LLMStoredToolContent"}},"outputPaths":{"type":"array","items":{"type":"string"}},"result":{},"provider":{"type":"object","properties":{"executed":{"type":"boolean"},"metadata":{"$ref":"#/components/schemas/LLMProviderMetadata"}},"required":["executed"],"additionalProperties":false}},"required":["timestamp","sessionID","assistantMessageID","callID","structured","content","provider"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.tool.failed"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"error":{"$ref":"#/components/schemas/SessionErrorUnknown"},"result":{},"provider":{"type":"object","properties":{"executed":{"type":"boolean"},"metadata":{"$ref":"#/components/schemas/LLMProviderMetadata"}},"required":["executed"],"additionalProperties":false}},"required":["timestamp","sessionID","assistantMessageID","callID","error","provider"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.retried"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"attempt":{"type":"number"},"error":{"$ref":"#/components/schemas/SessionNextRetry_error"}},"required":["timestamp","sessionID","attempt","error"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.compaction.started"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"reason":{"type":"string","enum":["auto","manual"]}},"required":["timestamp","sessionID","messageID","reason"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.compaction.delta"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"text":{"type":"string"}},"required":["timestamp","sessionID","messageID","text"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.compaction.ended"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"reason":{"type":"string","enum":["auto","manual"]},"text":{"type":"string"},"recent":{"type":"string"},"include":{"type":"string"}},"required":["timestamp","sessionID","messageID","reason","text","recent"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.revert.staged"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"revert":{"$ref":"#/components/schemas/RevertState"}},"required":["timestamp","sessionID","revert"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.revert.cleared"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"}},"required":["timestamp","sessionID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.revert.committed"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"}},"required":["timestamp","sessionID","messageID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["message.part.delta"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg"},"partID":{"type":"string","pattern":"^prt"},"field":{"type":"string"},"delta":{"type":"string"}},"required":["sessionID","messageID","partID","field","delta"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.diff"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"diff":{"type":"array","items":{"$ref":"#/components/schemas/SnapshotFileDiff"}}},"required":["sessionID","diff"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.error"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"error":{"anyOf":[{"$ref":"#/components/schemas/ProviderAuthError"},{"$ref":"#/components/schemas/UnknownError"},{"$ref":"#/components/schemas/MessageOutputLengthError"},{"$ref":"#/components/schemas/MessageAbortedError"},{"$ref":"#/components/schemas/StructuredOutputError"},{"$ref":"#/components/schemas/ContextOverflowError"},{"$ref":"#/components/schemas/ContentFilterError"},{"$ref":"#/components/schemas/APIError"}]}},"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["installation.updated"]},"properties":{"type":"object","properties":{"version":{"type":"string"}},"required":["version"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["installation.update-available"]},"properties":{"type":"object","properties":{"version":{"type":"string"}},"required":["version"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["file.edited"]},"properties":{"type":"object","properties":{"file":{"type":"string"}},"required":["file"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["reference.updated"]},"properties":{"type":"object","properties":{}}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["permission.v2.asked"]},"properties":{"type":"object","properties":{"id":{"type":"string","pattern":"^per"},"sessionID":{"type":"string","pattern":"^ses"},"action":{"type":"string"},"resources":{"type":"array","items":{"type":"string"}},"save":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object"},"source":{"$ref":"#/components/schemas/PermissionV2Source"}},"required":["id","sessionID","action","resources"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["permission.v2.replied"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"requestID":{"type":"string","pattern":"^per"},"reply":{"$ref":"#/components/schemas/PermissionV2Reply"}},"required":["sessionID","requestID","reply"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["plugin.added"]},"properties":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["project.directories.updated"]},"properties":{"type":"object","properties":{"projectID":{"type":"string"}},"required":["projectID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["file.watcher.updated"]},"properties":{"type":"object","properties":{"file":{"type":"string"},"event":{"type":"string","enum":["add","change","unlink"]}},"required":["file","event"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["pty.created"]},"properties":{"type":"object","properties":{"info":{"$ref":"#/components/schemas/Pty"}},"required":["info"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["pty.updated"]},"properties":{"type":"object","properties":{"info":{"$ref":"#/components/schemas/Pty"}},"required":["info"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["pty.exited"]},"properties":{"type":"object","properties":{"id":{"type":"string","pattern":"^pty"},"exitCode":{"type":"integer","minimum":0}},"required":["id","exitCode"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["pty.deleted"]},"properties":{"type":"object","properties":{"id":{"type":"string","pattern":"^pty"}},"required":["id"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["question.v2.asked"]},"properties":{"type":"object","properties":{"id":{"type":"string","pattern":"^que"},"sessionID":{"type":"string","pattern":"^ses"},"questions":{"type":"array","items":{"$ref":"#/components/schemas/QuestionV2Info"},"description":"Questions to ask"},"tool":{"$ref":"#/components/schemas/QuestionV2Tool"}},"required":["id","sessionID","questions"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["question.v2.replied"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"requestID":{"type":"string","pattern":"^que"},"answers":{"type":"array","items":{"$ref":"#/components/schemas/QuestionV2Answer"}}},"required":["sessionID","requestID","answers"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["question.v2.rejected"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"requestID":{"type":"string","pattern":"^que"}},"required":["sessionID","requestID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["todo.updated"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"todos":{"type":"array","items":{"$ref":"#/components/schemas/Todo"}}},"required":["sessionID","todos"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["lsp.updated"]},"properties":{"type":"object","properties":{}}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["permission.asked"]},"properties":{"type":"object","properties":{"id":{"type":"string","pattern":"^per"},"sessionID":{"type":"string","pattern":"^ses"},"permission":{"type":"string"},"patterns":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object"},"always":{"type":"array","items":{"type":"string"}},"tool":{"type":"object","properties":{"messageID":{"type":"string"},"callID":{"type":"string"}},"required":["messageID","callID"],"additionalProperties":false}},"required":["id","sessionID","permission","patterns","metadata","always"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["permission.replied"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"requestID":{"type":"string","pattern":"^per"},"reply":{"type":"string","enum":["once","always","reject"]}},"required":["sessionID","requestID","reply"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["tui.prompt.append"]},"properties":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["tui.command.execute"]},"properties":{"type":"object","properties":{"command":{"anyOf":[{"type":"string","enum":["session.list","session.new","session.share","session.interrupt","session.compact","session.page.up","session.page.down","session.line.up","session.line.down","session.half.page.up","session.half.page.down","session.first","session.last","prompt.clear","prompt.submit","agent.cycle"]},{"type":"string"}]}},"required":["command"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["tui.toast.show"]},"properties":{"type":"object","properties":{"title":{"type":"string"},"message":{"type":"string"},"variant":{"type":"string","enum":["info","success","warning","error"]},"duration":{"type":"integer","exclusiveMinimum":0}},"required":["message","variant"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["tui.session.select"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses","description":"Session ID to navigate to"}},"required":["sessionID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["mcp.tools.changed"]},"properties":{"type":"object","properties":{"server":{"type":"string"}},"required":["server"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["mcp.browser.open.failed"]},"properties":{"type":"object","properties":{"mcpName":{"type":"string"},"url":{"type":"string"}},"required":["mcpName","url"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["command.executed"]},"properties":{"type":"object","properties":{"name":{"type":"string"},"sessionID":{"type":"string","pattern":"^ses"},"arguments":{"type":"string"},"messageID":{"type":"string","pattern":"^msg"}},"required":["name","sessionID","arguments","messageID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["project.updated"]},"properties":{"type":"object","properties":{"id":{"type":"string"},"worktree":{"type":"string"},"vcs":{"$ref":"#/components/schemas/ProjectVcs"},"name":{"type":"string"},"icon":{"$ref":"#/components/schemas/ProjectIcon"},"commands":{"$ref":"#/components/schemas/ProjectCommands"},"time":{"$ref":"#/components/schemas/ProjectTime"},"sandboxes":{"type":"array","items":{"type":"string"}}},"required":["id","worktree","time","sandboxes"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.status"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"status":{"$ref":"#/components/schemas/SessionStatus"}},"required":["sessionID","status"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.idle"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"}},"required":["sessionID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["question.asked"]},"properties":{"type":"object","properties":{"id":{"type":"string","pattern":"^que"},"sessionID":{"type":"string","pattern":"^ses"},"questions":{"type":"array","items":{"$ref":"#/components/schemas/QuestionInfo"},"description":"Questions to ask"},"blocking":{"type":"boolean"},"tool":{"$ref":"#/components/schemas/QuestionTool"}},"required":["id","sessionID","questions"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["question.replied"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"requestID":{"type":"string","pattern":"^que"},"answers":{"type":"array","items":{"$ref":"#/components/schemas/QuestionAnswer"}}},"required":["sessionID","requestID","answers"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["question.rejected"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"requestID":{"type":"string","pattern":"^que"}},"required":["sessionID","requestID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.compacted"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"}},"required":["sessionID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["vcs.branch.updated"]},"properties":{"type":"object","properties":{"branch":{"type":"string"}},"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["workspace.ready"]},"properties":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["workspace.failed"]},"properties":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["workspace.status"]},"properties":{"type":"object","properties":{"workspaceID":{"type":"string","pattern":"^wrk"},"status":{"type":"string","enum":["connected","connecting","disconnected","error"]}},"required":["workspaceID","status"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["worktree.ready"]},"properties":{"type":"object","properties":{"name":{"type":"string"},"branch":{"type":"string"}},"required":["name"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["worktree.failed"]},"properties":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["server.connected"]},"properties":{"type":"object","properties":{}}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["global.disposed"]},"properties":{"type":"object","properties":{}}},"required":["id","type","properties"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["global.config.updated"]},"properties":{"type":"object","properties":{}}},"required":["id","type","properties"],"additionalProperties":false},{"$ref":"#/components/schemas/EventServerInstanceDisposed"},{"$ref":"#/components/schemas/SyncEventSessionCreated"},{"$ref":"#/components/schemas/SyncEventSessionUpdated"},{"$ref":"#/components/schemas/SyncEventSessionDeleted"},{"$ref":"#/components/schemas/SyncEventMessageUpdated"},{"$ref":"#/components/schemas/SyncEventMessageRemoved"},{"$ref":"#/components/schemas/SyncEventMessagePartUpdated"},{"$ref":"#/components/schemas/SyncEventMessagePartRemoved"},{"$ref":"#/components/schemas/SyncEventSessionNextAgentSwitched"},{"$ref":"#/components/schemas/SyncEventSessionNextModelSwitched"},{"$ref":"#/components/schemas/SyncEventSessionNextMoved"},{"$ref":"#/components/schemas/SyncEventSessionNextPrompted"},{"$ref":"#/components/schemas/SyncEventSessionNextPromptAdmitted"},{"$ref":"#/components/schemas/SyncEventSessionNextContextUpdated"},{"$ref":"#/components/schemas/SyncEventSessionNextSynthetic"},{"$ref":"#/components/schemas/SyncEventSessionNextShellStarted"},{"$ref":"#/components/schemas/SyncEventSessionNextShellEnded"},{"$ref":"#/components/schemas/SyncEventSessionNextStepStarted"},{"$ref":"#/components/schemas/SyncEventSessionNextStepEnded"},{"$ref":"#/components/schemas/SyncEventSessionNextStepFailed"},{"$ref":"#/components/schemas/SyncEventSessionNextTextStarted"},{"$ref":"#/components/schemas/SyncEventSessionNextTextEnded"},{"$ref":"#/components/schemas/SyncEventSessionNextReasoningStarted"},{"$ref":"#/components/schemas/SyncEventSessionNextReasoningEnded"},{"$ref":"#/components/schemas/SyncEventSessionNextToolInputStarted"},{"$ref":"#/components/schemas/SyncEventSessionNextToolInputEnded"},{"$ref":"#/components/schemas/SyncEventSessionNextToolCalled"},{"$ref":"#/components/schemas/SyncEventSessionNextToolProgress"},{"$ref":"#/components/schemas/SyncEventSessionNextToolSuccess"},{"$ref":"#/components/schemas/SyncEventSessionNextToolFailed"},{"$ref":"#/components/schemas/SyncEventSessionNextRetried"},{"$ref":"#/components/schemas/SyncEventSessionNextCompactionStarted"},{"$ref":"#/components/schemas/SyncEventSessionNextCompactionEnded"},{"$ref":"#/components/schemas/SyncEventSessionNextRevertStaged"},{"$ref":"#/components/schemas/SyncEventSessionNextRevertCleared"},{"$ref":"#/components/schemas/SyncEventSessionNextRevertCommitted"}]}},"required":["directory","payload"],"additionalProperties":false},"LogLevel":{"type":"string","enum":["DEBUG","INFO","WARN","ERROR"],"description":"Log level"},"ServerConfig":{"type":"object","properties":{"port":{"type":"integer","exclusiveMinimum":0},"hostname":{"type":"string"},"mdns":{"type":"boolean"},"mdnsDomain":{"type":"string"},"cors":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"description":"Server configuration for the kilo serve command"},"IndexingConfig":{"type":"object","properties":{"enabled":{"type":"boolean"},"provider":{"type":"string","enum":["kilo","openai","ollama","openai-compatible","gemini","mistral","vercel-ai-gateway","bedrock","openrouter","voyage"]},"model":{"anyOf":[{"type":"string"},{"type":"null"}]},"dimension":{"anyOf":[{"type":"integer","exclusiveMinimum":0},{"type":"null"}]},"vectorStore":{"type":"string","enum":["lancedb","qdrant"]},"kilo":{"type":"object","properties":{"apiKey":{"type":"string"},"baseUrl":{"type":"string"},"organizationId":{"type":"string"}},"additionalProperties":false},"openai":{"type":"object","properties":{"apiKey":{"type":"string"}},"additionalProperties":false},"ollama":{"type":"object","properties":{"baseUrl":{"type":"string"}},"additionalProperties":false},"openai-compatible":{"type":"object","properties":{"baseUrl":{"type":"string"},"apiKey":{"type":"string"}},"additionalProperties":false},"gemini":{"type":"object","properties":{"apiKey":{"type":"string"}},"additionalProperties":false},"mistral":{"type":"object","properties":{"apiKey":{"type":"string"}},"additionalProperties":false},"vercel-ai-gateway":{"type":"object","properties":{"apiKey":{"type":"string"}},"additionalProperties":false},"bedrock":{"type":"object","properties":{"region":{"type":"string"},"profile":{"type":"string"}},"additionalProperties":false},"openrouter":{"type":"object","properties":{"apiKey":{"type":"string"},"specificProvider":{"type":"string"}},"additionalProperties":false},"voyage":{"type":"object","properties":{"apiKey":{"type":"string"}},"additionalProperties":false},"qdrant":{"type":"object","properties":{"url":{"type":"string"},"apiKey":{"type":"string"}},"additionalProperties":false},"lancedb":{"type":"object","properties":{"directory":{"type":"string"}},"additionalProperties":false},"searchMinScore":{"type":"number","minimum":0,"maximum":1},"searchMaxResults":{"type":"integer","exclusiveMinimum":0},"embeddingBatchSize":{"type":"integer","exclusiveMinimum":0},"scannerMaxBatchRetries":{"type":"integer","exclusiveMinimum":0},"fileExtensions":{"type":"array","items":{"type":"string","pattern":"^\\s*\\.?[A-Za-z0-9][A-Za-z0-9_+-]*\\s*$"},"minItems":1}},"additionalProperties":false},"PermissionActionConfig":{"type":"string","enum":["ask","allow","deny"]},"PermissionObjectConfig":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PermissionActionConfig"}},"PermissionRuleConfig":{"anyOf":[{"$ref":"#/components/schemas/PermissionActionConfig"},{"$ref":"#/components/schemas/PermissionObjectConfig"}]},"PermissionConfig":{"anyOf":[{"$ref":"#/components/schemas/PermissionActionConfig"},{"type":"object","properties":{"read":{"$ref":"#/components/schemas/PermissionRuleConfig"},"edit":{"$ref":"#/components/schemas/PermissionRuleConfig"},"glob":{"$ref":"#/components/schemas/PermissionRuleConfig"},"grep":{"$ref":"#/components/schemas/PermissionRuleConfig"},"list":{"$ref":"#/components/schemas/PermissionRuleConfig"},"bash":{"$ref":"#/components/schemas/PermissionRuleConfig"},"task":{"$ref":"#/components/schemas/PermissionRuleConfig"},"external_directory":{"$ref":"#/components/schemas/PermissionRuleConfig"},"todowrite":{"$ref":"#/components/schemas/PermissionActionConfig"},"question":{"$ref":"#/components/schemas/PermissionActionConfig"},"webfetch":{"$ref":"#/components/schemas/PermissionActionConfig"},"websearch":{"$ref":"#/components/schemas/PermissionActionConfig"},"lsp":{"$ref":"#/components/schemas/PermissionRuleConfig"},"doom_loop":{"$ref":"#/components/schemas/PermissionActionConfig"},"skill":{"$ref":"#/components/schemas/PermissionRuleConfig"},"agent_manager":{"$ref":"#/components/schemas/PermissionRuleConfig"},"notebook_read":{"$ref":"#/components/schemas/PermissionRuleConfig"},"notebook_edit":{"$ref":"#/components/schemas/PermissionRuleConfig"},"notebook_execute":{"$ref":"#/components/schemas/PermissionRuleConfig"}},"additionalProperties":{"$ref":"#/components/schemas/PermissionRuleConfig"}}]},"AgentConfig":{"type":"object","properties":{"model":{"type":"string"},"variant":{"type":"string"},"temperature":{"type":"number"},"top_p":{"type":"number"},"prompt":{"type":"string"},"tools":{"type":"object","additionalProperties":{"type":"boolean"}},"disable":{"type":"boolean"},"description":{"type":"string"},"mode":{"type":"string","enum":["subagent","primary","all"]},"displayName":{"type":"string"},"source":{"type":"string"},"hidden":{"type":"boolean"},"options":{"type":"object"},"color":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"string","enum":["primary","secondary","accent","success","warning","error","info"]}],"description":"Hex color code (e.g., #FF5733) or theme color (e.g., primary)"},"steps":{"type":"integer","exclusiveMinimum":0},"maxSteps":{"type":"integer","exclusiveMinimum":0},"permission":{"$ref":"#/components/schemas/PermissionConfig"},"requirements":{"type":"object","properties":{"skills":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"pattern":"\\S"},"minItems":1,"maxItems":20},"mcps":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"pattern":"\\S"},"minItems":1,"maxItems":20},"vscode_extensions":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128,"pattern":"\\S"},"id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$"}},"required":["name","id"],"additionalProperties":false},"minItems":1,"maxItems":20}},"additionalProperties":false}},"additionalProperties":{}},"ProviderConfig":{"type":"object","properties":{"api":{"type":"string"},"name":{"type":"string"},"env":{"type":"array","items":{"type":"string"}},"id":{"type":"string"},"npm":{"type":"string"},"whitelist":{"type":"array","items":{"type":"string"}},"blacklist":{"type":"array","items":{"type":"string"}},"options":{"type":"object","properties":{"apiKey":{"type":"string"},"baseURL":{"type":"string"},"enterpriseUrl":{"type":"string"},"setCacheKey":{"type":"boolean"},"timeout":{"anyOf":[{"type":"integer","exclusiveMinimum":0},{"type":"boolean","enum":[false]}],"description":"Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."},"headerTimeout":{"anyOf":[{"type":"integer","exclusiveMinimum":0},{"type":"boolean","enum":[false]}],"description":"Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."},"chunkTimeout":{"type":"integer","exclusiveMinimum":0}},"additionalProperties":{}},"models":{"type":"object","additionalProperties":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"family":{"type":"string"},"prompt":{"type":"string","enum":["codex","gemini","beast","anthropic","trinity","anthropic_without_todo","ling","gpt55"]},"isFree":{"type":"boolean"},"ai_sdk_provider":{"type":"string","enum":["alibaba","anthropic","mistral","openai","openai-compatible","openrouter"]},"release_date":{"type":"string"},"attachment":{"type":"boolean"},"reasoning":{"type":"boolean"},"temperature":{"type":"boolean"},"tool_call":{"type":"boolean"},"interleaved":{"anyOf":[{"type":"boolean","enum":[true]},{"type":"object","properties":{"field":{"type":"string","enum":["reasoning","reasoning_content","reasoning_details"]}},"required":["field"],"additionalProperties":false}]},"cost":{"type":"object","properties":{"input":{"type":"number"},"output":{"type":"number"},"cache_read":{"type":"number"},"cache_write":{"type":"number"},"context_over_200k":{"type":"object","properties":{"input":{"type":"number"},"output":{"type":"number"},"cache_read":{"type":"number"},"cache_write":{"type":"number"}},"required":["input","output"],"additionalProperties":false}},"required":["input","output"],"additionalProperties":false},"limit":{"type":"object","properties":{"context":{"type":"number"},"input":{"type":"number"},"output":{"type":"number"}},"required":["context","output"],"additionalProperties":false},"modalities":{"type":"object","properties":{"input":{"type":"array","items":{"type":"string","enum":["text","audio","image","video","pdf"]}},"output":{"type":"array","items":{"type":"string","enum":["text","audio","image","video","pdf"]}}},"additionalProperties":false},"experimental":{"type":"boolean"},"status":{"type":"string","enum":["alpha","beta","deprecated","active"]},"provider":{"type":"object","properties":{"npm":{"type":"string"},"api":{"type":"string"}},"additionalProperties":false},"options":{"type":"object"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"variants":{"type":"object","additionalProperties":{"type":"object","properties":{"disabled":{"type":"boolean"}},"additionalProperties":{}},"description":"Variant-specific configuration"}},"additionalProperties":false}}},"additionalProperties":false},"McpLocalConfig":{"type":"object","properties":{"type":{"type":"string","enum":["local"]},"command":{"type":"array","items":{"type":"string"}},"environment":{"type":"object","additionalProperties":{"type":"string"}},"env":{"type":"object","additionalProperties":{"type":"string"}},"enabled":{"type":"boolean"},"timeout":{"type":"integer","exclusiveMinimum":0}},"required":["type","command"],"additionalProperties":false},"McpOAuthConfig":{"type":"object","properties":{"clientId":{"type":"string"},"clientSecret":{"type":"string"},"scope":{"type":"string"},"callbackPort":{"type":"integer","minimum":1,"maximum":65535},"redirectUri":{"type":"string"}},"additionalProperties":false},"McpRemoteConfig":{"type":"object","properties":{"type":{"type":"string","enum":["remote"],"description":"Type of MCP server connection"},"url":{"type":"string","description":"URL of the remote MCP server"},"enabled":{"type":"boolean"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"oauth":{"anyOf":[{"$ref":"#/components/schemas/McpOAuthConfig"},{"type":"boolean","enum":[false]}],"description":"OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."},"timeout":{"type":"integer","exclusiveMinimum":0}},"required":["type","url"],"additionalProperties":false},"LayoutConfig":{"type":"string","enum":["auto","stretch"],"description":"@deprecated Always uses stretch layout."},"ImageAttachmentConfig":{"type":"object","properties":{"auto_resize":{"type":"boolean"},"max_width":{"type":"integer","exclusiveMinimum":0},"max_height":{"type":"integer","exclusiveMinimum":0},"max_base64_bytes":{"type":"integer","exclusiveMinimum":0}},"additionalProperties":false},"AttachmentConfig":{"type":"object","properties":{"image":{"$ref":"#/components/schemas/ImageAttachmentConfig"}},"additionalProperties":false},"Config":{"type":"object","properties":{"$schema":{"type":"string"},"shell":{"type":"string"},"logLevel":{"$ref":"#/components/schemas/LogLevel"},"server":{"$ref":"#/components/schemas/ServerConfig"},"command":{"type":"object","additionalProperties":{"type":"object","properties":{"template":{"type":"string"},"description":{"type":"string"},"agent":{"type":"string"},"model":{"type":"string"},"variant":{"type":"string"},"subtask":{"type":"boolean"}},"required":["template"],"additionalProperties":false}},"skills":{"type":"object","properties":{"paths":{"type":"array","items":{"type":"string"}},"urls":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"references":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/ConfigV2ReferenceGit"},{"$ref":"#/components/schemas/ConfigV2ReferenceLocal"}]}},"reference":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/ConfigV2ReferenceGit"},{"$ref":"#/components/schemas/ConfigV2ReferenceLocal"}]}},"watcher":{"type":"object","properties":{"ignore":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"snapshot":{"type":"boolean"},"plugin":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"array","prefixItems":[{"type":"string"},{"type":"object"}],"maxItems":2,"minItems":2}]}},"share":{"type":"string","enum":["manual","auto","disabled"]},"autoshare":{"type":"boolean"},"autoupdate":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["notify"]}],"description":"Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"},"disabled_providers":{"type":"array","items":{"type":"string"}},"enabled_providers":{"type":"array","items":{"type":"string"}},"remote_control":{"type":"boolean"},"auto_collapse_reasoning":{"type":"boolean"},"indexing":{"$ref":"#/components/schemas/IndexingConfig"},"console":{"type":"object","properties":{"context_sidebar_width":{"type":"integer","minimum":250,"maximum":800,"description":"Width of the Kilo Console project context sidebar in pixels"},"diff_style":{"type":"string","enum":["unified","split"]}},"additionalProperties":false},"terminal_command_display":{"type":"string","enum":["expanded","collapsed"]},"code_edit_display":{"type":"string","enum":["expanded","collapsed"]},"hide_prompt_training_models":{"type":"boolean"},"sandbox":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable sandbox confinement for new sessions (default: false)"},"network":{"type":"string","enum":["allow","deny"],"description":"Control outbound network access from sandboxed tools (default: deny)"},"writable_paths":{"type":"array","items":{"type":"string"},"description":"Additional filesystem paths that sandboxed tools may write to"},"allowed_hosts":{"type":"array","items":{"type":"string"},"description":"Exact network destinations sandboxed tools may access while network restriction is enabled"}},"additionalProperties":false,"description":"Sandbox configuration for agent tools"},"model":{"type":"string"},"small_model":{"type":"string"},"subagent_model":{"type":"string"},"subagent_variant":{"type":"string"},"subagent_variant_overrides":{"type":"object","additionalProperties":{"type":"string"}},"default_agent":{"type":"string"},"username":{"type":"string"},"mode":{"type":"object","properties":{"build":{"$ref":"#/components/schemas/AgentConfig"},"plan":{"$ref":"#/components/schemas/AgentConfig"}},"additionalProperties":{"$ref":"#/components/schemas/AgentConfig"}},"agent":{"type":"object","properties":{"plan":{"$ref":"#/components/schemas/AgentConfig"},"build":{"$ref":"#/components/schemas/AgentConfig"},"debug":{"$ref":"#/components/schemas/AgentConfig"},"orchestrator":{"$ref":"#/components/schemas/AgentConfig"},"ask":{"$ref":"#/components/schemas/AgentConfig"},"general":{"$ref":"#/components/schemas/AgentConfig"},"explore":{"$ref":"#/components/schemas/AgentConfig"},"scout":{"$ref":"#/components/schemas/AgentConfig"},"title":{"$ref":"#/components/schemas/AgentConfig"},"summary":{"$ref":"#/components/schemas/AgentConfig"},"compaction":{"$ref":"#/components/schemas/AgentConfig"}},"additionalProperties":{"$ref":"#/components/schemas/AgentConfig"}},"provider":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/ProviderConfig"},{"type":"null"}]}},"mcp":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/McpLocalConfig"},{"$ref":"#/components/schemas/McpRemoteConfig"},{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}]}},"formatter":{"anyOf":[{"type":"boolean"},{"type":"object","additionalProperties":{"type":"object","properties":{"disabled":{"type":"boolean"},"command":{"type":"array","items":{"type":"string"}},"environment":{"type":"object","additionalProperties":{"type":"string"}},"extensions":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}],"description":"Enable or configure formatters. Omit or set to false to disable, true to enable built-ins, or an object to enable built-ins with overrides."},"lsp":{"anyOf":[{"type":"boolean"},{"type":"object","additionalProperties":{"anyOf":[{"type":"object","properties":{"disabled":{"type":"boolean","enum":[true]}},"required":["disabled"],"additionalProperties":false},{"type":"object","properties":{"command":{"type":"array","items":{"type":"string"}},"extensions":{"type":"array","items":{"type":"string"}},"disabled":{"type":"boolean"},"env":{"type":"object","additionalProperties":{"type":"string"}},"initialization":{"type":"object"}},"required":["command"],"additionalProperties":false}]}}],"description":"Enable or configure LSP servers. Omit or set to false to disable, true to enable built-ins, or an object to enable built-ins with overrides."},"instructions":{"type":"array","items":{"type":"string"}},"layout":{"$ref":"#/components/schemas/LayoutConfig"},"permission":{"$ref":"#/components/schemas/PermissionConfig"},"tools":{"type":"object","additionalProperties":{"type":"boolean"}},"attachment":{"$ref":"#/components/schemas/AttachmentConfig"},"enterprise":{"type":"object","properties":{"url":{"type":"string"}},"additionalProperties":false},"commit_message":{"type":"object","properties":{"prompt":{"type":"string"}},"additionalProperties":false},"tool_output":{"type":"object","properties":{"max_lines":{"type":"integer","exclusiveMinimum":0},"max_bytes":{"type":"integer","exclusiveMinimum":0}},"additionalProperties":false},"compaction":{"type":"object","properties":{"auto":{"type":"boolean"},"threshold_percent":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}],"description":"Percentage of the model input/context window that triggers automatic compaction. The reserved safety buffer still applies if it would compact sooner."},"prune":{"type":"boolean"},"tail_turns":{"type":"integer","minimum":0},"preserve_recent_tokens":{"type":"integer","minimum":0},"reserved":{"type":"integer","minimum":0}},"additionalProperties":false},"experimental":{"type":"object","properties":{"disable_paste_summary":{"type":"boolean"},"batch_tool":{"type":"boolean"},"codebase_search":{"type":"boolean"},"image_generation":{"type":"boolean"},"image_generation_model":{"type":"string"},"agent_requirements":{"type":"boolean"},"native_notebook_tools":{"type":"boolean"},"speech_to_text_model":{"type":"string"},"openTelemetry":{"type":"boolean"},"primary_tools":{"type":"array","items":{"type":"string"}},"continue_loop_on_deny":{"type":"boolean"},"sandbox":{"type":"boolean"},"sandbox_restrict_network":{"type":"boolean"},"sandbox_writable_paths":{"type":"array","items":{"type":"string"}},"swe_pruner":{"type":"boolean"},"swe_pruner_model":{"type":"string"},"mcp_timeout":{"type":"integer","exclusiveMinimum":0},"policies":{"type":"array","items":{"$ref":"#/components/schemas/ConfigV2ExperimentalPolicy"}}},"additionalProperties":false}},"additionalProperties":false},"Model":{"type":"object","properties":{"id":{"type":"string"},"providerID":{"type":"string"},"api":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"npm":{"type":"string"}},"required":["id","url","npm"],"additionalProperties":false},"name":{"type":"string"},"family":{"type":"string"},"capabilities":{"type":"object","properties":{"temperature":{"type":"boolean"},"reasoning":{"type":"boolean"},"attachment":{"type":"boolean"},"toolcall":{"type":"boolean"},"input":{"type":"object","properties":{"text":{"type":"boolean"},"audio":{"type":"boolean"},"image":{"type":"boolean"},"video":{"type":"boolean"},"pdf":{"type":"boolean"}},"required":["text","audio","image","video","pdf"],"additionalProperties":false},"output":{"type":"object","properties":{"text":{"type":"boolean"},"audio":{"type":"boolean"},"image":{"type":"boolean"},"video":{"type":"boolean"},"pdf":{"type":"boolean"}},"required":["text","audio","image","video","pdf"],"additionalProperties":false},"interleaved":{"anyOf":[{"type":"boolean"},{"type":"object","properties":{"field":{"type":"string","enum":["reasoning","reasoning_content","reasoning_details"]}},"required":["field"],"additionalProperties":false}]}},"required":["temperature","reasoning","attachment","toolcall","input","output","interleaved"],"additionalProperties":false},"cost":{"type":"object","properties":{"input":{"type":"number"},"output":{"type":"number"},"cache":{"type":"object","properties":{"read":{"type":"number"},"write":{"type":"number"}},"required":["read","write"],"additionalProperties":false},"tiers":{"type":"array","items":{"type":"object","properties":{"input":{"type":"number"},"output":{"type":"number"},"cache":{"type":"object","properties":{"read":{"type":"number"},"write":{"type":"number"}},"required":["read","write"],"additionalProperties":false},"tier":{"type":"object","properties":{"type":{"type":"string","enum":["context"]},"size":{"type":"number"}},"required":["type","size"],"additionalProperties":false}},"required":["input","output","cache","tier"],"additionalProperties":false}},"experimentalOver200K":{"type":"object","properties":{"input":{"type":"number"},"output":{"type":"number"},"cache":{"type":"object","properties":{"read":{"type":"number"},"write":{"type":"number"}},"required":["read","write"],"additionalProperties":false}},"required":["input","output","cache"],"additionalProperties":false}},"required":["input","output","cache"],"additionalProperties":false},"limit":{"type":"object","properties":{"context":{"type":"number"},"input":{"type":"number"},"output":{"type":"number"}},"required":["context","output"],"additionalProperties":false},"status":{"type":"string","enum":["alpha","beta","deprecated","active"]},"options":{"type":"object"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"release_date":{"type":"string"},"variants":{"type":"object","additionalProperties":{"type":"object"}},"recommendedIndex":{"type":"number"},"prompt":{"type":"string","enum":["codex","gemini","beast","anthropic","trinity","anthropic_without_todo","ling","gpt55"]},"isFree":{"type":"boolean"},"mayTrainOnYourPrompts":{"type":"boolean"},"hasUserByokAvailable":{"type":"boolean"},"terminalBench":{"type":"object","properties":{"overallScore":{"type":"number"},"avgAttemptCostUsd":{"type":"number"}},"required":["overallScore","avgAttemptCostUsd"],"additionalProperties":false},"autoRouting":{"type":"object","properties":{"models":{"type":"array","items":{"type":"string"}}},"required":["models"],"additionalProperties":false},"ai_sdk_provider":{"type":"string","enum":["alibaba","anthropic","mistral","openai","openai-compatible","openrouter"]}},"required":["id","providerID","api","name","capabilities","cost","limit","status","options","headers","release_date"],"additionalProperties":false},"Provider":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"source":{"type":"string","enum":["env","config","custom","api"]},"env":{"type":"array","items":{"type":"string"}},"key":{"type":"string"},"metadata":{"type":"object","properties":{"noteKey":{"type":"string"},"icon":{"type":"string"},"priority":{"type":"integer"}},"additionalProperties":false},"options":{"type":"object"},"models":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Model"}}},"required":["id","name","source","env","options","models"],"additionalProperties":false},"ExperimentalCapabilities":{"type":"object","properties":{"backgroundSubagents":{"type":"boolean"}},"required":["backgroundSubagents"],"additionalProperties":false},"ConsoleState":{"type":"object","properties":{"consoleManagedProviders":{"type":"array","items":{"type":"string"}},"activeOrgName":{"type":"string"},"switchableOrgCount":{"type":"integer","minimum":0}},"required":["consoleManagedProviders","switchableOrgCount"],"additionalProperties":false},"effect_HttpApiError_InternalServerError":{"type":"object","properties":{"_tag":{"type":"string","enum":["InternalServerError"]}},"required":["_tag"],"additionalProperties":false},"ToolListItem":{"type":"object","properties":{"id":{"type":"string"},"description":{"type":"string"},"parameters":{}},"required":["id","description","parameters"],"additionalProperties":false},"ToolList":{"type":"array","items":{"$ref":"#/components/schemas/ToolListItem"}},"ToolIDs":{"type":"array","items":{"type":"string"}},"WorktreeListItem":{"type":"object","properties":{"directory":{"type":"string"},"managed":{"type":"boolean"}},"required":["directory","managed"],"additionalProperties":false},"WorktreeError":{"type":"object","properties":{"name":{"type":"string","enum":["WorktreeNotGitError","WorktreeNameGenerationFailedError","WorktreeCreateFailedError","WorktreeStartCommandFailedError","WorktreeRemoveFailedError","WorktreeResetFailedError","WorktreeListFailedError"]},"data":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"required":["name","data"],"additionalProperties":false},"WorktreeCreateInput":{"type":"object","properties":{"name":{"type":"string"},"startCommand":{"type":"string","description":"Additional startup script to run after the project's start command"}},"additionalProperties":false},"Worktree":{"type":"object","properties":{"name":{"type":"string"},"branch":{"type":"string"},"directory":{"type":"string"}},"required":["name","directory"],"additionalProperties":false},"WorktreeRemoveInput":{"type":"object","properties":{"directory":{"type":"string"}},"required":["directory"],"additionalProperties":false},"WorktreeResetInput":{"type":"object","properties":{"directory":{"type":"string"}},"required":["directory"],"additionalProperties":false},"WorktreeDiffItem":{"type":"object","properties":{"file":{"type":"string"},"patch":{"type":"string"},"additions":{"type":"number"},"deletions":{"type":"number"},"status":{"type":"string","enum":["added","deleted","modified"]},"before":{"type":"string"},"after":{"type":"string"},"tracked":{"type":"boolean"},"generatedLike":{"type":"boolean"},"summarized":{"type":"boolean"},"stamp":{"type":"string"}},"required":["additions","deletions","before","after","tracked","generatedLike","summarized","stamp"],"additionalProperties":false},"SnapshotSummaryFileDiff":{"type":"object","properties":{"file":{"type":"string"},"additions":{"type":"number"},"deletions":{"type":"number"},"status":{"type":"string","enum":["added","deleted","modified"]}},"required":["additions","deletions"],"additionalProperties":false},"ProjectSummary":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"worktree":{"type":"string"}},"required":["id","worktree"],"additionalProperties":false},"GlobalSession":{"type":"object","properties":{"id":{"type":"string","pattern":"^ses"},"slug":{"type":"string"},"projectID":{"type":"string"},"workspaceID":{"type":"string","pattern":"^wrk"},"directory":{"type":"string"},"path":{"type":"string"},"parentID":{"type":"string","pattern":"^ses"},"summary":{"type":"object","properties":{"additions":{"type":"number"},"deletions":{"type":"number"},"files":{"type":"number"},"diffs":{"type":"array","items":{"$ref":"#/components/schemas/SnapshotSummaryFileDiff"}}},"required":["additions","deletions","files"],"additionalProperties":false},"cost":{"type":"number"},"tokens":{"type":"object","properties":{"input":{"type":"number"},"output":{"type":"number"},"reasoning":{"type":"number"},"cache":{"type":"object","properties":{"read":{"type":"number"},"write":{"type":"number"}},"required":["read","write"],"additionalProperties":false}},"required":["input","output","reasoning","cache"],"additionalProperties":false},"share":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false},"title":{"type":"string"},"agent":{"type":"string"},"model":{"type":"object","properties":{"id":{"type":"string"},"providerID":{"type":"string"},"variant":{"type":"string"}},"required":["id","providerID"],"additionalProperties":false},"version":{"type":"string"},"metadata":{"type":"object"},"time":{"type":"object","properties":{"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0},"compacting":{"type":"integer","minimum":0},"archived":{"type":"number"}},"required":["created","updated"],"additionalProperties":false},"permission":{"$ref":"#/components/schemas/PermissionRuleset"},"revert":{"type":"object","properties":{"messageID":{"type":"string","pattern":"^msg"},"partID":{"type":"string","pattern":"^prt"},"snapshot":{"type":"string"},"diff":{"type":"string"},"workspace":{"type":"string","enum":["restored","snapshots-disabled","unavailable"]}},"required":["messageID"],"additionalProperties":false},"project":{"anyOf":[{"$ref":"#/components/schemas/ProjectSummary"},{"type":"null"}]},"worktreeName":{"type":"string"}},"required":["id","slug","projectID","directory","title","version","time","project"],"additionalProperties":false},"McpResource":{"type":"object","properties":{"name":{"type":"string"},"uri":{"type":"string"},"description":{"type":"string"},"mimeType":{"type":"string"},"client":{"type":"string"}},"required":["name","uri","client"],"additionalProperties":false},"Symbol":{"type":"object","properties":{"name":{"type":"string"},"kind":{"type":"integer","minimum":0},"location":{"type":"object","properties":{"uri":{"type":"string"},"range":{"$ref":"#/components/schemas/Range"}},"required":["uri","range"],"additionalProperties":false}},"required":["name","kind","location"],"additionalProperties":false},"FileNode":{"type":"object","properties":{"name":{"type":"string"},"path":{"type":"string"},"absolute":{"type":"string"},"type":{"type":"string","enum":["file","directory"]},"ignored":{"type":"boolean"}},"required":["name","path","absolute","type","ignored"],"additionalProperties":false},"FileContent":{"type":"object","properties":{"type":{"type":"string","enum":["text","binary"]},"content":{"type":"string"},"diff":{"type":"string"},"patch":{"type":"object","properties":{"oldFileName":{"type":"string"},"newFileName":{"type":"string"},"oldHeader":{"type":"string"},"newHeader":{"type":"string"},"hunks":{"type":"array","items":{"type":"object","properties":{"oldStart":{"type":"integer","minimum":0},"oldLines":{"type":"integer","minimum":0},"newStart":{"type":"integer","minimum":0},"newLines":{"type":"integer","minimum":0},"lines":{"type":"array","items":{"type":"string"}}},"required":["oldStart","oldLines","newStart","newLines","lines"],"additionalProperties":false}},"index":{"type":"string"}},"required":["oldFileName","newFileName","hunks"],"additionalProperties":false},"encoding":{"type":"string","enum":["base64"]},"mimeType":{"type":"string"}},"required":["type","content"],"additionalProperties":false},"File":{"type":"object","properties":{"path":{"type":"string"},"added":{"type":"integer","minimum":0},"removed":{"type":"integer","minimum":0},"status":{"type":"string","enum":["added","deleted","modified"]}},"required":["path","added","removed","status"],"additionalProperties":false},"Path":{"type":"object","properties":{"home":{"type":"string"},"state":{"type":"string"},"config":{"type":"string"},"worktree":{"type":"string"},"directory":{"type":"string"}},"required":["home","state","config","worktree","directory"],"additionalProperties":false},"VcsInfo":{"type":"object","properties":{"branch":{"type":"string"},"default_branch":{"type":"string"}},"additionalProperties":false},"VcsFileStatus":{"type":"object","properties":{"file":{"type":"string"},"additions":{"type":"number"},"deletions":{"type":"number"},"status":{"type":"string","enum":["added","deleted","modified"]}},"required":["file","additions","deletions","status"],"additionalProperties":false},"VcsFileDiff":{"type":"object","properties":{"file":{"type":"string"},"patch":{"type":"string"},"additions":{"type":"number"},"deletions":{"type":"number"},"status":{"type":"string","enum":["added","deleted","modified"]}},"required":["file","additions","deletions"],"additionalProperties":false},"VcsApplyError":{"type":"object","properties":{"name":{"type":"string","enum":["VcsApplyError"]},"data":{"type":"object","properties":{"message":{"type":"string"},"reason":{"type":"string","enum":["non-git","not-clean"]}},"required":["message","reason"],"additionalProperties":false}},"required":["name","data"],"additionalProperties":false},"Command":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"agent":{"type":"string"},"model":{"type":"string"},"source":{"type":"string","enum":["command","mcp","skill"]},"template":{"type":"string"},"subtask":{"type":"boolean"},"hints":{"type":"array","items":{"type":"string"}}},"required":["name","template","hints"],"additionalProperties":false},"Agent":{"type":"object","properties":{"name":{"type":"string"},"displayName":{"type":"string"},"source":{"type":"string"},"description":{"type":"string"},"deprecated":{"type":"boolean"},"mode":{"type":"string","enum":["subagent","primary","all"]},"native":{"type":"boolean"},"hidden":{"type":"boolean"},"topP":{"type":"number"},"temperature":{"type":"number"},"color":{"type":"string"},"permission":{"$ref":"#/components/schemas/PermissionRuleset"},"model":{"type":"object","properties":{"modelID":{"type":"string"},"providerID":{"type":"string"}},"required":["modelID","providerID"],"additionalProperties":false},"variant":{"type":"string"},"prompt":{"type":"string"},"options":{"type":"object"},"requirements":{"type":"object","properties":{"skills":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"pattern":"\\S"},"minItems":1,"maxItems":20},"mcps":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"pattern":"\\S"},"minItems":1,"maxItems":20},"vscode_extensions":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128,"pattern":"\\S"},"id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$"}},"required":["name","id"],"additionalProperties":false},"minItems":1,"maxItems":20}},"additionalProperties":false},"steps":{"type":"number"}},"required":["name","mode","permission","options"],"additionalProperties":false},"LSPStatus":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"root":{"type":"string"},"status":{"type":"string","enum":["connected","error"]}},"required":["id","name","root","status"],"additionalProperties":false},"FormatterStatus":{"type":"object","properties":{"name":{"type":"string"},"extensions":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"}},"required":["name","extensions","enabled"],"additionalProperties":false},"MCPStatusConnected":{"type":"object","properties":{"status":{"type":"string","enum":["connected"]}},"required":["status"],"additionalProperties":false},"MCPStatusDisabled":{"type":"object","properties":{"status":{"type":"string","enum":["disabled"]}},"required":["status"],"additionalProperties":false},"MCPStatusFailed":{"type":"object","properties":{"status":{"type":"string","enum":["failed"]},"error":{"type":"string"}},"required":["status","error"],"additionalProperties":false},"MCPStatusNeedsAuth":{"type":"object","properties":{"status":{"type":"string","enum":["needs_auth"]}},"required":["status"],"additionalProperties":false},"MCPStatusNeedsClientRegistration":{"type":"object","properties":{"status":{"type":"string","enum":["needs_client_registration"]},"error":{"type":"string"}},"required":["status","error"],"additionalProperties":false},"MCPStatus":{"anyOf":[{"$ref":"#/components/schemas/MCPStatusConnected"},{"$ref":"#/components/schemas/MCPStatusDisabled"},{"$ref":"#/components/schemas/MCPStatusFailed"},{"$ref":"#/components/schemas/MCPStatusNeedsAuth"},{"$ref":"#/components/schemas/MCPStatusNeedsClientRegistration"}]},"McpUnsupportedOAuthError":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false},"McpServerNotFoundError":{"type":"object","properties":{"_tag":{"type":"string","enum":["McpServerNotFoundError"]},"name":{"type":"string"},"message":{"type":"string"}},"required":["_tag","name","message"],"additionalProperties":false},"Project":{"type":"object","properties":{"id":{"type":"string"},"worktree":{"type":"string"},"vcs":{"$ref":"#/components/schemas/ProjectVcs"},"name":{"type":"string"},"icon":{"$ref":"#/components/schemas/ProjectIcon"},"commands":{"$ref":"#/components/schemas/ProjectCommands"},"time":{"$ref":"#/components/schemas/ProjectTime"},"sandboxes":{"type":"array","items":{"type":"string"}}},"required":["id","worktree","time","sandboxes"],"additionalProperties":false},"ProjectNotFoundError":{"type":"object","properties":{"_tag":{"type":"string","enum":["ProjectNotFoundError"]},"projectID":{"type":"string"},"message":{"type":"string"}},"required":["_tag","projectID","message"],"additionalProperties":false},"PtyNotFoundError":{"type":"object","properties":{"_tag":{"type":"string","enum":["PtyNotFoundError"]},"ptyID":{"type":"string"},"message":{"type":"string"}},"required":["_tag","ptyID","message"],"additionalProperties":false},"PtyForbiddenError":{"type":"object","properties":{"_tag":{"type":"string","enum":["PtyForbiddenError"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"QuestionRequest":{"type":"object","properties":{"id":{"type":"string","pattern":"^que"},"sessionID":{"type":"string","pattern":"^ses"},"questions":{"type":"array","items":{"$ref":"#/components/schemas/QuestionInfo"},"description":"Questions to ask"},"blocking":{"type":"boolean"},"tool":{"$ref":"#/components/schemas/QuestionTool"}},"required":["id","sessionID","questions"],"additionalProperties":false},"QuestionNotFoundError":{"type":"object","properties":{"_tag":{"type":"string","enum":["QuestionNotFoundError"]},"requestID":{"type":"string"},"message":{"type":"string"}},"required":["_tag","requestID","message"],"additionalProperties":false},"PermissionRequest":{"type":"object","properties":{"id":{"type":"string","pattern":"^per"},"sessionID":{"type":"string","pattern":"^ses"},"permission":{"type":"string"},"patterns":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object"},"always":{"type":"array","items":{"type":"string"}},"tool":{"type":"object","properties":{"messageID":{"type":"string"},"callID":{"type":"string"}},"required":["messageID","callID"],"additionalProperties":false}},"required":["id","sessionID","permission","patterns","metadata","always"],"additionalProperties":false},"PermissionNotFoundError":{"type":"object","properties":{"_tag":{"type":"string","enum":["PermissionNotFoundError"]},"requestID":{"type":"string"},"message":{"type":"string"}},"required":["_tag","requestID","message"],"additionalProperties":false},"ProviderAuthMethod":{"type":"object","properties":{"type":{"type":"string","enum":["oauth","api"]},"label":{"type":"string"},"prompts":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"key":{"type":"string"},"message":{"type":"string"},"placeholder":{"type":"string"},"when":{"type":"object","properties":{"key":{"type":"string"},"op":{"type":"string","enum":["eq","neq"]},"value":{"type":"string"}},"required":["key","op","value"],"additionalProperties":false}},"required":["type","key","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["select"]},"key":{"type":"string"},"message":{"type":"string"},"options":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"},"hint":{"type":"string"}},"required":["label","value"],"additionalProperties":false}},"when":{"type":"object","properties":{"key":{"type":"string"},"op":{"type":"string","enum":["eq","neq"]},"value":{"type":"string"}},"required":["key","op","value"],"additionalProperties":false}},"required":["type","key","message","options"],"additionalProperties":false}]}}},"required":["type","label"],"additionalProperties":false},"ProviderAuthAuthorization":{"type":"object","properties":{"url":{"type":"string"},"method":{"type":"string","enum":["auto","code"]},"instructions":{"type":"string"}},"required":["url","method","instructions"],"additionalProperties":false},"ProviderAuthError1":{"type":"object","properties":{"name":{"type":"string","enum":["BadRequest","ProviderAuthOauthMissing","ProviderAuthOauthCodeMissing","ProviderAuthOauthCallbackFailed","ProviderAuthValidationFailed"]},"data":{"type":"object","properties":{"providerID":{"type":"string"},"field":{"type":"string"},"message":{"type":"string"},"kind":{"type":"string"}},"additionalProperties":false}},"required":["name","data"],"additionalProperties":false},"Session1":{"type":"object","properties":{"id":{"type":"string","pattern":"^ses"},"slug":{"type":"string"},"projectID":{"type":"string"},"workspaceID":{"type":"string","pattern":"^wrk"},"directory":{"type":"string"},"path":{"type":"string"},"parentID":{"type":"string","pattern":"^ses"},"summary":{"type":"object","properties":{"additions":{"type":"number"},"deletions":{"type":"number"},"files":{"type":"number"},"diffs":{"type":"array","items":{"$ref":"#/components/schemas/SnapshotSummaryFileDiff"}}},"required":["additions","deletions","files"],"additionalProperties":false},"cost":{"type":"number"},"tokens":{"type":"object","properties":{"input":{"type":"number"},"output":{"type":"number"},"reasoning":{"type":"number"},"cache":{"type":"object","properties":{"read":{"type":"number"},"write":{"type":"number"}},"required":["read","write"],"additionalProperties":false}},"required":["input","output","reasoning","cache"],"additionalProperties":false},"share":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false},"title":{"type":"string"},"agent":{"type":"string"},"model":{"type":"object","properties":{"id":{"type":"string"},"providerID":{"type":"string"},"variant":{"type":"string"}},"required":["id","providerID"],"additionalProperties":false},"version":{"type":"string"},"metadata":{"type":"object"},"time":{"type":"object","properties":{"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0},"compacting":{"type":"integer","minimum":0},"archived":{"type":"number"}},"required":["created","updated"],"additionalProperties":false},"permission":{"$ref":"#/components/schemas/PermissionRuleset"},"revert":{"type":"object","properties":{"messageID":{"type":"string","pattern":"^msg"},"partID":{"type":"string","pattern":"^prt"},"snapshot":{"type":"string"},"diff":{"type":"string"},"workspace":{"type":"string","enum":["restored","snapshots-disabled","unavailable"]}},"required":["messageID"],"additionalProperties":false}},"required":["id","slug","projectID","directory","title","version","time"],"additionalProperties":false},"Session2":{"type":"object","properties":{"id":{"type":"string","pattern":"^ses"},"slug":{"type":"string"},"projectID":{"type":"string"},"workspaceID":{"type":"string","pattern":"^wrk"},"directory":{"type":"string"},"path":{"type":"string"},"parentID":{"type":"string","pattern":"^ses"},"summary":{"type":"object","properties":{"additions":{"type":"number"},"deletions":{"type":"number"},"files":{"type":"number"},"diffs":{"type":"array","items":{"$ref":"#/components/schemas/SnapshotSummaryFileDiff"}}},"required":["additions","deletions","files"],"additionalProperties":false},"cost":{"type":"number"},"tokens":{"type":"object","properties":{"input":{"type":"number"},"output":{"type":"number"},"reasoning":{"type":"number"},"cache":{"type":"object","properties":{"read":{"type":"number"},"write":{"type":"number"}},"required":["read","write"],"additionalProperties":false}},"required":["input","output","reasoning","cache"],"additionalProperties":false},"share":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false},"title":{"type":"string"},"agent":{"type":"string"},"model":{"type":"object","properties":{"id":{"type":"string"},"providerID":{"type":"string"},"variant":{"type":"string"}},"required":["id","providerID"],"additionalProperties":false},"version":{"type":"string"},"metadata":{"type":"object"},"time":{"type":"object","properties":{"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0},"compacting":{"type":"integer","minimum":0},"archived":{"type":"number"}},"required":["created","updated"],"additionalProperties":false},"permission":{"$ref":"#/components/schemas/PermissionRuleset"},"revert":{"type":"object","properties":{"messageID":{"type":"string","pattern":"^msg"},"partID":{"type":"string","pattern":"^prt"},"snapshot":{"type":"string"},"diff":{"type":"string"},"workspace":{"type":"string","enum":["restored","snapshots-disabled","unavailable"]}},"required":["messageID"],"additionalProperties":false}},"required":["id","slug","projectID","directory","title","version","time"],"additionalProperties":false},"NotFoundError":{"type":"object","required":["name","data"],"properties":{"name":{"type":"string","enum":["NotFoundError"]},"data":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}},"Session3":{"type":"object","properties":{"id":{"type":"string","pattern":"^ses"},"slug":{"type":"string"},"projectID":{"type":"string"},"workspaceID":{"type":"string","pattern":"^wrk"},"directory":{"type":"string"},"path":{"type":"string"},"parentID":{"type":"string","pattern":"^ses"},"summary":{"type":"object","properties":{"additions":{"type":"number"},"deletions":{"type":"number"},"files":{"type":"number"},"diffs":{"type":"array","items":{"$ref":"#/components/schemas/SnapshotSummaryFileDiff"}}},"required":["additions","deletions","files"],"additionalProperties":false},"cost":{"type":"number"},"tokens":{"type":"object","properties":{"input":{"type":"number"},"output":{"type":"number"},"reasoning":{"type":"number"},"cache":{"type":"object","properties":{"read":{"type":"number"},"write":{"type":"number"}},"required":["read","write"],"additionalProperties":false}},"required":["input","output","reasoning","cache"],"additionalProperties":false},"share":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false},"title":{"type":"string"},"agent":{"type":"string"},"model":{"type":"object","properties":{"id":{"type":"string"},"providerID":{"type":"string"},"variant":{"type":"string"}},"required":["id","providerID"],"additionalProperties":false},"version":{"type":"string"},"metadata":{"type":"object"},"time":{"type":"object","properties":{"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0},"compacting":{"type":"integer","minimum":0},"archived":{"type":"number"}},"required":["created","updated"],"additionalProperties":false},"permission":{"$ref":"#/components/schemas/PermissionRuleset"},"revert":{"type":"object","properties":{"messageID":{"type":"string","pattern":"^msg"},"partID":{"type":"string","pattern":"^prt"},"snapshot":{"type":"string"},"diff":{"type":"string"},"workspace":{"type":"string","enum":["restored","snapshots-disabled","unavailable"]}},"required":["messageID"],"additionalProperties":false}},"required":["id","slug","projectID","directory","title","version","time"],"additionalProperties":false},"Session4":{"type":"object","properties":{"id":{"type":"string","pattern":"^ses"},"slug":{"type":"string"},"projectID":{"type":"string"},"workspaceID":{"type":"string","pattern":"^wrk"},"directory":{"type":"string"},"path":{"type":"string"},"parentID":{"type":"string","pattern":"^ses"},"summary":{"type":"object","properties":{"additions":{"type":"number"},"deletions":{"type":"number"},"files":{"type":"number"},"diffs":{"type":"array","items":{"$ref":"#/components/schemas/SnapshotSummaryFileDiff"}}},"required":["additions","deletions","files"],"additionalProperties":false},"cost":{"type":"number"},"tokens":{"type":"object","properties":{"input":{"type":"number"},"output":{"type":"number"},"reasoning":{"type":"number"},"cache":{"type":"object","properties":{"read":{"type":"number"},"write":{"type":"number"}},"required":["read","write"],"additionalProperties":false}},"required":["input","output","reasoning","cache"],"additionalProperties":false},"share":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false},"title":{"type":"string"},"agent":{"type":"string"},"model":{"type":"object","properties":{"id":{"type":"string"},"providerID":{"type":"string"},"variant":{"type":"string"}},"required":["id","providerID"],"additionalProperties":false},"version":{"type":"string"},"metadata":{"type":"object"},"time":{"type":"object","properties":{"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0},"compacting":{"type":"integer","minimum":0},"archived":{"type":"number"}},"required":["created","updated"],"additionalProperties":false},"permission":{"$ref":"#/components/schemas/PermissionRuleset"},"revert":{"type":"object","properties":{"messageID":{"type":"string","pattern":"^msg"},"partID":{"type":"string","pattern":"^prt"},"snapshot":{"type":"string"},"diff":{"type":"string"},"workspace":{"type":"string","enum":["restored","snapshots-disabled","unavailable"]}},"required":["messageID"],"additionalProperties":false}},"required":["id","slug","projectID","directory","title","version","time"],"additionalProperties":false},"Session5":{"type":"object","properties":{"id":{"type":"string","pattern":"^ses"},"slug":{"type":"string"},"projectID":{"type":"string"},"workspaceID":{"type":"string","pattern":"^wrk"},"directory":{"type":"string"},"path":{"type":"string"},"parentID":{"type":"string","pattern":"^ses"},"summary":{"type":"object","properties":{"additions":{"type":"number"},"deletions":{"type":"number"},"files":{"type":"number"},"diffs":{"type":"array","items":{"$ref":"#/components/schemas/SnapshotSummaryFileDiff"}}},"required":["additions","deletions","files"],"additionalProperties":false},"cost":{"type":"number"},"tokens":{"type":"object","properties":{"input":{"type":"number"},"output":{"type":"number"},"reasoning":{"type":"number"},"cache":{"type":"object","properties":{"read":{"type":"number"},"write":{"type":"number"}},"required":["read","write"],"additionalProperties":false}},"required":["input","output","reasoning","cache"],"additionalProperties":false},"share":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false},"title":{"type":"string"},"agent":{"type":"string"},"model":{"type":"object","properties":{"id":{"type":"string"},"providerID":{"type":"string"},"variant":{"type":"string"}},"required":["id","providerID"],"additionalProperties":false},"version":{"type":"string"},"metadata":{"type":"object"},"time":{"type":"object","properties":{"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0},"compacting":{"type":"integer","minimum":0},"archived":{"type":"number"}},"required":["created","updated"],"additionalProperties":false},"permission":{"$ref":"#/components/schemas/PermissionRuleset"},"revert":{"type":"object","properties":{"messageID":{"type":"string","pattern":"^msg"},"partID":{"type":"string","pattern":"^prt"},"snapshot":{"type":"string"},"diff":{"type":"string"},"workspace":{"type":"string","enum":["restored","snapshots-disabled","unavailable"]}},"required":["messageID"],"additionalProperties":false}},"required":["id","slug","projectID","directory","title","version","time"],"additionalProperties":false},"Session6":{"type":"object","properties":{"id":{"type":"string","pattern":"^ses"},"slug":{"type":"string"},"projectID":{"type":"string"},"workspaceID":{"type":"string","pattern":"^wrk"},"directory":{"type":"string"},"path":{"type":"string"},"parentID":{"type":"string","pattern":"^ses"},"summary":{"type":"object","properties":{"additions":{"type":"number"},"deletions":{"type":"number"},"files":{"type":"number"},"diffs":{"type":"array","items":{"$ref":"#/components/schemas/SnapshotSummaryFileDiff"}}},"required":["additions","deletions","files"],"additionalProperties":false},"cost":{"type":"number"},"tokens":{"type":"object","properties":{"input":{"type":"number"},"output":{"type":"number"},"reasoning":{"type":"number"},"cache":{"type":"object","properties":{"read":{"type":"number"},"write":{"type":"number"}},"required":["read","write"],"additionalProperties":false}},"required":["input","output","reasoning","cache"],"additionalProperties":false},"share":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false},"title":{"type":"string"},"agent":{"type":"string"},"model":{"type":"object","properties":{"id":{"type":"string"},"providerID":{"type":"string"},"variant":{"type":"string"}},"required":["id","providerID"],"additionalProperties":false},"version":{"type":"string"},"metadata":{"type":"object"},"time":{"type":"object","properties":{"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0},"compacting":{"type":"integer","minimum":0},"archived":{"type":"number"}},"required":["created","updated"],"additionalProperties":false},"permission":{"$ref":"#/components/schemas/PermissionRuleset"},"revert":{"type":"object","properties":{"messageID":{"type":"string","pattern":"^msg"},"partID":{"type":"string","pattern":"^prt"},"snapshot":{"type":"string"},"diff":{"type":"string"},"workspace":{"type":"string","enum":["restored","snapshots-disabled","unavailable"]}},"required":["messageID"],"additionalProperties":false}},"required":["id","slug","projectID","directory","title","version","time"],"additionalProperties":false},"Session7":{"type":"object","properties":{"id":{"type":"string","pattern":"^ses"},"slug":{"type":"string"},"projectID":{"type":"string"},"workspaceID":{"type":"string","pattern":"^wrk"},"directory":{"type":"string"},"path":{"type":"string"},"parentID":{"type":"string","pattern":"^ses"},"summary":{"type":"object","properties":{"additions":{"type":"number"},"deletions":{"type":"number"},"files":{"type":"number"},"diffs":{"type":"array","items":{"$ref":"#/components/schemas/SnapshotSummaryFileDiff"}}},"required":["additions","deletions","files"],"additionalProperties":false},"cost":{"type":"number"},"tokens":{"type":"object","properties":{"input":{"type":"number"},"output":{"type":"number"},"reasoning":{"type":"number"},"cache":{"type":"object","properties":{"read":{"type":"number"},"write":{"type":"number"}},"required":["read","write"],"additionalProperties":false}},"required":["input","output","reasoning","cache"],"additionalProperties":false},"share":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false},"title":{"type":"string"},"agent":{"type":"string"},"model":{"type":"object","properties":{"id":{"type":"string"},"providerID":{"type":"string"},"variant":{"type":"string"}},"required":["id","providerID"],"additionalProperties":false},"version":{"type":"string"},"metadata":{"type":"object"},"time":{"type":"object","properties":{"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0},"compacting":{"type":"integer","minimum":0},"archived":{"type":"number"}},"required":["created","updated"],"additionalProperties":false},"permission":{"$ref":"#/components/schemas/PermissionRuleset"},"revert":{"type":"object","properties":{"messageID":{"type":"string","pattern":"^msg"},"partID":{"type":"string","pattern":"^prt"},"snapshot":{"type":"string"},"diff":{"type":"string"},"workspace":{"type":"string","enum":["restored","snapshots-disabled","unavailable"]}},"required":["messageID"],"additionalProperties":false}},"required":["id","slug","projectID","directory","title","version","time"],"additionalProperties":false},"TextPartInput":{"type":"object","properties":{"id":{"type":"string","pattern":"^prt"},"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"synthetic":{"type":"boolean"},"ignored":{"type":"boolean"},"time":{"type":"object","properties":{"start":{"type":"integer","minimum":0},"end":{"type":"integer","minimum":0}},"required":["start"],"additionalProperties":false},"metadata":{"type":"object"}},"required":["type","text"],"additionalProperties":false},"FilePartInput":{"type":"object","properties":{"id":{"type":"string","pattern":"^prt"},"type":{"type":"string","enum":["file"]},"mime":{"type":"string"},"filename":{"type":"string"},"url":{"type":"string"},"source":{"$ref":"#/components/schemas/FilePartSource"}},"required":["type","mime","url"],"additionalProperties":false},"AgentPartInput":{"type":"object","properties":{"id":{"type":"string","pattern":"^prt"},"type":{"type":"string","enum":["agent"]},"name":{"type":"string"},"source":{"type":"object","properties":{"value":{"type":"string"},"start":{"type":"integer","minimum":0},"end":{"type":"integer","minimum":0}},"required":["value","start","end"],"additionalProperties":false}},"required":["type","name"],"additionalProperties":false},"SubtaskPartInput":{"type":"object","properties":{"id":{"type":"string","pattern":"^prt"},"type":{"type":"string","enum":["subtask"]},"prompt":{"type":"string"},"description":{"type":"string"},"agent":{"type":"string"},"model":{"type":"object","properties":{"providerID":{"type":"string"},"modelID":{"type":"string"}},"required":["providerID","modelID"],"additionalProperties":false},"command":{"type":"string"}},"required":["type","prompt","description","agent"],"additionalProperties":false},"SessionBusyError":{"type":"object","properties":{"_tag":{"type":"string","enum":["SessionBusyError"]},"sessionID":{"type":"string"},"message":{"type":"string"}},"required":["_tag","sessionID","message"],"additionalProperties":false},"Session8":{"type":"object","properties":{"id":{"type":"string","pattern":"^ses"},"slug":{"type":"string"},"projectID":{"type":"string"},"workspaceID":{"type":"string","pattern":"^wrk"},"directory":{"type":"string"},"path":{"type":"string"},"parentID":{"type":"string","pattern":"^ses"},"summary":{"type":"object","properties":{"additions":{"type":"number"},"deletions":{"type":"number"},"files":{"type":"number"},"diffs":{"type":"array","items":{"$ref":"#/components/schemas/SnapshotSummaryFileDiff"}}},"required":["additions","deletions","files"],"additionalProperties":false},"cost":{"type":"number"},"tokens":{"type":"object","properties":{"input":{"type":"number"},"output":{"type":"number"},"reasoning":{"type":"number"},"cache":{"type":"object","properties":{"read":{"type":"number"},"write":{"type":"number"}},"required":["read","write"],"additionalProperties":false}},"required":["input","output","reasoning","cache"],"additionalProperties":false},"share":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false},"title":{"type":"string"},"agent":{"type":"string"},"model":{"type":"object","properties":{"id":{"type":"string"},"providerID":{"type":"string"},"variant":{"type":"string"}},"required":["id","providerID"],"additionalProperties":false},"version":{"type":"string"},"metadata":{"type":"object"},"time":{"type":"object","properties":{"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0},"compacting":{"type":"integer","minimum":0},"archived":{"type":"number"}},"required":["created","updated"],"additionalProperties":false},"permission":{"$ref":"#/components/schemas/PermissionRuleset"},"revert":{"type":"object","properties":{"messageID":{"type":"string","pattern":"^msg"},"partID":{"type":"string","pattern":"^prt"},"snapshot":{"type":"string"},"diff":{"type":"string"},"workspace":{"type":"string","enum":["restored","snapshots-disabled","unavailable"]}},"required":["messageID"],"additionalProperties":false}},"required":["id","slug","projectID","directory","title","version","time"],"additionalProperties":false},"Session9":{"type":"object","properties":{"id":{"type":"string","pattern":"^ses"},"slug":{"type":"string"},"projectID":{"type":"string"},"workspaceID":{"type":"string","pattern":"^wrk"},"directory":{"type":"string"},"path":{"type":"string"},"parentID":{"type":"string","pattern":"^ses"},"summary":{"type":"object","properties":{"additions":{"type":"number"},"deletions":{"type":"number"},"files":{"type":"number"},"diffs":{"type":"array","items":{"$ref":"#/components/schemas/SnapshotSummaryFileDiff"}}},"required":["additions","deletions","files"],"additionalProperties":false},"cost":{"type":"number"},"tokens":{"type":"object","properties":{"input":{"type":"number"},"output":{"type":"number"},"reasoning":{"type":"number"},"cache":{"type":"object","properties":{"read":{"type":"number"},"write":{"type":"number"}},"required":["read","write"],"additionalProperties":false}},"required":["input","output","reasoning","cache"],"additionalProperties":false},"share":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false},"title":{"type":"string"},"agent":{"type":"string"},"model":{"type":"object","properties":{"id":{"type":"string"},"providerID":{"type":"string"},"variant":{"type":"string"}},"required":["id","providerID"],"additionalProperties":false},"version":{"type":"string"},"metadata":{"type":"object"},"time":{"type":"object","properties":{"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0},"compacting":{"type":"integer","minimum":0},"archived":{"type":"number"}},"required":["created","updated"],"additionalProperties":false},"permission":{"$ref":"#/components/schemas/PermissionRuleset"},"revert":{"type":"object","properties":{"messageID":{"type":"string","pattern":"^msg"},"partID":{"type":"string","pattern":"^prt"},"snapshot":{"type":"string"},"diff":{"type":"string"},"workspace":{"type":"string","enum":["restored","snapshots-disabled","unavailable"]}},"required":["messageID"],"additionalProperties":false}},"required":["id","slug","projectID","directory","title","version","time"],"additionalProperties":false},"EventTuiPromptAppend":{"type":"object","properties":{"type":{"type":"string","enum":["tui.prompt.append"]},"properties":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"],"additionalProperties":false}},"required":["type","properties"],"additionalProperties":false},"EventTuiCommandExecute":{"type":"object","properties":{"type":{"type":"string","enum":["tui.command.execute"]},"properties":{"type":"object","properties":{"command":{"anyOf":[{"type":"string","enum":["session.list","session.new","session.share","session.interrupt","session.compact","session.page.up","session.page.down","session.line.up","session.line.down","session.half.page.up","session.half.page.down","session.first","session.last","prompt.clear","prompt.submit","agent.cycle"]},{"type":"string"}]}},"required":["command"],"additionalProperties":false}},"required":["type","properties"],"additionalProperties":false},"EventTuiToastShow":{"type":"object","properties":{"type":{"type":"string","enum":["tui.toast.show"]},"properties":{"type":"object","properties":{"title":{"type":"string"},"message":{"type":"string"},"variant":{"type":"string","enum":["info","success","warning","error"]},"duration":{"type":"integer","exclusiveMinimum":0}},"required":["message","variant"],"additionalProperties":false}},"required":["type","properties"],"additionalProperties":false},"EventTuiSessionSelect":{"type":"object","properties":{"type":{"type":"string","enum":["tui.session.select"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses","description":"Session ID to navigate to"}},"required":["sessionID"],"additionalProperties":false}},"required":["type","properties"],"additionalProperties":false},"Workspace":{"type":"object","properties":{"id":{"type":"string","pattern":"^wrk"},"type":{"type":"string"},"name":{"type":"string"},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"directory":{"anyOf":[{"type":"string"},{"type":"null"}]},"extra":{"anyOf":[{},{"type":"null"}]},"projectID":{"type":"string"},"timeUsed":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["id","type","name","projectID","timeUsed"],"additionalProperties":false},"WorkspaceCreateError":{"type":"object","properties":{"name":{"type":"string","enum":["WorkspaceCreateError"]},"data":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"required":["name","data"],"additionalProperties":false},"WorkspaceWarpError":{"type":"object","properties":{"name":{"type":"string","enum":["WorkspaceWarpError"]},"data":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"required":["name","data"],"additionalProperties":false},"BackgroundProcessLogs":{"type":"object","properties":{"id":{"type":"string"},"sessionID":{"type":"string","pattern":"^ses"},"output":{"type":"string"}},"required":["id","sessionID","output"],"additionalProperties":false},"CommitMessageNoChangesError":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false},"ConfigOverlayResponse":{"type":"object","properties":{"scope":{"type":"string","enum":["global","project"]},"effective":{"$ref":"#/components/schemas/Config"},"global":{"$ref":"#/components/schemas/Config"},"project":{"$ref":"#/components/schemas/Config"},"sources":{"type":"array","items":{"type":"object","properties":{"order":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"kind":{"type":"string"},"scope":{"type":"string"},"label":{"type":"string"},"source":{"type":"string"},"path":{"type":"string"},"exists":{"type":"boolean"},"editable":{"type":"boolean"},"reason":{"type":"string"}},"required":["order","kind","scope","label","source","exists","editable"],"additionalProperties":false}},"targets":{"type":"object","properties":{"global":{"type":"string"},"project":{"type":"string"},"active":{"type":"string"}},"additionalProperties":false},"fields":{"type":"object","additionalProperties":{"type":"object","properties":{"key":{"type":"string"},"path":{"type":"array","items":{"type":"string"}},"value":{},"global":{},"local":{},"source":{"type":"string","enum":["project","global","system","default"]},"inherited":{"type":"boolean"},"overridden":{"type":"boolean"},"editable":{"type":"boolean"},"reason":{"type":"string"}},"required":["key","path","source","inherited","overridden","editable"],"additionalProperties":false}},"collections":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"path":{"type":"array","items":{"type":"string"}},"value":{},"global":{},"local":{},"source":{"type":"string","enum":["project","global","system","default"]},"inherited":{"type":"boolean"},"overridden":{"type":"boolean"},"editable":{"type":"boolean"},"reason":{"type":"string"}},"required":["key","path","source","inherited","overridden","editable"],"additionalProperties":false}}}},"required":["scope","effective","global","project","sources","targets","fields","collections"],"additionalProperties":false},"ConfigSourcesResponse":{"type":"object","properties":{"sources":{"type":"array","items":{"type":"object","properties":{"order":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"kind":{"type":"string"},"scope":{"type":"string"},"label":{"type":"string"},"source":{"type":"string"},"path":{"type":"string"},"exists":{"type":"boolean"},"editable":{"type":"boolean"},"reason":{"type":"string"}},"required":["order","kind","scope","label","source","exists","editable"],"additionalProperties":false}}},"required":["sources"],"additionalProperties":false},"ConfigRulesResponse":{"type":"object","properties":{"scope":{"type":"string","enum":["project"]},"target":{"type":"string"},"files":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"path":{"type":"string"},"exists":{"type":"boolean"},"editable":{"type":"boolean"},"content":{"type":"string"}},"required":["name","path","exists","editable","content"],"additionalProperties":false}}},"required":["scope","target","files"],"additionalProperties":false},"ConfigModelStateResponse":{"type":"object","properties":{"model":{"type":"object","additionalProperties":{"type":"object","properties":{"providerID":{"type":"string"},"modelID":{"type":"string"}},"required":["providerID","modelID"],"additionalProperties":false}},"recent":{"type":"array","items":{"type":"object","properties":{"providerID":{"type":"string"},"modelID":{"type":"string"}},"required":["providerID","modelID"],"additionalProperties":false}},"favorite":{"type":"array","items":{"type":"object","properties":{"providerID":{"type":"string"},"modelID":{"type":"string"}},"required":["providerID","modelID"],"additionalProperties":false}},"variant":{"type":"object","additionalProperties":{"type":"string"}}},"required":["model","recent","favorite","variant"],"additionalProperties":false},"TuiConfigGetResponse":{"type":"object","properties":{"$schema":{"type":"string"},"theme":{"type":"string"},"keybinds":{"type":"object","additionalProperties":{"type":"string"}},"plugin":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"array","prefixItems":[{"type":"string"},{"type":"object"}],"maxItems":2,"minItems":2}]}},"plugin_enabled":{"type":"object","additionalProperties":{"type":"boolean"}},"title_icon":{"type":"string","enum":["none","unicode","emojis"],"description":"Status icon style shown in terminal titles"},"scroll_speed":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"scroll_acceleration":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"diff_style":{"type":"string","enum":["auto","stacked"]},"mouse":{"type":"boolean"},"attention":{"type":"object","properties":{"enabled":{"type":"boolean"},"notifications":{"type":"boolean"},"sound":{"type":"boolean"},"volume":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"additionalProperties":false}},"additionalProperties":false},"TuiKeybindInfo":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"group":{"type":"string"},"default":{"type":"string"},"description":{"type":"string"}},"required":["id","label","group","default","description"],"additionalProperties":false},"TuiKeybindListResponse":{"type":"object","properties":{"keybinds":{"type":"array","items":{"$ref":"#/components/schemas/TuiKeybindInfo"}}},"required":["keybinds"],"additionalProperties":false},"KiloEmbeddingModelCatalog":{"type":"object","properties":{"defaultModel":{"type":"string"},"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"dimension":{"type":"integer","exclusiveMinimum":0},"scoreThreshold":{"type":"number","minimum":0,"maximum":1},"note":{"type":"string"}},"required":["id","name","dimension","scoreThreshold"],"additionalProperties":false}},"aliases":{"type":"object","additionalProperties":{"type":"string"}}},"required":["defaultModel","models","aliases"],"additionalProperties":false},"ConflictError":{"type":"object","properties":{"_tag":{"type":"string","enum":["ConflictError"]},"message":{"type":"string"},"resource":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"InteractiveTerminalSnapshot":{"type":"object","properties":{"info":{"$ref":"#/components/schemas/InteractiveTerminalInfo"},"output":{"type":"string"},"cursor":{"type":"integer","minimum":0}},"required":["info","output","cursor"],"additionalProperties":false},"InteractiveTerminalWriteInput":{"type":"object","properties":{"data":{"type":"string"}},"required":["data"],"additionalProperties":false},"InteractiveTerminalResizeInput":{"type":"object","properties":{"cols":{"type":"integer","exclusiveMinimum":0},"rows":{"type":"integer","exclusiveMinimum":0}},"required":["cols","rows"],"additionalProperties":false},"effect_HttpApiError_Unauthorized":{"type":"object","properties":{"_tag":{"type":"string","enum":["Unauthorized"]}},"required":["_tag"],"additionalProperties":false},"effect_HttpApiError_ServiceUnavailable":{"type":"object","properties":{"_tag":{"type":"string","enum":["ServiceUnavailable"]}},"required":["_tag"],"additionalProperties":false},"CloudSessionImportError":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false},"AgentRequirementResult":{"type":"object","properties":{"agent":{"type":"string"},"directory":{"type":"string"},"enabled":{"type":"boolean"},"state":{"type":"string","enum":["disabled","ready","blocked","error"]},"skills":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"status":{"type":"string","enum":["ready","missing","error"]},"message":{"type":"string"}},"required":["name","status"],"additionalProperties":false}},"mcps":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"status":{"type":"string","enum":["ready","missing","error"]},"message":{"type":"string"}},"required":["name","status"],"additionalProperties":false}},"vscode_extensions":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128,"pattern":"\\S"},"id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$"}},"required":["name","id"],"additionalProperties":false}},"error":{"type":"object","properties":{"code":{"type":"string","enum":["unknown_agent","malformed_declaration","discovery_failed","mcp_status_failed"]},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["agent","directory","enabled","state","skills","mcps","vscode_extensions"],"additionalProperties":false},"NotebookOutput":{"type":"object","properties":{"mime":{"type":"string","maxLength":200},"text":{"type":"string","maxLength":100000},"name":{"type":"string","maxLength":500},"message":{"type":"string","maxLength":10000},"stack":{"type":"string","maxLength":50000},"omitted":{"type":"boolean"},"truncated":{"type":"boolean"}},"required":["mime"],"additionalProperties":false},"NotebookCell":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"description":"Zero-based cell index"},"kind":{"type":"string","enum":["code","markdown"]},"language":{"type":"string","maxLength":200},"source":{"type":"string","maxLength":200000},"execution":{"type":"object","properties":{"order":{"type":"integer","minimum":0},"success":{"type":"boolean"},"started":{"type":"integer","minimum":0},"ended":{"type":"integer","minimum":0}},"additionalProperties":false},"outputs":{"type":"array","items":{"$ref":"#/components/schemas/NotebookOutput"},"maxItems":100}},"required":["index","kind","language","source"],"additionalProperties":false},"NotebookReadResult":{"type":"object","properties":{"operation":{"type":"string","enum":["read"]},"path":{"type":"string","minLength":1,"maxLength":4096},"requestPath":{"type":"string","minLength":1,"maxLength":4096},"revision":{"type":"string","minLength":1,"maxLength":200,"description":"Opaque notebook content revision; pass it back unchanged and do not parse or increment it"},"cells":{"type":"array","items":{"$ref":"#/components/schemas/NotebookCell"},"maxItems":2000},"truncated":{"type":"boolean"}},"required":["operation","path","requestPath","revision","cells"],"additionalProperties":false},"NotebookEditResult":{"type":"object","properties":{"operation":{"type":"string","enum":["edit"]},"path":{"type":"string","minLength":1,"maxLength":4096},"requestPath":{"type":"string","minLength":1,"maxLength":4096},"revision":{"type":"string","minLength":1,"maxLength":200,"description":"Opaque notebook content revision; pass it back unchanged and do not parse or increment it"},"index":{"type":"integer","minimum":0,"description":"Zero-based cell index"},"action":{"type":"string","enum":["insert","replace","delete","create"]},"cell":{"$ref":"#/components/schemas/NotebookCell"}},"required":["operation","path","requestPath","revision","index","action"],"additionalProperties":false},"NotebookExecuteResult":{"type":"object","properties":{"operation":{"type":"string","enum":["execute"]},"path":{"type":"string","minLength":1,"maxLength":4096},"requestPath":{"type":"string","minLength":1,"maxLength":4096},"revision":{"type":"string","minLength":1,"maxLength":200,"description":"Opaque notebook content revision; pass it back unchanged and do not parse or increment it"},"index":{"type":"integer","minimum":0,"description":"Zero-based cell index"},"status":{"type":"string","enum":["success","error"]},"outputs":{"type":"array","items":{"$ref":"#/components/schemas/NotebookOutput"},"maxItems":100},"truncated":{"type":"boolean"}},"required":["operation","path","requestPath","revision","index","status","outputs"],"additionalProperties":false},"NotebookResult":{"anyOf":[{"$ref":"#/components/schemas/NotebookReadResult"},{"$ref":"#/components/schemas/NotebookEditResult"},{"$ref":"#/components/schemas/NotebookExecuteResult"}]},"NotebookFailure":{"type":"object","properties":{"code":{"type":"string","enum":["already_exists","cancelled","closed","disconnected","execution_failed","invalid_cell","invalid_path","no_kernel","not_found","stale_revision","timeout","unsupported"]},"message":{"type":"string","minLength":1,"maxLength":10000},"path":{"type":"string","minLength":1,"maxLength":4096},"index":{"type":"integer","minimum":0,"description":"Zero-based cell index"},"currentRevision":{"type":"string","minLength":1,"maxLength":200,"description":"Opaque notebook content revision; pass it back unchanged and do not parse or increment it"}},"required":["code","message"],"additionalProperties":false},"AgentManagerActivity":{"type":"string","enum":["idle","busy","retry","offline"]},"AgentManagerAttention":{"type":"array","items":{"type":"string","enum":["permission","question"]},"maxItems":2},"AgentManagerSessionSummary":{"type":"object","properties":{"id":{"type":"string","pattern":"^ses"},"name":{"type":"string","minLength":1,"maxLength":500},"activity":{"$ref":"#/components/schemas/AgentManagerActivity"},"attention":{"$ref":"#/components/schemas/AgentManagerAttention"}},"required":["id","name","activity"],"additionalProperties":false},"AgentManagerGitSummary":{"type":"object","properties":{"additions":{"type":"integer","minimum":0},"deletions":{"type":"integer","minimum":0},"ahead":{"type":"integer","minimum":0},"behind":{"type":"integer","minimum":0}},"required":["additions","deletions","ahead","behind"],"additionalProperties":false},"AgentManagerPullRequestSummary":{"type":"object","properties":{"number":{"type":"integer","minimum":0},"state":{"type":"string","enum":["open","draft","merged","closed"]},"checks":{"type":"string","enum":["success","failure","pending","none"]},"review":{"type":"string","enum":["approved","changes_requested","pending"]},"unresolvedComments":{"type":"integer","minimum":0}},"required":["number","state","checks"],"additionalProperties":false},"AgentManagerWorktreeSummary":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":500},"branch":{"type":"string","minLength":1,"maxLength":500},"session":{"$ref":"#/components/schemas/AgentManagerSessionSummary"},"sessions":{"type":"array","items":{"$ref":"#/components/schemas/AgentManagerSessionSummary"},"minItems":2,"maxItems":100},"git":{"$ref":"#/components/schemas/AgentManagerGitSummary"},"pullRequest":{"$ref":"#/components/schemas/AgentManagerPullRequestSummary"}},"required":["id","name","branch"],"additionalProperties":false},"AgentManagerSectionSummary":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":500},"worktrees":{"type":"array","items":{"$ref":"#/components/schemas/AgentManagerWorktreeSummary"},"maxItems":100}},"required":["id","name","worktrees"],"additionalProperties":false},"AgentManagerLocalSummary":{"type":"object","properties":{"branch":{"type":"string","minLength":1,"maxLength":500},"sessions":{"type":"array","items":{"$ref":"#/components/schemas/AgentManagerSessionSummary"},"maxItems":100},"git":{"$ref":"#/components/schemas/AgentManagerGitSummary"}},"required":["sessions"],"additionalProperties":false},"AgentManagerOverview":{"type":"object","properties":{"sections":{"type":"array","items":{"$ref":"#/components/schemas/AgentManagerSectionSummary"},"maxItems":100},"ungrouped":{"type":"array","items":{"$ref":"#/components/schemas/AgentManagerWorktreeSummary"},"maxItems":100},"local":{"$ref":"#/components/schemas/AgentManagerLocalSummary"}},"required":["sections","ungrouped"],"additionalProperties":false},"AgentManagerOverviewResult":{"type":"object","properties":{"operation":{"type":"string","enum":["overview"]},"overview":{"$ref":"#/components/schemas/AgentManagerOverview"}},"required":["operation","overview"],"additionalProperties":false},"AgentManagerPromptResult":{"type":"object","properties":{"operation":{"type":"string","enum":["prompt"]},"sessionID":{"type":"string","pattern":"^ses"},"delivered":{"type":"boolean","enum":[true]}},"required":["operation","sessionID","delivered"],"additionalProperties":false},"AgentManagerStopResult":{"type":"object","properties":{"operation":{"type":"string","enum":["stop"]},"sessionID":{"type":"string","pattern":"^ses"},"stopped":{"type":"boolean","enum":[true]}},"required":["operation","sessionID","stopped"],"additionalProperties":false},"AgentManagerResult":{"anyOf":[{"$ref":"#/components/schemas/AgentManagerOverviewResult"},{"$ref":"#/components/schemas/AgentManagerPromptResult"},{"$ref":"#/components/schemas/AgentManagerStopResult"}]},"AgentManagerFailure":{"type":"object","properties":{"code":{"type":"string","enum":["cancelled","cross_workspace","disconnected","host_error","stale_session","timeout","unavailable_session","unknown_session","workspace_unavailable"]},"message":{"type":"string","minLength":1,"maxLength":10000}},"required":["code","message"],"additionalProperties":false},"AnacondaDesktopStatus":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["unsupported-platform"]},"platform":{"type":"string"}},"required":["type","platform"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["not-installed"]},"downloadURL":{"type":"string"}},"required":["type","downloadURL"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["not-running"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["invalid-config"]},"reason":{"type":"string","enum":["missing","malformed","missing-key","invalid-port"]}},"required":["type","reason"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["signed-out"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["management-unauthorized"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["management-unavailable"]},"reason":{"type":"string","enum":["timeout","unexpected-response"]}},"required":["type","reason"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["no-downloaded-model"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["no-running-server"]},"downloadedModels":{"type":"integer"}},"required":["type","downloadedModels"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["inference-unhealthy"]},"serverID":{"type":"string","minLength":1}},"required":["type","serverID"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["ready"]},"serverID":{"type":"string","minLength":1},"serverName":{"type":"string","minLength":1},"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}},"required":["id","name"],"additionalProperties":false},"minItems":1},"context":{"type":"integer","minimum":0,"maximum":9007199254740991},"toolcall":{"type":"string","enum":["supported","unsupported","unknown"]}},"required":["type","serverID","models","context","toolcall"],"additionalProperties":false}]},"AnacondaDesktopConflictError":{"type":"object","properties":{"code":{"type":"string","enum":["unsupported-platform","not-installed","not-ready","acknowledgement-required"]},"message":{"type":"string"},"status":{"$ref":"#/components/schemas/AnacondaDesktopStatus"}},"required":["code","message"],"additionalProperties":false},"AnacondaDesktopOperationError":{"type":"object","properties":{"operation":{"type":"string","enum":["open","sync"]},"message":{"type":"string"}},"required":["operation","message"],"additionalProperties":false},"KilocodeSessionImportResult":{"type":"object","properties":{"ok":{"type":"boolean"},"id":{"type":"string"},"skipped":{"type":"boolean"}},"required":["ok","id"],"additionalProperties":false},"MemoryApiClientError":{"type":"object","properties":{"name":{"type":"string","enum":["MemoryApiClientError"]},"data":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["name","data"],"additionalProperties":false},"MemoryApiServerError":{"type":"object","properties":{"name":{"type":"string","enum":["MemoryApiServerError"]},"data":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["name","data"],"additionalProperties":false},"UnauthorizedError":{"type":"object","properties":{"_tag":{"type":"string","enum":["UnauthorizedError"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"SessionsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SessionV2Info"}},"cursor":{"type":"object","properties":{"previous":{"type":"string"},"next":{"type":"string"}},"additionalProperties":false}},"required":["data","cursor"],"additionalProperties":false},"InvalidCursorError":{"type":"object","properties":{"_tag":{"type":"string","enum":["InvalidCursorError"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"SessionActive":{"type":"object","properties":{"type":{"type":"string","enum":["running"]}},"required":["type"],"additionalProperties":false},"SessionNotFoundError":{"type":"object","properties":{"_tag":{"type":"string","enum":["SessionNotFoundError"]},"sessionID":{"type":"string"},"message":{"type":"string"}},"required":["_tag","sessionID","message"],"additionalProperties":false},"PromptInput":{"type":"object","properties":{"text":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/PromptInputFileAttachment"}},"agents":{"type":"array","items":{"$ref":"#/components/schemas/PromptAgentAttachment"}}},"required":["text"],"additionalProperties":false},"ServiceUnavailableError":{"type":"object","properties":{"_tag":{"type":"string","enum":["ServiceUnavailableError"]},"message":{"type":"string"},"service":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"MessageNotFoundError":{"type":"object","properties":{"_tag":{"type":"string","enum":["MessageNotFoundError"]},"sessionID":{"type":"string"},"messageID":{"type":"string"},"message":{"type":"string"}},"required":["_tag","sessionID","messageID","message"],"additionalProperties":false},"UnknownError1":{"type":"object","properties":{"_tag":{"type":"string","enum":["UnknownError"]},"message":{"type":"string"},"ref":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"SessionDurableEvent":{"oneOf":[{"$ref":"#/components/schemas/SessionNextAgentSwitched"},{"$ref":"#/components/schemas/SessionNextModelSwitched"},{"$ref":"#/components/schemas/SessionNextMoved"},{"$ref":"#/components/schemas/SessionNextPrompted"},{"$ref":"#/components/schemas/SessionNextPromptAdmitted"},{"$ref":"#/components/schemas/SessionNextContextUpdated"},{"$ref":"#/components/schemas/SessionNextSynthetic"},{"$ref":"#/components/schemas/SessionNextShellStarted"},{"$ref":"#/components/schemas/SessionNextShellEnded"},{"$ref":"#/components/schemas/SessionNextStepStarted"},{"$ref":"#/components/schemas/SessionNextStepEnded"},{"$ref":"#/components/schemas/SessionNextStepFailed"},{"$ref":"#/components/schemas/SessionNextTextStarted"},{"$ref":"#/components/schemas/SessionNextTextEnded"},{"$ref":"#/components/schemas/SessionNextToolInputStarted"},{"$ref":"#/components/schemas/SessionNextToolInputEnded"},{"$ref":"#/components/schemas/SessionNextToolCalled"},{"$ref":"#/components/schemas/SessionNextToolProgress"},{"$ref":"#/components/schemas/SessionNextToolSuccess"},{"$ref":"#/components/schemas/SessionNextToolFailed"},{"$ref":"#/components/schemas/SessionNextReasoningStarted"},{"$ref":"#/components/schemas/SessionNextReasoningEnded"},{"$ref":"#/components/schemas/SessionNextRetried"},{"$ref":"#/components/schemas/SessionNextCompactionStarted"},{"$ref":"#/components/schemas/SessionNextCompactionEnded"},{"$ref":"#/components/schemas/SessionNextRevertStaged"},{"$ref":"#/components/schemas/SessionNextRevertCleared"},{"$ref":"#/components/schemas/SessionNextRevertCommitted"}]},"SessionHistory":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SessionDurableEvent"}},"hasMore":{"type":"boolean"}},"required":["data","hasMore"],"additionalProperties":false},"SessionDurableEventStream":{"type":"string","contentSchema":{"$ref":"#/components/schemas/SessionDurableEvent"},"contentMediaType":"application/json"},"SessionMessagesResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SessionMessage"}},"cursor":{"type":"object","properties":{"previous":{"type":"string"},"next":{"type":"string"}},"additionalProperties":false}},"required":["data","cursor"],"additionalProperties":false},"ProviderNotFoundError":{"type":"object","properties":{"_tag":{"type":"string","enum":["ProviderNotFoundError"]},"providerID":{"type":"string"},"message":{"type":"string"}},"required":["_tag","providerID","message"],"additionalProperties":false},"OutputFormat1":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"]},"schema":{"$ref":"#/components/schemas/JSONSchema"},"retryCount":{"type":"integer","minimum":0}},"required":["type","schema"],"additionalProperties":false}]},"session.status":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.status"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"status":{"$ref":"#/components/schemas/SessionStatus"}},"required":["sessionID","status"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"question.replied":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["question.replied"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"requestID":{"type":"string","pattern":"^que"},"answers":{"type":"array","items":{"$ref":"#/components/schemas/QuestionAnswer"}}},"required":["sessionID","requestID","answers"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"question.rejected":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["question.rejected"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"requestID":{"type":"string","pattern":"^que"}},"required":["sessionID","requestID"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"V2Event":{"anyOf":[{"$ref":"#/components/schemas/Models-devRefreshed"},{"$ref":"#/components/schemas/IntegrationUpdated"},{"$ref":"#/components/schemas/IntegrationConnectionUpdated"},{"$ref":"#/components/schemas/CatalogUpdated"},{"$ref":"#/components/schemas/SessionCreated"},{"$ref":"#/components/schemas/SessionUpdated"},{"$ref":"#/components/schemas/SessionDeleted"},{"$ref":"#/components/schemas/MessageUpdated"},{"$ref":"#/components/schemas/MessageRemoved"},{"$ref":"#/components/schemas/MessagePartUpdated"},{"$ref":"#/components/schemas/MessagePartRemoved"},{"$ref":"#/components/schemas/SessionNextAgentSwitched"},{"$ref":"#/components/schemas/SessionNextModelSwitched"},{"$ref":"#/components/schemas/SessionNextMoved"},{"$ref":"#/components/schemas/SessionNextPrompted"},{"$ref":"#/components/schemas/SessionNextPromptAdmitted"},{"$ref":"#/components/schemas/SessionNextContextUpdated"},{"$ref":"#/components/schemas/SessionNextSynthetic"},{"$ref":"#/components/schemas/SessionNextShellStarted"},{"$ref":"#/components/schemas/SessionNextShellEnded"},{"$ref":"#/components/schemas/SessionNextStepStarted"},{"$ref":"#/components/schemas/SessionNextStepEnded"},{"$ref":"#/components/schemas/SessionNextStepFailed"},{"$ref":"#/components/schemas/SessionNextTextStarted"},{"$ref":"#/components/schemas/SessionNextTextDelta"},{"$ref":"#/components/schemas/SessionNextTextEnded"},{"$ref":"#/components/schemas/SessionNextReasoningStarted"},{"$ref":"#/components/schemas/SessionNextReasoningDelta"},{"$ref":"#/components/schemas/SessionNextReasoningEnded"},{"$ref":"#/components/schemas/SessionNextToolInputStarted"},{"$ref":"#/components/schemas/SessionNextToolInputDelta"},{"$ref":"#/components/schemas/SessionNextToolInputEnded"},{"$ref":"#/components/schemas/SessionNextToolCalled"},{"$ref":"#/components/schemas/SessionNextToolProgress1"},{"$ref":"#/components/schemas/SessionNextToolSuccess1"},{"$ref":"#/components/schemas/SessionNextToolFailed"},{"$ref":"#/components/schemas/SessionNextRetried"},{"$ref":"#/components/schemas/SessionNextCompactionStarted"},{"$ref":"#/components/schemas/SessionNextCompactionDelta"},{"$ref":"#/components/schemas/SessionNextCompactionEnded"},{"$ref":"#/components/schemas/SessionNextRevertStaged"},{"$ref":"#/components/schemas/SessionNextRevertCleared"},{"$ref":"#/components/schemas/SessionNextRevertCommitted"},{"$ref":"#/components/schemas/MessagePartDelta"},{"$ref":"#/components/schemas/SessionDiff"},{"$ref":"#/components/schemas/SessionError"},{"$ref":"#/components/schemas/InstallationUpdated"},{"$ref":"#/components/schemas/InstallationUpdate-available"},{"$ref":"#/components/schemas/FileEdited"},{"$ref":"#/components/schemas/ReferenceUpdated"},{"$ref":"#/components/schemas/PermissionV2Asked"},{"$ref":"#/components/schemas/PermissionV2Replied"},{"$ref":"#/components/schemas/PluginAdded"},{"$ref":"#/components/schemas/ProjectDirectoriesUpdated"},{"$ref":"#/components/schemas/FileWatcherUpdated"},{"$ref":"#/components/schemas/PtyCreated"},{"$ref":"#/components/schemas/PtyUpdated"},{"$ref":"#/components/schemas/PtyExited"},{"$ref":"#/components/schemas/PtyDeleted"},{"$ref":"#/components/schemas/QuestionV2Asked"},{"$ref":"#/components/schemas/QuestionV2Replied"},{"$ref":"#/components/schemas/QuestionV2Rejected"},{"$ref":"#/components/schemas/TodoUpdated"},{"$ref":"#/components/schemas/LspUpdated"},{"$ref":"#/components/schemas/PermissionAsked"},{"$ref":"#/components/schemas/PermissionReplied"},{"$ref":"#/components/schemas/TuiPromptAppend"},{"$ref":"#/components/schemas/TuiCommandExecute"},{"$ref":"#/components/schemas/TuiToastShow"},{"$ref":"#/components/schemas/TuiSessionSelect"},{"$ref":"#/components/schemas/McpToolsChanged"},{"$ref":"#/components/schemas/McpBrowserOpenFailed"},{"$ref":"#/components/schemas/CommandExecuted"},{"$ref":"#/components/schemas/ProjectUpdated"},{"$ref":"#/components/schemas/session.status"},{"$ref":"#/components/schemas/SessionIdle"},{"$ref":"#/components/schemas/QuestionAsked"},{"$ref":"#/components/schemas/question.replied"},{"$ref":"#/components/schemas/question.rejected"},{"$ref":"#/components/schemas/SessionCompacted"},{"$ref":"#/components/schemas/VcsBranchUpdated"},{"$ref":"#/components/schemas/WorkspaceReady"},{"$ref":"#/components/schemas/WorkspaceFailed"},{"$ref":"#/components/schemas/WorkspaceStatus"},{"$ref":"#/components/schemas/WorktreeReady"},{"$ref":"#/components/schemas/WorktreeFailed"},{"$ref":"#/components/schemas/ServerConnected"},{"$ref":"#/components/schemas/GlobalDisposed"},{"$ref":"#/components/schemas/GlobalConfigUpdated"}]},"V2EventStream":{"type":"string","contentSchema":{"$ref":"#/components/schemas/V2Event"},"contentMediaType":"application/json"},"ForbiddenError":{"type":"object","properties":{"_tag":{"type":"string","enum":["ForbiddenError"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"ProjectCopyError":{"type":"object","properties":{"name":{"type":"string","enum":["ProjectCopyError"]},"data":{"type":"object","properties":{"message":{"type":"string"},"forceRequired":{"type":"boolean"}},"required":["message"],"additionalProperties":false}},"required":["name","data"],"additionalProperties":false},"effect_HttpApiError_Forbidden":{"type":"object","properties":{"_tag":{"type":"string","enum":["Forbidden"]}},"required":["_tag"],"additionalProperties":false},"InteractiveTerminalInfo1":{"type":"object","properties":{"id":{"type":"string"},"sessionID":{"type":"string","pattern":"^ses"},"pid":{"type":"integer","exclusiveMinimum":0},"command":{"type":"string"},"cwd":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["running","closed"]},"cols":{"type":"integer","exclusiveMinimum":0},"rows":{"type":"integer","exclusiveMinimum":0},"exitCode":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]}]},"signal":{"type":"string"},"closedBy":{"type":"string","enum":["exit","user","abort"]},"time":{"type":"object","properties":{"started":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0},"ended":{"type":"integer","minimum":0}},"required":["started","updated"],"additionalProperties":false}},"required":["id","sessionID","pid","command","cwd","status","cols","rows","time"],"additionalProperties":false},"CredentialValue":{"anyOf":[{"$ref":"#/components/schemas/CredentialOAuth"},{"$ref":"#/components/schemas/CredentialKey"}]},"IntegrationInputs":{"type":"object","additionalProperties":{"type":"string"}},"IntegrationMethod":{"anyOf":[{"$ref":"#/components/schemas/IntegrationOAuthMethod"},{"$ref":"#/components/schemas/IntegrationKeyMethod"},{"$ref":"#/components/schemas/IntegrationEnvMethod"}]},"IntegrationRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"SkillV2Source":{"anyOf":[{"$ref":"#/components/schemas/SkillV2DirectorySource"},{"$ref":"#/components/schemas/SkillV2UrlSource"},{"$ref":"#/components/schemas/SkillV2EmbeddedSource"}]},"MoveSessionDestination":{"type":"object","properties":{"directory":{"type":"string"}},"required":["directory"],"additionalProperties":false},"EventServerInstanceDisposed":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["server.instance.disposed"]},"properties":{"type":"object","properties":{"directory":{"type":"string"}},"required":["directory"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionTurnOpen":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.turn.open"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"}},"required":["sessionID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionTurnClose":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.turn.close"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"parentID":{"type":"string","pattern":"^ses"},"reason":{"type":"string","enum":["completed","error","interrupted"]}},"required":["sessionID","reason"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionQueueChanged":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.queue.changed"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"queued":{"type":"array","items":{"type":"string","pattern":"^msg"}}},"required":["sessionID","queued"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNetworkAsked":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.network.asked"]},"properties":{"$ref":"#/components/schemas/SessionNetworkWait"}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNetworkReplied":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.network.replied"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"requestID":{"type":"string","pattern":"^que"}},"required":["sessionID","requestID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNetworkRejected":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.network.rejected"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"requestID":{"type":"string","pattern":"^que"}},"required":["sessionID","requestID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNetworkRestored":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.network.restored"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"requestID":{"type":"string","pattern":"^que"},"time":{"type":"number"}},"required":["sessionID","requestID","time"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventBackground_processUpdated":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["background_process.updated"]},"properties":{"type":"object","properties":{"info":{"$ref":"#/components/schemas/BackgroundProcessInfo"},"scope":{"type":"string"}},"required":["info","scope"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventBackground_processDeleted":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["background_process.deleted"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"processID":{"type":"string"},"scope":{"type":"string"}},"required":["sessionID","processID","scope"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventInteractive_terminalUpdated":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["interactive_terminal.updated"]},"properties":{"type":"object","properties":{"info":{"$ref":"#/components/schemas/InteractiveTerminalInfo"}},"required":["info"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventInteractive_terminalData":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["interactive_terminal.data"]},"properties":{"type":"object","properties":{"terminalID":{"type":"string"},"sessionID":{"type":"string","pattern":"^ses"},"data":{"type":"string"},"cursor":{"type":"integer","minimum":0}},"required":["terminalID","sessionID","data","cursor"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventInteractive_terminalDeleted":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["interactive_terminal.deleted"]},"properties":{"type":"object","properties":{"terminalID":{"type":"string"},"sessionID":{"type":"string","pattern":"^ses"}},"required":["terminalID","sessionID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSandboxStatusChanged":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["sandbox.status.changed"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"directory":{"type":"string"},"enabled":{"type":"boolean"},"available":{"type":"boolean"},"reason":{"type":"string"},"version":{"type":"integer"}},"required":["sessionID","directory","enabled","available","version"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSuggestionShown":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["suggestion.shown"]},"properties":{"$ref":"#/components/schemas/SuggestionRequest"}},"required":["id","type","properties"],"additionalProperties":false},"EventSuggestionAccepted":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["suggestion.accepted"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"requestID":{"type":"string","pattern":"^sug"},"index":{"type":"integer","minimum":0},"action":{"type":"object","properties":{"label":{"type":"string","description":"Button or option label (1-5 words)"},"description":{"type":"string"},"prompt":{"type":"string","description":"Synthetic user prompt to inject when this action is accepted"}},"required":["label","prompt"],"additionalProperties":false}},"required":["sessionID","requestID","index","action"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSuggestionDismissed":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["suggestion.dismissed"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"requestID":{"type":"string","pattern":"^sug"}},"required":["sessionID","requestID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventKilocodeAgent_managerStart":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["kilocode.agent_manager.start"]},"properties":{"type":"object","properties":{"requestID":{"type":"string"},"sessionID":{"type":"string","pattern":"^ses"},"sandboxInheritanceToken":{"type":"string"},"mode":{"type":"string","enum":["worktree","local"]},"versions":{"type":"boolean"},"tasks":{"type":"array","items":{"type":"object","properties":{"prompt":{"type":"string"},"name":{"type":"string"},"branchName":{"type":"string"},"model":{"type":"object","properties":{"providerID":{"type":"string"},"modelID":{"type":"string"}},"required":["providerID","modelID"],"additionalProperties":false},"variant":{"type":"string"}},"additionalProperties":false},"minItems":1,"maxItems":20}},"required":["requestID","sessionID","mode","tasks"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventKilocodeAgent_managerRequested":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["kilocode.agent_manager.requested"]},"properties":{"$ref":"#/components/schemas/AgentManagerRequest"}},"required":["id","type","properties"],"additionalProperties":false},"EventKilocodeAgent_managerCancelled":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["kilocode.agent_manager.cancelled"]},"properties":{"type":"object","properties":{"requestID":{"$ref":"#/components/schemas/AgentManagerRequestID"},"sessionID":{"type":"string","pattern":"^ses"},"reason":{"type":"string","enum":["cancelled","disposed","timeout"]}},"required":["requestID","sessionID","reason"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventKilocodeNotebookRequested":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["kilocode.notebook.requested"]},"properties":{"$ref":"#/components/schemas/NotebookRequest"}},"required":["id","type","properties"],"additionalProperties":false},"EventKilocodeNotebookCancelled":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["kilocode.notebook.cancelled"]},"properties":{"type":"object","properties":{"requestID":{"$ref":"#/components/schemas/NotebookRequestID"},"sessionID":{"type":"string","pattern":"^ses"},"reason":{"type":"string","enum":["cancelled","disposed","timeout"]}},"required":["requestID","sessionID","reason"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventKilo-sessionsRemote-status-changed":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["kilo-sessions.remote-status-changed"]},"properties":{"type":"object","properties":{"enabled":{"type":"boolean"},"connected":{"type":"boolean"}},"required":["enabled","connected"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventLspClientDiagnostics":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["lsp.client.diagnostics"]},"properties":{"type":"object","properties":{"serverID":{"type":"string"},"path":{"type":"string"}},"required":["serverID","path"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventMemoryStatus":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["memory.status"]},"properties":{"type":"object","properties":{"directory":{"type":"string"},"sessionID":{"type":"string"},"enabled":{"type":"boolean"},"state":{"type":"string","enum":["idle","checking","injecting","updating","skipped","error"]},"reason":{"type":"string"},"project":{"type":"object","properties":{"bytes":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"estimatedTokens":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"truncated":{"type":"boolean"},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["bytes","estimatedTokens","truncated"],"additionalProperties":false},"consolidation":{"type":"object","properties":{"trigger":{"type":"string","enum":["explicit","turn-close","rebuild"]},"operationCount":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"cost":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"tokens":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["trigger","operationCount","cost","tokens"],"additionalProperties":false},"detail":{"type":"object","properties":{"type":{"type":"string","enum":["saved","skipped","recalled"]},"message":{"type":"string"},"reason":{"type":"string"},"duplicateOf":{"type":"string"},"tokens":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"operationCount":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"added":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"removed":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"skippedCount":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"sources":{"type":"array","items":{"type":"string"}},"files":{"type":"array","items":{"type":"string"}}},"required":["type","message"],"additionalProperties":false}},"required":["directory","enabled","state","project"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventMemoryUpdated":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["memory.updated"]},"properties":{"type":"object","properties":{"directory":{"type":"string"},"sessionID":{"type":"string"},"enabled":{"type":"boolean"},"state":{"type":"string","enum":["idle","checking","injecting","updating","skipped","error"]},"reason":{"type":"string"},"project":{"type":"object","properties":{"bytes":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"estimatedTokens":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"truncated":{"type":"boolean"},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["bytes","estimatedTokens","truncated"],"additionalProperties":false},"consolidation":{"type":"object","properties":{"trigger":{"type":"string","enum":["explicit","turn-close","rebuild"]},"operationCount":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"cost":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"tokens":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["trigger","operationCount","cost","tokens"],"additionalProperties":false},"detail":{"type":"object","properties":{"type":{"type":"string","enum":["saved","skipped","recalled"]},"message":{"type":"string"},"reason":{"type":"string"},"duplicateOf":{"type":"string"},"tokens":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"operationCount":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"added":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"removed":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"skippedCount":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"sources":{"type":"array","items":{"type":"string"}},"files":{"type":"array","items":{"type":"string"}}},"required":["type","message"],"additionalProperties":false}},"required":["directory","enabled","state","project"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventMemoryError":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["memory.error"]},"properties":{"type":"object","properties":{"directory":{"type":"string"},"sessionID":{"type":"string"},"enabled":{"type":"boolean"},"state":{"type":"string","enum":["idle","checking","injecting","updating","skipped","error"]},"reason":{"type":"string"},"project":{"type":"object","properties":{"bytes":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"estimatedTokens":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"truncated":{"type":"boolean"},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["bytes","estimatedTokens","truncated"],"additionalProperties":false},"consolidation":{"type":"object","properties":{"trigger":{"type":"string","enum":["explicit","turn-close","rebuild"]},"operationCount":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"cost":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"tokens":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["trigger","operationCount","cost","tokens"],"additionalProperties":false},"detail":{"type":"object","properties":{"type":{"type":"string","enum":["saved","skipped","recalled"]},"message":{"type":"string"},"reason":{"type":"string"},"duplicateOf":{"type":"string"},"tokens":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"operationCount":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"added":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"removed":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"skippedCount":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"sources":{"type":"array","items":{"type":"string"}},"files":{"type":"array","items":{"type":"string"}}},"required":["type","message"],"additionalProperties":false}},"required":["directory","enabled","state","project"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventIndexingStatus":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["indexing.status"]},"properties":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/IndexingStatus"}},"required":["status"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventIndexingWarning":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["indexing.warning"]},"properties":{"$ref":"#/components/schemas/IndexingWarning"}},"required":["id","type","properties"],"additionalProperties":false},"EventModels-devRefreshed":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["models-dev.refreshed"]},"properties":{"type":"object","properties":{}}},"required":["id","type","properties"],"additionalProperties":false},"EventIntegrationUpdated":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["integration.updated"]},"properties":{"type":"object","properties":{}}},"required":["id","type","properties"],"additionalProperties":false},"EventIntegrationConnectionUpdated":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["integration.connection.updated"]},"properties":{"type":"object","properties":{"integrationID":{"type":"string"}},"required":["integrationID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventCatalogUpdated":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["catalog.updated"]},"properties":{"type":"object","properties":{}}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionCreated":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.created"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"info":{"$ref":"#/components/schemas/Session"}},"required":["sessionID","info"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionUpdated":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.updated"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"info":{"$ref":"#/components/schemas/Session"}},"required":["sessionID","info"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionDeleted":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.deleted"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"info":{"$ref":"#/components/schemas/Session"}},"required":["sessionID","info"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventMessageUpdated":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["message.updated"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"info":{"$ref":"#/components/schemas/Message"}},"required":["sessionID","info"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventMessageRemoved":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["message.removed"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg"}},"required":["sessionID","messageID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventMessagePartUpdated":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["message.part.updated"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"part":{"$ref":"#/components/schemas/Part"},"time":{"type":"number"}},"required":["sessionID","part","time"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventMessagePartRemoved":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["message.part.removed"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg"},"partID":{"type":"string","pattern":"^prt"}},"required":["sessionID","messageID","partID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextAgentSwitched":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.next.agent.switched"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"agent":{"type":"string"}},"required":["timestamp","sessionID","messageID","agent"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"ModelRef":{"type":"object","properties":{"id":{"type":"string"},"providerID":{"type":"string"},"variant":{"type":"string"}},"required":["id","providerID"],"additionalProperties":false},"EventSessionNextModelSwitched":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.next.model.switched"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"model":{"$ref":"#/components/schemas/ModelRef"}},"required":["timestamp","sessionID","messageID","model"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"LocationRef":{"type":"object","properties":{"directory":{"type":"string"},"workspaceID":{"type":"string","pattern":"^wrk"}},"required":["directory"],"additionalProperties":false},"EventSessionNextMoved":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.next.moved"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"location":{"$ref":"#/components/schemas/LocationRef"},"subdirectory":{"type":"string"}},"required":["timestamp","sessionID","location"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"PromptSource":{"type":"object","properties":{"start":{"type":"number"},"end":{"type":"number"},"text":{"type":"string"}},"required":["start","end","text"],"additionalProperties":false},"PromptFileAttachment":{"type":"object","properties":{"uri":{"type":"string"},"mime":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"source":{"$ref":"#/components/schemas/PromptSource"}},"required":["uri","mime"],"additionalProperties":false},"PromptAgentAttachment":{"type":"object","properties":{"name":{"type":"string"},"source":{"$ref":"#/components/schemas/PromptSource"}},"required":["name"],"additionalProperties":false},"EventSessionNextPrompted":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.next.prompted"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"prompt":{"$ref":"#/components/schemas/Prompt"},"delivery":{"type":"string","enum":["steer","queue"]}},"required":["timestamp","sessionID","messageID","prompt","delivery"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextPromptAdmitted":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.next.prompt.admitted"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"prompt":{"$ref":"#/components/schemas/Prompt"},"delivery":{"type":"string","enum":["steer","queue"]}},"required":["timestamp","sessionID","messageID","prompt","delivery"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextContextUpdated":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.next.context.updated"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"text":{"type":"string"}},"required":["timestamp","sessionID","messageID","text"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextSynthetic":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.next.synthetic"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"text":{"type":"string"}},"required":["timestamp","sessionID","messageID","text"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextShellStarted":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.next.shell.started"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"command":{"type":"string"}},"required":["timestamp","sessionID","messageID","callID","command"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextShellEnded":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.next.shell.ended"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"callID":{"type":"string"},"output":{"type":"string"}},"required":["timestamp","sessionID","callID","output"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextStepStarted":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.next.step.started"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"agent":{"type":"string"},"model":{"$ref":"#/components/schemas/ModelRef"},"snapshot":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","agent","model"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextStepEnded":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.next.step.ended"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"finish":{"type":"string"},"cost":{"type":"number"},"tokens":{"type":"object","properties":{"input":{"type":"number"},"output":{"type":"number"},"reasoning":{"type":"number"},"cache":{"type":"object","properties":{"read":{"type":"number"},"write":{"type":"number"}},"required":["read","write"],"additionalProperties":false}},"required":["input","output","reasoning","cache"],"additionalProperties":false},"snapshot":{"type":"string"},"files":{"type":"array","items":{"type":"string"}}},"required":["timestamp","sessionID","assistantMessageID","finish","cost","tokens"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"SessionErrorUnknown":{"type":"object","properties":{"type":{"type":"string","enum":["unknown"]},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false},"EventSessionNextStepFailed":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.next.step.failed"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"error":{"$ref":"#/components/schemas/SessionErrorUnknown"}},"required":["timestamp","sessionID","assistantMessageID","error"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextTextStarted":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.next.text.started"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"textID":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","textID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextTextDelta":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.next.text.delta"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"textID":{"type":"string"},"delta":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","textID","delta"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextTextEnded":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.next.text.ended"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"textID":{"type":"string"},"text":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","textID","text"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"LLMProviderMetadata":{"type":"object","additionalProperties":{"type":"object"}},"EventSessionNextReasoningStarted":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.next.reasoning.started"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"reasoningID":{"type":"string"},"providerMetadata":{"$ref":"#/components/schemas/LLMProviderMetadata"}},"required":["timestamp","sessionID","assistantMessageID","reasoningID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextReasoningDelta":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.next.reasoning.delta"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"reasoningID":{"type":"string"},"delta":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","reasoningID","delta"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextReasoningEnded":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.next.reasoning.ended"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"reasoningID":{"type":"string"},"text":{"type":"string"},"providerMetadata":{"$ref":"#/components/schemas/LLMProviderMetadata"}},"required":["timestamp","sessionID","assistantMessageID","reasoningID","text"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextToolInputStarted":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.next.tool.input.started"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"name":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","callID","name"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextToolInputDelta":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.next.tool.input.delta"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"delta":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","callID","delta"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextToolInputEnded":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.next.tool.input.ended"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"text":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","callID","text"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextToolCalled":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.next.tool.called"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"tool":{"type":"string"},"input":{"type":"object"},"provider":{"type":"object","properties":{"executed":{"type":"boolean"},"metadata":{"$ref":"#/components/schemas/LLMProviderMetadata"}},"required":["executed"],"additionalProperties":false}},"required":["timestamp","sessionID","assistantMessageID","callID","tool","input","provider"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"ToolTextContent":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},"ToolFileContent":{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"uri":{"type":"string"},"mime":{"type":"string"},"name":{"type":"string"}},"required":["type","uri","mime"],"additionalProperties":false},"LLMToolContent":{"anyOf":[{"$ref":"#/components/schemas/ToolTextContent"},{"$ref":"#/components/schemas/ToolFileContent"}]},"LLMStoredToolContent":{"anyOf":[{"$ref":"#/components/schemas/LLMToolContent"},{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"source":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["data"]},"data":{"type":"string"}},"required":["type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["url"]},"url":{"type":"string"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"uri":{"type":"string"}},"required":["type","uri"],"additionalProperties":false}]},"mime":{"type":"string"},"name":{"type":"string"}},"required":["type","source","mime"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["media"]},"mediaType":{"type":"string"},"data":{"type":"string"},"filename":{"type":"string"}},"required":["type","mediaType","data"],"additionalProperties":false}]},"EventSessionNextToolProgress":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.next.tool.progress"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"structured":{"type":"object"},"content":{"type":"array","items":{"$ref":"#/components/schemas/LLMStoredToolContent"}}},"required":["timestamp","sessionID","assistantMessageID","callID","structured","content"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextToolSuccess":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.next.tool.success"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"structured":{"type":"object"},"content":{"type":"array","items":{"$ref":"#/components/schemas/LLMStoredToolContent"}},"outputPaths":{"type":"array","items":{"type":"string"}},"result":{},"provider":{"type":"object","properties":{"executed":{"type":"boolean"},"metadata":{"$ref":"#/components/schemas/LLMProviderMetadata"}},"required":["executed"],"additionalProperties":false}},"required":["timestamp","sessionID","assistantMessageID","callID","structured","content","provider"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextToolFailed":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.next.tool.failed"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"error":{"$ref":"#/components/schemas/SessionErrorUnknown"},"result":{},"provider":{"type":"object","properties":{"executed":{"type":"boolean"},"metadata":{"$ref":"#/components/schemas/LLMProviderMetadata"}},"required":["executed"],"additionalProperties":false}},"required":["timestamp","sessionID","assistantMessageID","callID","error","provider"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"SessionNextRetry_error":{"type":"object","properties":{"message":{"type":"string"},"statusCode":{"type":"number"},"isRetryable":{"type":"boolean"},"responseHeaders":{"type":"object","additionalProperties":{"type":"string"}},"responseBody":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"}}},"required":["message","isRetryable"],"additionalProperties":false},"EventSessionNextRetried":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.next.retried"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"attempt":{"type":"number"},"error":{"$ref":"#/components/schemas/SessionNextRetry_error"}},"required":["timestamp","sessionID","attempt","error"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextCompactionStarted":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.next.compaction.started"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"reason":{"type":"string","enum":["auto","manual"]}},"required":["timestamp","sessionID","messageID","reason"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextCompactionDelta":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.next.compaction.delta"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"text":{"type":"string"}},"required":["timestamp","sessionID","messageID","text"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextCompactionEnded":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.next.compaction.ended"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"reason":{"type":"string","enum":["auto","manual"]},"text":{"type":"string"},"recent":{"type":"string"},"include":{"type":"string"}},"required":["timestamp","sessionID","messageID","reason","text","recent"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"FileDiff":{"type":"object","properties":{"path":{"type":"string"},"status":{"type":"string","enum":["added","modified","deleted"]},"additions":{"type":"integer","minimum":0},"deletions":{"type":"integer","minimum":0},"patch":{"type":"string"}},"required":["path","status","additions","deletions","patch"],"additionalProperties":false},"RevertState":{"type":"object","properties":{"messageID":{"type":"string","pattern":"^msg_"},"partID":{"type":"string"},"snapshot":{"type":"string"},"diff":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/FileDiff"}}},"required":["messageID"],"additionalProperties":false},"EventSessionNextRevertStaged":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.next.revert.staged"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"revert":{"$ref":"#/components/schemas/RevertState"}},"required":["timestamp","sessionID","revert"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextRevertCleared":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.next.revert.cleared"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"}},"required":["timestamp","sessionID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextRevertCommitted":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.next.revert.committed"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"}},"required":["timestamp","sessionID","messageID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventMessagePartDelta":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["message.part.delta"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg"},"partID":{"type":"string","pattern":"^prt"},"field":{"type":"string"},"delta":{"type":"string"}},"required":["sessionID","messageID","partID","field","delta"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionDiff":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.diff"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"diff":{"type":"array","items":{"$ref":"#/components/schemas/SnapshotFileDiff"}}},"required":["sessionID","diff"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionError":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.error"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"error":{"anyOf":[{"$ref":"#/components/schemas/ProviderAuthError"},{"$ref":"#/components/schemas/UnknownError"},{"$ref":"#/components/schemas/MessageOutputLengthError"},{"$ref":"#/components/schemas/MessageAbortedError"},{"$ref":"#/components/schemas/StructuredOutputError"},{"$ref":"#/components/schemas/ContextOverflowError"},{"$ref":"#/components/schemas/ContentFilterError"},{"$ref":"#/components/schemas/APIError"}]}},"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventInstallationUpdated":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["installation.updated"]},"properties":{"type":"object","properties":{"version":{"type":"string"}},"required":["version"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventInstallationUpdate-available":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["installation.update-available"]},"properties":{"type":"object","properties":{"version":{"type":"string"}},"required":["version"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventFileEdited":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["file.edited"]},"properties":{"type":"object","properties":{"file":{"type":"string"}},"required":["file"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventReferenceUpdated":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["reference.updated"]},"properties":{"type":"object","properties":{}}},"required":["id","type","properties"],"additionalProperties":false},"PermissionV2Source":{"type":"object","properties":{"type":{"type":"string","enum":["tool"]},"messageID":{"type":"string"},"callID":{"type":"string"}},"required":["type","messageID","callID"],"additionalProperties":false},"EventPermissionV2Asked":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["permission.v2.asked"]},"properties":{"type":"object","properties":{"id":{"type":"string","pattern":"^per"},"sessionID":{"type":"string","pattern":"^ses"},"action":{"type":"string"},"resources":{"type":"array","items":{"type":"string"}},"save":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object"},"source":{"$ref":"#/components/schemas/PermissionV2Source"}},"required":["id","sessionID","action","resources"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"PermissionV2Reply":{"type":"string","enum":["once","always","reject"]},"EventPermissionV2Replied":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["permission.v2.replied"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"requestID":{"type":"string","pattern":"^per"},"reply":{"$ref":"#/components/schemas/PermissionV2Reply"}},"required":["sessionID","requestID","reply"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventPluginAdded":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["plugin.added"]},"properties":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventProjectDirectoriesUpdated":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["project.directories.updated"]},"properties":{"type":"object","properties":{"projectID":{"type":"string"}},"required":["projectID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventFileWatcherUpdated":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["file.watcher.updated"]},"properties":{"type":"object","properties":{"file":{"type":"string"},"event":{"type":"string","enum":["add","change","unlink"]}},"required":["file","event"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventPtyCreated":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["pty.created"]},"properties":{"type":"object","properties":{"info":{"$ref":"#/components/schemas/Pty"}},"required":["info"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventPtyUpdated":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["pty.updated"]},"properties":{"type":"object","properties":{"info":{"$ref":"#/components/schemas/Pty"}},"required":["info"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventPtyExited":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["pty.exited"]},"properties":{"type":"object","properties":{"id":{"type":"string","pattern":"^pty"},"exitCode":{"type":"integer","minimum":0}},"required":["id","exitCode"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventPtyDeleted":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["pty.deleted"]},"properties":{"type":"object","properties":{"id":{"type":"string","pattern":"^pty"}},"required":["id"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"QuestionV2Option":{"type":"object","properties":{"label":{"type":"string","description":"Display text (1-5 words, concise)"},"description":{"type":"string","description":"Explanation of choice"}},"required":["label","description"],"additionalProperties":false},"QuestionV2Info":{"type":"object","properties":{"question":{"type":"string","description":"Complete question"},"header":{"type":"string","description":"Very short label (max 30 chars)"},"options":{"type":"array","items":{"$ref":"#/components/schemas/QuestionV2Option"},"description":"Available choices"},"multiple":{"type":"boolean"},"custom":{"type":"boolean"}},"required":["question","header","options"],"additionalProperties":false},"QuestionV2Tool":{"type":"object","properties":{"messageID":{"type":"string"},"callID":{"type":"string"}},"required":["messageID","callID"],"additionalProperties":false},"EventQuestionV2Asked":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["question.v2.asked"]},"properties":{"type":"object","properties":{"id":{"type":"string","pattern":"^que"},"sessionID":{"type":"string","pattern":"^ses"},"questions":{"type":"array","items":{"$ref":"#/components/schemas/QuestionV2Info"},"description":"Questions to ask"},"tool":{"$ref":"#/components/schemas/QuestionV2Tool"}},"required":["id","sessionID","questions"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"QuestionV2Answer":{"type":"array","items":{"type":"string"}},"EventQuestionV2Replied":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["question.v2.replied"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"requestID":{"type":"string","pattern":"^que"},"answers":{"type":"array","items":{"$ref":"#/components/schemas/QuestionV2Answer"}}},"required":["sessionID","requestID","answers"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventQuestionV2Rejected":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["question.v2.rejected"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"requestID":{"type":"string","pattern":"^que"}},"required":["sessionID","requestID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventTodoUpdated":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["todo.updated"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"todos":{"type":"array","items":{"$ref":"#/components/schemas/Todo"}}},"required":["sessionID","todos"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventLspUpdated":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["lsp.updated"]},"properties":{"type":"object","properties":{}}},"required":["id","type","properties"],"additionalProperties":false},"EventPermissionAsked":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["permission.asked"]},"properties":{"type":"object","properties":{"id":{"type":"string","pattern":"^per"},"sessionID":{"type":"string","pattern":"^ses"},"permission":{"type":"string"},"patterns":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object"},"always":{"type":"array","items":{"type":"string"}},"tool":{"type":"object","properties":{"messageID":{"type":"string"},"callID":{"type":"string"}},"required":["messageID","callID"],"additionalProperties":false}},"required":["id","sessionID","permission","patterns","metadata","always"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventPermissionReplied":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["permission.replied"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"requestID":{"type":"string","pattern":"^per"},"reply":{"type":"string","enum":["once","always","reject"]}},"required":["sessionID","requestID","reply"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventMcpToolsChanged":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["mcp.tools.changed"]},"properties":{"type":"object","properties":{"server":{"type":"string"}},"required":["server"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventMcpBrowserOpenFailed":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["mcp.browser.open.failed"]},"properties":{"type":"object","properties":{"mcpName":{"type":"string"},"url":{"type":"string"}},"required":["mcpName","url"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventCommandExecuted":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["command.executed"]},"properties":{"type":"object","properties":{"name":{"type":"string"},"sessionID":{"type":"string","pattern":"^ses"},"arguments":{"type":"string"},"messageID":{"type":"string","pattern":"^msg"}},"required":["name","sessionID","arguments","messageID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"ProjectVcs":{"type":"string","enum":["git"]},"ProjectIcon":{"type":"object","properties":{"url":{"type":"string"},"override":{"type":"string"},"color":{"type":"string"}},"additionalProperties":false},"ProjectCommands":{"type":"object","properties":{"start":{"type":"string","description":"Startup script to run when creating a new workspace (worktree)"}},"additionalProperties":false},"ProjectTime":{"type":"object","properties":{"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0},"initialized":{"type":"integer","minimum":0}},"required":["created","updated"],"additionalProperties":false},"EventProjectUpdated":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["project.updated"]},"properties":{"type":"object","properties":{"id":{"type":"string"},"worktree":{"type":"string"},"vcs":{"$ref":"#/components/schemas/ProjectVcs"},"name":{"type":"string"},"icon":{"$ref":"#/components/schemas/ProjectIcon"},"commands":{"$ref":"#/components/schemas/ProjectCommands"},"time":{"$ref":"#/components/schemas/ProjectTime"},"sandboxes":{"type":"array","items":{"type":"string"}}},"required":["id","worktree","time","sandboxes"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionStatus":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.status"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"status":{"$ref":"#/components/schemas/SessionStatus"}},"required":["sessionID","status"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionIdle":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.idle"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"}},"required":["sessionID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventQuestionAsked":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["question.asked"]},"properties":{"type":"object","properties":{"id":{"type":"string","pattern":"^que"},"sessionID":{"type":"string","pattern":"^ses"},"questions":{"type":"array","items":{"$ref":"#/components/schemas/QuestionInfo"},"description":"Questions to ask"},"blocking":{"type":"boolean"},"tool":{"$ref":"#/components/schemas/QuestionTool"}},"required":["id","sessionID","questions"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventQuestionReplied":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["question.replied"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"requestID":{"type":"string","pattern":"^que"},"answers":{"type":"array","items":{"$ref":"#/components/schemas/QuestionAnswer"}}},"required":["sessionID","requestID","answers"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventQuestionRejected":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["question.rejected"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"requestID":{"type":"string","pattern":"^que"}},"required":["sessionID","requestID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionCompacted":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["session.compacted"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"}},"required":["sessionID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventVcsBranchUpdated":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["vcs.branch.updated"]},"properties":{"type":"object","properties":{"branch":{"type":"string"}},"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventWorkspaceReady":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["workspace.ready"]},"properties":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventWorkspaceFailed":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["workspace.failed"]},"properties":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventWorkspaceStatus":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["workspace.status"]},"properties":{"type":"object","properties":{"workspaceID":{"type":"string","pattern":"^wrk"},"status":{"type":"string","enum":["connected","connecting","disconnected","error"]}},"required":["workspaceID","status"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventWorktreeReady":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["worktree.ready"]},"properties":{"type":"object","properties":{"name":{"type":"string"},"branch":{"type":"string"}},"required":["name"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventWorktreeFailed":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["worktree.failed"]},"properties":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventServerConnected":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["server.connected"]},"properties":{"type":"object","properties":{}}},"required":["id","type","properties"],"additionalProperties":false},"EventGlobalDisposed":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["global.disposed"]},"properties":{"type":"object","properties":{}}},"required":["id","type","properties"],"additionalProperties":false},"EventGlobalConfigUpdated":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["global.config.updated"]},"properties":{"type":"object","properties":{}}},"required":["id","type","properties"],"additionalProperties":false},"SyncEventSessionCreated":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"id":{"type":"string","pattern":"^evt_"},"syncEvent":{"type":"object","properties":{"type":{"type":"string","enum":["session.created.1"]},"id":{"type":"string","pattern":"^evt_"},"seq":{"type":"number"},"aggregateID":{"type":"string"},"data":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"info":{"$ref":"#/components/schemas/Session"}},"required":["sessionID","info"],"additionalProperties":false}},"required":["type","id","seq","aggregateID","data"],"additionalProperties":false}},"required":["type","id","syncEvent"],"additionalProperties":false},"SyncEventSessionUpdated":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"id":{"type":"string","pattern":"^evt_"},"syncEvent":{"type":"object","properties":{"type":{"type":"string","enum":["session.updated.1"]},"id":{"type":"string","pattern":"^evt_"},"seq":{"type":"number"},"aggregateID":{"type":"string"},"data":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"info":{"$ref":"#/components/schemas/Session"}},"required":["sessionID","info"],"additionalProperties":false}},"required":["type","id","seq","aggregateID","data"],"additionalProperties":false}},"required":["type","id","syncEvent"],"additionalProperties":false},"SyncEventSessionDeleted":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"id":{"type":"string","pattern":"^evt_"},"syncEvent":{"type":"object","properties":{"type":{"type":"string","enum":["session.deleted.1"]},"id":{"type":"string","pattern":"^evt_"},"seq":{"type":"number"},"aggregateID":{"type":"string"},"data":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"info":{"$ref":"#/components/schemas/Session"}},"required":["sessionID","info"],"additionalProperties":false}},"required":["type","id","seq","aggregateID","data"],"additionalProperties":false}},"required":["type","id","syncEvent"],"additionalProperties":false},"SyncEventMessageUpdated":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"id":{"type":"string","pattern":"^evt_"},"syncEvent":{"type":"object","properties":{"type":{"type":"string","enum":["message.updated.1"]},"id":{"type":"string","pattern":"^evt_"},"seq":{"type":"number"},"aggregateID":{"type":"string"},"data":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"info":{"$ref":"#/components/schemas/Message"}},"required":["sessionID","info"],"additionalProperties":false}},"required":["type","id","seq","aggregateID","data"],"additionalProperties":false}},"required":["type","id","syncEvent"],"additionalProperties":false},"SyncEventMessageRemoved":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"id":{"type":"string","pattern":"^evt_"},"syncEvent":{"type":"object","properties":{"type":{"type":"string","enum":["message.removed.1"]},"id":{"type":"string","pattern":"^evt_"},"seq":{"type":"number"},"aggregateID":{"type":"string"},"data":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg"}},"required":["sessionID","messageID"],"additionalProperties":false}},"required":["type","id","seq","aggregateID","data"],"additionalProperties":false}},"required":["type","id","syncEvent"],"additionalProperties":false},"SyncEventMessagePartUpdated":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"id":{"type":"string","pattern":"^evt_"},"syncEvent":{"type":"object","properties":{"type":{"type":"string","enum":["message.part.updated.1"]},"id":{"type":"string","pattern":"^evt_"},"seq":{"type":"number"},"aggregateID":{"type":"string"},"data":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"part":{"$ref":"#/components/schemas/Part"},"time":{"type":"number"}},"required":["sessionID","part","time"],"additionalProperties":false}},"required":["type","id","seq","aggregateID","data"],"additionalProperties":false}},"required":["type","id","syncEvent"],"additionalProperties":false},"SyncEventMessagePartRemoved":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"id":{"type":"string","pattern":"^evt_"},"syncEvent":{"type":"object","properties":{"type":{"type":"string","enum":["message.part.removed.1"]},"id":{"type":"string","pattern":"^evt_"},"seq":{"type":"number"},"aggregateID":{"type":"string"},"data":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg"},"partID":{"type":"string","pattern":"^prt"}},"required":["sessionID","messageID","partID"],"additionalProperties":false}},"required":["type","id","seq","aggregateID","data"],"additionalProperties":false}},"required":["type","id","syncEvent"],"additionalProperties":false},"SyncEventSessionNextAgentSwitched":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"id":{"type":"string","pattern":"^evt_"},"syncEvent":{"type":"object","properties":{"type":{"type":"string","enum":["session.next.agent.switched.1"]},"id":{"type":"string","pattern":"^evt_"},"seq":{"type":"number"},"aggregateID":{"type":"string"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"agent":{"type":"string"}},"required":["timestamp","sessionID","messageID","agent"],"additionalProperties":false}},"required":["type","id","seq","aggregateID","data"],"additionalProperties":false}},"required":["type","id","syncEvent"],"additionalProperties":false},"SyncEventSessionNextModelSwitched":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"id":{"type":"string","pattern":"^evt_"},"syncEvent":{"type":"object","properties":{"type":{"type":"string","enum":["session.next.model.switched.1"]},"id":{"type":"string","pattern":"^evt_"},"seq":{"type":"number"},"aggregateID":{"type":"string"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"model":{"$ref":"#/components/schemas/ModelRef"}},"required":["timestamp","sessionID","messageID","model"],"additionalProperties":false}},"required":["type","id","seq","aggregateID","data"],"additionalProperties":false}},"required":["type","id","syncEvent"],"additionalProperties":false},"SyncEventSessionNextMoved":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"id":{"type":"string","pattern":"^evt_"},"syncEvent":{"type":"object","properties":{"type":{"type":"string","enum":["session.next.moved.1"]},"id":{"type":"string","pattern":"^evt_"},"seq":{"type":"number"},"aggregateID":{"type":"string"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"location":{"$ref":"#/components/schemas/LocationRef"},"subdirectory":{"type":"string"}},"required":["timestamp","sessionID","location"],"additionalProperties":false}},"required":["type","id","seq","aggregateID","data"],"additionalProperties":false}},"required":["type","id","syncEvent"],"additionalProperties":false},"SyncEventSessionNextPrompted":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"id":{"type":"string","pattern":"^evt_"},"syncEvent":{"type":"object","properties":{"type":{"type":"string","enum":["session.next.prompted.1"]},"id":{"type":"string","pattern":"^evt_"},"seq":{"type":"number"},"aggregateID":{"type":"string"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"prompt":{"$ref":"#/components/schemas/Prompt"},"delivery":{"type":"string","enum":["steer","queue"]}},"required":["timestamp","sessionID","messageID","prompt","delivery"],"additionalProperties":false}},"required":["type","id","seq","aggregateID","data"],"additionalProperties":false}},"required":["type","id","syncEvent"],"additionalProperties":false},"SyncEventSessionNextPromptAdmitted":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"id":{"type":"string","pattern":"^evt_"},"syncEvent":{"type":"object","properties":{"type":{"type":"string","enum":["session.next.prompt.admitted.1"]},"id":{"type":"string","pattern":"^evt_"},"seq":{"type":"number"},"aggregateID":{"type":"string"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"prompt":{"$ref":"#/components/schemas/Prompt"},"delivery":{"type":"string","enum":["steer","queue"]}},"required":["timestamp","sessionID","messageID","prompt","delivery"],"additionalProperties":false}},"required":["type","id","seq","aggregateID","data"],"additionalProperties":false}},"required":["type","id","syncEvent"],"additionalProperties":false},"SyncEventSessionNextContextUpdated":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"id":{"type":"string","pattern":"^evt_"},"syncEvent":{"type":"object","properties":{"type":{"type":"string","enum":["session.next.context.updated.1"]},"id":{"type":"string","pattern":"^evt_"},"seq":{"type":"number"},"aggregateID":{"type":"string"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"text":{"type":"string"}},"required":["timestamp","sessionID","messageID","text"],"additionalProperties":false}},"required":["type","id","seq","aggregateID","data"],"additionalProperties":false}},"required":["type","id","syncEvent"],"additionalProperties":false},"SyncEventSessionNextSynthetic":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"id":{"type":"string","pattern":"^evt_"},"syncEvent":{"type":"object","properties":{"type":{"type":"string","enum":["session.next.synthetic.1"]},"id":{"type":"string","pattern":"^evt_"},"seq":{"type":"number"},"aggregateID":{"type":"string"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"text":{"type":"string"}},"required":["timestamp","sessionID","messageID","text"],"additionalProperties":false}},"required":["type","id","seq","aggregateID","data"],"additionalProperties":false}},"required":["type","id","syncEvent"],"additionalProperties":false},"SyncEventSessionNextShellStarted":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"id":{"type":"string","pattern":"^evt_"},"syncEvent":{"type":"object","properties":{"type":{"type":"string","enum":["session.next.shell.started.1"]},"id":{"type":"string","pattern":"^evt_"},"seq":{"type":"number"},"aggregateID":{"type":"string"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"command":{"type":"string"}},"required":["timestamp","sessionID","messageID","callID","command"],"additionalProperties":false}},"required":["type","id","seq","aggregateID","data"],"additionalProperties":false}},"required":["type","id","syncEvent"],"additionalProperties":false},"SyncEventSessionNextShellEnded":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"id":{"type":"string","pattern":"^evt_"},"syncEvent":{"type":"object","properties":{"type":{"type":"string","enum":["session.next.shell.ended.1"]},"id":{"type":"string","pattern":"^evt_"},"seq":{"type":"number"},"aggregateID":{"type":"string"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"callID":{"type":"string"},"output":{"type":"string"}},"required":["timestamp","sessionID","callID","output"],"additionalProperties":false}},"required":["type","id","seq","aggregateID","data"],"additionalProperties":false}},"required":["type","id","syncEvent"],"additionalProperties":false},"SyncEventSessionNextStepStarted":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"id":{"type":"string","pattern":"^evt_"},"syncEvent":{"type":"object","properties":{"type":{"type":"string","enum":["session.next.step.started.1"]},"id":{"type":"string","pattern":"^evt_"},"seq":{"type":"number"},"aggregateID":{"type":"string"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"agent":{"type":"string"},"model":{"$ref":"#/components/schemas/ModelRef"},"snapshot":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","agent","model"],"additionalProperties":false}},"required":["type","id","seq","aggregateID","data"],"additionalProperties":false}},"required":["type","id","syncEvent"],"additionalProperties":false},"SyncEventSessionNextStepEnded":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"id":{"type":"string","pattern":"^evt_"},"syncEvent":{"type":"object","properties":{"type":{"type":"string","enum":["session.next.step.ended.2"]},"id":{"type":"string","pattern":"^evt_"},"seq":{"type":"number"},"aggregateID":{"type":"string"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"finish":{"type":"string"},"cost":{"type":"number"},"tokens":{"type":"object","properties":{"input":{"type":"number"},"output":{"type":"number"},"reasoning":{"type":"number"},"cache":{"type":"object","properties":{"read":{"type":"number"},"write":{"type":"number"}},"required":["read","write"],"additionalProperties":false}},"required":["input","output","reasoning","cache"],"additionalProperties":false},"snapshot":{"type":"string"},"files":{"type":"array","items":{"type":"string"}}},"required":["timestamp","sessionID","assistantMessageID","finish","cost","tokens"],"additionalProperties":false}},"required":["type","id","seq","aggregateID","data"],"additionalProperties":false}},"required":["type","id","syncEvent"],"additionalProperties":false},"SyncEventSessionNextStepFailed":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"id":{"type":"string","pattern":"^evt_"},"syncEvent":{"type":"object","properties":{"type":{"type":"string","enum":["session.next.step.failed.2"]},"id":{"type":"string","pattern":"^evt_"},"seq":{"type":"number"},"aggregateID":{"type":"string"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"error":{"$ref":"#/components/schemas/SessionErrorUnknown"}},"required":["timestamp","sessionID","assistantMessageID","error"],"additionalProperties":false}},"required":["type","id","seq","aggregateID","data"],"additionalProperties":false}},"required":["type","id","syncEvent"],"additionalProperties":false},"SyncEventSessionNextTextStarted":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"id":{"type":"string","pattern":"^evt_"},"syncEvent":{"type":"object","properties":{"type":{"type":"string","enum":["session.next.text.started.1"]},"id":{"type":"string","pattern":"^evt_"},"seq":{"type":"number"},"aggregateID":{"type":"string"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"textID":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","textID"],"additionalProperties":false}},"required":["type","id","seq","aggregateID","data"],"additionalProperties":false}},"required":["type","id","syncEvent"],"additionalProperties":false},"SyncEventSessionNextTextEnded":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"id":{"type":"string","pattern":"^evt_"},"syncEvent":{"type":"object","properties":{"type":{"type":"string","enum":["session.next.text.ended.1"]},"id":{"type":"string","pattern":"^evt_"},"seq":{"type":"number"},"aggregateID":{"type":"string"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"textID":{"type":"string"},"text":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","textID","text"],"additionalProperties":false}},"required":["type","id","seq","aggregateID","data"],"additionalProperties":false}},"required":["type","id","syncEvent"],"additionalProperties":false},"SyncEventSessionNextReasoningStarted":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"id":{"type":"string","pattern":"^evt_"},"syncEvent":{"type":"object","properties":{"type":{"type":"string","enum":["session.next.reasoning.started.1"]},"id":{"type":"string","pattern":"^evt_"},"seq":{"type":"number"},"aggregateID":{"type":"string"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"reasoningID":{"type":"string"},"providerMetadata":{"$ref":"#/components/schemas/LLMProviderMetadata"}},"required":["timestamp","sessionID","assistantMessageID","reasoningID"],"additionalProperties":false}},"required":["type","id","seq","aggregateID","data"],"additionalProperties":false}},"required":["type","id","syncEvent"],"additionalProperties":false},"SyncEventSessionNextReasoningEnded":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"id":{"type":"string","pattern":"^evt_"},"syncEvent":{"type":"object","properties":{"type":{"type":"string","enum":["session.next.reasoning.ended.1"]},"id":{"type":"string","pattern":"^evt_"},"seq":{"type":"number"},"aggregateID":{"type":"string"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"reasoningID":{"type":"string"},"text":{"type":"string"},"providerMetadata":{"$ref":"#/components/schemas/LLMProviderMetadata"}},"required":["timestamp","sessionID","assistantMessageID","reasoningID","text"],"additionalProperties":false}},"required":["type","id","seq","aggregateID","data"],"additionalProperties":false}},"required":["type","id","syncEvent"],"additionalProperties":false},"SyncEventSessionNextToolInputStarted":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"id":{"type":"string","pattern":"^evt_"},"syncEvent":{"type":"object","properties":{"type":{"type":"string","enum":["session.next.tool.input.started.1"]},"id":{"type":"string","pattern":"^evt_"},"seq":{"type":"number"},"aggregateID":{"type":"string"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"name":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","callID","name"],"additionalProperties":false}},"required":["type","id","seq","aggregateID","data"],"additionalProperties":false}},"required":["type","id","syncEvent"],"additionalProperties":false},"SyncEventSessionNextToolInputEnded":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"id":{"type":"string","pattern":"^evt_"},"syncEvent":{"type":"object","properties":{"type":{"type":"string","enum":["session.next.tool.input.ended.1"]},"id":{"type":"string","pattern":"^evt_"},"seq":{"type":"number"},"aggregateID":{"type":"string"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"text":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","callID","text"],"additionalProperties":false}},"required":["type","id","seq","aggregateID","data"],"additionalProperties":false}},"required":["type","id","syncEvent"],"additionalProperties":false},"SyncEventSessionNextToolCalled":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"id":{"type":"string","pattern":"^evt_"},"syncEvent":{"type":"object","properties":{"type":{"type":"string","enum":["session.next.tool.called.1"]},"id":{"type":"string","pattern":"^evt_"},"seq":{"type":"number"},"aggregateID":{"type":"string"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"tool":{"type":"string"},"input":{"type":"object"},"provider":{"type":"object","properties":{"executed":{"type":"boolean"},"metadata":{"$ref":"#/components/schemas/LLMProviderMetadata"}},"required":["executed"],"additionalProperties":false}},"required":["timestamp","sessionID","assistantMessageID","callID","tool","input","provider"],"additionalProperties":false}},"required":["type","id","seq","aggregateID","data"],"additionalProperties":false}},"required":["type","id","syncEvent"],"additionalProperties":false},"SyncEventSessionNextToolProgress":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"id":{"type":"string","pattern":"^evt_"},"syncEvent":{"type":"object","properties":{"type":{"type":"string","enum":["session.next.tool.progress.1"]},"id":{"type":"string","pattern":"^evt_"},"seq":{"type":"number"},"aggregateID":{"type":"string"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"structured":{"type":"object"},"content":{"type":"array","items":{"$ref":"#/components/schemas/LLMStoredToolContent"}}},"required":["timestamp","sessionID","assistantMessageID","callID","structured","content"],"additionalProperties":false}},"required":["type","id","seq","aggregateID","data"],"additionalProperties":false}},"required":["type","id","syncEvent"],"additionalProperties":false},"SyncEventSessionNextToolSuccess":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"id":{"type":"string","pattern":"^evt_"},"syncEvent":{"type":"object","properties":{"type":{"type":"string","enum":["session.next.tool.success.1"]},"id":{"type":"string","pattern":"^evt_"},"seq":{"type":"number"},"aggregateID":{"type":"string"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"structured":{"type":"object"},"content":{"type":"array","items":{"$ref":"#/components/schemas/LLMStoredToolContent"}},"outputPaths":{"type":"array","items":{"type":"string"}},"result":{},"provider":{"type":"object","properties":{"executed":{"type":"boolean"},"metadata":{"$ref":"#/components/schemas/LLMProviderMetadata"}},"required":["executed"],"additionalProperties":false}},"required":["timestamp","sessionID","assistantMessageID","callID","structured","content","provider"],"additionalProperties":false}},"required":["type","id","seq","aggregateID","data"],"additionalProperties":false}},"required":["type","id","syncEvent"],"additionalProperties":false},"SyncEventSessionNextToolFailed":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"id":{"type":"string","pattern":"^evt_"},"syncEvent":{"type":"object","properties":{"type":{"type":"string","enum":["session.next.tool.failed.1"]},"id":{"type":"string","pattern":"^evt_"},"seq":{"type":"number"},"aggregateID":{"type":"string"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"error":{"$ref":"#/components/schemas/SessionErrorUnknown"},"result":{},"provider":{"type":"object","properties":{"executed":{"type":"boolean"},"metadata":{"$ref":"#/components/schemas/LLMProviderMetadata"}},"required":["executed"],"additionalProperties":false}},"required":["timestamp","sessionID","assistantMessageID","callID","error","provider"],"additionalProperties":false}},"required":["type","id","seq","aggregateID","data"],"additionalProperties":false}},"required":["type","id","syncEvent"],"additionalProperties":false},"SyncEventSessionNextRetried":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"id":{"type":"string","pattern":"^evt_"},"syncEvent":{"type":"object","properties":{"type":{"type":"string","enum":["session.next.retried.1"]},"id":{"type":"string","pattern":"^evt_"},"seq":{"type":"number"},"aggregateID":{"type":"string"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"attempt":{"type":"number"},"error":{"$ref":"#/components/schemas/SessionNextRetry_error"}},"required":["timestamp","sessionID","attempt","error"],"additionalProperties":false}},"required":["type","id","seq","aggregateID","data"],"additionalProperties":false}},"required":["type","id","syncEvent"],"additionalProperties":false},"SyncEventSessionNextCompactionStarted":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"id":{"type":"string","pattern":"^evt_"},"syncEvent":{"type":"object","properties":{"type":{"type":"string","enum":["session.next.compaction.started.1"]},"id":{"type":"string","pattern":"^evt_"},"seq":{"type":"number"},"aggregateID":{"type":"string"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"reason":{"type":"string","enum":["auto","manual"]}},"required":["timestamp","sessionID","messageID","reason"],"additionalProperties":false}},"required":["type","id","seq","aggregateID","data"],"additionalProperties":false}},"required":["type","id","syncEvent"],"additionalProperties":false},"SyncEventSessionNextCompactionEnded":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"id":{"type":"string","pattern":"^evt_"},"syncEvent":{"type":"object","properties":{"type":{"type":"string","enum":["session.next.compaction.ended.1"]},"id":{"type":"string","pattern":"^evt_"},"seq":{"type":"number"},"aggregateID":{"type":"string"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"reason":{"type":"string","enum":["auto","manual"]},"text":{"type":"string"},"recent":{"type":"string"},"include":{"type":"string"}},"required":["timestamp","sessionID","messageID","reason","text","recent"],"additionalProperties":false}},"required":["type","id","seq","aggregateID","data"],"additionalProperties":false}},"required":["type","id","syncEvent"],"additionalProperties":false},"SyncEventSessionNextRevertStaged":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"id":{"type":"string","pattern":"^evt_"},"syncEvent":{"type":"object","properties":{"type":{"type":"string","enum":["session.next.revert.staged.1"]},"id":{"type":"string","pattern":"^evt_"},"seq":{"type":"number"},"aggregateID":{"type":"string"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"revert":{"$ref":"#/components/schemas/RevertState"}},"required":["timestamp","sessionID","revert"],"additionalProperties":false}},"required":["type","id","seq","aggregateID","data"],"additionalProperties":false}},"required":["type","id","syncEvent"],"additionalProperties":false},"SyncEventSessionNextRevertCleared":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"id":{"type":"string","pattern":"^evt_"},"syncEvent":{"type":"object","properties":{"type":{"type":"string","enum":["session.next.revert.cleared.1"]},"id":{"type":"string","pattern":"^evt_"},"seq":{"type":"number"},"aggregateID":{"type":"string"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"}},"required":["timestamp","sessionID"],"additionalProperties":false}},"required":["type","id","seq","aggregateID","data"],"additionalProperties":false}},"required":["type","id","syncEvent"],"additionalProperties":false},"SyncEventSessionNextRevertCommitted":{"type":"object","properties":{"type":{"type":"string","enum":["sync"]},"id":{"type":"string","pattern":"^evt_"},"syncEvent":{"type":"object","properties":{"type":{"type":"string","enum":["session.next.revert.committed.1"]},"id":{"type":"string","pattern":"^evt_"},"seq":{"type":"number"},"aggregateID":{"type":"string"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"}},"required":["timestamp","sessionID","messageID"],"additionalProperties":false}},"required":["type","id","seq","aggregateID","data"],"additionalProperties":false}},"required":["type","id","syncEvent"],"additionalProperties":false},"ConfigV2ReferenceGit":{"type":"object","properties":{"repository":{"type":"string"},"branch":{"type":"string"},"description":{"type":"string"},"hidden":{"type":"boolean"}},"required":["repository"],"additionalProperties":false},"ConfigV2ReferenceLocal":{"type":"object","properties":{"path":{"type":"string"},"description":{"type":"string"},"hidden":{"type":"boolean"}},"required":["path"],"additionalProperties":false},"PolicyEffect":{"type":"string","enum":["allow","deny"]},"ConfigV2ExperimentalPolicy":{"type":"object","properties":{"action":{"type":"string","enum":["provider.use"]},"effect":{"$ref":"#/components/schemas/PolicyEffect"},"resource":{"type":"string"}},"required":["action","effect","resource"],"additionalProperties":false},"ProjectDirectories":{"type":"array","items":{"type":"object","properties":{"directory":{"type":"string"},"strategy":{"type":"string"}},"required":["directory"],"additionalProperties":false}},"PtyTicketConnectToken":{"type":"object","properties":{"ticket":{"type":"string"},"expires_in":{"type":"integer","exclusiveMinimum":0}},"required":["ticket","expires_in"],"additionalProperties":false},"WorkspaceEventConnectionStatus":{"type":"object","properties":{"workspaceID":{"type":"string","pattern":"^wrk"},"status":{"type":"string","enum":["connected","connecting","disconnected","error"]}},"required":["workspaceID","status"],"additionalProperties":false},"LocationInfo":{"type":"object","properties":{"directory":{"type":"string"},"workspaceID":{"type":"string","pattern":"^wrk"},"project":{"type":"object","properties":{"id":{"type":"string"},"directory":{"type":"string"}},"required":["id","directory"],"additionalProperties":false}},"required":["directory","project"],"additionalProperties":false},"ProviderRequest":{"type":"object","properties":{"headers":{"type":"object","additionalProperties":{"type":"string"}},"body":{"type":"object"}},"required":["headers","body"],"additionalProperties":false},"AgentColor":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"string","enum":["primary","secondary","accent","success","warning","error","info"]}]},"PermissionV2Effect":{"type":"string","enum":["allow","deny","ask"]},"PermissionV2Rule":{"type":"object","properties":{"action":{"type":"string"},"resource":{"type":"string"},"effect":{"$ref":"#/components/schemas/PermissionV2Effect"}},"required":["action","resource","effect"],"additionalProperties":false},"PermissionV2Ruleset":{"type":"array","items":{"$ref":"#/components/schemas/PermissionV2Rule"}},"AgentV2Info":{"type":"object","properties":{"id":{"type":"string"},"model":{"$ref":"#/components/schemas/ModelRef"},"request":{"$ref":"#/components/schemas/ProviderRequest"},"system":{"type":"string"},"description":{"type":"string"},"mode":{"type":"string","enum":["subagent","primary","all"]},"hidden":{"type":"boolean"},"color":{"$ref":"#/components/schemas/AgentColor"},"steps":{"type":"integer","exclusiveMinimum":0},"permissions":{"$ref":"#/components/schemas/PermissionV2Ruleset"}},"required":["id","request","mode","hidden","permissions"],"additionalProperties":false},"SessionV2Info":{"type":"object","properties":{"id":{"type":"string","pattern":"^ses"},"parentID":{"type":"string","pattern":"^ses"},"projectID":{"type":"string"},"agent":{"type":"string"},"model":{"$ref":"#/components/schemas/ModelRef"},"cost":{"type":"number"},"tokens":{"type":"object","properties":{"input":{"type":"number"},"output":{"type":"number"},"reasoning":{"type":"number"},"cache":{"type":"object","properties":{"read":{"type":"number"},"write":{"type":"number"}},"required":["read","write"],"additionalProperties":false}},"required":["input","output","reasoning","cache"],"additionalProperties":false},"time":{"type":"object","properties":{"created":{"type":"number"},"updated":{"type":"number"},"archived":{"type":"number"}},"required":["created","updated"],"additionalProperties":false},"title":{"type":"string"},"location":{"$ref":"#/components/schemas/LocationRef"},"subpath":{"type":"string"},"revert":{"$ref":"#/components/schemas/RevertState"}},"required":["id","projectID","cost","tokens","time","title","location"],"additionalProperties":false},"PromptInputFileAttachment":{"type":"object","properties":{"uri":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"source":{"$ref":"#/components/schemas/PromptSource"}},"required":["uri"],"additionalProperties":false},"SessionInputAdmitted":{"type":"object","properties":{"admittedSeq":{"type":"integer","minimum":0},"id":{"type":"string","pattern":"^msg_"},"sessionID":{"type":"string","pattern":"^ses"},"prompt":{"$ref":"#/components/schemas/Prompt"},"delivery":{"type":"string","enum":["steer","queue"]},"timeCreated":{"type":"number"},"promotedSeq":{"type":"integer","minimum":0}},"required":["admittedSeq","id","sessionID","prompt","delivery","timeCreated"],"additionalProperties":false},"SessionMessageAgentSwitched":{"type":"object","properties":{"id":{"type":"string","pattern":"^msg_"},"metadata":{"type":"object"},"time":{"type":"object","properties":{"created":{"type":"number"}},"required":["created"],"additionalProperties":false},"type":{"type":"string","enum":["agent-switched"]},"agent":{"type":"string"}},"required":["id","time","type","agent"],"additionalProperties":false},"SessionMessageModelSwitched":{"type":"object","properties":{"id":{"type":"string","pattern":"^msg_"},"metadata":{"type":"object"},"time":{"type":"object","properties":{"created":{"type":"number"}},"required":["created"],"additionalProperties":false},"type":{"type":"string","enum":["model-switched"]},"model":{"$ref":"#/components/schemas/ModelRef"}},"required":["id","time","type","model"],"additionalProperties":false},"SessionMessageUser":{"type":"object","properties":{"id":{"type":"string","pattern":"^msg_"},"metadata":{"type":"object"},"time":{"type":"object","properties":{"created":{"type":"number"}},"required":["created"],"additionalProperties":false},"text":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/PromptFileAttachment"}},"agents":{"type":"array","items":{"$ref":"#/components/schemas/PromptAgentAttachment"}},"type":{"type":"string","enum":["user"]}},"required":["id","time","text","type"],"additionalProperties":false},"SessionMessageSynthetic":{"type":"object","properties":{"id":{"type":"string","pattern":"^msg_"},"metadata":{"type":"object"},"time":{"type":"object","properties":{"created":{"type":"number"}},"required":["created"],"additionalProperties":false},"sessionID":{"type":"string","pattern":"^ses"},"text":{"type":"string"},"type":{"type":"string","enum":["synthetic"]}},"required":["id","time","sessionID","text","type"],"additionalProperties":false},"SessionMessageSystem":{"type":"object","properties":{"id":{"type":"string","pattern":"^msg_"},"metadata":{"type":"object"},"time":{"type":"object","properties":{"created":{"type":"number"}},"required":["created"],"additionalProperties":false},"type":{"type":"string","enum":["system"]},"text":{"type":"string"}},"required":["id","time","type","text"],"additionalProperties":false},"SessionMessageShell":{"type":"object","properties":{"id":{"type":"string","pattern":"^msg_"},"metadata":{"type":"object"},"time":{"type":"object","properties":{"created":{"type":"number"},"completed":{"type":"number"}},"required":["created"],"additionalProperties":false},"type":{"type":"string","enum":["shell"]},"callID":{"type":"string"},"command":{"type":"string"},"output":{"type":"string"}},"required":["id","time","type","callID","command","output"],"additionalProperties":false},"SessionMessageAssistantText":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"id":{"type":"string"},"text":{"type":"string"}},"required":["type","id","text"],"additionalProperties":false},"SessionMessageAssistantReasoning":{"type":"object","properties":{"type":{"type":"string","enum":["reasoning"]},"id":{"type":"string"},"text":{"type":"string"},"providerMetadata":{"$ref":"#/components/schemas/LLMProviderMetadata"},"time":{"type":"object","properties":{"created":{"type":"number"},"completed":{"type":"number"}},"required":["created"],"additionalProperties":false}},"required":["type","id","text"],"additionalProperties":false},"SessionMessageToolStatePending":{"type":"object","properties":{"status":{"type":"string","enum":["pending"]},"input":{"type":"string"}},"required":["status","input"],"additionalProperties":false},"SessionMessageToolStateRunning":{"type":"object","properties":{"status":{"type":"string","enum":["running"]},"input":{"type":"object"},"structured":{"type":"object"},"content":{"type":"array","items":{"$ref":"#/components/schemas/LLMToolContent"}}},"required":["status","input","structured","content"],"additionalProperties":false},"SessionMessageToolStateCompleted":{"type":"object","properties":{"status":{"type":"string","enum":["completed"]},"input":{"type":"object"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/PromptFileAttachment"}},"content":{"type":"array","items":{"$ref":"#/components/schemas/LLMToolContent"}},"outputPaths":{"type":"array","items":{"type":"string"}},"structured":{"type":"object"},"result":{}},"required":["status","input","content","structured"],"additionalProperties":false},"SessionMessageToolStateError":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"input":{"type":"object"},"content":{"type":"array","items":{"$ref":"#/components/schemas/LLMToolContent"}},"structured":{"type":"object"},"error":{"$ref":"#/components/schemas/SessionErrorUnknown"},"result":{}},"required":["status","input","content","structured","error"],"additionalProperties":false},"SessionMessageAssistantTool":{"type":"object","properties":{"type":{"type":"string","enum":["tool"]},"id":{"type":"string"},"name":{"type":"string"},"provider":{"type":"object","properties":{"executed":{"type":"boolean"},"metadata":{"$ref":"#/components/schemas/LLMProviderMetadata"},"resultMetadata":{"$ref":"#/components/schemas/LLMProviderMetadata"}},"required":["executed"],"additionalProperties":false},"state":{"anyOf":[{"$ref":"#/components/schemas/SessionMessageToolStatePending"},{"$ref":"#/components/schemas/SessionMessageToolStateRunning"},{"$ref":"#/components/schemas/SessionMessageToolStateCompleted"},{"$ref":"#/components/schemas/SessionMessageToolStateError"}]},"time":{"type":"object","properties":{"created":{"type":"number"},"ran":{"type":"number"},"completed":{"type":"number"},"pruned":{"type":"number"}},"required":["created"],"additionalProperties":false}},"required":["type","id","name","state","time"],"additionalProperties":false},"SessionMessageAssistant":{"type":"object","properties":{"id":{"type":"string","pattern":"^msg_"},"metadata":{"type":"object"},"time":{"type":"object","properties":{"created":{"type":"number"},"completed":{"type":"number"}},"required":["created"],"additionalProperties":false},"type":{"type":"string","enum":["assistant"]},"agent":{"type":"string"},"model":{"$ref":"#/components/schemas/ModelRef"},"content":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/SessionMessageAssistantText"},{"$ref":"#/components/schemas/SessionMessageAssistantReasoning"},{"$ref":"#/components/schemas/SessionMessageAssistantTool"}]}},"snapshot":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"},"files":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"finish":{"type":"string"},"cost":{"type":"number"},"tokens":{"type":"object","properties":{"input":{"type":"number"},"output":{"type":"number"},"reasoning":{"type":"number"},"cache":{"type":"object","properties":{"read":{"type":"number"},"write":{"type":"number"}},"required":["read","write"],"additionalProperties":false}},"required":["input","output","reasoning","cache"],"additionalProperties":false},"error":{"$ref":"#/components/schemas/SessionErrorUnknown"}},"required":["id","time","type","agent","model","content"],"additionalProperties":false},"SessionMessageCompaction":{"type":"object","properties":{"type":{"type":"string","enum":["compaction"]},"reason":{"type":"string","enum":["auto","manual"]},"summary":{"type":"string"},"recent":{"type":"string"},"id":{"type":"string","pattern":"^msg_"},"metadata":{"type":"object"},"time":{"type":"object","properties":{"created":{"type":"number"}},"required":["created"],"additionalProperties":false}},"required":["type","reason","summary","recent","id","time"],"additionalProperties":false},"SessionMessage":{"anyOf":[{"$ref":"#/components/schemas/SessionMessageAgentSwitched"},{"$ref":"#/components/schemas/SessionMessageModelSwitched"},{"$ref":"#/components/schemas/SessionMessageUser"},{"$ref":"#/components/schemas/SessionMessageSynthetic"},{"$ref":"#/components/schemas/SessionMessageSystem"},{"$ref":"#/components/schemas/SessionMessageShell"},{"$ref":"#/components/schemas/SessionMessageAssistant"},{"$ref":"#/components/schemas/SessionMessageCompaction"}]},"SessionNextAgentSwitched":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.next.agent.switched"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"agent":{"type":"string"}},"required":["timestamp","sessionID","messageID","agent"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionNextModelSwitched":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.next.model.switched"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"model":{"$ref":"#/components/schemas/ModelRef"}},"required":["timestamp","sessionID","messageID","model"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionNextMoved":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.next.moved"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"location":{"$ref":"#/components/schemas/LocationRef"},"subdirectory":{"type":"string"}},"required":["timestamp","sessionID","location"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionNextPrompted":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.next.prompted"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"prompt":{"$ref":"#/components/schemas/Prompt"},"delivery":{"type":"string","enum":["steer","queue"]}},"required":["timestamp","sessionID","messageID","prompt","delivery"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionNextPromptAdmitted":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.next.prompt.admitted"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"prompt":{"$ref":"#/components/schemas/Prompt"},"delivery":{"type":"string","enum":["steer","queue"]}},"required":["timestamp","sessionID","messageID","prompt","delivery"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionNextContextUpdated":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.next.context.updated"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"text":{"type":"string"}},"required":["timestamp","sessionID","messageID","text"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionNextSynthetic":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.next.synthetic"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"text":{"type":"string"}},"required":["timestamp","sessionID","messageID","text"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionNextShellStarted":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.next.shell.started"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"command":{"type":"string"}},"required":["timestamp","sessionID","messageID","callID","command"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionNextShellEnded":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.next.shell.ended"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"callID":{"type":"string"},"output":{"type":"string"}},"required":["timestamp","sessionID","callID","output"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionNextStepStarted":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.next.step.started"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"agent":{"type":"string"},"model":{"$ref":"#/components/schemas/ModelRef"},"snapshot":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","agent","model"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionNextStepEnded":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.next.step.ended"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"finish":{"type":"string"},"cost":{"type":"number"},"tokens":{"type":"object","properties":{"input":{"type":"number"},"output":{"type":"number"},"reasoning":{"type":"number"},"cache":{"type":"object","properties":{"read":{"type":"number"},"write":{"type":"number"}},"required":["read","write"],"additionalProperties":false}},"required":["input","output","reasoning","cache"],"additionalProperties":false},"snapshot":{"type":"string"},"files":{"type":"array","items":{"type":"string"}}},"required":["timestamp","sessionID","assistantMessageID","finish","cost","tokens"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionNextStepFailed":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.next.step.failed"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"error":{"$ref":"#/components/schemas/SessionErrorUnknown"}},"required":["timestamp","sessionID","assistantMessageID","error"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionNextTextStarted":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.next.text.started"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"textID":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","textID"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionNextTextEnded":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.next.text.ended"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"textID":{"type":"string"},"text":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","textID","text"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionNextToolInputStarted":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.next.tool.input.started"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"name":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","callID","name"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionNextToolInputEnded":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.next.tool.input.ended"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"text":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","callID","text"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionNextToolCalled":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.next.tool.called"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"tool":{"type":"string"},"input":{"type":"object"},"provider":{"type":"object","properties":{"executed":{"type":"boolean"},"metadata":{"$ref":"#/components/schemas/LLMProviderMetadata"}},"required":["executed"],"additionalProperties":false}},"required":["timestamp","sessionID","assistantMessageID","callID","tool","input","provider"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionNextToolProgress":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.next.tool.progress"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"structured":{"type":"object"},"content":{"type":"array","items":{"$ref":"#/components/schemas/LLMStoredToolContent"}}},"required":["timestamp","sessionID","assistantMessageID","callID","structured","content"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionNextToolSuccess":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.next.tool.success"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"structured":{"type":"object"},"content":{"type":"array","items":{"$ref":"#/components/schemas/LLMStoredToolContent"}},"outputPaths":{"type":"array","items":{"type":"string"}},"result":{},"provider":{"type":"object","properties":{"executed":{"type":"boolean"},"metadata":{"$ref":"#/components/schemas/LLMProviderMetadata"}},"required":["executed"],"additionalProperties":false}},"required":["timestamp","sessionID","assistantMessageID","callID","structured","content","provider"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionNextToolFailed":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.next.tool.failed"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"error":{"$ref":"#/components/schemas/SessionErrorUnknown"},"result":{},"provider":{"type":"object","properties":{"executed":{"type":"boolean"},"metadata":{"$ref":"#/components/schemas/LLMProviderMetadata"}},"required":["executed"],"additionalProperties":false}},"required":["timestamp","sessionID","assistantMessageID","callID","error","provider"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionNextReasoningStarted":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.next.reasoning.started"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"reasoningID":{"type":"string"},"providerMetadata":{"$ref":"#/components/schemas/LLMProviderMetadata"}},"required":["timestamp","sessionID","assistantMessageID","reasoningID"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionNextReasoningEnded":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.next.reasoning.ended"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"reasoningID":{"type":"string"},"text":{"type":"string"},"providerMetadata":{"$ref":"#/components/schemas/LLMProviderMetadata"}},"required":["timestamp","sessionID","assistantMessageID","reasoningID","text"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionNextRetried":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.next.retried"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"attempt":{"type":"number"},"error":{"$ref":"#/components/schemas/SessionNextRetry_error"}},"required":["timestamp","sessionID","attempt","error"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionNextCompactionStarted":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.next.compaction.started"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"reason":{"type":"string","enum":["auto","manual"]}},"required":["timestamp","sessionID","messageID","reason"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionNextCompactionEnded":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.next.compaction.ended"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"reason":{"type":"string","enum":["auto","manual"]},"text":{"type":"string"},"recent":{"type":"string"},"include":{"type":"string"}},"required":["timestamp","sessionID","messageID","reason","text","recent"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionNextRevertStaged":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.next.revert.staged"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"revert":{"$ref":"#/components/schemas/RevertState"}},"required":["timestamp","sessionID","revert"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionNextRevertCleared":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.next.revert.cleared"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"}},"required":["timestamp","sessionID"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionNextRevertCommitted":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.next.revert.committed"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"}},"required":["timestamp","sessionID","messageID"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionNextToolProgress1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.next.tool.progress"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"structured":{"type":"object"},"content":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/LLMToolContent"},{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"source":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["data"]},"data":{"type":"string"}},"required":["type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["url"]},"url":{"type":"string"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"uri":{"type":"string"}},"required":["type","uri"],"additionalProperties":false}]},"mime":{"type":"string"},"name":{"type":"string"}},"required":["type","source","mime"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["media"]},"mediaType":{"type":"string"},"data":{"type":"string"},"filename":{"type":"string"}},"required":["type","mediaType","data"],"additionalProperties":false}]}}},"required":["timestamp","sessionID","assistantMessageID","callID","structured","content"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionNextToolSuccess1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.next.tool.success"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"structured":{"type":"object"},"content":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/LLMToolContent"},{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"source":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["data"]},"data":{"type":"string"}},"required":["type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["url"]},"url":{"type":"string"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"uri":{"type":"string"}},"required":["type","uri"],"additionalProperties":false}]},"mime":{"type":"string"},"name":{"type":"string"}},"required":["type","source","mime"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["media"]},"mediaType":{"type":"string"},"data":{"type":"string"},"filename":{"type":"string"}},"required":["type","mediaType","data"],"additionalProperties":false}]}},"outputPaths":{"type":"array","items":{"type":"string"}},"result":{},"provider":{"type":"object","properties":{"executed":{"type":"boolean"},"metadata":{"$ref":"#/components/schemas/LLMProviderMetadata"}},"required":["executed"],"additionalProperties":false}},"required":["timestamp","sessionID","assistantMessageID","callID","structured","content","provider"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"ModelApi":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["aisdk"]},"package":{"type":"string"},"url":{"type":"string"},"settings":{"type":"object"}},"required":["id","type","package"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["native"]},"url":{"type":"string"},"settings":{"type":"object"}},"required":["id","type","settings"],"additionalProperties":false}]},"ModelCapabilities":{"type":"object","properties":{"tools":{"type":"boolean"},"input":{"type":"array","items":{"type":"string"}},"output":{"type":"array","items":{"type":"string"}}},"required":["tools","input","output"],"additionalProperties":false},"ModelCost":{"type":"object","properties":{"tier":{"type":"object","properties":{"type":{"type":"string","enum":["context"]},"size":{"type":"integer"}},"required":["type","size"],"additionalProperties":false},"input":{"type":"number"},"output":{"type":"number"},"cache":{"type":"object","properties":{"read":{"type":"number"},"write":{"type":"number"}},"required":["read","write"],"additionalProperties":false}},"required":["input","output","cache"],"additionalProperties":false},"ModelV2Info":{"type":"object","properties":{"id":{"type":"string"},"providerID":{"type":"string"},"family":{"type":"string"},"name":{"type":"string"},"api":{"$ref":"#/components/schemas/ModelApi"},"capabilities":{"$ref":"#/components/schemas/ModelCapabilities"},"request":{"type":"object","properties":{"headers":{"type":"object","additionalProperties":{"type":"string"}},"body":{"type":"object"},"variant":{"type":"string"}},"required":["headers","body"],"additionalProperties":false},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"body":{"type":"object"}},"required":["id","headers","body"],"additionalProperties":false}},"time":{"type":"object","properties":{"released":{"type":"number"}},"required":["released"],"additionalProperties":false},"cost":{"type":"array","items":{"$ref":"#/components/schemas/ModelCost"}},"status":{"type":"string","enum":["alpha","beta","deprecated","active"]},"enabled":{"type":"boolean"},"limit":{"type":"object","properties":{"context":{"type":"integer"},"input":{"type":"integer"},"output":{"type":"integer"}},"required":["context","output"],"additionalProperties":false}},"required":["id","providerID","name","api","capabilities","request","variants","time","cost","status","enabled","limit"],"additionalProperties":false},"ProviderAISDK":{"type":"object","properties":{"type":{"type":"string","enum":["aisdk"]},"package":{"type":"string"},"url":{"type":"string"},"settings":{"type":"object"}},"required":["type","package"],"additionalProperties":false},"ProviderNative":{"type":"object","properties":{"type":{"type":"string","enum":["native"]},"url":{"type":"string"},"settings":{"type":"object"}},"required":["type","settings"],"additionalProperties":false},"ProviderApi":{"anyOf":[{"$ref":"#/components/schemas/ProviderAISDK"},{"$ref":"#/components/schemas/ProviderNative"}]},"ProviderV2Info":{"type":"object","properties":{"id":{"type":"string"},"integrationID":{"type":"string"},"name":{"type":"string"},"disabled":{"type":"boolean"},"api":{"$ref":"#/components/schemas/ProviderApi"},"request":{"$ref":"#/components/schemas/ProviderRequest"}},"required":["id","name","api","request"],"additionalProperties":false},"IntegrationWhen":{"type":"object","properties":{"key":{"type":"string"},"op":{"type":"string","enum":["eq","neq"]},"value":{"type":"string"}},"required":["key","op","value"],"additionalProperties":false},"IntegrationTextPrompt":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"key":{"type":"string"},"message":{"type":"string"},"placeholder":{"type":"string"},"when":{"$ref":"#/components/schemas/IntegrationWhen"}},"required":["type","key","message"],"additionalProperties":false},"IntegrationSelectPrompt":{"type":"object","properties":{"type":{"type":"string","enum":["select"]},"key":{"type":"string"},"message":{"type":"string"},"options":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"},"hint":{"type":"string"}},"required":["label","value"],"additionalProperties":false}},"when":{"$ref":"#/components/schemas/IntegrationWhen"}},"required":["type","key","message","options"],"additionalProperties":false},"IntegrationOAuthMethod":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["oauth"]},"label":{"type":"string"},"prompts":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/IntegrationTextPrompt"},{"$ref":"#/components/schemas/IntegrationSelectPrompt"}]}}},"required":["id","type","label"],"additionalProperties":false},"IntegrationKeyMethod":{"type":"object","properties":{"type":{"type":"string","enum":["key"]},"label":{"type":"string"}},"required":["type"],"additionalProperties":false},"IntegrationEnvMethod":{"type":"object","properties":{"type":{"type":"string","enum":["env"]},"names":{"type":"array","items":{"type":"string"}}},"required":["type","names"],"additionalProperties":false},"ConnectionCredentialInfo":{"type":"object","properties":{"type":{"type":"string","enum":["credential"]},"id":{"type":"string"},"label":{"type":"string"}},"required":["type","id","label"],"additionalProperties":false},"ConnectionEnvInfo":{"type":"object","properties":{"type":{"type":"string","enum":["env"]},"name":{"type":"string"}},"required":["type","name"],"additionalProperties":false},"ConnectionInfo":{"anyOf":[{"$ref":"#/components/schemas/ConnectionCredentialInfo"},{"$ref":"#/components/schemas/ConnectionEnvInfo"}]},"IntegrationInfo":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"methods":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationMethod"}},"connections":{"type":"array","items":{"$ref":"#/components/schemas/ConnectionInfo"}}},"required":["id","name","methods","connections"],"additionalProperties":false},"IntegrationAttempt":{"type":"object","properties":{"attemptID":{"type":"string"},"url":{"type":"string"},"instructions":{"type":"string"},"mode":{"type":"string","enum":["auto","code"]},"time":{"type":"object","properties":{"created":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"expires":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["created","expires"],"additionalProperties":false}},"required":["attemptID","url","instructions","mode","time"],"additionalProperties":false},"IntegrationAttemptStatus":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending"]},"time":{"type":"object","properties":{"created":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"expires":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["created","expires"],"additionalProperties":false}},"required":["status","time"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["complete"]},"time":{"type":"object","properties":{"created":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"expires":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["created","expires"],"additionalProperties":false}},"required":["status","time"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["failed"]},"message":{"type":"string"},"time":{"type":"object","properties":{"created":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"expires":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["created","expires"],"additionalProperties":false}},"required":["status","message","time"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["expired"]},"time":{"type":"object","properties":{"created":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"expires":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["created","expires"],"additionalProperties":false}},"required":["status","time"],"additionalProperties":false}]},"PermissionV2Request":{"type":"object","properties":{"id":{"type":"string","pattern":"^per"},"sessionID":{"type":"string","pattern":"^ses"},"action":{"type":"string"},"resources":{"type":"array","items":{"type":"string"}},"save":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object"},"source":{"$ref":"#/components/schemas/PermissionV2Source"}},"required":["id","sessionID","action","resources"],"additionalProperties":false},"PermissionSavedInfo":{"type":"object","properties":{"id":{"type":"string"},"projectID":{"type":"string"},"action":{"type":"string"},"resource":{"type":"string"}},"required":["id","projectID","action","resource"],"additionalProperties":false},"FileSystemEntry":{"type":"object","properties":{"path":{"type":"string"},"type":{"type":"string","enum":["file","directory"]}},"required":["path","type"],"additionalProperties":false},"CommandV2Info":{"type":"object","properties":{"name":{"type":"string"},"template":{"type":"string"},"description":{"type":"string"},"agent":{"type":"string"},"model":{"$ref":"#/components/schemas/ModelRef"},"subtask":{"type":"boolean"}},"required":["name","template"],"additionalProperties":false},"SkillV2Info":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"slash":{"type":"boolean"},"location":{"type":"string"},"content":{"type":"string"}},"required":["name","location","content"],"additionalProperties":false},"Models-devRefreshed":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["models-dev.refreshed"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{}}},"required":["id","type","data"],"additionalProperties":false},"IntegrationUpdated":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["integration.updated"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{}}},"required":["id","type","data"],"additionalProperties":false},"IntegrationConnectionUpdated":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["integration.connection.updated"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"integrationID":{"type":"string"}},"required":["integrationID"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"CatalogUpdated":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["catalog.updated"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{}}},"required":["id","type","data"],"additionalProperties":false},"SessionCreated":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.created"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"info":{"$ref":"#/components/schemas/Session"}},"required":["sessionID","info"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionUpdated":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.updated"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"info":{"$ref":"#/components/schemas/Session"}},"required":["sessionID","info"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionDeleted":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.deleted"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"info":{"$ref":"#/components/schemas/Session"}},"required":["sessionID","info"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"MessageUpdated":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["message.updated"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"info":{"$ref":"#/components/schemas/Message"}},"required":["sessionID","info"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"MessageRemoved":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["message.removed"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg"}},"required":["sessionID","messageID"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"MessagePartUpdated":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["message.part.updated"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"part":{"$ref":"#/components/schemas/Part"},"time":{"type":"number"}},"required":["sessionID","part","time"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"MessagePartRemoved":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["message.part.removed"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg"},"partID":{"type":"string","pattern":"^prt"}},"required":["sessionID","messageID","partID"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionNextTextDelta":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.next.text.delta"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"textID":{"type":"string"},"delta":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","textID","delta"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionNextReasoningDelta":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.next.reasoning.delta"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"reasoningID":{"type":"string"},"delta":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","reasoningID","delta"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionNextToolInputDelta":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.next.tool.input.delta"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"delta":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","callID","delta"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionNextCompactionDelta":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.next.compaction.delta"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"text":{"type":"string"}},"required":["timestamp","sessionID","messageID","text"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"MessagePartDelta":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["message.part.delta"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg"},"partID":{"type":"string","pattern":"^prt"},"field":{"type":"string"},"delta":{"type":"string"}},"required":["sessionID","messageID","partID","field","delta"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionDiff":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.diff"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"diff":{"type":"array","items":{"$ref":"#/components/schemas/SnapshotFileDiff"}}},"required":["sessionID","diff"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionError":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.error"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"error":{"anyOf":[{"$ref":"#/components/schemas/ProviderAuthError"},{"$ref":"#/components/schemas/UnknownError"},{"$ref":"#/components/schemas/MessageOutputLengthError"},{"$ref":"#/components/schemas/MessageAbortedError"},{"$ref":"#/components/schemas/StructuredOutputError"},{"$ref":"#/components/schemas/ContextOverflowError"},{"$ref":"#/components/schemas/ContentFilterError"},{"$ref":"#/components/schemas/APIError"}]}},"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"InstallationUpdated":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["installation.updated"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"version":{"type":"string"}},"required":["version"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"InstallationUpdate-available":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["installation.update-available"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"version":{"type":"string"}},"required":["version"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"FileEdited":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["file.edited"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"file":{"type":"string"}},"required":["file"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"ReferenceUpdated":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["reference.updated"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{}}},"required":["id","type","data"],"additionalProperties":false},"PermissionV2Asked":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["permission.v2.asked"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^per"},"sessionID":{"type":"string","pattern":"^ses"},"action":{"type":"string"},"resources":{"type":"array","items":{"type":"string"}},"save":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object"},"source":{"$ref":"#/components/schemas/PermissionV2Source"}},"required":["id","sessionID","action","resources"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"PermissionV2Replied":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["permission.v2.replied"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"requestID":{"type":"string","pattern":"^per"},"reply":{"$ref":"#/components/schemas/PermissionV2Reply"}},"required":["sessionID","requestID","reply"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"PluginAdded":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["plugin.added"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"ProjectDirectoriesUpdated":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["project.directories.updated"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"projectID":{"type":"string"}},"required":["projectID"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"FileWatcherUpdated":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["file.watcher.updated"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"file":{"type":"string"},"event":{"type":"string","enum":["add","change","unlink"]}},"required":["file","event"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"PtyCreated":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["pty.created"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"info":{"$ref":"#/components/schemas/Pty"}},"required":["info"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"PtyUpdated":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["pty.updated"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"info":{"$ref":"#/components/schemas/Pty"}},"required":["info"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"PtyExited":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["pty.exited"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^pty"},"exitCode":{"type":"integer","minimum":0}},"required":["id","exitCode"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"PtyDeleted":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["pty.deleted"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^pty"}},"required":["id"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"QuestionV2Asked":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["question.v2.asked"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^que"},"sessionID":{"type":"string","pattern":"^ses"},"questions":{"type":"array","items":{"$ref":"#/components/schemas/QuestionV2Info"},"description":"Questions to ask"},"tool":{"$ref":"#/components/schemas/QuestionV2Tool"}},"required":["id","sessionID","questions"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"QuestionV2Replied":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["question.v2.replied"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"requestID":{"type":"string","pattern":"^que"},"answers":{"type":"array","items":{"$ref":"#/components/schemas/QuestionV2Answer"}}},"required":["sessionID","requestID","answers"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"QuestionV2Rejected":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["question.v2.rejected"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"requestID":{"type":"string","pattern":"^que"}},"required":["sessionID","requestID"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"TodoUpdated":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["todo.updated"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"todos":{"type":"array","items":{"$ref":"#/components/schemas/Todo"}}},"required":["sessionID","todos"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"LspUpdated":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["lsp.updated"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{}}},"required":["id","type","data"],"additionalProperties":false},"PermissionAsked":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["permission.asked"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^per"},"sessionID":{"type":"string","pattern":"^ses"},"permission":{"type":"string"},"patterns":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object"},"always":{"type":"array","items":{"type":"string"}},"tool":{"type":"object","properties":{"messageID":{"type":"string"},"callID":{"type":"string"}},"required":["messageID","callID"],"additionalProperties":false}},"required":["id","sessionID","permission","patterns","metadata","always"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"PermissionReplied":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["permission.replied"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"requestID":{"type":"string","pattern":"^per"},"reply":{"type":"string","enum":["once","always","reject"]}},"required":["sessionID","requestID","reply"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"TuiPromptAppend":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["tui.prompt.append"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"TuiCommandExecute":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["tui.command.execute"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"command":{"anyOf":[{"type":"string","enum":["session.list","session.new","session.share","session.interrupt","session.compact","session.page.up","session.page.down","session.line.up","session.line.down","session.half.page.up","session.half.page.down","session.first","session.last","prompt.clear","prompt.submit","agent.cycle"]},{"type":"string"}]}},"required":["command"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"TuiToastShow":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["tui.toast.show"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"title":{"type":"string"},"message":{"type":"string"},"variant":{"type":"string","enum":["info","success","warning","error"]},"duration":{"type":"integer","exclusiveMinimum":0}},"required":["message","variant"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"TuiSessionSelect":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["tui.session.select"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses","description":"Session ID to navigate to"}},"required":["sessionID"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"McpToolsChanged":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["mcp.tools.changed"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"server":{"type":"string"}},"required":["server"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"McpBrowserOpenFailed":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["mcp.browser.open.failed"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"mcpName":{"type":"string"},"url":{"type":"string"}},"required":["mcpName","url"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"CommandExecuted":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["command.executed"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"name":{"type":"string"},"sessionID":{"type":"string","pattern":"^ses"},"arguments":{"type":"string"},"messageID":{"type":"string","pattern":"^msg"}},"required":["name","sessionID","arguments","messageID"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"ProjectUpdated":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["project.updated"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"id":{"type":"string"},"worktree":{"type":"string"},"vcs":{"$ref":"#/components/schemas/ProjectVcs"},"name":{"type":"string"},"icon":{"$ref":"#/components/schemas/ProjectIcon"},"commands":{"$ref":"#/components/schemas/ProjectCommands"},"time":{"$ref":"#/components/schemas/ProjectTime"},"sandboxes":{"type":"array","items":{"type":"string"}}},"required":["id","worktree","time","sandboxes"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionIdle":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.idle"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"}},"required":["sessionID"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"QuestionAsked":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["question.asked"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^que"},"sessionID":{"type":"string","pattern":"^ses"},"questions":{"type":"array","items":{"$ref":"#/components/schemas/QuestionInfo"},"description":"Questions to ask"},"blocking":{"type":"boolean"},"tool":{"$ref":"#/components/schemas/QuestionTool"}},"required":["id","sessionID","questions"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"SessionCompacted":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["session.compacted"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"}},"required":["sessionID"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"VcsBranchUpdated":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["vcs.branch.updated"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"branch":{"type":"string"}},"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"WorkspaceReady":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["workspace.ready"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"WorkspaceFailed":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["workspace.failed"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"WorkspaceStatus":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["workspace.status"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"workspaceID":{"type":"string","pattern":"^wrk"},"status":{"type":"string","enum":["connected","connecting","disconnected","error"]}},"required":["workspaceID","status"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"WorktreeReady":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["worktree.ready"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"name":{"type":"string"},"branch":{"type":"string"}},"required":["name"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"WorktreeFailed":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["worktree.failed"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"required":["id","type","data"],"additionalProperties":false},"ServerConnected":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["server.connected"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{}}},"required":["id","type","data"],"additionalProperties":false},"GlobalDisposed":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["global.disposed"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{}}},"required":["id","type","data"],"additionalProperties":false},"GlobalConfigUpdated":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"metadata":{"type":"object"},"type":{"type":"string","enum":["global.config.updated"]},"durable":{"type":"object","properties":{"aggregateID":{"type":"string"},"seq":{"type":"integer"},"version":{"type":"integer"}},"required":["aggregateID","seq","version"],"additionalProperties":false},"location":{"$ref":"#/components/schemas/LocationRef"},"data":{"type":"object","properties":{}}},"required":["id","type","data"],"additionalProperties":false},"QuestionV2Request":{"type":"object","properties":{"id":{"type":"string","pattern":"^que"},"sessionID":{"type":"string","pattern":"^ses"},"questions":{"type":"array","items":{"$ref":"#/components/schemas/QuestionV2Info"},"description":"Questions to ask"},"tool":{"$ref":"#/components/schemas/QuestionV2Tool"}},"required":["id","sessionID","questions"],"additionalProperties":false},"QuestionV2Reply":{"type":"object","properties":{"answers":{"type":"array","items":{"$ref":"#/components/schemas/QuestionV2Answer"},"description":"User answers in order of questions (each answer is an array of selected labels)"}},"required":["answers"],"additionalProperties":false},"ReferenceLocalSource":{"type":"object","properties":{"type":{"type":"string","enum":["local"]},"path":{"type":"string"},"description":{"type":"string"},"hidden":{"type":"boolean"}},"required":["type","path"],"additionalProperties":false},"ReferenceGitSource":{"type":"object","properties":{"type":{"type":"string","enum":["git"]},"repository":{"type":"string"},"branch":{"type":"string"},"description":{"type":"string"},"hidden":{"type":"boolean"}},"required":["type","repository"],"additionalProperties":false},"ReferenceSource":{"anyOf":[{"$ref":"#/components/schemas/ReferenceLocalSource"},{"$ref":"#/components/schemas/ReferenceGitSource"}]},"ReferenceInfo":{"type":"object","properties":{"name":{"type":"string"},"path":{"type":"string"},"description":{"type":"string"},"hidden":{"type":"boolean"},"source":{"$ref":"#/components/schemas/ReferenceSource"}},"required":["name","path","source"],"additionalProperties":false},"ProjectCopyCopy":{"type":"object","properties":{"directory":{"type":"string"}},"required":["directory"],"additionalProperties":false},"EventModels-devRefreshed1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["models-dev.refreshed"]},"properties":{"type":"object","properties":{}}},"required":["id","type","properties"],"additionalProperties":false},"EventIntegrationUpdated1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["integration.updated"]},"properties":{"type":"object","properties":{}}},"required":["id","type","properties"],"additionalProperties":false},"EventIntegrationConnectionUpdated1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["integration.connection.updated"]},"properties":{"type":"object","properties":{"integrationID":{"type":"string"}},"required":["integrationID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventCatalogUpdated1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["catalog.updated"]},"properties":{"type":"object","properties":{}}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionCreated1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.created"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"info":{"$ref":"#/components/schemas/Session"}},"required":["sessionID","info"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionUpdated1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.updated"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"info":{"$ref":"#/components/schemas/Session"}},"required":["sessionID","info"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionDeleted1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.deleted"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"info":{"$ref":"#/components/schemas/Session"}},"required":["sessionID","info"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventMessageUpdated1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["message.updated"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"info":{"$ref":"#/components/schemas/Message"}},"required":["sessionID","info"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventMessageRemoved1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["message.removed"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg"}},"required":["sessionID","messageID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventMessagePartUpdated1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["message.part.updated"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"part":{"$ref":"#/components/schemas/Part"},"time":{"type":"number"}},"required":["sessionID","part","time"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventMessagePartRemoved1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["message.part.removed"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg"},"partID":{"type":"string","pattern":"^prt"}},"required":["sessionID","messageID","partID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextAgentSwitched1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.agent.switched"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"agent":{"type":"string"}},"required":["timestamp","sessionID","messageID","agent"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextModelSwitched1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.model.switched"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"model":{"$ref":"#/components/schemas/ModelRef"}},"required":["timestamp","sessionID","messageID","model"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextMoved1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.moved"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"location":{"$ref":"#/components/schemas/LocationRef"},"subdirectory":{"type":"string"}},"required":["timestamp","sessionID","location"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextPrompted1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.prompted"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"prompt":{"$ref":"#/components/schemas/Prompt"},"delivery":{"type":"string","enum":["steer","queue"]}},"required":["timestamp","sessionID","messageID","prompt","delivery"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextPromptAdmitted1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.prompt.admitted"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"prompt":{"$ref":"#/components/schemas/Prompt"},"delivery":{"type":"string","enum":["steer","queue"]}},"required":["timestamp","sessionID","messageID","prompt","delivery"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextContextUpdated1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.context.updated"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"text":{"type":"string"}},"required":["timestamp","sessionID","messageID","text"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextSynthetic1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.synthetic"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"text":{"type":"string"}},"required":["timestamp","sessionID","messageID","text"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextShellStarted1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.shell.started"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"command":{"type":"string"}},"required":["timestamp","sessionID","messageID","callID","command"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextShellEnded1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.shell.ended"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"callID":{"type":"string"},"output":{"type":"string"}},"required":["timestamp","sessionID","callID","output"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextStepStarted1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.step.started"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"agent":{"type":"string"},"model":{"$ref":"#/components/schemas/ModelRef"},"snapshot":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","agent","model"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextStepEnded1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.step.ended"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"finish":{"type":"string"},"cost":{"type":"number"},"tokens":{"type":"object","properties":{"input":{"type":"number"},"output":{"type":"number"},"reasoning":{"type":"number"},"cache":{"type":"object","properties":{"read":{"type":"number"},"write":{"type":"number"}},"required":["read","write"],"additionalProperties":false}},"required":["input","output","reasoning","cache"],"additionalProperties":false},"snapshot":{"type":"string"},"files":{"type":"array","items":{"type":"string"}}},"required":["timestamp","sessionID","assistantMessageID","finish","cost","tokens"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextStepFailed1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.step.failed"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"error":{"$ref":"#/components/schemas/SessionErrorUnknown"}},"required":["timestamp","sessionID","assistantMessageID","error"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextTextStarted1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.text.started"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"textID":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","textID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextTextDelta1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.text.delta"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"textID":{"type":"string"},"delta":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","textID","delta"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextTextEnded1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.text.ended"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"textID":{"type":"string"},"text":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","textID","text"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextReasoningStarted1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.reasoning.started"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"reasoningID":{"type":"string"},"providerMetadata":{"$ref":"#/components/schemas/LLMProviderMetadata"}},"required":["timestamp","sessionID","assistantMessageID","reasoningID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextReasoningDelta1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.reasoning.delta"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"reasoningID":{"type":"string"},"delta":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","reasoningID","delta"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextReasoningEnded1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.reasoning.ended"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"reasoningID":{"type":"string"},"text":{"type":"string"},"providerMetadata":{"$ref":"#/components/schemas/LLMProviderMetadata"}},"required":["timestamp","sessionID","assistantMessageID","reasoningID","text"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextToolInputStarted1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.tool.input.started"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"name":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","callID","name"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextToolInputDelta1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.tool.input.delta"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"delta":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","callID","delta"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextToolInputEnded1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.tool.input.ended"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"text":{"type":"string"}},"required":["timestamp","sessionID","assistantMessageID","callID","text"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextToolCalled1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.tool.called"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"tool":{"type":"string"},"input":{"type":"object"},"provider":{"type":"object","properties":{"executed":{"type":"boolean"},"metadata":{"$ref":"#/components/schemas/LLMProviderMetadata"}},"required":["executed"],"additionalProperties":false}},"required":["timestamp","sessionID","assistantMessageID","callID","tool","input","provider"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextToolProgress1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.tool.progress"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"structured":{"type":"object"},"content":{"type":"array","items":{"$ref":"#/components/schemas/LLMStoredToolContent"}}},"required":["timestamp","sessionID","assistantMessageID","callID","structured","content"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextToolSuccess1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.tool.success"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"structured":{"type":"object"},"content":{"type":"array","items":{"$ref":"#/components/schemas/LLMStoredToolContent"}},"outputPaths":{"type":"array","items":{"type":"string"}},"result":{},"provider":{"type":"object","properties":{"executed":{"type":"boolean"},"metadata":{"$ref":"#/components/schemas/LLMProviderMetadata"}},"required":["executed"],"additionalProperties":false}},"required":["timestamp","sessionID","assistantMessageID","callID","structured","content","provider"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextToolFailed1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.tool.failed"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"assistantMessageID":{"type":"string","pattern":"^msg_"},"callID":{"type":"string"},"error":{"$ref":"#/components/schemas/SessionErrorUnknown"},"result":{},"provider":{"type":"object","properties":{"executed":{"type":"boolean"},"metadata":{"$ref":"#/components/schemas/LLMProviderMetadata"}},"required":["executed"],"additionalProperties":false}},"required":["timestamp","sessionID","assistantMessageID","callID","error","provider"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextRetried1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.retried"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"attempt":{"type":"number"},"error":{"$ref":"#/components/schemas/SessionNextRetry_error"}},"required":["timestamp","sessionID","attempt","error"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextCompactionStarted1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.compaction.started"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"reason":{"type":"string","enum":["auto","manual"]}},"required":["timestamp","sessionID","messageID","reason"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextCompactionDelta1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.compaction.delta"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"text":{"type":"string"}},"required":["timestamp","sessionID","messageID","text"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextCompactionEnded1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.compaction.ended"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"},"reason":{"type":"string","enum":["auto","manual"]},"text":{"type":"string"},"recent":{"type":"string"},"include":{"type":"string"}},"required":["timestamp","sessionID","messageID","reason","text","recent"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextRevertStaged1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.revert.staged"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"revert":{"$ref":"#/components/schemas/RevertState"}},"required":["timestamp","sessionID","revert"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextRevertCleared1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.revert.cleared"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"}},"required":["timestamp","sessionID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionNextRevertCommitted1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.next.revert.committed"]},"properties":{"type":"object","properties":{"timestamp":{"type":"number"},"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg_"}},"required":["timestamp","sessionID","messageID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventMessagePartDelta1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["message.part.delta"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"messageID":{"type":"string","pattern":"^msg"},"partID":{"type":"string","pattern":"^prt"},"field":{"type":"string"},"delta":{"type":"string"}},"required":["sessionID","messageID","partID","field","delta"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionDiff1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.diff"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"diff":{"type":"array","items":{"$ref":"#/components/schemas/SnapshotFileDiff"}}},"required":["sessionID","diff"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionError1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.error"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"error":{"anyOf":[{"$ref":"#/components/schemas/ProviderAuthError"},{"$ref":"#/components/schemas/UnknownError"},{"$ref":"#/components/schemas/MessageOutputLengthError"},{"$ref":"#/components/schemas/MessageAbortedError"},{"$ref":"#/components/schemas/StructuredOutputError"},{"$ref":"#/components/schemas/ContextOverflowError"},{"$ref":"#/components/schemas/ContentFilterError"},{"$ref":"#/components/schemas/APIError"}]}},"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventInstallationUpdated1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["installation.updated"]},"properties":{"type":"object","properties":{"version":{"type":"string"}},"required":["version"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventInstallationUpdate-available1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["installation.update-available"]},"properties":{"type":"object","properties":{"version":{"type":"string"}},"required":["version"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventFileEdited1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["file.edited"]},"properties":{"type":"object","properties":{"file":{"type":"string"}},"required":["file"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventReferenceUpdated1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["reference.updated"]},"properties":{"type":"object","properties":{}}},"required":["id","type","properties"],"additionalProperties":false},"EventPermissionV2Asked1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["permission.v2.asked"]},"properties":{"type":"object","properties":{"id":{"type":"string","pattern":"^per"},"sessionID":{"type":"string","pattern":"^ses"},"action":{"type":"string"},"resources":{"type":"array","items":{"type":"string"}},"save":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object"},"source":{"$ref":"#/components/schemas/PermissionV2Source"}},"required":["id","sessionID","action","resources"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventPermissionV2Replied1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["permission.v2.replied"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"requestID":{"type":"string","pattern":"^per"},"reply":{"$ref":"#/components/schemas/PermissionV2Reply"}},"required":["sessionID","requestID","reply"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventPluginAdded1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["plugin.added"]},"properties":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventProjectDirectoriesUpdated1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["project.directories.updated"]},"properties":{"type":"object","properties":{"projectID":{"type":"string"}},"required":["projectID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventFileWatcherUpdated1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["file.watcher.updated"]},"properties":{"type":"object","properties":{"file":{"type":"string"},"event":{"type":"string","enum":["add","change","unlink"]}},"required":["file","event"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventPtyCreated1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["pty.created"]},"properties":{"type":"object","properties":{"info":{"$ref":"#/components/schemas/Pty"}},"required":["info"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventPtyUpdated1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["pty.updated"]},"properties":{"type":"object","properties":{"info":{"$ref":"#/components/schemas/Pty"}},"required":["info"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventPtyExited1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["pty.exited"]},"properties":{"type":"object","properties":{"id":{"type":"string","pattern":"^pty"},"exitCode":{"type":"integer","minimum":0}},"required":["id","exitCode"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventPtyDeleted1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["pty.deleted"]},"properties":{"type":"object","properties":{"id":{"type":"string","pattern":"^pty"}},"required":["id"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventQuestionV2Asked1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["question.v2.asked"]},"properties":{"type":"object","properties":{"id":{"type":"string","pattern":"^que"},"sessionID":{"type":"string","pattern":"^ses"},"questions":{"type":"array","items":{"$ref":"#/components/schemas/QuestionV2Info"},"description":"Questions to ask"},"tool":{"$ref":"#/components/schemas/QuestionV2Tool"}},"required":["id","sessionID","questions"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventQuestionV2Replied1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["question.v2.replied"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"requestID":{"type":"string","pattern":"^que"},"answers":{"type":"array","items":{"$ref":"#/components/schemas/QuestionV2Answer"}}},"required":["sessionID","requestID","answers"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventQuestionV2Rejected1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["question.v2.rejected"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"requestID":{"type":"string","pattern":"^que"}},"required":["sessionID","requestID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventTodoUpdated1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["todo.updated"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"todos":{"type":"array","items":{"$ref":"#/components/schemas/Todo"}}},"required":["sessionID","todos"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventLspUpdated1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["lsp.updated"]},"properties":{"type":"object","properties":{}}},"required":["id","type","properties"],"additionalProperties":false},"EventPermissionAsked1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["permission.asked"]},"properties":{"type":"object","properties":{"id":{"type":"string","pattern":"^per"},"sessionID":{"type":"string","pattern":"^ses"},"permission":{"type":"string"},"patterns":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object"},"always":{"type":"array","items":{"type":"string"}},"tool":{"type":"object","properties":{"messageID":{"type":"string"},"callID":{"type":"string"}},"required":["messageID","callID"],"additionalProperties":false}},"required":["id","sessionID","permission","patterns","metadata","always"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventPermissionReplied1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["permission.replied"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"requestID":{"type":"string","pattern":"^per"},"reply":{"type":"string","enum":["once","always","reject"]}},"required":["sessionID","requestID","reply"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventTuiPromptAppend1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["tui.prompt.append"]},"properties":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventTuiCommandExecute1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["tui.command.execute"]},"properties":{"type":"object","properties":{"command":{"anyOf":[{"type":"string","enum":["session.list","session.new","session.share","session.interrupt","session.compact","session.page.up","session.page.down","session.line.up","session.line.down","session.half.page.up","session.half.page.down","session.first","session.last","prompt.clear","prompt.submit","agent.cycle"]},{"type":"string"}]}},"required":["command"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventTuiToastShow1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["tui.toast.show"]},"properties":{"type":"object","properties":{"title":{"type":"string"},"message":{"type":"string"},"variant":{"type":"string","enum":["info","success","warning","error"]},"duration":{"type":"integer","exclusiveMinimum":0}},"required":["message","variant"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventTuiSessionSelect1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["tui.session.select"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses","description":"Session ID to navigate to"}},"required":["sessionID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventMcpToolsChanged1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["mcp.tools.changed"]},"properties":{"type":"object","properties":{"server":{"type":"string"}},"required":["server"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventMcpBrowserOpenFailed1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["mcp.browser.open.failed"]},"properties":{"type":"object","properties":{"mcpName":{"type":"string"},"url":{"type":"string"}},"required":["mcpName","url"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventCommandExecuted1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["command.executed"]},"properties":{"type":"object","properties":{"name":{"type":"string"},"sessionID":{"type":"string","pattern":"^ses"},"arguments":{"type":"string"},"messageID":{"type":"string","pattern":"^msg"}},"required":["name","sessionID","arguments","messageID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventProjectUpdated1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["project.updated"]},"properties":{"type":"object","properties":{"id":{"type":"string"},"worktree":{"type":"string"},"vcs":{"$ref":"#/components/schemas/ProjectVcs"},"name":{"type":"string"},"icon":{"$ref":"#/components/schemas/ProjectIcon"},"commands":{"$ref":"#/components/schemas/ProjectCommands"},"time":{"$ref":"#/components/schemas/ProjectTime"},"sandboxes":{"type":"array","items":{"type":"string"}}},"required":["id","worktree","time","sandboxes"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionStatus1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.status"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"status":{"$ref":"#/components/schemas/SessionStatus"}},"required":["sessionID","status"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionIdle1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.idle"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"}},"required":["sessionID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventQuestionAsked1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["question.asked"]},"properties":{"type":"object","properties":{"id":{"type":"string","pattern":"^que"},"sessionID":{"type":"string","pattern":"^ses"},"questions":{"type":"array","items":{"$ref":"#/components/schemas/QuestionInfo"},"description":"Questions to ask"},"blocking":{"type":"boolean"},"tool":{"$ref":"#/components/schemas/QuestionTool"}},"required":["id","sessionID","questions"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventQuestionReplied1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["question.replied"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"requestID":{"type":"string","pattern":"^que"},"answers":{"type":"array","items":{"$ref":"#/components/schemas/QuestionAnswer"}}},"required":["sessionID","requestID","answers"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventQuestionRejected1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["question.rejected"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"},"requestID":{"type":"string","pattern":"^que"}},"required":["sessionID","requestID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventSessionCompacted1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["session.compacted"]},"properties":{"type":"object","properties":{"sessionID":{"type":"string","pattern":"^ses"}},"required":["sessionID"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventVcsBranchUpdated1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["vcs.branch.updated"]},"properties":{"type":"object","properties":{"branch":{"type":"string"}},"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventWorkspaceReady1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["workspace.ready"]},"properties":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventWorkspaceFailed1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["workspace.failed"]},"properties":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventWorkspaceStatus1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["workspace.status"]},"properties":{"type":"object","properties":{"workspaceID":{"type":"string","pattern":"^wrk"},"status":{"type":"string","enum":["connected","connecting","disconnected","error"]}},"required":["workspaceID","status"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventWorktreeReady1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["worktree.ready"]},"properties":{"type":"object","properties":{"name":{"type":"string"},"branch":{"type":"string"}},"required":["name"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventWorktreeFailed1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["worktree.failed"]},"properties":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventServerConnected1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["server.connected"]},"properties":{"type":"object","properties":{}}},"required":["id","type","properties"],"additionalProperties":false},"EventGlobalDisposed1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["global.disposed"]},"properties":{"type":"object","properties":{}}},"required":["id","type","properties"],"additionalProperties":false},"EventGlobalConfigUpdated1":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string","enum":["global.config.updated"]},"properties":{"type":"object","properties":{}}},"required":["id","type","properties"],"additionalProperties":false},"EventMemoryStatus1":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["memory.status"]},"properties":{"type":"object","properties":{"directory":{"type":"string"},"sessionID":{"type":"string"},"enabled":{"type":"boolean"},"state":{"type":"string","enum":["idle","checking","injecting","updating","skipped","error"]},"reason":{"type":"string"},"project":{"type":"object","properties":{"bytes":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]}]},"estimatedTokens":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]}]},"truncated":{"type":"boolean"},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]}]}},"required":["bytes","estimatedTokens","truncated"],"additionalProperties":false},"consolidation":{"type":"object","properties":{"trigger":{"type":"string","enum":["explicit","turn-close","rebuild"]},"operationCount":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]}]},"cost":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]}]},"tokens":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]}]}},"required":["trigger","operationCount","cost","tokens"],"additionalProperties":false},"detail":{"type":"object","properties":{"type":{"type":"string","enum":["saved","skipped","recalled"]},"message":{"type":"string"},"reason":{"type":"string"},"duplicateOf":{"type":"string"},"tokens":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]}]},"operationCount":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]}]},"added":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]}]},"removed":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]}]},"skippedCount":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]}]},"sources":{"type":"array","items":{"type":"string"}},"files":{"type":"array","items":{"type":"string"}}},"required":["type","message"],"additionalProperties":false}},"required":["directory","enabled","state","project"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventMemoryUpdated1":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["memory.updated"]},"properties":{"type":"object","properties":{"directory":{"type":"string"},"sessionID":{"type":"string"},"enabled":{"type":"boolean"},"state":{"type":"string","enum":["idle","checking","injecting","updating","skipped","error"]},"reason":{"type":"string"},"project":{"type":"object","properties":{"bytes":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]}]},"estimatedTokens":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]}]},"truncated":{"type":"boolean"},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]}]}},"required":["bytes","estimatedTokens","truncated"],"additionalProperties":false},"consolidation":{"type":"object","properties":{"trigger":{"type":"string","enum":["explicit","turn-close","rebuild"]},"operationCount":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]}]},"cost":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]}]},"tokens":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]}]}},"required":["trigger","operationCount","cost","tokens"],"additionalProperties":false},"detail":{"type":"object","properties":{"type":{"type":"string","enum":["saved","skipped","recalled"]},"message":{"type":"string"},"reason":{"type":"string"},"duplicateOf":{"type":"string"},"tokens":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]}]},"operationCount":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]}]},"added":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]}]},"removed":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]}]},"skippedCount":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]}]},"sources":{"type":"array","items":{"type":"string"}},"files":{"type":"array","items":{"type":"string"}}},"required":["type","message"],"additionalProperties":false}},"required":["directory","enabled","state","project"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventMemoryError1":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["memory.error"]},"properties":{"type":"object","properties":{"directory":{"type":"string"},"sessionID":{"type":"string"},"enabled":{"type":"boolean"},"state":{"type":"string","enum":["idle","checking","injecting","updating","skipped","error"]},"reason":{"type":"string"},"project":{"type":"object","properties":{"bytes":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]}]},"estimatedTokens":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]}]},"truncated":{"type":"boolean"},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]}]}},"required":["bytes","estimatedTokens","truncated"],"additionalProperties":false},"consolidation":{"type":"object","properties":{"trigger":{"type":"string","enum":["explicit","turn-close","rebuild"]},"operationCount":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]}]},"cost":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]}]},"tokens":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]}]}},"required":["trigger","operationCount","cost","tokens"],"additionalProperties":false},"detail":{"type":"object","properties":{"type":{"type":"string","enum":["saved","skipped","recalled"]},"message":{"type":"string"},"reason":{"type":"string"},"duplicateOf":{"type":"string"},"tokens":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]}]},"operationCount":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]}]},"added":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]}]},"removed":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]}]},"skippedCount":{"anyOf":[{"type":"number"},{"type":"string","enum":["NaN"]},{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]}]},"sources":{"type":"array","items":{"type":"string"}},"files":{"type":"array","items":{"type":"string"}}},"required":["type","message"],"additionalProperties":false}},"required":["directory","enabled","state","project"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"EventTuiToastShow2":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["tui.toast.show"]},"properties":{"type":"object","properties":{"title":{"type":"string"},"message":{"type":"string"},"variant":{"type":"string","enum":["info","success","warning","error"]},"duration":{"type":"integer","exclusiveMinimum":0}},"required":["message","variant"],"additionalProperties":false}},"required":["id","type","properties"],"additionalProperties":false},"CredentialOAuth":{"type":"object","properties":{"type":{"type":"string","enum":["oauth"]},"methodID":{"type":"string"},"refresh":{"type":"string"},"access":{"type":"string"},"expires":{"type":"integer","minimum":0},"metadata":{"type":"object"}},"required":["type","methodID","refresh","access","expires"],"additionalProperties":false},"CredentialKey":{"type":"object","properties":{"type":{"type":"string","enum":["key"]},"key":{"type":"string"},"metadata":{"type":"object"}},"required":["type","key"],"additionalProperties":false},"SkillV2DirectorySource":{"type":"object","properties":{"type":{"type":"string","enum":["directory"]},"path":{"type":"string"}},"required":["type","path"],"additionalProperties":false},"SkillV2UrlSource":{"type":"object","properties":{"type":{"type":"string","enum":["url"]},"url":{"type":"string"}},"required":["type","url"],"additionalProperties":false},"SkillV2EmbeddedSource":{"type":"object","properties":{"type":{"type":"string","enum":["embedded"]},"skill":{"$ref":"#/components/schemas/SkillV2Info"}},"required":["type","skill"],"additionalProperties":false},"BadRequestError":{"type":"object","required":["name","data"],"properties":{"name":{"type":"string","enum":["BadRequest"]},"data":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"kind":{"type":"string","enum":["Params","Headers","Query","Body","Payload"]}}}}}}},"security":[],"tags":[{"name":"control","description":"Control plane routes."},{"name":"controlPlane","description":"Control-plane orchestration routes."},{"name":"global","description":"Global server routes."},{"name":"event","description":"Instance event stream route."},{"name":"config","description":"Experimental HttpApi config routes."},{"name":"experimental","description":"Experimental HttpApi read-only routes."},{"name":"file","description":"Experimental HttpApi file routes."},{"name":"instance","description":"Experimental HttpApi instance read routes."},{"name":"mcp","description":"Experimental HttpApi MCP routes."},{"name":"project","description":"Experimental HttpApi project routes."},{"name":"projectCopy","description":"Project copy naming routes."},{"name":"pty","description":"Experimental HttpApi PTY routes."},{"name":"question","description":"Question routes."},{"name":"permission","description":"Experimental HttpApi permission routes."},{"name":"provider","description":"Experimental HttpApi provider routes."},{"name":"session","description":"Experimental HttpApi session routes."},{"name":"sync","description":"Experimental HttpApi sync routes."},{"name":"tui","description":"Experimental HttpApi TUI routes."},{"name":"workspace","description":"Experimental HttpApi workspace routes."},{"name":"agent-builder","description":"Kilo agent builder routes."},{"name":"background-process","description":"Kilo background process routes."},{"name":"branch-name","description":"Kilo branch name routes."},{"name":"commit-message","description":"Kilo commit message routes."},{"name":"config-console","description":"Kilo Console config routes."},{"name":"enhance-prompt","description":"Kilo enhance prompt routes."},{"name":"indexing","description":"Kilo indexing routes."},{"name":"instance-reload","description":"Kilo instance reload route."},{"name":"interactive-terminal","description":"Kilo human-driven interactive terminal routes."},{"name":"kilo","description":"Kilo Gateway routes."},{"name":"kilocode","description":"Kilo-specific routes."},{"name":"anaconda-desktop","description":"Local Anaconda Desktop provider setup routes."},{"name":"network","description":"Kilo network routes."},{"name":"remote","description":"Kilo remote connection routes."},{"name":"sandbox","description":"Kilo session sandbox routes."},{"name":"session-import","description":"Kilo legacy session import routes."},{"name":"suggestion","description":"Kilo suggestion routes."},{"name":"telemetry","description":"Kilo telemetry routes."},{"name":"memory","description":"Kilo memory routes."},{"name":"opencode HttpApi","description":"Experimental HttpApi surface for selected instance routes."},{"name":"opencode HttpApi","description":"Experimental HttpApi surface for selected instance routes."},{"name":"opencode HttpApi","description":"Experimental HttpApi surface for selected instance routes."},{"name":"sessions","description":"Experimental session routes."},{"name":"messages","description":"Experimental message routes."},{"name":"models","description":"Experimental model routes."},{"name":"providers","description":"Experimental provider routes."},{"name":"integrations","description":"Integration discovery and authentication routes."},{"name":"opencode HttpApi","description":"Experimental HttpApi surface for selected instance routes."},{"name":"permissions","description":"Experimental permission routes."},{"name":"filesystem","description":"Experimental location-scoped filesystem routes."},{"name":"commands","description":"Experimental command routes."},{"name":"skills","description":"Experimental skill routes."},{"name":"events","description":"Experimental event stream route."},{"name":"pty","description":"Experimental location-scoped PTY routes."},{"name":"session questions","description":"Experimental session question routes."},{"name":"reference","description":"Location-scoped project references."},{"name":"projectCopy","description":"Project copy management routes."},{"name":"pty","description":"PTY websocket route."}]} \ No newline at end of file diff --git a/packages/sdk/js/src/v2/gen/client.gen.ts b/packages/sdk/js/src/v2/gen/client.gen.ts index 9aa0dded657..0c110eca39b 100644 --- a/packages/sdk/js/src/v2/gen/client.gen.ts +++ b/packages/sdk/js/src/v2/gen/client.gen.ts @@ -1,7 +1,7 @@ // This file is auto-generated by @hey-api/openapi-ts -import { type ClientOptions, type Config, createClient, createConfig } from './client/index.js'; -import type { ClientOptions as ClientOptions2 } from './types.gen.js'; +import { type ClientOptions, type Config, createClient, createConfig } from "./client/index.js" +import type { ClientOptions as ClientOptions2 } from "./types.gen.js" /** * The `createClientConfig()` function will be called on client initialization @@ -11,6 +11,8 @@ import type { ClientOptions as ClientOptions2 } from './types.gen.js'; * `setConfig()`. This is useful for example if you're using Next.js * to ensure your client always has the correct values. */ -export type CreateClientConfig = (override?: Config) => Config & T>; +export type CreateClientConfig = ( + override?: Config, +) => Config & T> -export const client = createClient(createConfig({ baseUrl: 'http://localhost:4096' })); +export const client = createClient(createConfig({ baseUrl: "http://localhost:4096" })) diff --git a/packages/sdk/js/src/v2/gen/client/client.gen.ts b/packages/sdk/js/src/v2/gen/client/client.gen.ts index 8eea2b63733..627e98ec420 100644 --- a/packages/sdk/js/src/v2/gen/client/client.gen.ts +++ b/packages/sdk/js/src/v2/gen/client/client.gen.ts @@ -1,14 +1,9 @@ // This file is auto-generated by @hey-api/openapi-ts -import { createSseClient } from '../core/serverSentEvents.gen.js'; -import type { HttpMethod } from '../core/types.gen.js'; -import { getValidRequestBody } from '../core/utils.gen.js'; -import type { - Client, - Config, - RequestOptions, - ResolvedRequestOptions, -} from './types.gen.js'; +import { createSseClient } from "../core/serverSentEvents.gen.js" +import type { HttpMethod } from "../core/types.gen.js" +import { getValidRequestBody } from "../core/utils.gen.js" +import type { Client, Config, RequestOptions, ResolvedRequestOptions } from "./types.gen.js" import { buildUrl, createConfig, @@ -17,29 +12,24 @@ import { mergeConfigs, mergeHeaders, setAuthParams, -} from './utils.gen.js'; +} from "./utils.gen.js" -type ReqInit = Omit & { - body?: any; - headers: ReturnType; -}; +type ReqInit = Omit & { + body?: any + headers: ReturnType +} export const createClient = (config: Config = {}): Client => { - let _config = mergeConfigs(createConfig(), config); + let _config = mergeConfigs(createConfig(), config) - const getConfig = (): Config => ({ ..._config }); + const getConfig = (): Config => ({ ..._config }) const setConfig = (config: Config): Config => { - _config = mergeConfigs(_config, config); - return getConfig(); - }; + _config = mergeConfigs(_config, config) + return getConfig() + } - const interceptors = createInterceptors< - Request, - Response, - unknown, - ResolvedRequestOptions - >(); + const interceptors = createInterceptors() const beforeRequest = async (options: RequestOptions) => { const opts = { @@ -48,264 +38,248 @@ export const createClient = (config: Config = {}): Client => { fetch: options.fetch ?? _config.fetch ?? globalThis.fetch, headers: mergeHeaders(_config.headers, options.headers), serializedBody: undefined, - }; + } if (opts.security) { await setAuthParams({ ...opts, security: opts.security, - }); + }) } if (opts.requestValidator) { - await opts.requestValidator(opts); + await opts.requestValidator(opts) } if (opts.body !== undefined && opts.bodySerializer) { - opts.serializedBody = opts.bodySerializer(opts.body); + opts.serializedBody = opts.bodySerializer(opts.body) } // remove Content-Type header if body is empty to avoid sending invalid requests - if (opts.body === undefined || opts.serializedBody === '') { - opts.headers.delete('Content-Type'); + if (opts.body === undefined || opts.serializedBody === "") { + opts.headers.delete("Content-Type") } - const url = buildUrl(opts); + const url = buildUrl(opts) - return { opts, url }; - }; + return { opts, url } + } - const request: Client['request'] = async (options) => { + const request: Client["request"] = async (options) => { // @ts-expect-error - const { opts, url } = await beforeRequest(options); + const { opts, url } = await beforeRequest(options) const requestInit: ReqInit = { - redirect: 'follow', + redirect: "follow", ...opts, body: getValidRequestBody(opts), - }; + } - let request = new Request(url, requestInit); + let request = new Request(url, requestInit) for (const fn of interceptors.request.fns) { if (fn) { - request = await fn(request, opts); + request = await fn(request, opts) } } // fetch must be assigned here, otherwise it would throw the error: // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation - const _fetch = opts.fetch!; - let response: Response; + const _fetch = opts.fetch! + let response: Response try { - response = await _fetch(request); + response = await _fetch(request) } catch (error) { // Handle fetch exceptions (AbortError, network errors, etc.) - let finalError = error; + let finalError = error for (const fn of interceptors.error.fns) { if (fn) { - finalError = (await fn( - error, - undefined as any, - request, - opts, - )) as unknown; + finalError = (await fn(error, undefined as any, request, opts)) as unknown } } - finalError = finalError || ({} as unknown); + finalError = finalError || ({} as unknown) if (opts.throwOnError) { - throw finalError; + throw finalError } // Return error response - return opts.responseStyle === 'data' + return opts.responseStyle === "data" ? undefined : { error: finalError, request, response: undefined as any, - }; + } } for (const fn of interceptors.response.fns) { if (fn) { - response = await fn(response, request, opts); + response = await fn(response, request, opts) } } const result = { request, response, - }; + } if (response.ok) { const parseAs = - (opts.parseAs === 'auto' - ? getParseAs(response.headers.get('Content-Type')) - : opts.parseAs) ?? 'json'; + (opts.parseAs === "auto" ? getParseAs(response.headers.get("Content-Type")) : opts.parseAs) ?? "json" - if ( - response.status === 204 || - response.headers.get('Content-Length') === '0' - ) { - let emptyData: any; + if (response.status === 204 || response.headers.get("Content-Length") === "0") { + let emptyData: any switch (parseAs) { - case 'arrayBuffer': - case 'blob': - case 'text': - emptyData = await response[parseAs](); - break; - case 'formData': - emptyData = new FormData(); - break; - case 'stream': - emptyData = response.body; - break; - case 'json': + case "arrayBuffer": + case "blob": + case "text": + emptyData = await response[parseAs]() + break + case "formData": + emptyData = new FormData() + break + case "stream": + emptyData = response.body + break + case "json": default: - emptyData = {}; - break; + emptyData = {} + break } - return opts.responseStyle === 'data' + return opts.responseStyle === "data" ? emptyData : { data: emptyData, ...result, - }; + } } - let data: any; + let data: any switch (parseAs) { - case 'arrayBuffer': - case 'blob': - case 'formData': - case 'text': - data = await response[parseAs](); - break; - case 'json': { + case "arrayBuffer": + case "blob": + case "formData": + case "text": + data = await response[parseAs]() + break + case "json": { // Some servers return 200 with no Content-Length and empty body. // response.json() would throw; read as text and parse if non-empty. - const text = await response.text(); - data = text ? JSON.parse(text) : {}; - break; + const text = await response.text() + data = text ? JSON.parse(text) : {} + break } - case 'stream': - return opts.responseStyle === 'data' + case "stream": + return opts.responseStyle === "data" ? response.body : { data: response.body, ...result, - }; + } } - if (parseAs === 'json') { + if (parseAs === "json") { if (opts.responseValidator) { - await opts.responseValidator(data); + await opts.responseValidator(data) } if (opts.responseTransformer) { - data = await opts.responseTransformer(data); + data = await opts.responseTransformer(data) } } - return opts.responseStyle === 'data' + return opts.responseStyle === "data" ? data : { data, ...result, - }; + } } - const textError = await response.text(); - let jsonError: unknown; + const textError = await response.text() + let jsonError: unknown try { - jsonError = JSON.parse(textError); + jsonError = JSON.parse(textError) } catch { // noop } - const error = jsonError ?? textError; - let finalError = error; + const error = jsonError ?? textError + let finalError = error for (const fn of interceptors.error.fns) { if (fn) { - finalError = (await fn(error, response, request, opts)) as string; + finalError = (await fn(error, response, request, opts)) as string } } - finalError = finalError || ({} as string); + finalError = finalError || ({} as string) if (opts.throwOnError) { - throw finalError; + throw finalError } // TODO: we probably want to return error and improve types - return opts.responseStyle === 'data' + return opts.responseStyle === "data" ? undefined : { error: finalError, ...result, - }; - }; + } + } - const makeMethodFn = - (method: Uppercase) => (options: RequestOptions) => - request({ ...options, method }); + const makeMethodFn = (method: Uppercase) => (options: RequestOptions) => request({ ...options, method }) - const makeSseFn = - (method: Uppercase) => async (options: RequestOptions) => { - const { opts, url } = await beforeRequest(options); - return createSseClient({ - ...opts, - body: opts.body as BodyInit | null | undefined, - headers: opts.headers as unknown as Record, - method, - onRequest: async (url, init) => { - let request = new Request(url, init); - for (const fn of interceptors.request.fns) { - if (fn) { - request = await fn(request, opts); - } + const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { + const { opts, url } = await beforeRequest(options) + return createSseClient({ + ...opts, + body: opts.body as BodyInit | null | undefined, + headers: opts.headers as unknown as Record, + method, + onRequest: async (url, init) => { + let request = new Request(url, init) + for (const fn of interceptors.request.fns) { + if (fn) { + request = await fn(request, opts) } - return request; - }, - serializedBody: getValidRequestBody(opts) as - | BodyInit - | null - | undefined, - url, - }); - }; + } + return request + }, + serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined, + url, + }) + } return { buildUrl, - connect: makeMethodFn('CONNECT'), - delete: makeMethodFn('DELETE'), - get: makeMethodFn('GET'), + connect: makeMethodFn("CONNECT"), + delete: makeMethodFn("DELETE"), + get: makeMethodFn("GET"), getConfig, - head: makeMethodFn('HEAD'), + head: makeMethodFn("HEAD"), interceptors, - options: makeMethodFn('OPTIONS'), - patch: makeMethodFn('PATCH'), - post: makeMethodFn('POST'), - put: makeMethodFn('PUT'), + options: makeMethodFn("OPTIONS"), + patch: makeMethodFn("PATCH"), + post: makeMethodFn("POST"), + put: makeMethodFn("PUT"), request, setConfig, sse: { - connect: makeSseFn('CONNECT'), - delete: makeSseFn('DELETE'), - get: makeSseFn('GET'), - head: makeSseFn('HEAD'), - options: makeSseFn('OPTIONS'), - patch: makeSseFn('PATCH'), - post: makeSseFn('POST'), - put: makeSseFn('PUT'), - trace: makeSseFn('TRACE'), + connect: makeSseFn("CONNECT"), + delete: makeSseFn("DELETE"), + get: makeSseFn("GET"), + head: makeSseFn("HEAD"), + options: makeSseFn("OPTIONS"), + patch: makeSseFn("PATCH"), + post: makeSseFn("POST"), + put: makeSseFn("PUT"), + trace: makeSseFn("TRACE"), }, - trace: makeMethodFn('TRACE'), - } as Client; -}; + trace: makeMethodFn("TRACE"), + } as Client +} diff --git a/packages/sdk/js/src/v2/gen/client/index.ts b/packages/sdk/js/src/v2/gen/client/index.ts index 50acaa57b71..0af63f3300e 100644 --- a/packages/sdk/js/src/v2/gen/client/index.ts +++ b/packages/sdk/js/src/v2/gen/client/index.ts @@ -1,15 +1,15 @@ // This file is auto-generated by @hey-api/openapi-ts -export type { Auth } from '../core/auth.gen.js'; -export type { QuerySerializerOptions } from '../core/bodySerializer.gen.js'; +export type { Auth } from "../core/auth.gen.js" +export type { QuerySerializerOptions } from "../core/bodySerializer.gen.js" export { formDataBodySerializer, jsonBodySerializer, urlSearchParamsBodySerializer, -} from '../core/bodySerializer.gen.js'; -export { buildClientParams } from '../core/params.gen.js'; -export { serializeQueryKeyValue } from '../core/queryKeySerializer.gen.js'; -export { createClient } from './client.gen.js'; +} from "../core/bodySerializer.gen.js" +export { buildClientParams } from "../core/params.gen.js" +export { serializeQueryKeyValue } from "../core/queryKeySerializer.gen.js" +export { createClient } from "./client.gen.js" export type { Client, ClientOptions, @@ -21,5 +21,5 @@ export type { ResolvedRequestOptions, ResponseStyle, TDataShape, -} from './types.gen.js'; -export { createConfig, mergeHeaders } from './utils.gen.js'; +} from "./types.gen.js" +export { createConfig, mergeHeaders } from "./utils.gen.js" diff --git a/packages/sdk/js/src/v2/gen/client/types.gen.ts b/packages/sdk/js/src/v2/gen/client/types.gen.ts index 21c8ee1fbad..99d7e7f8f2e 100644 --- a/packages/sdk/js/src/v2/gen/client/types.gen.ts +++ b/packages/sdk/js/src/v2/gen/client/types.gen.ts @@ -1,39 +1,33 @@ // This file is auto-generated by @hey-api/openapi-ts -import type { Auth } from '../core/auth.gen.js'; -import type { - ServerSentEventsOptions, - ServerSentEventsResult, -} from '../core/serverSentEvents.gen.js'; -import type { - Client as CoreClient, - Config as CoreConfig, -} from '../core/types.gen.js'; -import type { Middleware } from './utils.gen.js'; +import type { Auth } from "../core/auth.gen.js" +import type { ServerSentEventsOptions, ServerSentEventsResult } from "../core/serverSentEvents.gen.js" +import type { Client as CoreClient, Config as CoreConfig } from "../core/types.gen.js" +import type { Middleware } from "./utils.gen.js" -export type ResponseStyle = 'data' | 'fields'; +export type ResponseStyle = "data" | "fields" export interface Config - extends Omit, + extends Omit, CoreConfig { /** * Base URL for all requests made by this client. */ - baseUrl?: T['baseUrl']; + baseUrl?: T["baseUrl"] /** * Fetch API implementation. You can use this option to provide a custom * fetch instance. * * @default globalThis.fetch */ - fetch?: typeof fetch; + fetch?: typeof fetch /** * Please don't use the Fetch client for Next.js applications. The `next` * options won't have any effect. * * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead. */ - next?: never; + next?: never /** * Return the response data parsed in a specified format. By default, `auto` * will infer the appropriate method from the `Content-Type` response header. @@ -42,170 +36,140 @@ export interface Config * * @default 'auto' */ - parseAs?: - | 'arrayBuffer' - | 'auto' - | 'blob' - | 'formData' - | 'json' - | 'stream' - | 'text'; + parseAs?: "arrayBuffer" | "auto" | "blob" | "formData" | "json" | "stream" | "text" /** * Should we return only data or multiple fields (data, error, response, etc.)? * * @default 'fields' */ - responseStyle?: ResponseStyle; + responseStyle?: ResponseStyle /** * Throw an error instead of returning it in the response? * * @default false */ - throwOnError?: T['throwOnError']; + throwOnError?: T["throwOnError"] } export interface RequestOptions< TData = unknown, - TResponseStyle extends ResponseStyle = 'fields', + TResponseStyle extends ResponseStyle = "fields", ThrowOnError extends boolean = boolean, Url extends string = string, > extends Config<{ - responseStyle: TResponseStyle; - throwOnError: ThrowOnError; + responseStyle: TResponseStyle + throwOnError: ThrowOnError }>, Pick< ServerSentEventsOptions, - | 'onSseError' - | 'onSseEvent' - | 'sseDefaultRetryDelay' - | 'sseMaxRetryAttempts' - | 'sseMaxRetryDelay' + "onSseError" | "onSseEvent" | "sseDefaultRetryDelay" | "sseMaxRetryAttempts" | "sseMaxRetryDelay" > { /** * Any body that you want to add to your request. * * {@link https://developer.mozilla.org/docs/Web/API/fetch#body} */ - body?: unknown; - path?: Record; - query?: Record; + body?: unknown + path?: Record + query?: Record /** * Security mechanism(s) to use for the request. */ - security?: ReadonlyArray; - url: Url; + security?: ReadonlyArray + url: Url } export interface ResolvedRequestOptions< - TResponseStyle extends ResponseStyle = 'fields', + TResponseStyle extends ResponseStyle = "fields", ThrowOnError extends boolean = boolean, Url extends string = string, > extends RequestOptions { - serializedBody?: string; + serializedBody?: string } export type RequestResult< TData = unknown, TError = unknown, ThrowOnError extends boolean = boolean, - TResponseStyle extends ResponseStyle = 'fields', + TResponseStyle extends ResponseStyle = "fields", > = ThrowOnError extends true ? Promise< - TResponseStyle extends 'data' + TResponseStyle extends "data" ? TData extends Record ? TData[keyof TData] : TData : { - data: TData extends Record - ? TData[keyof TData] - : TData; - request: Request; - response: Response; + data: TData extends Record ? TData[keyof TData] : TData + request: Request + response: Response } > : Promise< - TResponseStyle extends 'data' - ? - | (TData extends Record - ? TData[keyof TData] - : TData) - | undefined + TResponseStyle extends "data" + ? (TData extends Record ? TData[keyof TData] : TData) | undefined : ( | { - data: TData extends Record - ? TData[keyof TData] - : TData; - error: undefined; + data: TData extends Record ? TData[keyof TData] : TData + error: undefined } | { - data: undefined; - error: TError extends Record - ? TError[keyof TError] - : TError; + data: undefined + error: TError extends Record ? TError[keyof TError] : TError } ) & { - request: Request; - response: Response; + request: Request + response: Response } - >; + > export interface ClientOptions { - baseUrl?: string; - responseStyle?: ResponseStyle; - throwOnError?: boolean; + baseUrl?: string + responseStyle?: ResponseStyle + throwOnError?: boolean } type MethodFn = < TData = unknown, TError = unknown, ThrowOnError extends boolean = false, - TResponseStyle extends ResponseStyle = 'fields', + TResponseStyle extends ResponseStyle = "fields", >( - options: Omit, 'method'>, -) => RequestResult; + options: Omit, "method">, +) => RequestResult type SseFn = < TData = unknown, TError = unknown, ThrowOnError extends boolean = false, - TResponseStyle extends ResponseStyle = 'fields', + TResponseStyle extends ResponseStyle = "fields", >( - options: Omit, 'method'>, -) => Promise>; + options: Omit, "method">, +) => Promise> type RequestFn = < TData = unknown, TError = unknown, ThrowOnError extends boolean = false, - TResponseStyle extends ResponseStyle = 'fields', + TResponseStyle extends ResponseStyle = "fields", >( - options: Omit, 'method'> & - Pick< - Required>, - 'method' - >, -) => RequestResult; + options: Omit, "method"> & + Pick>, "method">, +) => RequestResult type BuildUrlFn = < TData extends { - body?: unknown; - path?: Record; - query?: Record; - url: string; + body?: unknown + path?: Record + query?: Record + url: string }, >( options: TData & Options, -) => string; +) => string -export type Client = CoreClient< - RequestFn, - Config, - MethodFn, - BuildUrlFn, - SseFn -> & { - interceptors: Middleware; -}; +export type Client = CoreClient & { + interceptors: Middleware +} /** * The `createClientConfig()` function will be called on client initialization @@ -217,25 +181,22 @@ export type Client = CoreClient< */ export type CreateClientConfig = ( override?: Config, -) => Config & T>; +) => Config & T> export interface TDataShape { - body?: unknown; - headers?: unknown; - path?: unknown; - query?: unknown; - url: string; + body?: unknown + headers?: unknown + path?: unknown + query?: unknown + url: string } -type OmitKeys = Pick>; +type OmitKeys = Pick> export type Options< TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown, - TResponseStyle extends ResponseStyle = 'fields', -> = OmitKeys< - RequestOptions, - 'body' | 'path' | 'query' | 'url' -> & - ([TData] extends [never] ? unknown : Omit); + TResponseStyle extends ResponseStyle = "fields", +> = OmitKeys, "body" | "path" | "query" | "url"> & + ([TData] extends [never] ? unknown : Omit) diff --git a/packages/sdk/js/src/v2/gen/client/utils.gen.ts b/packages/sdk/js/src/v2/gen/client/utils.gen.ts index f163053b0ae..3b1dfb78718 100644 --- a/packages/sdk/js/src/v2/gen/client/utils.gen.ts +++ b/packages/sdk/js/src/v2/gen/client/utils.gen.ts @@ -1,332 +1,289 @@ // This file is auto-generated by @hey-api/openapi-ts -import { getAuthToken } from '../core/auth.gen.js'; -import type { QuerySerializerOptions } from '../core/bodySerializer.gen.js'; -import { jsonBodySerializer } from '../core/bodySerializer.gen.js'; -import { - serializeArrayParam, - serializeObjectParam, - serializePrimitiveParam, -} from '../core/pathSerializer.gen.js'; -import { getUrl } from '../core/utils.gen.js'; -import type { Client, ClientOptions, Config, RequestOptions } from './types.gen.js'; +import { getAuthToken } from "../core/auth.gen.js" +import type { QuerySerializerOptions } from "../core/bodySerializer.gen.js" +import { jsonBodySerializer } from "../core/bodySerializer.gen.js" +import { serializeArrayParam, serializeObjectParam, serializePrimitiveParam } from "../core/pathSerializer.gen.js" +import { getUrl } from "../core/utils.gen.js" +import type { Client, ClientOptions, Config, RequestOptions } from "./types.gen.js" -export const createQuerySerializer = ({ - parameters = {}, - ...args -}: QuerySerializerOptions = {}) => { +export const createQuerySerializer = ({ parameters = {}, ...args }: QuerySerializerOptions = {}) => { const querySerializer = (queryParams: T) => { - const search: string[] = []; - if (queryParams && typeof queryParams === 'object') { + const search: string[] = [] + if (queryParams && typeof queryParams === "object") { for (const name in queryParams) { - const value = queryParams[name]; + const value = queryParams[name] if (value === undefined || value === null) { - continue; + continue } - const options = parameters[name] || args; + const options = parameters[name] || args if (Array.isArray(value)) { const serializedArray = serializeArrayParam({ allowReserved: options.allowReserved, explode: true, name, - style: 'form', + style: "form", value, ...options.array, - }); - if (serializedArray) search.push(serializedArray); - } else if (typeof value === 'object') { + }) + if (serializedArray) search.push(serializedArray) + } else if (typeof value === "object") { const serializedObject = serializeObjectParam({ allowReserved: options.allowReserved, explode: true, name, - style: 'deepObject', + style: "deepObject", value: value as Record, ...options.object, - }); - if (serializedObject) search.push(serializedObject); + }) + if (serializedObject) search.push(serializedObject) } else { const serializedPrimitive = serializePrimitiveParam({ allowReserved: options.allowReserved, name, value: value as string, - }); - if (serializedPrimitive) search.push(serializedPrimitive); + }) + if (serializedPrimitive) search.push(serializedPrimitive) } } } - return search.join('&'); - }; - return querySerializer; -}; + return search.join("&") + } + return querySerializer +} /** * Infers parseAs value from provided Content-Type header. */ -export const getParseAs = ( - contentType: string | null, -): Exclude => { +export const getParseAs = (contentType: string | null): Exclude => { if (!contentType) { // If no Content-Type header is provided, the best we can do is return the raw response body, // which is effectively the same as the 'stream' option. - return 'stream'; + return "stream" } - const cleanContent = contentType.split(';')[0]?.trim(); + const cleanContent = contentType.split(";")[0]?.trim() if (!cleanContent) { - return; + return } - if ( - cleanContent.startsWith('application/json') || - cleanContent.endsWith('+json') - ) { - return 'json'; + if (cleanContent.startsWith("application/json") || cleanContent.endsWith("+json")) { + return "json" } - if (cleanContent === 'multipart/form-data') { - return 'formData'; + if (cleanContent === "multipart/form-data") { + return "formData" } - if ( - ['application/', 'audio/', 'image/', 'video/'].some((type) => - cleanContent.startsWith(type), - ) - ) { - return 'blob'; + if (["application/", "audio/", "image/", "video/"].some((type) => cleanContent.startsWith(type))) { + return "blob" } - if (cleanContent.startsWith('text/')) { - return 'text'; + if (cleanContent.startsWith("text/")) { + return "text" } - return; -}; + return +} const checkForExistence = ( - options: Pick & { - headers: Headers; + options: Pick & { + headers: Headers }, name?: string, ): boolean => { if (!name) { - return false; + return false } - if ( - options.headers.has(name) || - options.query?.[name] || - options.headers.get('Cookie')?.includes(`${name}=`) - ) { - return true; + if (options.headers.has(name) || options.query?.[name] || options.headers.get("Cookie")?.includes(`${name}=`)) { + return true } - return false; -}; + return false +} export const setAuthParams = async ({ security, ...options -}: Pick, 'security'> & - Pick & { - headers: Headers; +}: Pick, "security"> & + Pick & { + headers: Headers }) => { for (const auth of security) { if (checkForExistence(options, auth.name)) { - continue; + continue } - const token = await getAuthToken(auth, options.auth); + const token = await getAuthToken(auth, options.auth) if (!token) { - continue; + continue } - const name = auth.name ?? 'Authorization'; + const name = auth.name ?? "Authorization" switch (auth.in) { - case 'query': + case "query": if (!options.query) { - options.query = {}; + options.query = {} } - options.query[name] = token; - break; - case 'cookie': - options.headers.append('Cookie', `${name}=${token}`); - break; - case 'header': + options.query[name] = token + break + case "cookie": + options.headers.append("Cookie", `${name}=${token}`) + break + case "header": default: - options.headers.set(name, token); - break; + options.headers.set(name, token) + break } } -}; +} -export const buildUrl: Client['buildUrl'] = (options) => +export const buildUrl: Client["buildUrl"] = (options) => getUrl({ baseUrl: options.baseUrl as string, path: options.path, query: options.query, querySerializer: - typeof options.querySerializer === 'function' + typeof options.querySerializer === "function" ? options.querySerializer : createQuerySerializer(options.querySerializer), url: options.url, - }); + }) export const mergeConfigs = (a: Config, b: Config): Config => { - const config = { ...a, ...b }; - if (config.baseUrl?.endsWith('/')) { - config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1); + const config = { ...a, ...b } + if (config.baseUrl?.endsWith("/")) { + config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1) } - config.headers = mergeHeaders(a.headers, b.headers); - return config; -}; + config.headers = mergeHeaders(a.headers, b.headers) + return config +} const headersEntries = (headers: Headers): Array<[string, string]> => { - const entries: Array<[string, string]> = []; + const entries: Array<[string, string]> = [] headers.forEach((value, key) => { - entries.push([key, value]); - }); - return entries; -}; + entries.push([key, value]) + }) + return entries +} -export const mergeHeaders = ( - ...headers: Array['headers'] | undefined> -): Headers => { - const mergedHeaders = new Headers(); +export const mergeHeaders = (...headers: Array["headers"] | undefined>): Headers => { + const mergedHeaders = new Headers() for (const header of headers) { if (!header) { - continue; + continue } - const iterator = - header instanceof Headers - ? headersEntries(header) - : Object.entries(header); + const iterator = header instanceof Headers ? headersEntries(header) : Object.entries(header) for (const [key, value] of iterator) { if (value === null) { - mergedHeaders.delete(key); + mergedHeaders.delete(key) } else if (Array.isArray(value)) { for (const v of value) { - mergedHeaders.append(key, v as string); + mergedHeaders.append(key, v as string) } } else if (value !== undefined) { // assume object headers are meant to be JSON stringified, i.e. their // content value in OpenAPI specification is 'application/json' - mergedHeaders.set( - key, - typeof value === 'object' ? JSON.stringify(value) : (value as string), - ); + mergedHeaders.set(key, typeof value === "object" ? JSON.stringify(value) : (value as string)) } } } - return mergedHeaders; -}; + return mergedHeaders +} type ErrInterceptor = ( error: Err, response: Res, request: Req, options: Options, -) => Err | Promise; +) => Err | Promise -type ReqInterceptor = ( - request: Req, - options: Options, -) => Req | Promise; +type ReqInterceptor = (request: Req, options: Options) => Req | Promise -type ResInterceptor = ( - response: Res, - request: Req, - options: Options, -) => Res | Promise; +type ResInterceptor = (response: Res, request: Req, options: Options) => Res | Promise class Interceptors { - fns: Array = []; + fns: Array = [] clear(): void { - this.fns = []; + this.fns = [] } eject(id: number | Interceptor): void { - const index = this.getInterceptorIndex(id); + const index = this.getInterceptorIndex(id) if (this.fns[index]) { - this.fns[index] = null; + this.fns[index] = null } } exists(id: number | Interceptor): boolean { - const index = this.getInterceptorIndex(id); - return Boolean(this.fns[index]); + const index = this.getInterceptorIndex(id) + return Boolean(this.fns[index]) } getInterceptorIndex(id: number | Interceptor): number { - if (typeof id === 'number') { - return this.fns[id] ? id : -1; + if (typeof id === "number") { + return this.fns[id] ? id : -1 } - return this.fns.indexOf(id); + return this.fns.indexOf(id) } - update( - id: number | Interceptor, - fn: Interceptor, - ): number | Interceptor | false { - const index = this.getInterceptorIndex(id); + update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false { + const index = this.getInterceptorIndex(id) if (this.fns[index]) { - this.fns[index] = fn; - return id; + this.fns[index] = fn + return id } - return false; + return false } use(fn: Interceptor): number { - this.fns.push(fn); - return this.fns.length - 1; + this.fns.push(fn) + return this.fns.length - 1 } } export interface Middleware { - error: Interceptors>; - request: Interceptors>; - response: Interceptors>; + error: Interceptors> + request: Interceptors> + response: Interceptors> } -export const createInterceptors = (): Middleware< - Req, - Res, - Err, - Options -> => ({ +export const createInterceptors = (): Middleware => ({ error: new Interceptors>(), request: new Interceptors>(), response: new Interceptors>(), -}); +}) const defaultQuerySerializer = createQuerySerializer({ allowReserved: false, array: { explode: true, - style: 'form', + style: "form", }, object: { explode: true, - style: 'deepObject', + style: "deepObject", }, -}); +}) const defaultHeaders = { - 'Content-Type': 'application/json', -}; + "Content-Type": "application/json", +} export const createConfig = ( override: Config & T> = {}, ): Config & T> => ({ ...jsonBodySerializer, headers: defaultHeaders, - parseAs: 'auto', + parseAs: "auto", querySerializer: defaultQuerySerializer, ...override, -}); +}) diff --git a/packages/sdk/js/src/v2/gen/core/auth.gen.ts b/packages/sdk/js/src/v2/gen/core/auth.gen.ts index f8a73266f93..bc7b230f447 100644 --- a/packages/sdk/js/src/v2/gen/core/auth.gen.ts +++ b/packages/sdk/js/src/v2/gen/core/auth.gen.ts @@ -1,6 +1,6 @@ // This file is auto-generated by @hey-api/openapi-ts -export type AuthToken = string | undefined; +export type AuthToken = string | undefined export interface Auth { /** @@ -8,35 +8,34 @@ export interface Auth { * * @default 'header' */ - in?: 'header' | 'query' | 'cookie'; + in?: "header" | "query" | "cookie" /** * Header or query parameter name. * * @default 'Authorization' */ - name?: string; - scheme?: 'basic' | 'bearer'; - type: 'apiKey' | 'http'; + name?: string + scheme?: "basic" | "bearer" + type: "apiKey" | "http" } export const getAuthToken = async ( auth: Auth, callback: ((auth: Auth) => Promise | AuthToken) | AuthToken, ): Promise => { - const token = - typeof callback === 'function' ? await callback(auth) : callback; + const token = typeof callback === "function" ? await callback(auth) : callback if (!token) { - return; + return } - if (auth.scheme === 'bearer') { - return `Bearer ${token}`; + if (auth.scheme === "bearer") { + return `Bearer ${token}` } - if (auth.scheme === 'basic') { - return `Basic ${btoa(token)}`; + if (auth.scheme === "basic") { + return `Basic ${btoa(token)}` } - return token; -}; + return token +} diff --git a/packages/sdk/js/src/v2/gen/core/bodySerializer.gen.ts b/packages/sdk/js/src/v2/gen/core/bodySerializer.gen.ts index 886b401aefe..9678fb08ec6 100644 --- a/packages/sdk/js/src/v2/gen/core/bodySerializer.gen.ts +++ b/packages/sdk/js/src/v2/gen/core/bodySerializer.gen.ts @@ -1,100 +1,82 @@ // This file is auto-generated by @hey-api/openapi-ts -import type { - ArrayStyle, - ObjectStyle, - SerializerOptions, -} from './pathSerializer.gen.js'; +import type { ArrayStyle, ObjectStyle, SerializerOptions } from "./pathSerializer.gen.js" -export type QuerySerializer = (query: Record) => string; +export type QuerySerializer = (query: Record) => string -export type BodySerializer = (body: any) => any; +export type BodySerializer = (body: any) => any type QuerySerializerOptionsObject = { - allowReserved?: boolean; - array?: Partial>; - object?: Partial>; -}; + allowReserved?: boolean + array?: Partial> + object?: Partial> +} export type QuerySerializerOptions = QuerySerializerOptionsObject & { /** * Per-parameter serialization overrides. When provided, these settings * override the global array/object settings for specific parameter names. */ - parameters?: Record; -}; + parameters?: Record +} -const serializeFormDataPair = ( - data: FormData, - key: string, - value: unknown, -): void => { - if (typeof value === 'string' || value instanceof Blob) { - data.append(key, value); +const serializeFormDataPair = (data: FormData, key: string, value: unknown): void => { + if (typeof value === "string" || value instanceof Blob) { + data.append(key, value) } else if (value instanceof Date) { - data.append(key, value.toISOString()); + data.append(key, value.toISOString()) } else { - data.append(key, JSON.stringify(value)); + data.append(key, JSON.stringify(value)) } -}; +} -const serializeUrlSearchParamsPair = ( - data: URLSearchParams, - key: string, - value: unknown, -): void => { - if (typeof value === 'string') { - data.append(key, value); +const serializeUrlSearchParamsPair = (data: URLSearchParams, key: string, value: unknown): void => { + if (typeof value === "string") { + data.append(key, value) } else { - data.append(key, JSON.stringify(value)); + data.append(key, JSON.stringify(value)) } -}; +} export const formDataBodySerializer = { - bodySerializer: | Array>>( - body: T, - ): FormData => { - const data = new FormData(); + bodySerializer: | Array>>(body: T): FormData => { + const data = new FormData() Object.entries(body).forEach(([key, value]) => { if (value === undefined || value === null) { - return; + return } if (Array.isArray(value)) { - value.forEach((v) => serializeFormDataPair(data, key, v)); + value.forEach((v) => serializeFormDataPair(data, key, v)) } else { - serializeFormDataPair(data, key, value); + serializeFormDataPair(data, key, value) } - }); + }) - return data; + return data }, -}; +} export const jsonBodySerializer = { bodySerializer: (body: T): string => - JSON.stringify(body, (_key, value) => - typeof value === 'bigint' ? value.toString() : value, - ), -}; + JSON.stringify(body, (_key, value) => (typeof value === "bigint" ? value.toString() : value)), +} export const urlSearchParamsBodySerializer = { - bodySerializer: | Array>>( - body: T, - ): string => { - const data = new URLSearchParams(); + bodySerializer: | Array>>(body: T): string => { + const data = new URLSearchParams() Object.entries(body).forEach(([key, value]) => { if (value === undefined || value === null) { - return; + return } if (Array.isArray(value)) { - value.forEach((v) => serializeUrlSearchParamsPair(data, key, v)); + value.forEach((v) => serializeUrlSearchParamsPair(data, key, v)) } else { - serializeUrlSearchParamsPair(data, key, value); + serializeUrlSearchParamsPair(data, key, value) } - }); + }) - return data.toString(); + return data.toString() }, -}; +} diff --git a/packages/sdk/js/src/v2/gen/core/params.gen.ts b/packages/sdk/js/src/v2/gen/core/params.gen.ts index 602715c46cc..6e9d0b9add4 100644 --- a/packages/sdk/js/src/v2/gen/core/params.gen.ts +++ b/packages/sdk/js/src/v2/gen/core/params.gen.ts @@ -1,167 +1,160 @@ // This file is auto-generated by @hey-api/openapi-ts -type Slot = 'body' | 'headers' | 'path' | 'query'; +type Slot = "body" | "headers" | "path" | "query" export type Field = | { - in: Exclude; + in: Exclude /** * Field name. This is the name we want the user to see and use. */ - key: string; + key: string /** * Field mapped name. This is the name we want to use in the request. * If omitted, we use the same value as `key`. */ - map?: string; + map?: string } | { - in: Extract; + in: Extract /** * Key isn't required for bodies. */ - key?: string; - map?: string; + key?: string + map?: string } | { /** * Field name. This is the name we want the user to see and use. */ - key: string; + key: string /** * Field mapped name. This is the name we want to use in the request. * If `in` is omitted, `map` aliases `key` to the transport layer. */ - map: Slot; - }; + map: Slot + } export interface Fields { - allowExtra?: Partial>; - args?: ReadonlyArray; + allowExtra?: Partial> + args?: ReadonlyArray } -export type FieldsConfig = ReadonlyArray; +export type FieldsConfig = ReadonlyArray const extraPrefixesMap: Record = { - $body_: 'body', - $headers_: 'headers', - $path_: 'path', - $query_: 'query', -}; -const extraPrefixes = Object.entries(extraPrefixesMap); + $body_: "body", + $headers_: "headers", + $path_: "path", + $query_: "query", +} +const extraPrefixes = Object.entries(extraPrefixesMap) type KeyMap = Map< string, | { - in: Slot; - map?: string; + in: Slot + map?: string } | { - in?: never; - map: Slot; + in?: never + map: Slot } ->; +> const buildKeyMap = (fields: FieldsConfig, map?: KeyMap): KeyMap => { if (!map) { - map = new Map(); + map = new Map() } for (const config of fields) { - if ('in' in config) { + if ("in" in config) { if (config.key) { map.set(config.key, { in: config.in, map: config.map, - }); + }) } - } else if ('key' in config) { + } else if ("key" in config) { map.set(config.key, { map: config.map, - }); + }) } else if (config.args) { - buildKeyMap(config.args, map); + buildKeyMap(config.args, map) } } - return map; -}; + return map +} interface Params { - body: unknown; - headers: Record; - path: Record; - query: Record; + body: unknown + headers: Record + path: Record + query: Record } const stripEmptySlots = (params: Params) => { for (const [slot, value] of Object.entries(params)) { - if (value && typeof value === 'object' && !Object.keys(value).length) { - delete params[slot as Slot]; + if (value && typeof value === "object" && !Object.keys(value).length) { + delete params[slot as Slot] } } -}; +} -export const buildClientParams = ( - args: ReadonlyArray, - fields: FieldsConfig, -) => { +export const buildClientParams = (args: ReadonlyArray, fields: FieldsConfig) => { const params: Params = { body: {}, headers: {}, path: {}, query: {}, - }; + } - const map = buildKeyMap(fields); + const map = buildKeyMap(fields) - let config: FieldsConfig[number] | undefined; + let config: FieldsConfig[number] | undefined for (const [index, arg] of args.entries()) { if (fields[index]) { - config = fields[index]; + config = fields[index] } if (!config) { - continue; + continue } - if ('in' in config) { + if ("in" in config) { if (config.key) { - const field = map.get(config.key)!; - const name = field.map || config.key; + const field = map.get(config.key)! + const name = field.map || config.key if (field.in) { - (params[field.in] as Record)[name] = arg; + ;(params[field.in] as Record)[name] = arg } } else { - params.body = arg; + params.body = arg } } else { for (const [key, value] of Object.entries(arg ?? {})) { - const field = map.get(key); + const field = map.get(key) if (field) { if (field.in) { - const name = field.map || key; - (params[field.in] as Record)[name] = value; + const name = field.map || key + ;(params[field.in] as Record)[name] = value } else { - params[field.map] = value; + params[field.map] = value } } else { - const extra = extraPrefixes.find(([prefix]) => - key.startsWith(prefix), - ); + const extra = extraPrefixes.find(([prefix]) => key.startsWith(prefix)) if (extra) { - const [prefix, slot] = extra; - (params[slot] as Record)[ - key.slice(prefix.length) - ] = value; - } else if ('allowExtra' in config && config.allowExtra) { + const [prefix, slot] = extra + ;(params[slot] as Record)[key.slice(prefix.length)] = value + } else if ("allowExtra" in config && config.allowExtra) { for (const [slot, allowed] of Object.entries(config.allowExtra)) { if (allowed) { - (params[slot as Slot] as Record)[key] = value; - break; + ;(params[slot as Slot] as Record)[key] = value + break } } } @@ -170,7 +163,7 @@ export const buildClientParams = ( } } - stripEmptySlots(params); + stripEmptySlots(params) - return params; -}; + return params +} diff --git a/packages/sdk/js/src/v2/gen/core/pathSerializer.gen.ts b/packages/sdk/js/src/v2/gen/core/pathSerializer.gen.ts index 8d999310474..96be3bc5a39 100644 --- a/packages/sdk/js/src/v2/gen/core/pathSerializer.gen.ts +++ b/packages/sdk/js/src/v2/gen/core/pathSerializer.gen.ts @@ -1,70 +1,68 @@ // This file is auto-generated by @hey-api/openapi-ts -interface SerializeOptions - extends SerializePrimitiveOptions, - SerializerOptions {} +interface SerializeOptions extends SerializePrimitiveOptions, SerializerOptions {} interface SerializePrimitiveOptions { - allowReserved?: boolean; - name: string; + allowReserved?: boolean + name: string } export interface SerializerOptions { /** * @default true */ - explode: boolean; - style: T; + explode: boolean + style: T } -export type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited'; -export type ArraySeparatorStyle = ArrayStyle | MatrixStyle; -type MatrixStyle = 'label' | 'matrix' | 'simple'; -export type ObjectStyle = 'form' | 'deepObject'; -type ObjectSeparatorStyle = ObjectStyle | MatrixStyle; +export type ArrayStyle = "form" | "spaceDelimited" | "pipeDelimited" +export type ArraySeparatorStyle = ArrayStyle | MatrixStyle +type MatrixStyle = "label" | "matrix" | "simple" +export type ObjectStyle = "form" | "deepObject" +type ObjectSeparatorStyle = ObjectStyle | MatrixStyle interface SerializePrimitiveParam extends SerializePrimitiveOptions { - value: string; + value: string } export const separatorArrayExplode = (style: ArraySeparatorStyle) => { switch (style) { - case 'label': - return '.'; - case 'matrix': - return ';'; - case 'simple': - return ','; + case "label": + return "." + case "matrix": + return ";" + case "simple": + return "," default: - return '&'; + return "&" } -}; +} export const separatorArrayNoExplode = (style: ArraySeparatorStyle) => { switch (style) { - case 'form': - return ','; - case 'pipeDelimited': - return '|'; - case 'spaceDelimited': - return '%20'; + case "form": + return "," + case "pipeDelimited": + return "|" + case "spaceDelimited": + return "%20" default: - return ','; + return "," } -}; +} export const separatorObjectExplode = (style: ObjectSeparatorStyle) => { switch (style) { - case 'label': - return '.'; - case 'matrix': - return ';'; - case 'simple': - return ','; + case "label": + return "." + case "matrix": + return ";" + case "simple": + return "," default: - return '&'; + return "&" } -}; +} export const serializeArrayParam = ({ allowReserved, @@ -73,60 +71,54 @@ export const serializeArrayParam = ({ style, value, }: SerializeOptions & { - value: unknown[]; + value: unknown[] }) => { if (!explode) { - const joinedValues = ( - allowReserved ? value : value.map((v) => encodeURIComponent(v as string)) - ).join(separatorArrayNoExplode(style)); + const joinedValues = (allowReserved ? value : value.map((v) => encodeURIComponent(v as string))).join( + separatorArrayNoExplode(style), + ) switch (style) { - case 'label': - return `.${joinedValues}`; - case 'matrix': - return `;${name}=${joinedValues}`; - case 'simple': - return joinedValues; + case "label": + return `.${joinedValues}` + case "matrix": + return `;${name}=${joinedValues}` + case "simple": + return joinedValues default: - return `${name}=${joinedValues}`; + return `${name}=${joinedValues}` } } - const separator = separatorArrayExplode(style); + const separator = separatorArrayExplode(style) const joinedValues = value .map((v) => { - if (style === 'label' || style === 'simple') { - return allowReserved ? v : encodeURIComponent(v as string); + if (style === "label" || style === "simple") { + return allowReserved ? v : encodeURIComponent(v as string) } return serializePrimitiveParam({ allowReserved, name, value: v as string, - }); + }) }) - .join(separator); - return style === 'label' || style === 'matrix' - ? separator + joinedValues - : joinedValues; -}; + .join(separator) + return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues +} -export const serializePrimitiveParam = ({ - allowReserved, - name, - value, -}: SerializePrimitiveParam) => { +export const serializePrimitiveParam = ({ allowReserved, name, value }: SerializePrimitiveParam) => { if (value === undefined || value === null) { - return ''; + return "" } - if (typeof value === 'object') { + if (typeof value === "object") { throw new Error( - 'Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.', - ); + "Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.", + ) } - return `${name}=${allowReserved ? value : encodeURIComponent(value)}`; -}; + return `${name}=${allowReserved ? value : encodeURIComponent(value)}` +} export const serializeObjectParam = ({ allowReserved, @@ -136,46 +128,40 @@ export const serializeObjectParam = ({ value, valueOnly, }: SerializeOptions & { - value: Record | Date; - valueOnly?: boolean; + value: Record | Date + valueOnly?: boolean }) => { if (value instanceof Date) { - return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`; + return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}` } - if (style !== 'deepObject' && !explode) { - let values: string[] = []; + if (style !== "deepObject" && !explode) { + let values: string[] = [] Object.entries(value).forEach(([key, v]) => { - values = [ - ...values, - key, - allowReserved ? (v as string) : encodeURIComponent(v as string), - ]; - }); - const joinedValues = values.join(','); + values = [...values, key, allowReserved ? (v as string) : encodeURIComponent(v as string)] + }) + const joinedValues = values.join(",") switch (style) { - case 'form': - return `${name}=${joinedValues}`; - case 'label': - return `.${joinedValues}`; - case 'matrix': - return `;${name}=${joinedValues}`; + case "form": + return `${name}=${joinedValues}` + case "label": + return `.${joinedValues}` + case "matrix": + return `;${name}=${joinedValues}` default: - return joinedValues; + return joinedValues } } - const separator = separatorObjectExplode(style); + const separator = separatorObjectExplode(style) const joinedValues = Object.entries(value) .map(([key, v]) => serializePrimitiveParam({ allowReserved, - name: style === 'deepObject' ? `${name}[${key}]` : key, + name: style === "deepObject" ? `${name}[${key}]` : key, value: v as string, }), ) - .join(separator); - return style === 'label' || style === 'matrix' - ? separator + joinedValues - : joinedValues; -}; + .join(separator) + return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues +} diff --git a/packages/sdk/js/src/v2/gen/core/queryKeySerializer.gen.ts b/packages/sdk/js/src/v2/gen/core/queryKeySerializer.gen.ts index d3bb68396e9..320204aef10 100644 --- a/packages/sdk/js/src/v2/gen/core/queryKeySerializer.gen.ts +++ b/packages/sdk/js/src/v2/gen/core/queryKeySerializer.gen.ts @@ -3,134 +3,109 @@ /** * JSON-friendly union that mirrors what Pinia Colada can hash. */ -export type JsonValue = - | null - | string - | number - | boolean - | JsonValue[] - | { [key: string]: JsonValue }; +export type JsonValue = null | string | number | boolean | JsonValue[] | { [key: string]: JsonValue } /** * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes. */ export const queryKeyJsonReplacer = (_key: string, value: unknown) => { - if ( - value === undefined || - typeof value === 'function' || - typeof value === 'symbol' - ) { - return undefined; + if (value === undefined || typeof value === "function" || typeof value === "symbol") { + return undefined } - if (typeof value === 'bigint') { - return value.toString(); + if (typeof value === "bigint") { + return value.toString() } if (value instanceof Date) { - return value.toISOString(); + return value.toISOString() } - return value; -}; + return value +} /** * Safely stringifies a value and parses it back into a JsonValue. */ export const stringifyToJsonValue = (input: unknown): JsonValue | undefined => { try { - const json = JSON.stringify(input, queryKeyJsonReplacer); + const json = JSON.stringify(input, queryKeyJsonReplacer) if (json === undefined) { - return undefined; + return undefined } - return JSON.parse(json) as JsonValue; + return JSON.parse(json) as JsonValue } catch { - return undefined; + return undefined } -}; +} /** * Detects plain objects (including objects with a null prototype). */ const isPlainObject = (value: unknown): value is Record => { - if (value === null || typeof value !== 'object') { - return false; + if (value === null || typeof value !== "object") { + return false } - const prototype = Object.getPrototypeOf(value as object); - return prototype === Object.prototype || prototype === null; -}; + const prototype = Object.getPrototypeOf(value as object) + return prototype === Object.prototype || prototype === null +} /** * Turns URLSearchParams into a sorted JSON object for deterministic keys. */ const serializeSearchParams = (params: URLSearchParams): JsonValue => { - const entries = Array.from(params.entries()).sort(([a], [b]) => - a.localeCompare(b), - ); - const result: Record = {}; + const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b)) + const result: Record = {} for (const [key, value] of entries) { - const existing = result[key]; + const existing = result[key] if (existing === undefined) { - result[key] = value; - continue; + result[key] = value + continue } if (Array.isArray(existing)) { - (existing as string[]).push(value); + ;(existing as string[]).push(value) } else { - result[key] = [existing, value]; + result[key] = [existing, value] } } - return result; -}; + return result +} /** * Normalizes any accepted value into a JSON-friendly shape for query keys. */ -export const serializeQueryKeyValue = ( - value: unknown, -): JsonValue | undefined => { +export const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => { if (value === null) { - return null; + return null } - if ( - typeof value === 'string' || - typeof value === 'number' || - typeof value === 'boolean' - ) { - return value; + if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { + return value } - if ( - value === undefined || - typeof value === 'function' || - typeof value === 'symbol' - ) { - return undefined; + if (value === undefined || typeof value === "function" || typeof value === "symbol") { + return undefined } - if (typeof value === 'bigint') { - return value.toString(); + if (typeof value === "bigint") { + return value.toString() } if (value instanceof Date) { - return value.toISOString(); + return value.toISOString() } if (Array.isArray(value)) { - return stringifyToJsonValue(value); + return stringifyToJsonValue(value) } - if ( - typeof URLSearchParams !== 'undefined' && - value instanceof URLSearchParams - ) { - return serializeSearchParams(value); + if (typeof URLSearchParams !== "undefined" && value instanceof URLSearchParams) { + return serializeSearchParams(value) } if (isPlainObject(value)) { - return stringifyToJsonValue(value); + return stringifyToJsonValue(value) } - return undefined; -}; + return undefined +} diff --git a/packages/sdk/js/src/v2/gen/core/serverSentEvents.gen.ts b/packages/sdk/js/src/v2/gen/core/serverSentEvents.gen.ts index 4dd6ae93299..056a8125932 100644 --- a/packages/sdk/js/src/v2/gen/core/serverSentEvents.gen.ts +++ b/packages/sdk/js/src/v2/gen/core/serverSentEvents.gen.ts @@ -1,23 +1,20 @@ // This file is auto-generated by @hey-api/openapi-ts -import type { Config } from './types.gen.js'; +import type { Config } from "./types.gen.js" -export type ServerSentEventsOptions = Omit< - RequestInit, - 'method' -> & - Pick & { +export type ServerSentEventsOptions = Omit & + Pick & { /** * Fetch API implementation. You can use this option to provide a custom * fetch instance. * * @default globalThis.fetch */ - fetch?: typeof fetch; + fetch?: typeof fetch /** * Implementing clients can call request interceptors inside this hook. */ - onRequest?: (url: string, init: RequestInit) => Promise; + onRequest?: (url: string, init: RequestInit) => Promise /** * Callback invoked when a network or parsing error occurs during streaming. * @@ -25,7 +22,7 @@ export type ServerSentEventsOptions = Omit< * * @param error The error that occurred. */ - onSseError?: (error: unknown) => void; + onSseError?: (error: unknown) => void /** * Callback invoked when an event is streamed from the server. * @@ -34,8 +31,8 @@ export type ServerSentEventsOptions = Omit< * @param event Event streamed from the server. * @returns Nothing (void). */ - onSseEvent?: (event: StreamEvent) => void; - serializedBody?: RequestInit['body']; + onSseEvent?: (event: StreamEvent) => void + serializedBody?: RequestInit["body"] /** * Default retry delay in milliseconds. * @@ -43,11 +40,11 @@ export type ServerSentEventsOptions = Omit< * * @default 3000 */ - sseDefaultRetryDelay?: number; + sseDefaultRetryDelay?: number /** * Maximum number of retry attempts before giving up. */ - sseMaxRetryAttempts?: number; + sseMaxRetryAttempts?: number /** * Maximum retry delay in milliseconds. * @@ -57,34 +54,26 @@ export type ServerSentEventsOptions = Omit< * * @default 30000 */ - sseMaxRetryDelay?: number; + sseMaxRetryDelay?: number /** * Optional sleep function for retry backoff. * * Defaults to using `setTimeout`. */ - sseSleepFn?: (ms: number) => Promise; - url: string; - }; + sseSleepFn?: (ms: number) => Promise + url: string + } export interface StreamEvent { - data: TData; - event?: string; - id?: string; - retry?: number; + data: TData + event?: string + id?: string + retry?: number } -export type ServerSentEventsResult< - TData = unknown, - TReturn = void, - TNext = unknown, -> = { - stream: AsyncGenerator< - TData extends Record ? TData[keyof TData] : TData, - TReturn, - TNext - >; -}; +export type ServerSentEventsResult = { + stream: AsyncGenerator ? TData[keyof TData] : TData, TReturn, TNext> +} export const createSseClient = ({ onRequest, @@ -99,125 +88,115 @@ export const createSseClient = ({ url, ...options }: ServerSentEventsOptions): ServerSentEventsResult => { - let lastEventId: string | undefined; + let lastEventId: string | undefined - const sleep = - sseSleepFn ?? - ((ms: number) => new Promise((resolve) => setTimeout(resolve, ms))); + const sleep = sseSleepFn ?? ((ms: number) => new Promise((resolve) => setTimeout(resolve, ms))) const createStream = async function* () { - let retryDelay: number = sseDefaultRetryDelay ?? 3000; - let attempt = 0; - const signal = options.signal ?? new AbortController().signal; + let retryDelay: number = sseDefaultRetryDelay ?? 3000 + let attempt = 0 + const signal = options.signal ?? new AbortController().signal while (true) { - if (signal.aborted) break; + if (signal.aborted) break - attempt++; + attempt++ const headers = options.headers instanceof Headers ? options.headers - : new Headers(options.headers as Record | undefined); + : new Headers(options.headers as Record | undefined) if (lastEventId !== undefined) { - headers.set('Last-Event-ID', lastEventId); + headers.set("Last-Event-ID", lastEventId) } try { const requestInit: RequestInit = { - redirect: 'follow', + redirect: "follow", ...options, body: options.serializedBody, headers, signal, - }; - let request = new Request(url, requestInit); + } + let request = new Request(url, requestInit) if (onRequest) { - request = await onRequest(url, requestInit); + request = await onRequest(url, requestInit) } // fetch must be assigned here, otherwise it would throw the error: // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation - const _fetch = options.fetch ?? globalThis.fetch; - const response = await _fetch(request); + const _fetch = options.fetch ?? globalThis.fetch + const response = await _fetch(request) - if (!response.ok) - throw new Error( - `SSE failed: ${response.status} ${response.statusText}`, - ); + if (!response.ok) throw new Error(`SSE failed: ${response.status} ${response.statusText}`) - if (!response.body) throw new Error('No body in SSE response'); + if (!response.body) throw new Error("No body in SSE response") - const reader = response.body - .pipeThrough(new TextDecoderStream()) - .getReader(); + const reader = response.body.pipeThrough(new TextDecoderStream()).getReader() - let buffer = ''; + let buffer = "" const abortHandler = () => { try { - reader.cancel(); + reader.cancel() } catch { // noop } - }; + } - signal.addEventListener('abort', abortHandler); + signal.addEventListener("abort", abortHandler) try { while (true) { - const { done, value } = await reader.read(); - if (done) break; - buffer += value; + const { done, value } = await reader.read() + if (done) break + buffer += value // Normalize line endings: CRLF -> LF, then CR -> LF - buffer = buffer.replace(/\r\n/g, '\n').replace(/\r/g, '\n'); + buffer = buffer.replace(/\r\n/g, "\n").replace(/\r/g, "\n") - const chunks = buffer.split('\n\n'); - buffer = chunks.pop() ?? ''; + const chunks = buffer.split("\n\n") + buffer = chunks.pop() ?? "" for (const chunk of chunks) { - const lines = chunk.split('\n'); - const dataLines: Array = []; - let eventName: string | undefined; + const lines = chunk.split("\n") + const dataLines: Array = [] + let eventName: string | undefined for (const line of lines) { - if (line.startsWith('data:')) { - dataLines.push(line.replace(/^data:\s*/, '')); - } else if (line.startsWith('event:')) { - eventName = line.replace(/^event:\s*/, ''); - } else if (line.startsWith('id:')) { - lastEventId = line.replace(/^id:\s*/, ''); - } else if (line.startsWith('retry:')) { - const parsed = Number.parseInt( - line.replace(/^retry:\s*/, ''), - 10, - ); + if (line.startsWith("data:")) { + dataLines.push(line.replace(/^data:\s*/, "")) + } else if (line.startsWith("event:")) { + eventName = line.replace(/^event:\s*/, "") + } else if (line.startsWith("id:")) { + lastEventId = line.replace(/^id:\s*/, "") + } else if (line.startsWith("retry:")) { + const parsed = Number.parseInt(line.replace(/^retry:\s*/, ""), 10) if (!Number.isNaN(parsed)) { - retryDelay = parsed; + retryDelay = parsed } } } - let data: unknown; - let parsedJson = false; + let data: unknown + let parsedJson = false if (dataLines.length) { - const rawData = dataLines.join('\n'); + const rawData = dataLines.join("\n") try { - data = JSON.parse(rawData); - parsedJson = true; + data = JSON.parse(rawData) + parsedJson = true } catch { - data = rawData; + data = rawData } } if (parsedJson) { if (responseValidator) { - await responseValidator(data); + await responseValidator(data) } if (responseTransformer) { - data = await responseTransformer(data); + data = await responseTransformer(data) } } @@ -226,41 +205,35 @@ export const createSseClient = ({ event: eventName, id: lastEventId, retry: retryDelay, - }); + }) if (dataLines.length) { - yield data as any; + yield data as any } } } } finally { - signal.removeEventListener('abort', abortHandler); - reader.releaseLock(); + signal.removeEventListener("abort", abortHandler) + reader.releaseLock() } - break; // exit loop on normal completion + break // exit loop on normal completion } catch (error) { // connection failed or aborted; retry after delay - onSseError?.(error); + onSseError?.(error) - if ( - sseMaxRetryAttempts !== undefined && - attempt >= sseMaxRetryAttempts - ) { - break; // stop after firing error + if (sseMaxRetryAttempts !== undefined && attempt >= sseMaxRetryAttempts) { + break // stop after firing error } // exponential backoff: double retry each attempt, cap at 30s - const backoff = Math.min( - retryDelay * 2 ** (attempt - 1), - sseMaxRetryDelay ?? 30000, - ); - await sleep(backoff); + const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 30000) + await sleep(backoff) } } - }; + } - const stream = createStream(); + const stream = createStream() - return { stream }; -}; + return { stream } +} diff --git a/packages/sdk/js/src/v2/gen/core/types.gen.ts b/packages/sdk/js/src/v2/gen/core/types.gen.ts index cc8a9e60fae..bfa77b8acd2 100644 --- a/packages/sdk/js/src/v2/gen/core/types.gen.ts +++ b/packages/sdk/js/src/v2/gen/core/types.gen.ts @@ -1,54 +1,33 @@ // This file is auto-generated by @hey-api/openapi-ts -import type { Auth, AuthToken } from './auth.gen.js'; -import type { - BodySerializer, - QuerySerializer, - QuerySerializerOptions, -} from './bodySerializer.gen.js'; +import type { Auth, AuthToken } from "./auth.gen.js" +import type { BodySerializer, QuerySerializer, QuerySerializerOptions } from "./bodySerializer.gen.js" -export type HttpMethod = - | 'connect' - | 'delete' - | 'get' - | 'head' - | 'options' - | 'patch' - | 'post' - | 'put' - | 'trace'; +export type HttpMethod = "connect" | "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace" -export type Client< - RequestFn = never, - Config = unknown, - MethodFn = never, - BuildUrlFn = never, - SseFn = never, -> = { +export type Client = { /** * Returns the final request URL. */ - buildUrl: BuildUrlFn; - getConfig: () => Config; - request: RequestFn; - setConfig: (config: Config) => Config; + buildUrl: BuildUrlFn + getConfig: () => Config + request: RequestFn + setConfig: (config: Config) => Config } & { - [K in HttpMethod]: MethodFn; -} & ([SseFn] extends [never] - ? { sse?: never } - : { sse: { [K in HttpMethod]: SseFn } }); + [K in HttpMethod]: MethodFn +} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } }) export interface Config { /** * Auth token or a function returning auth token. The resolved value will be * added to the request payload as defined by its `security` array. */ - auth?: ((auth: Auth) => Promise | AuthToken) | AuthToken; + auth?: ((auth: Auth) => Promise | AuthToken) | AuthToken /** * A function for serializing request body parameter. By default, * {@link JSON.stringify()} will be used. */ - bodySerializer?: BodySerializer | null; + bodySerializer?: BodySerializer | null /** * An object containing any HTTP headers that you want to pre-populate your * `Headers` object with. @@ -56,23 +35,14 @@ export interface Config { * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more} */ headers?: - | RequestInit['headers'] - | Record< - string, - | string - | number - | boolean - | (string | number | boolean)[] - | null - | undefined - | unknown - >; + | RequestInit["headers"] + | Record /** * The request method. * * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more} */ - method?: Uppercase; + method?: Uppercase /** * A function for serializing request query parameters. By default, arrays * will be exploded in form style, objects will be exploded in deepObject @@ -83,24 +53,24 @@ export interface Config { * * {@link https://swagger.io/docs/specification/serialization/#query View examples} */ - querySerializer?: QuerySerializer | QuerySerializerOptions; + querySerializer?: QuerySerializer | QuerySerializerOptions /** * A function validating request data. This is useful if you want to ensure * the request conforms to the desired shape, so it can be safely sent to * the server. */ - requestValidator?: (data: unknown) => Promise; + requestValidator?: (data: unknown) => Promise /** * A function transforming response data before it's returned. This is useful * for post-processing data, e.g. converting ISO strings into Date objects. */ - responseTransformer?: (data: unknown) => Promise; + responseTransformer?: (data: unknown) => Promise /** * A function validating response data. This is useful if you want to ensure * the response conforms to the desired shape, so it can be safely passed to * the transformers and returned to the user. */ - responseValidator?: (data: unknown) => Promise; + responseValidator?: (data: unknown) => Promise } type IsExactlyNeverOrNeverUndefined = [T] extends [never] @@ -109,10 +79,8 @@ type IsExactlyNeverOrNeverUndefined = [T] extends [never] ? [undefined] extends [T] ? false : true - : false; + : false export type OmitNever> = { - [K in keyof T as IsExactlyNeverOrNeverUndefined extends true - ? never - : K]: T[K]; -}; + [K in keyof T as IsExactlyNeverOrNeverUndefined extends true ? never : K]: T[K] +} diff --git a/packages/sdk/js/src/v2/gen/core/utils.gen.ts b/packages/sdk/js/src/v2/gen/core/utils.gen.ts index 3029f7b3cc0..8a45f72698a 100644 --- a/packages/sdk/js/src/v2/gen/core/utils.gen.ts +++ b/packages/sdk/js/src/v2/gen/core/utils.gen.ts @@ -1,57 +1,54 @@ // This file is auto-generated by @hey-api/openapi-ts -import type { BodySerializer, QuerySerializer } from './bodySerializer.gen.js'; +import type { BodySerializer, QuerySerializer } from "./bodySerializer.gen.js" import { type ArraySeparatorStyle, serializeArrayParam, serializeObjectParam, serializePrimitiveParam, -} from './pathSerializer.gen.js'; +} from "./pathSerializer.gen.js" export interface PathSerializer { - path: Record; - url: string; + path: Record + url: string } -export const PATH_PARAM_RE = /\{[^{}]+\}/g; +export const PATH_PARAM_RE = /\{[^{}]+\}/g export const defaultPathSerializer = ({ path, url: _url }: PathSerializer) => { - let url = _url; - const matches = _url.match(PATH_PARAM_RE); + let url = _url + const matches = _url.match(PATH_PARAM_RE) if (matches) { for (const match of matches) { - let explode = false; - let name = match.substring(1, match.length - 1); - let style: ArraySeparatorStyle = 'simple'; + let explode = false + let name = match.substring(1, match.length - 1) + let style: ArraySeparatorStyle = "simple" - if (name.endsWith('*')) { - explode = true; - name = name.substring(0, name.length - 1); + if (name.endsWith("*")) { + explode = true + name = name.substring(0, name.length - 1) } - if (name.startsWith('.')) { - name = name.substring(1); - style = 'label'; - } else if (name.startsWith(';')) { - name = name.substring(1); - style = 'matrix'; + if (name.startsWith(".")) { + name = name.substring(1) + style = "label" + } else if (name.startsWith(";")) { + name = name.substring(1) + style = "matrix" } - const value = path[name]; + const value = path[name] if (value === undefined || value === null) { - continue; + continue } if (Array.isArray(value)) { - url = url.replace( - match, - serializeArrayParam({ explode, name, style, value }), - ); - continue; + url = url.replace(match, serializeArrayParam({ explode, name, style, value })) + continue } - if (typeof value === 'object') { + if (typeof value === "object") { url = url.replace( match, serializeObjectParam({ @@ -61,29 +58,27 @@ export const defaultPathSerializer = ({ path, url: _url }: PathSerializer) => { value: value as Record, valueOnly: true, }), - ); - continue; + ) + continue } - if (style === 'matrix') { + if (style === "matrix") { url = url.replace( match, `;${serializePrimitiveParam({ name, value: value as string, })}`, - ); - continue; + ) + continue } - const replaceValue = encodeURIComponent( - style === 'label' ? `.${value as string}` : (value as string), - ); - url = url.replace(match, replaceValue); + const replaceValue = encodeURIComponent(style === "label" ? `.${value as string}` : (value as string)) + url = url.replace(match, replaceValue) } } - return url; -}; + return url +} export const getUrl = ({ baseUrl, @@ -92,52 +87,51 @@ export const getUrl = ({ querySerializer, url: _url, }: { - baseUrl?: string; - path?: Record; - query?: Record; - querySerializer: QuerySerializer; - url: string; + baseUrl?: string + path?: Record + query?: Record + querySerializer: QuerySerializer + url: string }) => { - const pathUrl = _url.startsWith('/') ? _url : `/${_url}`; - let url = (baseUrl ?? '') + pathUrl; + const pathUrl = _url.startsWith("/") ? _url : `/${_url}` + let url = (baseUrl ?? "") + pathUrl if (path) { - url = defaultPathSerializer({ path, url }); + url = defaultPathSerializer({ path, url }) } - let search = query ? querySerializer(query) : ''; - if (search.startsWith('?')) { - search = search.substring(1); + let search = query ? querySerializer(query) : "" + if (search.startsWith("?")) { + search = search.substring(1) } if (search) { - url += `?${search}`; + url += `?${search}` } - return url; -}; + return url +} export function getValidRequestBody(options: { - body?: unknown; - bodySerializer?: BodySerializer | null; - serializedBody?: unknown; + body?: unknown + bodySerializer?: BodySerializer | null + serializedBody?: unknown }) { - const hasBody = options.body !== undefined; - const isSerializedBody = hasBody && options.bodySerializer; + const hasBody = options.body !== undefined + const isSerializedBody = hasBody && options.bodySerializer if (isSerializedBody) { - if ('serializedBody' in options) { - const hasSerializedBody = - options.serializedBody !== undefined && options.serializedBody !== ''; + if ("serializedBody" in options) { + const hasSerializedBody = options.serializedBody !== undefined && options.serializedBody !== "" - return hasSerializedBody ? options.serializedBody : null; + return hasSerializedBody ? options.serializedBody : null } // not all clients implement a serializedBody property (i.e. client-axios) - return options.body !== '' ? options.body : null; + return options.body !== "" ? options.body : null } // plain/text body if (hasBody) { - return options.body; + return options.body } // no body was provided - return undefined; + return undefined } diff --git a/packages/sdk/js/src/v2/gen/sdk.gen.ts b/packages/sdk/js/src/v2/gen/sdk.gen.ts index 919ff1fed87..9798bef6017 100644 --- a/packages/sdk/js/src/v2/gen/sdk.gen.ts +++ b/packages/sdk/js/src/v2/gen/sdk.gen.ts @@ -1,7554 +1,11368 @@ // This file is auto-generated by @hey-api/openapi-ts -import { client } from './client.gen.js'; -import { buildClientParams, type Client, type Options as Options2, type TDataShape } from './client/index.js'; -import type { AgentBuilderPreviewErrors, AgentBuilderPreviewResponses, AgentBuilderSaveErrors, AgentBuilderSaveResponses, AgentManagerFailure, AgentManagerRequestId, AgentManagerResult, AgentPartInput, AnacondaDesktopOpenErrors, AnacondaDesktopOpenResponses, AnacondaDesktopStatusErrors, AnacondaDesktopStatusResponses, AnacondaDesktopSyncErrors, AnacondaDesktopSyncResponses, AppAgentsErrors, AppAgentsResponses, AppLogErrors, AppLogResponses, AppSkillsErrors, AppSkillsResponses, Auth as Auth3, AuthRemoveErrors, AuthRemoveResponses, AuthSetErrors, AuthSetResponses, BackgroundProcessGetErrors, BackgroundProcessGetResponses, BackgroundProcessListErrors, BackgroundProcessListResponses, BackgroundProcessLogsErrors, BackgroundProcessLogsResponses, BackgroundProcessRestartErrors, BackgroundProcessRestartResponses, BackgroundProcessStopErrors, BackgroundProcessStopResponses, BackgroundProcessStopSessionErrors, BackgroundProcessStopSessionResponses, BranchNameGenerateErrors, BranchNameGenerateResponses, CommandListErrors, CommandListResponses, CommitMessageGenerateErrors, CommitMessageGenerateResponses, Config as Config4, ConfigEffectiveErrors, ConfigEffectiveResponses, ConfigGetErrors, ConfigGetResponses, ConfigModelStateErrors, ConfigModelStateResponses, ConfigModelStateUpdateErrors, ConfigModelStateUpdateResponses, ConfigOverlayErrors, ConfigOverlayResponses, ConfigOverlayUpdateErrors, ConfigOverlayUpdateResponses, ConfigProvidersErrors, ConfigProvidersResponses, ConfigRulesErrors, ConfigRulesResponses, ConfigRulesUpdateErrors, ConfigRulesUpdateResponses, ConfigSourcesErrors, ConfigSourcesResponses, ConfigUpdateErrors, ConfigUpdateResponses, ConfigWarningsErrors, ConfigWarningsResponses, EnhancePromptEnhanceErrors, EnhancePromptEnhanceResponses, EventSubscribeResponses, EventTuiCommandExecute2, EventTuiPromptAppend2, EventTuiSessionSelect2, EventTuiToastShow2, ExperimentalCapabilitiesGetErrors, ExperimentalCapabilitiesGetResponses, ExperimentalConsoleGetErrors, ExperimentalConsoleGetResponses, ExperimentalConsoleListOrgsErrors, ExperimentalConsoleListOrgsResponses, ExperimentalConsoleSwitchOrgResponses, ExperimentalControlPlaneMoveSessionErrors, ExperimentalControlPlaneMoveSessionResponses, ExperimentalProjectCopyGenerateNameErrors, ExperimentalProjectCopyGenerateNameResponses, ExperimentalResourceListErrors, ExperimentalResourceListResponses, ExperimentalSessionBackgroundErrors, ExperimentalSessionBackgroundResponses, ExperimentalSessionListErrors, ExperimentalSessionListResponses, ExperimentalWorkspaceAdapterListErrors, ExperimentalWorkspaceAdapterListResponses, ExperimentalWorkspaceCreateErrors, ExperimentalWorkspaceCreateResponses, ExperimentalWorkspaceListErrors, ExperimentalWorkspaceListResponses, ExperimentalWorkspaceRemoveErrors, ExperimentalWorkspaceRemoveResponses, ExperimentalWorkspaceStatusErrors, ExperimentalWorkspaceStatusResponses, ExperimentalWorkspaceSyncListErrors, ExperimentalWorkspaceSyncListResponses, ExperimentalWorkspaceWarpErrors, ExperimentalWorkspaceWarpResponses, FileListErrors, FileListResponses, FilePartInput, FilePartSource, FileReadErrors, FileReadResponses, FileStatusErrors, FileStatusResponses, FindFilesErrors, FindFilesResponses, FindSymbolsErrors, FindSymbolsResponses, FindTextErrors, FindTextResponses, FormatterStatusErrors, FormatterStatusResponses, GlobalConfigGetErrors, GlobalConfigGetResponses, GlobalConfigUpdateErrors, GlobalConfigUpdateResponses, GlobalDisposeErrors, GlobalDisposeResponses, GlobalEventErrors, GlobalEventResponses, GlobalHealthErrors, GlobalHealthResponses, GlobalUpgradeErrors, GlobalUpgradeResponses, IndexingModelsErrors, IndexingModelsResponses, IndexingStatusErrors, IndexingStatusResponses, IndexingWarningsErrors, IndexingWarningsResponses, InstanceDisposeErrors, InstanceDisposeResponses, InstanceReloadErrors, InstanceReloadResponses, InteractiveTerminalCloseErrors, InteractiveTerminalCloseResponses, InteractiveTerminalGetErrors, InteractiveTerminalGetResponses, InteractiveTerminalListErrors, InteractiveTerminalListResponses, InteractiveTerminalResizeErrors, InteractiveTerminalResizeInput, InteractiveTerminalResizeResponses, InteractiveTerminalWriteErrors, InteractiveTerminalWriteInput, InteractiveTerminalWriteResponses, KiloAudioTranscriptionsErrors, KiloAudioTranscriptionsResponses, KiloAuthStatusErrors, KiloAuthStatusResponses, KiloClawChatCredentialsErrors, KiloClawChatCredentialsResponses, KiloClawStatusErrors, KiloClawStatusResponses, KiloCloudSessionGetErrors, KiloCloudSessionGetResponses, KiloCloudSessionImportErrors, KiloCloudSessionImportResponses, KiloCloudSessionsErrors, KiloCloudSessionsResponses, KilocodeAgentManagerListErrors, KilocodeAgentManagerListResponses, KilocodeAgentManagerRejectErrors, KilocodeAgentManagerRejectResponses, KilocodeAgentManagerReplyErrors, KilocodeAgentManagerReplyResponses, KilocodeAgentRequirementsErrors, KilocodeAgentRequirementsResponses, KilocodeHeapSnapshotErrors, KilocodeHeapSnapshotResponses, KilocodeNotebookListErrors, KilocodeNotebookListResponses, KilocodeNotebookRejectErrors, KilocodeNotebookRejectResponses, KilocodeNotebookReplyErrors, KilocodeNotebookReplyResponses, KilocodeRemoveAgentErrors, KilocodeRemoveAgentResponses, KilocodeRemoveSkillErrors, KilocodeRemoveSkillResponses, KilocodeSessionImportMessageErrors, KilocodeSessionImportMessageResponses, KilocodeSessionImportPartErrors, KilocodeSessionImportPartResponses, KilocodeSessionImportProjectErrors, KilocodeSessionImportProjectResponses, KilocodeSessionImportSessionErrors, KilocodeSessionImportSessionResponses, KilocodeSessionModelUsageErrors, KilocodeSessionModelUsageResponses, KiloEditErrors, KiloEditResponses, KiloFimErrors, KiloFimResponses, KiloModelsImagesErrors, KiloModelsImagesResponses, KiloModesErrors, KiloModesResponses, KiloNotificationsErrors, KiloNotificationsResponses, KiloOrganizationSetErrors, KiloOrganizationSetResponses, KiloProfileErrors, KiloProfileResponses, LocationRef, LspStatusErrors, LspStatusResponses, McpAddErrors, McpAddResponses, McpAuthAuthenticateErrors, McpAuthAuthenticateResponses, McpAuthCallbackErrors, McpAuthCallbackResponses, McpAuthRemoveErrors, McpAuthRemoveResponses, McpAuthStartErrors, McpAuthStartResponses, McpConnectErrors, McpConnectResponses, McpDisconnectErrors, McpDisconnectResponses, McpLocalConfig, McpRemoteConfig, McpStatusErrors, McpStatusResponses, MemoryConfigureErrors, MemoryConfigureResponses, MemoryCorrectErrors, MemoryCorrectResponses, MemoryDisableErrors, MemoryDisableResponses, MemoryEnableErrors, MemoryEnableResponses, MemoryForgetErrors, MemoryForgetResponses, MemoryPurgeErrors, MemoryPurgeResponses, MemoryRebuildErrors, MemoryRebuildResponses, MemoryRememberErrors, MemoryRememberResponses, MemoryShowErrors, MemoryShowResponses, MemoryStatusErrors, MemoryStatusResponses, ModelRef, MoveSessionDestination, NetworkListErrors, NetworkListResponses, NetworkRejectErrors, NetworkRejectResponses, NetworkReplyErrors, NetworkReplyResponses, NotebookFailure, NotebookRequestId, NotebookResult, OutputFormat, Part as Part2, PartDeleteErrors, PartDeleteResponses, PartUpdateErrors, PartUpdateResponses, PathGetErrors, PathGetResponses, PermissionAllowEverythingErrors, PermissionAllowEverythingResponses, PermissionListErrors, PermissionListResponses, PermissionReplyErrors, PermissionReplyResponses, PermissionRespondErrors, PermissionRespondResponses, PermissionRuleset, PermissionSaveAlwaysRulesErrors, PermissionSaveAlwaysRulesResponses, PermissionV2Reply, PermissionV2Source, ProjectCommands, ProjectCurrentErrors, ProjectCurrentResponses, ProjectDirectoriesErrors, ProjectDirectoriesResponses, ProjectIcon, ProjectInitGitErrors, ProjectInitGitResponses, ProjectListErrors, ProjectListResponses, ProjectUpdateErrors, ProjectUpdateResponses, PromptInput, ProviderAuthErrors, ProviderAuthResponses, ProviderListErrors, ProviderListResponses, ProviderOauthAuthorizeErrors, ProviderOauthAuthorizeResponses, ProviderOauthCallbackErrors, ProviderOauthCallbackResponses, PtyConnectErrors, PtyConnectResponses, PtyConnectTokenErrors, PtyConnectTokenResponses, PtyCreateErrors, PtyCreateResponses, PtyGetErrors, PtyGetResponses, PtyListErrors, PtyListResponses, PtyRemoveErrors, PtyRemoveResponses, PtyShellsErrors, PtyShellsResponses, PtyUpdateErrors, PtyUpdateResponses, QuestionAnswer, QuestionListErrors, QuestionListResponses, QuestionRejectErrors, QuestionRejectResponses, QuestionReplyErrors, QuestionReplyResponses, QuestionV2Reply, RemoteDisableErrors, RemoteDisableResponses, RemoteEnableErrors, RemoteEnableResponses, RemoteStatusErrors, RemoteStatusResponses, SandboxStatusErrors, SandboxStatusResponses, SandboxSupportErrors, SandboxSupportResponses, SandboxToggleErrors, SandboxToggleResponses, SessionAbortErrors, SessionAbortResponses, SessionChildrenErrors, SessionChildrenResponses, SessionCommandErrors, SessionCommandResponses, SessionCreateErrors, SessionCreateResponses, SessionDeleteErrors, SessionDeleteMessageErrors, SessionDeleteMessageResponses, SessionDeleteResponses, SessionDiffErrors, SessionDiffResponses, SessionForkErrors, SessionForkResponses, SessionGetErrors, SessionGetResponses, SessionInitErrors, SessionInitResponses, SessionListErrors, SessionListResponses, SessionMessageErrors, SessionMessageResponses, SessionMessagesErrors, SessionMessagesResponses, SessionPromptAsyncErrors, SessionPromptAsyncResponses, SessionPromptErrors, SessionPromptResponses, SessionRevertErrors, SessionRevertResponses, SessionShareErrors, SessionShareResponses, SessionShellErrors, SessionShellResponses, SessionStatusErrors, SessionStatusResponses, SessionSummarizeErrors, SessionSummarizeResponses, SessionTodoErrors, SessionTodoResponses, SessionUnrevertErrors, SessionUnrevertResponses, SessionUnshareErrors, SessionUnshareResponses, SessionUpdateErrors, SessionUpdateResponses, SessionViewedErrors, SessionViewedResponses, SubtaskPartInput, SuggestionAcceptErrors, SuggestionAcceptResponses, SuggestionDismissErrors, SuggestionDismissResponses, SuggestionListErrors, SuggestionListResponses, SyncHistoryListErrors, SyncHistoryListResponses, SyncReplayErrors, SyncReplayResponses, SyncStartErrors, SyncStartResponses, SyncStealErrors, SyncStealResponses, TelemetryCaptureErrors, TelemetryCaptureResponses, TelemetrySetEnabledErrors, TelemetrySetEnabledResponses, TextPartInput, ToolIdsErrors, ToolIdsResponses, ToolListErrors, ToolListResponses, TuiAppendPromptErrors, TuiAppendPromptResponses, TuiClearPromptErrors, TuiClearPromptResponses, TuiConfigGetErrors, TuiConfigGetResponses, TuiConfigUpdateErrors, TuiConfigUpdateResponses, TuiControlNextErrors, TuiControlNextResponses, TuiControlResponseErrors, TuiControlResponseResponses, TuiExecuteCommandErrors, TuiExecuteCommandResponses, TuiKeybindListErrors, TuiKeybindListResponses, TuiOpenHelpErrors, TuiOpenHelpResponses, TuiOpenModelsErrors, TuiOpenModelsResponses, TuiOpenSessionsErrors, TuiOpenSessionsResponses, TuiOpenThemesErrors, TuiOpenThemesResponses, TuiPublishErrors, TuiPublishResponses, TuiSelectSessionErrors, TuiSelectSessionResponses, TuiShowToastErrors, TuiShowToastResponses, TuiSubmitPromptErrors, TuiSubmitPromptResponses, V2AgentListErrors, V2AgentListResponses, V2CommandListErrors, V2CommandListResponses, V2CredentialRemoveErrors, V2CredentialRemoveResponses, V2CredentialUpdateErrors, V2CredentialUpdateResponses, V2EventSubscribeErrors, V2EventSubscribeResponses, V2FsFindErrors, V2FsFindResponses, V2FsListErrors, V2FsListResponses, V2FsReadErrors, V2FsReadResponses, V2HealthGetErrors, V2HealthGetResponses, V2IntegrationAttemptCancelErrors, V2IntegrationAttemptCancelResponses, V2IntegrationAttemptCompleteErrors, V2IntegrationAttemptCompleteResponses, V2IntegrationAttemptStatusErrors, V2IntegrationAttemptStatusResponses, V2IntegrationConnectKeyErrors, V2IntegrationConnectKeyResponses, V2IntegrationConnectOauthErrors, V2IntegrationConnectOauthResponses, V2IntegrationGetErrors, V2IntegrationGetResponses, V2IntegrationListErrors, V2IntegrationListResponses, V2LocationGetErrors, V2LocationGetResponses, V2ModelListErrors, V2ModelListResponses, V2PermissionRequestListErrors, V2PermissionRequestListResponses, V2PermissionSavedListErrors, V2PermissionSavedListResponses, V2PermissionSavedRemoveErrors, V2PermissionSavedRemoveResponses, V2ProjectCopyCreateErrors, V2ProjectCopyCreateResponses, V2ProjectCopyRefreshErrors, V2ProjectCopyRefreshResponses, V2ProjectCopyRemoveErrors, V2ProjectCopyRemoveResponses, V2ProviderGetErrors, V2ProviderGetResponses, V2ProviderListErrors, V2ProviderListResponses, V2PtyConnectErrors, V2PtyConnectResponses, V2PtyConnectTokenErrors, V2PtyConnectTokenResponses, V2PtyCreateErrors, V2PtyCreateResponses, V2PtyGetErrors, V2PtyGetResponses, V2PtyListErrors, V2PtyListResponses, V2PtyRemoveErrors, V2PtyRemoveResponses, V2PtyUpdateErrors, V2PtyUpdateResponses, V2QuestionRequestListErrors, V2QuestionRequestListResponses, V2ReferenceListErrors, V2ReferenceListResponses, V2SessionActiveErrors, V2SessionActiveResponses, V2SessionCompactErrors, V2SessionCompactResponses, V2SessionContextErrors, V2SessionContextResponses, V2SessionCreateErrors, V2SessionCreateResponses, V2SessionEventsErrors, V2SessionEventsResponses, V2SessionGetErrors, V2SessionGetResponses, V2SessionHistoryErrors, V2SessionHistoryResponses, V2SessionInterruptErrors, V2SessionInterruptResponses, V2SessionListErrors, V2SessionListResponses, V2SessionMessageErrors, V2SessionMessageResponses, V2SessionMessagesErrors, V2SessionMessagesResponses, V2SessionPermissionCreateErrors, V2SessionPermissionCreateResponses, V2SessionPermissionGetErrors, V2SessionPermissionGetResponses, V2SessionPermissionListErrors, V2SessionPermissionListResponses, V2SessionPermissionReplyErrors, V2SessionPermissionReplyResponses, V2SessionPromptErrors, V2SessionPromptResponses, V2SessionQuestionListErrors, V2SessionQuestionListResponses, V2SessionQuestionRejectErrors, V2SessionQuestionRejectResponses, V2SessionQuestionReplyErrors, V2SessionQuestionReplyResponses, V2SessionRevertClearErrors, V2SessionRevertClearResponses, V2SessionRevertCommitErrors, V2SessionRevertCommitResponses, V2SessionRevertStageErrors, V2SessionRevertStageResponses, V2SessionSwitchAgentErrors, V2SessionSwitchAgentResponses, V2SessionSwitchModelErrors, V2SessionSwitchModelResponses, V2SessionWaitErrors, V2SessionWaitResponses, V2SkillListErrors, V2SkillListResponses, VcsApplyErrors, VcsApplyResponses, VcsDiffErrors, VcsDiffRawErrors, VcsDiffRawResponses, VcsDiffResponses, VcsGetErrors, VcsGetResponses, VcsStatusErrors, VcsStatusResponses, WorktreeCreateErrors, WorktreeCreateInput, WorktreeCreateResponses, WorktreeDiffErrors, WorktreeDiffFileErrors, WorktreeDiffFileResponses, WorktreeDiffResponses, WorktreeDiffSummaryErrors, WorktreeDiffSummaryResponses, WorktreeListErrors, WorktreeListResponses, WorktreeRemoveErrors, WorktreeRemoveInput, WorktreeRemoveResponses, WorktreeResetErrors, WorktreeResetInput, WorktreeResetResponses } from './types.gen.js'; +import { client } from "./client.gen.js" +import { buildClientParams, type Client, type Options as Options2, type TDataShape } from "./client/index.js" +import type { + AgentBuilderPreviewErrors, + AgentBuilderPreviewResponses, + AgentBuilderSaveErrors, + AgentBuilderSaveResponses, + AgentManagerFailure, + AgentManagerRequestId, + AgentManagerResult, + AgentPartInput, + AnacondaDesktopOpenErrors, + AnacondaDesktopOpenResponses, + AnacondaDesktopStatusErrors, + AnacondaDesktopStatusResponses, + AnacondaDesktopSyncErrors, + AnacondaDesktopSyncResponses, + AppAgentsErrors, + AppAgentsResponses, + AppLogErrors, + AppLogResponses, + AppSkillsErrors, + AppSkillsResponses, + Auth as Auth3, + AuthRemoveErrors, + AuthRemoveResponses, + AuthSetErrors, + AuthSetResponses, + BackgroundProcessGetErrors, + BackgroundProcessGetResponses, + BackgroundProcessListErrors, + BackgroundProcessListResponses, + BackgroundProcessLogsErrors, + BackgroundProcessLogsResponses, + BackgroundProcessRestartErrors, + BackgroundProcessRestartResponses, + BackgroundProcessStopErrors, + BackgroundProcessStopResponses, + BackgroundProcessStopSessionErrors, + BackgroundProcessStopSessionResponses, + BranchNameGenerateErrors, + BranchNameGenerateResponses, + CommandListErrors, + CommandListResponses, + CommitMessageGenerateErrors, + CommitMessageGenerateResponses, + Config as Config4, + ConfigEffectiveErrors, + ConfigEffectiveResponses, + ConfigGetErrors, + ConfigGetResponses, + ConfigModelStateErrors, + ConfigModelStateResponses, + ConfigModelStateUpdateErrors, + ConfigModelStateUpdateResponses, + ConfigOverlayErrors, + ConfigOverlayResponses, + ConfigOverlayUpdateErrors, + ConfigOverlayUpdateResponses, + ConfigProvidersErrors, + ConfigProvidersResponses, + ConfigRulesErrors, + ConfigRulesResponses, + ConfigRulesUpdateErrors, + ConfigRulesUpdateResponses, + ConfigSourcesErrors, + ConfigSourcesResponses, + ConfigUpdateErrors, + ConfigUpdateResponses, + ConfigWarningsErrors, + ConfigWarningsResponses, + EnhancePromptEnhanceErrors, + EnhancePromptEnhanceResponses, + EventSubscribeResponses, + EventTuiCommandExecute2, + EventTuiPromptAppend2, + EventTuiSessionSelect2, + EventTuiToastShow2, + ExperimentalCapabilitiesGetErrors, + ExperimentalCapabilitiesGetResponses, + ExperimentalConsoleGetErrors, + ExperimentalConsoleGetResponses, + ExperimentalConsoleListOrgsErrors, + ExperimentalConsoleListOrgsResponses, + ExperimentalConsoleSwitchOrgResponses, + ExperimentalControlPlaneMoveSessionErrors, + ExperimentalControlPlaneMoveSessionResponses, + ExperimentalProjectCopyGenerateNameErrors, + ExperimentalProjectCopyGenerateNameResponses, + ExperimentalResourceListErrors, + ExperimentalResourceListResponses, + ExperimentalSessionBackgroundErrors, + ExperimentalSessionBackgroundResponses, + ExperimentalSessionListErrors, + ExperimentalSessionListResponses, + ExperimentalWorkspaceAdapterListErrors, + ExperimentalWorkspaceAdapterListResponses, + ExperimentalWorkspaceCreateErrors, + ExperimentalWorkspaceCreateResponses, + ExperimentalWorkspaceListErrors, + ExperimentalWorkspaceListResponses, + ExperimentalWorkspaceRemoveErrors, + ExperimentalWorkspaceRemoveResponses, + ExperimentalWorkspaceStatusErrors, + ExperimentalWorkspaceStatusResponses, + ExperimentalWorkspaceSyncListErrors, + ExperimentalWorkspaceSyncListResponses, + ExperimentalWorkspaceWarpErrors, + ExperimentalWorkspaceWarpResponses, + FileListErrors, + FileListResponses, + FilePartInput, + FilePartSource, + FileReadErrors, + FileReadResponses, + FileStatusErrors, + FileStatusResponses, + FindFilesErrors, + FindFilesResponses, + FindSymbolsErrors, + FindSymbolsResponses, + FindTextErrors, + FindTextResponses, + FormatterStatusErrors, + FormatterStatusResponses, + GlobalConfigGetErrors, + GlobalConfigGetResponses, + GlobalConfigUpdateErrors, + GlobalConfigUpdateResponses, + GlobalDisposeErrors, + GlobalDisposeResponses, + GlobalEventErrors, + GlobalEventResponses, + GlobalHealthErrors, + GlobalHealthResponses, + GlobalUpgradeErrors, + GlobalUpgradeResponses, + IndexingModelsErrors, + IndexingModelsResponses, + IndexingStatusErrors, + IndexingStatusResponses, + IndexingWarningsErrors, + IndexingWarningsResponses, + InstanceDisposeErrors, + InstanceDisposeResponses, + InstanceReloadErrors, + InstanceReloadResponses, + InteractiveTerminalCloseErrors, + InteractiveTerminalCloseResponses, + InteractiveTerminalGetErrors, + InteractiveTerminalGetResponses, + InteractiveTerminalListErrors, + InteractiveTerminalListResponses, + InteractiveTerminalResizeErrors, + InteractiveTerminalResizeInput, + InteractiveTerminalResizeResponses, + InteractiveTerminalWriteErrors, + InteractiveTerminalWriteInput, + InteractiveTerminalWriteResponses, + KiloAudioTranscriptionsErrors, + KiloAudioTranscriptionsResponses, + KiloAuthStatusErrors, + KiloAuthStatusResponses, + KiloClawChatCredentialsErrors, + KiloClawChatCredentialsResponses, + KiloClawStatusErrors, + KiloClawStatusResponses, + KiloCloudSessionGetErrors, + KiloCloudSessionGetResponses, + KiloCloudSessionImportErrors, + KiloCloudSessionImportResponses, + KiloCloudSessionsErrors, + KiloCloudSessionsResponses, + KilocodeAgentManagerListErrors, + KilocodeAgentManagerListResponses, + KilocodeAgentManagerRejectErrors, + KilocodeAgentManagerRejectResponses, + KilocodeAgentManagerReplyErrors, + KilocodeAgentManagerReplyResponses, + KilocodeAgentRequirementsErrors, + KilocodeAgentRequirementsResponses, + KilocodeHeapSnapshotErrors, + KilocodeHeapSnapshotResponses, + KilocodeNotebookListErrors, + KilocodeNotebookListResponses, + KilocodeNotebookRejectErrors, + KilocodeNotebookRejectResponses, + KilocodeNotebookReplyErrors, + KilocodeNotebookReplyResponses, + KilocodeRemoveAgentErrors, + KilocodeRemoveAgentResponses, + KilocodeRemoveSkillErrors, + KilocodeRemoveSkillResponses, + KilocodeSessionImportMessageErrors, + KilocodeSessionImportMessageResponses, + KilocodeSessionImportPartErrors, + KilocodeSessionImportPartResponses, + KilocodeSessionImportProjectErrors, + KilocodeSessionImportProjectResponses, + KilocodeSessionImportSessionErrors, + KilocodeSessionImportSessionResponses, + KilocodeSessionModelUsageErrors, + KilocodeSessionModelUsageResponses, + KiloEditErrors, + KiloEditResponses, + KiloFimErrors, + KiloFimResponses, + KiloModelsImagesErrors, + KiloModelsImagesResponses, + KiloModesErrors, + KiloModesResponses, + KiloNotificationsErrors, + KiloNotificationsResponses, + KiloOrganizationSetErrors, + KiloOrganizationSetResponses, + KiloProfileErrors, + KiloProfileResponses, + LocationRef, + LspStatusErrors, + LspStatusResponses, + McpAddErrors, + McpAddResponses, + McpAuthAuthenticateErrors, + McpAuthAuthenticateResponses, + McpAuthCallbackErrors, + McpAuthCallbackResponses, + McpAuthRemoveErrors, + McpAuthRemoveResponses, + McpAuthStartErrors, + McpAuthStartResponses, + McpConnectErrors, + McpConnectResponses, + McpDisconnectErrors, + McpDisconnectResponses, + McpLocalConfig, + McpRemoteConfig, + McpStatusErrors, + McpStatusResponses, + MemoryConfigureErrors, + MemoryConfigureResponses, + MemoryCorrectErrors, + MemoryCorrectResponses, + MemoryDisableErrors, + MemoryDisableResponses, + MemoryEnableErrors, + MemoryEnableResponses, + MemoryForgetErrors, + MemoryForgetResponses, + MemoryPurgeErrors, + MemoryPurgeResponses, + MemoryRebuildErrors, + MemoryRebuildResponses, + MemoryRememberErrors, + MemoryRememberResponses, + MemoryShowErrors, + MemoryShowResponses, + MemoryStatusErrors, + MemoryStatusResponses, + ModelRef, + MoveSessionDestination, + NetworkListErrors, + NetworkListResponses, + NetworkRejectErrors, + NetworkRejectResponses, + NetworkReplyErrors, + NetworkReplyResponses, + NotebookFailure, + NotebookRequestId, + NotebookResult, + OutputFormat, + Part as Part2, + PartDeleteErrors, + PartDeleteResponses, + PartUpdateErrors, + PartUpdateResponses, + PathGetErrors, + PathGetResponses, + PermissionAllowEverythingErrors, + PermissionAllowEverythingResponses, + PermissionListErrors, + PermissionListResponses, + PermissionReplyErrors, + PermissionReplyResponses, + PermissionRespondErrors, + PermissionRespondResponses, + PermissionRuleset, + PermissionSaveAlwaysRulesErrors, + PermissionSaveAlwaysRulesResponses, + PermissionV2Reply, + PermissionV2Source, + ProjectCommands, + ProjectCurrentErrors, + ProjectCurrentResponses, + ProjectDirectoriesErrors, + ProjectDirectoriesResponses, + ProjectIcon, + ProjectInitGitErrors, + ProjectInitGitResponses, + ProjectListErrors, + ProjectListResponses, + ProjectUpdateErrors, + ProjectUpdateResponses, + PromptInput, + ProviderAuthErrors, + ProviderAuthResponses, + ProviderListErrors, + ProviderListResponses, + ProviderOauthAuthorizeErrors, + ProviderOauthAuthorizeResponses, + ProviderOauthCallbackErrors, + ProviderOauthCallbackResponses, + PtyConnectErrors, + PtyConnectResponses, + PtyConnectTokenErrors, + PtyConnectTokenResponses, + PtyCreateErrors, + PtyCreateResponses, + PtyGetErrors, + PtyGetResponses, + PtyListErrors, + PtyListResponses, + PtyRemoveErrors, + PtyRemoveResponses, + PtyShellsErrors, + PtyShellsResponses, + PtyUpdateErrors, + PtyUpdateResponses, + QuestionAnswer, + QuestionListErrors, + QuestionListResponses, + QuestionRejectErrors, + QuestionRejectResponses, + QuestionReplyErrors, + QuestionReplyResponses, + QuestionV2Reply, + RemoteDisableErrors, + RemoteDisableResponses, + RemoteEnableErrors, + RemoteEnableResponses, + RemoteStatusErrors, + RemoteStatusResponses, + SandboxStatusErrors, + SandboxStatusResponses, + SandboxSupportErrors, + SandboxSupportResponses, + SandboxToggleErrors, + SandboxToggleResponses, + SessionAbortErrors, + SessionAbortResponses, + SessionChildrenErrors, + SessionChildrenResponses, + SessionCommandErrors, + SessionCommandResponses, + SessionCreateErrors, + SessionCreateResponses, + SessionDeleteErrors, + SessionDeleteMessageErrors, + SessionDeleteMessageResponses, + SessionDeleteResponses, + SessionDiffErrors, + SessionDiffResponses, + SessionForkErrors, + SessionForkResponses, + SessionGetErrors, + SessionGetResponses, + SessionInitErrors, + SessionInitResponses, + SessionListErrors, + SessionListResponses, + SessionMessageErrors, + SessionMessageResponses, + SessionMessagesErrors, + SessionMessagesResponses, + SessionPromptAsyncErrors, + SessionPromptAsyncResponses, + SessionPromptErrors, + SessionPromptResponses, + SessionRevertErrors, + SessionRevertResponses, + SessionShareErrors, + SessionShareResponses, + SessionShellErrors, + SessionShellResponses, + SessionStatusErrors, + SessionStatusResponses, + SessionSummarizeErrors, + SessionSummarizeResponses, + SessionTodoErrors, + SessionTodoResponses, + SessionUnrevertErrors, + SessionUnrevertResponses, + SessionUnshareErrors, + SessionUnshareResponses, + SessionUpdateErrors, + SessionUpdateResponses, + SessionViewedErrors, + SessionViewedResponses, + SubtaskPartInput, + SuggestionAcceptErrors, + SuggestionAcceptResponses, + SuggestionDismissErrors, + SuggestionDismissResponses, + SuggestionListErrors, + SuggestionListResponses, + SyncHistoryListErrors, + SyncHistoryListResponses, + SyncReplayErrors, + SyncReplayResponses, + SyncStartErrors, + SyncStartResponses, + SyncStealErrors, + SyncStealResponses, + TelemetryCaptureErrors, + TelemetryCaptureResponses, + TelemetrySetEnabledErrors, + TelemetrySetEnabledResponses, + TextPartInput, + ToolIdsErrors, + ToolIdsResponses, + ToolListErrors, + ToolListResponses, + TuiAppendPromptErrors, + TuiAppendPromptResponses, + TuiClearPromptErrors, + TuiClearPromptResponses, + TuiConfigGetErrors, + TuiConfigGetResponses, + TuiConfigUpdateErrors, + TuiConfigUpdateResponses, + TuiControlNextErrors, + TuiControlNextResponses, + TuiControlResponseErrors, + TuiControlResponseResponses, + TuiExecuteCommandErrors, + TuiExecuteCommandResponses, + TuiKeybindListErrors, + TuiKeybindListResponses, + TuiOpenHelpErrors, + TuiOpenHelpResponses, + TuiOpenModelsErrors, + TuiOpenModelsResponses, + TuiOpenSessionsErrors, + TuiOpenSessionsResponses, + TuiOpenThemesErrors, + TuiOpenThemesResponses, + TuiPublishErrors, + TuiPublishResponses, + TuiSelectSessionErrors, + TuiSelectSessionResponses, + TuiShowToastErrors, + TuiShowToastResponses, + TuiSubmitPromptErrors, + TuiSubmitPromptResponses, + V2AgentListErrors, + V2AgentListResponses, + V2CommandListErrors, + V2CommandListResponses, + V2CredentialRemoveErrors, + V2CredentialRemoveResponses, + V2CredentialUpdateErrors, + V2CredentialUpdateResponses, + V2EventSubscribeErrors, + V2EventSubscribeResponses, + V2FsFindErrors, + V2FsFindResponses, + V2FsListErrors, + V2FsListResponses, + V2FsReadErrors, + V2FsReadResponses, + V2HealthGetErrors, + V2HealthGetResponses, + V2IntegrationAttemptCancelErrors, + V2IntegrationAttemptCancelResponses, + V2IntegrationAttemptCompleteErrors, + V2IntegrationAttemptCompleteResponses, + V2IntegrationAttemptStatusErrors, + V2IntegrationAttemptStatusResponses, + V2IntegrationConnectKeyErrors, + V2IntegrationConnectKeyResponses, + V2IntegrationConnectOauthErrors, + V2IntegrationConnectOauthResponses, + V2IntegrationGetErrors, + V2IntegrationGetResponses, + V2IntegrationListErrors, + V2IntegrationListResponses, + V2LocationGetErrors, + V2LocationGetResponses, + V2ModelListErrors, + V2ModelListResponses, + V2PermissionRequestListErrors, + V2PermissionRequestListResponses, + V2PermissionSavedListErrors, + V2PermissionSavedListResponses, + V2PermissionSavedRemoveErrors, + V2PermissionSavedRemoveResponses, + V2ProjectCopyCreateErrors, + V2ProjectCopyCreateResponses, + V2ProjectCopyRefreshErrors, + V2ProjectCopyRefreshResponses, + V2ProjectCopyRemoveErrors, + V2ProjectCopyRemoveResponses, + V2ProviderGetErrors, + V2ProviderGetResponses, + V2ProviderListErrors, + V2ProviderListResponses, + V2PtyConnectErrors, + V2PtyConnectResponses, + V2PtyConnectTokenErrors, + V2PtyConnectTokenResponses, + V2PtyCreateErrors, + V2PtyCreateResponses, + V2PtyGetErrors, + V2PtyGetResponses, + V2PtyListErrors, + V2PtyListResponses, + V2PtyRemoveErrors, + V2PtyRemoveResponses, + V2PtyUpdateErrors, + V2PtyUpdateResponses, + V2QuestionRequestListErrors, + V2QuestionRequestListResponses, + V2ReferenceListErrors, + V2ReferenceListResponses, + V2SessionActiveErrors, + V2SessionActiveResponses, + V2SessionCompactErrors, + V2SessionCompactResponses, + V2SessionContextErrors, + V2SessionContextResponses, + V2SessionCreateErrors, + V2SessionCreateResponses, + V2SessionEventsErrors, + V2SessionEventsResponses, + V2SessionGetErrors, + V2SessionGetResponses, + V2SessionHistoryErrors, + V2SessionHistoryResponses, + V2SessionInterruptErrors, + V2SessionInterruptResponses, + V2SessionListErrors, + V2SessionListResponses, + V2SessionMessageErrors, + V2SessionMessageResponses, + V2SessionMessagesErrors, + V2SessionMessagesResponses, + V2SessionPermissionCreateErrors, + V2SessionPermissionCreateResponses, + V2SessionPermissionGetErrors, + V2SessionPermissionGetResponses, + V2SessionPermissionListErrors, + V2SessionPermissionListResponses, + V2SessionPermissionReplyErrors, + V2SessionPermissionReplyResponses, + V2SessionPromptErrors, + V2SessionPromptResponses, + V2SessionQuestionListErrors, + V2SessionQuestionListResponses, + V2SessionQuestionRejectErrors, + V2SessionQuestionRejectResponses, + V2SessionQuestionReplyErrors, + V2SessionQuestionReplyResponses, + V2SessionRevertClearErrors, + V2SessionRevertClearResponses, + V2SessionRevertCommitErrors, + V2SessionRevertCommitResponses, + V2SessionRevertStageErrors, + V2SessionRevertStageResponses, + V2SessionSwitchAgentErrors, + V2SessionSwitchAgentResponses, + V2SessionSwitchModelErrors, + V2SessionSwitchModelResponses, + V2SessionWaitErrors, + V2SessionWaitResponses, + V2SkillListErrors, + V2SkillListResponses, + VcsApplyErrors, + VcsApplyResponses, + VcsDiffErrors, + VcsDiffRawErrors, + VcsDiffRawResponses, + VcsDiffResponses, + VcsGetErrors, + VcsGetResponses, + VcsStatusErrors, + VcsStatusResponses, + WorktreeCreateErrors, + WorktreeCreateInput, + WorktreeCreateResponses, + WorktreeDiffErrors, + WorktreeDiffFileErrors, + WorktreeDiffFileResponses, + WorktreeDiffResponses, + WorktreeDiffSummaryErrors, + WorktreeDiffSummaryResponses, + WorktreeListErrors, + WorktreeListResponses, + WorktreeRemoveErrors, + WorktreeRemoveInput, + WorktreeRemoveResponses, + WorktreeResetErrors, + WorktreeResetInput, + WorktreeResetResponses, +} from "./types.gen.js" -export type Options = Options2 & { - /** - * You can provide a client instance returned by `createClient()` instead of - * individual options. This might be also useful if you want to implement a - * custom client. - */ - client?: Client; - /** - * You can pass arbitrary values through the `meta` object. This can be - * used to access values that aren't defined as part of the SDK function. - */ - meta?: Record; -}; +export type Options = Options2< + TData, + ThrowOnError +> & { + /** + * You can provide a client instance returned by `createClient()` instead of + * individual options. This might be also useful if you want to implement a + * custom client. + */ + client?: Client + /** + * You can pass arbitrary values through the `meta` object. This can be + * used to access values that aren't defined as part of the SDK function. + */ + meta?: Record +} class HeyApiClient { - protected client: Client; - - constructor(args?: { - client?: Client; - }) { - this.client = args?.client ?? client; - } + protected client: Client + + constructor(args?: { client?: Client }) { + this.client = args?.client ?? client + } } class HeyApiRegistry { - private readonly defaultKey = 'default'; - - private readonly instances: Map = new Map(); - - get(key?: string): T { - const instance = this.instances.get(key ?? this.defaultKey); - if (!instance) { - throw new Error(`No SDK client found. Create one with "new KiloClient()" to fix this error.`); - } - return instance; - } - - set(value: T, key?: string): void { - this.instances.set(key ?? this.defaultKey, value); + private readonly defaultKey = "default" + + private readonly instances: Map = new Map() + + get(key?: string): T { + const instance = this.instances.get(key ?? this.defaultKey) + if (!instance) { + throw new Error(`No SDK client found. Create one with "new KiloClient()" to fix this error.`) } + return instance + } + + set(value: T, key?: string): void { + this.instances.set(key ?? this.defaultKey, value) + } } export class Auth extends HeyApiClient { - /** - * Remove auth credentials - * - * Remove authentication credentials - */ - public remove(parameters: { - providerID: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'providerID' }] }]); - return (options?.client ?? this.client).delete({ - url: '/auth/{providerID}', - ...options, - ...params - }); - } - - /** - * Set auth credentials - * - * Set authentication credentials - */ - public set(parameters: { - providerID: string; - auth?: Auth3; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'providerID' }, { key: 'auth', map: 'body' }] }]); - return (options?.client ?? this.client).put({ - url: '/auth/{providerID}', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } + /** + * Remove auth credentials + * + * Remove authentication credentials + */ + public remove( + parameters: { + providerID: string + }, + options?: Options, + ) { + const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "providerID" }] }]) + return (options?.client ?? this.client).delete({ + url: "/auth/{providerID}", + ...options, + ...params, + }) + } + + /** + * Set auth credentials + * + * Set authentication credentials + */ + public set( + parameters: { + providerID: string + auth?: Auth3 + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "providerID" }, + { key: "auth", map: "body" }, + ], + }, + ], + ) + return (options?.client ?? this.client).put({ + url: "/auth/{providerID}", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } } export class App extends HeyApiClient { - /** - * Write log - * - * Write a log entry to the server logs with specified level and metadata. - */ - public log(parameters?: { - directory?: string; - workspace?: string; - service?: string; - level?: 'debug' | 'info' | 'error' | 'warn'; - message?: string; - extra?: { - [key: string]: unknown; - }; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'service' }, - { in: 'body', key: 'level' }, - { in: 'body', key: 'message' }, - { in: 'body', key: 'extra' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/log', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * List agents - * - * Get a list of all available AI agents in the Kilo system. - */ - public agents(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/agent', - ...options, - ...params - }); - } - - /** - * List skills - * - * Get a list of all available skills in the Kilo system. - */ - public skills(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/skill', - ...options, - ...params - }); - } + /** + * Write log + * + * Write a log entry to the server logs with specified level and metadata. + */ + public log( + parameters?: { + directory?: string + workspace?: string + service?: string + level?: "debug" | "info" | "error" | "warn" + message?: string + extra?: { + [key: string]: unknown + } + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "service" }, + { in: "body", key: "level" }, + { in: "body", key: "message" }, + { in: "body", key: "extra" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/log", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * List agents + * + * Get a list of all available AI agents in the Kilo system. + */ + public agents( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/agent", + ...options, + ...params, + }) + } + + /** + * List skills + * + * Get a list of all available skills in the Kilo system. + */ + public skills( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/skill", + ...options, + ...params, + }) + } } export class ControlPlane extends HeyApiClient { - /** - * Move session - * - * Move a session to another project directory, optionally transferring local changes. - */ - public moveSession(parameters?: { - sessionID?: string; - destination?: MoveSessionDestination; - moveChanges?: boolean; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'body', key: 'sessionID' }, - { in: 'body', key: 'destination' }, - { in: 'body', key: 'moveChanges' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/experimental/control-plane/move-session', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } + /** + * Move session + * + * Move a session to another project directory, optionally transferring local changes. + */ + public moveSession( + parameters?: { + sessionID?: string + destination?: MoveSessionDestination + moveChanges?: boolean + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "body", key: "sessionID" }, + { in: "body", key: "destination" }, + { in: "body", key: "moveChanges" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + ExperimentalControlPlaneMoveSessionResponses, + ExperimentalControlPlaneMoveSessionErrors, + ThrowOnError + >({ + url: "/experimental/control-plane/move-session", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } } export class Capabilities extends HeyApiClient { - /** - * Get experimental capabilities - * - * Get experimental features enabled on the Kilo server. - */ - public get(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/experimental/capabilities', - ...options, - ...params - }); - } + /** + * Get experimental capabilities + * + * Get experimental features enabled on the Kilo server. + */ + public get( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get< + ExperimentalCapabilitiesGetResponses, + ExperimentalCapabilitiesGetErrors, + ThrowOnError + >({ + url: "/experimental/capabilities", + ...options, + ...params, + }) + } } export class Console extends HeyApiClient { - /** - * Get active Console provider metadata - * - * Get the active Console org name and the set of provider IDs managed by that Console org. - */ - public get(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/experimental/console', - ...options, - ...params - }); - } - - /** - * List switchable Console orgs - * - * Get the available Console orgs across logged-in accounts, including the current active org. - */ - public listOrgs(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/experimental/console/orgs', - ...options, - ...params - }); - } - - /** - * Switch active Console org - * - * Persist a new active Console account/org selection for the current local Kilo state. - */ - public switchOrg(parameters?: { - directory?: string; - workspace?: string; - accountID?: string; - orgID?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'accountID' }, - { in: 'body', key: 'orgID' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/experimental/console/switch', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } + /** + * Get active Console provider metadata + * + * Get the active Console org name and the set of provider IDs managed by that Console org. + */ + public get( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get< + ExperimentalConsoleGetResponses, + ExperimentalConsoleGetErrors, + ThrowOnError + >({ + url: "/experimental/console", + ...options, + ...params, + }) + } + + /** + * List switchable Console orgs + * + * Get the available Console orgs across logged-in accounts, including the current active org. + */ + public listOrgs( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get< + ExperimentalConsoleListOrgsResponses, + ExperimentalConsoleListOrgsErrors, + ThrowOnError + >({ + url: "/experimental/console/orgs", + ...options, + ...params, + }) + } + + /** + * Switch active Console org + * + * Persist a new active Console account/org selection for the current local Kilo state. + */ + public switchOrg( + parameters?: { + directory?: string + workspace?: string + accountID?: string + orgID?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "accountID" }, + { in: "body", key: "orgID" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/experimental/console/switch", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } } export class Session extends HeyApiClient { - /** - * List sessions - * - * Get a list of all Kilo sessions across projects, sorted by most recently updated. Archived sessions are excluded by default. - */ - public list(parameters?: { - directory?: string; - workspace?: string; - projectID?: string; - worktrees?: boolean; - current?: 'true' | 'false'; - roots?: boolean | 'true' | 'false'; - start?: number; - cursor?: number; - search?: string; - limit?: number; - archived?: boolean | 'true' | 'false'; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'query', key: 'projectID' }, - { in: 'query', key: 'worktrees' }, - { in: 'query', key: 'current' }, - { in: 'query', key: 'roots' }, - { in: 'query', key: 'start' }, - { in: 'query', key: 'cursor' }, - { in: 'query', key: 'search' }, - { in: 'query', key: 'limit' }, - { in: 'query', key: 'archived' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/experimental/session', - ...options, - ...params - }); - } - - /** - * Background subagents - * - * Detach any synchronous subagents currently blocking the session and continue them in the background. - */ - public background(parameters: { - sessionID: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/experimental/session/{sessionID}/background', - ...options, - ...params - }); - } + /** + * List sessions + * + * Get a list of all Kilo sessions across projects, sorted by most recently updated. Archived sessions are excluded by default. + */ + public list( + parameters?: { + directory?: string + workspace?: string + projectID?: string + worktrees?: boolean + current?: "true" | "false" + roots?: boolean | "true" | "false" + start?: number + cursor?: number + search?: string + limit?: number + archived?: boolean | "true" | "false" + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "query", key: "projectID" }, + { in: "query", key: "worktrees" }, + { in: "query", key: "current" }, + { in: "query", key: "roots" }, + { in: "query", key: "start" }, + { in: "query", key: "cursor" }, + { in: "query", key: "search" }, + { in: "query", key: "limit" }, + { in: "query", key: "archived" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get< + ExperimentalSessionListResponses, + ExperimentalSessionListErrors, + ThrowOnError + >({ + url: "/experimental/session", + ...options, + ...params, + }) + } + + /** + * Background subagents + * + * Detach any synchronous subagents currently blocking the session and continue them in the background. + */ + public background( + parameters: { + sessionID: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + ExperimentalSessionBackgroundResponses, + ExperimentalSessionBackgroundErrors, + ThrowOnError + >({ + url: "/experimental/session/{sessionID}/background", + ...options, + ...params, + }) + } } export class Resource extends HeyApiClient { - /** - * Get MCP resources - * - * Get all available MCP resources from connected servers. Optionally filter by name. - */ - public list(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/experimental/resource', - ...options, - ...params - }); - } + /** + * Get MCP resources + * + * Get all available MCP resources from connected servers. Optionally filter by name. + */ + public list( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get< + ExperimentalResourceListResponses, + ExperimentalResourceListErrors, + ThrowOnError + >({ + url: "/experimental/resource", + ...options, + ...params, + }) + } } export class ProjectCopy extends HeyApiClient { - /** - * Generate project copy name - * - * Generate a short name for a project copy from task context. - */ - public generateName(parameters: { - projectID: string; - directory?: string; - workspace?: string; - context?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'projectID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'context' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/experimental/project/{projectID}/copy/generate-name', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } + /** + * Generate project copy name + * + * Generate a short name for a project copy from task context. + */ + public generateName( + parameters: { + projectID: string + directory?: string + workspace?: string + context?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "projectID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "context" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + ExperimentalProjectCopyGenerateNameResponses, + ExperimentalProjectCopyGenerateNameErrors, + ThrowOnError + >({ + url: "/experimental/project/{projectID}/copy/generate-name", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } } export class Adapter extends HeyApiClient { - /** - * List workspace adapters - * - * List all available workspace adapters for the current project. - */ - public list(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/experimental/workspace/adapter', - ...options, - ...params - }); - } + /** + * List workspace adapters + * + * List all available workspace adapters for the current project. + */ + public list( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get< + ExperimentalWorkspaceAdapterListResponses, + ExperimentalWorkspaceAdapterListErrors, + ThrowOnError + >({ + url: "/experimental/workspace/adapter", + ...options, + ...params, + }) + } } export class Workspace extends HeyApiClient { - /** - * List workspaces - * - * List all workspaces. - */ - public list(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/experimental/workspace', - ...options, - ...params - }); - } - - /** - * Create workspace - * - * Create a workspace for the current project. - */ - public create(parameters?: { - directory?: string; - workspace?: string; - id?: string; - type?: string; - branch?: string | null; - extra?: unknown | null; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'id' }, - { in: 'body', key: 'type' }, - { in: 'body', key: 'branch' }, - { in: 'body', key: 'extra' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/experimental/workspace', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Sync workspace list - * - * Register missing workspaces returned by workspace adapters. - */ - public syncList(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).post({ - url: '/experimental/workspace/sync-list', - ...options, - ...params - }); - } - - /** - * Workspace status - * - * Get connection status for workspaces in the current project. - */ - public status(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/experimental/workspace/status', - ...options, - ...params - }); - } - - /** - * Remove workspace - * - * Remove an existing workspace. - */ - public remove(parameters: { - id: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'id' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).delete({ - url: '/experimental/workspace/{id}', - ...options, - ...params - }); - } - - /** - * Warp session into workspace - * - * Move a session's sync history into the target workspace, or detach it to the local project. - */ - public warp(parameters?: { - directory?: string; - workspace?: string; - id?: string | null; - sessionID?: string; - copyChanges?: boolean; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'id' }, - { in: 'body', key: 'sessionID' }, - { in: 'body', key: 'copyChanges' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/experimental/workspace/warp', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - private _adapter?: Adapter; - get adapter(): Adapter { - return this._adapter ??= new Adapter({ client: this.client }); - } + /** + * List workspaces + * + * List all workspaces. + */ + public list( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get< + ExperimentalWorkspaceListResponses, + ExperimentalWorkspaceListErrors, + ThrowOnError + >({ + url: "/experimental/workspace", + ...options, + ...params, + }) + } + + /** + * Create workspace + * + * Create a workspace for the current project. + */ + public create( + parameters?: { + directory?: string + workspace?: string + id?: string + type?: string + branch?: string | null + extra?: unknown | null + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "id" }, + { in: "body", key: "type" }, + { in: "body", key: "branch" }, + { in: "body", key: "extra" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + ExperimentalWorkspaceCreateResponses, + ExperimentalWorkspaceCreateErrors, + ThrowOnError + >({ + url: "/experimental/workspace", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Sync workspace list + * + * Register missing workspaces returned by workspace adapters. + */ + public syncList( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + ExperimentalWorkspaceSyncListResponses, + ExperimentalWorkspaceSyncListErrors, + ThrowOnError + >({ + url: "/experimental/workspace/sync-list", + ...options, + ...params, + }) + } + + /** + * Workspace status + * + * Get connection status for workspaces in the current project. + */ + public status( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get< + ExperimentalWorkspaceStatusResponses, + ExperimentalWorkspaceStatusErrors, + ThrowOnError + >({ + url: "/experimental/workspace/status", + ...options, + ...params, + }) + } + + /** + * Remove workspace + * + * Remove an existing workspace. + */ + public remove( + parameters: { + id: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "id" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).delete< + ExperimentalWorkspaceRemoveResponses, + ExperimentalWorkspaceRemoveErrors, + ThrowOnError + >({ + url: "/experimental/workspace/{id}", + ...options, + ...params, + }) + } + + /** + * Warp session into workspace + * + * Move a session's sync history into the target workspace, or detach it to the local project. + */ + public warp( + parameters?: { + directory?: string + workspace?: string + id?: string | null + sessionID?: string + copyChanges?: boolean + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "id" }, + { in: "body", key: "sessionID" }, + { in: "body", key: "copyChanges" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + ExperimentalWorkspaceWarpResponses, + ExperimentalWorkspaceWarpErrors, + ThrowOnError + >({ + url: "/experimental/workspace/warp", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + private _adapter?: Adapter + get adapter(): Adapter { + return (this._adapter ??= new Adapter({ client: this.client })) + } } export class Experimental extends HeyApiClient { - private _controlPlane?: ControlPlane; - get controlPlane(): ControlPlane { - return this._controlPlane ??= new ControlPlane({ client: this.client }); - } - - private _capabilities?: Capabilities; - get capabilities(): Capabilities { - return this._capabilities ??= new Capabilities({ client: this.client }); - } - - private _console?: Console; - get console(): Console { - return this._console ??= new Console({ client: this.client }); - } - - private _session?: Session; - get session(): Session { - return this._session ??= new Session({ client: this.client }); - } - - private _resource?: Resource; - get resource(): Resource { - return this._resource ??= new Resource({ client: this.client }); - } - - private _projectCopy?: ProjectCopy; - get projectCopy(): ProjectCopy { - return this._projectCopy ??= new ProjectCopy({ client: this.client }); - } - - private _workspace?: Workspace; - get workspace(): Workspace { - return this._workspace ??= new Workspace({ client: this.client }); - } + private _controlPlane?: ControlPlane + get controlPlane(): ControlPlane { + return (this._controlPlane ??= new ControlPlane({ client: this.client })) + } + + private _capabilities?: Capabilities + get capabilities(): Capabilities { + return (this._capabilities ??= new Capabilities({ client: this.client })) + } + + private _console?: Console + get console(): Console { + return (this._console ??= new Console({ client: this.client })) + } + + private _session?: Session + get session(): Session { + return (this._session ??= new Session({ client: this.client })) + } + + private _resource?: Resource + get resource(): Resource { + return (this._resource ??= new Resource({ client: this.client })) + } + + private _projectCopy?: ProjectCopy + get projectCopy(): ProjectCopy { + return (this._projectCopy ??= new ProjectCopy({ client: this.client })) + } + + private _workspace?: Workspace + get workspace(): Workspace { + return (this._workspace ??= new Workspace({ client: this.client })) + } } export class Config extends HeyApiClient { - /** - * Get global configuration - * - * Retrieve the current global Kilo configuration settings and preferences. - */ - public get(options?: Options) { - return (options?.client ?? this.client).get({ url: '/global/config', ...options }); - } - - /** - * Update global configuration - * - * Update global Kilo configuration settings and preferences. - */ - public update(parameters?: { - config?: Config4; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ key: 'config', map: 'body' }] }]); - return (options?.client ?? this.client).patch({ - url: '/global/config', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } + /** + * Get global configuration + * + * Retrieve the current global Kilo configuration settings and preferences. + */ + public get(options?: Options) { + return (options?.client ?? this.client).get({ + url: "/global/config", + ...options, + }) + } + + /** + * Update global configuration + * + * Update global Kilo configuration settings and preferences. + */ + public update( + parameters?: { + config?: Config4 + }, + options?: Options, + ) { + const params = buildClientParams([parameters], [{ args: [{ key: "config", map: "body" }] }]) + return (options?.client ?? this.client).patch({ + url: "/global/config", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } } export class Global extends HeyApiClient { - /** - * Get health - * - * Get health information about the Kilo server. - */ - public health(options?: Options) { - return (options?.client ?? this.client).get({ url: '/global/health', ...options }); - } - - /** - * Get global events - * - * Subscribe to global events from the Kilo system using server-sent events. - */ - public event(options?: Options) { - return (options?.client ?? this.client).sse.get({ url: '/global/event', ...options }); - } - - /** - * Dispose instance - * - * Clean up and dispose all Kilo instances, releasing all resources. - */ - public dispose(options?: Options) { - return (options?.client ?? this.client).post({ url: '/global/dispose', ...options }); - } - - /** - * Upgrade kilo - * - * Upgrade kilo to the specified version or latest if not specified. - */ - public upgrade(parameters?: { - target?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'body', key: 'target' }] }]); - return (options?.client ?? this.client).post({ - url: '/global/upgrade', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - private _config?: Config; - get config(): Config { - return this._config ??= new Config({ client: this.client }); - } + /** + * Get health + * + * Get health information about the Kilo server. + */ + public health(options?: Options) { + return (options?.client ?? this.client).get({ + url: "/global/health", + ...options, + }) + } + + /** + * Get global events + * + * Subscribe to global events from the Kilo system using server-sent events. + */ + public event(options?: Options) { + return (options?.client ?? this.client).sse.get({ + url: "/global/event", + ...options, + }) + } + + /** + * Dispose instance + * + * Clean up and dispose all Kilo instances, releasing all resources. + */ + public dispose(options?: Options) { + return (options?.client ?? this.client).post({ + url: "/global/dispose", + ...options, + }) + } + + /** + * Upgrade kilo + * + * Upgrade kilo to the specified version or latest if not specified. + */ + public upgrade( + parameters?: { + target?: string + }, + options?: Options, + ) { + const params = buildClientParams([parameters], [{ args: [{ in: "body", key: "target" }] }]) + return (options?.client ?? this.client).post({ + url: "/global/upgrade", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + private _config?: Config + get config(): Config { + return (this._config ??= new Config({ client: this.client })) + } } export class Event extends HeyApiClient { - /** - * Subscribe to events - * - * Get events - */ - public subscribe(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).sse.get({ - url: '/event', - ...options, - ...params - }); - } + /** + * Subscribe to events + * + * Get events + */ + public subscribe( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).sse.get({ + url: "/event", + ...options, + ...params, + }) + } } export class Config2 extends HeyApiClient { - /** - * Get configuration - * - * Retrieve the current Kilo configuration settings and preferences. - */ - public get(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/config', - ...options, - ...params - }); - } - - /** - * Update configuration - * - * Update Kilo configuration settings and preferences. - */ - public update(parameters?: { - directory?: string; - workspace?: string; - config?: Config4; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { key: 'config', map: 'body' } - ] }]); - return (options?.client ?? this.client).patch({ - url: '/config', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Get config warnings - * - * Get warnings generated during config loading (e.g., invalid JSON, schema errors). - */ - public warnings(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/config/warnings', - ...options, - ...params - }); - } - - /** - * List config providers - * - * Get a list of all configured AI providers and their default models. - */ - public providers(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/config/providers', - ...options, - ...params - }); - } - - /** - * Get config overlay - * - * Resolve global, project, and effective config values with source metadata for inheritance-aware settings UI. - */ - public overlay(parameters?: { - directory?: string; - workspace?: string; - scope?: 'global' | 'project'; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'query', key: 'scope' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/config/overlay', - ...options, - ...params - }); - } - - /** - * Patch config overlay - * - * Apply a minimal global or project config patch, including unset paths for reverting local overrides. - */ - public overlayUpdate(parameters?: { - directory?: string; - workspace?: string; - scope?: 'global' | 'project'; - set?: { - [key: string]: unknown; - }; - unset?: Array>; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'scope' }, - { in: 'body', key: 'set' }, - { in: 'body', key: 'unset' } - ] }]); - return (options?.client ?? this.client).patch({ - url: '/config/overlay', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * List config sources - * - * List config source metadata in load order without exposing config contents or secrets. - */ - public sources(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/config/sources', - ...options, - ...params - }); - } - - /** - * Get effective configuration - * - * Retrieve effective config for the current instance directory. - */ - public effective(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/config/effective', - ...options, - ...params - }); - } - - /** - * Get project rules - * - * List project instruction files used by Kilo and return their current contents. - */ - public rules(parameters?: { - directory?: string; - workspace?: string; - scope?: 'project'; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'query', key: 'scope' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/config/rules', - ...options, - ...params - }); - } - - /** - * Update project rules - * - * Create or update the project AGENTS.md rules file. - */ - public rulesUpdate(parameters?: { - directory?: string; - workspace?: string; - scope?: 'project'; - content?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'scope' }, - { in: 'body', key: 'content' } - ] }]); - return (options?.client ?? this.client).put({ - url: '/config/rules', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Get model state - * - * Retrieve TUI-compatible recent and favorite model selections. - */ - public modelState(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/config/model-state', - ...options, - ...params - }); - } - - /** - * Update model state - * - * Patch TUI-compatible model selections shared with Kilo Console. - */ - public modelStateUpdate(parameters?: { - directory?: string; - workspace?: string; - favorite?: Array<{ - providerID: string; - modelID: string; - }>; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'favorite' } - ] }]); - return (options?.client ?? this.client).patch({ - url: '/config/model-state', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } + /** + * Get configuration + * + * Retrieve the current Kilo configuration settings and preferences. + */ + public get( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/config", + ...options, + ...params, + }) + } + + /** + * Update configuration + * + * Update Kilo configuration settings and preferences. + */ + public update( + parameters?: { + directory?: string + workspace?: string + config?: Config4 + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { key: "config", map: "body" }, + ], + }, + ], + ) + return (options?.client ?? this.client).patch({ + url: "/config", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Get config warnings + * + * Get warnings generated during config loading (e.g., invalid JSON, schema errors). + */ + public warnings( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/config/warnings", + ...options, + ...params, + }) + } + + /** + * List config providers + * + * Get a list of all configured AI providers and their default models. + */ + public providers( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/config/providers", + ...options, + ...params, + }) + } + + /** + * Get config overlay + * + * Resolve global, project, and effective config values with source metadata for inheritance-aware settings UI. + */ + public overlay( + parameters?: { + directory?: string + workspace?: string + scope?: "global" | "project" + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "query", key: "scope" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/config/overlay", + ...options, + ...params, + }) + } + + /** + * Patch config overlay + * + * Apply a minimal global or project config patch, including unset paths for reverting local overrides. + */ + public overlayUpdate( + parameters?: { + directory?: string + workspace?: string + scope?: "global" | "project" + set?: { + [key: string]: unknown + } + unset?: Array> + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "scope" }, + { in: "body", key: "set" }, + { in: "body", key: "unset" }, + ], + }, + ], + ) + return (options?.client ?? this.client).patch< + ConfigOverlayUpdateResponses, + ConfigOverlayUpdateErrors, + ThrowOnError + >({ + url: "/config/overlay", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * List config sources + * + * List config source metadata in load order without exposing config contents or secrets. + */ + public sources( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/config/sources", + ...options, + ...params, + }) + } + + /** + * Get effective configuration + * + * Retrieve effective config for the current instance directory. + */ + public effective( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/config/effective", + ...options, + ...params, + }) + } + + /** + * Get project rules + * + * List project instruction files used by Kilo and return their current contents. + */ + public rules( + parameters?: { + directory?: string + workspace?: string + scope?: "project" + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "query", key: "scope" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/config/rules", + ...options, + ...params, + }) + } + + /** + * Update project rules + * + * Create or update the project AGENTS.md rules file. + */ + public rulesUpdate( + parameters?: { + directory?: string + workspace?: string + scope?: "project" + content?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "scope" }, + { in: "body", key: "content" }, + ], + }, + ], + ) + return (options?.client ?? this.client).put({ + url: "/config/rules", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Get model state + * + * Retrieve TUI-compatible recent and favorite model selections. + */ + public modelState( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/config/model-state", + ...options, + ...params, + }) + } + + /** + * Update model state + * + * Patch TUI-compatible model selections shared with Kilo Console. + */ + public modelStateUpdate( + parameters?: { + directory?: string + workspace?: string + favorite?: Array<{ + providerID: string + modelID: string + }> + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "favorite" }, + ], + }, + ], + ) + return (options?.client ?? this.client).patch< + ConfigModelStateUpdateResponses, + ConfigModelStateUpdateErrors, + ThrowOnError + >({ + url: "/config/model-state", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } } export class Tool extends HeyApiClient { - /** - * List tools - * - * Get a list of available tools with their JSON schema parameters for a specific provider and model combination. - */ - public list(parameters: { - directory?: string; - workspace?: string; - provider: string; - model: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'query', key: 'provider' }, - { in: 'query', key: 'model' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/experimental/tool', - ...options, - ...params - }); - } - - /** - * List tool IDs - * - * Get a list of all available tool IDs, including both built-in tools and dynamically registered tools. - */ - public ids(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/experimental/tool/ids', - ...options, - ...params - }); - } + /** + * List tools + * + * Get a list of available tools with their JSON schema parameters for a specific provider and model combination. + */ + public list( + parameters: { + directory?: string + workspace?: string + provider: string + model: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "query", key: "provider" }, + { in: "query", key: "model" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/experimental/tool", + ...options, + ...params, + }) + } + + /** + * List tool IDs + * + * Get a list of all available tool IDs, including both built-in tools and dynamically registered tools. + */ + public ids( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/experimental/tool/ids", + ...options, + ...params, + }) + } } export class Worktree extends HeyApiClient { - /** - * Remove worktree - * - * Remove a git worktree and delete its branch. - */ - public remove(parameters?: { - directory?: string; - workspace?: string; - worktreeRemoveInput?: WorktreeRemoveInput; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { key: 'worktreeRemoveInput', map: 'body' } - ] }]); - return (options?.client ?? this.client).delete({ - url: '/experimental/worktree', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * List worktrees - * - * List all git worktrees for the current project and whether Kilo manages them. - */ - public list(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/experimental/worktree', - ...options, - ...params - }); - } - - /** - * Create worktree - * - * Create a new git worktree for the current project and run any configured startup scripts. - */ - public create(parameters?: { - directory?: string; - workspace?: string; - worktreeCreateInput?: WorktreeCreateInput; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { key: 'worktreeCreateInput', map: 'body' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/experimental/worktree', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Reset worktree - * - * Reset a worktree branch to the primary default branch. - */ - public reset(parameters?: { - directory?: string; - workspace?: string; - worktreeResetInput?: WorktreeResetInput; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { key: 'worktreeResetInput', map: 'body' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/experimental/worktree/reset', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Get worktree diff - * - * Get file diffs for a worktree compared to its base branch. Includes uncommitted changes. - */ - public diff(parameters?: { - directory?: string; - workspace?: string; - base?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'query', key: 'base' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/experimental/worktree/diff', - ...options, - ...params - }); - } - - /** - * Get worktree diff summary - * - * Get lightweight file diff metadata for a worktree compared to its base branch. - */ - public diffSummary(parameters?: { - directory?: string; - workspace?: string; - base?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'query', key: 'base' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/experimental/worktree/diff/summary', - ...options, - ...params - }); - } - - /** - * Get worktree diff detail - * - * Get full diff contents for one worktree file compared to its base branch. - */ - public diffFile(parameters: { - directory?: string; - workspace?: string; - base?: string; - file: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'query', key: 'base' }, - { in: 'query', key: 'file' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/experimental/worktree/diff/file', - ...options, - ...params - }); - } + /** + * Remove worktree + * + * Remove a git worktree and delete its branch. + */ + public remove( + parameters?: { + directory?: string + workspace?: string + worktreeRemoveInput?: WorktreeRemoveInput + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { key: "worktreeRemoveInput", map: "body" }, + ], + }, + ], + ) + return (options?.client ?? this.client).delete({ + url: "/experimental/worktree", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * List worktrees + * + * List all git worktrees for the current project and whether Kilo manages them. + */ + public list( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/experimental/worktree", + ...options, + ...params, + }) + } + + /** + * Create worktree + * + * Create a new git worktree for the current project and run any configured startup scripts. + */ + public create( + parameters?: { + directory?: string + workspace?: string + worktreeCreateInput?: WorktreeCreateInput + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { key: "worktreeCreateInput", map: "body" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/experimental/worktree", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Reset worktree + * + * Reset a worktree branch to the primary default branch. + */ + public reset( + parameters?: { + directory?: string + workspace?: string + worktreeResetInput?: WorktreeResetInput + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { key: "worktreeResetInput", map: "body" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/experimental/worktree/reset", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Get worktree diff + * + * Get file diffs for a worktree compared to its base branch. Includes uncommitted changes. + */ + public diff( + parameters?: { + directory?: string + workspace?: string + base?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "query", key: "base" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/experimental/worktree/diff", + ...options, + ...params, + }) + } + + /** + * Get worktree diff summary + * + * Get lightweight file diff metadata for a worktree compared to its base branch. + */ + public diffSummary( + parameters?: { + directory?: string + workspace?: string + base?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "query", key: "base" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/experimental/worktree/diff/summary", + ...options, + ...params, + }) + } + + /** + * Get worktree diff detail + * + * Get full diff contents for one worktree file compared to its base branch. + */ + public diffFile( + parameters: { + directory?: string + workspace?: string + base?: string + file: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "query", key: "base" }, + { in: "query", key: "file" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/experimental/worktree/diff/file", + ...options, + ...params, + }) + } } export class Find extends HeyApiClient { - /** - * Find text - * - * Search for text patterns across files in the project using ripgrep. - */ - public text(parameters: { - directory?: string; - workspace?: string; - pattern: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'query', key: 'pattern' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/find', - ...options, - ...params - }); - } - - /** - * Find files - * - * Search for files or directories by name or pattern in the project directory. - */ - public files(parameters: { - directory?: string; - workspace?: string; - query: string; - dirs?: 'true' | 'false'; - type?: 'file' | 'directory'; - limit?: number; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'query', key: 'query' }, - { in: 'query', key: 'dirs' }, - { in: 'query', key: 'type' }, - { in: 'query', key: 'limit' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/find/file', - ...options, - ...params - }); - } - - /** - * Find symbols - * - * Search for workspace symbols like functions, classes, and variables using LSP. - */ - public symbols(parameters: { - directory?: string; - workspace?: string; - query: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'query', key: 'query' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/find/symbol', - ...options, - ...params - }); - } + /** + * Find text + * + * Search for text patterns across files in the project using ripgrep. + */ + public text( + parameters: { + directory?: string + workspace?: string + pattern: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "query", key: "pattern" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/find", + ...options, + ...params, + }) + } + + /** + * Find files + * + * Search for files or directories by name or pattern in the project directory. + */ + public files( + parameters: { + directory?: string + workspace?: string + query: string + dirs?: "true" | "false" + type?: "file" | "directory" + limit?: number + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "query", key: "query" }, + { in: "query", key: "dirs" }, + { in: "query", key: "type" }, + { in: "query", key: "limit" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/find/file", + ...options, + ...params, + }) + } + + /** + * Find symbols + * + * Search for workspace symbols like functions, classes, and variables using LSP. + */ + public symbols( + parameters: { + directory?: string + workspace?: string + query: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "query", key: "query" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/find/symbol", + ...options, + ...params, + }) + } } export class File extends HeyApiClient { - /** - * List files - * - * List files and directories in a specified path. - */ - public list(parameters: { - directory?: string; - workspace?: string; - path: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'query', key: 'path' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/file', - ...options, - ...params - }); - } - - /** - * Read file - * - * Read the content of a specified file. - */ - public read(parameters: { - directory?: string; - workspace?: string; - path: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'query', key: 'path' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/file/content', - ...options, - ...params - }); - } - - /** - * Get file status - * - * Get the git status of all files in the project. - */ - public status(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/file/status', - ...options, - ...params - }); - } + /** + * List files + * + * List files and directories in a specified path. + */ + public list( + parameters: { + directory?: string + workspace?: string + path: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "query", key: "path" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/file", + ...options, + ...params, + }) + } + + /** + * Read file + * + * Read the content of a specified file. + */ + public read( + parameters: { + directory?: string + workspace?: string + path: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "query", key: "path" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/file/content", + ...options, + ...params, + }) + } + + /** + * Get file status + * + * Get the git status of all files in the project. + */ + public status( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/file/status", + ...options, + ...params, + }) + } } export class Instance extends HeyApiClient { - /** - * Dispose instance - * - * Clean up and dispose the current Kilo instance, releasing all resources. - */ - public dispose(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).post({ - url: '/instance/dispose', - ...options, - ...params - }); - } - - /** - * Reload instance - * - * Atomically dispose and reboot the current Kilo instance, reloading config, skills, agents, commands, and MCP prompts from disk. Returns 409 if a session is actively running. - */ - public reload(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).post({ - url: '/instance/reload', - ...options, - ...params - }); - } + /** + * Dispose instance + * + * Clean up and dispose the current Kilo instance, releasing all resources. + */ + public dispose( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/instance/dispose", + ...options, + ...params, + }) + } + + /** + * Reload instance + * + * Atomically dispose and reboot the current Kilo instance, reloading config, skills, agents, commands, and MCP prompts from disk. Returns 409 if a session is actively running. + */ + public reload( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/instance/reload", + ...options, + ...params, + }) + } } export class Path extends HeyApiClient { - /** - * Get paths - * - * Retrieve the current working directory and related path information for the Kilo instance. - */ - public get(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/path', - ...options, - ...params - }); - } + /** + * Get paths + * + * Retrieve the current working directory and related path information for the Kilo instance. + */ + public get( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/path", + ...options, + ...params, + }) + } } export class Diff extends HeyApiClient { - /** - * Get raw VCS diff - * - * Retrieve a raw patch for current uncommitted changes. - */ - public raw(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/vcs/diff/raw', - ...options, - ...params - }); - } + /** + * Get raw VCS diff + * + * Retrieve a raw patch for current uncommitted changes. + */ + public raw( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/vcs/diff/raw", + ...options, + ...params, + }) + } } export class Vcs extends HeyApiClient { - /** - * Get VCS info - * - * Retrieve version control system (VCS) information for the current project, such as git branch. - */ - public get(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/vcs', - ...options, - ...params - }); - } - - /** - * Get VCS status - * - * Retrieve changed files in the current working tree without patches. - */ - public status(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/vcs/status', - ...options, - ...params - }); - } - - /** - * Get VCS diff - * - * Retrieve the current git diff for the working tree or against the default branch. - */ - public diff(parameters: { - directory?: string; - workspace?: string; - mode: 'git' | 'branch'; - context?: number; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'query', key: 'mode' }, - { in: 'query', key: 'context' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/vcs/diff', - ...options, - ...params - }); - } - - /** - * Apply VCS patch - * - * Apply a raw patch to the current working tree. - */ - public apply(parameters?: { - directory?: string; - workspace?: string; - patch?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'patch' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/vcs/apply', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - private _diff?: Diff; - get diff2(): Diff { - return this._diff ??= new Diff({ client: this.client }); - } + /** + * Get VCS info + * + * Retrieve version control system (VCS) information for the current project, such as git branch. + */ + public get( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/vcs", + ...options, + ...params, + }) + } + + /** + * Get VCS status + * + * Retrieve changed files in the current working tree without patches. + */ + public status( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/vcs/status", + ...options, + ...params, + }) + } + + /** + * Get VCS diff + * + * Retrieve the current git diff for the working tree or against the default branch. + */ + public diff( + parameters: { + directory?: string + workspace?: string + mode: "git" | "branch" + context?: number + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "query", key: "mode" }, + { in: "query", key: "context" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/vcs/diff", + ...options, + ...params, + }) + } + + /** + * Apply VCS patch + * + * Apply a raw patch to the current working tree. + */ + public apply( + parameters?: { + directory?: string + workspace?: string + patch?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "patch" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/vcs/apply", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + private _diff?: Diff + get diff2(): Diff { + return (this._diff ??= new Diff({ client: this.client })) + } } export class Command extends HeyApiClient { - /** - * List commands - * - * Get a list of all available commands in the Kilo system. - */ - public list(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/command', - ...options, - ...params - }); - } + /** + * List commands + * + * Get a list of all available commands in the Kilo system. + */ + public list( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/command", + ...options, + ...params, + }) + } } export class Lsp extends HeyApiClient { - /** - * Get LSP status - * - * Get LSP server status - */ - public status(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/lsp', - ...options, - ...params - }); - } + /** + * Get LSP status + * + * Get LSP server status + */ + public status( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/lsp", + ...options, + ...params, + }) + } } export class Formatter extends HeyApiClient { - /** - * Get formatter status - * - * Get formatter status - */ - public status(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/formatter', - ...options, - ...params - }); - } + /** + * Get formatter status + * + * Get formatter status + */ + public status( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/formatter", + ...options, + ...params, + }) + } } export class Auth2 extends HeyApiClient { - /** - * Remove MCP OAuth - * - * Remove OAuth credentials for an MCP server. - */ - public remove(parameters: { - name: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'name' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).delete({ - url: '/mcp/{name}/auth', - ...options, - ...params - }); - } - - /** - * Start MCP OAuth - * - * Start OAuth authentication flow for a Model Context Protocol (MCP) server. - */ - public start(parameters: { - name: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'name' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/mcp/{name}/auth', - ...options, - ...params - }); - } - - /** - * Complete MCP OAuth - * - * Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code. - */ - public callback(parameters: { - name: string; - directory?: string; - workspace?: string; - code?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'name' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'code' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/mcp/{name}/auth/callback', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Authenticate MCP OAuth - * - * Start OAuth flow and wait for callback (opens browser). - */ - public authenticate(parameters: { - name: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'name' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/mcp/{name}/auth/authenticate', - ...options, - ...params - }); - } + /** + * Remove MCP OAuth + * + * Remove OAuth credentials for an MCP server. + */ + public remove( + parameters: { + name: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "name" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).delete({ + url: "/mcp/{name}/auth", + ...options, + ...params, + }) + } + + /** + * Start MCP OAuth + * + * Start OAuth authentication flow for a Model Context Protocol (MCP) server. + */ + public start( + parameters: { + name: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "name" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/mcp/{name}/auth", + ...options, + ...params, + }) + } + + /** + * Complete MCP OAuth + * + * Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code. + */ + public callback( + parameters: { + name: string + directory?: string + workspace?: string + code?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "name" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "code" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/mcp/{name}/auth/callback", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Authenticate MCP OAuth + * + * Start OAuth flow and wait for callback (opens browser). + */ + public authenticate( + parameters: { + name: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "name" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post( + { + url: "/mcp/{name}/auth/authenticate", + ...options, + ...params, + }, + ) + } } export class Mcp extends HeyApiClient { - /** - * Get MCP status - * - * Get the status of all Model Context Protocol (MCP) servers. - */ - public status(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/mcp', - ...options, - ...params - }); - } - - /** - * Add MCP server - * - * Dynamically add a new Model Context Protocol (MCP) server to the system. - */ - public add(parameters?: { - directory?: string; - workspace?: string; - name?: string; - config?: McpLocalConfig | McpRemoteConfig; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'name' }, - { in: 'body', key: 'config' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/mcp', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Connect an MCP server. - */ - public connect(parameters: { - name: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'name' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/mcp/{name}/connect', - ...options, - ...params - }); - } - - /** - * Disconnect an MCP server. - */ - public disconnect(parameters: { - name: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'name' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/mcp/{name}/disconnect', - ...options, - ...params - }); - } - - private _auth?: Auth2; - get auth(): Auth2 { - return this._auth ??= new Auth2({ client: this.client }); - } + /** + * Get MCP status + * + * Get the status of all Model Context Protocol (MCP) servers. + */ + public status( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/mcp", + ...options, + ...params, + }) + } + + /** + * Add MCP server + * + * Dynamically add a new Model Context Protocol (MCP) server to the system. + */ + public add( + parameters?: { + directory?: string + workspace?: string + name?: string + config?: McpLocalConfig | McpRemoteConfig + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "name" }, + { in: "body", key: "config" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/mcp", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Connect an MCP server. + */ + public connect( + parameters: { + name: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "name" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/mcp/{name}/connect", + ...options, + ...params, + }) + } + + /** + * Disconnect an MCP server. + */ + public disconnect( + parameters: { + name: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "name" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/mcp/{name}/disconnect", + ...options, + ...params, + }) + } + + private _auth?: Auth2 + get auth(): Auth2 { + return (this._auth ??= new Auth2({ client: this.client })) + } } export class Project extends HeyApiClient { - /** - * List all projects - * - * Get a list of projects that have been opened with Kilo. - */ - public list(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/project', - ...options, - ...params - }); - } - - /** - * Get current project - * - * Retrieve the currently active project that Kilo is working with. - */ - public current(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/project/current', - ...options, - ...params - }); - } - - /** - * Initialize git repository - * - * Create a git repository for the current project and return the refreshed project info. - */ - public initGit(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).post({ - url: '/project/git/init', - ...options, - ...params - }); - } - - /** - * Update project - * - * Update project properties such as name, icon, and commands. - */ - public update(parameters: { - projectID: string; - directory?: string; - workspace?: string; - name?: string; - icon?: ProjectIcon; - commands?: ProjectCommands; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'projectID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'name' }, - { in: 'body', key: 'icon' }, - { in: 'body', key: 'commands' } - ] }]); - return (options?.client ?? this.client).patch({ - url: '/project/{projectID}', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * List project directories - * - * List known local absolute directories for a project. - */ - public directories(parameters: { - projectID: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'projectID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/project/{projectID}/directories', - ...options, - ...params - }); - } + /** + * List all projects + * + * Get a list of projects that have been opened with Kilo. + */ + public list( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/project", + ...options, + ...params, + }) + } + + /** + * Get current project + * + * Retrieve the currently active project that Kilo is working with. + */ + public current( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/project/current", + ...options, + ...params, + }) + } + + /** + * Initialize git repository + * + * Create a git repository for the current project and return the refreshed project info. + */ + public initGit( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/project/git/init", + ...options, + ...params, + }) + } + + /** + * Update project + * + * Update project properties such as name, icon, and commands. + */ + public update( + parameters: { + projectID: string + directory?: string + workspace?: string + name?: string + icon?: ProjectIcon + commands?: ProjectCommands + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "projectID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "name" }, + { in: "body", key: "icon" }, + { in: "body", key: "commands" }, + ], + }, + ], + ) + return (options?.client ?? this.client).patch({ + url: "/project/{projectID}", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * List project directories + * + * List known local absolute directories for a project. + */ + public directories( + parameters: { + projectID: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "projectID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/project/{projectID}/directories", + ...options, + ...params, + }) + } } export class Pty extends HeyApiClient { - /** - * List available shells - * - * Get a list of available shells on the system. - */ - public shells(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/pty/shells', - ...options, - ...params - }); - } - - /** - * List PTY sessions - * - * Get a list of all active pseudo-terminal (PTY) sessions managed by Kilo. - */ - public list(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/pty', - ...options, - ...params - }); - } - - /** - * Create PTY session - * - * Create a new pseudo-terminal (PTY) session for running shell commands and processes. - */ - public create(parameters?: { - directory?: string; - workspace?: string; - command?: string; - args?: Array; - cwd?: string; - title?: string; - env?: { - [key: string]: string; - }; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'command' }, - { in: 'body', key: 'args' }, - { in: 'body', key: 'cwd' }, - { in: 'body', key: 'title' }, - { in: 'body', key: 'env' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/pty', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Remove PTY session - * - * Remove and terminate a specific pseudo-terminal (PTY) session. - */ - public remove(parameters: { - ptyID: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'ptyID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).delete({ - url: '/pty/{ptyID}', - ...options, - ...params - }); - } - - /** - * Get PTY session - * - * Retrieve detailed information about a specific pseudo-terminal (PTY) session. - */ - public get(parameters: { - ptyID: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'ptyID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/pty/{ptyID}', - ...options, - ...params - }); - } - - /** - * Update PTY session - * - * Update properties of an existing pseudo-terminal (PTY) session. - */ - public update(parameters: { - ptyID: string; - directory?: string; - workspace?: string; - title?: string; - size?: { - rows: number; - cols: number; - }; - sessionID?: string | null; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'ptyID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'title' }, - { in: 'body', key: 'size' }, - { in: 'body', key: 'sessionID' } - ] }]); - return (options?.client ?? this.client).put({ - url: '/pty/{ptyID}', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Create PTY WebSocket token - * - * Create a short-lived ticket for opening a PTY WebSocket connection. - */ - public connectToken(parameters: { - ptyID: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'ptyID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/pty/{ptyID}/connect-token', - ...options, - ...params - }); - } - - /** - * Connect to PTY session - * - * Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time. - */ - public connect(parameters: { - ptyID: string; - directory?: string; - workspace?: string; - cursor?: string; - ticket?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'ptyID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'query', key: 'cursor' }, - { in: 'query', key: 'ticket' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/pty/{ptyID}/connect', - ...options, - ...params - }); - } + /** + * List available shells + * + * Get a list of available shells on the system. + */ + public shells( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/pty/shells", + ...options, + ...params, + }) + } + + /** + * List PTY sessions + * + * Get a list of all active pseudo-terminal (PTY) sessions managed by Kilo. + */ + public list( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/pty", + ...options, + ...params, + }) + } + + /** + * Create PTY session + * + * Create a new pseudo-terminal (PTY) session for running shell commands and processes. + */ + public create( + parameters?: { + directory?: string + workspace?: string + command?: string + args?: Array + cwd?: string + title?: string + env?: { + [key: string]: string + } + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "command" }, + { in: "body", key: "args" }, + { in: "body", key: "cwd" }, + { in: "body", key: "title" }, + { in: "body", key: "env" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/pty", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Remove PTY session + * + * Remove and terminate a specific pseudo-terminal (PTY) session. + */ + public remove( + parameters: { + ptyID: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "ptyID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).delete({ + url: "/pty/{ptyID}", + ...options, + ...params, + }) + } + + /** + * Get PTY session + * + * Retrieve detailed information about a specific pseudo-terminal (PTY) session. + */ + public get( + parameters: { + ptyID: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "ptyID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/pty/{ptyID}", + ...options, + ...params, + }) + } + + /** + * Update PTY session + * + * Update properties of an existing pseudo-terminal (PTY) session. + */ + public update( + parameters: { + ptyID: string + directory?: string + workspace?: string + title?: string + size?: { + rows: number + cols: number + } + sessionID?: string | null + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "ptyID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "title" }, + { in: "body", key: "size" }, + { in: "body", key: "sessionID" }, + ], + }, + ], + ) + return (options?.client ?? this.client).put({ + url: "/pty/{ptyID}", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Create PTY WebSocket token + * + * Create a short-lived ticket for opening a PTY WebSocket connection. + */ + public connectToken( + parameters: { + ptyID: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "ptyID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/pty/{ptyID}/connect-token", + ...options, + ...params, + }) + } + + /** + * Connect to PTY session + * + * Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time. + */ + public connect( + parameters: { + ptyID: string + directory?: string + workspace?: string + cursor?: string + ticket?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "ptyID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "query", key: "cursor" }, + { in: "query", key: "ticket" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/pty/{ptyID}/connect", + ...options, + ...params, + }) + } } export class Question extends HeyApiClient { - /** - * List pending questions - * - * Get all pending question requests across all sessions. - */ - public list(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/question', - ...options, - ...params - }); - } - - /** - * Reply to question request - * - * Provide answers to a question request from the AI assistant. - */ - public reply(parameters: { - requestID: string; - directory?: string; - workspace?: string; - answers?: Array; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'requestID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'answers' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/question/{requestID}/reply', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Reject question request - * - * Reject a question request from the AI assistant. - */ - public reject(parameters: { - requestID: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'requestID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/question/{requestID}/reject', - ...options, - ...params - }); - } + /** + * List pending questions + * + * Get all pending question requests across all sessions. + */ + public list( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/question", + ...options, + ...params, + }) + } + + /** + * Reply to question request + * + * Provide answers to a question request from the AI assistant. + */ + public reply( + parameters: { + requestID: string + directory?: string + workspace?: string + answers?: Array + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "requestID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "answers" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/question/{requestID}/reply", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Reject question request + * + * Reject a question request from the AI assistant. + */ + public reject( + parameters: { + requestID: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "requestID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/question/{requestID}/reject", + ...options, + ...params, + }) + } } export class Permission extends HeyApiClient { - /** - * List pending permissions - * - * Get all pending permission requests across all sessions. - */ - public list(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/permission', - ...options, - ...params - }); - } - - /** - * Respond to permission request - * - * Approve or deny a permission request from the AI assistant. - */ - public reply(parameters: { - requestID: string; - directory?: string; - workspace?: string; - reply?: 'once' | 'always' | 'reject'; - message?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'requestID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'reply' }, - { in: 'body', key: 'message' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/permission/{requestID}/reply', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Save always-allow/deny permission rules - * - * Save approved/denied always-rules for a pending permission request. - */ - public saveAlwaysRules(parameters: { - requestID: string; - directory?: string; - workspace?: string; - approvedAlways?: Array; - deniedAlways?: Array; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'requestID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'approvedAlways' }, - { in: 'body', key: 'deniedAlways' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/permission/{requestID}/always-rules', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Allow everything - * - * Enable or disable allowing all permissions without prompts. - */ - public allowEverything(parameters?: { - directory?: string; - workspace?: string; - enable?: boolean; - requestID?: string; - sessionID?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'enable' }, - { in: 'body', key: 'requestID' }, - { in: 'body', key: 'sessionID' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/permission/allow-everything', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Respond to permission - * - * Approve or deny a permission request from the AI assistant. - * - * @deprecated - */ - public respond(parameters: { - sessionID: string; - permissionID: string; - directory?: string; - workspace?: string; - response?: 'once' | 'always' | 'reject'; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'path', key: 'permissionID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'response' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/session/{sessionID}/permissions/{permissionID}', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } + /** + * List pending permissions + * + * Get all pending permission requests across all sessions. + */ + public list( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/permission", + ...options, + ...params, + }) + } + + /** + * Respond to permission request + * + * Approve or deny a permission request from the AI assistant. + */ + public reply( + parameters: { + requestID: string + directory?: string + workspace?: string + reply?: "once" | "always" | "reject" + message?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "requestID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "reply" }, + { in: "body", key: "message" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/permission/{requestID}/reply", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Save always-allow/deny permission rules + * + * Save approved/denied always-rules for a pending permission request. + */ + public saveAlwaysRules( + parameters: { + requestID: string + directory?: string + workspace?: string + approvedAlways?: Array + deniedAlways?: Array + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "requestID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "approvedAlways" }, + { in: "body", key: "deniedAlways" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + PermissionSaveAlwaysRulesResponses, + PermissionSaveAlwaysRulesErrors, + ThrowOnError + >({ + url: "/permission/{requestID}/always-rules", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Allow everything + * + * Enable or disable allowing all permissions without prompts. + */ + public allowEverything( + parameters?: { + directory?: string + workspace?: string + enable?: boolean + requestID?: string + sessionID?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "enable" }, + { in: "body", key: "requestID" }, + { in: "body", key: "sessionID" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + PermissionAllowEverythingResponses, + PermissionAllowEverythingErrors, + ThrowOnError + >({ + url: "/permission/allow-everything", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Respond to permission + * + * Approve or deny a permission request from the AI assistant. + * + * @deprecated + */ + public respond( + parameters: { + sessionID: string + permissionID: string + directory?: string + workspace?: string + response?: "once" | "always" | "reject" + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "path", key: "permissionID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "response" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/session/{sessionID}/permissions/{permissionID}", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } } export class Oauth extends HeyApiClient { - /** - * Start OAuth authorization - * - * Start the OAuth authorization flow for a provider. - */ - public authorize(parameters: { - providerID: string; - directory?: string; - workspace?: string; - method?: number; - inputs?: { - [key: string]: string; - }; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'providerID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'method' }, - { in: 'body', key: 'inputs' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/provider/{providerID}/oauth/authorize', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Handle OAuth callback - * - * Handle the OAuth callback from a provider after user authorization. - */ - public callback(parameters: { - providerID: string; - directory?: string; - workspace?: string; - method?: number; - code?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'providerID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'method' }, - { in: 'body', key: 'code' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/provider/{providerID}/oauth/callback', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } + /** + * Start OAuth authorization + * + * Start the OAuth authorization flow for a provider. + */ + public authorize( + parameters: { + providerID: string + directory?: string + workspace?: string + method?: number + inputs?: { + [key: string]: string + } + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "providerID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "method" }, + { in: "body", key: "inputs" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + ProviderOauthAuthorizeResponses, + ProviderOauthAuthorizeErrors, + ThrowOnError + >({ + url: "/provider/{providerID}/oauth/authorize", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Handle OAuth callback + * + * Handle the OAuth callback from a provider after user authorization. + */ + public callback( + parameters: { + providerID: string + directory?: string + workspace?: string + method?: number + code?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "providerID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "method" }, + { in: "body", key: "code" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + ProviderOauthCallbackResponses, + ProviderOauthCallbackErrors, + ThrowOnError + >({ + url: "/provider/{providerID}/oauth/callback", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } } export class Provider extends HeyApiClient { - /** - * List providers - * - * Get a list of all available AI providers, including both available and connected ones. - */ - public list(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/provider', - ...options, - ...params - }); - } - - /** - * Get provider auth methods - * - * Retrieve available authentication methods for all AI providers. - */ - public auth(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/provider/auth', - ...options, - ...params - }); - } - - private _oauth?: Oauth; - get oauth(): Oauth { - return this._oauth ??= new Oauth({ client: this.client }); - } + /** + * List providers + * + * Get a list of all available AI providers, including both available and connected ones. + */ + public list( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/provider", + ...options, + ...params, + }) + } + + /** + * Get provider auth methods + * + * Retrieve available authentication methods for all AI providers. + */ + public auth( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/provider/auth", + ...options, + ...params, + }) + } + + private _oauth?: Oauth + get oauth(): Oauth { + return (this._oauth ??= new Oauth({ client: this.client })) + } } export class Session2 extends HeyApiClient { - /** - * List sessions - * - * Get a list of all Kilo sessions, sorted by most recently updated. - */ - public list(parameters?: { - directory?: string; - workspace?: string; - scope?: 'project'; - path?: string; - roots?: boolean | 'true' | 'false'; - start?: number; - search?: string; - limit?: number; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'query', key: 'scope' }, - { in: 'query', key: 'path' }, - { in: 'query', key: 'roots' }, - { in: 'query', key: 'start' }, - { in: 'query', key: 'search' }, - { in: 'query', key: 'limit' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/session', - ...options, - ...params - }); - } - - /** - * Create session - * - * Create a new Kilo session for interacting with AI assistants and managing conversations. - */ - public create(parameters?: { - directory?: string; - workspace?: string; - parentID?: string; - title?: string; - agent?: string; - model?: { - id: string; - providerID: string; - variant?: string; - }; - metadata?: { - [key: string]: unknown; - }; - permission?: PermissionRuleset; - platform?: string; - workspaceID?: string; - sandboxInheritanceToken?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'parentID' }, - { in: 'body', key: 'title' }, - { in: 'body', key: 'agent' }, - { in: 'body', key: 'model' }, - { in: 'body', key: 'metadata' }, - { in: 'body', key: 'permission' }, - { in: 'body', key: 'platform' }, - { in: 'body', key: 'workspaceID' }, - { in: 'body', key: 'sandboxInheritanceToken' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/session', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Get session status - * - * Retrieve the current status of all sessions, including active, idle, and completed states. - */ - public status(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/session/status', - ...options, - ...params - }); - } - - /** - * Delete session - * - * Delete a session and permanently remove all associated data, including messages and history. - */ - public delete(parameters: { - sessionID: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).delete({ - url: '/session/{sessionID}', - ...options, - ...params - }); - } - - /** - * Get session - * - * Retrieve detailed information about a specific Kilo session. - */ - public get(parameters: { - sessionID: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/session/{sessionID}', - ...options, - ...params - }); - } - - /** - * Update session - * - * Update properties of an existing session, such as title or other metadata. - */ - public update(parameters: { - sessionID: string; - directory?: string; - workspace?: string; - title?: string; - metadata?: { - [key: string]: unknown; - }; - permission?: PermissionRuleset; - time?: { - archived?: number; - }; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'title' }, - { in: 'body', key: 'metadata' }, - { in: 'body', key: 'permission' }, - { in: 'body', key: 'time' } - ] }]); - return (options?.client ?? this.client).patch({ - url: '/session/{sessionID}', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Get session children - * - * Retrieve all child sessions that were forked from the specified parent session. - */ - public children(parameters: { - sessionID: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/session/{sessionID}/children', - ...options, - ...params - }); - } - - /** - * Get session todos - * - * Retrieve the todo list associated with a specific session, showing tasks and action items. - */ - public todo(parameters: { - sessionID: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/session/{sessionID}/todo', - ...options, - ...params - }); - } - - /** - * Get message diff - * - * Get the file changes (diff) that resulted from a specific user message in the session. - */ - public diff(parameters: { - sessionID: string; - directory?: string; - workspace?: string; - messageID?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'query', key: 'messageID' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/session/{sessionID}/diff', - ...options, - ...params - }); - } - - /** - * Get session messages - * - * Retrieve all messages in a session, including user prompts and AI responses. - */ - public messages(parameters: { - sessionID: string; - directory?: string; - workspace?: string; - limit?: number; - before?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'query', key: 'limit' }, - { in: 'query', key: 'before' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/session/{sessionID}/message', - ...options, - ...params - }); - } - - /** - * Send message - * - * Create and send a new message to a session, streaming the AI response. - */ - public prompt(parameters: { - sessionID: string; - directory?: string; - workspace?: string; - messageID?: string; - model?: { - providerID: string; - modelID: string; - }; - agent?: string; - noReply?: boolean; - tools?: { - [key: string]: boolean; - }; - format?: OutputFormat; - system?: string; - variant?: string; - snapshotInitialization?: 'wait'; - editorContext?: { - directory?: string; - worktree?: string; - visibleFiles?: Array; - openTabs?: Array; - activeFile?: string; - shell?: string; - }; - parts?: Array; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'messageID' }, - { in: 'body', key: 'model' }, - { in: 'body', key: 'agent' }, - { in: 'body', key: 'noReply' }, - { in: 'body', key: 'tools' }, - { in: 'body', key: 'format' }, - { in: 'body', key: 'system' }, - { in: 'body', key: 'variant' }, - { in: 'body', key: 'snapshotInitialization' }, - { in: 'body', key: 'editorContext' }, - { in: 'body', key: 'parts' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/session/{sessionID}/message', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Delete message - * - * Permanently delete a specific message and all of its parts from a session without reverting file changes. - */ - public deleteMessage(parameters: { - sessionID: string; - messageID: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'path', key: 'messageID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).delete({ - url: '/session/{sessionID}/message/{messageID}', - ...options, - ...params - }); - } - - /** - * Get message - * - * Retrieve a specific message from a session by its message ID. - */ - public message(parameters: { - sessionID: string; - messageID: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'path', key: 'messageID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/session/{sessionID}/message/{messageID}', - ...options, - ...params - }); - } - - /** - * Fork session - * - * Create a new session by forking an existing session at a specific message point. - */ - public fork(parameters: { - sessionID: string; - directory?: string; - workspace?: string; - messageID?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'messageID' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/session/{sessionID}/fork', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Abort session - * - * Abort an active session and stop any ongoing AI processing or command execution. - */ - public abort(parameters: { - sessionID: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/session/{sessionID}/abort', - ...options, - ...params - }); - } - - /** - * Initialize session - * - * Analyze the current application and create an AGENTS.md file with project-specific agent configurations. - */ - public init(parameters: { - sessionID: string; - directory?: string; - workspace?: string; - modelID?: string; - providerID?: string; - messageID?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'modelID' }, - { in: 'body', key: 'providerID' }, - { in: 'body', key: 'messageID' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/session/{sessionID}/init', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Unshare session - * - * Remove the shareable link for a session, making it private again. - */ - public unshare(parameters: { - sessionID: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).delete({ - url: '/session/{sessionID}/share', - ...options, - ...params - }); - } - - /** - * Share session - * - * Create a shareable link for a session, allowing others to view the conversation. - */ - public share(parameters: { - sessionID: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/session/{sessionID}/share', - ...options, - ...params - }); - } - - /** - * Summarize session - * - * Generate a concise summary of the session using AI compaction to preserve key information. - */ - public summarize(parameters: { - sessionID: string; - directory?: string; - workspace?: string; - providerID?: string; - modelID?: string; - auto?: boolean; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'providerID' }, - { in: 'body', key: 'modelID' }, - { in: 'body', key: 'auto' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/session/{sessionID}/summarize', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Send async message - * - * Create and send a new message to a session asynchronously, starting the session if needed and returning immediately. - */ - public promptAsync(parameters: { - sessionID: string; - directory?: string; - workspace?: string; - messageID?: string; - model?: { - providerID: string; - modelID: string; - }; - agent?: string; - noReply?: boolean; - tools?: { - [key: string]: boolean; - }; - format?: OutputFormat; - system?: string; - variant?: string; - snapshotInitialization?: 'wait'; - editorContext?: { - directory?: string; - worktree?: string; - visibleFiles?: Array; - openTabs?: Array; - activeFile?: string; - shell?: string; - }; - parts?: Array; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'messageID' }, - { in: 'body', key: 'model' }, - { in: 'body', key: 'agent' }, - { in: 'body', key: 'noReply' }, - { in: 'body', key: 'tools' }, - { in: 'body', key: 'format' }, - { in: 'body', key: 'system' }, - { in: 'body', key: 'variant' }, - { in: 'body', key: 'snapshotInitialization' }, - { in: 'body', key: 'editorContext' }, - { in: 'body', key: 'parts' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/session/{sessionID}/prompt_async', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Send command - * - * Send a new command to a session for execution by the AI assistant. - */ - public command(parameters: { - sessionID: string; - directory?: string; - workspace?: string; - messageID?: string; - agent?: string; - model?: string; - arguments?: string; - command?: string; - variant?: string; - snapshotInitialization?: 'wait'; - parts?: Array<{ - id?: string; - type: 'file'; - mime: string; - filename?: string; - url: string; - source?: FilePartSource; - }>; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'messageID' }, - { in: 'body', key: 'agent' }, - { in: 'body', key: 'model' }, - { in: 'body', key: 'arguments' }, - { in: 'body', key: 'command' }, - { in: 'body', key: 'variant' }, - { in: 'body', key: 'snapshotInitialization' }, - { in: 'body', key: 'parts' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/session/{sessionID}/command', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Run shell command - * - * Execute a shell command within the session context and return the AI's response. - */ - public shell(parameters: { - sessionID: string; - directory?: string; - workspace?: string; - messageID?: string; - agent?: string; - model?: { - providerID: string; - modelID: string; - }; - command?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'messageID' }, - { in: 'body', key: 'agent' }, - { in: 'body', key: 'model' }, - { in: 'body', key: 'command' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/session/{sessionID}/shell', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Revert message - * - * Revert a specific message in a session, undoing its effects and restoring the previous state. - */ - public revert(parameters: { - sessionID: string; - directory?: string; - workspace?: string; - messageID?: string; - partID?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'messageID' }, - { in: 'body', key: 'partID' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/session/{sessionID}/revert', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Restore reverted messages - * - * Restore all previously reverted messages in a session. - */ - public unrevert(parameters: { - sessionID: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/session/{sessionID}/unrevert', - ...options, - ...params - }); - } - - /** - * Set viewed sessions - * - * Notify the server which sessions the user is currently viewing, or clear all. - */ - public viewed(parameters?: { - directory?: string; - workspace?: string; - viewer?: { - id: string; - active: boolean; - }; - attached?: Array; - visible?: Array; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'viewer' }, - { in: 'body', key: 'attached' }, - { in: 'body', key: 'visible' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/session/viewed', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } + /** + * List sessions + * + * Get a list of all Kilo sessions, sorted by most recently updated. + */ + public list( + parameters?: { + directory?: string + workspace?: string + scope?: "project" + path?: string + roots?: boolean | "true" | "false" + start?: number + search?: string + limit?: number + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "query", key: "scope" }, + { in: "query", key: "path" }, + { in: "query", key: "roots" }, + { in: "query", key: "start" }, + { in: "query", key: "search" }, + { in: "query", key: "limit" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/session", + ...options, + ...params, + }) + } + + /** + * Create session + * + * Create a new Kilo session for interacting with AI assistants and managing conversations. + */ + public create( + parameters?: { + directory?: string + workspace?: string + parentID?: string + title?: string + agent?: string + model?: { + id: string + providerID: string + variant?: string + } + metadata?: { + [key: string]: unknown + } + permission?: PermissionRuleset + platform?: string + workspaceID?: string + sandboxInheritanceToken?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "parentID" }, + { in: "body", key: "title" }, + { in: "body", key: "agent" }, + { in: "body", key: "model" }, + { in: "body", key: "metadata" }, + { in: "body", key: "permission" }, + { in: "body", key: "platform" }, + { in: "body", key: "workspaceID" }, + { in: "body", key: "sandboxInheritanceToken" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/session", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Get session status + * + * Retrieve the current status of all sessions, including active, idle, and completed states. + */ + public status( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/session/status", + ...options, + ...params, + }) + } + + /** + * Delete session + * + * Delete a session and permanently remove all associated data, including messages and history. + */ + public delete( + parameters: { + sessionID: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).delete({ + url: "/session/{sessionID}", + ...options, + ...params, + }) + } + + /** + * Get session + * + * Retrieve detailed information about a specific Kilo session. + */ + public get( + parameters: { + sessionID: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/session/{sessionID}", + ...options, + ...params, + }) + } + + /** + * Update session + * + * Update properties of an existing session, such as title or other metadata. + */ + public update( + parameters: { + sessionID: string + directory?: string + workspace?: string + title?: string + metadata?: { + [key: string]: unknown + } + permission?: PermissionRuleset + time?: { + archived?: number + } + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "title" }, + { in: "body", key: "metadata" }, + { in: "body", key: "permission" }, + { in: "body", key: "time" }, + ], + }, + ], + ) + return (options?.client ?? this.client).patch({ + url: "/session/{sessionID}", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Get session children + * + * Retrieve all child sessions that were forked from the specified parent session. + */ + public children( + parameters: { + sessionID: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/session/{sessionID}/children", + ...options, + ...params, + }) + } + + /** + * Get session todos + * + * Retrieve the todo list associated with a specific session, showing tasks and action items. + */ + public todo( + parameters: { + sessionID: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/session/{sessionID}/todo", + ...options, + ...params, + }) + } + + /** + * Get message diff + * + * Get the file changes (diff) that resulted from a specific user message in the session. + */ + public diff( + parameters: { + sessionID: string + directory?: string + workspace?: string + messageID?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "query", key: "messageID" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/session/{sessionID}/diff", + ...options, + ...params, + }) + } + + /** + * Get session messages + * + * Retrieve all messages in a session, including user prompts and AI responses. + */ + public messages( + parameters: { + sessionID: string + directory?: string + workspace?: string + limit?: number + before?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "query", key: "limit" }, + { in: "query", key: "before" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/session/{sessionID}/message", + ...options, + ...params, + }) + } + + /** + * Send message + * + * Create and send a new message to a session, streaming the AI response. + */ + public prompt( + parameters: { + sessionID: string + directory?: string + workspace?: string + messageID?: string + model?: { + providerID: string + modelID: string + } + agent?: string + noReply?: boolean + tools?: { + [key: string]: boolean + } + format?: OutputFormat + system?: string + variant?: string + snapshotInitialization?: "wait" + editorContext?: { + directory?: string + worktree?: string + visibleFiles?: Array + openTabs?: Array + activeFile?: string + shell?: string + } + parts?: Array + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "messageID" }, + { in: "body", key: "model" }, + { in: "body", key: "agent" }, + { in: "body", key: "noReply" }, + { in: "body", key: "tools" }, + { in: "body", key: "format" }, + { in: "body", key: "system" }, + { in: "body", key: "variant" }, + { in: "body", key: "snapshotInitialization" }, + { in: "body", key: "editorContext" }, + { in: "body", key: "parts" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/session/{sessionID}/message", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Delete message + * + * Permanently delete a specific message and all of its parts from a session without reverting file changes. + */ + public deleteMessage( + parameters: { + sessionID: string + messageID: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "path", key: "messageID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).delete< + SessionDeleteMessageResponses, + SessionDeleteMessageErrors, + ThrowOnError + >({ + url: "/session/{sessionID}/message/{messageID}", + ...options, + ...params, + }) + } + + /** + * Get message + * + * Retrieve a specific message from a session by its message ID. + */ + public message( + parameters: { + sessionID: string + messageID: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "path", key: "messageID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/session/{sessionID}/message/{messageID}", + ...options, + ...params, + }) + } + + /** + * Fork session + * + * Create a new session by forking an existing session at a specific message point. + */ + public fork( + parameters: { + sessionID: string + directory?: string + workspace?: string + messageID?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "messageID" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/session/{sessionID}/fork", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Abort session + * + * Abort an active session and stop any ongoing AI processing or command execution. + */ + public abort( + parameters: { + sessionID: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/session/{sessionID}/abort", + ...options, + ...params, + }) + } + + /** + * Initialize session + * + * Analyze the current application and create an AGENTS.md file with project-specific agent configurations. + */ + public init( + parameters: { + sessionID: string + directory?: string + workspace?: string + modelID?: string + providerID?: string + messageID?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "modelID" }, + { in: "body", key: "providerID" }, + { in: "body", key: "messageID" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/session/{sessionID}/init", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Unshare session + * + * Remove the shareable link for a session, making it private again. + */ + public unshare( + parameters: { + sessionID: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).delete({ + url: "/session/{sessionID}/share", + ...options, + ...params, + }) + } + + /** + * Share session + * + * Create a shareable link for a session, allowing others to view the conversation. + */ + public share( + parameters: { + sessionID: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/session/{sessionID}/share", + ...options, + ...params, + }) + } + + /** + * Summarize session + * + * Generate a concise summary of the session using AI compaction to preserve key information. + */ + public summarize( + parameters: { + sessionID: string + directory?: string + workspace?: string + providerID?: string + modelID?: string + auto?: boolean + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "providerID" }, + { in: "body", key: "modelID" }, + { in: "body", key: "auto" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/session/{sessionID}/summarize", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Send async message + * + * Create and send a new message to a session asynchronously, starting the session if needed and returning immediately. + */ + public promptAsync( + parameters: { + sessionID: string + directory?: string + workspace?: string + messageID?: string + model?: { + providerID: string + modelID: string + } + agent?: string + noReply?: boolean + tools?: { + [key: string]: boolean + } + format?: OutputFormat + system?: string + variant?: string + snapshotInitialization?: "wait" + editorContext?: { + directory?: string + worktree?: string + visibleFiles?: Array + openTabs?: Array + activeFile?: string + shell?: string + } + parts?: Array + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "messageID" }, + { in: "body", key: "model" }, + { in: "body", key: "agent" }, + { in: "body", key: "noReply" }, + { in: "body", key: "tools" }, + { in: "body", key: "format" }, + { in: "body", key: "system" }, + { in: "body", key: "variant" }, + { in: "body", key: "snapshotInitialization" }, + { in: "body", key: "editorContext" }, + { in: "body", key: "parts" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/session/{sessionID}/prompt_async", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Send command + * + * Send a new command to a session for execution by the AI assistant. + */ + public command( + parameters: { + sessionID: string + directory?: string + workspace?: string + messageID?: string + agent?: string + model?: string + arguments?: string + command?: string + variant?: string + snapshotInitialization?: "wait" + parts?: Array<{ + id?: string + type: "file" + mime: string + filename?: string + url: string + source?: FilePartSource + }> + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "messageID" }, + { in: "body", key: "agent" }, + { in: "body", key: "model" }, + { in: "body", key: "arguments" }, + { in: "body", key: "command" }, + { in: "body", key: "variant" }, + { in: "body", key: "snapshotInitialization" }, + { in: "body", key: "parts" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/session/{sessionID}/command", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Run shell command + * + * Execute a shell command within the session context and return the AI's response. + */ + public shell( + parameters: { + sessionID: string + directory?: string + workspace?: string + messageID?: string + agent?: string + model?: { + providerID: string + modelID: string + } + command?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "messageID" }, + { in: "body", key: "agent" }, + { in: "body", key: "model" }, + { in: "body", key: "command" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/session/{sessionID}/shell", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Revert message + * + * Revert a specific message in a session, undoing its effects and restoring the previous state. + */ + public revert( + parameters: { + sessionID: string + directory?: string + workspace?: string + messageID?: string + partID?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "messageID" }, + { in: "body", key: "partID" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/session/{sessionID}/revert", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Restore reverted messages + * + * Restore all previously reverted messages in a session. + */ + public unrevert( + parameters: { + sessionID: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/session/{sessionID}/unrevert", + ...options, + ...params, + }) + } + + /** + * Set viewed sessions + * + * Notify the server which sessions the user is currently viewing, or clear all. + */ + public viewed( + parameters?: { + directory?: string + workspace?: string + viewer?: { + id: string + active: boolean + } + attached?: Array + visible?: Array + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "viewer" }, + { in: "body", key: "attached" }, + { in: "body", key: "visible" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/session/viewed", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } } export class Part extends HeyApiClient { - /** - * Delete a part from a message. - */ - public delete(parameters: { - sessionID: string; - messageID: string; - partID: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'path', key: 'messageID' }, - { in: 'path', key: 'partID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).delete({ - url: '/session/{sessionID}/message/{messageID}/part/{partID}', - ...options, - ...params - }); - } - - /** - * Update a part in a message. - */ - public update(parameters: { - sessionID: string; - messageID: string; - partID: string; - directory?: string; - workspace?: string; - part?: Part2; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'path', key: 'messageID' }, - { in: 'path', key: 'partID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { key: 'part', map: 'body' } - ] }]); - return (options?.client ?? this.client).patch({ - url: '/session/{sessionID}/message/{messageID}/part/{partID}', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } + /** + * Delete a part from a message. + */ + public delete( + parameters: { + sessionID: string + messageID: string + partID: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "path", key: "messageID" }, + { in: "path", key: "partID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).delete({ + url: "/session/{sessionID}/message/{messageID}/part/{partID}", + ...options, + ...params, + }) + } + + /** + * Update a part in a message. + */ + public update( + parameters: { + sessionID: string + messageID: string + partID: string + directory?: string + workspace?: string + part?: Part2 + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "path", key: "messageID" }, + { in: "path", key: "partID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { key: "part", map: "body" }, + ], + }, + ], + ) + return (options?.client ?? this.client).patch({ + url: "/session/{sessionID}/message/{messageID}/part/{partID}", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } } export class History extends HeyApiClient { - /** - * List sync events - * - * List sync events for all aggregates. Keys are aggregate IDs the client already knows about, values are the last known sequence ID. Events with seq > value are returned for those aggregates. Aggregates not listed in the input get their full history. - */ - public list(parameters?: { - directory?: string; - workspace?: string; - body?: { - [key: string]: number; - }; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { key: 'body', map: 'body' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/sync/history', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } + /** + * List sync events + * + * List sync events for all aggregates. Keys are aggregate IDs the client already knows about, values are the last known sequence ID. Events with seq > value are returned for those aggregates. Aggregates not listed in the input get their full history. + */ + public list( + parameters?: { + directory?: string + workspace?: string + body?: { + [key: string]: number + } + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { key: "body", map: "body" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/sync/history", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } } export class Sync extends HeyApiClient { - /** - * Start workspace sync - * - * Start sync loops for workspaces in the current project that have active sessions. - */ - public start(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).post({ - url: '/sync/start', - ...options, - ...params - }); - } - - /** - * Replay sync events - * - * Validate and replay a complete sync event history. - */ - public replay(parameters?: { - query_directory?: string; - workspace?: string; - body_directory?: string; - events?: Array<{ - id: string; - aggregateID: string; - seq: number; - type: string; - data: { - [key: string]: unknown; - }; - }>; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { - in: 'query', - key: 'query_directory', - map: 'directory' - }, - { in: 'query', key: 'workspace' }, - { - in: 'body', - key: 'body_directory', - map: 'directory' - }, - { in: 'body', key: 'events' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/sync/replay', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Steal session into workspace - * - * Update a session to belong to the current workspace through the sync event system. - */ - public steal(parameters?: { - directory?: string; - workspace?: string; - sessionID?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'sessionID' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/sync/steal', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - private _history?: History; - get history(): History { - return this._history ??= new History({ client: this.client }); - } + /** + * Start workspace sync + * + * Start sync loops for workspaces in the current project that have active sessions. + */ + public start( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/sync/start", + ...options, + ...params, + }) + } + + /** + * Replay sync events + * + * Validate and replay a complete sync event history. + */ + public replay( + parameters?: { + query_directory?: string + workspace?: string + body_directory?: string + events?: Array<{ + id: string + aggregateID: string + seq: number + type: string + data: { + [key: string]: unknown + } + }> + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { + in: "query", + key: "query_directory", + map: "directory", + }, + { in: "query", key: "workspace" }, + { + in: "body", + key: "body_directory", + map: "directory", + }, + { in: "body", key: "events" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/sync/replay", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Steal session into workspace + * + * Update a session to belong to the current workspace through the sync event system. + */ + public steal( + parameters?: { + directory?: string + workspace?: string + sessionID?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "sessionID" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/sync/steal", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + private _history?: History + get history(): History { + return (this._history ??= new History({ client: this.client })) + } } export class Control extends HeyApiClient { - /** - * Get next TUI request - * - * Retrieve the next TUI request from the queue for processing. - */ - public next(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/tui/control/next', - ...options, - ...params - }); - } - - /** - * Submit TUI response - * - * Submit a response to the TUI request queue to complete a pending request. - */ - public response(parameters?: { - directory?: string; - workspace?: string; - body?: unknown; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { key: 'body', map: 'body' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/tui/control/response', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } + /** + * Get next TUI request + * + * Retrieve the next TUI request from the queue for processing. + */ + public next( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/tui/control/next", + ...options, + ...params, + }) + } + + /** + * Submit TUI response + * + * Submit a response to the TUI request queue to complete a pending request. + */ + public response( + parameters?: { + directory?: string + workspace?: string + body?: unknown + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { key: "body", map: "body" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/tui/control/response", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } } export class Config3 extends HeyApiClient { - /** - * Get TUI configuration - * - * Retrieve the effective TUI configuration for the current instance directory. - */ - public get(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/tui/config', - ...options, - ...params - }); - } - - /** - * Update TUI configuration - * - * Patch global or project TUI configuration and return the effective TUI configuration. - */ - public update(parameters?: { - directory?: string; - workspace?: string; - scope?: 'project' | 'global'; - $schema?: string; - theme?: string; - keybinds?: { - [key: string]: string; - }; - plugin?: Array( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/tui/config", + ...options, + ...params, + }) + } + + /** + * Update TUI configuration + * + * Patch global or project TUI configuration and return the effective TUI configuration. + */ + public update( + parameters?: { + directory?: string + workspace?: string + scope?: "project" | "global" + $schema?: string + theme?: string + keybinds?: { + [key: string]: string + } + plugin?: Array< + | string + | [ string, { - [key: string]: unknown; - } - ]>; - plugin_enabled?: { - [key: string]: boolean; - }; - title_icon?: 'none' | 'unicode' | 'emojis'; - scroll_speed?: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - scroll_acceleration?: { - enabled: boolean; - }; - diff_style?: 'auto' | 'stacked'; - mouse?: boolean; - attention?: { - enabled?: boolean; - notifications?: boolean; - sound?: boolean; - volume?: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - }; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'query', key: 'scope' }, - { in: 'body', key: '$schema' }, - { in: 'body', key: 'theme' }, - { in: 'body', key: 'keybinds' }, - { in: 'body', key: 'plugin' }, - { in: 'body', key: 'plugin_enabled' }, - { in: 'body', key: 'title_icon' }, - { in: 'body', key: 'scroll_speed' }, - { in: 'body', key: 'scroll_acceleration' }, - { in: 'body', key: 'diff_style' }, - { in: 'body', key: 'mouse' }, - { in: 'body', key: 'attention' } - ] }]); - return (options?.client ?? this.client).patch({ - url: '/tui/config', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } + [key: string]: unknown + }, + ] + > + plugin_enabled?: { + [key: string]: boolean + } + title_icon?: "none" | "unicode" | "emojis" + scroll_speed?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + scroll_acceleration?: { + enabled: boolean + } + diff_style?: "auto" | "stacked" + mouse?: boolean + attention?: { + enabled?: boolean + notifications?: boolean + sound?: boolean + volume?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + } + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "query", key: "scope" }, + { in: "body", key: "$schema" }, + { in: "body", key: "theme" }, + { in: "body", key: "keybinds" }, + { in: "body", key: "plugin" }, + { in: "body", key: "plugin_enabled" }, + { in: "body", key: "title_icon" }, + { in: "body", key: "scroll_speed" }, + { in: "body", key: "scroll_acceleration" }, + { in: "body", key: "diff_style" }, + { in: "body", key: "mouse" }, + { in: "body", key: "attention" }, + ], + }, + ], + ) + return (options?.client ?? this.client).patch({ + url: "/tui/config", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } } export class Keybind extends HeyApiClient { - /** - * List TUI keybinds - * - * List valid TUI keybind commands, descriptions, groups, and default bindings from the CLI schema. - */ - public list(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/tui/keybinds', - ...options, - ...params - }); - } + /** + * List TUI keybinds + * + * List valid TUI keybind commands, descriptions, groups, and default bindings from the CLI schema. + */ + public list( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/tui/keybinds", + ...options, + ...params, + }) + } } export class Tui extends HeyApiClient { - /** - * Append TUI prompt - * - * Append prompt to the TUI. - */ - public appendPrompt(parameters?: { - directory?: string; - workspace?: string; - text?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'text' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/tui/append-prompt', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Open help dialog - * - * Open the help dialog in the TUI to display user assistance information. - */ - public openHelp(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).post({ - url: '/tui/open-help', - ...options, - ...params - }); - } - - /** - * Open sessions dialog - * - * Open the session dialog. - */ - public openSessions(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).post({ - url: '/tui/open-sessions', - ...options, - ...params - }); - } - - /** - * Open themes dialog - * - * Open the theme dialog. - */ - public openThemes(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).post({ - url: '/tui/open-themes', - ...options, - ...params - }); - } - - /** - * Open models dialog - * - * Open the model dialog. - */ - public openModels(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).post({ - url: '/tui/open-models', - ...options, - ...params - }); - } - - /** - * Submit TUI prompt - * - * Submit the prompt. - */ - public submitPrompt(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).post({ - url: '/tui/submit-prompt', - ...options, - ...params - }); - } - - /** - * Clear TUI prompt - * - * Clear the prompt. - */ - public clearPrompt(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).post({ - url: '/tui/clear-prompt', - ...options, - ...params - }); - } - - /** - * Execute TUI command - * - * Execute a TUI command. - */ - public executeCommand(parameters?: { - directory?: string; - workspace?: string; - command?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'command' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/tui/execute-command', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Show TUI toast - * - * Show a toast notification in the TUI. - */ - public showToast(parameters?: { - directory?: string; - workspace?: string; - title?: string; - message?: string; - variant?: 'info' | 'success' | 'warning' | 'error'; - duration?: number; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'title' }, - { in: 'body', key: 'message' }, - { in: 'body', key: 'variant' }, - { in: 'body', key: 'duration' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/tui/show-toast', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Publish TUI event - * - * Publish a TUI event. - */ - public publish(parameters?: { - directory?: string; - workspace?: string; - body?: EventTuiPromptAppend2 | EventTuiCommandExecute2 | EventTuiToastShow2 | EventTuiSessionSelect2; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { key: 'body', map: 'body' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/tui/publish', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Select session - * - * Navigate the TUI to display the specified session. - */ - public selectSession(parameters?: { - directory?: string; - workspace?: string; - sessionID?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'sessionID' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/tui/select-session', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - private _control?: Control; - get control(): Control { - return this._control ??= new Control({ client: this.client }); - } - - private _config?: Config3; - get config(): Config3 { - return this._config ??= new Config3({ client: this.client }); - } - - private _keybind?: Keybind; - get keybind(): Keybind { - return this._keybind ??= new Keybind({ client: this.client }); - } + /** + * Append TUI prompt + * + * Append prompt to the TUI. + */ + public appendPrompt( + parameters?: { + directory?: string + workspace?: string + text?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "text" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/tui/append-prompt", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Open help dialog + * + * Open the help dialog in the TUI to display user assistance information. + */ + public openHelp( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/tui/open-help", + ...options, + ...params, + }) + } + + /** + * Open sessions dialog + * + * Open the session dialog. + */ + public openSessions( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/tui/open-sessions", + ...options, + ...params, + }) + } + + /** + * Open themes dialog + * + * Open the theme dialog. + */ + public openThemes( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/tui/open-themes", + ...options, + ...params, + }) + } + + /** + * Open models dialog + * + * Open the model dialog. + */ + public openModels( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/tui/open-models", + ...options, + ...params, + }) + } + + /** + * Submit TUI prompt + * + * Submit the prompt. + */ + public submitPrompt( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/tui/submit-prompt", + ...options, + ...params, + }) + } + + /** + * Clear TUI prompt + * + * Clear the prompt. + */ + public clearPrompt( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/tui/clear-prompt", + ...options, + ...params, + }) + } + + /** + * Execute TUI command + * + * Execute a TUI command. + */ + public executeCommand( + parameters?: { + directory?: string + workspace?: string + command?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "command" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/tui/execute-command", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Show TUI toast + * + * Show a toast notification in the TUI. + */ + public showToast( + parameters?: { + directory?: string + workspace?: string + title?: string + message?: string + variant?: "info" | "success" | "warning" | "error" + duration?: number + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "title" }, + { in: "body", key: "message" }, + { in: "body", key: "variant" }, + { in: "body", key: "duration" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/tui/show-toast", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Publish TUI event + * + * Publish a TUI event. + */ + public publish( + parameters?: { + directory?: string + workspace?: string + body?: EventTuiPromptAppend2 | EventTuiCommandExecute2 | EventTuiToastShow2 | EventTuiSessionSelect2 + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { key: "body", map: "body" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/tui/publish", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Select session + * + * Navigate the TUI to display the specified session. + */ + public selectSession( + parameters?: { + directory?: string + workspace?: string + sessionID?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "sessionID" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/tui/select-session", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + private _control?: Control + get control(): Control { + return (this._control ??= new Control({ client: this.client })) + } + + private _config?: Config3 + get config(): Config3 { + return (this._config ??= new Config3({ client: this.client })) + } + + private _keybind?: Keybind + get keybind(): Keybind { + return (this._keybind ??= new Keybind({ client: this.client })) + } } export class AgentBuilder extends HeyApiClient { - /** - * Preview agent markdown - * - * Validate an agent builder payload and return the canonical agent markdown without writing it. - */ - public preview(parameters?: { - directory?: string; - workspace?: string; - id?: string; - scope?: 'global' | 'project'; - description?: string; - mode?: 'primary' | 'subagent' | 'all'; - model?: string; - color?: string; - steps?: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - tools?: Array; - permission?: { - [key: string]: unknown; - }; - prompt?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'id' }, - { in: 'body', key: 'scope' }, - { in: 'body', key: 'description' }, - { in: 'body', key: 'mode' }, - { in: 'body', key: 'model' }, - { in: 'body', key: 'color' }, - { in: 'body', key: 'steps' }, - { in: 'body', key: 'tools' }, - { in: 'body', key: 'permission' }, - { in: 'body', key: 'prompt' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/agent-builder/preview', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Save agent markdown - * - * Save an agent builder payload as a canonical agent markdown file. - */ - public save(parameters: { - path_id: string; - directory?: string; - workspace?: string; - body_id?: string; - scope?: 'global' | 'project'; - description?: string; - mode?: 'primary' | 'subagent' | 'all'; - model?: string; - color?: string; - steps?: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - tools?: Array; - permission?: { - [key: string]: unknown; - }; - prompt?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { - in: 'path', - key: 'path_id', - map: 'id' - }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { - in: 'body', - key: 'body_id', - map: 'id' - }, - { in: 'body', key: 'scope' }, - { in: 'body', key: 'description' }, - { in: 'body', key: 'mode' }, - { in: 'body', key: 'model' }, - { in: 'body', key: 'color' }, - { in: 'body', key: 'steps' }, - { in: 'body', key: 'tools' }, - { in: 'body', key: 'permission' }, - { in: 'body', key: 'prompt' } - ] }]); - return (options?.client ?? this.client).put({ - url: '/agent-builder/{id}', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } + /** + * Preview agent markdown + * + * Validate an agent builder payload and return the canonical agent markdown without writing it. + */ + public preview( + parameters?: { + directory?: string + workspace?: string + id?: string + scope?: "global" | "project" + description?: string + mode?: "primary" | "subagent" | "all" + model?: string + color?: string + steps?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + tools?: Array + permission?: { + [key: string]: unknown + } + prompt?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "id" }, + { in: "body", key: "scope" }, + { in: "body", key: "description" }, + { in: "body", key: "mode" }, + { in: "body", key: "model" }, + { in: "body", key: "color" }, + { in: "body", key: "steps" }, + { in: "body", key: "tools" }, + { in: "body", key: "permission" }, + { in: "body", key: "prompt" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post( + { + url: "/agent-builder/preview", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }, + ) + } + + /** + * Save agent markdown + * + * Save an agent builder payload as a canonical agent markdown file. + */ + public save( + parameters: { + path_id: string + directory?: string + workspace?: string + body_id?: string + scope?: "global" | "project" + description?: string + mode?: "primary" | "subagent" | "all" + model?: string + color?: string + steps?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + tools?: Array + permission?: { + [key: string]: unknown + } + prompt?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { + in: "path", + key: "path_id", + map: "id", + }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { + in: "body", + key: "body_id", + map: "id", + }, + { in: "body", key: "scope" }, + { in: "body", key: "description" }, + { in: "body", key: "mode" }, + { in: "body", key: "model" }, + { in: "body", key: "color" }, + { in: "body", key: "steps" }, + { in: "body", key: "tools" }, + { in: "body", key: "permission" }, + { in: "body", key: "prompt" }, + ], + }, + ], + ) + return (options?.client ?? this.client).put({ + url: "/agent-builder/{id}", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } } export class BackgroundProcess extends HeyApiClient { - /** - * List background processes - * - * List tracked background processes for the current instance. - */ - public list(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/background-process', - ...options, - ...params - }); - } - - /** - * Get background process - * - * Get status and retained output for one background process. - */ - public get(parameters: { - processID: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'processID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/background-process/{processID}', - ...options, - ...params - }); - } - - /** - * Get background process logs - * - * Get the retained output tail for one background process. - */ - public logs(parameters: { - processID: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'processID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/background-process/{processID}/logs', - ...options, - ...params - }); - } - - /** - * Stop background process - * - * Terminate a background process and its child process tree. - */ - public stop(parameters: { - processID: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'processID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/background-process/{processID}/stop', - ...options, - ...params - }); - } - - /** - * Restart background process - * - * Stop and restart a background process with its original command. - */ - public restart(parameters: { - processID: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'processID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/background-process/{processID}/restart', - ...options, - ...params - }); - } - - /** - * Stop session background processes - * - * Terminate and forget all background processes associated with one session. - */ - public stopSession(parameters: { - sessionID: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/background-process/session/{sessionID}/stop', - ...options, - ...params - }); - } + /** + * List background processes + * + * List tracked background processes for the current instance. + */ + public list( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get< + BackgroundProcessListResponses, + BackgroundProcessListErrors, + ThrowOnError + >({ + url: "/background-process", + ...options, + ...params, + }) + } + + /** + * Get background process + * + * Get status and retained output for one background process. + */ + public get( + parameters: { + processID: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "processID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get< + BackgroundProcessGetResponses, + BackgroundProcessGetErrors, + ThrowOnError + >({ + url: "/background-process/{processID}", + ...options, + ...params, + }) + } + + /** + * Get background process logs + * + * Get the retained output tail for one background process. + */ + public logs( + parameters: { + processID: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "processID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get< + BackgroundProcessLogsResponses, + BackgroundProcessLogsErrors, + ThrowOnError + >({ + url: "/background-process/{processID}/logs", + ...options, + ...params, + }) + } + + /** + * Stop background process + * + * Terminate a background process and its child process tree. + */ + public stop( + parameters: { + processID: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "processID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + BackgroundProcessStopResponses, + BackgroundProcessStopErrors, + ThrowOnError + >({ + url: "/background-process/{processID}/stop", + ...options, + ...params, + }) + } + + /** + * Restart background process + * + * Stop and restart a background process with its original command. + */ + public restart( + parameters: { + processID: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "processID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + BackgroundProcessRestartResponses, + BackgroundProcessRestartErrors, + ThrowOnError + >({ + url: "/background-process/{processID}/restart", + ...options, + ...params, + }) + } + + /** + * Stop session background processes + * + * Terminate and forget all background processes associated with one session. + */ + public stopSession( + parameters: { + sessionID: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + BackgroundProcessStopSessionResponses, + BackgroundProcessStopSessionErrors, + ThrowOnError + >({ + url: "/background-process/session/{sessionID}/stop", + ...options, + ...params, + }) + } } export class BranchName extends HeyApiClient { - /** - * Generate branch name - * - * Generate a task-focused branch name from the current conversation. - */ - public generate(parameters: { - sessionID: string; - directory?: string; - workspace?: string; - prompt?: string; - providerID?: string; - modelID?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'prompt' }, - { in: 'body', key: 'providerID' }, - { in: 'body', key: 'modelID' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/session/{sessionID}/branch-name', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } + /** + * Generate branch name + * + * Generate a task-focused branch name from the current conversation. + */ + public generate( + parameters: { + sessionID: string + directory?: string + workspace?: string + prompt?: string + providerID?: string + modelID?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "prompt" }, + { in: "body", key: "providerID" }, + { in: "body", key: "modelID" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/session/{sessionID}/branch-name", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } } export class CommitMessage extends HeyApiClient { - /** - * Generate commit message - * - * Generate a commit message using AI based on the current git diff. - */ - public generate(parameters?: { - directory?: string; - workspace?: string; - path?: string; - selectedFiles?: Array; - previousMessage?: string; - language?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'path' }, - { in: 'body', key: 'selectedFiles' }, - { in: 'body', key: 'previousMessage' }, - { in: 'body', key: 'language' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/commit-message', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } + /** + * Generate commit message + * + * Generate a commit message using AI based on the current git diff. + */ + public generate( + parameters?: { + directory?: string + workspace?: string + path?: string + selectedFiles?: Array + previousMessage?: string + language?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "path" }, + { in: "body", key: "selectedFiles" }, + { in: "body", key: "previousMessage" }, + { in: "body", key: "language" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + CommitMessageGenerateResponses, + CommitMessageGenerateErrors, + ThrowOnError + >({ + url: "/commit-message", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } } export class EnhancePrompt extends HeyApiClient { - /** - * Enhance prompt - * - * Rewrite a user's draft prompt into a clearer, more specific, and more effective prompt. - */ - public enhance(parameters?: { - directory?: string; - workspace?: string; - text?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'text' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/enhance-prompt', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } + /** + * Enhance prompt + * + * Rewrite a user's draft prompt into a clearer, more specific, and more effective prompt. + */ + public enhance( + parameters?: { + directory?: string + workspace?: string + text?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "text" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + EnhancePromptEnhanceResponses, + EnhancePromptEnhanceErrors, + ThrowOnError + >({ + url: "/enhance-prompt", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } } export class Indexing extends HeyApiClient { - /** - * Get indexing status - * - * Retrieve the current code indexing status for the active project. - */ - public status(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/indexing/status', - ...options, - ...params - }); - } - - /** - * Get indexing warnings - * - * Retrieve code indexing warnings for the active project. - */ - public warnings(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/indexing/warnings', - ...options, - ...params - }); - } - - /** - * List Kilo embedding models - * - * Retrieve the embedding models available through the active Kilo account. - */ - public models(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/indexing/models', - ...options, - ...params - }); - } + /** + * Get indexing status + * + * Retrieve the current code indexing status for the active project. + */ + public status( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/indexing/status", + ...options, + ...params, + }) + } + + /** + * Get indexing warnings + * + * Retrieve code indexing warnings for the active project. + */ + public warnings( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/indexing/warnings", + ...options, + ...params, + }) + } + + /** + * List Kilo embedding models + * + * Retrieve the embedding models available through the active Kilo account. + */ + public models( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/indexing/models", + ...options, + ...params, + }) + } } export class InteractiveTerminal extends HeyApiClient { - /** - * List interactive terminals - * - * List active human-driven terminal sessions for the current instance. - */ - public list(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/interactive-terminal', - ...options, - ...params - }); - } - - /** - * Get interactive terminal - * - * Get metadata and retained output for an active interactive terminal. - */ - public get(parameters: { - terminalID: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'terminalID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/interactive-terminal/{terminalID}', - ...options, - ...params - }); - } - - /** - * Write interactive terminal input - * - * Send raw keyboard input to an active interactive terminal. - */ - public write(parameters: { - terminalID: string; - directory?: string; - workspace?: string; - interactiveTerminalWriteInput?: InteractiveTerminalWriteInput; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'terminalID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { key: 'interactiveTerminalWriteInput', map: 'body' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/interactive-terminal/{terminalID}/input', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Resize interactive terminal - * - * Resize an active interactive terminal's PTY. - */ - public resize(parameters: { - terminalID: string; - directory?: string; - workspace?: string; - interactiveTerminalResizeInput?: InteractiveTerminalResizeInput; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'terminalID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { key: 'interactiveTerminalResizeInput', map: 'body' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/interactive-terminal/{terminalID}/resize', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Close interactive terminal - * - * Terminate an active interactive terminal and unblock its tool call. - */ - public close(parameters: { - terminalID: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'terminalID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/interactive-terminal/{terminalID}/close', - ...options, - ...params - }); - } + /** + * List interactive terminals + * + * List active human-driven terminal sessions for the current instance. + */ + public list( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get< + InteractiveTerminalListResponses, + InteractiveTerminalListErrors, + ThrowOnError + >({ + url: "/interactive-terminal", + ...options, + ...params, + }) + } + + /** + * Get interactive terminal + * + * Get metadata and retained output for an active interactive terminal. + */ + public get( + parameters: { + terminalID: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "terminalID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get< + InteractiveTerminalGetResponses, + InteractiveTerminalGetErrors, + ThrowOnError + >({ + url: "/interactive-terminal/{terminalID}", + ...options, + ...params, + }) + } + + /** + * Write interactive terminal input + * + * Send raw keyboard input to an active interactive terminal. + */ + public write( + parameters: { + terminalID: string + directory?: string + workspace?: string + interactiveTerminalWriteInput?: InteractiveTerminalWriteInput + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "terminalID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { key: "interactiveTerminalWriteInput", map: "body" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + InteractiveTerminalWriteResponses, + InteractiveTerminalWriteErrors, + ThrowOnError + >({ + url: "/interactive-terminal/{terminalID}/input", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Resize interactive terminal + * + * Resize an active interactive terminal's PTY. + */ + public resize( + parameters: { + terminalID: string + directory?: string + workspace?: string + interactiveTerminalResizeInput?: InteractiveTerminalResizeInput + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "terminalID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { key: "interactiveTerminalResizeInput", map: "body" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + InteractiveTerminalResizeResponses, + InteractiveTerminalResizeErrors, + ThrowOnError + >({ + url: "/interactive-terminal/{terminalID}/resize", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Close interactive terminal + * + * Terminate an active interactive terminal and unblock its tool call. + */ + public close( + parameters: { + terminalID: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "terminalID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + InteractiveTerminalCloseResponses, + InteractiveTerminalCloseErrors, + ThrowOnError + >({ + url: "/interactive-terminal/{terminalID}/close", + ...options, + ...params, + }) + } } export class Audio extends HeyApiClient { - /** - * Speech to text transcription - * - * Proxy an audio transcription request to the Kilo Gateway - */ - public transcriptions(parameters?: { - directory?: string; - workspace?: string; - model?: string; - input_audio?: { - data: string; - format: string; - }; - language?: string; - prompt?: string; - temperature?: number; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'model' }, - { in: 'body', key: 'input_audio' }, - { in: 'body', key: 'language' }, - { in: 'body', key: 'prompt' }, - { in: 'body', key: 'temperature' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/kilo/audio/transcriptions', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } + /** + * Speech to text transcription + * + * Proxy an audio transcription request to the Kilo Gateway + */ + public transcriptions( + parameters?: { + directory?: string + workspace?: string + model?: string + input_audio?: { + data: string + format: string + } + language?: string + prompt?: string + temperature?: number + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "model" }, + { in: "body", key: "input_audio" }, + { in: "body", key: "language" }, + { in: "body", key: "prompt" }, + { in: "body", key: "temperature" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + KiloAudioTranscriptionsResponses, + KiloAudioTranscriptionsErrors, + ThrowOnError + >({ + url: "/kilo/audio/transcriptions", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } } export class Models extends HeyApiClient { - /** - * Image generation models - * - * List image-capable models from the Kilo Gateway OpenRouter passthrough - */ - public images(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/kilo/models/images', - ...options, - ...params - }); - } + /** + * Image generation models + * + * List image-capable models from the Kilo Gateway OpenRouter passthrough + */ + public images( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/kilo/models/images", + ...options, + ...params, + }) + } } export class Organization extends HeyApiClient { - /** - * Update Kilo Gateway organization - * - * Switch to a different Kilo Gateway organization - */ - public set(parameters?: { - directory?: string; - workspace?: string; - organizationId?: string | null; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'organizationId' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/kilo/organization', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } + /** + * Update Kilo Gateway organization + * + * Switch to a different Kilo Gateway organization + */ + public set( + parameters?: { + directory?: string + workspace?: string + organizationId?: string | null + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "organizationId" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post( + { + url: "/kilo/organization", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }, + ) + } } export class Claw extends HeyApiClient { - /** - * Get KiloClaw instance status - * - * Fetch the user's KiloClaw instance status via the KiloClaw worker - */ - public status(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/kilo/claw/status', - ...options, - ...params - }); - } - - /** - * Get KiloClaw chat credentials - * - * Returns the bearer token and endpoint URLs the client uses to talk to the Kilo Chat worker and the Event Service. The bearer is the user's existing long-lived Kilo JWT — kilo-chat and event-service both verify it directly with NEXTAUTH_SECRET, so no separate token mint is needed. - */ - public chatCredentials(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/kilo/claw/chat-credentials', - ...options, - ...params - }); - } + /** + * Get KiloClaw instance status + * + * Fetch the user's KiloClaw instance status via the KiloClaw worker + */ + public status( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/kilo/claw/status", + ...options, + ...params, + }) + } + + /** + * Get KiloClaw chat credentials + * + * Returns the bearer token and endpoint URLs the client uses to talk to the Kilo Chat worker and the Event Service. The bearer is the user's existing long-lived Kilo JWT — kilo-chat and event-service both verify it directly with NEXTAUTH_SECRET, so no separate token mint is needed. + */ + public chatCredentials( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get< + KiloClawChatCredentialsResponses, + KiloClawChatCredentialsErrors, + ThrowOnError + >({ + url: "/kilo/claw/chat-credentials", + ...options, + ...params, + }) + } } export class Session3 extends HeyApiClient { - /** - * Get cloud session - * - * Fetch full session data from the Kilo cloud for preview - */ - public get(parameters: { - id: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'id' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/kilo/cloud/session/{id}', - ...options, - ...params - }); - } - - /** - * Import session from cloud - * - * Download a cloud-synced session and write it to local storage with fresh IDs. - */ - public import(parameters?: { - directory?: string; - workspace?: string; - sessionId?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'sessionId' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/kilo/cloud/session/import', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } + /** + * Get cloud session + * + * Fetch full session data from the Kilo cloud for preview + */ + public get( + parameters: { + id: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "id" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/kilo/cloud/session/{id}", + ...options, + ...params, + }) + } + + /** + * Import session from cloud + * + * Download a cloud-synced session and write it to local storage with fresh IDs. + */ + public import( + parameters?: { + directory?: string + workspace?: string + sessionId?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "sessionId" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + KiloCloudSessionImportResponses, + KiloCloudSessionImportErrors, + ThrowOnError + >({ + url: "/kilo/cloud/session/import", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } } export class Cloud extends HeyApiClient { - private _session?: Session3; - get session(): Session3 { - return this._session ??= new Session3({ client: this.client }); - } + private _session?: Session3 + get session(): Session3 { + return (this._session ??= new Session3({ client: this.client })) + } } export class Kilo extends HeyApiClient { - /** - * Get Kilo Gateway profile - * - * Fetch user profile and organizations from Kilo Gateway - */ - public profile(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/kilo/profile', - ...options, - ...params - }); - } - - /** - * Get Kilo authentication status - * - * Check whether a locally stored Kilo credential can authenticate Gateway requests - */ - public authStatus(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/kilo/auth-status', - ...options, - ...params - }); - } - - /** - * Get organization custom modes - * - * Fetch custom modes defined for the current organization - */ - public modes(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/kilo/modes', - ...options, - ...params - }); - } - - /** - * FIM completion - * - * Proxy a Fill-in-the-Middle completion request to the Kilo Gateway - */ - public fim(parameters?: { - directory?: string; - workspace?: string; - prefix?: string; - suffix?: string; - provider?: string; - model?: string; - maxTokens?: number; - temperature?: number; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'prefix' }, - { in: 'body', key: 'suffix' }, - { in: 'body', key: 'provider' }, - { in: 'body', key: 'model' }, - { in: 'body', key: 'maxTokens' }, - { in: 'body', key: 'temperature' } - ] }]); - return (options?.client ?? this.client).sse.post({ - url: '/kilo/fim', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Next Edit completion - * - * Proxy a Mercury-style Next Edit request. The client supplies structured editor context; the gateway assembles the sentinel-tagged prompt and forwards to the upstream edit endpoint. - */ - public edit(parameters?: { - directory?: string; - workspace?: string; - provider?: string; - model?: string; - maxTokens?: number; - currentFilePath?: string; - currentFileContent?: string; - cursorLine?: number; - cursorCharacter?: number; - editableRegionStartLine?: number; - editableRegionEndLine?: number; - recentlyViewedSnippets?: Array<{ - filepath: string; - content: string; - }>; - editDiffHistory?: Array; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'provider' }, - { in: 'body', key: 'model' }, - { in: 'body', key: 'maxTokens' }, - { in: 'body', key: 'currentFilePath' }, - { in: 'body', key: 'currentFileContent' }, - { in: 'body', key: 'cursorLine' }, - { in: 'body', key: 'cursorCharacter' }, - { in: 'body', key: 'editableRegionStartLine' }, - { in: 'body', key: 'editableRegionEndLine' }, - { in: 'body', key: 'recentlyViewedSnippets' }, - { in: 'body', key: 'editDiffHistory' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/kilo/edit', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Get Kilo notifications - * - * Fetch notifications from Kilo Gateway for CLI display - */ - public notifications(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/kilo/notifications', - ...options, - ...params - }); - } - - /** - * Get cloud sessions - * - * Fetch cloud CLI sessions from Kilo API - */ - public cloudSessions(parameters?: { - directory?: string; - workspace?: string; - cursor?: string; - limit?: number; - gitUrl?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'query', key: 'cursor' }, - { in: 'query', key: 'limit' }, - { in: 'query', key: 'gitUrl' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/kilo/cloud-sessions', - ...options, - ...params - }); - } - - private _audio?: Audio; - get audio(): Audio { - return this._audio ??= new Audio({ client: this.client }); - } - - private _models?: Models; - get models(): Models { - return this._models ??= new Models({ client: this.client }); - } - - private _organization?: Organization; - get organization(): Organization { - return this._organization ??= new Organization({ client: this.client }); - } - - private _claw?: Claw; - get claw(): Claw { - return this._claw ??= new Claw({ client: this.client }); - } - - private _cloud?: Cloud; - get cloud(): Cloud { - return this._cloud ??= new Cloud({ client: this.client }); - } + /** + * Get Kilo Gateway profile + * + * Fetch user profile and organizations from Kilo Gateway + */ + public profile( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/kilo/profile", + ...options, + ...params, + }) + } + + /** + * Get Kilo authentication status + * + * Check whether a locally stored Kilo credential can authenticate Gateway requests + */ + public authStatus( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/kilo/auth-status", + ...options, + ...params, + }) + } + + /** + * Get organization custom modes + * + * Fetch custom modes defined for the current organization + */ + public modes( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/kilo/modes", + ...options, + ...params, + }) + } + + /** + * FIM completion + * + * Proxy a Fill-in-the-Middle completion request to the Kilo Gateway + */ + public fim( + parameters?: { + directory?: string + workspace?: string + prefix?: string + suffix?: string + provider?: string + model?: string + maxTokens?: number + temperature?: number + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "prefix" }, + { in: "body", key: "suffix" }, + { in: "body", key: "provider" }, + { in: "body", key: "model" }, + { in: "body", key: "maxTokens" }, + { in: "body", key: "temperature" }, + ], + }, + ], + ) + return (options?.client ?? this.client).sse.post({ + url: "/kilo/fim", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Next Edit completion + * + * Proxy a Mercury-style Next Edit request. The client supplies structured editor context; the gateway assembles the sentinel-tagged prompt and forwards to the upstream edit endpoint. + */ + public edit( + parameters?: { + directory?: string + workspace?: string + provider?: string + model?: string + maxTokens?: number + currentFilePath?: string + currentFileContent?: string + cursorLine?: number + cursorCharacter?: number + editableRegionStartLine?: number + editableRegionEndLine?: number + recentlyViewedSnippets?: Array<{ + filepath: string + content: string + }> + editDiffHistory?: Array + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "provider" }, + { in: "body", key: "model" }, + { in: "body", key: "maxTokens" }, + { in: "body", key: "currentFilePath" }, + { in: "body", key: "currentFileContent" }, + { in: "body", key: "cursorLine" }, + { in: "body", key: "cursorCharacter" }, + { in: "body", key: "editableRegionStartLine" }, + { in: "body", key: "editableRegionEndLine" }, + { in: "body", key: "recentlyViewedSnippets" }, + { in: "body", key: "editDiffHistory" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/kilo/edit", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Get Kilo notifications + * + * Fetch notifications from Kilo Gateway for CLI display + */ + public notifications( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/kilo/notifications", + ...options, + ...params, + }) + } + + /** + * Get cloud sessions + * + * Fetch cloud CLI sessions from Kilo API + */ + public cloudSessions( + parameters?: { + directory?: string + workspace?: string + cursor?: string + limit?: number + gitUrl?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "query", key: "cursor" }, + { in: "query", key: "limit" }, + { in: "query", key: "gitUrl" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/kilo/cloud-sessions", + ...options, + ...params, + }) + } + + private _audio?: Audio + get audio(): Audio { + return (this._audio ??= new Audio({ client: this.client })) + } + + private _models?: Models + get models(): Models { + return (this._models ??= new Models({ client: this.client })) + } + + private _organization?: Organization + get organization(): Organization { + return (this._organization ??= new Organization({ client: this.client })) + } + + private _claw?: Claw + get claw(): Claw { + return (this._claw ??= new Claw({ client: this.client })) + } + + private _cloud?: Cloud + get cloud(): Cloud { + return (this._cloud ??= new Cloud({ client: this.client })) + } } export class Heap extends HeyApiClient { - /** - * Write heap snapshot - * - * Write a heap snapshot for the CLI process to the log directory. - */ - public snapshot(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).post({ - url: '/kilocode/heap/snapshot', - ...options, - ...params - }); - } + /** + * Write heap snapshot + * + * Write a heap snapshot for the CLI process to the log directory. + */ + public snapshot( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + KilocodeHeapSnapshotResponses, + KilocodeHeapSnapshotErrors, + ThrowOnError + >({ + url: "/kilocode/heap/snapshot", + ...options, + ...params, + }) + } } export class Notebook extends HeyApiClient { - /** - * List pending notebook requests - * - * List pending native notebook requests for the routed workspace. - */ - public list(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/kilocode/notebook', - ...options, - ...params - }); - } - - /** - * Reply to a notebook request - * - * Complete a pending native notebook request with a structured result. - */ - public reply(parameters: { - requestID: NotebookRequestId; - directory?: string; - workspace?: string; - result?: NotebookResult; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'requestID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'result' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/kilocode/notebook/{requestID}/reply', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Reject a notebook request - * - * Complete a pending native notebook request with a structured host error. - */ - public reject(parameters: { - requestID: NotebookRequestId; - directory?: string; - workspace?: string; - error?: NotebookFailure; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'requestID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'error' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/kilocode/notebook/{requestID}/reject', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } + /** + * List pending notebook requests + * + * List pending native notebook requests for the routed workspace. + */ + public list( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get< + KilocodeNotebookListResponses, + KilocodeNotebookListErrors, + ThrowOnError + >({ + url: "/kilocode/notebook", + ...options, + ...params, + }) + } + + /** + * Reply to a notebook request + * + * Complete a pending native notebook request with a structured result. + */ + public reply( + parameters: { + requestID: NotebookRequestId + directory?: string + workspace?: string + result?: NotebookResult + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "requestID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "result" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + KilocodeNotebookReplyResponses, + KilocodeNotebookReplyErrors, + ThrowOnError + >({ + url: "/kilocode/notebook/{requestID}/reply", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Reject a notebook request + * + * Complete a pending native notebook request with a structured host error. + */ + public reject( + parameters: { + requestID: NotebookRequestId + directory?: string + workspace?: string + error?: NotebookFailure + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "requestID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "error" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + KilocodeNotebookRejectResponses, + KilocodeNotebookRejectErrors, + ThrowOnError + >({ + url: "/kilocode/notebook/{requestID}/reject", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } } export class AgentManager extends HeyApiClient { - /** - * List pending Agent Manager requests - * - * List pending native Agent Manager orchestration requests for the routed workspace. - */ - public list(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/kilocode/agent-manager', - ...options, - ...params - }); - } - - /** - * Reply to an Agent Manager request - * - * Complete a pending Agent Manager orchestration request with a structured result. - */ - public reply(parameters: { - requestID: AgentManagerRequestId; - directory?: string; - workspace?: string; - result?: AgentManagerResult; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'requestID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'result' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/kilocode/agent-manager/{requestID}/reply', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Reject an Agent Manager request - * - * Complete a pending Agent Manager orchestration request with a structured host error. - */ - public reject(parameters: { - requestID: AgentManagerRequestId; - directory?: string; - workspace?: string; - error?: AgentManagerFailure; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'requestID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'error' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/kilocode/agent-manager/{requestID}/reject', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } + /** + * List pending Agent Manager requests + * + * List pending native Agent Manager orchestration requests for the routed workspace. + */ + public list( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get< + KilocodeAgentManagerListResponses, + KilocodeAgentManagerListErrors, + ThrowOnError + >({ + url: "/kilocode/agent-manager", + ...options, + ...params, + }) + } + + /** + * Reply to an Agent Manager request + * + * Complete a pending Agent Manager orchestration request with a structured result. + */ + public reply( + parameters: { + requestID: AgentManagerRequestId + directory?: string + workspace?: string + result?: AgentManagerResult + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "requestID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "result" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + KilocodeAgentManagerReplyResponses, + KilocodeAgentManagerReplyErrors, + ThrowOnError + >({ + url: "/kilocode/agent-manager/{requestID}/reply", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Reject an Agent Manager request + * + * Complete a pending Agent Manager orchestration request with a structured host error. + */ + public reject( + parameters: { + requestID: AgentManagerRequestId + directory?: string + workspace?: string + error?: AgentManagerFailure + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "requestID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "error" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + KilocodeAgentManagerRejectResponses, + KilocodeAgentManagerRejectErrors, + ThrowOnError + >({ + url: "/kilocode/agent-manager/{requestID}/reject", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } } export class SessionImport extends HeyApiClient { - /** - * Insert project for session import - * - * Insert or update a project row used by legacy session import. - */ - public project(parameters?: { - directory?: string; - workspace?: string; - id?: string; - worktree?: string; - vcs?: string; - name?: string; - iconUrl?: string; - iconColor?: string; - timeCreated?: number; - timeUpdated?: number; - timeInitialized?: number; - sandboxes?: Array; - commands?: { - start?: string; - }; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'id' }, - { in: 'body', key: 'worktree' }, - { in: 'body', key: 'vcs' }, - { in: 'body', key: 'name' }, - { in: 'body', key: 'iconUrl' }, - { in: 'body', key: 'iconColor' }, - { in: 'body', key: 'timeCreated' }, - { in: 'body', key: 'timeUpdated' }, - { in: 'body', key: 'timeInitialized' }, - { in: 'body', key: 'sandboxes' }, - { in: 'body', key: 'commands' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/kilocode/session-import/project', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Insert session for session import - * - * Insert or update a session row used by legacy session import. - */ - public session(parameters?: { - query_directory?: string; - workspace?: string; - id?: string; - projectID?: string; - force?: boolean; - workspaceID?: string; - parentID?: string; - slug?: string; - body_directory?: string; - title?: string; - version?: string; - shareURL?: string; - summary?: { - additions: number; - deletions: number; - files: number; - diffs?: Array<{ - [key: string]: unknown; - }>; - }; - revert?: { - messageID: string; - partID?: string; - snapshot?: string; - diff?: string; - workspace?: 'restored' | 'snapshots-disabled' | 'unavailable'; - }; - permission?: { - [key: string]: unknown; - }; - timeCreated?: number; - timeUpdated?: number; - timeCompacting?: number; - timeArchived?: number; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { - in: 'query', - key: 'query_directory', - map: 'directory' - }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'id' }, - { in: 'body', key: 'projectID' }, - { in: 'body', key: 'force' }, - { in: 'body', key: 'workspaceID' }, - { in: 'body', key: 'parentID' }, - { in: 'body', key: 'slug' }, - { - in: 'body', - key: 'body_directory', - map: 'directory' - }, - { in: 'body', key: 'title' }, - { in: 'body', key: 'version' }, - { in: 'body', key: 'shareURL' }, - { in: 'body', key: 'summary' }, - { in: 'body', key: 'revert' }, - { in: 'body', key: 'permission' }, - { in: 'body', key: 'timeCreated' }, - { in: 'body', key: 'timeUpdated' }, - { in: 'body', key: 'timeCompacting' }, - { in: 'body', key: 'timeArchived' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/kilocode/session-import/session', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Insert message for session import - * - * Insert or update a message row used by legacy session import. - */ - public message(parameters?: { - directory?: string; - workspace?: string; - id?: string; - sessionID?: string; - timeCreated?: number; - data?: { - role: 'user'; + /** + * Insert project for session import + * + * Insert or update a project row used by legacy session import. + */ + public project( + parameters?: { + directory?: string + workspace?: string + id?: string + worktree?: string + vcs?: string + name?: string + iconUrl?: string + iconColor?: string + timeCreated?: number + timeUpdated?: number + timeInitialized?: number + sandboxes?: Array + commands?: { + start?: string + } + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "id" }, + { in: "body", key: "worktree" }, + { in: "body", key: "vcs" }, + { in: "body", key: "name" }, + { in: "body", key: "iconUrl" }, + { in: "body", key: "iconColor" }, + { in: "body", key: "timeCreated" }, + { in: "body", key: "timeUpdated" }, + { in: "body", key: "timeInitialized" }, + { in: "body", key: "sandboxes" }, + { in: "body", key: "commands" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + KilocodeSessionImportProjectResponses, + KilocodeSessionImportProjectErrors, + ThrowOnError + >({ + url: "/kilocode/session-import/project", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Insert session for session import + * + * Insert or update a session row used by legacy session import. + */ + public session( + parameters?: { + query_directory?: string + workspace?: string + id?: string + projectID?: string + force?: boolean + workspaceID?: string + parentID?: string + slug?: string + body_directory?: string + title?: string + version?: string + shareURL?: string + summary?: { + additions: number + deletions: number + files: number + diffs?: Array<{ + [key: string]: unknown + }> + } + revert?: { + messageID: string + partID?: string + snapshot?: string + diff?: string + workspace?: "restored" | "snapshots-disabled" | "unavailable" + } + permission?: { + [key: string]: unknown + } + timeCreated?: number + timeUpdated?: number + timeCompacting?: number + timeArchived?: number + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { + in: "query", + key: "query_directory", + map: "directory", + }, + { in: "query", key: "workspace" }, + { in: "body", key: "id" }, + { in: "body", key: "projectID" }, + { in: "body", key: "force" }, + { in: "body", key: "workspaceID" }, + { in: "body", key: "parentID" }, + { in: "body", key: "slug" }, + { + in: "body", + key: "body_directory", + map: "directory", + }, + { in: "body", key: "title" }, + { in: "body", key: "version" }, + { in: "body", key: "shareURL" }, + { in: "body", key: "summary" }, + { in: "body", key: "revert" }, + { in: "body", key: "permission" }, + { in: "body", key: "timeCreated" }, + { in: "body", key: "timeUpdated" }, + { in: "body", key: "timeCompacting" }, + { in: "body", key: "timeArchived" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + KilocodeSessionImportSessionResponses, + KilocodeSessionImportSessionErrors, + ThrowOnError + >({ + url: "/kilocode/session-import/session", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Insert message for session import + * + * Insert or update a message row used by legacy session import. + */ + public message( + parameters?: { + directory?: string + workspace?: string + id?: string + sessionID?: string + timeCreated?: number + data?: + | { + role: "user" time: { - created: number; - }; - agent: string; + created: number + } + agent: string model: { - providerID: string; - modelID: string; - }; + providerID: string + modelID: string + } tools?: { - [key: string]: boolean; - }; - } | { - role: 'assistant'; + [key: string]: boolean + } + } + | { + role: "assistant" time: { - created: number; - completed?: number; - }; - parentID: string; - modelID: string; - providerID: string; - mode: string; - agent: string; + created: number + completed?: number + } + parentID: string + modelID: string + providerID: string + mode: string + agent: string path: { - cwd: string; - root: string; - }; - summary?: boolean; - cost: number; + cwd: string + root: string + } + summary?: boolean + cost: number tokens: { - total?: number; - input: number; - output: number; - reasoning: number; - cache: { - read: number; - write: number; - }; - }; - structured?: unknown; - variant?: string; - finish?: string; - }; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'id' }, - { in: 'body', key: 'sessionID' }, - { in: 'body', key: 'timeCreated' }, - { in: 'body', key: 'data' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/kilocode/session-import/message', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers + total?: number + input: number + output: number + reasoning: number + cache: { + read: number + write: number + } } - }); - } - - /** - * Insert part for session import - * - * Insert or update a part row used by legacy session import. - */ - public part(parameters?: { - directory?: string; - workspace?: string; - id?: string; - messageID?: string; - sessionID?: string; - timeCreated?: number; - data?: { - type: 'text'; - text: string; - synthetic?: boolean; - ignored?: boolean; + structured?: unknown + variant?: string + finish?: string + } + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "id" }, + { in: "body", key: "sessionID" }, + { in: "body", key: "timeCreated" }, + { in: "body", key: "data" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + KilocodeSessionImportMessageResponses, + KilocodeSessionImportMessageErrors, + ThrowOnError + >({ + url: "/kilocode/session-import/message", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Insert part for session import + * + * Insert or update a part row used by legacy session import. + */ + public part( + parameters?: { + directory?: string + workspace?: string + id?: string + messageID?: string + sessionID?: string + timeCreated?: number + data?: + | { + type: "text" + text: string + synthetic?: boolean + ignored?: boolean time?: { - start: number; - end?: number; - }; - metadata?: { - [key: string]: unknown; - }; - } | { - type: 'reasoning'; - text: string; - metadata?: { - [key: string]: unknown; - }; - time: { - start: number; - end?: number; - }; - } | { - type: 'tool'; - callID: string; - tool: string; - state: { - status: 'pending'; - input: { - [key: string]: unknown; - }; - raw: string; - } | { - status: 'running'; - input: { - [key: string]: unknown; - }; - title?: string; - metadata?: { - [key: string]: unknown; - }; - time: { - start: number; - }; - } | { - status: 'completed'; - input: { - [key: string]: unknown; - }; - output: string; - title: string; - metadata: { - [key: string]: unknown; - }; - time: { - start: number; - end: number; - compacted?: number; - }; - } | { - status: 'error'; - input: { - [key: string]: unknown; - }; - error: string; - metadata?: { - [key: string]: unknown; - }; - time: { - start: number; - end: number; - }; - }; - metadata?: { - [key: string]: unknown; - }; - }; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'id' }, - { in: 'body', key: 'messageID' }, - { in: 'body', key: 'sessionID' }, - { in: 'body', key: 'timeCreated' }, - { in: 'body', key: 'data' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/kilocode/session-import/part', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers + start: number + end?: number } - }); - } + metadata?: { + [key: string]: unknown + } + } + | { + type: "reasoning" + text: string + metadata?: { + [key: string]: unknown + } + time: { + start: number + end?: number + } + } + | { + type: "tool" + callID: string + tool: string + state: + | { + status: "pending" + input: { + [key: string]: unknown + } + raw: string + } + | { + status: "running" + input: { + [key: string]: unknown + } + title?: string + metadata?: { + [key: string]: unknown + } + time: { + start: number + } + } + | { + status: "completed" + input: { + [key: string]: unknown + } + output: string + title: string + metadata: { + [key: string]: unknown + } + time: { + start: number + end: number + compacted?: number + } + } + | { + status: "error" + input: { + [key: string]: unknown + } + error: string + metadata?: { + [key: string]: unknown + } + time: { + start: number + end: number + } + } + metadata?: { + [key: string]: unknown + } + } + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "id" }, + { in: "body", key: "messageID" }, + { in: "body", key: "sessionID" }, + { in: "body", key: "timeCreated" }, + { in: "body", key: "data" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + KilocodeSessionImportPartResponses, + KilocodeSessionImportPartErrors, + ThrowOnError + >({ + url: "/kilocode/session-import/part", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } } export class Kilocode extends HeyApiClient { - /** - * Check agent requirements - * - * Check whether the selected agent's requirements are available in the request directory. - */ - public agentRequirements(parameters: { - directory?: string; - workspace?: string; - agent: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'query', key: 'agent' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/kilocode/agent/requirements', - ...options, - ...params - }); - } - - /** - * Remove a skill - * - * Remove a skill by deleting its manifest from disk and clearing it from cache. - */ - public removeSkill(parameters?: { - directory?: string; - workspace?: string; - location?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'location' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/kilocode/skill/remove', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Remove a custom agent - * - * Remove a custom (non-native) agent by deleting its markdown file from disk and refreshing state. - */ - public removeAgent(parameters?: { - directory?: string; - workspace?: string; - name?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'name' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/kilocode/agent/remove', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Get session model usage - * - * Get token usage and direct cost by model for the complete top-level session tree. - */ - public sessionModelUsage(parameters: { - sessionID: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/session/{sessionID}/model-usage', - ...options, - ...params - }); - } - - private _heap?: Heap; - get heap(): Heap { - return this._heap ??= new Heap({ client: this.client }); - } - - private _notebook?: Notebook; - get notebook(): Notebook { - return this._notebook ??= new Notebook({ client: this.client }); - } - - private _agentManager?: AgentManager; - get agentManager(): AgentManager { - return this._agentManager ??= new AgentManager({ client: this.client }); - } - - private _sessionImport?: SessionImport; - get sessionImport(): SessionImport { - return this._sessionImport ??= new SessionImport({ client: this.client }); - } + /** + * Check agent requirements + * + * Check whether the selected agent's requirements are available in the request directory. + */ + public agentRequirements( + parameters: { + directory?: string + workspace?: string + agent: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "query", key: "agent" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get< + KilocodeAgentRequirementsResponses, + KilocodeAgentRequirementsErrors, + ThrowOnError + >({ + url: "/kilocode/agent/requirements", + ...options, + ...params, + }) + } + + /** + * Remove a skill + * + * Remove a skill by deleting its manifest from disk and clearing it from cache. + */ + public removeSkill( + parameters?: { + directory?: string + workspace?: string + location?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "location" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post( + { + url: "/kilocode/skill/remove", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }, + ) + } + + /** + * Remove a custom agent + * + * Remove a custom (non-native) agent by deleting its markdown file from disk and refreshing state. + */ + public removeAgent( + parameters?: { + directory?: string + workspace?: string + name?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "name" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post( + { + url: "/kilocode/agent/remove", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }, + ) + } + + /** + * Get session model usage + * + * Get token usage and direct cost by model for the complete top-level session tree. + */ + public sessionModelUsage( + parameters: { + sessionID: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get< + KilocodeSessionModelUsageResponses, + KilocodeSessionModelUsageErrors, + ThrowOnError + >({ + url: "/session/{sessionID}/model-usage", + ...options, + ...params, + }) + } + + private _heap?: Heap + get heap(): Heap { + return (this._heap ??= new Heap({ client: this.client })) + } + + private _notebook?: Notebook + get notebook(): Notebook { + return (this._notebook ??= new Notebook({ client: this.client })) + } + + private _agentManager?: AgentManager + get agentManager(): AgentManager { + return (this._agentManager ??= new AgentManager({ client: this.client })) + } + + private _sessionImport?: SessionImport + get sessionImport(): SessionImport { + return (this._sessionImport ??= new SessionImport({ client: this.client })) + } } export class AnacondaDesktop extends HeyApiClient { - /** - * Get Anaconda Desktop setup status - * - * Discover the locally installed Anaconda Desktop and its active inference server. - */ - public status(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/kilocode/anaconda-desktop/status', - ...options, - ...params - }); - } - - /** - * Open Anaconda Desktop - * - * Open the locally installed Anaconda Desktop application. - */ - public open(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).post({ - url: '/kilocode/anaconda-desktop/open', - ...options, - ...params - }); - } - - /** - * Synchronize Anaconda Desktop provider - * - * Discover the active local inference server and replace Kilo provider authentication metadata. - */ - public sync(parameters?: { - directory?: string; - workspace?: string; - acknowledgeToolLimitations?: boolean; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'acknowledgeToolLimitations' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/kilocode/anaconda-desktop/sync', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } + /** + * Get Anaconda Desktop setup status + * + * Discover the locally installed Anaconda Desktop and its active inference server. + */ + public status( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get< + AnacondaDesktopStatusResponses, + AnacondaDesktopStatusErrors, + ThrowOnError + >({ + url: "/kilocode/anaconda-desktop/status", + ...options, + ...params, + }) + } + + /** + * Open Anaconda Desktop + * + * Open the locally installed Anaconda Desktop application. + */ + public open( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post( + { + url: "/kilocode/anaconda-desktop/open", + ...options, + ...params, + }, + ) + } + + /** + * Synchronize Anaconda Desktop provider + * + * Discover the active local inference server and replace Kilo provider authentication metadata. + */ + public sync( + parameters?: { + directory?: string + workspace?: string + acknowledgeToolLimitations?: boolean + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "acknowledgeToolLimitations" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post( + { + url: "/kilocode/anaconda-desktop/sync", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }, + ) + } } export class Network extends HeyApiClient { - /** - * List pending network waits - * - * Get all pending network reconnect requests across all sessions. - */ - public list(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/network', - ...options, - ...params - }); - } - - /** - * Resume after network wait - * - * Resume a pending session after reconnecting network-dependent services. - */ - public reply(parameters: { - requestID: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'requestID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/network/{requestID}/reply', - ...options, - ...params - }); - } - - /** - * Reject network resume request - * - * Stop a pending session instead of resuming after network reconnect. - */ - public reject(parameters: { - requestID: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'requestID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/network/{requestID}/reject', - ...options, - ...params - }); - } + /** + * List pending network waits + * + * Get all pending network reconnect requests across all sessions. + */ + public list( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/network", + ...options, + ...params, + }) + } + + /** + * Resume after network wait + * + * Resume a pending session after reconnecting network-dependent services. + */ + public reply( + parameters: { + requestID: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "requestID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/network/{requestID}/reply", + ...options, + ...params, + }) + } + + /** + * Reject network resume request + * + * Stop a pending session instead of resuming after network reconnect. + */ + public reject( + parameters: { + requestID: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "requestID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/network/{requestID}/reject", + ...options, + ...params, + }) + } } export class Remote extends HeyApiClient { - /** - * Enable remote connection - * - * Enable WebSocket connection to UserConnectionDO for real-time session relay and commands. - */ - public enable(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).post({ - url: '/remote/enable', - ...options, - ...params - }); - } - - /** - * Disable remote connection - * - * Close the remote WebSocket connection to UserConnectionDO. - */ - public disable(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).post({ - url: '/remote/disable', - ...options, - ...params - }); - } - - /** - * Get remote connection status - * - * Get the current state of the remote WebSocket connection. - */ - public status(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/remote/status', - ...options, - ...params - }); - } + /** + * Enable remote connection + * + * Enable WebSocket connection to UserConnectionDO for real-time session relay and commands. + */ + public enable( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/remote/enable", + ...options, + ...params, + }) + } + + /** + * Disable remote connection + * + * Close the remote WebSocket connection to UserConnectionDO. + */ + public disable( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/remote/disable", + ...options, + ...params, + }) + } + + /** + * Get remote connection status + * + * Get the current state of the remote WebSocket connection. + */ + public status( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/remote/status", + ...options, + ...params, + }) + } } export class Sandbox extends HeyApiClient { - /** - * Get sandbox backend support - * - * Get sandbox backend availability without creating a session. - */ - public support(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/sandbox/support', - ...options, - ...params - }); - } - - /** - * Get session sandbox status - * - * Get the effective sandbox state for one session. - */ - public status(parameters: { - sessionID: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/session/{sessionID}/sandbox', - ...options, - ...params - }); - } - - /** - * Toggle session sandbox - * - * Toggle and persist the sandbox state for one session. - */ - public toggle(parameters: { - sessionID: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/session/{sessionID}/sandbox/toggle', - ...options, - ...params - }); - } + /** + * Get sandbox backend support + * + * Get sandbox backend availability without creating a session. + */ + public support( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/sandbox/support", + ...options, + ...params, + }) + } + + /** + * Get session sandbox status + * + * Get the effective sandbox state for one session. + */ + public status( + parameters: { + sessionID: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/session/{sessionID}/sandbox", + ...options, + ...params, + }) + } + + /** + * Toggle session sandbox + * + * Toggle and persist the sandbox state for one session. + */ + public toggle( + parameters: { + sessionID: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/session/{sessionID}/sandbox/toggle", + ...options, + ...params, + }) + } } export class Suggestion extends HeyApiClient { - /** - * List pending suggestions - * - * Get all pending suggestion requests across all sessions. - */ - public list(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/suggestion', - ...options, - ...params - }); - } - - /** - * Accept suggestion request - * - * Accept a suggestion request from the AI assistant. - */ - public accept(parameters: { - requestID: string; - directory?: string; - workspace?: string; - index?: number; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'requestID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'index' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/suggestion/{requestID}/accept', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Dismiss suggestion request - * - * Dismiss a suggestion request from the AI assistant. - */ - public dismiss(parameters: { - requestID: string; - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'requestID' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/suggestion/{requestID}/dismiss', - ...options, - ...params - }); - } + /** + * List pending suggestions + * + * Get all pending suggestion requests across all sessions. + */ + public list( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/suggestion", + ...options, + ...params, + }) + } + + /** + * Accept suggestion request + * + * Accept a suggestion request from the AI assistant. + */ + public accept( + parameters: { + requestID: string + directory?: string + workspace?: string + index?: number + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "requestID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "index" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/suggestion/{requestID}/accept", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Dismiss suggestion request + * + * Dismiss a suggestion request from the AI assistant. + */ + public dismiss( + parameters: { + requestID: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "requestID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/suggestion/{requestID}/dismiss", + ...options, + ...params, + }) + } } export class Telemetry extends HeyApiClient { - /** - * Capture telemetry event - * - * Forward a telemetry event to PostHog via kilo-telemetry. - */ - public capture(parameters?: { - directory?: string; - workspace?: string; - event?: string; - properties?: { - [key: string]: unknown; - }; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'event' }, - { in: 'body', key: 'properties' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/telemetry/capture', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Set PostHog telemetry enabled state - * - * Update the PostHog client's opt-in/out state at runtime. The CLI reads KILO_TELEMETRY_LEVEL once at spawn — this route lets clients (e.g. the VS Code extension) propagate runtime telemetry consent changes. - */ - public setEnabled(parameters?: { - directory?: string; - workspace?: string; - enabled?: boolean; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'enabled' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/telemetry/setEnabled', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } + /** + * Capture telemetry event + * + * Forward a telemetry event to PostHog via kilo-telemetry. + */ + public capture( + parameters?: { + directory?: string + workspace?: string + event?: string + properties?: { + [key: string]: unknown + } + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "event" }, + { in: "body", key: "properties" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/telemetry/capture", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Set PostHog telemetry enabled state + * + * Update the PostHog client's opt-in/out state at runtime. The CLI reads KILO_TELEMETRY_LEVEL once at spawn — this route lets clients (e.g. the VS Code extension) propagate runtime telemetry consent changes. + */ + public setEnabled( + parameters?: { + directory?: string + workspace?: string + enabled?: boolean + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "enabled" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post( + { + url: "/telemetry/setEnabled", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }, + ) + } } export class Memory extends HeyApiClient { - /** - * Get memory status - * - * Return memory state, index preview, and token estimate for the active workspace. - */ - public status(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/memory/status', - ...options, - ...params - }); - } - - /** - * Show memory - * - * Return source memory files, generated index, recent decision summary, and memory save decisions. - */ - public show(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).get({ - url: '/memory/show', - ...options, - ...params - }); - } - - /** - * Enable memory - * - * Scaffold and enable project memory for the active workspace. - */ - public enable(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).post({ - url: '/memory/enable', - ...options, - ...params - }); - } - - /** - * Disable memory - * - * Disable project memory without deleting local memory files. - */ - public disable(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).post({ - url: '/memory/disable', - ...options, - ...params - }); - } - - /** - * Configure memory - * - * Update project memory settings such as automatic project fact capture. - */ - public configure(parameters?: { - directory?: string; - workspace?: string; - autoConsolidate?: boolean; - verbose?: boolean; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'autoConsolidate' }, - { in: 'body', key: 'verbose' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/memory/configure', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Rebuild memory index - * - * Regenerate index.kmem from source memory files. - */ - public rebuild(parameters?: { - directory?: string; - workspace?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'directory' }, { in: 'query', key: 'workspace' }] }]); - return (options?.client ?? this.client).post({ - url: '/memory/rebuild', - ...options, - ...params - }); - } - - /** - * Remember text - * - * Persist explicit user-provided memory text through the deterministic operation pipeline. - */ - public remember(parameters?: { - directory?: string; - workspace?: string; - text?: string; - key?: string; - file?: 'project.md' | 'environment.md' | 'corrections.md'; - section?: string; - sessionID?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'text' }, - { in: 'body', key: 'key' }, - { in: 'body', key: 'file' }, - { in: 'body', key: 'section' }, - { in: 'body', key: 'sessionID' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/memory/remember', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Remember correction - * - * Persist explicit corrective memory under corrections.md. - */ - public correct(parameters?: { - directory?: string; - workspace?: string; - text?: string; - key?: string; - sessionID?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'text' }, - { in: 'body', key: 'key' }, - { in: 'body', key: 'sessionID' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/memory/correct', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Forget memory - * - * Remove memory lines by exact key, id, or normalized key text and rebuild the index. - */ - public forget(parameters?: { - directory?: string; - workspace?: string; - query?: string; - sessionID?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'query' }, - { in: 'body', key: 'sessionID' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/memory/forget', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Purge memory - * - * Delete all project memory files for the active workspace. - */ - public purge(parameters?: { - directory?: string; - workspace?: string; - confirm?: true; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'directory' }, - { in: 'query', key: 'workspace' }, - { in: 'body', key: 'confirm' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/memory/purge', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } + /** + * Get memory status + * + * Return memory state, index preview, and token estimate for the active workspace. + */ + public status( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/memory/status", + ...options, + ...params, + }) + } + + /** + * Show memory + * + * Return source memory files, generated index, recent decision summary, and memory save decisions. + */ + public show( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/memory/show", + ...options, + ...params, + }) + } + + /** + * Enable memory + * + * Scaffold and enable project memory for the active workspace. + */ + public enable( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/memory/enable", + ...options, + ...params, + }) + } + + /** + * Disable memory + * + * Disable project memory without deleting local memory files. + */ + public disable( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/memory/disable", + ...options, + ...params, + }) + } + + /** + * Configure memory + * + * Update project memory settings such as automatic project fact capture. + */ + public configure( + parameters?: { + directory?: string + workspace?: string + autoConsolidate?: boolean + verbose?: boolean + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "autoConsolidate" }, + { in: "body", key: "verbose" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/memory/configure", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Rebuild memory index + * + * Regenerate index.kmem from source memory files. + */ + public rebuild( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/memory/rebuild", + ...options, + ...params, + }) + } + + /** + * Remember text + * + * Persist explicit user-provided memory text through the deterministic operation pipeline. + */ + public remember( + parameters?: { + directory?: string + workspace?: string + text?: string + key?: string + file?: "project.md" | "environment.md" | "corrections.md" + section?: string + sessionID?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "text" }, + { in: "body", key: "key" }, + { in: "body", key: "file" }, + { in: "body", key: "section" }, + { in: "body", key: "sessionID" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/memory/remember", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Remember correction + * + * Persist explicit corrective memory under corrections.md. + */ + public correct( + parameters?: { + directory?: string + workspace?: string + text?: string + key?: string + sessionID?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "text" }, + { in: "body", key: "key" }, + { in: "body", key: "sessionID" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/memory/correct", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Forget memory + * + * Remove memory lines by exact key, id, or normalized key text and rebuild the index. + */ + public forget( + parameters?: { + directory?: string + workspace?: string + query?: string + sessionID?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "query" }, + { in: "body", key: "sessionID" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/memory/forget", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Purge memory + * + * Delete all project memory files for the active workspace. + */ + public purge( + parameters?: { + directory?: string + workspace?: string + confirm?: true + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "confirm" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/memory/purge", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } } export class Health extends HeyApiClient { - /** - * Check server health - * - * Check whether the API server is ready to accept requests. - */ - public get(options?: Options) { - return (options?.client ?? this.client).get({ url: '/api/health', ...options }); - } + /** + * Check server health + * + * Check whether the API server is ready to accept requests. + */ + public get(options?: Options) { + return (options?.client ?? this.client).get({ + url: "/api/health", + ...options, + }) + } } export class Location extends HeyApiClient { - /** - * Get location - * - * Resolve the requested location or the server default location. - */ - public get(parameters?: { - location?: { - directory?: string; - workspace?: string; - }; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'location' }] }]); - return (options?.client ?? this.client).get({ - url: '/api/location', - ...options, - ...params - }); - } + /** + * Get location + * + * Resolve the requested location or the server default location. + */ + public get( + parameters?: { + location?: { + directory?: string + workspace?: string + } + }, + options?: Options, + ) { + const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]) + return (options?.client ?? this.client).get({ + url: "/api/location", + ...options, + ...params, + }) + } } export class Agent extends HeyApiClient { - /** - * List agents - * - * Retrieve currently registered agents. - */ - public list(parameters?: { - location?: { - directory?: string; - workspace?: string; - }; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'location' }] }]); - return (options?.client ?? this.client).get({ - url: '/api/agent', - ...options, - ...params - }); - } + /** + * List agents + * + * Retrieve currently registered agents. + */ + public list( + parameters?: { + location?: { + directory?: string + workspace?: string + } + }, + options?: Options, + ) { + const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]) + return (options?.client ?? this.client).get({ + url: "/api/agent", + ...options, + ...params, + }) + } } export class Revert extends HeyApiClient { - /** - * Stage session revert - * - * Stage or move a reversible session boundary and optionally apply its file changes. - */ - public stage(parameters: { - sessionID: string; - messageID?: string; - files?: boolean; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'body', key: 'messageID' }, - { in: 'body', key: 'files' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/api/session/{sessionID}/revert/stage', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Clear staged revert - */ - public clear(parameters: { - sessionID: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'sessionID' }] }]); - return (options?.client ?? this.client).post({ - url: '/api/session/{sessionID}/revert/clear', - ...options, - ...params - }); - } - - /** - * Commit staged revert - */ - public commit(parameters: { - sessionID: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'sessionID' }] }]); - return (options?.client ?? this.client).post({ - url: '/api/session/{sessionID}/revert/commit', - ...options, - ...params - }); - } + /** + * Stage session revert + * + * Stage or move a reversible session boundary and optionally apply its file changes. + */ + public stage( + parameters: { + sessionID: string + messageID?: string + files?: boolean + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "body", key: "messageID" }, + { in: "body", key: "files" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + V2SessionRevertStageResponses, + V2SessionRevertStageErrors, + ThrowOnError + >({ + url: "/api/session/{sessionID}/revert/stage", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Clear staged revert + */ + public clear( + parameters: { + sessionID: string + }, + options?: Options, + ) { + const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]) + return (options?.client ?? this.client).post< + V2SessionRevertClearResponses, + V2SessionRevertClearErrors, + ThrowOnError + >({ + url: "/api/session/{sessionID}/revert/clear", + ...options, + ...params, + }) + } + + /** + * Commit staged revert + */ + public commit( + parameters: { + sessionID: string + }, + options?: Options, + ) { + const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]) + return (options?.client ?? this.client).post< + V2SessionRevertCommitResponses, + V2SessionRevertCommitErrors, + ThrowOnError + >({ + url: "/api/session/{sessionID}/revert/commit", + ...options, + ...params, + }) + } } export class Permission2 extends HeyApiClient { - /** - * List session permission requests - * - * Retrieve pending permission requests owned by a session. - */ - public list(parameters: { - sessionID: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'sessionID' }] }]); - return (options?.client ?? this.client).get({ - url: '/api/session/{sessionID}/permission', - ...options, - ...params - }); - } - - /** - * Create permission request - * - * Evaluate and, when approval is required, create a permission request for a session. - */ - public create(parameters: { - sessionID: string; - id?: string; - action?: string; - resources?: Array; - save?: Array; - metadata?: { - [key: string]: unknown; - }; - source?: PermissionV2Source; - agent?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'body', key: 'id' }, - { in: 'body', key: 'action' }, - { in: 'body', key: 'resources' }, - { in: 'body', key: 'save' }, - { in: 'body', key: 'metadata' }, - { in: 'body', key: 'source' }, - { in: 'body', key: 'agent' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/api/session/{sessionID}/permission', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Get permission request - * - * Retrieve a pending permission request owned by a session. - */ - public get(parameters: { - sessionID: string; - requestID: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'sessionID' }, { in: 'path', key: 'requestID' }] }]); - return (options?.client ?? this.client).get({ - url: '/api/session/{sessionID}/permission/{requestID}', - ...options, - ...params - }); - } - - /** - * Reply to pending permission request - * - * Respond to a pending permission request owned by a session. - */ - public reply(parameters: { - sessionID: string; - requestID: string; - reply?: PermissionV2Reply; - message?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'path', key: 'requestID' }, - { in: 'body', key: 'reply' }, - { in: 'body', key: 'message' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/api/session/{sessionID}/permission/{requestID}/reply', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } + /** + * List session permission requests + * + * Retrieve pending permission requests owned by a session. + */ + public list( + parameters: { + sessionID: string + }, + options?: Options, + ) { + const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]) + return (options?.client ?? this.client).get< + V2SessionPermissionListResponses, + V2SessionPermissionListErrors, + ThrowOnError + >({ + url: "/api/session/{sessionID}/permission", + ...options, + ...params, + }) + } + + /** + * Create permission request + * + * Evaluate and, when approval is required, create a permission request for a session. + */ + public create( + parameters: { + sessionID: string + id?: string + action?: string + resources?: Array + save?: Array + metadata?: { + [key: string]: unknown + } + source?: PermissionV2Source + agent?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "body", key: "id" }, + { in: "body", key: "action" }, + { in: "body", key: "resources" }, + { in: "body", key: "save" }, + { in: "body", key: "metadata" }, + { in: "body", key: "source" }, + { in: "body", key: "agent" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + V2SessionPermissionCreateResponses, + V2SessionPermissionCreateErrors, + ThrowOnError + >({ + url: "/api/session/{sessionID}/permission", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Get permission request + * + * Retrieve a pending permission request owned by a session. + */ + public get( + parameters: { + sessionID: string + requestID: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "path", key: "requestID" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get< + V2SessionPermissionGetResponses, + V2SessionPermissionGetErrors, + ThrowOnError + >({ + url: "/api/session/{sessionID}/permission/{requestID}", + ...options, + ...params, + }) + } + + /** + * Reply to pending permission request + * + * Respond to a pending permission request owned by a session. + */ + public reply( + parameters: { + sessionID: string + requestID: string + reply?: PermissionV2Reply + message?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "path", key: "requestID" }, + { in: "body", key: "reply" }, + { in: "body", key: "message" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + V2SessionPermissionReplyResponses, + V2SessionPermissionReplyErrors, + ThrowOnError + >({ + url: "/api/session/{sessionID}/permission/{requestID}/reply", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } } export class Question2 extends HeyApiClient { - /** - * List session question requests - * - * Retrieve pending question requests owned by a session. - */ - public list(parameters: { - sessionID: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'sessionID' }] }]); - return (options?.client ?? this.client).get({ - url: '/api/session/{sessionID}/question', - ...options, - ...params - }); - } - - /** - * Reply to pending question request - * - * Answer a pending question request owned by a session. - */ - public reply(parameters: { - sessionID: string; - requestID: string; - questionV2Reply: QuestionV2Reply; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'path', key: 'requestID' }, - { key: 'questionV2Reply', map: 'body' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/api/session/{sessionID}/question/{requestID}/reply', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Reject pending question request - * - * Reject a pending question request owned by a session. - */ - public reject(parameters: { - sessionID: string; - requestID: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'sessionID' }, { in: 'path', key: 'requestID' }] }]); - return (options?.client ?? this.client).post({ - url: '/api/session/{sessionID}/question/{requestID}/reject', - ...options, - ...params - }); - } + /** + * List session question requests + * + * Retrieve pending question requests owned by a session. + */ + public list( + parameters: { + sessionID: string + }, + options?: Options, + ) { + const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]) + return (options?.client ?? this.client).get< + V2SessionQuestionListResponses, + V2SessionQuestionListErrors, + ThrowOnError + >({ + url: "/api/session/{sessionID}/question", + ...options, + ...params, + }) + } + + /** + * Reply to pending question request + * + * Answer a pending question request owned by a session. + */ + public reply( + parameters: { + sessionID: string + requestID: string + questionV2Reply: QuestionV2Reply + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "path", key: "requestID" }, + { key: "questionV2Reply", map: "body" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + V2SessionQuestionReplyResponses, + V2SessionQuestionReplyErrors, + ThrowOnError + >({ + url: "/api/session/{sessionID}/question/{requestID}/reply", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Reject pending question request + * + * Reject a pending question request owned by a session. + */ + public reject( + parameters: { + sessionID: string + requestID: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "path", key: "requestID" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + V2SessionQuestionRejectResponses, + V2SessionQuestionRejectErrors, + ThrowOnError + >({ + url: "/api/session/{sessionID}/question/{requestID}/reject", + ...options, + ...params, + }) + } } export class Session4 extends HeyApiClient { - /** - * List sessions - * - * Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list. - */ - public list(parameters?: { - workspace?: string; - limit?: number; - order?: 'asc' | 'desc'; - search?: string; - directory?: string; - project?: string; - subpath?: string; - cursor?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'workspace' }, - { in: 'query', key: 'limit' }, - { in: 'query', key: 'order' }, - { in: 'query', key: 'search' }, - { in: 'query', key: 'directory' }, - { in: 'query', key: 'project' }, - { in: 'query', key: 'subpath' }, - { in: 'query', key: 'cursor' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/api/session', - ...options, - ...params - }); - } - - /** - * Create session - * - * Create a session at the requested location. - */ - public create(parameters?: { - id?: string; - agent?: string; - model?: ModelRef; - location?: LocationRef; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'body', key: 'id' }, - { in: 'body', key: 'agent' }, - { in: 'body', key: 'model' }, - { in: 'body', key: 'location' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/api/session', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * List active sessions - * - * Retrieve foreground Session drains currently owned by this Kilo process. Sessions absent from the result are inactive. - */ - public active(options?: Options) { - return (options?.client ?? this.client).get({ url: '/api/session/active', ...options }); - } - - /** - * Get session - * - * Retrieve a session by ID. - */ - public get(parameters: { - sessionID: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'sessionID' }] }]); - return (options?.client ?? this.client).get({ - url: '/api/session/{sessionID}', - ...options, - ...params - }); - } - - /** - * Switch session agent - * - * Switch the agent used by subsequent provider turns. - */ - public switchAgent(parameters: { - sessionID: string; - agent?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'sessionID' }, { in: 'body', key: 'agent' }] }]); - return (options?.client ?? this.client).post({ - url: '/api/session/{sessionID}/agent', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Switch session model - * - * Switch the model used by subsequent provider turns. - */ - public switchModel(parameters: { - sessionID: string; - model?: ModelRef; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'sessionID' }, { in: 'body', key: 'model' }] }]); - return (options?.client ?? this.client).post({ - url: '/api/session/{sessionID}/model', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Send message - * - * Durably admit one session input and schedule agent-loop execution unless resume is false. - */ - public prompt(parameters: { - sessionID: string; - id?: string; - prompt?: PromptInput; - delivery?: 'steer' | 'queue'; - resume?: boolean; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'body', key: 'id' }, - { in: 'body', key: 'prompt' }, - { in: 'body', key: 'delivery' }, - { in: 'body', key: 'resume' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/api/session/{sessionID}/prompt', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Compact session - * - * Compact a session conversation. - */ - public compact(parameters: { - sessionID: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'sessionID' }] }]); - return (options?.client ?? this.client).post({ - url: '/api/session/{sessionID}/compact', - ...options, - ...params - }); - } - - /** - * Wait for session - * - * Wait for a session agent loop to become idle. - */ - public wait(parameters: { - sessionID: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'sessionID' }] }]); - return (options?.client ?? this.client).post({ - url: '/api/session/{sessionID}/wait', - ...options, - ...params - }); - } - - /** - * Get session context - * - * Retrieve the active context messages for a session (all messages after the last compaction). - */ - public context(parameters: { - sessionID: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'sessionID' }] }]); - return (options?.client ?? this.client).get({ - url: '/api/session/{sessionID}/context', - ...options, - ...params - }); - } - - /** - * Get session history - * - * Read one finite page of public durable Session events after an exclusive aggregate sequence. Newly committed events may appear on later pages. - */ - public history(parameters: { - sessionID: string; - limit?: string; - after?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'query', key: 'limit' }, - { in: 'query', key: 'after' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/api/session/{sessionID}/history', - ...options, - ...params - }); - } - - /** - * Subscribe to session events - * - * Replay durable events after an aggregate sequence, then continue with new durable events. - */ - public events(parameters: { - sessionID: string; - after?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'sessionID' }, { in: 'query', key: 'after' }] }]); - return (options?.client ?? this.client).sse.get({ - url: '/api/session/{sessionID}/event', - ...options, - ...params - }); - } - - /** - * Interrupt session execution - * - * Interrupt active execution owned by this Kilo process. Idle interruption is a no-op. - */ - public interrupt(parameters: { - sessionID: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'sessionID' }] }]); - return (options?.client ?? this.client).post({ - url: '/api/session/{sessionID}/interrupt', - ...options, - ...params - }); - } - - /** - * Get session message - * - * Retrieve one projected message owned by the Session. - */ - public message(parameters: { - sessionID: string; - messageID: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'sessionID' }, { in: 'path', key: 'messageID' }] }]); - return (options?.client ?? this.client).get({ - url: '/api/session/{sessionID}/message/{messageID}', - ...options, - ...params - }); - } - - /** - * Get session messages - * - * Retrieve projected messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline. - */ - public messages(parameters: { - sessionID: string; - limit?: number; - order?: 'asc' | 'desc'; - cursor?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'sessionID' }, - { in: 'query', key: 'limit' }, - { in: 'query', key: 'order' }, - { in: 'query', key: 'cursor' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/api/session/{sessionID}/message', - ...options, - ...params - }); - } - - private _revert?: Revert; - get revert(): Revert { - return this._revert ??= new Revert({ client: this.client }); - } - - private _permission?: Permission2; - get permission(): Permission2 { - return this._permission ??= new Permission2({ client: this.client }); - } - - private _question?: Question2; - get question(): Question2 { - return this._question ??= new Question2({ client: this.client }); - } + /** + * List sessions + * + * Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list. + */ + public list( + parameters?: { + workspace?: string + limit?: number + order?: "asc" | "desc" + search?: string + directory?: string + project?: string + subpath?: string + cursor?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "workspace" }, + { in: "query", key: "limit" }, + { in: "query", key: "order" }, + { in: "query", key: "search" }, + { in: "query", key: "directory" }, + { in: "query", key: "project" }, + { in: "query", key: "subpath" }, + { in: "query", key: "cursor" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/api/session", + ...options, + ...params, + }) + } + + /** + * Create session + * + * Create a session at the requested location. + */ + public create( + parameters?: { + id?: string + agent?: string + model?: ModelRef + location?: LocationRef + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "body", key: "id" }, + { in: "body", key: "agent" }, + { in: "body", key: "model" }, + { in: "body", key: "location" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/api/session", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * List active sessions + * + * Retrieve foreground Session drains currently owned by this Kilo process. Sessions absent from the result are inactive. + */ + public active(options?: Options) { + return (options?.client ?? this.client).get({ + url: "/api/session/active", + ...options, + }) + } + + /** + * Get session + * + * Retrieve a session by ID. + */ + public get( + parameters: { + sessionID: string + }, + options?: Options, + ) { + const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]) + return (options?.client ?? this.client).get({ + url: "/api/session/{sessionID}", + ...options, + ...params, + }) + } + + /** + * Switch session agent + * + * Switch the agent used by subsequent provider turns. + */ + public switchAgent( + parameters: { + sessionID: string + agent?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "body", key: "agent" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + V2SessionSwitchAgentResponses, + V2SessionSwitchAgentErrors, + ThrowOnError + >({ + url: "/api/session/{sessionID}/agent", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Switch session model + * + * Switch the model used by subsequent provider turns. + */ + public switchModel( + parameters: { + sessionID: string + model?: ModelRef + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "body", key: "model" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + V2SessionSwitchModelResponses, + V2SessionSwitchModelErrors, + ThrowOnError + >({ + url: "/api/session/{sessionID}/model", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Send message + * + * Durably admit one session input and schedule agent-loop execution unless resume is false. + */ + public prompt( + parameters: { + sessionID: string + id?: string + prompt?: PromptInput + delivery?: "steer" | "queue" + resume?: boolean + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "body", key: "id" }, + { in: "body", key: "prompt" }, + { in: "body", key: "delivery" }, + { in: "body", key: "resume" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/api/session/{sessionID}/prompt", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Compact session + * + * Compact a session conversation. + */ + public compact( + parameters: { + sessionID: string + }, + options?: Options, + ) { + const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]) + return (options?.client ?? this.client).post({ + url: "/api/session/{sessionID}/compact", + ...options, + ...params, + }) + } + + /** + * Wait for session + * + * Wait for a session agent loop to become idle. + */ + public wait( + parameters: { + sessionID: string + }, + options?: Options, + ) { + const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]) + return (options?.client ?? this.client).post({ + url: "/api/session/{sessionID}/wait", + ...options, + ...params, + }) + } + + /** + * Get session context + * + * Retrieve the active context messages for a session (all messages after the last compaction). + */ + public context( + parameters: { + sessionID: string + }, + options?: Options, + ) { + const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]) + return (options?.client ?? this.client).get({ + url: "/api/session/{sessionID}/context", + ...options, + ...params, + }) + } + + /** + * Get session history + * + * Read one finite page of public durable Session events after an exclusive aggregate sequence. Newly committed events may appear on later pages. + */ + public history( + parameters: { + sessionID: string + limit?: number + after?: number + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "query", key: "limit" }, + { in: "query", key: "after" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/api/session/{sessionID}/history", + ...options, + ...params, + }) + } + + /** + * Subscribe to session events + * + * Replay durable events after an aggregate sequence, then continue with new durable events. + */ + public events( + parameters: { + sessionID: string + after?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "query", key: "after" }, + ], + }, + ], + ) + return (options?.client ?? this.client).sse.get({ + url: "/api/session/{sessionID}/event", + ...options, + ...params, + }) + } + + /** + * Interrupt session execution + * + * Interrupt active execution owned by this Kilo process. Idle interruption is a no-op. + */ + public interrupt( + parameters: { + sessionID: string + }, + options?: Options, + ) { + const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]) + return (options?.client ?? this.client).post({ + url: "/api/session/{sessionID}/interrupt", + ...options, + ...params, + }) + } + + /** + * Get session message + * + * Retrieve one projected message owned by the Session. + */ + public message( + parameters: { + sessionID: string + messageID: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "path", key: "messageID" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/api/session/{sessionID}/message/{messageID}", + ...options, + ...params, + }) + } + + /** + * Get session messages + * + * Retrieve projected messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline. + */ + public messages( + parameters: { + sessionID: string + limit?: number + order?: "asc" | "desc" + cursor?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "sessionID" }, + { in: "query", key: "limit" }, + { in: "query", key: "order" }, + { in: "query", key: "cursor" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/api/session/{sessionID}/message", + ...options, + ...params, + }) + } + + private _revert?: Revert + get revert(): Revert { + return (this._revert ??= new Revert({ client: this.client })) + } + + private _permission?: Permission2 + get permission(): Permission2 { + return (this._permission ??= new Permission2({ client: this.client })) + } + + private _question?: Question2 + get question(): Question2 { + return (this._question ??= new Question2({ client: this.client })) + } } export class Model extends HeyApiClient { - /** - * List models - * - * Retrieve available models ordered by release date. - */ - public list(parameters?: { - location?: { - directory?: string; - workspace?: string; - }; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'location' }] }]); - return (options?.client ?? this.client).get({ - url: '/api/model', - ...options, - ...params - }); - } + /** + * List models + * + * Retrieve available models ordered by release date. + */ + public list( + parameters?: { + location?: { + directory?: string + workspace?: string + } + }, + options?: Options, + ) { + const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]) + return (options?.client ?? this.client).get({ + url: "/api/model", + ...options, + ...params, + }) + } } export class Provider2 extends HeyApiClient { - /** - * List providers - * - * Retrieve active AI providers so clients can show provider availability and configuration. - */ - public list(parameters?: { - location?: { - directory?: string; - workspace?: string; - }; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'location' }] }]); - return (options?.client ?? this.client).get({ - url: '/api/provider', - ...options, - ...params - }); - } - - /** - * Get provider - * - * Retrieve a single AI provider so clients can inspect its availability and endpoint settings. - */ - public get(parameters: { - providerID: string; - location?: { - directory?: string; - workspace?: string; - }; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'providerID' }, { in: 'query', key: 'location' }] }]); - return (options?.client ?? this.client).get({ - url: '/api/provider/{providerID}', - ...options, - ...params - }); - } + /** + * List providers + * + * Retrieve active AI providers so clients can show provider availability and configuration. + */ + public list( + parameters?: { + location?: { + directory?: string + workspace?: string + } + }, + options?: Options, + ) { + const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]) + return (options?.client ?? this.client).get({ + url: "/api/provider", + ...options, + ...params, + }) + } + + /** + * Get provider + * + * Retrieve a single AI provider so clients can inspect its availability and endpoint settings. + */ + public get( + parameters: { + providerID: string + location?: { + directory?: string + workspace?: string + } + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "providerID" }, + { in: "query", key: "location" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/api/provider/{providerID}", + ...options, + ...params, + }) + } } export class Connect extends HeyApiClient { - /** - * Connect with key - * - * Run a key authentication method and store the resulting credential. - */ - public key(parameters: { - integrationID: string; - location?: { - directory?: string; - workspace?: string; - }; - key?: string; - label?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'integrationID' }, - { in: 'query', key: 'location' }, - { in: 'body', key: 'key' }, - { in: 'body', key: 'label' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/api/integration/{integrationID}/connect/key', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Begin OAuth connection - * - * Start an OAuth attempt and return the authorization details. - */ - public oauth(parameters: { - integrationID: string; - location?: { - directory?: string; - workspace?: string; - }; - methodID?: string; - inputs?: { - [key: string]: string; - }; - label?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'integrationID' }, - { in: 'query', key: 'location' }, - { in: 'body', key: 'methodID' }, - { in: 'body', key: 'inputs' }, - { in: 'body', key: 'label' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/api/integration/{integrationID}/connect/oauth', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } + /** + * Connect with key + * + * Run a key authentication method and store the resulting credential. + */ + public key( + parameters: { + integrationID: string + location?: { + directory?: string + workspace?: string + } + key?: string + label?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "integrationID" }, + { in: "query", key: "location" }, + { in: "body", key: "key" }, + { in: "body", key: "label" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + V2IntegrationConnectKeyResponses, + V2IntegrationConnectKeyErrors, + ThrowOnError + >({ + url: "/api/integration/{integrationID}/connect/key", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Begin OAuth connection + * + * Start an OAuth attempt and return the authorization details. + */ + public oauth( + parameters: { + integrationID: string + location?: { + directory?: string + workspace?: string + } + methodID?: string + inputs?: { + [key: string]: string + } + label?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "integrationID" }, + { in: "query", key: "location" }, + { in: "body", key: "methodID" }, + { in: "body", key: "inputs" }, + { in: "body", key: "label" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + V2IntegrationConnectOauthResponses, + V2IntegrationConnectOauthErrors, + ThrowOnError + >({ + url: "/api/integration/{integrationID}/connect/oauth", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } } export class Attempt extends HeyApiClient { - /** - * Cancel OAuth connection - * - * Cancel an OAuth attempt and release its resources. - */ - public cancel(parameters: { - attemptID: string; - location?: { - directory?: string; - workspace?: string; - }; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'attemptID' }, { in: 'query', key: 'location' }] }]); - return (options?.client ?? this.client).delete({ - url: '/api/integration/attempt/{attemptID}', - ...options, - ...params - }); - } - - /** - * Get OAuth attempt status - * - * Poll the current status of an OAuth attempt. - */ - public status(parameters: { - attemptID: string; - location?: { - directory?: string; - workspace?: string; - }; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'attemptID' }, { in: 'query', key: 'location' }] }]); - return (options?.client ?? this.client).get({ - url: '/api/integration/attempt/{attemptID}', - ...options, - ...params - }); - } - - /** - * Complete OAuth connection - * - * Complete a code-based OAuth attempt and store the resulting credential. - */ - public complete(parameters: { - attemptID: string; - location?: { - directory?: string; - workspace?: string; - }; - code?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'attemptID' }, - { in: 'query', key: 'location' }, - { in: 'body', key: 'code' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/api/integration/attempt/{attemptID}/complete', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } + /** + * Cancel OAuth connection + * + * Cancel an OAuth attempt and release its resources. + */ + public cancel( + parameters: { + attemptID: string + location?: { + directory?: string + workspace?: string + } + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "attemptID" }, + { in: "query", key: "location" }, + ], + }, + ], + ) + return (options?.client ?? this.client).delete< + V2IntegrationAttemptCancelResponses, + V2IntegrationAttemptCancelErrors, + ThrowOnError + >({ + url: "/api/integration/attempt/{attemptID}", + ...options, + ...params, + }) + } + + /** + * Get OAuth attempt status + * + * Poll the current status of an OAuth attempt. + */ + public status( + parameters: { + attemptID: string + location?: { + directory?: string + workspace?: string + } + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "attemptID" }, + { in: "query", key: "location" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get< + V2IntegrationAttemptStatusResponses, + V2IntegrationAttemptStatusErrors, + ThrowOnError + >({ + url: "/api/integration/attempt/{attemptID}", + ...options, + ...params, + }) + } + + /** + * Complete OAuth connection + * + * Complete a code-based OAuth attempt and store the resulting credential. + */ + public complete( + parameters: { + attemptID: string + location?: { + directory?: string + workspace?: string + } + code?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "attemptID" }, + { in: "query", key: "location" }, + { in: "body", key: "code" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + V2IntegrationAttemptCompleteResponses, + V2IntegrationAttemptCompleteErrors, + ThrowOnError + >({ + url: "/api/integration/attempt/{attemptID}/complete", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } } export class Integration extends HeyApiClient { - /** - * List integrations - * - * Retrieve available integrations and their authentication methods. - */ - public list(parameters?: { - location?: { - directory?: string; - workspace?: string; - }; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'location' }] }]); - return (options?.client ?? this.client).get({ - url: '/api/integration', - ...options, - ...params - }); - } - - /** - * Get integration - * - * Retrieve one integration and its authentication methods. - */ - public get(parameters: { - integrationID: string; - location?: { - directory?: string; - workspace?: string; - }; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'integrationID' }, { in: 'query', key: 'location' }] }]); - return (options?.client ?? this.client).get({ - url: '/api/integration/{integrationID}', - ...options, - ...params - }); - } - - private _connect?: Connect; - get connect(): Connect { - return this._connect ??= new Connect({ client: this.client }); - } - - private _attempt?: Attempt; - get attempt(): Attempt { - return this._attempt ??= new Attempt({ client: this.client }); - } + /** + * List integrations + * + * Retrieve available integrations and their authentication methods. + */ + public list( + parameters?: { + location?: { + directory?: string + workspace?: string + } + }, + options?: Options, + ) { + const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]) + return (options?.client ?? this.client).get({ + url: "/api/integration", + ...options, + ...params, + }) + } + + /** + * Get integration + * + * Retrieve one integration and its authentication methods. + */ + public get( + parameters: { + integrationID: string + location?: { + directory?: string + workspace?: string + } + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "integrationID" }, + { in: "query", key: "location" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/api/integration/{integrationID}", + ...options, + ...params, + }) + } + + private _connect?: Connect + get connect(): Connect { + return (this._connect ??= new Connect({ client: this.client })) + } + + private _attempt?: Attempt + get attempt(): Attempt { + return (this._attempt ??= new Attempt({ client: this.client })) + } } export class Credential extends HeyApiClient { - /** - * Remove credential - * - * Remove a stored integration credential. - */ - public remove(parameters: { - credentialID: string; - location?: { - directory?: string; - workspace?: string; - }; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'credentialID' }, { in: 'query', key: 'location' }] }]); - return (options?.client ?? this.client).delete({ - url: '/api/credential/{credentialID}', - ...options, - ...params - }); - } - - /** - * Update credential - * - * Update a stored credential label. - */ - public update(parameters: { - credentialID: string; - location?: { - directory?: string; - workspace?: string; - }; - label?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'credentialID' }, - { in: 'query', key: 'location' }, - { in: 'body', key: 'label' } - ] }]); - return (options?.client ?? this.client).patch({ - url: '/api/credential/{credentialID}', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } + /** + * Remove credential + * + * Remove a stored integration credential. + */ + public remove( + parameters: { + credentialID: string + location?: { + directory?: string + workspace?: string + } + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "credentialID" }, + { in: "query", key: "location" }, + ], + }, + ], + ) + return (options?.client ?? this.client).delete( + { + url: "/api/credential/{credentialID}", + ...options, + ...params, + }, + ) + } + + /** + * Update credential + * + * Update a stored credential label. + */ + public update( + parameters: { + credentialID: string + location?: { + directory?: string + workspace?: string + } + label?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "credentialID" }, + { in: "query", key: "location" }, + { in: "body", key: "label" }, + ], + }, + ], + ) + return (options?.client ?? this.client).patch({ + url: "/api/credential/{credentialID}", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } } export class Request extends HeyApiClient { - /** - * List pending permission requests - * - * Retrieve pending permission requests for a location. - */ - public list(parameters?: { - location?: { - directory?: string; - workspace?: string; - }; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'location' }] }]); - return (options?.client ?? this.client).get({ - url: '/api/permission/request', - ...options, - ...params - }); - } + /** + * List pending permission requests + * + * Retrieve pending permission requests for a location. + */ + public list( + parameters?: { + location?: { + directory?: string + workspace?: string + } + }, + options?: Options, + ) { + const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]) + return (options?.client ?? this.client).get< + V2PermissionRequestListResponses, + V2PermissionRequestListErrors, + ThrowOnError + >({ + url: "/api/permission/request", + ...options, + ...params, + }) + } } export class Saved extends HeyApiClient { - /** - * List saved permissions - * - * Retrieve saved permissions, optionally filtered by project. - */ - public list(parameters?: { - projectID?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'projectID' }] }]); - return (options?.client ?? this.client).get({ - url: '/api/permission/saved', - ...options, - ...params - }); - } - - /** - * Remove saved permission - * - * Remove a saved permission by ID. - */ - public remove(parameters: { - id: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'id' }] }]); - return (options?.client ?? this.client).delete({ - url: '/api/permission/saved/{id}', - ...options, - ...params - }); - } + /** + * List saved permissions + * + * Retrieve saved permissions, optionally filtered by project. + */ + public list( + parameters?: { + projectID?: string + }, + options?: Options, + ) { + const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "projectID" }] }]) + return (options?.client ?? this.client).get< + V2PermissionSavedListResponses, + V2PermissionSavedListErrors, + ThrowOnError + >({ + url: "/api/permission/saved", + ...options, + ...params, + }) + } + + /** + * Remove saved permission + * + * Remove a saved permission by ID. + */ + public remove( + parameters: { + id: string + }, + options?: Options, + ) { + const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "id" }] }]) + return (options?.client ?? this.client).delete< + V2PermissionSavedRemoveResponses, + V2PermissionSavedRemoveErrors, + ThrowOnError + >({ + url: "/api/permission/saved/{id}", + ...options, + ...params, + }) + } } export class Permission3 extends HeyApiClient { - private _request?: Request; - get request(): Request { - return this._request ??= new Request({ client: this.client }); - } - - private _saved?: Saved; - get saved(): Saved { - return this._saved ??= new Saved({ client: this.client }); - } + private _request?: Request + get request(): Request { + return (this._request ??= new Request({ client: this.client })) + } + + private _saved?: Saved + get saved(): Saved { + return (this._saved ??= new Saved({ client: this.client })) + } } export class Fs extends HeyApiClient { - /** - * Read file - * - * Serve one file relative to the requested location. - */ - public read(parameters?: { - location?: { - directory?: string; - workspace?: string; - }; - path?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'location' }, { in: 'query', key: 'path' }] }]); - return (options?.client ?? this.client).get({ - url: '/api/fs/read/*', - ...options, - ...params - }); - } - - /** - * List directory - * - * List direct children of one directory relative to the requested location. - */ - public list(parameters?: { - location?: { - directory?: string; - workspace?: string; - }; - path?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'location' }, { in: 'query', key: 'path' }] }]); - return (options?.client ?? this.client).get({ - url: '/api/fs/list', - ...options, - ...params - }); - } - - /** - * Find files - * - * Find recursively ranked filesystem entries relative to the requested location. - */ - public find(parameters: { - location?: { - directory?: string; - workspace?: string; - }; - query: string; - type?: 'file' | 'directory'; - limit?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'location' }, - { in: 'query', key: 'query' }, - { in: 'query', key: 'type' }, - { in: 'query', key: 'limit' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/api/fs/find', - ...options, - ...params - }); - } + /** + * Read file + * + * Serve one file relative to the requested location. + */ + public read( + parameters?: { + location?: { + directory?: string + workspace?: string + } + path?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "location" }, + { in: "query", key: "path" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/api/fs/read/*", + ...options, + ...params, + }) + } + + /** + * List directory + * + * List direct children of one directory relative to the requested location. + */ + public list( + parameters?: { + location?: { + directory?: string + workspace?: string + } + path?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "location" }, + { in: "query", key: "path" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/api/fs/list", + ...options, + ...params, + }) + } + + /** + * Find files + * + * Find recursively ranked filesystem entries relative to the requested location. + */ + public find( + parameters: { + location?: { + directory?: string + workspace?: string + } + query: string + type?: "file" | "directory" + limit?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "location" }, + { in: "query", key: "query" }, + { in: "query", key: "type" }, + { in: "query", key: "limit" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/api/fs/find", + ...options, + ...params, + }) + } } export class Command2 extends HeyApiClient { - /** - * List commands - * - * Retrieve currently registered commands. - */ - public list(parameters?: { - location?: { - directory?: string; - workspace?: string; - }; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'location' }] }]); - return (options?.client ?? this.client).get({ - url: '/api/command', - ...options, - ...params - }); - } + /** + * List commands + * + * Retrieve currently registered commands. + */ + public list( + parameters?: { + location?: { + directory?: string + workspace?: string + } + }, + options?: Options, + ) { + const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]) + return (options?.client ?? this.client).get({ + url: "/api/command", + ...options, + ...params, + }) + } } export class Skill extends HeyApiClient { - /** - * List skills - * - * Retrieve currently registered skills. - */ - public list(parameters?: { - location?: { - directory?: string; - workspace?: string; - }; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'location' }] }]); - return (options?.client ?? this.client).get({ - url: '/api/skill', - ...options, - ...params - }); - } + /** + * List skills + * + * Retrieve currently registered skills. + */ + public list( + parameters?: { + location?: { + directory?: string + workspace?: string + } + }, + options?: Options, + ) { + const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]) + return (options?.client ?? this.client).get({ + url: "/api/skill", + ...options, + ...params, + }) + } } export class Event2 extends HeyApiClient { - /** - * Subscribe to events - * - * Subscribe to native event payloads for the server. - */ - public subscribe(options?: Options) { - return (options?.client ?? this.client).sse.get({ url: '/api/event', ...options }); - } + /** + * Subscribe to events + * + * Subscribe to native event payloads for the server. + */ + public subscribe(options?: Options) { + return (options?.client ?? this.client).sse.get({ + url: "/api/event", + ...options, + }) + } } export class Pty2 extends HeyApiClient { - /** - * List PTY sessions - * - * List PTY sessions for a location, including exited sessions retained until removal. - */ - public list(parameters?: { - location?: { - directory?: string; - workspace?: string; - }; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'location' }] }]); - return (options?.client ?? this.client).get({ - url: '/api/pty', - ...options, - ...params - }); - } - - /** - * Create PTY session - * - * Create a pseudo-terminal session for a location. - */ - public create(parameters?: { - location?: { - directory?: string; - workspace?: string; - }; - command?: string; - args?: Array; - cwd?: string; - title?: string; - env?: { - [key: string]: string; - }; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'query', key: 'location' }, - { in: 'body', key: 'command' }, - { in: 'body', key: 'args' }, - { in: 'body', key: 'cwd' }, - { in: 'body', key: 'title' }, - { in: 'body', key: 'env' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/api/pty', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Remove PTY session - * - * Terminate and remove one PTY session. - */ - public remove(parameters: { - ptyID: string; - location?: { - directory?: string; - workspace?: string; - }; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'ptyID' }, { in: 'query', key: 'location' }] }]); - return (options?.client ?? this.client).delete({ - url: '/api/pty/{ptyID}', - ...options, - ...params - }); - } - - /** - * Get PTY session - * - * Get one PTY session, including its exit code once exited. - */ - public get(parameters: { - ptyID: string; - location?: { - directory?: string; - workspace?: string; - }; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'ptyID' }, { in: 'query', key: 'location' }] }]); - return (options?.client ?? this.client).get({ - url: '/api/pty/{ptyID}', - ...options, - ...params - }); - } - - /** - * Update PTY session - * - * Update the title or viewport size of one PTY session. - */ - public update(parameters: { - ptyID: string; - location?: { - directory?: string; - workspace?: string; - }; - title?: string; - size?: { - rows: number; - cols: number; - }; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'ptyID' }, - { in: 'query', key: 'location' }, - { in: 'body', key: 'title' }, - { in: 'body', key: 'size' } - ] }]); - return (options?.client ?? this.client).put({ - url: '/api/pty/{ptyID}', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - /** - * Create PTY WebSocket token - * - * Create a short-lived single-use ticket for opening a PTY WebSocket connection. - */ - public connectToken(parameters: { - ptyID: string; - location?: { - directory?: string; - workspace?: string; - }; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'ptyID' }, { in: 'query', key: 'location' }] }]); - return (options?.client ?? this.client).post({ - url: '/api/pty/{ptyID}/connect-token', - ...options, - ...params - }); - } - - /** - * Connect to PTY session - * - * Establish a WebSocket connection streaming PTY output and accepting terminal input. - */ - public connect(parameters: { - ptyID: string; - 'location[directory]'?: string; - 'location[workspace]'?: string; - cursor?: string; - ticket?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'ptyID' }, - { in: 'query', key: 'location[directory]' }, - { in: 'query', key: 'location[workspace]' }, - { in: 'query', key: 'cursor' }, - { in: 'query', key: 'ticket' } - ] }]); - return (options?.client ?? this.client).get({ - url: '/api/pty/{ptyID}/connect', - ...options, - ...params - }); - } + /** + * List PTY sessions + * + * List PTY sessions for a location, including exited sessions retained until removal. + */ + public list( + parameters?: { + location?: { + directory?: string + workspace?: string + } + }, + options?: Options, + ) { + const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]) + return (options?.client ?? this.client).get({ + url: "/api/pty", + ...options, + ...params, + }) + } + + /** + * Create PTY session + * + * Create a pseudo-terminal session for a location. + */ + public create( + parameters?: { + location?: { + directory?: string + workspace?: string + } + command?: string + args?: Array + cwd?: string + title?: string + env?: { + [key: string]: string + } + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "location" }, + { in: "body", key: "command" }, + { in: "body", key: "args" }, + { in: "body", key: "cwd" }, + { in: "body", key: "title" }, + { in: "body", key: "env" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/api/pty", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Remove PTY session + * + * Terminate and remove one PTY session. + */ + public remove( + parameters: { + ptyID: string + location?: { + directory?: string + workspace?: string + } + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "ptyID" }, + { in: "query", key: "location" }, + ], + }, + ], + ) + return (options?.client ?? this.client).delete({ + url: "/api/pty/{ptyID}", + ...options, + ...params, + }) + } + + /** + * Get PTY session + * + * Get one PTY session, including its exit code once exited. + */ + public get( + parameters: { + ptyID: string + location?: { + directory?: string + workspace?: string + } + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "ptyID" }, + { in: "query", key: "location" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/api/pty/{ptyID}", + ...options, + ...params, + }) + } + + /** + * Update PTY session + * + * Update the title or viewport size of one PTY session. + */ + public update( + parameters: { + ptyID: string + location?: { + directory?: string + workspace?: string + } + title?: string + size?: { + rows: number + cols: number + } + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "ptyID" }, + { in: "query", key: "location" }, + { in: "body", key: "title" }, + { in: "body", key: "size" }, + ], + }, + ], + ) + return (options?.client ?? this.client).put({ + url: "/api/pty/{ptyID}", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Create PTY WebSocket token + * + * Create a short-lived single-use ticket for opening a PTY WebSocket connection. + */ + public connectToken( + parameters: { + ptyID: string + location?: { + directory?: string + workspace?: string + } + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "ptyID" }, + { in: "query", key: "location" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/api/pty/{ptyID}/connect-token", + ...options, + ...params, + }) + } + + /** + * Connect to PTY session + * + * Establish a WebSocket connection streaming PTY output and accepting terminal input. + */ + public connect( + parameters: { + ptyID: string + "location[directory]"?: string + "location[workspace]"?: string + cursor?: string + ticket?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "ptyID" }, + { in: "query", key: "location[directory]" }, + { in: "query", key: "location[workspace]" }, + { in: "query", key: "cursor" }, + { in: "query", key: "ticket" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/api/pty/{ptyID}/connect", + ...options, + ...params, + }) + } } export class Request2 extends HeyApiClient { - /** - * List pending question requests - * - * Retrieve pending question requests for a location. - */ - public list(parameters?: { - location?: { - directory?: string; - workspace?: string; - }; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'location' }] }]); - return (options?.client ?? this.client).get({ - url: '/api/question/request', - ...options, - ...params - }); - } + /** + * List pending question requests + * + * Retrieve pending question requests for a location. + */ + public list( + parameters?: { + location?: { + directory?: string + workspace?: string + } + }, + options?: Options, + ) { + const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]) + return (options?.client ?? this.client).get< + V2QuestionRequestListResponses, + V2QuestionRequestListErrors, + ThrowOnError + >({ + url: "/api/question/request", + ...options, + ...params, + }) + } } export class Question3 extends HeyApiClient { - private _request?: Request2; - get request(): Request2 { - return this._request ??= new Request2({ client: this.client }); - } + private _request?: Request2 + get request(): Request2 { + return (this._request ??= new Request2({ client: this.client })) + } } export class Reference extends HeyApiClient { - /** - * List references - * - * List references available in the requested location. - */ - public list(parameters?: { - location?: { - directory?: string; - workspace?: string; - }; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'location' }] }]); - return (options?.client ?? this.client).get({ - url: '/api/reference', - ...options, - ...params - }); - } + /** + * List references + * + * List references available in the requested location. + */ + public list( + parameters?: { + location?: { + directory?: string + workspace?: string + } + }, + options?: Options, + ) { + const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]) + return (options?.client ?? this.client).get({ + url: "/api/reference", + ...options, + ...params, + }) + } } export class ProjectCopy2 extends HeyApiClient { - public remove(parameters: { - projectID: string; - location?: { - directory?: string; - workspace?: string; - }; - directory?: string; - force?: boolean; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'projectID' }, - { in: 'query', key: 'location' }, - { in: 'body', key: 'directory' }, - { in: 'body', key: 'force' } - ] }]); - return (options?.client ?? this.client).delete({ - url: '/experimental/project/{projectID}/copy', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - public create(parameters: { - projectID: string; - location?: { - directory?: string; - workspace?: string; - }; - strategy?: string; - directory?: string; - name?: string; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [ - { in: 'path', key: 'projectID' }, - { in: 'query', key: 'location' }, - { in: 'body', key: 'strategy' }, - { in: 'body', key: 'directory' }, - { in: 'body', key: 'name' } - ] }]); - return (options?.client ?? this.client).post({ - url: '/experimental/project/{projectID}/copy', - ...options, - ...params, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - ...params.headers - } - }); - } - - public refresh(parameters: { - projectID: string; - location?: { - directory?: string; - workspace?: string; - }; - }, options?: Options) { - const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'projectID' }, { in: 'query', key: 'location' }] }]); - return (options?.client ?? this.client).post({ - url: '/experimental/project/{projectID}/copy/refresh', - ...options, - ...params - }); - } + public remove( + parameters: { + projectID: string + location?: { + directory?: string + workspace?: string + } + directory?: string + force?: boolean + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "projectID" }, + { in: "query", key: "location" }, + { in: "body", key: "directory" }, + { in: "body", key: "force" }, + ], + }, + ], + ) + return (options?.client ?? this.client).delete< + V2ProjectCopyRemoveResponses, + V2ProjectCopyRemoveErrors, + ThrowOnError + >({ + url: "/experimental/project/{projectID}/copy", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + public create( + parameters: { + projectID: string + location?: { + directory?: string + workspace?: string + } + strategy?: string + directory?: string + name?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "projectID" }, + { in: "query", key: "location" }, + { in: "body", key: "strategy" }, + { in: "body", key: "directory" }, + { in: "body", key: "name" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post( + { + url: "/experimental/project/{projectID}/copy", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }, + ) + } + + public refresh( + parameters: { + projectID: string + location?: { + directory?: string + workspace?: string + } + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "projectID" }, + { in: "query", key: "location" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post< + V2ProjectCopyRefreshResponses, + V2ProjectCopyRefreshErrors, + ThrowOnError + >({ + url: "/experimental/project/{projectID}/copy/refresh", + ...options, + ...params, + }) + } } export class V2 extends HeyApiClient { - private _health?: Health; - get health(): Health { - return this._health ??= new Health({ client: this.client }); - } - - private _location?: Location; - get location(): Location { - return this._location ??= new Location({ client: this.client }); - } - - private _agent?: Agent; - get agent(): Agent { - return this._agent ??= new Agent({ client: this.client }); - } - - private _session?: Session4; - get session(): Session4 { - return this._session ??= new Session4({ client: this.client }); - } - - private _model?: Model; - get model(): Model { - return this._model ??= new Model({ client: this.client }); - } - - private _provider?: Provider2; - get provider(): Provider2 { - return this._provider ??= new Provider2({ client: this.client }); - } - - private _integration?: Integration; - get integration(): Integration { - return this._integration ??= new Integration({ client: this.client }); - } - - private _credential?: Credential; - get credential(): Credential { - return this._credential ??= new Credential({ client: this.client }); - } - - private _permission?: Permission3; - get permission(): Permission3 { - return this._permission ??= new Permission3({ client: this.client }); - } - - private _fs?: Fs; - get fs(): Fs { - return this._fs ??= new Fs({ client: this.client }); - } - - private _command?: Command2; - get command(): Command2 { - return this._command ??= new Command2({ client: this.client }); - } - - private _skill?: Skill; - get skill(): Skill { - return this._skill ??= new Skill({ client: this.client }); - } - - private _event?: Event2; - get event(): Event2 { - return this._event ??= new Event2({ client: this.client }); - } - - private _pty?: Pty2; - get pty(): Pty2 { - return this._pty ??= new Pty2({ client: this.client }); - } - - private _question?: Question3; - get question(): Question3 { - return this._question ??= new Question3({ client: this.client }); - } - - private _reference?: Reference; - get reference(): Reference { - return this._reference ??= new Reference({ client: this.client }); - } - - private _projectCopy?: ProjectCopy2; - get projectCopy(): ProjectCopy2 { - return this._projectCopy ??= new ProjectCopy2({ client: this.client }); - } + private _health?: Health + get health(): Health { + return (this._health ??= new Health({ client: this.client })) + } + + private _location?: Location + get location(): Location { + return (this._location ??= new Location({ client: this.client })) + } + + private _agent?: Agent + get agent(): Agent { + return (this._agent ??= new Agent({ client: this.client })) + } + + private _session?: Session4 + get session(): Session4 { + return (this._session ??= new Session4({ client: this.client })) + } + + private _model?: Model + get model(): Model { + return (this._model ??= new Model({ client: this.client })) + } + + private _provider?: Provider2 + get provider(): Provider2 { + return (this._provider ??= new Provider2({ client: this.client })) + } + + private _integration?: Integration + get integration(): Integration { + return (this._integration ??= new Integration({ client: this.client })) + } + + private _credential?: Credential + get credential(): Credential { + return (this._credential ??= new Credential({ client: this.client })) + } + + private _permission?: Permission3 + get permission(): Permission3 { + return (this._permission ??= new Permission3({ client: this.client })) + } + + private _fs?: Fs + get fs(): Fs { + return (this._fs ??= new Fs({ client: this.client })) + } + + private _command?: Command2 + get command(): Command2 { + return (this._command ??= new Command2({ client: this.client })) + } + + private _skill?: Skill + get skill(): Skill { + return (this._skill ??= new Skill({ client: this.client })) + } + + private _event?: Event2 + get event(): Event2 { + return (this._event ??= new Event2({ client: this.client })) + } + + private _pty?: Pty2 + get pty(): Pty2 { + return (this._pty ??= new Pty2({ client: this.client })) + } + + private _question?: Question3 + get question(): Question3 { + return (this._question ??= new Question3({ client: this.client })) + } + + private _reference?: Reference + get reference(): Reference { + return (this._reference ??= new Reference({ client: this.client })) + } + + private _projectCopy?: ProjectCopy2 + get projectCopy(): ProjectCopy2 { + return (this._projectCopy ??= new ProjectCopy2({ client: this.client })) + } } export class KiloClient extends HeyApiClient { - public static readonly __registry = new HeyApiRegistry(); - - constructor(args?: { - client?: Client; - key?: string; - }) { - super(args); - KiloClient.__registry.set(this, args?.key); - } - - private _auth?: Auth; - get auth(): Auth { - return this._auth ??= new Auth({ client: this.client }); - } - - private _app?: App; - get app(): App { - return this._app ??= new App({ client: this.client }); - } - - private _experimental?: Experimental; - get experimental(): Experimental { - return this._experimental ??= new Experimental({ client: this.client }); - } - - private _global?: Global; - get global(): Global { - return this._global ??= new Global({ client: this.client }); - } - - private _event?: Event; - get event(): Event { - return this._event ??= new Event({ client: this.client }); - } - - private _config?: Config2; - get config(): Config2 { - return this._config ??= new Config2({ client: this.client }); - } - - private _tool?: Tool; - get tool(): Tool { - return this._tool ??= new Tool({ client: this.client }); - } - - private _worktree?: Worktree; - get worktree(): Worktree { - return this._worktree ??= new Worktree({ client: this.client }); - } - - private _find?: Find; - get find(): Find { - return this._find ??= new Find({ client: this.client }); - } - - private _file?: File; - get file(): File { - return this._file ??= new File({ client: this.client }); - } - - private _instance?: Instance; - get instance(): Instance { - return this._instance ??= new Instance({ client: this.client }); - } - - private _path?: Path; - get path(): Path { - return this._path ??= new Path({ client: this.client }); - } - - private _vcs?: Vcs; - get vcs(): Vcs { - return this._vcs ??= new Vcs({ client: this.client }); - } - - private _command?: Command; - get command(): Command { - return this._command ??= new Command({ client: this.client }); - } - - private _lsp?: Lsp; - get lsp(): Lsp { - return this._lsp ??= new Lsp({ client: this.client }); - } - - private _formatter?: Formatter; - get formatter(): Formatter { - return this._formatter ??= new Formatter({ client: this.client }); - } - - private _mcp?: Mcp; - get mcp(): Mcp { - return this._mcp ??= new Mcp({ client: this.client }); - } - - private _project?: Project; - get project(): Project { - return this._project ??= new Project({ client: this.client }); - } - - private _pty?: Pty; - get pty(): Pty { - return this._pty ??= new Pty({ client: this.client }); - } - - private _question?: Question; - get question(): Question { - return this._question ??= new Question({ client: this.client }); - } - - private _permission?: Permission; - get permission(): Permission { - return this._permission ??= new Permission({ client: this.client }); - } - - private _provider?: Provider; - get provider(): Provider { - return this._provider ??= new Provider({ client: this.client }); - } - - private _session?: Session2; - get session(): Session2 { - return this._session ??= new Session2({ client: this.client }); - } - - private _part?: Part; - get part(): Part { - return this._part ??= new Part({ client: this.client }); - } - - private _sync?: Sync; - get sync(): Sync { - return this._sync ??= new Sync({ client: this.client }); - } - - private _tui?: Tui; - get tui(): Tui { - return this._tui ??= new Tui({ client: this.client }); - } - - private _agentBuilder?: AgentBuilder; - get agentBuilder(): AgentBuilder { - return this._agentBuilder ??= new AgentBuilder({ client: this.client }); - } - - private _backgroundProcess?: BackgroundProcess; - get backgroundProcess(): BackgroundProcess { - return this._backgroundProcess ??= new BackgroundProcess({ client: this.client }); - } - - private _branchName?: BranchName; - get branchName(): BranchName { - return this._branchName ??= new BranchName({ client: this.client }); - } - - private _commitMessage?: CommitMessage; - get commitMessage(): CommitMessage { - return this._commitMessage ??= new CommitMessage({ client: this.client }); - } - - private _enhancePrompt?: EnhancePrompt; - get enhancePrompt(): EnhancePrompt { - return this._enhancePrompt ??= new EnhancePrompt({ client: this.client }); - } - - private _indexing?: Indexing; - get indexing(): Indexing { - return this._indexing ??= new Indexing({ client: this.client }); - } - - private _interactiveTerminal?: InteractiveTerminal; - get interactiveTerminal(): InteractiveTerminal { - return this._interactiveTerminal ??= new InteractiveTerminal({ client: this.client }); - } - - private _kilo?: Kilo; - get kilo(): Kilo { - return this._kilo ??= new Kilo({ client: this.client }); - } - - private _kilocode?: Kilocode; - get kilocode(): Kilocode { - return this._kilocode ??= new Kilocode({ client: this.client }); - } - - private _anacondaDesktop?: AnacondaDesktop; - get anacondaDesktop(): AnacondaDesktop { - return this._anacondaDesktop ??= new AnacondaDesktop({ client: this.client }); - } - - private _network?: Network; - get network(): Network { - return this._network ??= new Network({ client: this.client }); - } - - private _remote?: Remote; - get remote(): Remote { - return this._remote ??= new Remote({ client: this.client }); - } - - private _sandbox?: Sandbox; - get sandbox(): Sandbox { - return this._sandbox ??= new Sandbox({ client: this.client }); - } - - private _suggestion?: Suggestion; - get suggestion(): Suggestion { - return this._suggestion ??= new Suggestion({ client: this.client }); - } - - private _telemetry?: Telemetry; - get telemetry(): Telemetry { - return this._telemetry ??= new Telemetry({ client: this.client }); - } - - private _memory?: Memory; - get memory(): Memory { - return this._memory ??= new Memory({ client: this.client }); - } - - private _v2?: V2; - get v2(): V2 { - return this._v2 ??= new V2({ client: this.client }); - } + public static readonly __registry = new HeyApiRegistry() + + constructor(args?: { client?: Client; key?: string }) { + super(args) + KiloClient.__registry.set(this, args?.key) + } + + private _auth?: Auth + get auth(): Auth { + return (this._auth ??= new Auth({ client: this.client })) + } + + private _app?: App + get app(): App { + return (this._app ??= new App({ client: this.client })) + } + + private _experimental?: Experimental + get experimental(): Experimental { + return (this._experimental ??= new Experimental({ client: this.client })) + } + + private _global?: Global + get global(): Global { + return (this._global ??= new Global({ client: this.client })) + } + + private _event?: Event + get event(): Event { + return (this._event ??= new Event({ client: this.client })) + } + + private _config?: Config2 + get config(): Config2 { + return (this._config ??= new Config2({ client: this.client })) + } + + private _tool?: Tool + get tool(): Tool { + return (this._tool ??= new Tool({ client: this.client })) + } + + private _worktree?: Worktree + get worktree(): Worktree { + return (this._worktree ??= new Worktree({ client: this.client })) + } + + private _find?: Find + get find(): Find { + return (this._find ??= new Find({ client: this.client })) + } + + private _file?: File + get file(): File { + return (this._file ??= new File({ client: this.client })) + } + + private _instance?: Instance + get instance(): Instance { + return (this._instance ??= new Instance({ client: this.client })) + } + + private _path?: Path + get path(): Path { + return (this._path ??= new Path({ client: this.client })) + } + + private _vcs?: Vcs + get vcs(): Vcs { + return (this._vcs ??= new Vcs({ client: this.client })) + } + + private _command?: Command + get command(): Command { + return (this._command ??= new Command({ client: this.client })) + } + + private _lsp?: Lsp + get lsp(): Lsp { + return (this._lsp ??= new Lsp({ client: this.client })) + } + + private _formatter?: Formatter + get formatter(): Formatter { + return (this._formatter ??= new Formatter({ client: this.client })) + } + + private _mcp?: Mcp + get mcp(): Mcp { + return (this._mcp ??= new Mcp({ client: this.client })) + } + + private _project?: Project + get project(): Project { + return (this._project ??= new Project({ client: this.client })) + } + + private _pty?: Pty + get pty(): Pty { + return (this._pty ??= new Pty({ client: this.client })) + } + + private _question?: Question + get question(): Question { + return (this._question ??= new Question({ client: this.client })) + } + + private _permission?: Permission + get permission(): Permission { + return (this._permission ??= new Permission({ client: this.client })) + } + + private _provider?: Provider + get provider(): Provider { + return (this._provider ??= new Provider({ client: this.client })) + } + + private _session?: Session2 + get session(): Session2 { + return (this._session ??= new Session2({ client: this.client })) + } + + private _part?: Part + get part(): Part { + return (this._part ??= new Part({ client: this.client })) + } + + private _sync?: Sync + get sync(): Sync { + return (this._sync ??= new Sync({ client: this.client })) + } + + private _tui?: Tui + get tui(): Tui { + return (this._tui ??= new Tui({ client: this.client })) + } + + private _agentBuilder?: AgentBuilder + get agentBuilder(): AgentBuilder { + return (this._agentBuilder ??= new AgentBuilder({ client: this.client })) + } + + private _backgroundProcess?: BackgroundProcess + get backgroundProcess(): BackgroundProcess { + return (this._backgroundProcess ??= new BackgroundProcess({ client: this.client })) + } + + private _branchName?: BranchName + get branchName(): BranchName { + return (this._branchName ??= new BranchName({ client: this.client })) + } + + private _commitMessage?: CommitMessage + get commitMessage(): CommitMessage { + return (this._commitMessage ??= new CommitMessage({ client: this.client })) + } + + private _enhancePrompt?: EnhancePrompt + get enhancePrompt(): EnhancePrompt { + return (this._enhancePrompt ??= new EnhancePrompt({ client: this.client })) + } + + private _indexing?: Indexing + get indexing(): Indexing { + return (this._indexing ??= new Indexing({ client: this.client })) + } + + private _interactiveTerminal?: InteractiveTerminal + get interactiveTerminal(): InteractiveTerminal { + return (this._interactiveTerminal ??= new InteractiveTerminal({ client: this.client })) + } + + private _kilo?: Kilo + get kilo(): Kilo { + return (this._kilo ??= new Kilo({ client: this.client })) + } + + private _kilocode?: Kilocode + get kilocode(): Kilocode { + return (this._kilocode ??= new Kilocode({ client: this.client })) + } + + private _anacondaDesktop?: AnacondaDesktop + get anacondaDesktop(): AnacondaDesktop { + return (this._anacondaDesktop ??= new AnacondaDesktop({ client: this.client })) + } + + private _network?: Network + get network(): Network { + return (this._network ??= new Network({ client: this.client })) + } + + private _remote?: Remote + get remote(): Remote { + return (this._remote ??= new Remote({ client: this.client })) + } + + private _sandbox?: Sandbox + get sandbox(): Sandbox { + return (this._sandbox ??= new Sandbox({ client: this.client })) + } + + private _suggestion?: Suggestion + get suggestion(): Suggestion { + return (this._suggestion ??= new Suggestion({ client: this.client })) + } + + private _telemetry?: Telemetry + get telemetry(): Telemetry { + return (this._telemetry ??= new Telemetry({ client: this.client })) + } + + private _memory?: Memory + get memory(): Memory { + return (this._memory ??= new Memory({ client: this.client })) + } + + private _v2?: V2 + get v2(): V2 { + return (this._v2 ??= new V2({ client: this.client })) + } } diff --git a/packages/sdk/js/src/v2/gen/types.gen.ts b/packages/sdk/js/src/v2/gen/types.gen.ts index f337ff7274e..fb02a42dae2 100644 --- a/packages/sdk/js/src/v2/gen/types.gen.ts +++ b/packages/sdk/js/src/v2/gen/types.gen.ts @@ -1,19786 +1,20585 @@ // This file is auto-generated by @hey-api/openapi-ts export type ClientOptions = { - baseUrl: `${string}://${string}` | (string & {}); -}; + baseUrl: `${string}://${string}` | (string & {}) +} -export type Event = EventModelsDevRefreshed1 | EventIntegrationUpdated1 | EventIntegrationConnectionUpdated1 | EventCatalogUpdated1 | EventSessionCreated1 | EventSessionUpdated1 | EventSessionDeleted1 | EventMessageUpdated1 | EventMessageRemoved1 | EventMessagePartUpdated1 | EventMessagePartRemoved1 | EventSessionNextAgentSwitched1 | EventSessionNextModelSwitched1 | EventSessionNextMoved1 | EventSessionNextPrompted1 | EventSessionNextPromptAdmitted1 | EventSessionNextContextUpdated1 | EventSessionNextSynthetic1 | EventSessionNextShellStarted1 | EventSessionNextShellEnded1 | EventSessionNextStepStarted1 | EventSessionNextStepEnded1 | EventSessionNextStepFailed1 | EventSessionNextTextStarted1 | EventSessionNextTextDelta1 | EventSessionNextTextEnded1 | EventSessionNextReasoningStarted1 | EventSessionNextReasoningDelta1 | EventSessionNextReasoningEnded1 | EventSessionNextToolInputStarted1 | EventSessionNextToolInputDelta1 | EventSessionNextToolInputEnded1 | EventSessionNextToolCalled1 | EventSessionNextToolProgress1 | EventSessionNextToolSuccess1 | EventSessionNextToolFailed1 | EventSessionNextRetried1 | EventSessionNextCompactionStarted1 | EventSessionNextCompactionDelta1 | EventSessionNextCompactionEnded1 | EventSessionNextRevertStaged1 | EventSessionNextRevertCleared1 | EventSessionNextRevertCommitted1 | EventMessagePartDelta1 | EventSessionDiff1 | EventSessionError1 | EventInstallationUpdated1 | EventInstallationUpdateAvailable1 | EventFileEdited1 | EventReferenceUpdated1 | EventPermissionV2Asked1 | EventPermissionV2Replied1 | EventPluginAdded1 | EventProjectDirectoriesUpdated1 | EventFileWatcherUpdated1 | EventPtyCreated1 | EventPtyUpdated1 | EventPtyExited1 | EventPtyDeleted1 | EventQuestionV2Asked1 | EventQuestionV2Replied1 | EventQuestionV2Rejected1 | EventTodoUpdated1 | EventLspUpdated1 | EventPermissionAsked1 | EventPermissionReplied1 | EventTuiPromptAppend1 | EventTuiCommandExecute1 | EventTuiToastShow1 | EventTuiSessionSelect1 | EventMcpToolsChanged1 | EventMcpBrowserOpenFailed1 | EventCommandExecuted1 | EventProjectUpdated1 | EventSessionStatus1 | EventSessionIdle1 | EventQuestionAsked1 | EventQuestionReplied1 | EventQuestionRejected1 | EventSessionCompacted1 | EventVcsBranchUpdated1 | EventWorkspaceReady1 | EventWorkspaceFailed1 | EventWorkspaceStatus1 | EventWorktreeReady1 | EventWorktreeFailed1 | EventServerConnected1 | EventGlobalDisposed1 | EventGlobalConfigUpdated1 | EventServerInstanceDisposed | EventSessionTurnOpen | EventSessionTurnClose | EventSessionQueueChanged | EventSessionNetworkAsked | EventSessionNetworkReplied | EventSessionNetworkRejected | EventSessionNetworkRestored | EventBackgroundProcessUpdated | EventBackgroundProcessDeleted | EventInteractiveTerminalUpdated | EventInteractiveTerminalData | EventInteractiveTerminalDeleted | EventSandboxStatusChanged | EventSuggestionShown | EventSuggestionAccepted | EventSuggestionDismissed | EventKilocodeAgentManagerStart | EventKilocodeAgentManagerRequested | EventKilocodeAgentManagerCancelled | EventKilocodeNotebookRequested | EventKilocodeNotebookCancelled | EventKiloSessionsRemoteStatusChanged | EventLspClientDiagnostics | EventMemoryStatus1 | EventMemoryUpdated1 | EventMemoryError1 | EventIndexingStatus | EventIndexingWarning | EventModelsDevRefreshed | EventIntegrationUpdated | EventIntegrationConnectionUpdated | EventCatalogUpdated | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventSessionNextAgentSwitched | EventSessionNextModelSwitched | EventSessionNextMoved | EventSessionNextPrompted | EventSessionNextPromptAdmitted | EventSessionNextContextUpdated | EventSessionNextSynthetic | EventSessionNextShellStarted | EventSessionNextShellEnded | EventSessionNextStepStarted | EventSessionNextStepEnded | EventSessionNextStepFailed | EventSessionNextTextStarted | EventSessionNextTextDelta | EventSessionNextTextEnded | EventSessionNextReasoningStarted | EventSessionNextReasoningDelta | EventSessionNextReasoningEnded | EventSessionNextToolInputStarted | EventSessionNextToolInputDelta | EventSessionNextToolInputEnded | EventSessionNextToolCalled | EventSessionNextToolProgress | EventSessionNextToolSuccess | EventSessionNextToolFailed | EventSessionNextRetried | EventSessionNextCompactionStarted | EventSessionNextCompactionDelta | EventSessionNextCompactionEnded | EventSessionNextRevertStaged | EventSessionNextRevertCleared | EventSessionNextRevertCommitted | EventMessagePartDelta | EventSessionDiff | EventSessionError | EventInstallationUpdated | EventInstallationUpdateAvailable | EventFileEdited | EventReferenceUpdated | EventPermissionV2Asked | EventPermissionV2Replied | EventPluginAdded | EventProjectDirectoriesUpdated | EventFileWatcherUpdated | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventQuestionV2Asked | EventQuestionV2Replied | EventQuestionV2Rejected | EventTodoUpdated | EventLspUpdated | EventPermissionAsked | EventPermissionReplied | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow22 | EventTuiSessionSelect | EventMcpToolsChanged | EventMcpBrowserOpenFailed | EventCommandExecuted | EventProjectUpdated | EventSessionStatus | EventSessionIdle | EventQuestionAsked | EventQuestionReplied | EventQuestionRejected | EventSessionCompacted | EventVcsBranchUpdated | EventWorkspaceReady | EventWorkspaceFailed | EventWorkspaceStatus | EventWorktreeReady | EventWorktreeFailed | EventServerConnected | EventGlobalDisposed | EventGlobalConfigUpdated; +export type Event = + | EventModelsDevRefreshed1 + | EventIntegrationUpdated1 + | EventIntegrationConnectionUpdated1 + | EventCatalogUpdated1 + | EventSessionCreated1 + | EventSessionUpdated1 + | EventSessionDeleted1 + | EventMessageUpdated1 + | EventMessageRemoved1 + | EventMessagePartUpdated1 + | EventMessagePartRemoved1 + | EventSessionNextAgentSwitched1 + | EventSessionNextModelSwitched1 + | EventSessionNextMoved1 + | EventSessionNextPrompted1 + | EventSessionNextPromptAdmitted1 + | EventSessionNextContextUpdated1 + | EventSessionNextSynthetic1 + | EventSessionNextShellStarted1 + | EventSessionNextShellEnded1 + | EventSessionNextStepStarted1 + | EventSessionNextStepEnded1 + | EventSessionNextStepFailed1 + | EventSessionNextTextStarted1 + | EventSessionNextTextDelta1 + | EventSessionNextTextEnded1 + | EventSessionNextReasoningStarted1 + | EventSessionNextReasoningDelta1 + | EventSessionNextReasoningEnded1 + | EventSessionNextToolInputStarted1 + | EventSessionNextToolInputDelta1 + | EventSessionNextToolInputEnded1 + | EventSessionNextToolCalled1 + | EventSessionNextToolProgress1 + | EventSessionNextToolSuccess1 + | EventSessionNextToolFailed1 + | EventSessionNextRetried1 + | EventSessionNextCompactionStarted1 + | EventSessionNextCompactionDelta1 + | EventSessionNextCompactionEnded1 + | EventSessionNextRevertStaged1 + | EventSessionNextRevertCleared1 + | EventSessionNextRevertCommitted1 + | EventMessagePartDelta1 + | EventSessionDiff1 + | EventSessionError1 + | EventInstallationUpdated1 + | EventInstallationUpdateAvailable1 + | EventFileEdited1 + | EventReferenceUpdated1 + | EventPermissionV2Asked1 + | EventPermissionV2Replied1 + | EventPluginAdded1 + | EventProjectDirectoriesUpdated1 + | EventFileWatcherUpdated1 + | EventPtyCreated1 + | EventPtyUpdated1 + | EventPtyExited1 + | EventPtyDeleted1 + | EventQuestionV2Asked1 + | EventQuestionV2Replied1 + | EventQuestionV2Rejected1 + | EventTodoUpdated1 + | EventLspUpdated1 + | EventPermissionAsked1 + | EventPermissionReplied1 + | EventTuiPromptAppend1 + | EventTuiCommandExecute1 + | EventTuiToastShow1 + | EventTuiSessionSelect1 + | EventMcpToolsChanged1 + | EventMcpBrowserOpenFailed1 + | EventCommandExecuted1 + | EventProjectUpdated1 + | EventSessionStatus1 + | EventSessionIdle1 + | EventQuestionAsked1 + | EventQuestionReplied1 + | EventQuestionRejected1 + | EventSessionCompacted1 + | EventVcsBranchUpdated1 + | EventWorkspaceReady1 + | EventWorkspaceFailed1 + | EventWorkspaceStatus1 + | EventWorktreeReady1 + | EventWorktreeFailed1 + | EventServerConnected1 + | EventGlobalDisposed1 + | EventGlobalConfigUpdated1 + | EventServerInstanceDisposed + | EventSessionTurnOpen + | EventSessionTurnClose + | EventSessionQueueChanged + | EventSessionNetworkAsked + | EventSessionNetworkReplied + | EventSessionNetworkRejected + | EventSessionNetworkRestored + | EventBackgroundProcessUpdated + | EventBackgroundProcessDeleted + | EventInteractiveTerminalUpdated + | EventInteractiveTerminalData + | EventInteractiveTerminalDeleted + | EventSandboxStatusChanged + | EventSuggestionShown + | EventSuggestionAccepted + | EventSuggestionDismissed + | EventKilocodeAgentManagerStart + | EventKilocodeAgentManagerRequested + | EventKilocodeAgentManagerCancelled + | EventKilocodeNotebookRequested + | EventKilocodeNotebookCancelled + | EventKiloSessionsRemoteStatusChanged + | EventLspClientDiagnostics + | EventMemoryStatus1 + | EventMemoryUpdated1 + | EventMemoryError1 + | EventIndexingStatus + | EventIndexingWarning + | EventModelsDevRefreshed + | EventIntegrationUpdated + | EventIntegrationConnectionUpdated + | EventCatalogUpdated + | EventSessionCreated + | EventSessionUpdated + | EventSessionDeleted + | EventMessageUpdated + | EventMessageRemoved + | EventMessagePartUpdated + | EventMessagePartRemoved + | EventSessionNextAgentSwitched + | EventSessionNextModelSwitched + | EventSessionNextMoved + | EventSessionNextPrompted + | EventSessionNextPromptAdmitted + | EventSessionNextContextUpdated + | EventSessionNextSynthetic + | EventSessionNextShellStarted + | EventSessionNextShellEnded + | EventSessionNextStepStarted + | EventSessionNextStepEnded + | EventSessionNextStepFailed + | EventSessionNextTextStarted + | EventSessionNextTextDelta + | EventSessionNextTextEnded + | EventSessionNextReasoningStarted + | EventSessionNextReasoningDelta + | EventSessionNextReasoningEnded + | EventSessionNextToolInputStarted + | EventSessionNextToolInputDelta + | EventSessionNextToolInputEnded + | EventSessionNextToolCalled + | EventSessionNextToolProgress + | EventSessionNextToolSuccess + | EventSessionNextToolFailed + | EventSessionNextRetried + | EventSessionNextCompactionStarted + | EventSessionNextCompactionDelta + | EventSessionNextCompactionEnded + | EventSessionNextRevertStaged + | EventSessionNextRevertCleared + | EventSessionNextRevertCommitted + | EventMessagePartDelta + | EventSessionDiff + | EventSessionError + | EventInstallationUpdated + | EventInstallationUpdateAvailable + | EventFileEdited + | EventReferenceUpdated + | EventPermissionV2Asked + | EventPermissionV2Replied + | EventPluginAdded + | EventProjectDirectoriesUpdated + | EventFileWatcherUpdated + | EventPtyCreated + | EventPtyUpdated + | EventPtyExited + | EventPtyDeleted + | EventQuestionV2Asked + | EventQuestionV2Replied + | EventQuestionV2Rejected + | EventTodoUpdated + | EventLspUpdated + | EventPermissionAsked + | EventPermissionReplied + | EventTuiPromptAppend + | EventTuiCommandExecute + | EventTuiToastShow22 + | EventTuiSessionSelect + | EventMcpToolsChanged + | EventMcpBrowserOpenFailed + | EventCommandExecuted + | EventProjectUpdated + | EventSessionStatus + | EventSessionIdle + | EventQuestionAsked + | EventQuestionReplied + | EventQuestionRejected + | EventSessionCompacted + | EventVcsBranchUpdated + | EventWorkspaceReady + | EventWorkspaceFailed + | EventWorkspaceStatus + | EventWorktreeReady + | EventWorktreeFailed + | EventServerConnected + | EventGlobalDisposed + | EventGlobalConfigUpdated export type QuestionReplied = { - sessionID: string; - requestID: string; - answers: Array; -}; + sessionID: string + requestID: string + answers: Array +} export type QuestionRejected = { - sessionID: string; - requestID: string; -}; + sessionID: string + requestID: string +} export type OAuth = { - type: 'oauth'; - refresh: string; - access: string; - expires: number; - accountId?: string; - enterpriseUrl?: string; -}; + type: "oauth" + refresh: string + access: string + expires: number + accountId?: string + enterpriseUrl?: string +} export type ApiAuth = { - type: 'api'; - key: string; - metadata?: { - [key: string]: string; - }; -}; + type: "api" + key: string + metadata?: { + [key: string]: string + } +} export type WellKnownAuth = { - type: 'wellknown'; - key: string; - token: string; -}; + type: "wellknown" + key: string + token: string +} -export type Auth = OAuth | ApiAuth | WellKnownAuth; +export type Auth = OAuth | ApiAuth | WellKnownAuth export type EffectHttpApiErrorBadRequest = { - _tag: 'BadRequest'; -}; + _tag: "BadRequest" +} export type InvalidRequestError = { - _tag: 'InvalidRequestError'; - message: string; - kind?: string; - field?: string; -}; + _tag: "InvalidRequestError" + message: string + kind?: string + field?: string +} export type MoveSessionError = { - name: 'MoveSessionError'; - data: { - message: string; - }; -}; + name: "MoveSessionError" + data: { + message: string + } +} export type SessionNetworkWait = { - id: string; - sessionID: string; - message: string; - restored: boolean; - time: { - created: number; - restored?: number; - }; -}; + id: string + sessionID: string + message: string + restored: boolean + time: { + created: number + restored?: number + } +} export type BackgroundProcessInfo = { - id: string; - sessionID: string; - pid?: number; - command: string; - cwd: string; - description?: string; - ports: Array; - status: 'starting' | 'running' | 'ready' | 'exited' | 'failed' | 'stopping' | 'stopped'; - lifetime: 'session' | 'parent' | 'persistent'; - ready: boolean; - exitCode?: number; - signal?: string; - output: string; - time: { - started: number; - updated: number; - ended?: number; - }; -}; + id: string + sessionID: string + pid?: number + command: string + cwd: string + description?: string + ports: Array + status: "starting" | "running" | "ready" | "exited" | "failed" | "stopping" | "stopped" + lifetime: "session" | "parent" | "persistent" + ready: boolean + exitCode?: number + signal?: string + output: string + time: { + started: number + updated: number + ended?: number + } +} export type InteractiveTerminalInfo = { - id: string; - sessionID: string; - pid: number; - command: string; - cwd: string; - description?: string; - status: 'running' | 'closed'; - cols: number; - rows: number; - exitCode?: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - signal?: string; - closedBy?: 'exit' | 'user' | 'abort'; - time: { - started: number; - updated: number; - ended?: number; - }; -}; + id: string + sessionID: string + pid: number + command: string + cwd: string + description?: string + status: "running" | "closed" + cols: number + rows: number + exitCode?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + signal?: string + closedBy?: "exit" | "user" | "abort" + time: { + started: number + updated: number + ended?: number + } +} export type SuggestionRequest = { - id: string; - sessionID: string; - text: string; - actions: Array<{ - /** - * Button or option label (1-5 words) - */ - label: string; - description?: string; - /** - * Synthetic user prompt to inject when this action is accepted - */ - prompt: string; - }>; - blocking?: boolean; - tool?: { - messageID: string; - callID: string; - }; -}; + id: string + sessionID: string + text: string + actions: Array<{ + /** + * Button or option label (1-5 words) + */ + label: string + description?: string + /** + * Synthetic user prompt to inject when this action is accepted + */ + prompt: string + }> + blocking?: boolean + tool?: { + messageID: string + callID: string + } +} -export type AgentManagerRequestId = string; +export type AgentManagerRequestId = string -export type AgentManagerFilterState = 'idle' | 'busy' | 'retry' | 'offline' | 'waiting'; +export type AgentManagerFilterState = "idle" | "busy" | "retry" | "offline" | "waiting" export type AgentManagerOverviewFilter = { - sectionIDs?: Array; - states?: Array; -}; + sectionIDs?: Array + states?: Array +} export type AgentManagerOverviewRequest = { - id: AgentManagerRequestId; - sessionID: string; - operation: 'overview'; - filter?: AgentManagerOverviewFilter; -}; + id: AgentManagerRequestId + sessionID: string + operation: "overview" + filter?: AgentManagerOverviewFilter +} export type AgentManagerPromptRequest = { - id: AgentManagerRequestId; - sessionID: string; - operation: 'prompt'; - targetSessionID: string; - prompt: string; -}; + id: AgentManagerRequestId + sessionID: string + operation: "prompt" + targetSessionID: string + prompt: string +} export type AgentManagerStopRequest = { - id: AgentManagerRequestId; - sessionID: string; - operation: 'stop'; - targetSessionID: string; -}; + id: AgentManagerRequestId + sessionID: string + operation: "stop" + targetSessionID: string +} -export type AgentManagerRequest = AgentManagerOverviewRequest | AgentManagerPromptRequest | AgentManagerStopRequest; +export type AgentManagerRequest = AgentManagerOverviewRequest | AgentManagerPromptRequest | AgentManagerStopRequest -export type NotebookRequestId = string; +export type NotebookRequestId = string export type NotebookReadRequest = { - id: NotebookRequestId; - sessionID: string; - path: string; - operation: 'read'; - includeOutputs: boolean; -}; + id: NotebookRequestId + sessionID: string + path: string + operation: "read" + includeOutputs: boolean +} export type NotebookEditRequest = { - id: NotebookRequestId; - sessionID: string; - path: string; - operation: 'edit'; - /** - * Opaque notebook content revision; pass it back unchanged and do not parse or increment it - */ - expectedRevision?: string; - /** - * Zero-based cell index - */ - index: number; - edit: { - action: 'insert'; - kind: 'code' | 'markdown'; - language?: string; - source: string; - } | { - action: 'replace'; - kind: 'code' | 'markdown'; - language?: string; - source: string; - } | { - action: 'delete'; - } | { - action: 'create'; - }; -}; + id: NotebookRequestId + sessionID: string + path: string + operation: "edit" + /** + * Opaque notebook content revision; pass it back unchanged and do not parse or increment it + */ + expectedRevision?: string + /** + * Zero-based cell index + */ + index: number + edit: + | { + action: "insert" + kind: "code" | "markdown" + language?: string + source: string + } + | { + action: "replace" + kind: "code" | "markdown" + language?: string + source: string + } + | { + action: "delete" + } + | { + action: "create" + } +} export type NotebookExecuteRequest = { - id: NotebookRequestId; - sessionID: string; - path: string; - operation: 'execute'; - /** - * Opaque notebook content revision; pass it back unchanged and do not parse or increment it - */ - expectedRevision: string; - /** - * Zero-based cell index - */ - index: number; -}; + id: NotebookRequestId + sessionID: string + path: string + operation: "execute" + /** + * Opaque notebook content revision; pass it back unchanged and do not parse or increment it + */ + expectedRevision: string + /** + * Zero-based cell index + */ + index: number +} -export type NotebookRequest = NotebookReadRequest | NotebookEditRequest | NotebookExecuteRequest; +export type NotebookRequest = NotebookReadRequest | NotebookEditRequest | NotebookExecuteRequest -export type IndexingStatusState = 'Disabled' | 'In Progress' | 'Complete' | 'Error' | 'Standby'; +export type IndexingStatusState = "Disabled" | "In Progress" | "Complete" | "Error" | "Standby" export type IndexingStatus = { - state: IndexingStatusState; - message: string; - processedFiles: number; - totalFiles: number; - percent: number; -}; + state: IndexingStatusState + message: string + processedFiles: number + totalFiles: number + percent: number +} export type IndexingWarning = { - code: 'qdrant.version-incompatible' | 'qdrant.version-unavailable'; - message: string; -}; + code: "qdrant.version-incompatible" | "qdrant.version-unavailable" + message: string +} export type SnapshotFileDiff = { - file?: string; - patch?: string; - additions: number; - deletions: number; - status?: 'added' | 'deleted' | 'modified'; -}; + file?: string + patch?: string + additions: number + deletions: number + status?: "added" | "deleted" | "modified" +} -export type PermissionAction = 'allow' | 'deny' | 'ask'; +export type PermissionAction = "allow" | "deny" | "ask" export type PermissionRule = { - permission: string; - pattern: string; - action: PermissionAction; -}; + permission: string + pattern: string + action: PermissionAction +} -export type PermissionRuleset = Array; +export type PermissionRuleset = Array export type Session = { - id: string; - slug: string; - projectID: string; - workspaceID?: string; - directory: string; - path?: string; - parentID?: string; - summary?: { - additions: number; - deletions: number; - files: number; - diffs?: Array; - }; - cost?: number; - tokens?: { - input: number; - output: number; - reasoning: number; - cache: { - read: number; - write: number; - }; - }; - share?: { - url: string; - }; - title: string; - agent?: string; - model?: { - id: string; - providerID: string; - variant?: string; - }; - version: string; - metadata?: { - [key: string]: unknown; - }; - time: { - created: number; - updated: number; - compacting?: number; - archived?: number; - }; - permission?: PermissionRuleset; - revert?: { - messageID: string; - partID?: string; - snapshot?: string; - diff?: string; - }; -}; + id: string + slug: string + projectID: string + workspaceID?: string + directory: string + path?: string + parentID?: string + summary?: { + additions: number + deletions: number + files: number + diffs?: Array + } + cost?: number + tokens?: { + input: number + output: number + reasoning: number + cache: { + read: number + write: number + } + } + share?: { + url: string + } + title: string + agent?: string + model?: { + id: string + providerID: string + variant?: string + } + version: string + metadata?: { + [key: string]: unknown + } + time: { + created: number + updated: number + compacting?: number + archived?: number + } + permission?: PermissionRuleset + revert?: { + messageID: string + partID?: string + snapshot?: string + diff?: string + } +} export type OutputFormatText = { - type: 'text'; -}; + type: "text" +} export type JsonSchema = { - [key: string]: unknown; -}; + [key: string]: unknown +} export type OutputFormatJsonSchema = { - type: 'json_schema'; - schema: JsonSchema; - retryCount?: number; -}; + type: "json_schema" + schema: JsonSchema + retryCount?: number +} -export type OutputFormat = OutputFormatText | OutputFormatJsonSchema; +export type OutputFormat = OutputFormatText | OutputFormatJsonSchema export type UserMessage = { - id: string; - sessionID: string; - role: 'user'; - time: { - created: number; - }; - format?: OutputFormat; - summary?: { - title?: string; - body?: string; - diffs: Array; - }; - agent: string; - model: { - providerID: string; - modelID: string; - variant?: string; - }; - system?: string; - tools?: { - [key: string]: boolean; - }; - editorContext?: { - directory?: string; - worktree?: string; - visibleFiles?: Array; - openTabs?: Array; - activeFile?: string; - shell?: string; - }; -}; + id: string + sessionID: string + role: "user" + time: { + created: number + } + format?: OutputFormat + summary?: { + title?: string + body?: string + diffs: Array + } + agent: string + model: { + providerID: string + modelID: string + variant?: string + } + system?: string + tools?: { + [key: string]: boolean + } + editorContext?: { + directory?: string + worktree?: string + visibleFiles?: Array + openTabs?: Array + activeFile?: string + shell?: string + } +} export type ProviderAuthError = { - name: 'ProviderAuthError'; - data: { - providerID: string; - message: string; - }; -}; + name: "ProviderAuthError" + data: { + providerID: string + message: string + } +} export type UnknownError = { - name: 'UnknownError'; - data: { - message: string; - ref?: string; - }; -}; + name: "UnknownError" + data: { + message: string + ref?: string + } +} export type MessageOutputLengthError = { - name: 'MessageOutputLengthError'; - data: { - [key: string]: unknown; - }; -}; + name: "MessageOutputLengthError" + data: { + [key: string]: unknown + } +} export type MessageAbortedError = { - name: 'MessageAbortedError'; - data: { - message: string; - }; -}; + name: "MessageAbortedError" + data: { + message: string + } +} export type StructuredOutputError = { - name: 'StructuredOutputError'; - data: { - message: string; - retries: number; - }; -}; + name: "StructuredOutputError" + data: { + message: string + retries: number + } +} export type ContextOverflowError = { - name: 'ContextOverflowError'; - data: { - message: string; - responseBody?: string; - }; -}; + name: "ContextOverflowError" + data: { + message: string + responseBody?: string + } +} export type ContentFilterError = { - name: 'ContentFilterError'; - data: { - message: string; - }; -}; + name: "ContentFilterError" + data: { + message: string + } +} export type ApiError = { - name: 'APIError'; - data: { - message: string; - statusCode?: number; - isRetryable: boolean; - responseHeaders?: { - [key: string]: string; - }; - responseBody?: string; - metadata?: { - [key: string]: string; - }; - }; -}; + name: "APIError" + data: { + message: string + statusCode?: number + isRetryable: boolean + responseHeaders?: { + [key: string]: string + } + responseBody?: string + metadata?: { + [key: string]: string + } + } +} export type AssistantMessage = { - id: string; - sessionID: string; - role: 'assistant'; - time: { - created: number; - completed?: number; - }; - error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | StructuredOutputError | ContextOverflowError | ContentFilterError | ApiError; - parentID: string; - modelID: string; - providerID: string; - mode: string; - agent: string; - path: { - cwd: string; - root: string; - }; - summary?: boolean; - cost: number; - tokens: { - total?: number; - input: number; - output: number; - reasoning: number; - cache: { - read: number; - write: number; - }; - }; - structured?: unknown; - variant?: string; - finish?: string; -}; + id: string + sessionID: string + role: "assistant" + time: { + created: number + completed?: number + } + error?: + | ProviderAuthError + | UnknownError + | MessageOutputLengthError + | MessageAbortedError + | StructuredOutputError + | ContextOverflowError + | ContentFilterError + | ApiError + parentID: string + modelID: string + providerID: string + mode: string + agent: string + path: { + cwd: string + root: string + } + summary?: boolean + cost: number + tokens: { + total?: number + input: number + output: number + reasoning: number + cache: { + read: number + write: number + } + } + structured?: unknown + variant?: string + finish?: string +} -export type Message = UserMessage | AssistantMessage; +export type Message = UserMessage | AssistantMessage export type TextPart = { - id: string; - sessionID: string; - messageID: string; - type: 'text'; - text: string; - synthetic?: boolean; - ignored?: boolean; - time?: { - start: number; - end?: number; - }; - metadata?: { - [key: string]: unknown; - }; -}; + id: string + sessionID: string + messageID: string + type: "text" + text: string + synthetic?: boolean + ignored?: boolean + time?: { + start: number + end?: number + } + metadata?: { + [key: string]: unknown + } +} export type SubtaskPart = { - id: string; - sessionID: string; - messageID: string; - type: 'subtask'; - prompt: string; - description: string; - agent: string; - model?: { - providerID: string; - modelID: string; - }; - command?: string; -}; + id: string + sessionID: string + messageID: string + type: "subtask" + prompt: string + description: string + agent: string + model?: { + providerID: string + modelID: string + } + command?: string +} export type ReasoningPart = { - id: string; - sessionID: string; - messageID: string; - type: 'reasoning'; - text: string; - metadata?: { - [key: string]: unknown; - }; - time: { - start: number; - end?: number; - }; -}; + id: string + sessionID: string + messageID: string + type: "reasoning" + text: string + metadata?: { + [key: string]: unknown + } + time: { + start: number + end?: number + } +} export type FilePartSourceText = { - value: string; - start: number; - end: number; -}; + value: string + start: number + end: number +} export type FileSource = { - text: FilePartSourceText; - type: 'file'; - path: string; -}; + text: FilePartSourceText + type: "file" + path: string +} export type Range = { - start: { - line: number; - character: number; - }; - end: { - line: number; - character: number; - }; -}; + start: { + line: number + character: number + } + end: { + line: number + character: number + } +} export type SymbolSource = { - text: FilePartSourceText; - type: 'symbol'; - path: string; - range: Range; - name: string; - kind: number; -}; + text: FilePartSourceText + type: "symbol" + path: string + range: Range + name: string + kind: number +} export type ResourceSource = { - text: FilePartSourceText; - type: 'resource'; - clientName: string; - uri: string; -}; + text: FilePartSourceText + type: "resource" + clientName: string + uri: string +} -export type FilePartSource = FileSource | SymbolSource | ResourceSource; +export type FilePartSource = FileSource | SymbolSource | ResourceSource export type FilePart = { - id: string; - sessionID: string; - messageID: string; - type: 'file'; - mime: string; - filename?: string; - url: string; - source?: FilePartSource; -}; + id: string + sessionID: string + messageID: string + type: "file" + mime: string + filename?: string + url: string + source?: FilePartSource +} export type ToolStatePending = { - status: 'pending'; - input: { - [key: string]: unknown; - }; - raw: string; -}; + status: "pending" + input: { + [key: string]: unknown + } + raw: string +} export type ToolStateRunning = { - status: 'running'; - input: { - [key: string]: unknown; - }; - title?: string; - metadata?: { - [key: string]: unknown; - }; - time: { - start: number; - }; -}; + status: "running" + input: { + [key: string]: unknown + } + title?: string + metadata?: { + [key: string]: unknown + } + time: { + start: number + } +} export type ToolStateCompleted = { - status: 'completed'; - input: { - [key: string]: unknown; - }; - output: string; - title: string; - metadata: { - [key: string]: unknown; - }; - time: { - start: number; - end: number; - compacted?: number; - }; - attachments?: Array; -}; + status: "completed" + input: { + [key: string]: unknown + } + output: string + title: string + metadata: { + [key: string]: unknown + } + time: { + start: number + end: number + compacted?: number + } + attachments?: Array +} export type ToolStateError = { - status: 'error'; - input: { - [key: string]: unknown; - }; - error: string; - metadata?: { - [key: string]: unknown; - }; - time: { - start: number; - end: number; - }; -}; + status: "error" + input: { + [key: string]: unknown + } + error: string + metadata?: { + [key: string]: unknown + } + time: { + start: number + end: number + } +} -export type ToolState = ToolStatePending | ToolStateRunning | ToolStateCompleted | ToolStateError; +export type ToolState = ToolStatePending | ToolStateRunning | ToolStateCompleted | ToolStateError export type ToolPart = { - id: string; - sessionID: string; - messageID: string; - type: 'tool'; - callID: string; - tool: string; - state: ToolState; - metadata?: { - [key: string]: unknown; - }; -}; + id: string + sessionID: string + messageID: string + type: "tool" + callID: string + tool: string + state: ToolState + metadata?: { + [key: string]: unknown + } +} export type StepStartPart = { - id: string; - sessionID: string; - messageID: string; - type: 'step-start'; - snapshot?: string; -}; + id: string + sessionID: string + messageID: string + type: "step-start" + snapshot?: string +} export type StepFinishPart = { - id: string; - sessionID: string; - messageID: string; - type: 'step-finish'; - reason: string; - snapshot?: string; - model?: { - providerID: string; - modelID: string; - }; - generationID?: string; - vercelID?: string; - metrics?: { - prompt?: number; - generation?: number; - source: 'provider' | 'computed'; - }; - time?: { - start: number; - end: number; - elapsed: number; - }; - cost: number; - tokens: { - total?: number; - input: number; - output: number; - reasoning: number; - cache: { - read: number; - write: number; - }; - }; -}; + id: string + sessionID: string + messageID: string + type: "step-finish" + reason: string + snapshot?: string + model?: { + providerID: string + modelID: string + } + generationID?: string + vercelID?: string + metrics?: { + prompt?: number + generation?: number + source: "provider" | "computed" + } + time?: { + start: number + end: number + elapsed: number + } + cost: number + tokens: { + total?: number + input: number + output: number + reasoning: number + cache: { + read: number + write: number + } + } +} export type SnapshotPart = { - id: string; - sessionID: string; - messageID: string; - type: 'snapshot'; - snapshot: string; -}; + id: string + sessionID: string + messageID: string + type: "snapshot" + snapshot: string +} export type PatchPart = { - id: string; - sessionID: string; - messageID: string; - type: 'patch'; - hash: string; - files: Array; -}; + id: string + sessionID: string + messageID: string + type: "patch" + hash: string + files: Array +} export type AgentPart = { - id: string; - sessionID: string; - messageID: string; - type: 'agent'; - name: string; - source?: { - value: string; - start: number; - end: number; - }; -}; + id: string + sessionID: string + messageID: string + type: "agent" + name: string + source?: { + value: string + start: number + end: number + } +} export type RetryPart = { - id: string; - sessionID: string; - messageID: string; - type: 'retry'; - attempt: number; - error: ApiError; - time: { - created: number; - }; -}; + id: string + sessionID: string + messageID: string + type: "retry" + attempt: number + error: ApiError + time: { + created: number + } +} export type CompactionPart = { - id: string; - sessionID: string; - messageID: string; - type: 'compaction'; - auto: boolean; - overflow?: boolean; - tail_start_id?: string; -}; + id: string + sessionID: string + messageID: string + type: "compaction" + auto: boolean + overflow?: boolean + tail_start_id?: string +} -export type Part = TextPart | SubtaskPart | ReasoningPart | FilePart | ToolPart | StepStartPart | StepFinishPart | SnapshotPart | PatchPart | AgentPart | RetryPart | CompactionPart; +export type Part = + | TextPart + | SubtaskPart + | ReasoningPart + | FilePart + | ToolPart + | StepStartPart + | StepFinishPart + | SnapshotPart + | PatchPart + | AgentPart + | RetryPart + | CompactionPart export type Prompt = { - text: string; - files?: Array; - agents?: Array; -}; + text: string + files?: Array + agents?: Array +} export type Pty = { - id: string; - title: string; - command: string; - args: Array; - cwd: string; - status: 'running' | 'exited'; - pid: number; - exitCode?: number; - sessionID?: string | null; -}; + id: string + title: string + command: string + args: Array + cwd: string + status: "running" | "exited" + pid: number + exitCode?: number + sessionID?: string | null +} export type Todo = { - /** - * Brief description of the task - */ - content: string; - /** - * Current status of the task: pending, in_progress, completed, cancelled - */ - status: string; - /** - * Priority level of the task: high, medium, low - */ - priority: string; -}; + /** + * Brief description of the task + */ + content: string + /** + * Current status of the task: pending, in_progress, completed, cancelled + */ + status: string + /** + * Priority level of the task: high, medium, low + */ + priority: string +} export type EventTuiPromptAppend = { - id: string; - type: 'tui.prompt.append'; - properties: { - text: string; - }; -}; + id: string + type: "tui.prompt.append" + properties: { + text: string + } +} export type EventTuiCommandExecute = { - id: string; - type: 'tui.command.execute'; - properties: { - command: 'session.list' | 'session.new' | 'session.share' | 'session.interrupt' | 'session.compact' | 'session.page.up' | 'session.page.down' | 'session.line.up' | 'session.line.down' | 'session.half.page.up' | 'session.half.page.down' | 'session.first' | 'session.last' | 'prompt.clear' | 'prompt.submit' | 'agent.cycle' | string; - }; -}; + id: string + type: "tui.command.execute" + properties: { + command: + | "session.list" + | "session.new" + | "session.share" + | "session.interrupt" + | "session.compact" + | "session.page.up" + | "session.page.down" + | "session.line.up" + | "session.line.down" + | "session.half.page.up" + | "session.half.page.down" + | "session.first" + | "session.last" + | "prompt.clear" + | "prompt.submit" + | "agent.cycle" + | string + } +} export type EventTuiToastShow = { - id: string; - type: 'tui.toast.show'; - properties: { - title?: string; - message: string; - variant: 'info' | 'success' | 'warning' | 'error'; - duration?: number; - }; -}; + id: string + type: "tui.toast.show" + properties: { + title?: string + message: string + variant: "info" | "success" | "warning" | "error" + duration?: number + } +} export type EventTuiSessionSelect = { - id: string; - type: 'tui.session.select'; - properties: { - /** - * Session ID to navigate to - */ - sessionID: string; - }; -}; + id: string + type: "tui.session.select" + properties: { + /** + * Session ID to navigate to + */ + sessionID: string + } +} -export type SessionStatus = { - type: 'idle'; -} | { - type: 'retry'; - attempt: number; - message: string; - action?: { - reason: string; - provider: string; - title: string; - message: string; - label: string; - link?: string; - }; - next: number; -} | { - type: 'busy'; -} | { - type: 'offline'; - requestID: string; - message: string; -}; +export type SessionStatus = + | { + type: "idle" + } + | { + type: "retry" + attempt: number + message: string + action?: { + reason: string + provider: string + title: string + message: string + label: string + link?: string + } + next: number + } + | { + type: "busy" + } + | { + type: "offline" + requestID: string + message: string + } export type QuestionOption = { - /** - * Display text (1-5 words, concise) - */ - label: string; - /** - * Explanation of choice - */ - description: string; - labelKey?: string; - descriptionKey?: string; - mode?: string; -}; + /** + * Display text (1-5 words, concise) + */ + label: string + /** + * Explanation of choice + */ + description: string + labelKey?: string + descriptionKey?: string + mode?: string +} export type QuestionInfo = { - /** - * Complete question - */ - question: string; - /** - * Very short label (max 30 chars) - */ - header: string; - /** - * Available choices - */ - options: Array; - multiple?: boolean; - questionKey?: string; - headerKey?: string; - custom?: boolean; -}; + /** + * Complete question + */ + question: string + /** + * Very short label (max 30 chars) + */ + header: string + /** + * Available choices + */ + options: Array + multiple?: boolean + questionKey?: string + headerKey?: string + custom?: boolean +} export type QuestionTool = { - messageID: string; - callID: string; -}; + messageID: string + callID: string +} -export type QuestionAnswer = Array; +export type QuestionAnswer = Array export type GlobalEvent = { - directory: string; - project?: string; - workspace?: string; - payload: EventServerInstanceDisposed | EventSessionTurnOpen | EventSessionTurnClose | EventSessionQueueChanged | EventSessionNetworkAsked | EventSessionNetworkReplied | EventSessionNetworkRejected | EventSessionNetworkRestored | EventBackgroundProcessUpdated | EventBackgroundProcessDeleted | EventInteractiveTerminalUpdated | EventInteractiveTerminalData | EventInteractiveTerminalDeleted | EventSandboxStatusChanged | EventSuggestionShown | EventSuggestionAccepted | EventSuggestionDismissed | EventKilocodeAgentManagerStart | EventKilocodeAgentManagerRequested | EventKilocodeAgentManagerCancelled | EventKilocodeNotebookRequested | EventKilocodeNotebookCancelled | EventKiloSessionsRemoteStatusChanged | EventLspClientDiagnostics | EventMemoryStatus | EventMemoryUpdated | EventMemoryError | EventIndexingStatus | EventIndexingWarning | EventModelsDevRefreshed | EventIntegrationUpdated | EventIntegrationConnectionUpdated | EventCatalogUpdated | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventSessionNextAgentSwitched | EventSessionNextModelSwitched | EventSessionNextMoved | EventSessionNextPrompted | EventSessionNextPromptAdmitted | EventSessionNextContextUpdated | EventSessionNextSynthetic | EventSessionNextShellStarted | EventSessionNextShellEnded | EventSessionNextStepStarted | EventSessionNextStepEnded | EventSessionNextStepFailed | EventSessionNextTextStarted | EventSessionNextTextDelta | EventSessionNextTextEnded | EventSessionNextReasoningStarted | EventSessionNextReasoningDelta | EventSessionNextReasoningEnded | EventSessionNextToolInputStarted | EventSessionNextToolInputDelta | EventSessionNextToolInputEnded | EventSessionNextToolCalled | EventSessionNextToolProgress | EventSessionNextToolSuccess | EventSessionNextToolFailed | EventSessionNextRetried | EventSessionNextCompactionStarted | EventSessionNextCompactionDelta | EventSessionNextCompactionEnded | EventSessionNextRevertStaged | EventSessionNextRevertCleared | EventSessionNextRevertCommitted | EventMessagePartDelta | EventSessionDiff | EventSessionError | EventInstallationUpdated | EventInstallationUpdateAvailable | EventFileEdited | EventReferenceUpdated | EventPermissionV2Asked | EventPermissionV2Replied | EventPluginAdded | EventProjectDirectoriesUpdated | EventFileWatcherUpdated | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventQuestionV2Asked | EventQuestionV2Replied | EventQuestionV2Rejected | EventTodoUpdated | EventLspUpdated | EventPermissionAsked | EventPermissionReplied | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow | EventTuiSessionSelect | EventMcpToolsChanged | EventMcpBrowserOpenFailed | EventCommandExecuted | EventProjectUpdated | EventSessionStatus | EventSessionIdle | EventQuestionAsked | EventQuestionReplied | EventQuestionRejected | EventSessionCompacted | EventVcsBranchUpdated | EventWorkspaceReady | EventWorkspaceFailed | EventWorkspaceStatus | EventWorktreeReady | EventWorktreeFailed | EventServerConnected | EventGlobalDisposed | EventGlobalConfigUpdated | { - id: string; - type: 'models-dev.refreshed'; - properties: { - [key: string]: unknown; - }; - } | { - id: string; - type: 'integration.updated'; - properties: { - [key: string]: unknown; - }; - } | { - id: string; - type: 'integration.connection.updated'; - properties: { - integrationID: string; - }; - } | { - id: string; - type: 'catalog.updated'; - properties: { - [key: string]: unknown; - }; - } | { - id: string; - type: 'session.created'; - properties: { - sessionID: string; - info: Session; - }; - } | { - id: string; - type: 'session.updated'; - properties: { - sessionID: string; - info: Session; - }; - } | { - id: string; - type: 'session.deleted'; - properties: { - sessionID: string; - info: Session; - }; - } | { - id: string; - type: 'message.updated'; - properties: { - sessionID: string; - info: Message; - }; - } | { - id: string; - type: 'message.removed'; - properties: { - sessionID: string; - messageID: string; - }; - } | { - id: string; - type: 'message.part.updated'; - properties: { - sessionID: string; - part: Part; - time: number; - }; - } | { - id: string; - type: 'message.part.removed'; - properties: { - sessionID: string; - messageID: string; - partID: string; - }; - } | { - id: string; - type: 'session.next.agent.switched'; - properties: { - timestamp: number; - sessionID: string; - messageID: string; - agent: string; - }; - } | { - id: string; - type: 'session.next.model.switched'; - properties: { - timestamp: number; - sessionID: string; - messageID: string; - model: ModelRef; - }; - } | { - id: string; - type: 'session.next.moved'; - properties: { - timestamp: number; - sessionID: string; - location: LocationRef; - subdirectory?: string; - }; - } | { - id: string; - type: 'session.next.prompted'; - properties: { - timestamp: number; - sessionID: string; - messageID: string; - prompt: Prompt; - delivery: 'steer' | 'queue'; - }; - } | { - id: string; - type: 'session.next.prompt.admitted'; - properties: { - timestamp: number; - sessionID: string; - messageID: string; - prompt: Prompt; - delivery: 'steer' | 'queue'; - }; - } | { - id: string; - type: 'session.next.context.updated'; - properties: { - timestamp: number; - sessionID: string; - messageID: string; - text: string; - }; - } | { - id: string; - type: 'session.next.synthetic'; - properties: { - timestamp: number; - sessionID: string; - messageID: string; - text: string; - }; - } | { - id: string; - type: 'session.next.shell.started'; - properties: { - timestamp: number; - sessionID: string; - messageID: string; - callID: string; - command: string; - }; - } | { - id: string; - type: 'session.next.shell.ended'; - properties: { - timestamp: number; - sessionID: string; - callID: string; - output: string; - }; - } | { - id: string; - type: 'session.next.step.started'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - agent: string; - model: ModelRef; - snapshot?: string; - }; - } | { - id: string; - type: 'session.next.step.ended'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - finish: string; - cost: number; - tokens: { - input: number; - output: number; - reasoning: number; - cache: { - read: number; - write: number; - }; - }; - snapshot?: string; - files?: Array; - }; - } | { - id: string; - type: 'session.next.step.failed'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - error: SessionErrorUnknown; - }; - } | { - id: string; - type: 'session.next.text.started'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - textID: string; - }; - } | { - id: string; - type: 'session.next.text.delta'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - textID: string; - delta: string; - }; - } | { - id: string; - type: 'session.next.text.ended'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - textID: string; - text: string; - }; - } | { - id: string; - type: 'session.next.reasoning.started'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - reasoningID: string; - providerMetadata?: LlmProviderMetadata; - }; - } | { - id: string; - type: 'session.next.reasoning.delta'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - reasoningID: string; - delta: string; - }; - } | { - id: string; - type: 'session.next.reasoning.ended'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - reasoningID: string; - text: string; - providerMetadata?: LlmProviderMetadata; - }; - } | { - id: string; - type: 'session.next.tool.input.started'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - name: string; - }; - } | { - id: string; - type: 'session.next.tool.input.delta'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - delta: string; - }; - } | { - id: string; - type: 'session.next.tool.input.ended'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - text: string; - }; - } | { - id: string; - type: 'session.next.tool.called'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - tool: string; - input: { - [key: string]: unknown; - }; - provider: { - executed: boolean; - metadata?: LlmProviderMetadata; - }; - }; - } | { - id: string; - type: 'session.next.tool.progress'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - structured: { - [key: string]: unknown; - }; - content: Array; - }; - } | { - id: string; - type: 'session.next.tool.success'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - structured: { - [key: string]: unknown; - }; - content: Array; - outputPaths?: Array; - result?: unknown; - provider: { - executed: boolean; - metadata?: LlmProviderMetadata; - }; - }; - } | { - id: string; - type: 'session.next.tool.failed'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - error: SessionErrorUnknown; - result?: unknown; - provider: { - executed: boolean; - metadata?: LlmProviderMetadata; - }; - }; - } | { - id: string; - type: 'session.next.retried'; - properties: { - timestamp: number; - sessionID: string; - attempt: number; - error: SessionNextRetryError; - }; - } | { - id: string; - type: 'session.next.compaction.started'; - properties: { - timestamp: number; - sessionID: string; - messageID: string; - reason: 'auto' | 'manual'; - }; - } | { - id: string; - type: 'session.next.compaction.delta'; - properties: { - timestamp: number; - sessionID: string; - messageID: string; - text: string; - }; - } | { - id: string; - type: 'session.next.compaction.ended'; - properties: { - timestamp: number; - sessionID: string; - messageID: string; - reason: 'auto' | 'manual'; - text: string; - recent: string; - include?: string; - }; - } | { - id: string; - type: 'session.next.revert.staged'; - properties: { - timestamp: number; - sessionID: string; - revert: RevertState; - }; - } | { - id: string; - type: 'session.next.revert.cleared'; - properties: { - timestamp: number; - sessionID: string; - }; - } | { - id: string; - type: 'session.next.revert.committed'; - properties: { - timestamp: number; - sessionID: string; - messageID: string; - }; - } | { - id: string; - type: 'message.part.delta'; - properties: { - sessionID: string; - messageID: string; - partID: string; - field: string; - delta: string; - }; - } | { - id: string; - type: 'session.diff'; - properties: { - sessionID: string; - diff: Array; - }; - } | { - id: string; - type: 'session.error'; - properties: { - sessionID?: string; - error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | StructuredOutputError | ContextOverflowError | ContentFilterError | ApiError; - }; - } | { - id: string; - type: 'installation.updated'; - properties: { - version: string; - }; - } | { - id: string; - type: 'installation.update-available'; - properties: { - version: string; - }; - } | { - id: string; - type: 'file.edited'; - properties: { - file: string; - }; - } | { - id: string; - type: 'reference.updated'; - properties: { - [key: string]: unknown; - }; - } | { - id: string; - type: 'permission.v2.asked'; - properties: { - id: string; - sessionID: string; - action: string; - resources: Array; - save?: Array; - metadata?: { - [key: string]: unknown; - }; - source?: PermissionV2Source; - }; - } | { - id: string; - type: 'permission.v2.replied'; - properties: { - sessionID: string; - requestID: string; - reply: PermissionV2Reply; - }; - } | { - id: string; - type: 'plugin.added'; - properties: { - id: string; - }; - } | { - id: string; - type: 'project.directories.updated'; - properties: { - projectID: string; - }; - } | { - id: string; - type: 'file.watcher.updated'; - properties: { - file: string; - event: 'add' | 'change' | 'unlink'; - }; - } | { - id: string; - type: 'pty.created'; - properties: { - info: Pty; - }; - } | { - id: string; - type: 'pty.updated'; - properties: { - info: Pty; - }; - } | { - id: string; - type: 'pty.exited'; - properties: { - id: string; - exitCode: number; - }; - } | { - id: string; - type: 'pty.deleted'; - properties: { - id: string; - }; - } | { - id: string; - type: 'question.v2.asked'; - properties: { - id: string; - sessionID: string; - /** - * Questions to ask - */ - questions: Array; - tool?: QuestionV2Tool; - }; - } | { - id: string; - type: 'question.v2.replied'; - properties: { - sessionID: string; - requestID: string; - answers: Array; - }; - } | { - id: string; - type: 'question.v2.rejected'; - properties: { - sessionID: string; - requestID: string; - }; - } | { - id: string; - type: 'todo.updated'; - properties: { - sessionID: string; - todos: Array; - }; - } | { - id: string; - type: 'lsp.updated'; - properties: { - [key: string]: unknown; - }; - } | { - id: string; - type: 'permission.asked'; - properties: { - id: string; - sessionID: string; - permission: string; - patterns: Array; - metadata: { - [key: string]: unknown; - }; - always: Array; - tool?: { - messageID: string; - callID: string; - }; - }; - } | { - id: string; - type: 'permission.replied'; - properties: { - sessionID: string; - requestID: string; - reply: 'once' | 'always' | 'reject'; - }; - } | { - id: string; - type: 'tui.prompt.append'; - properties: { - text: string; - }; - } | { - id: string; - type: 'tui.command.execute'; - properties: { - command: 'session.list' | 'session.new' | 'session.share' | 'session.interrupt' | 'session.compact' | 'session.page.up' | 'session.page.down' | 'session.line.up' | 'session.line.down' | 'session.half.page.up' | 'session.half.page.down' | 'session.first' | 'session.last' | 'prompt.clear' | 'prompt.submit' | 'agent.cycle' | string; - }; - } | { - id: string; - type: 'tui.toast.show'; - properties: { - title?: string; - message: string; - variant: 'info' | 'success' | 'warning' | 'error'; - duration?: number; - }; - } | { - id: string; - type: 'tui.session.select'; - properties: { - /** - * Session ID to navigate to - */ - sessionID: string; - }; - } | { - id: string; - type: 'mcp.tools.changed'; - properties: { - server: string; - }; - } | { - id: string; - type: 'mcp.browser.open.failed'; - properties: { - mcpName: string; - url: string; - }; - } | { - id: string; - type: 'command.executed'; - properties: { - name: string; - sessionID: string; - arguments: string; - messageID: string; - }; - } | { - id: string; - type: 'project.updated'; - properties: { - id: string; - worktree: string; - vcs?: ProjectVcs; - name?: string; - icon?: ProjectIcon; - commands?: ProjectCommands; - time: ProjectTime; - sandboxes: Array; - }; - } | { - id: string; - type: 'session.status'; - properties: { - sessionID: string; - status: SessionStatus; - }; - } | { - id: string; - type: 'session.idle'; - properties: { - sessionID: string; - }; - } | { - id: string; - type: 'question.asked'; - properties: { - id: string; - sessionID: string; - /** - * Questions to ask - */ - questions: Array; - blocking?: boolean; - tool?: QuestionTool; - }; - } | { - id: string; - type: 'question.replied'; - properties: { - sessionID: string; - requestID: string; - answers: Array; - }; - } | { - id: string; - type: 'question.rejected'; - properties: { - sessionID: string; - requestID: string; - }; - } | { - id: string; - type: 'session.compacted'; - properties: { - sessionID: string; - }; - } | { - id: string; - type: 'vcs.branch.updated'; - properties: { - branch?: string; - }; - } | { - id: string; - type: 'workspace.ready'; - properties: { - name: string; - }; - } | { - id: string; - type: 'workspace.failed'; - properties: { - message: string; - }; - } | { - id: string; - type: 'workspace.status'; - properties: { - workspaceID: string; - status: 'connected' | 'connecting' | 'disconnected' | 'error'; - }; - } | { - id: string; - type: 'worktree.ready'; - properties: { - name: string; - branch?: string; - }; - } | { - id: string; - type: 'worktree.failed'; - properties: { - message: string; - }; - } | { - id: string; - type: 'server.connected'; - properties: { - [key: string]: unknown; - }; - } | { - id: string; - type: 'global.disposed'; - properties: { - [key: string]: unknown; - }; - } | { - id: string; - type: 'global.config.updated'; - properties: { - [key: string]: unknown; - }; - } | SyncEventSessionCreated | SyncEventSessionUpdated | SyncEventSessionDeleted | SyncEventMessageUpdated | SyncEventMessageRemoved | SyncEventMessagePartUpdated | SyncEventMessagePartRemoved | SyncEventSessionNextAgentSwitched | SyncEventSessionNextModelSwitched | SyncEventSessionNextMoved | SyncEventSessionNextPrompted | SyncEventSessionNextPromptAdmitted | SyncEventSessionNextContextUpdated | SyncEventSessionNextSynthetic | SyncEventSessionNextShellStarted | SyncEventSessionNextShellEnded | SyncEventSessionNextStepStarted | SyncEventSessionNextStepEnded | SyncEventSessionNextStepFailed | SyncEventSessionNextTextStarted | SyncEventSessionNextTextEnded | SyncEventSessionNextReasoningStarted | SyncEventSessionNextReasoningEnded | SyncEventSessionNextToolInputStarted | SyncEventSessionNextToolInputEnded | SyncEventSessionNextToolCalled | SyncEventSessionNextToolProgress | SyncEventSessionNextToolSuccess | SyncEventSessionNextToolFailed | SyncEventSessionNextRetried | SyncEventSessionNextCompactionStarted | SyncEventSessionNextCompactionEnded | SyncEventSessionNextRevertStaged | SyncEventSessionNextRevertCleared | SyncEventSessionNextRevertCommitted; -}; + directory: string + project?: string + workspace?: string + payload: + | EventServerInstanceDisposed + | EventSessionTurnOpen + | EventSessionTurnClose + | EventSessionQueueChanged + | EventSessionNetworkAsked + | EventSessionNetworkReplied + | EventSessionNetworkRejected + | EventSessionNetworkRestored + | EventBackgroundProcessUpdated + | EventBackgroundProcessDeleted + | EventInteractiveTerminalUpdated + | EventInteractiveTerminalData + | EventInteractiveTerminalDeleted + | EventSandboxStatusChanged + | EventSuggestionShown + | EventSuggestionAccepted + | EventSuggestionDismissed + | EventKilocodeAgentManagerStart + | EventKilocodeAgentManagerRequested + | EventKilocodeAgentManagerCancelled + | EventKilocodeNotebookRequested + | EventKilocodeNotebookCancelled + | EventKiloSessionsRemoteStatusChanged + | EventLspClientDiagnostics + | EventMemoryStatus + | EventMemoryUpdated + | EventMemoryError + | EventIndexingStatus + | EventIndexingWarning + | EventModelsDevRefreshed + | EventIntegrationUpdated + | EventIntegrationConnectionUpdated + | EventCatalogUpdated + | EventSessionCreated + | EventSessionUpdated + | EventSessionDeleted + | EventMessageUpdated + | EventMessageRemoved + | EventMessagePartUpdated + | EventMessagePartRemoved + | EventSessionNextAgentSwitched + | EventSessionNextModelSwitched + | EventSessionNextMoved + | EventSessionNextPrompted + | EventSessionNextPromptAdmitted + | EventSessionNextContextUpdated + | EventSessionNextSynthetic + | EventSessionNextShellStarted + | EventSessionNextShellEnded + | EventSessionNextStepStarted + | EventSessionNextStepEnded + | EventSessionNextStepFailed + | EventSessionNextTextStarted + | EventSessionNextTextDelta + | EventSessionNextTextEnded + | EventSessionNextReasoningStarted + | EventSessionNextReasoningDelta + | EventSessionNextReasoningEnded + | EventSessionNextToolInputStarted + | EventSessionNextToolInputDelta + | EventSessionNextToolInputEnded + | EventSessionNextToolCalled + | EventSessionNextToolProgress + | EventSessionNextToolSuccess + | EventSessionNextToolFailed + | EventSessionNextRetried + | EventSessionNextCompactionStarted + | EventSessionNextCompactionDelta + | EventSessionNextCompactionEnded + | EventSessionNextRevertStaged + | EventSessionNextRevertCleared + | EventSessionNextRevertCommitted + | EventMessagePartDelta + | EventSessionDiff + | EventSessionError + | EventInstallationUpdated + | EventInstallationUpdateAvailable + | EventFileEdited + | EventReferenceUpdated + | EventPermissionV2Asked + | EventPermissionV2Replied + | EventPluginAdded + | EventProjectDirectoriesUpdated + | EventFileWatcherUpdated + | EventPtyCreated + | EventPtyUpdated + | EventPtyExited + | EventPtyDeleted + | EventQuestionV2Asked + | EventQuestionV2Replied + | EventQuestionV2Rejected + | EventTodoUpdated + | EventLspUpdated + | EventPermissionAsked + | EventPermissionReplied + | EventTuiPromptAppend + | EventTuiCommandExecute + | EventTuiToastShow + | EventTuiSessionSelect + | EventMcpToolsChanged + | EventMcpBrowserOpenFailed + | EventCommandExecuted + | EventProjectUpdated + | EventSessionStatus + | EventSessionIdle + | EventQuestionAsked + | EventQuestionReplied + | EventQuestionRejected + | EventSessionCompacted + | EventVcsBranchUpdated + | EventWorkspaceReady + | EventWorkspaceFailed + | EventWorkspaceStatus + | EventWorktreeReady + | EventWorktreeFailed + | EventServerConnected + | EventGlobalDisposed + | EventGlobalConfigUpdated + | { + id: string + type: "models-dev.refreshed" + properties: { + [key: string]: unknown + } + } + | { + id: string + type: "integration.updated" + properties: { + [key: string]: unknown + } + } + | { + id: string + type: "integration.connection.updated" + properties: { + integrationID: string + } + } + | { + id: string + type: "catalog.updated" + properties: { + [key: string]: unknown + } + } + | { + id: string + type: "session.created" + properties: { + sessionID: string + info: Session + } + } + | { + id: string + type: "session.updated" + properties: { + sessionID: string + info: Session + } + } + | { + id: string + type: "session.deleted" + properties: { + sessionID: string + info: Session + } + } + | { + id: string + type: "message.updated" + properties: { + sessionID: string + info: Message + } + } + | { + id: string + type: "message.removed" + properties: { + sessionID: string + messageID: string + } + } + | { + id: string + type: "message.part.updated" + properties: { + sessionID: string + part: Part + time: number + } + } + | { + id: string + type: "message.part.removed" + properties: { + sessionID: string + messageID: string + partID: string + } + } + | { + id: string + type: "session.next.agent.switched" + properties: { + timestamp: number + sessionID: string + messageID: string + agent: string + } + } + | { + id: string + type: "session.next.model.switched" + properties: { + timestamp: number + sessionID: string + messageID: string + model: ModelRef + } + } + | { + id: string + type: "session.next.moved" + properties: { + timestamp: number + sessionID: string + location: LocationRef + subdirectory?: string + } + } + | { + id: string + type: "session.next.prompted" + properties: { + timestamp: number + sessionID: string + messageID: string + prompt: Prompt + delivery: "steer" | "queue" + } + } + | { + id: string + type: "session.next.prompt.admitted" + properties: { + timestamp: number + sessionID: string + messageID: string + prompt: Prompt + delivery: "steer" | "queue" + } + } + | { + id: string + type: "session.next.context.updated" + properties: { + timestamp: number + sessionID: string + messageID: string + text: string + } + } + | { + id: string + type: "session.next.synthetic" + properties: { + timestamp: number + sessionID: string + messageID: string + text: string + } + } + | { + id: string + type: "session.next.shell.started" + properties: { + timestamp: number + sessionID: string + messageID: string + callID: string + command: string + } + } + | { + id: string + type: "session.next.shell.ended" + properties: { + timestamp: number + sessionID: string + callID: string + output: string + } + } + | { + id: string + type: "session.next.step.started" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + agent: string + model: ModelRef + snapshot?: string + } + } + | { + id: string + type: "session.next.step.ended" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + finish: string + cost: number + tokens: { + input: number + output: number + reasoning: number + cache: { + read: number + write: number + } + } + snapshot?: string + files?: Array + } + } + | { + id: string + type: "session.next.step.failed" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + error: SessionErrorUnknown + } + } + | { + id: string + type: "session.next.text.started" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + textID: string + } + } + | { + id: string + type: "session.next.text.delta" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + textID: string + delta: string + } + } + | { + id: string + type: "session.next.text.ended" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + textID: string + text: string + } + } + | { + id: string + type: "session.next.reasoning.started" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + reasoningID: string + providerMetadata?: LlmProviderMetadata + } + } + | { + id: string + type: "session.next.reasoning.delta" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + reasoningID: string + delta: string + } + } + | { + id: string + type: "session.next.reasoning.ended" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + reasoningID: string + text: string + providerMetadata?: LlmProviderMetadata + } + } + | { + id: string + type: "session.next.tool.input.started" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + callID: string + name: string + } + } + | { + id: string + type: "session.next.tool.input.delta" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + callID: string + delta: string + } + } + | { + id: string + type: "session.next.tool.input.ended" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + callID: string + text: string + } + } + | { + id: string + type: "session.next.tool.called" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + callID: string + tool: string + input: { + [key: string]: unknown + } + provider: { + executed: boolean + metadata?: LlmProviderMetadata + } + } + } + | { + id: string + type: "session.next.tool.progress" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + callID: string + structured: { + [key: string]: unknown + } + content: Array + } + } + | { + id: string + type: "session.next.tool.success" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + callID: string + structured: { + [key: string]: unknown + } + content: Array + outputPaths?: Array + result?: unknown + provider: { + executed: boolean + metadata?: LlmProviderMetadata + } + } + } + | { + id: string + type: "session.next.tool.failed" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + callID: string + error: SessionErrorUnknown + result?: unknown + provider: { + executed: boolean + metadata?: LlmProviderMetadata + } + } + } + | { + id: string + type: "session.next.retried" + properties: { + timestamp: number + sessionID: string + attempt: number + error: SessionNextRetryError + } + } + | { + id: string + type: "session.next.compaction.started" + properties: { + timestamp: number + sessionID: string + messageID: string + reason: "auto" | "manual" + } + } + | { + id: string + type: "session.next.compaction.delta" + properties: { + timestamp: number + sessionID: string + messageID: string + text: string + } + } + | { + id: string + type: "session.next.compaction.ended" + properties: { + timestamp: number + sessionID: string + messageID: string + reason: "auto" | "manual" + text: string + recent: string + include?: string + } + } + | { + id: string + type: "session.next.revert.staged" + properties: { + timestamp: number + sessionID: string + revert: RevertState + } + } + | { + id: string + type: "session.next.revert.cleared" + properties: { + timestamp: number + sessionID: string + } + } + | { + id: string + type: "session.next.revert.committed" + properties: { + timestamp: number + sessionID: string + messageID: string + } + } + | { + id: string + type: "message.part.delta" + properties: { + sessionID: string + messageID: string + partID: string + field: string + delta: string + } + } + | { + id: string + type: "session.diff" + properties: { + sessionID: string + diff: Array + } + } + | { + id: string + type: "session.error" + properties: { + sessionID?: string + error?: + | ProviderAuthError + | UnknownError + | MessageOutputLengthError + | MessageAbortedError + | StructuredOutputError + | ContextOverflowError + | ContentFilterError + | ApiError + } + } + | { + id: string + type: "installation.updated" + properties: { + version: string + } + } + | { + id: string + type: "installation.update-available" + properties: { + version: string + } + } + | { + id: string + type: "file.edited" + properties: { + file: string + } + } + | { + id: string + type: "reference.updated" + properties: { + [key: string]: unknown + } + } + | { + id: string + type: "permission.v2.asked" + properties: { + id: string + sessionID: string + action: string + resources: Array + save?: Array + metadata?: { + [key: string]: unknown + } + source?: PermissionV2Source + } + } + | { + id: string + type: "permission.v2.replied" + properties: { + sessionID: string + requestID: string + reply: PermissionV2Reply + } + } + | { + id: string + type: "plugin.added" + properties: { + id: string + } + } + | { + id: string + type: "project.directories.updated" + properties: { + projectID: string + } + } + | { + id: string + type: "file.watcher.updated" + properties: { + file: string + event: "add" | "change" | "unlink" + } + } + | { + id: string + type: "pty.created" + properties: { + info: Pty + } + } + | { + id: string + type: "pty.updated" + properties: { + info: Pty + } + } + | { + id: string + type: "pty.exited" + properties: { + id: string + exitCode: number + } + } + | { + id: string + type: "pty.deleted" + properties: { + id: string + } + } + | { + id: string + type: "question.v2.asked" + properties: { + id: string + sessionID: string + /** + * Questions to ask + */ + questions: Array + tool?: QuestionV2Tool + } + } + | { + id: string + type: "question.v2.replied" + properties: { + sessionID: string + requestID: string + answers: Array + } + } + | { + id: string + type: "question.v2.rejected" + properties: { + sessionID: string + requestID: string + } + } + | { + id: string + type: "todo.updated" + properties: { + sessionID: string + todos: Array + } + } + | { + id: string + type: "lsp.updated" + properties: { + [key: string]: unknown + } + } + | { + id: string + type: "permission.asked" + properties: { + id: string + sessionID: string + permission: string + patterns: Array + metadata: { + [key: string]: unknown + } + always: Array + tool?: { + messageID: string + callID: string + } + } + } + | { + id: string + type: "permission.replied" + properties: { + sessionID: string + requestID: string + reply: "once" | "always" | "reject" + } + } + | { + id: string + type: "tui.prompt.append" + properties: { + text: string + } + } + | { + id: string + type: "tui.command.execute" + properties: { + command: + | "session.list" + | "session.new" + | "session.share" + | "session.interrupt" + | "session.compact" + | "session.page.up" + | "session.page.down" + | "session.line.up" + | "session.line.down" + | "session.half.page.up" + | "session.half.page.down" + | "session.first" + | "session.last" + | "prompt.clear" + | "prompt.submit" + | "agent.cycle" + | string + } + } + | { + id: string + type: "tui.toast.show" + properties: { + title?: string + message: string + variant: "info" | "success" | "warning" | "error" + duration?: number + } + } + | { + id: string + type: "tui.session.select" + properties: { + /** + * Session ID to navigate to + */ + sessionID: string + } + } + | { + id: string + type: "mcp.tools.changed" + properties: { + server: string + } + } + | { + id: string + type: "mcp.browser.open.failed" + properties: { + mcpName: string + url: string + } + } + | { + id: string + type: "command.executed" + properties: { + name: string + sessionID: string + arguments: string + messageID: string + } + } + | { + id: string + type: "project.updated" + properties: { + id: string + worktree: string + vcs?: ProjectVcs + name?: string + icon?: ProjectIcon + commands?: ProjectCommands + time: ProjectTime + sandboxes: Array + } + } + | { + id: string + type: "session.status" + properties: { + sessionID: string + status: SessionStatus + } + } + | { + id: string + type: "session.idle" + properties: { + sessionID: string + } + } + | { + id: string + type: "question.asked" + properties: { + id: string + sessionID: string + /** + * Questions to ask + */ + questions: Array + blocking?: boolean + tool?: QuestionTool + } + } + | { + id: string + type: "question.replied" + properties: { + sessionID: string + requestID: string + answers: Array + } + } + | { + id: string + type: "question.rejected" + properties: { + sessionID: string + requestID: string + } + } + | { + id: string + type: "session.compacted" + properties: { + sessionID: string + } + } + | { + id: string + type: "vcs.branch.updated" + properties: { + branch?: string + } + } + | { + id: string + type: "workspace.ready" + properties: { + name: string + } + } + | { + id: string + type: "workspace.failed" + properties: { + message: string + } + } + | { + id: string + type: "workspace.status" + properties: { + workspaceID: string + status: "connected" | "connecting" | "disconnected" | "error" + } + } + | { + id: string + type: "worktree.ready" + properties: { + name: string + branch?: string + } + } + | { + id: string + type: "worktree.failed" + properties: { + message: string + } + } + | { + id: string + type: "server.connected" + properties: { + [key: string]: unknown + } + } + | { + id: string + type: "global.disposed" + properties: { + [key: string]: unknown + } + } + | { + id: string + type: "global.config.updated" + properties: { + [key: string]: unknown + } + } + | SyncEventSessionCreated + | SyncEventSessionUpdated + | SyncEventSessionDeleted + | SyncEventMessageUpdated + | SyncEventMessageRemoved + | SyncEventMessagePartUpdated + | SyncEventMessagePartRemoved + | SyncEventSessionNextAgentSwitched + | SyncEventSessionNextModelSwitched + | SyncEventSessionNextMoved + | SyncEventSessionNextPrompted + | SyncEventSessionNextPromptAdmitted + | SyncEventSessionNextContextUpdated + | SyncEventSessionNextSynthetic + | SyncEventSessionNextShellStarted + | SyncEventSessionNextShellEnded + | SyncEventSessionNextStepStarted + | SyncEventSessionNextStepEnded + | SyncEventSessionNextStepFailed + | SyncEventSessionNextTextStarted + | SyncEventSessionNextTextEnded + | SyncEventSessionNextReasoningStarted + | SyncEventSessionNextReasoningEnded + | SyncEventSessionNextToolInputStarted + | SyncEventSessionNextToolInputEnded + | SyncEventSessionNextToolCalled + | SyncEventSessionNextToolProgress + | SyncEventSessionNextToolSuccess + | SyncEventSessionNextToolFailed + | SyncEventSessionNextRetried + | SyncEventSessionNextCompactionStarted + | SyncEventSessionNextCompactionEnded + | SyncEventSessionNextRevertStaged + | SyncEventSessionNextRevertCleared + | SyncEventSessionNextRevertCommitted +} /** * Log level */ -export type LogLevel = 'DEBUG' | 'INFO' | 'WARN' | 'ERROR'; +export type LogLevel = "DEBUG" | "INFO" | "WARN" | "ERROR" /** * Server configuration for the kilo serve command */ export type ServerConfig = { - port?: number; - hostname?: string; - mdns?: boolean; - mdnsDomain?: string; - cors?: Array; -}; + port?: number + hostname?: string + mdns?: boolean + mdnsDomain?: string + cors?: Array +} export type IndexingConfig = { - enabled?: boolean; - provider?: 'kilo' | 'openai' | 'ollama' | 'openai-compatible' | 'gemini' | 'mistral' | 'vercel-ai-gateway' | 'bedrock' | 'openrouter' | 'voyage'; - model?: string | null; - dimension?: number | null; - vectorStore?: 'lancedb' | 'qdrant'; - kilo?: { - apiKey?: string; - baseUrl?: string; - organizationId?: string; - }; - openai?: { - apiKey?: string; - }; - ollama?: { - baseUrl?: string; - }; - 'openai-compatible'?: { - baseUrl?: string; - apiKey?: string; - }; - gemini?: { - apiKey?: string; - }; - mistral?: { - apiKey?: string; - }; - 'vercel-ai-gateway'?: { - apiKey?: string; - }; - bedrock?: { - region?: string; - profile?: string; - }; - openrouter?: { - apiKey?: string; - specificProvider?: string; - }; - voyage?: { - apiKey?: string; - }; - qdrant?: { - url?: string; - apiKey?: string; - }; - lancedb?: { - directory?: string; - }; - searchMinScore?: number; - searchMaxResults?: number; - embeddingBatchSize?: number; - scannerMaxBatchRetries?: number; - fileExtensions?: Array; -}; + enabled?: boolean + provider?: + | "kilo" + | "openai" + | "ollama" + | "openai-compatible" + | "gemini" + | "mistral" + | "vercel-ai-gateway" + | "bedrock" + | "openrouter" + | "voyage" + model?: string | null + dimension?: number | null + vectorStore?: "lancedb" | "qdrant" + kilo?: { + apiKey?: string + baseUrl?: string + organizationId?: string + } + openai?: { + apiKey?: string + } + ollama?: { + baseUrl?: string + } + "openai-compatible"?: { + baseUrl?: string + apiKey?: string + } + gemini?: { + apiKey?: string + } + mistral?: { + apiKey?: string + } + "vercel-ai-gateway"?: { + apiKey?: string + } + bedrock?: { + region?: string + profile?: string + } + openrouter?: { + apiKey?: string + specificProvider?: string + } + voyage?: { + apiKey?: string + } + qdrant?: { + url?: string + apiKey?: string + } + lancedb?: { + directory?: string + } + searchMinScore?: number + searchMaxResults?: number + embeddingBatchSize?: number + scannerMaxBatchRetries?: number + fileExtensions?: Array +} -export type PermissionActionConfig = 'ask' | 'allow' | 'deny'; +export type PermissionActionConfig = "ask" | "allow" | "deny" export type PermissionObjectConfig = { - [key: string]: PermissionActionConfig; -}; + [key: string]: PermissionActionConfig +} -export type PermissionRuleConfig = PermissionActionConfig | PermissionObjectConfig; +export type PermissionRuleConfig = PermissionActionConfig | PermissionObjectConfig -export type PermissionConfig = PermissionActionConfig | { - read?: PermissionRuleConfig; - edit?: PermissionRuleConfig; - glob?: PermissionRuleConfig; - grep?: PermissionRuleConfig; - list?: PermissionRuleConfig; - bash?: PermissionRuleConfig; - task?: PermissionRuleConfig; - external_directory?: PermissionRuleConfig; - todowrite?: PermissionActionConfig; - question?: PermissionActionConfig; - webfetch?: PermissionActionConfig; - websearch?: PermissionActionConfig; - lsp?: PermissionRuleConfig; - doom_loop?: PermissionActionConfig; - skill?: PermissionRuleConfig; - agent_manager?: PermissionRuleConfig; - notebook_read?: PermissionRuleConfig; - notebook_edit?: PermissionRuleConfig; - notebook_execute?: PermissionRuleConfig; - [key: string]: PermissionRuleConfig | PermissionActionConfig | undefined; -}; +export type PermissionConfig = + | PermissionActionConfig + | { + read?: PermissionRuleConfig + edit?: PermissionRuleConfig + glob?: PermissionRuleConfig + grep?: PermissionRuleConfig + list?: PermissionRuleConfig + bash?: PermissionRuleConfig + task?: PermissionRuleConfig + external_directory?: PermissionRuleConfig + todowrite?: PermissionActionConfig + question?: PermissionActionConfig + webfetch?: PermissionActionConfig + websearch?: PermissionActionConfig + lsp?: PermissionRuleConfig + doom_loop?: PermissionActionConfig + skill?: PermissionRuleConfig + agent_manager?: PermissionRuleConfig + notebook_read?: PermissionRuleConfig + notebook_edit?: PermissionRuleConfig + notebook_execute?: PermissionRuleConfig + [key: string]: PermissionRuleConfig | PermissionActionConfig | undefined + } export type AgentConfig = { - model?: string; - variant?: string; - temperature?: number; - top_p?: number; - prompt?: string; - tools?: { - [key: string]: boolean; - }; - disable?: boolean; - description?: string; - mode?: 'subagent' | 'primary' | 'all'; - displayName?: string; - source?: string; - hidden?: boolean; - options?: { - [key: string]: unknown; - }; - /** - * Hex color code (e.g., #FF5733) or theme color (e.g., primary) - */ - color?: string | 'primary' | 'secondary' | 'accent' | 'success' | 'warning' | 'error' | 'info'; - steps?: number; - maxSteps?: number; - permission?: PermissionConfig; - requirements?: { - skills?: Array; - mcps?: Array; + model?: string + variant?: string + temperature?: number + top_p?: number + prompt?: string + tools?: { + [key: string]: boolean + } + disable?: boolean + description?: string + mode?: "subagent" | "primary" | "all" + displayName?: string + source?: string + hidden?: boolean + options?: { + [key: string]: unknown + } + /** + * Hex color code (e.g., #FF5733) or theme color (e.g., primary) + */ + color?: string | "primary" | "secondary" | "accent" | "success" | "warning" | "error" | "info" + steps?: number + maxSteps?: number + permission?: PermissionConfig + requirements?: { + skills?: Array + mcps?: Array + vscode_extensions?: Array<{ + name: string + id: string + }> + } + [key: string]: + | unknown + | string + | number + | { + [key: string]: boolean + } + | boolean + | "subagent" + | "primary" + | "all" + | { + [key: string]: unknown + } + | string + | "primary" + | "secondary" + | "accent" + | "success" + | "warning" + | "error" + | "info" + | number + | PermissionConfig + | { + skills?: Array + mcps?: Array vscode_extensions?: Array<{ - name: string; - id: string; - }>; - }; - [key: string]: unknown | string | number | { - [key: string]: boolean; - } | boolean | 'subagent' | 'primary' | 'all' | { - [key: string]: unknown; - } | string | 'primary' | 'secondary' | 'accent' | 'success' | 'warning' | 'error' | 'info' | number | PermissionConfig | { - skills?: Array; - mcps?: Array; - vscode_extensions?: Array<{ - name: string; - id: string; - }>; - } | undefined; -}; + name: string + id: string + }> + } + | undefined +} export type ProviderConfig = { - api?: string; - name?: string; - env?: Array; - id?: string; - npm?: string; - whitelist?: Array; - blacklist?: Array; - options?: { - apiKey?: string; - baseURL?: string; - enterpriseUrl?: string; - setCacheKey?: boolean; - /** - * Timeout in milliseconds for full requests to this provider. Set to false to disable timeout. - */ - timeout?: number | false; - /** - * Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout. - */ - headerTimeout?: number | false; - chunkTimeout?: number; - [key: string]: unknown | string | boolean | number | false | number | false | number | undefined; - }; - models?: { + api?: string + name?: string + env?: Array + id?: string + npm?: string + whitelist?: Array + blacklist?: Array + options?: { + apiKey?: string + baseURL?: string + enterpriseUrl?: string + setCacheKey?: boolean + /** + * Timeout in milliseconds for full requests to this provider. Set to false to disable timeout. + */ + timeout?: number | false + /** + * Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout. + */ + headerTimeout?: number | false + chunkTimeout?: number + [key: string]: unknown | string | boolean | number | false | number | false | number | undefined + } + models?: { + [key: string]: { + id?: string + name?: string + family?: string + prompt?: "codex" | "gemini" | "beast" | "anthropic" | "trinity" | "anthropic_without_todo" | "ling" | "gpt55" + isFree?: boolean + ai_sdk_provider?: "alibaba" | "anthropic" | "mistral" | "openai" | "openai-compatible" | "openrouter" + release_date?: string + attachment?: boolean + reasoning?: boolean + temperature?: boolean + tool_call?: boolean + interleaved?: + | true + | { + field: "reasoning" | "reasoning_content" | "reasoning_details" + } + cost?: { + input: number + output: number + cache_read?: number + cache_write?: number + context_over_200k?: { + input: number + output: number + cache_read?: number + cache_write?: number + } + } + limit?: { + context: number + input?: number + output: number + } + modalities?: { + input?: Array<"text" | "audio" | "image" | "video" | "pdf"> + output?: Array<"text" | "audio" | "image" | "video" | "pdf"> + } + experimental?: boolean + status?: "alpha" | "beta" | "deprecated" | "active" + provider?: { + npm?: string + api?: string + } + options?: { + [key: string]: unknown + } + headers?: { + [key: string]: string + } + /** + * Variant-specific configuration + */ + variants?: { [key: string]: { - id?: string; - name?: string; - family?: string; - prompt?: 'codex' | 'gemini' | 'beast' | 'anthropic' | 'trinity' | 'anthropic_without_todo' | 'ling' | 'gpt55'; - isFree?: boolean; - ai_sdk_provider?: 'alibaba' | 'anthropic' | 'mistral' | 'openai' | 'openai-compatible' | 'openrouter'; - release_date?: string; - attachment?: boolean; - reasoning?: boolean; - temperature?: boolean; - tool_call?: boolean; - interleaved?: true | { - field: 'reasoning' | 'reasoning_content' | 'reasoning_details'; - }; - cost?: { - input: number; - output: number; - cache_read?: number; - cache_write?: number; - context_over_200k?: { - input: number; - output: number; - cache_read?: number; - cache_write?: number; - }; - }; - limit?: { - context: number; - input?: number; - output: number; - }; - modalities?: { - input?: Array<'text' | 'audio' | 'image' | 'video' | 'pdf'>; - output?: Array<'text' | 'audio' | 'image' | 'video' | 'pdf'>; - }; - experimental?: boolean; - status?: 'alpha' | 'beta' | 'deprecated' | 'active'; - provider?: { - npm?: string; - api?: string; - }; - options?: { - [key: string]: unknown; - }; - headers?: { - [key: string]: string; - }; - /** - * Variant-specific configuration - */ - variants?: { - [key: string]: { - disabled?: boolean; - [key: string]: unknown | boolean | undefined; - }; - }; - }; - }; -}; + disabled?: boolean + [key: string]: unknown | boolean | undefined + } + } + } + } +} export type McpLocalConfig = { - type: 'local'; - command: Array; - environment?: { - [key: string]: string; - }; - env?: { - [key: string]: string; - }; - enabled?: boolean; - timeout?: number; -}; + type: "local" + command: Array + environment?: { + [key: string]: string + } + env?: { + [key: string]: string + } + enabled?: boolean + timeout?: number +} export type McpOAuthConfig = { - clientId?: string; - clientSecret?: string; - scope?: string; - callbackPort?: number; - redirectUri?: string; -}; + clientId?: string + clientSecret?: string + scope?: string + callbackPort?: number + redirectUri?: string +} export type McpRemoteConfig = { - /** - * Type of MCP server connection - */ - type: 'remote'; - /** - * URL of the remote MCP server - */ - url: string; - enabled?: boolean; - headers?: { - [key: string]: string; - }; - /** - * OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection. - */ - oauth?: McpOAuthConfig | false; - timeout?: number; -}; + /** + * Type of MCP server connection + */ + type: "remote" + /** + * URL of the remote MCP server + */ + url: string + enabled?: boolean + headers?: { + [key: string]: string + } + /** + * OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection. + */ + oauth?: McpOAuthConfig | false + timeout?: number +} /** * @deprecated Always uses stretch layout. */ -export type LayoutConfig = 'auto' | 'stretch'; +export type LayoutConfig = "auto" | "stretch" export type ImageAttachmentConfig = { - auto_resize?: boolean; - max_width?: number; - max_height?: number; - max_base64_bytes?: number; -}; + auto_resize?: boolean + max_width?: number + max_height?: number + max_base64_bytes?: number +} export type AttachmentConfig = { - image?: ImageAttachmentConfig; -}; + image?: ImageAttachmentConfig +} export type Config = { - $schema?: string; - shell?: string; - logLevel?: LogLevel; - server?: ServerConfig; - command?: { - [key: string]: { - template: string; - description?: string; - agent?: string; - model?: string; - variant?: string; - subtask?: boolean; - }; - }; - skills?: { - paths?: Array; - urls?: Array; - }; - references?: { - [key: string]: string | ConfigV2ReferenceGit | ConfigV2ReferenceLocal; - }; - reference?: { - [key: string]: string | ConfigV2ReferenceGit | ConfigV2ReferenceLocal; - }; - watcher?: { - ignore?: Array; - }; - snapshot?: boolean; - plugin?: Array + urls?: Array + } + references?: { + [key: string]: string | ConfigV2ReferenceGit | ConfigV2ReferenceLocal + } + reference?: { + [key: string]: string | ConfigV2ReferenceGit | ConfigV2ReferenceLocal + } + watcher?: { + ignore?: Array + } + snapshot?: boolean + plugin?: Array< + | string + | [ string, { - [key: string]: unknown; + [key: string]: unknown + }, + ] + > + share?: "manual" | "auto" | "disabled" + autoshare?: boolean + /** + * Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications + */ + autoupdate?: boolean | "notify" + disabled_providers?: Array + enabled_providers?: Array + remote_control?: boolean + auto_collapse_reasoning?: boolean + indexing?: IndexingConfig + console?: { + /** + * Width of the Kilo Console project context sidebar in pixels + */ + context_sidebar_width?: number + diff_style?: "unified" | "split" + } + terminal_command_display?: "expanded" | "collapsed" + code_edit_display?: "expanded" | "collapsed" + hide_prompt_training_models?: boolean + /** + * Sandbox configuration for agent tools + */ + sandbox?: { + /** + * Enable sandbox confinement for new sessions (default: false) + */ + enabled?: boolean + /** + * Control outbound network access from sandboxed tools (default: deny) + */ + network?: "allow" | "deny" + /** + * Additional filesystem paths that sandboxed tools may write to + */ + writable_paths?: Array + /** + * Exact network destinations sandboxed tools may access while network restriction is enabled + */ + allowed_hosts?: Array + } + model?: string + small_model?: string + subagent_model?: string + subagent_variant?: string + subagent_variant_overrides?: { + [key: string]: string + } + default_agent?: string + username?: string + mode?: { + build?: AgentConfig + plan?: AgentConfig + [key: string]: AgentConfig | undefined + } + agent?: { + plan?: AgentConfig + build?: AgentConfig + debug?: AgentConfig + orchestrator?: AgentConfig + ask?: AgentConfig + general?: AgentConfig + explore?: AgentConfig + scout?: AgentConfig + title?: AgentConfig + summary?: AgentConfig + compaction?: AgentConfig + [key: string]: AgentConfig | undefined + } + provider?: { + [key: string]: ProviderConfig | null + } + mcp?: { + [key: string]: + | McpLocalConfig + | McpRemoteConfig + | { + enabled: boolean } - ]>; - share?: 'manual' | 'auto' | 'disabled'; - autoshare?: boolean; - /** - * Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications - */ - autoupdate?: boolean | 'notify'; - disabled_providers?: Array; - enabled_providers?: Array; - remote_control?: boolean; - auto_collapse_reasoning?: boolean; - indexing?: IndexingConfig; - console?: { - /** - * Width of the Kilo Console project context sidebar in pixels - */ - context_sidebar_width?: number; - diff_style?: 'unified' | 'split'; - }; - terminal_command_display?: 'expanded' | 'collapsed'; - code_edit_display?: 'expanded' | 'collapsed'; - hide_prompt_training_models?: boolean; - /** - * Sandbox configuration for agent tools - */ - sandbox?: { - /** - * Enable sandbox confinement for new sessions (default: false) - */ - enabled?: boolean; - /** - * Control outbound network access from sandboxed tools (default: deny) - */ - network?: 'allow' | 'deny'; - /** - * Additional filesystem paths that sandboxed tools may write to - */ - writable_paths?: Array; - /** - * Exact network destinations sandboxed tools may access while network restriction is enabled - */ - allowed_hosts?: Array; - }; - model?: string; - small_model?: string; - subagent_model?: string; - subagent_variant?: string; - subagent_variant_overrides?: { - [key: string]: string; - }; - default_agent?: string; - username?: string; - mode?: { - build?: AgentConfig; - plan?: AgentConfig; - [key: string]: AgentConfig | undefined; - }; - agent?: { - plan?: AgentConfig; - build?: AgentConfig; - debug?: AgentConfig; - orchestrator?: AgentConfig; - ask?: AgentConfig; - general?: AgentConfig; - explore?: AgentConfig; - scout?: AgentConfig; - title?: AgentConfig; - summary?: AgentConfig; - compaction?: AgentConfig; - [key: string]: AgentConfig | undefined; - }; - provider?: { - [key: string]: ProviderConfig | null; - }; - mcp?: { - [key: string]: McpLocalConfig | McpRemoteConfig | { - enabled: boolean; - }; - }; - /** - * Enable or configure formatters. Omit or set to false to disable, true to enable built-ins, or an object to enable built-ins with overrides. - */ - formatter?: boolean | { + } + /** + * Enable or configure formatters. Omit or set to false to disable, true to enable built-ins, or an object to enable built-ins with overrides. + */ + formatter?: + | boolean + | { [key: string]: { - disabled?: boolean; - command?: Array; - environment?: { - [key: string]: string; - }; - extensions?: Array; - }; - }; + disabled?: boolean + command?: Array + environment?: { + [key: string]: string + } + extensions?: Array + } + } + /** + * Enable or configure LSP servers. Omit or set to false to disable, true to enable built-ins, or an object to enable built-ins with overrides. + */ + lsp?: + | boolean + | { + [key: string]: + | { + disabled: true + } + | { + command: Array + extensions?: Array + disabled?: boolean + env?: { + [key: string]: string + } + initialization?: { + [key: string]: unknown + } + } + } + instructions?: Array + layout?: LayoutConfig + permission?: PermissionConfig + tools?: { + [key: string]: boolean + } + attachment?: AttachmentConfig + enterprise?: { + url?: string + } + commit_message?: { + prompt?: string + } + tool_output?: { + max_lines?: number + max_bytes?: number + } + compaction?: { + auto?: boolean /** - * Enable or configure LSP servers. Omit or set to false to disable, true to enable built-ins, or an object to enable built-ins with overrides. + * Percentage of the model input/context window that triggers automatic compaction. The reserved safety buffer still applies if it would compact sooner. */ - lsp?: boolean | { - [key: string]: { - disabled: true; - } | { - command: Array; - extensions?: Array; - disabled?: boolean; - env?: { - [key: string]: string; - }; - initialization?: { - [key: string]: unknown; - }; - }; - }; - instructions?: Array; - layout?: LayoutConfig; - permission?: PermissionConfig; - tools?: { - [key: string]: boolean; - }; - attachment?: AttachmentConfig; - enterprise?: { - url?: string; - }; - commit_message?: { - prompt?: string; - }; - tool_output?: { - max_lines?: number; - max_bytes?: number; - }; - compaction?: { - auto?: boolean; - /** - * Percentage of the model input/context window that triggers automatic compaction. The reserved safety buffer still applies if it would compact sooner. - */ - threshold_percent?: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - prune?: boolean; - tail_turns?: number; - preserve_recent_tokens?: number; - reserved?: number; - }; - experimental?: { - disable_paste_summary?: boolean; - batch_tool?: boolean; - codebase_search?: boolean; - image_generation?: boolean; - image_generation_model?: string; - agent_requirements?: boolean; - native_notebook_tools?: boolean; - speech_to_text_model?: string; - openTelemetry?: boolean; - primary_tools?: Array; - continue_loop_on_deny?: boolean; - sandbox?: boolean; - sandbox_restrict_network?: boolean; - sandbox_writable_paths?: Array; - swe_pruner?: boolean; - swe_pruner_model?: string; - mcp_timeout?: number; - policies?: Array; - }; -}; + threshold_percent?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + prune?: boolean + tail_turns?: number + preserve_recent_tokens?: number + reserved?: number + } + experimental?: { + disable_paste_summary?: boolean + batch_tool?: boolean + codebase_search?: boolean + image_generation?: boolean + image_generation_model?: string + agent_requirements?: boolean + native_notebook_tools?: boolean + speech_to_text_model?: string + openTelemetry?: boolean + primary_tools?: Array + continue_loop_on_deny?: boolean + sandbox?: boolean + sandbox_restrict_network?: boolean + sandbox_writable_paths?: Array + swe_pruner?: boolean + swe_pruner_model?: string + mcp_timeout?: number + policies?: Array + } +} export type Model = { - id: string; - providerID: string; - api: { - id: string; - url: string; - npm: string; - }; - name: string; - family?: string; - capabilities: { - temperature: boolean; - reasoning: boolean; - attachment: boolean; - toolcall: boolean; - input: { - text: boolean; - audio: boolean; - image: boolean; - video: boolean; - pdf: boolean; - }; - output: { - text: boolean; - audio: boolean; - image: boolean; - video: boolean; - pdf: boolean; - }; - interleaved: boolean | { - field: 'reasoning' | 'reasoning_content' | 'reasoning_details'; - }; - }; - cost: { - input: number; - output: number; - cache: { - read: number; - write: number; - }; - tiers?: Array<{ - input: number; - output: number; - cache: { - read: number; - write: number; - }; - tier: { - type: 'context'; - size: number; - }; - }>; - experimentalOver200K?: { - input: number; - output: number; - cache: { - read: number; - write: number; - }; - }; - }; - limit: { - context: number; - input?: number; - output: number; - }; - status: 'alpha' | 'beta' | 'deprecated' | 'active'; - options: { - [key: string]: unknown; - }; - headers: { - [key: string]: string; - }; - release_date: string; - variants?: { - [key: string]: { - [key: string]: unknown; - }; - }; - recommendedIndex?: number; - prompt?: 'codex' | 'gemini' | 'beast' | 'anthropic' | 'trinity' | 'anthropic_without_todo' | 'ling' | 'gpt55'; - isFree?: boolean; - mayTrainOnYourPrompts?: boolean; - hasUserByokAvailable?: boolean; - terminalBench?: { - overallScore: number; - avgAttemptCostUsd: number; - }; - autoRouting?: { - models: Array; - }; - ai_sdk_provider?: 'alibaba' | 'anthropic' | 'mistral' | 'openai' | 'openai-compatible' | 'openrouter'; -}; + id: string + providerID: string + api: { + id: string + url: string + npm: string + } + name: string + family?: string + capabilities: { + temperature: boolean + reasoning: boolean + attachment: boolean + toolcall: boolean + input: { + text: boolean + audio: boolean + image: boolean + video: boolean + pdf: boolean + } + output: { + text: boolean + audio: boolean + image: boolean + video: boolean + pdf: boolean + } + interleaved: + | boolean + | { + field: "reasoning" | "reasoning_content" | "reasoning_details" + } + } + cost: { + input: number + output: number + cache: { + read: number + write: number + } + tiers?: Array<{ + input: number + output: number + cache: { + read: number + write: number + } + tier: { + type: "context" + size: number + } + }> + experimentalOver200K?: { + input: number + output: number + cache: { + read: number + write: number + } + } + } + limit: { + context: number + input?: number + output: number + } + status: "alpha" | "beta" | "deprecated" | "active" + options: { + [key: string]: unknown + } + headers: { + [key: string]: string + } + release_date: string + variants?: { + [key: string]: { + [key: string]: unknown + } + } + recommendedIndex?: number + prompt?: "codex" | "gemini" | "beast" | "anthropic" | "trinity" | "anthropic_without_todo" | "ling" | "gpt55" + isFree?: boolean + mayTrainOnYourPrompts?: boolean + hasUserByokAvailable?: boolean + terminalBench?: { + overallScore: number + avgAttemptCostUsd: number + } + autoRouting?: { + models: Array + } + ai_sdk_provider?: "alibaba" | "anthropic" | "mistral" | "openai" | "openai-compatible" | "openrouter" +} export type Provider = { - id: string; - name: string; - description?: string; - source: 'env' | 'config' | 'custom' | 'api'; - env: Array; - key?: string; - metadata?: { - noteKey?: string; - icon?: string; - priority?: number; - }; - options: { - [key: string]: unknown; - }; - models: { - [key: string]: Model; - }; -}; + id: string + name: string + description?: string + source: "env" | "config" | "custom" | "api" + env: Array + key?: string + metadata?: { + noteKey?: string + icon?: string + priority?: number + } + options: { + [key: string]: unknown + } + models: { + [key: string]: Model + } +} export type ExperimentalCapabilities = { - backgroundSubagents: boolean; -}; + backgroundSubagents: boolean +} export type ConsoleState = { - consoleManagedProviders: Array; - activeOrgName?: string; - switchableOrgCount: number; -}; + consoleManagedProviders: Array + activeOrgName?: string + switchableOrgCount: number +} export type EffectHttpApiErrorInternalServerError = { - _tag: 'InternalServerError'; -}; + _tag: "InternalServerError" +} export type ToolListItem = { - id: string; - description: string; - parameters: unknown; -}; + id: string + description: string + parameters: unknown +} -export type ToolList = Array; +export type ToolList = Array -export type ToolIds = Array; +export type ToolIds = Array export type WorktreeListItem = { - directory: string; - managed: boolean; -}; + directory: string + managed: boolean +} export type WorktreeError = { - name: 'WorktreeNotGitError' | 'WorktreeNameGenerationFailedError' | 'WorktreeCreateFailedError' | 'WorktreeStartCommandFailedError' | 'WorktreeRemoveFailedError' | 'WorktreeResetFailedError' | 'WorktreeListFailedError'; - data: { - message: string; - }; -}; + name: + | "WorktreeNotGitError" + | "WorktreeNameGenerationFailedError" + | "WorktreeCreateFailedError" + | "WorktreeStartCommandFailedError" + | "WorktreeRemoveFailedError" + | "WorktreeResetFailedError" + | "WorktreeListFailedError" + data: { + message: string + } +} export type WorktreeCreateInput = { - name?: string; - /** - * Additional startup script to run after the project's start command - */ - startCommand?: string; -}; + name?: string + /** + * Additional startup script to run after the project's start command + */ + startCommand?: string +} export type Worktree = { - name: string; - branch?: string; - directory: string; -}; + name: string + branch?: string + directory: string +} export type WorktreeRemoveInput = { - directory: string; -}; + directory: string +} export type WorktreeResetInput = { - directory: string; -}; + directory: string +} export type WorktreeDiffItem = { - file?: string; - patch?: string; - additions: number; - deletions: number; - status?: 'added' | 'deleted' | 'modified'; - before: string; - after: string; - tracked: boolean; - generatedLike: boolean; - summarized: boolean; - stamp: string; -}; + file?: string + patch?: string + additions: number + deletions: number + status?: "added" | "deleted" | "modified" + before: string + after: string + tracked: boolean + generatedLike: boolean + summarized: boolean + stamp: string +} export type SnapshotSummaryFileDiff = { - file?: string; - additions: number; - deletions: number; - status?: 'added' | 'deleted' | 'modified'; -}; + file?: string + additions: number + deletions: number + status?: "added" | "deleted" | "modified" +} export type ProjectSummary = { - id: string; - name?: string; - worktree: string; -}; + id: string + name?: string + worktree: string +} export type GlobalSession = { - id: string; - slug: string; - projectID: string; - workspaceID?: string; - directory: string; - path?: string; - parentID?: string; - summary?: { - additions: number; - deletions: number; - files: number; - diffs?: Array; - }; - cost?: number; - tokens?: { - input: number; - output: number; - reasoning: number; - cache: { - read: number; - write: number; - }; - }; - share?: { - url: string; - }; - title: string; - agent?: string; - model?: { - id: string; - providerID: string; - variant?: string; - }; - version: string; - metadata?: { - [key: string]: unknown; - }; - time: { - created: number; - updated: number; - compacting?: number; - archived?: number; - }; - permission?: PermissionRuleset; - revert?: { - messageID: string; - partID?: string; - snapshot?: string; - diff?: string; - workspace?: 'restored' | 'snapshots-disabled' | 'unavailable'; - }; - project: ProjectSummary | null; - worktreeName?: string; -}; + id: string + slug: string + projectID: string + workspaceID?: string + directory: string + path?: string + parentID?: string + summary?: { + additions: number + deletions: number + files: number + diffs?: Array + } + cost?: number + tokens?: { + input: number + output: number + reasoning: number + cache: { + read: number + write: number + } + } + share?: { + url: string + } + title: string + agent?: string + model?: { + id: string + providerID: string + variant?: string + } + version: string + metadata?: { + [key: string]: unknown + } + time: { + created: number + updated: number + compacting?: number + archived?: number + } + permission?: PermissionRuleset + revert?: { + messageID: string + partID?: string + snapshot?: string + diff?: string + workspace?: "restored" | "snapshots-disabled" | "unavailable" + } + project: ProjectSummary | null + worktreeName?: string +} export type McpResource = { - name: string; - uri: string; - description?: string; - mimeType?: string; - client: string; -}; + name: string + uri: string + description?: string + mimeType?: string + client: string +} export type Symbol = { - name: string; - kind: number; - location: { - uri: string; - range: Range; - }; -}; + name: string + kind: number + location: { + uri: string + range: Range + } +} export type FileNode = { - name: string; - path: string; - absolute: string; - type: 'file' | 'directory'; - ignored: boolean; -}; + name: string + path: string + absolute: string + type: "file" | "directory" + ignored: boolean +} export type FileContent = { - type: 'text' | 'binary'; - content: string; - diff?: string; - patch?: { - oldFileName: string; - newFileName: string; - oldHeader?: string; - newHeader?: string; - hunks: Array<{ - oldStart: number; - oldLines: number; - newStart: number; - newLines: number; - lines: Array; - }>; - index?: string; - }; - encoding?: 'base64'; - mimeType?: string; -}; + type: "text" | "binary" + content: string + diff?: string + patch?: { + oldFileName: string + newFileName: string + oldHeader?: string + newHeader?: string + hunks: Array<{ + oldStart: number + oldLines: number + newStart: number + newLines: number + lines: Array + }> + index?: string + } + encoding?: "base64" + mimeType?: string +} export type File = { - path: string; - added: number; - removed: number; - status: 'added' | 'deleted' | 'modified'; -}; + path: string + added: number + removed: number + status: "added" | "deleted" | "modified" +} export type Path = { - home: string; - state: string; - config: string; - worktree: string; - directory: string; -}; + home: string + state: string + config: string + worktree: string + directory: string +} export type VcsInfo = { - branch?: string; - default_branch?: string; -}; + branch?: string + default_branch?: string +} export type VcsFileStatus = { - file: string; - additions: number; - deletions: number; - status: 'added' | 'deleted' | 'modified'; -}; + file: string + additions: number + deletions: number + status: "added" | "deleted" | "modified" +} export type VcsFileDiff = { - file: string; - patch?: string; - additions: number; - deletions: number; - status?: 'added' | 'deleted' | 'modified'; -}; + file: string + patch?: string + additions: number + deletions: number + status?: "added" | "deleted" | "modified" +} export type VcsApplyError = { - name: 'VcsApplyError'; - data: { - message: string; - reason: 'non-git' | 'not-clean'; - }; -}; + name: "VcsApplyError" + data: { + message: string + reason: "non-git" | "not-clean" + } +} export type Command = { - name: string; - description?: string; - agent?: string; - model?: string; - source?: 'command' | 'mcp' | 'skill'; - template: string; - subtask?: boolean; - hints: Array; -}; + name: string + description?: string + agent?: string + model?: string + source?: "command" | "mcp" | "skill" + template: string + subtask?: boolean + hints: Array +} export type Agent = { - name: string; - displayName?: string; - source?: string; - description?: string; - deprecated?: boolean; - mode: 'subagent' | 'primary' | 'all'; - native?: boolean; - hidden?: boolean; - topP?: number; - temperature?: number; - color?: string; - permission: PermissionRuleset; - model?: { - modelID: string; - providerID: string; - }; - variant?: string; - prompt?: string; - options: { - [key: string]: unknown; - }; - requirements?: { - skills?: Array; - mcps?: Array; - vscode_extensions?: Array<{ - name: string; - id: string; - }>; - }; - steps?: number; -}; + name: string + displayName?: string + source?: string + description?: string + deprecated?: boolean + mode: "subagent" | "primary" | "all" + native?: boolean + hidden?: boolean + topP?: number + temperature?: number + color?: string + permission: PermissionRuleset + model?: { + modelID: string + providerID: string + } + variant?: string + prompt?: string + options: { + [key: string]: unknown + } + requirements?: { + skills?: Array + mcps?: Array + vscode_extensions?: Array<{ + name: string + id: string + }> + } + steps?: number +} export type LspStatus = { - id: string; - name: string; - root: string; - status: 'connected' | 'error'; -}; + id: string + name: string + root: string + status: "connected" | "error" +} export type FormatterStatus = { - name: string; - extensions: Array; - enabled: boolean; -}; + name: string + extensions: Array + enabled: boolean +} export type McpStatusConnected = { - status: 'connected'; -}; + status: "connected" +} export type McpStatusDisabled = { - status: 'disabled'; -}; + status: "disabled" +} export type McpStatusFailed = { - status: 'failed'; - error: string; -}; + status: "failed" + error: string +} export type McpStatusNeedsAuth = { - status: 'needs_auth'; -}; + status: "needs_auth" +} export type McpStatusNeedsClientRegistration = { - status: 'needs_client_registration'; - error: string; -}; + status: "needs_client_registration" + error: string +} -export type McpStatus = McpStatusConnected | McpStatusDisabled | McpStatusFailed | McpStatusNeedsAuth | McpStatusNeedsClientRegistration; +export type McpStatus = + | McpStatusConnected + | McpStatusDisabled + | McpStatusFailed + | McpStatusNeedsAuth + | McpStatusNeedsClientRegistration export type McpUnsupportedOAuthError = { - error: string; -}; + error: string +} export type McpServerNotFoundError = { - _tag: 'McpServerNotFoundError'; - name: string; - message: string; -}; + _tag: "McpServerNotFoundError" + name: string + message: string +} export type Project = { - id: string; - worktree: string; - vcs?: ProjectVcs; - name?: string; - icon?: ProjectIcon; - commands?: ProjectCommands; - time: ProjectTime; - sandboxes: Array; -}; + id: string + worktree: string + vcs?: ProjectVcs + name?: string + icon?: ProjectIcon + commands?: ProjectCommands + time: ProjectTime + sandboxes: Array +} export type ProjectNotFoundError = { - _tag: 'ProjectNotFoundError'; - projectID: string; - message: string; -}; + _tag: "ProjectNotFoundError" + projectID: string + message: string +} export type PtyNotFoundError = { - _tag: 'PtyNotFoundError'; - ptyID: string; - message: string; -}; + _tag: "PtyNotFoundError" + ptyID: string + message: string +} export type PtyForbiddenError = { - _tag: 'PtyForbiddenError'; - message: string; -}; + _tag: "PtyForbiddenError" + message: string +} export type QuestionRequest = { - id: string; - sessionID: string; - /** - * Questions to ask - */ - questions: Array; - blocking?: boolean; - tool?: QuestionTool; -}; + id: string + sessionID: string + /** + * Questions to ask + */ + questions: Array + blocking?: boolean + tool?: QuestionTool +} export type QuestionNotFoundError = { - _tag: 'QuestionNotFoundError'; - requestID: string; - message: string; -}; + _tag: "QuestionNotFoundError" + requestID: string + message: string +} export type PermissionRequest = { - id: string; - sessionID: string; - permission: string; - patterns: Array; - metadata: { - [key: string]: unknown; - }; - always: Array; - tool?: { - messageID: string; - callID: string; - }; -}; + id: string + sessionID: string + permission: string + patterns: Array + metadata: { + [key: string]: unknown + } + always: Array + tool?: { + messageID: string + callID: string + } +} export type PermissionNotFoundError = { - _tag: 'PermissionNotFoundError'; - requestID: string; - message: string; -}; + _tag: "PermissionNotFoundError" + requestID: string + message: string +} export type ProviderAuthMethod = { - type: 'oauth' | 'api'; - label: string; - prompts?: Array<{ - type: 'text'; - key: string; - message: string; - placeholder?: string; + type: "oauth" | "api" + label: string + prompts?: Array< + | { + type: "text" + key: string + message: string + placeholder?: string when?: { - key: string; - op: 'eq' | 'neq'; - value: string; - }; - } | { - type: 'select'; - key: string; - message: string; + key: string + op: "eq" | "neq" + value: string + } + } + | { + type: "select" + key: string + message: string options: Array<{ - label: string; - value: string; - hint?: string; - }>; + label: string + value: string + hint?: string + }> when?: { - key: string; - op: 'eq' | 'neq'; - value: string; - }; - }>; -}; + key: string + op: "eq" | "neq" + value: string + } + } + > +} export type ProviderAuthAuthorization = { - url: string; - method: 'auto' | 'code'; - instructions: string; -}; + url: string + method: "auto" | "code" + instructions: string +} export type ProviderAuthError1 = { - name: 'BadRequest' | 'ProviderAuthOauthMissing' | 'ProviderAuthOauthCodeMissing' | 'ProviderAuthOauthCallbackFailed' | 'ProviderAuthValidationFailed'; - data: { - providerID?: string; - field?: string; - message?: string; - kind?: string; - }; -}; + name: + | "BadRequest" + | "ProviderAuthOauthMissing" + | "ProviderAuthOauthCodeMissing" + | "ProviderAuthOauthCallbackFailed" + | "ProviderAuthValidationFailed" + data: { + providerID?: string + field?: string + message?: string + kind?: string + } +} export type Session1 = { - id: string; - slug: string; - projectID: string; - workspaceID?: string; - directory: string; - path?: string; - parentID?: string; - summary?: { - additions: number; - deletions: number; - files: number; - diffs?: Array; - }; - cost?: number; - tokens?: { - input: number; - output: number; - reasoning: number; - cache: { - read: number; - write: number; - }; - }; - share?: { - url: string; - }; - title: string; - agent?: string; - model?: { - id: string; - providerID: string; - variant?: string; - }; - version: string; - metadata?: { - [key: string]: unknown; - }; - time: { - created: number; - updated: number; - compacting?: number; - archived?: number; - }; - permission?: PermissionRuleset; - revert?: { - messageID: string; - partID?: string; - snapshot?: string; - diff?: string; - workspace?: 'restored' | 'snapshots-disabled' | 'unavailable'; - }; -}; + id: string + slug: string + projectID: string + workspaceID?: string + directory: string + path?: string + parentID?: string + summary?: { + additions: number + deletions: number + files: number + diffs?: Array + } + cost?: number + tokens?: { + input: number + output: number + reasoning: number + cache: { + read: number + write: number + } + } + share?: { + url: string + } + title: string + agent?: string + model?: { + id: string + providerID: string + variant?: string + } + version: string + metadata?: { + [key: string]: unknown + } + time: { + created: number + updated: number + compacting?: number + archived?: number + } + permission?: PermissionRuleset + revert?: { + messageID: string + partID?: string + snapshot?: string + diff?: string + workspace?: "restored" | "snapshots-disabled" | "unavailable" + } +} export type Session2 = { - id: string; - slug: string; - projectID: string; - workspaceID?: string; - directory: string; - path?: string; - parentID?: string; - summary?: { - additions: number; - deletions: number; - files: number; - diffs?: Array; - }; - cost?: number; - tokens?: { - input: number; - output: number; - reasoning: number; - cache: { - read: number; - write: number; - }; - }; - share?: { - url: string; - }; - title: string; - agent?: string; - model?: { - id: string; - providerID: string; - variant?: string; - }; - version: string; - metadata?: { - [key: string]: unknown; - }; - time: { - created: number; - updated: number; - compacting?: number; - archived?: number; - }; - permission?: PermissionRuleset; - revert?: { - messageID: string; - partID?: string; - snapshot?: string; - diff?: string; - workspace?: 'restored' | 'snapshots-disabled' | 'unavailable'; - }; -}; + id: string + slug: string + projectID: string + workspaceID?: string + directory: string + path?: string + parentID?: string + summary?: { + additions: number + deletions: number + files: number + diffs?: Array + } + cost?: number + tokens?: { + input: number + output: number + reasoning: number + cache: { + read: number + write: number + } + } + share?: { + url: string + } + title: string + agent?: string + model?: { + id: string + providerID: string + variant?: string + } + version: string + metadata?: { + [key: string]: unknown + } + time: { + created: number + updated: number + compacting?: number + archived?: number + } + permission?: PermissionRuleset + revert?: { + messageID: string + partID?: string + snapshot?: string + diff?: string + workspace?: "restored" | "snapshots-disabled" | "unavailable" + } +} export type NotFoundError = { - name: 'NotFoundError'; - data: { - message: string; - }; -}; + name: "NotFoundError" + data: { + message: string + } +} export type Session3 = { - id: string; - slug: string; - projectID: string; - workspaceID?: string; - directory: string; - path?: string; - parentID?: string; - summary?: { - additions: number; - deletions: number; - files: number; - diffs?: Array; - }; - cost?: number; - tokens?: { - input: number; - output: number; - reasoning: number; - cache: { - read: number; - write: number; - }; - }; - share?: { - url: string; - }; - title: string; - agent?: string; - model?: { - id: string; - providerID: string; - variant?: string; - }; - version: string; - metadata?: { - [key: string]: unknown; - }; - time: { - created: number; - updated: number; - compacting?: number; - archived?: number; - }; - permission?: PermissionRuleset; - revert?: { - messageID: string; - partID?: string; - snapshot?: string; - diff?: string; - workspace?: 'restored' | 'snapshots-disabled' | 'unavailable'; - }; -}; + id: string + slug: string + projectID: string + workspaceID?: string + directory: string + path?: string + parentID?: string + summary?: { + additions: number + deletions: number + files: number + diffs?: Array + } + cost?: number + tokens?: { + input: number + output: number + reasoning: number + cache: { + read: number + write: number + } + } + share?: { + url: string + } + title: string + agent?: string + model?: { + id: string + providerID: string + variant?: string + } + version: string + metadata?: { + [key: string]: unknown + } + time: { + created: number + updated: number + compacting?: number + archived?: number + } + permission?: PermissionRuleset + revert?: { + messageID: string + partID?: string + snapshot?: string + diff?: string + workspace?: "restored" | "snapshots-disabled" | "unavailable" + } +} export type Session4 = { - id: string; - slug: string; - projectID: string; - workspaceID?: string; - directory: string; - path?: string; - parentID?: string; - summary?: { - additions: number; - deletions: number; - files: number; - diffs?: Array; - }; - cost?: number; - tokens?: { - input: number; - output: number; - reasoning: number; - cache: { - read: number; - write: number; - }; - }; - share?: { - url: string; - }; - title: string; - agent?: string; - model?: { - id: string; - providerID: string; - variant?: string; - }; - version: string; - metadata?: { - [key: string]: unknown; - }; - time: { - created: number; - updated: number; - compacting?: number; - archived?: number; - }; - permission?: PermissionRuleset; - revert?: { - messageID: string; - partID?: string; - snapshot?: string; - diff?: string; - workspace?: 'restored' | 'snapshots-disabled' | 'unavailable'; - }; -}; + id: string + slug: string + projectID: string + workspaceID?: string + directory: string + path?: string + parentID?: string + summary?: { + additions: number + deletions: number + files: number + diffs?: Array + } + cost?: number + tokens?: { + input: number + output: number + reasoning: number + cache: { + read: number + write: number + } + } + share?: { + url: string + } + title: string + agent?: string + model?: { + id: string + providerID: string + variant?: string + } + version: string + metadata?: { + [key: string]: unknown + } + time: { + created: number + updated: number + compacting?: number + archived?: number + } + permission?: PermissionRuleset + revert?: { + messageID: string + partID?: string + snapshot?: string + diff?: string + workspace?: "restored" | "snapshots-disabled" | "unavailable" + } +} export type Session5 = { - id: string; - slug: string; - projectID: string; - workspaceID?: string; - directory: string; - path?: string; - parentID?: string; - summary?: { - additions: number; - deletions: number; - files: number; - diffs?: Array; - }; - cost?: number; - tokens?: { - input: number; - output: number; - reasoning: number; - cache: { - read: number; - write: number; - }; - }; - share?: { - url: string; - }; - title: string; - agent?: string; - model?: { - id: string; - providerID: string; - variant?: string; - }; - version: string; - metadata?: { - [key: string]: unknown; - }; - time: { - created: number; - updated: number; - compacting?: number; - archived?: number; - }; - permission?: PermissionRuleset; - revert?: { - messageID: string; - partID?: string; - snapshot?: string; - diff?: string; - workspace?: 'restored' | 'snapshots-disabled' | 'unavailable'; - }; -}; + id: string + slug: string + projectID: string + workspaceID?: string + directory: string + path?: string + parentID?: string + summary?: { + additions: number + deletions: number + files: number + diffs?: Array + } + cost?: number + tokens?: { + input: number + output: number + reasoning: number + cache: { + read: number + write: number + } + } + share?: { + url: string + } + title: string + agent?: string + model?: { + id: string + providerID: string + variant?: string + } + version: string + metadata?: { + [key: string]: unknown + } + time: { + created: number + updated: number + compacting?: number + archived?: number + } + permission?: PermissionRuleset + revert?: { + messageID: string + partID?: string + snapshot?: string + diff?: string + workspace?: "restored" | "snapshots-disabled" | "unavailable" + } +} export type Session6 = { - id: string; - slug: string; - projectID: string; - workspaceID?: string; - directory: string; - path?: string; - parentID?: string; - summary?: { - additions: number; - deletions: number; - files: number; - diffs?: Array; - }; - cost?: number; - tokens?: { - input: number; - output: number; - reasoning: number; - cache: { - read: number; - write: number; - }; - }; - share?: { - url: string; - }; - title: string; - agent?: string; - model?: { - id: string; - providerID: string; - variant?: string; - }; - version: string; - metadata?: { - [key: string]: unknown; - }; - time: { - created: number; - updated: number; - compacting?: number; - archived?: number; - }; - permission?: PermissionRuleset; - revert?: { - messageID: string; - partID?: string; - snapshot?: string; - diff?: string; - workspace?: 'restored' | 'snapshots-disabled' | 'unavailable'; - }; -}; + id: string + slug: string + projectID: string + workspaceID?: string + directory: string + path?: string + parentID?: string + summary?: { + additions: number + deletions: number + files: number + diffs?: Array + } + cost?: number + tokens?: { + input: number + output: number + reasoning: number + cache: { + read: number + write: number + } + } + share?: { + url: string + } + title: string + agent?: string + model?: { + id: string + providerID: string + variant?: string + } + version: string + metadata?: { + [key: string]: unknown + } + time: { + created: number + updated: number + compacting?: number + archived?: number + } + permission?: PermissionRuleset + revert?: { + messageID: string + partID?: string + snapshot?: string + diff?: string + workspace?: "restored" | "snapshots-disabled" | "unavailable" + } +} export type Session7 = { - id: string; - slug: string; - projectID: string; - workspaceID?: string; - directory: string; - path?: string; - parentID?: string; - summary?: { - additions: number; - deletions: number; - files: number; - diffs?: Array; - }; - cost?: number; - tokens?: { - input: number; - output: number; - reasoning: number; - cache: { - read: number; - write: number; - }; - }; - share?: { - url: string; - }; - title: string; - agent?: string; - model?: { - id: string; - providerID: string; - variant?: string; - }; - version: string; - metadata?: { - [key: string]: unknown; - }; - time: { - created: number; - updated: number; - compacting?: number; - archived?: number; - }; - permission?: PermissionRuleset; - revert?: { - messageID: string; - partID?: string; - snapshot?: string; - diff?: string; - workspace?: 'restored' | 'snapshots-disabled' | 'unavailable'; - }; -}; + id: string + slug: string + projectID: string + workspaceID?: string + directory: string + path?: string + parentID?: string + summary?: { + additions: number + deletions: number + files: number + diffs?: Array + } + cost?: number + tokens?: { + input: number + output: number + reasoning: number + cache: { + read: number + write: number + } + } + share?: { + url: string + } + title: string + agent?: string + model?: { + id: string + providerID: string + variant?: string + } + version: string + metadata?: { + [key: string]: unknown + } + time: { + created: number + updated: number + compacting?: number + archived?: number + } + permission?: PermissionRuleset + revert?: { + messageID: string + partID?: string + snapshot?: string + diff?: string + workspace?: "restored" | "snapshots-disabled" | "unavailable" + } +} export type TextPartInput = { - id?: string; - type: 'text'; - text: string; - synthetic?: boolean; - ignored?: boolean; - time?: { - start: number; - end?: number; - }; - metadata?: { - [key: string]: unknown; - }; -}; + id?: string + type: "text" + text: string + synthetic?: boolean + ignored?: boolean + time?: { + start: number + end?: number + } + metadata?: { + [key: string]: unknown + } +} export type FilePartInput = { - id?: string; - type: 'file'; - mime: string; - filename?: string; - url: string; - source?: FilePartSource; -}; + id?: string + type: "file" + mime: string + filename?: string + url: string + source?: FilePartSource +} export type AgentPartInput = { - id?: string; - type: 'agent'; - name: string; - source?: { - value: string; - start: number; - end: number; - }; -}; + id?: string + type: "agent" + name: string + source?: { + value: string + start: number + end: number + } +} export type SubtaskPartInput = { - id?: string; - type: 'subtask'; - prompt: string; - description: string; - agent: string; - model?: { - providerID: string; - modelID: string; - }; - command?: string; -}; + id?: string + type: "subtask" + prompt: string + description: string + agent: string + model?: { + providerID: string + modelID: string + } + command?: string +} export type SessionBusyError = { - _tag: 'SessionBusyError'; - sessionID: string; - message: string; -}; + _tag: "SessionBusyError" + sessionID: string + message: string +} export type Session8 = { - id: string; - slug: string; - projectID: string; - workspaceID?: string; - directory: string; - path?: string; - parentID?: string; - summary?: { - additions: number; - deletions: number; - files: number; - diffs?: Array; - }; - cost?: number; - tokens?: { - input: number; - output: number; - reasoning: number; - cache: { - read: number; - write: number; - }; - }; - share?: { - url: string; - }; - title: string; - agent?: string; - model?: { - id: string; - providerID: string; - variant?: string; - }; - version: string; - metadata?: { - [key: string]: unknown; - }; - time: { - created: number; - updated: number; - compacting?: number; - archived?: number; - }; - permission?: PermissionRuleset; - revert?: { - messageID: string; - partID?: string; - snapshot?: string; - diff?: string; - workspace?: 'restored' | 'snapshots-disabled' | 'unavailable'; - }; -}; + id: string + slug: string + projectID: string + workspaceID?: string + directory: string + path?: string + parentID?: string + summary?: { + additions: number + deletions: number + files: number + diffs?: Array + } + cost?: number + tokens?: { + input: number + output: number + reasoning: number + cache: { + read: number + write: number + } + } + share?: { + url: string + } + title: string + agent?: string + model?: { + id: string + providerID: string + variant?: string + } + version: string + metadata?: { + [key: string]: unknown + } + time: { + created: number + updated: number + compacting?: number + archived?: number + } + permission?: PermissionRuleset + revert?: { + messageID: string + partID?: string + snapshot?: string + diff?: string + workspace?: "restored" | "snapshots-disabled" | "unavailable" + } +} export type Session9 = { - id: string; - slug: string; - projectID: string; - workspaceID?: string; - directory: string; - path?: string; - parentID?: string; - summary?: { - additions: number; - deletions: number; - files: number; - diffs?: Array; - }; - cost?: number; - tokens?: { - input: number; - output: number; - reasoning: number; - cache: { - read: number; - write: number; - }; - }; - share?: { - url: string; - }; - title: string; - agent?: string; - model?: { - id: string; - providerID: string; - variant?: string; - }; - version: string; - metadata?: { - [key: string]: unknown; - }; - time: { - created: number; - updated: number; - compacting?: number; - archived?: number; - }; - permission?: PermissionRuleset; - revert?: { - messageID: string; - partID?: string; - snapshot?: string; - diff?: string; - workspace?: 'restored' | 'snapshots-disabled' | 'unavailable'; - }; -}; + id: string + slug: string + projectID: string + workspaceID?: string + directory: string + path?: string + parentID?: string + summary?: { + additions: number + deletions: number + files: number + diffs?: Array + } + cost?: number + tokens?: { + input: number + output: number + reasoning: number + cache: { + read: number + write: number + } + } + share?: { + url: string + } + title: string + agent?: string + model?: { + id: string + providerID: string + variant?: string + } + version: string + metadata?: { + [key: string]: unknown + } + time: { + created: number + updated: number + compacting?: number + archived?: number + } + permission?: PermissionRuleset + revert?: { + messageID: string + partID?: string + snapshot?: string + diff?: string + workspace?: "restored" | "snapshots-disabled" | "unavailable" + } +} export type EventTuiPromptAppend2 = { - type: 'tui.prompt.append'; - properties: { - text: string; - }; -}; + type: "tui.prompt.append" + properties: { + text: string + } +} export type EventTuiCommandExecute2 = { - type: 'tui.command.execute'; - properties: { - command: 'session.list' | 'session.new' | 'session.share' | 'session.interrupt' | 'session.compact' | 'session.page.up' | 'session.page.down' | 'session.line.up' | 'session.line.down' | 'session.half.page.up' | 'session.half.page.down' | 'session.first' | 'session.last' | 'prompt.clear' | 'prompt.submit' | 'agent.cycle' | string; - }; -}; + type: "tui.command.execute" + properties: { + command: + | "session.list" + | "session.new" + | "session.share" + | "session.interrupt" + | "session.compact" + | "session.page.up" + | "session.page.down" + | "session.line.up" + | "session.line.down" + | "session.half.page.up" + | "session.half.page.down" + | "session.first" + | "session.last" + | "prompt.clear" + | "prompt.submit" + | "agent.cycle" + | string + } +} export type EventTuiToastShow2 = { - type: 'tui.toast.show'; - properties: { - title?: string; - message: string; - variant: 'info' | 'success' | 'warning' | 'error'; - duration?: number; - }; -}; + type: "tui.toast.show" + properties: { + title?: string + message: string + variant: "info" | "success" | "warning" | "error" + duration?: number + } +} export type EventTuiSessionSelect2 = { - type: 'tui.session.select'; - properties: { - /** - * Session ID to navigate to - */ - sessionID: string; - }; -}; + type: "tui.session.select" + properties: { + /** + * Session ID to navigate to + */ + sessionID: string + } +} export type Workspace = { - id: string; - type: string; - name: string; - branch?: string | null; - directory?: string | null; - extra?: unknown | null; - projectID: string; - timeUsed: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; -}; + id: string + type: string + name: string + branch?: string | null + directory?: string | null + extra?: unknown | null + projectID: string + timeUsed: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" +} export type WorkspaceCreateError = { - name: 'WorkspaceCreateError'; - data: { - message: string; - }; -}; + name: "WorkspaceCreateError" + data: { + message: string + } +} export type WorkspaceWarpError = { - name: 'WorkspaceWarpError'; - data: { - message: string; - }; -}; + name: "WorkspaceWarpError" + data: { + message: string + } +} export type BackgroundProcessLogs = { - id: string; - sessionID: string; - output: string; -}; + id: string + sessionID: string + output: string +} export type CommitMessageNoChangesError = { - message: string; -}; + message: string +} export type ConfigOverlayResponse = { - scope: 'global' | 'project'; - effective: Config; - global: Config; - project: Config; - sources: Array<{ - order: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - kind: string; - scope: string; - label: string; - source: string; - path?: string; - exists: boolean; - editable: boolean; - reason?: string; - }>; - targets: { - global?: string; - project?: string; - active?: string; - }; - fields: { - [key: string]: { - key: string; - path: Array; - value?: unknown; - global?: unknown; - local?: unknown; - source: 'project' | 'global' | 'system' | 'default'; - inherited: boolean; - overridden: boolean; - editable: boolean; - reason?: string; - }; - }; - collections: { - [key: string]: Array<{ - key: string; - path: Array; - value?: unknown; - global?: unknown; - local?: unknown; - source: 'project' | 'global' | 'system' | 'default'; - inherited: boolean; - overridden: boolean; - editable: boolean; - reason?: string; - }>; - }; -}; + scope: "global" | "project" + effective: Config + global: Config + project: Config + sources: Array<{ + order: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + kind: string + scope: string + label: string + source: string + path?: string + exists: boolean + editable: boolean + reason?: string + }> + targets: { + global?: string + project?: string + active?: string + } + fields: { + [key: string]: { + key: string + path: Array + value?: unknown + global?: unknown + local?: unknown + source: "project" | "global" | "system" | "default" + inherited: boolean + overridden: boolean + editable: boolean + reason?: string + } + } + collections: { + [key: string]: Array<{ + key: string + path: Array + value?: unknown + global?: unknown + local?: unknown + source: "project" | "global" | "system" | "default" + inherited: boolean + overridden: boolean + editable: boolean + reason?: string + }> + } +} export type ConfigSourcesResponse = { - sources: Array<{ - order: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - kind: string; - scope: string; - label: string; - source: string; - path?: string; - exists: boolean; - editable: boolean; - reason?: string; - }>; -}; + sources: Array<{ + order: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + kind: string + scope: string + label: string + source: string + path?: string + exists: boolean + editable: boolean + reason?: string + }> +} export type ConfigRulesResponse = { - scope: 'project'; - target: string; - files: Array<{ - name: string; - path: string; - exists: boolean; - editable: boolean; - content: string; - }>; -}; + scope: "project" + target: string + files: Array<{ + name: string + path: string + exists: boolean + editable: boolean + content: string + }> +} export type ConfigModelStateResponse = { - model: { - [key: string]: { - providerID: string; - modelID: string; - }; - }; - recent: Array<{ - providerID: string; - modelID: string; - }>; - favorite: Array<{ - providerID: string; - modelID: string; - }>; - variant: { - [key: string]: string; - }; -}; + model: { + [key: string]: { + providerID: string + modelID: string + } + } + recent: Array<{ + providerID: string + modelID: string + }> + favorite: Array<{ + providerID: string + modelID: string + }> + variant: { + [key: string]: string + } +} export type TuiConfigGetResponse = { - $schema?: string; - theme?: string; - keybinds?: { - [key: string]: string; - }; - plugin?: Array; - plugin_enabled?: { - [key: string]: boolean; - }; - /** - * Status icon style shown in terminal titles - */ - title_icon?: 'none' | 'unicode' | 'emojis'; - scroll_speed?: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - scroll_acceleration?: { - enabled: boolean; - }; - diff_style?: 'auto' | 'stacked'; - mouse?: boolean; - attention?: { - enabled?: boolean; - notifications?: boolean; - sound?: boolean; - volume?: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - }; -}; + [key: string]: unknown + }, + ] + > + plugin_enabled?: { + [key: string]: boolean + } + /** + * Status icon style shown in terminal titles + */ + title_icon?: "none" | "unicode" | "emojis" + scroll_speed?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + scroll_acceleration?: { + enabled: boolean + } + diff_style?: "auto" | "stacked" + mouse?: boolean + attention?: { + enabled?: boolean + notifications?: boolean + sound?: boolean + volume?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + } +} export type TuiKeybindInfo = { - id: string; - label: string; - group: string; - default: string; - description: string; -}; + id: string + label: string + group: string + default: string + description: string +} export type TuiKeybindListResponse = { - keybinds: Array; -}; + keybinds: Array +} export type KiloEmbeddingModelCatalog = { - defaultModel: string; - models: Array<{ - id: string; - name: string; - dimension: number; - scoreThreshold: number; - note?: string; - }>; - aliases: { - [key: string]: string; - }; -}; + defaultModel: string + models: Array<{ + id: string + name: string + dimension: number + scoreThreshold: number + note?: string + }> + aliases: { + [key: string]: string + } +} export type ConflictError = { - _tag: 'ConflictError'; - message: string; - resource?: string; -}; + _tag: "ConflictError" + message: string + resource?: string +} export type InteractiveTerminalSnapshot = { - info: InteractiveTerminalInfo; - output: string; - cursor: number; -}; + info: InteractiveTerminalInfo + output: string + cursor: number +} export type InteractiveTerminalWriteInput = { - data: string; -}; + data: string +} export type InteractiveTerminalResizeInput = { - cols: number; - rows: number; -}; + cols: number + rows: number +} export type EffectHttpApiErrorUnauthorized = { - _tag: 'Unauthorized'; -}; + _tag: "Unauthorized" +} export type EffectHttpApiErrorServiceUnavailable = { - _tag: 'ServiceUnavailable'; -}; + _tag: "ServiceUnavailable" +} export type CloudSessionImportError = { - error: string; -}; + error: string +} export type AgentRequirementResult = { - agent: string; - directory: string; - enabled: boolean; - state: 'disabled' | 'ready' | 'blocked' | 'error'; - skills: Array<{ - name: string; - status: 'ready' | 'missing' | 'error'; - message?: string; - }>; - mcps: Array<{ - name: string; - status: 'ready' | 'missing' | 'error'; - message?: string; - }>; - vscode_extensions: Array<{ - name: string; - id: string; - }>; - error?: { - code: 'unknown_agent' | 'malformed_declaration' | 'discovery_failed' | 'mcp_status_failed'; - message: string; - }; -}; + agent: string + directory: string + enabled: boolean + state: "disabled" | "ready" | "blocked" | "error" + skills: Array<{ + name: string + status: "ready" | "missing" | "error" + message?: string + }> + mcps: Array<{ + name: string + status: "ready" | "missing" | "error" + message?: string + }> + vscode_extensions: Array<{ + name: string + id: string + }> + error?: { + code: "unknown_agent" | "malformed_declaration" | "discovery_failed" | "mcp_status_failed" + message: string + } +} export type NotebookOutput = { - mime: string; - text?: string; - name?: string; - message?: string; - stack?: string; - omitted?: boolean; - truncated?: boolean; -}; + mime: string + text?: string + name?: string + message?: string + stack?: string + omitted?: boolean + truncated?: boolean +} export type NotebookCell = { - /** - * Zero-based cell index - */ - index: number; - kind: 'code' | 'markdown'; - language: string; - source: string; - execution?: { - order?: number; - success?: boolean; - started?: number; - ended?: number; - }; - outputs?: Array; -}; + /** + * Zero-based cell index + */ + index: number + kind: "code" | "markdown" + language: string + source: string + execution?: { + order?: number + success?: boolean + started?: number + ended?: number + } + outputs?: Array +} export type NotebookReadResult = { - operation: 'read'; - path: string; - requestPath: string; - /** - * Opaque notebook content revision; pass it back unchanged and do not parse or increment it - */ - revision: string; - cells: Array; - truncated?: boolean; -}; + operation: "read" + path: string + requestPath: string + /** + * Opaque notebook content revision; pass it back unchanged and do not parse or increment it + */ + revision: string + cells: Array + truncated?: boolean +} export type NotebookEditResult = { - operation: 'edit'; - path: string; - requestPath: string; - /** - * Opaque notebook content revision; pass it back unchanged and do not parse or increment it - */ - revision: string; - /** - * Zero-based cell index - */ - index: number; - action: 'insert' | 'replace' | 'delete' | 'create'; - cell?: NotebookCell; -}; + operation: "edit" + path: string + requestPath: string + /** + * Opaque notebook content revision; pass it back unchanged and do not parse or increment it + */ + revision: string + /** + * Zero-based cell index + */ + index: number + action: "insert" | "replace" | "delete" | "create" + cell?: NotebookCell +} export type NotebookExecuteResult = { - operation: 'execute'; - path: string; - requestPath: string; - /** - * Opaque notebook content revision; pass it back unchanged and do not parse or increment it - */ - revision: string; - /** - * Zero-based cell index - */ - index: number; - status: 'success' | 'error'; - outputs: Array; - truncated?: boolean; -}; + operation: "execute" + path: string + requestPath: string + /** + * Opaque notebook content revision; pass it back unchanged and do not parse or increment it + */ + revision: string + /** + * Zero-based cell index + */ + index: number + status: "success" | "error" + outputs: Array + truncated?: boolean +} -export type NotebookResult = NotebookReadResult | NotebookEditResult | NotebookExecuteResult; +export type NotebookResult = NotebookReadResult | NotebookEditResult | NotebookExecuteResult export type NotebookFailure = { - code: 'already_exists' | 'cancelled' | 'closed' | 'disconnected' | 'execution_failed' | 'invalid_cell' | 'invalid_path' | 'no_kernel' | 'not_found' | 'stale_revision' | 'timeout' | 'unsupported'; - message: string; - path?: string; - /** - * Zero-based cell index - */ - index?: number; - /** - * Opaque notebook content revision; pass it back unchanged and do not parse or increment it - */ - currentRevision?: string; -}; + code: + | "already_exists" + | "cancelled" + | "closed" + | "disconnected" + | "execution_failed" + | "invalid_cell" + | "invalid_path" + | "no_kernel" + | "not_found" + | "stale_revision" + | "timeout" + | "unsupported" + message: string + path?: string + /** + * Zero-based cell index + */ + index?: number + /** + * Opaque notebook content revision; pass it back unchanged and do not parse or increment it + */ + currentRevision?: string +} -export type AgentManagerActivity = 'idle' | 'busy' | 'retry' | 'offline'; +export type AgentManagerActivity = "idle" | "busy" | "retry" | "offline" -export type AgentManagerAttention = Array<'permission' | 'question'>; +export type AgentManagerAttention = Array<"permission" | "question"> export type AgentManagerSessionSummary = { - id: string; - name: string; - activity: AgentManagerActivity; - attention?: AgentManagerAttention; -}; + id: string + name: string + activity: AgentManagerActivity + attention?: AgentManagerAttention +} export type AgentManagerGitSummary = { - additions: number; - deletions: number; - ahead: number; - behind: number; -}; + additions: number + deletions: number + ahead: number + behind: number +} export type AgentManagerPullRequestSummary = { - number: number; - state: 'open' | 'draft' | 'merged' | 'closed'; - checks: 'success' | 'failure' | 'pending' | 'none'; - review?: 'approved' | 'changes_requested' | 'pending'; - unresolvedComments?: number; -}; + number: number + state: "open" | "draft" | "merged" | "closed" + checks: "success" | "failure" | "pending" | "none" + review?: "approved" | "changes_requested" | "pending" + unresolvedComments?: number +} export type AgentManagerWorktreeSummary = { - id: string; - name: string; - branch: string; - session?: AgentManagerSessionSummary; - sessions?: Array; - git?: AgentManagerGitSummary; - pullRequest?: AgentManagerPullRequestSummary; -}; + id: string + name: string + branch: string + session?: AgentManagerSessionSummary + sessions?: Array + git?: AgentManagerGitSummary + pullRequest?: AgentManagerPullRequestSummary +} export type AgentManagerSectionSummary = { - id: string; - name: string; - worktrees: Array; -}; + id: string + name: string + worktrees: Array +} export type AgentManagerLocalSummary = { - branch?: string; - sessions: Array; - git?: AgentManagerGitSummary; -}; + branch?: string + sessions: Array + git?: AgentManagerGitSummary +} export type AgentManagerOverview = { - sections: Array; - ungrouped: Array; - local?: AgentManagerLocalSummary; -}; + sections: Array + ungrouped: Array + local?: AgentManagerLocalSummary +} export type AgentManagerOverviewResult = { - operation: 'overview'; - overview: AgentManagerOverview; -}; + operation: "overview" + overview: AgentManagerOverview +} export type AgentManagerPromptResult = { - operation: 'prompt'; - sessionID: string; - delivered: true; -}; + operation: "prompt" + sessionID: string + delivered: true +} export type AgentManagerStopResult = { - operation: 'stop'; - sessionID: string; - stopped: true; -}; + operation: "stop" + sessionID: string + stopped: true +} -export type AgentManagerResult = AgentManagerOverviewResult | AgentManagerPromptResult | AgentManagerStopResult; +export type AgentManagerResult = AgentManagerOverviewResult | AgentManagerPromptResult | AgentManagerStopResult export type AgentManagerFailure = { - code: 'cancelled' | 'cross_workspace' | 'disconnected' | 'host_error' | 'stale_session' | 'timeout' | 'unavailable_session' | 'unknown_session' | 'workspace_unavailable'; - message: string; -}; + code: + | "cancelled" + | "cross_workspace" + | "disconnected" + | "host_error" + | "stale_session" + | "timeout" + | "unavailable_session" + | "unknown_session" + | "workspace_unavailable" + message: string +} -export type AnacondaDesktopStatus = { - type: 'unsupported-platform'; - platform: string; -} | { - type: 'not-installed'; - downloadURL: string; -} | { - type: 'not-running'; -} | { - type: 'invalid-config'; - reason: 'missing' | 'malformed' | 'missing-key' | 'invalid-port'; -} | { - type: 'signed-out'; -} | { - type: 'management-unauthorized'; -} | { - type: 'management-unavailable'; - reason: 'timeout' | 'unexpected-response'; -} | { - type: 'no-downloaded-model'; -} | { - type: 'no-running-server'; - downloadedModels: number; -} | { - type: 'inference-unhealthy'; - serverID: string; -} | { - type: 'ready'; - serverID: string; - serverName?: string; - models: Array<{ - id: string; - name: string; - }>; - context: number; - toolcall: 'supported' | 'unsupported' | 'unknown'; -}; +export type AnacondaDesktopStatus = + | { + type: "unsupported-platform" + platform: string + } + | { + type: "not-installed" + downloadURL: string + } + | { + type: "not-running" + } + | { + type: "invalid-config" + reason: "missing" | "malformed" | "missing-key" | "invalid-port" + } + | { + type: "signed-out" + } + | { + type: "management-unauthorized" + } + | { + type: "management-unavailable" + reason: "timeout" | "unexpected-response" + } + | { + type: "no-downloaded-model" + } + | { + type: "no-running-server" + downloadedModels: number + } + | { + type: "inference-unhealthy" + serverID: string + } + | { + type: "ready" + serverID: string + serverName?: string + models: Array<{ + id: string + name: string + }> + context: number + toolcall: "supported" | "unsupported" | "unknown" + } export type AnacondaDesktopConflictError = { - code: 'unsupported-platform' | 'not-installed' | 'not-ready' | 'acknowledgement-required'; - message: string; - status?: AnacondaDesktopStatus; -}; + code: "unsupported-platform" | "not-installed" | "not-ready" | "acknowledgement-required" + message: string + status?: AnacondaDesktopStatus +} export type AnacondaDesktopOperationError = { - operation: 'open' | 'sync'; - message: string; -}; + operation: "open" | "sync" + message: string +} export type KilocodeSessionImportResult = { - ok: boolean; - id: string; - skipped?: boolean; -}; + ok: boolean + id: string + skipped?: boolean +} export type MemoryApiClientError = { - name: 'MemoryApiClientError'; - data: { - code: string; - message: string; - }; -}; + name: "MemoryApiClientError" + data: { + code: string + message: string + } +} export type MemoryApiServerError = { - name: 'MemoryApiServerError'; - data: { - code: string; - message: string; - }; -}; + name: "MemoryApiServerError" + data: { + code: string + message: string + } +} export type UnauthorizedError = { - _tag: 'UnauthorizedError'; - message: string; -}; + _tag: "UnauthorizedError" + message: string +} export type SessionsResponse = { - data: Array; - cursor: { - previous?: string; - next?: string; - }; -}; + data: Array + cursor: { + previous?: string + next?: string + } +} export type InvalidCursorError = { - _tag: 'InvalidCursorError'; - message: string; -}; + _tag: "InvalidCursorError" + message: string +} export type SessionActive = { - type: 'running'; -}; + type: "running" +} export type SessionNotFoundError = { - _tag: 'SessionNotFoundError'; - sessionID: string; - message: string; -}; + _tag: "SessionNotFoundError" + sessionID: string + message: string +} export type PromptInput = { - text: string; - files?: Array; - agents?: Array; -}; + text: string + files?: Array + agents?: Array +} export type ServiceUnavailableError = { - _tag: 'ServiceUnavailableError'; - message: string; - service?: string; -}; + _tag: "ServiceUnavailableError" + message: string + service?: string +} export type MessageNotFoundError = { - _tag: 'MessageNotFoundError'; - sessionID: string; - messageID: string; - message: string; -}; + _tag: "MessageNotFoundError" + sessionID: string + messageID: string + message: string +} export type UnknownError1 = { - _tag: 'UnknownError'; - message: string; - ref?: string; -}; + _tag: "UnknownError" + message: string + ref?: string +} -export type SessionDurableEvent = SessionNextAgentSwitched | SessionNextModelSwitched | SessionNextMoved | SessionNextPrompted | SessionNextPromptAdmitted | SessionNextContextUpdated | SessionNextSynthetic | SessionNextShellStarted | SessionNextShellEnded | SessionNextStepStarted | SessionNextStepEnded | SessionNextStepFailed | SessionNextTextStarted | SessionNextTextEnded | SessionNextToolInputStarted | SessionNextToolInputEnded | SessionNextToolCalled | SessionNextToolProgress | SessionNextToolSuccess | SessionNextToolFailed | SessionNextReasoningStarted | SessionNextReasoningEnded | SessionNextRetried | SessionNextCompactionStarted | SessionNextCompactionEnded | SessionNextRevertStaged | SessionNextRevertCleared | SessionNextRevertCommitted; +export type SessionDurableEvent = + | SessionNextAgentSwitched + | SessionNextModelSwitched + | SessionNextMoved + | SessionNextPrompted + | SessionNextPromptAdmitted + | SessionNextContextUpdated + | SessionNextSynthetic + | SessionNextShellStarted + | SessionNextShellEnded + | SessionNextStepStarted + | SessionNextStepEnded + | SessionNextStepFailed + | SessionNextTextStarted + | SessionNextTextEnded + | SessionNextToolInputStarted + | SessionNextToolInputEnded + | SessionNextToolCalled + | SessionNextToolProgress + | SessionNextToolSuccess + | SessionNextToolFailed + | SessionNextReasoningStarted + | SessionNextReasoningEnded + | SessionNextRetried + | SessionNextCompactionStarted + | SessionNextCompactionEnded + | SessionNextRevertStaged + | SessionNextRevertCleared + | SessionNextRevertCommitted export type SessionHistory = { - data: Array; - hasMore: boolean; -}; + data: Array + hasMore: boolean +} -export type SessionDurableEventStream = string; +export type SessionDurableEventStream = string export type SessionMessagesResponse = { - data: Array; - cursor: { - previous?: string; - next?: string; - }; -}; + data: Array + cursor: { + previous?: string + next?: string + } +} export type ProviderNotFoundError = { - _tag: 'ProviderNotFoundError'; - providerID: string; - message: string; -}; + _tag: "ProviderNotFoundError" + providerID: string + message: string +} -export type OutputFormat1 = { - type: 'text'; -} | { - type: 'json_schema'; - schema: JsonSchema; - retryCount?: number; -}; +export type OutputFormat1 = + | { + type: "text" + } + | { + type: "json_schema" + schema: JsonSchema + retryCount?: number + } export type SessionStatus2 = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.status'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - sessionID: string; - status: SessionStatus; - }; -}; + id: string + metadata?: { + [key: string]: unknown + } + type: "session.status" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + sessionID: string + status: SessionStatus + } +} export type QuestionReplied2 = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'question.replied'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - sessionID: string; - requestID: string; - answers: Array; - }; -}; + id: string + metadata?: { + [key: string]: unknown + } + type: "question.replied" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + sessionID: string + requestID: string + answers: Array + } +} export type QuestionRejected2 = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'question.rejected'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - sessionID: string; - requestID: string; - }; -}; + id: string + metadata?: { + [key: string]: unknown + } + type: "question.rejected" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + sessionID: string + requestID: string + } +} -export type V2Event = ModelsDevRefreshed | IntegrationUpdated | IntegrationConnectionUpdated | CatalogUpdated | SessionCreated | SessionUpdated | SessionDeleted | MessageUpdated | MessageRemoved | MessagePartUpdated | MessagePartRemoved | SessionNextAgentSwitched | SessionNextModelSwitched | SessionNextMoved | SessionNextPrompted | SessionNextPromptAdmitted | SessionNextContextUpdated | SessionNextSynthetic | SessionNextShellStarted | SessionNextShellEnded | SessionNextStepStarted | SessionNextStepEnded | SessionNextStepFailed | SessionNextTextStarted | SessionNextTextDelta | SessionNextTextEnded | SessionNextReasoningStarted | SessionNextReasoningDelta | SessionNextReasoningEnded | SessionNextToolInputStarted | SessionNextToolInputDelta | SessionNextToolInputEnded | SessionNextToolCalled | SessionNextToolProgress1 | SessionNextToolSuccess1 | SessionNextToolFailed | SessionNextRetried | SessionNextCompactionStarted | SessionNextCompactionDelta | SessionNextCompactionEnded | SessionNextRevertStaged | SessionNextRevertCleared | SessionNextRevertCommitted | MessagePartDelta | SessionDiff | SessionError | InstallationUpdated | InstallationUpdateAvailable | FileEdited | ReferenceUpdated | PermissionV2Asked | PermissionV2Replied | PluginAdded | ProjectDirectoriesUpdated | FileWatcherUpdated | PtyCreated | PtyUpdated | PtyExited | PtyDeleted | QuestionV2Asked | QuestionV2Replied | QuestionV2Rejected | TodoUpdated | LspUpdated | PermissionAsked | PermissionReplied | TuiPromptAppend | TuiCommandExecute | TuiToastShow | TuiSessionSelect | McpToolsChanged | McpBrowserOpenFailed | CommandExecuted | ProjectUpdated | SessionStatus2 | SessionIdle | QuestionAsked | QuestionReplied2 | QuestionRejected2 | SessionCompacted | VcsBranchUpdated | WorkspaceReady | WorkspaceFailed | WorkspaceStatus | WorktreeReady | WorktreeFailed | ServerConnected | GlobalDisposed | GlobalConfigUpdated; +export type V2Event = + | ModelsDevRefreshed + | IntegrationUpdated + | IntegrationConnectionUpdated + | CatalogUpdated + | SessionCreated + | SessionUpdated + | SessionDeleted + | MessageUpdated + | MessageRemoved + | MessagePartUpdated + | MessagePartRemoved + | SessionNextAgentSwitched + | SessionNextModelSwitched + | SessionNextMoved + | SessionNextPrompted + | SessionNextPromptAdmitted + | SessionNextContextUpdated + | SessionNextSynthetic + | SessionNextShellStarted + | SessionNextShellEnded + | SessionNextStepStarted + | SessionNextStepEnded + | SessionNextStepFailed + | SessionNextTextStarted + | SessionNextTextDelta + | SessionNextTextEnded + | SessionNextReasoningStarted + | SessionNextReasoningDelta + | SessionNextReasoningEnded + | SessionNextToolInputStarted + | SessionNextToolInputDelta + | SessionNextToolInputEnded + | SessionNextToolCalled + | SessionNextToolProgress + | SessionNextToolSuccess + | SessionNextToolFailed + | SessionNextRetried + | SessionNextCompactionStarted + | SessionNextCompactionDelta + | SessionNextCompactionEnded + | SessionNextRevertStaged + | SessionNextRevertCleared + | SessionNextRevertCommitted + | MessagePartDelta + | SessionDiff + | SessionError + | InstallationUpdated + | InstallationUpdateAvailable + | FileEdited + | ReferenceUpdated + | PermissionV2Asked + | PermissionV2Replied + | PluginAdded + | ProjectDirectoriesUpdated + | FileWatcherUpdated + | PtyCreated + | PtyUpdated + | PtyExited + | PtyDeleted + | QuestionV2Asked + | QuestionV2Replied + | QuestionV2Rejected + | TodoUpdated + | LspUpdated + | PermissionAsked + | PermissionReplied + | TuiPromptAppend + | TuiCommandExecute + | TuiToastShow + | TuiSessionSelect + | McpToolsChanged + | McpBrowserOpenFailed + | CommandExecuted + | ProjectUpdated + | SessionStatus2 + | SessionIdle + | QuestionAsked + | QuestionReplied2 + | QuestionRejected2 + | SessionCompacted + | VcsBranchUpdated + | WorkspaceReady + | WorkspaceFailed + | WorkspaceStatus + | WorktreeReady + | WorktreeFailed + | ServerConnected + | GlobalDisposed + | GlobalConfigUpdated -export type V2EventStream = string; +export type V2EventStream = string export type ForbiddenError = { - _tag: 'ForbiddenError'; - message: string; -}; + _tag: "ForbiddenError" + message: string +} export type ProjectCopyError = { - name: 'ProjectCopyError'; - data: { - message: string; - forceRequired?: boolean; - }; -}; + name: "ProjectCopyError" + data: { + message: string + forceRequired?: boolean + } +} export type EffectHttpApiErrorForbidden = { - _tag: 'Forbidden'; -}; + _tag: "Forbidden" +} export type InteractiveTerminalInfo1 = { - id: string; - sessionID: string; - pid: number; - command: string; - cwd: string; - description?: string; - status: 'running' | 'closed'; - cols: number; - rows: number; - exitCode?: number | 'NaN' | 'Infinity' | '-Infinity'; - signal?: string; - closedBy?: 'exit' | 'user' | 'abort'; - time: { - started: number; - updated: number; - ended?: number; - }; -}; + id: string + sessionID: string + pid: number + command: string + cwd: string + description?: string + status: "running" | "closed" + cols: number + rows: number + exitCode?: number | "NaN" | "Infinity" | "-Infinity" + signal?: string + closedBy?: "exit" | "user" | "abort" + time: { + started: number + updated: number + ended?: number + } +} -export type CredentialValue = CredentialOAuth | CredentialKey; +export type CredentialValue = CredentialOAuth | CredentialKey export type IntegrationInputs = { - [key: string]: string; -}; + [key: string]: string +} -export type IntegrationMethod = IntegrationOAuthMethod | IntegrationKeyMethod | IntegrationEnvMethod; +export type IntegrationMethod = IntegrationOAuthMethod | IntegrationKeyMethod | IntegrationEnvMethod export type IntegrationRef = { - id: string; - name: string; -}; + id: string + name: string +} -export type SkillV2Source = SkillV2DirectorySource | SkillV2UrlSource | SkillV2EmbeddedSource; +export type SkillV2Source = SkillV2DirectorySource | SkillV2UrlSource | SkillV2EmbeddedSource export type MoveSessionDestination = { - directory: string; -}; + directory: string +} export type EventServerInstanceDisposed = { - id: string; - type: 'server.instance.disposed'; - properties: { - directory: string; - }; -}; + id: string + type: "server.instance.disposed" + properties: { + directory: string + } +} export type EventSessionTurnOpen = { - id: string; - type: 'session.turn.open'; - properties: { - sessionID: string; - }; -}; + id: string + type: "session.turn.open" + properties: { + sessionID: string + } +} export type EventSessionTurnClose = { - id: string; - type: 'session.turn.close'; - properties: { - sessionID: string; - parentID?: string; - reason: 'completed' | 'error' | 'interrupted'; - }; -}; + id: string + type: "session.turn.close" + properties: { + sessionID: string + parentID?: string + reason: "completed" | "error" | "interrupted" + } +} export type EventSessionQueueChanged = { - id: string; - type: 'session.queue.changed'; - properties: { - sessionID: string; - queued: Array; - }; -}; + id: string + type: "session.queue.changed" + properties: { + sessionID: string + queued: Array + } +} export type EventSessionNetworkAsked = { - id: string; - type: 'session.network.asked'; - properties: SessionNetworkWait; -}; + id: string + type: "session.network.asked" + properties: SessionNetworkWait +} export type EventSessionNetworkReplied = { - id: string; - type: 'session.network.replied'; - properties: { - sessionID: string; - requestID: string; - }; -}; + id: string + type: "session.network.replied" + properties: { + sessionID: string + requestID: string + } +} export type EventSessionNetworkRejected = { - id: string; - type: 'session.network.rejected'; - properties: { - sessionID: string; - requestID: string; - }; -}; + id: string + type: "session.network.rejected" + properties: { + sessionID: string + requestID: string + } +} export type EventSessionNetworkRestored = { - id: string; - type: 'session.network.restored'; - properties: { - sessionID: string; - requestID: string; - time: number; - }; -}; + id: string + type: "session.network.restored" + properties: { + sessionID: string + requestID: string + time: number + } +} export type EventBackgroundProcessUpdated = { - id: string; - type: 'background_process.updated'; - properties: { - info: BackgroundProcessInfo; - scope: string; - }; -}; + id: string + type: "background_process.updated" + properties: { + info: BackgroundProcessInfo + scope: string + } +} export type EventBackgroundProcessDeleted = { - id: string; - type: 'background_process.deleted'; - properties: { - sessionID: string; - processID: string; - scope: string; - }; -}; + id: string + type: "background_process.deleted" + properties: { + sessionID: string + processID: string + scope: string + } +} export type EventInteractiveTerminalUpdated = { - id: string; - type: 'interactive_terminal.updated'; - properties: { - info: InteractiveTerminalInfo; - }; -}; + id: string + type: "interactive_terminal.updated" + properties: { + info: InteractiveTerminalInfo + } +} export type EventInteractiveTerminalData = { - id: string; - type: 'interactive_terminal.data'; - properties: { - terminalID: string; - sessionID: string; - data: string; - cursor: number; - }; -}; + id: string + type: "interactive_terminal.data" + properties: { + terminalID: string + sessionID: string + data: string + cursor: number + } +} export type EventInteractiveTerminalDeleted = { - id: string; - type: 'interactive_terminal.deleted'; - properties: { - terminalID: string; - sessionID: string; - }; -}; + id: string + type: "interactive_terminal.deleted" + properties: { + terminalID: string + sessionID: string + } +} export type EventSandboxStatusChanged = { - id: string; - type: 'sandbox.status.changed'; - properties: { - sessionID: string; - directory: string; - enabled: boolean; - available: boolean; - reason?: string; - version: number; - }; -}; + id: string + type: "sandbox.status.changed" + properties: { + sessionID: string + directory: string + enabled: boolean + available: boolean + reason?: string + version: number + } +} export type EventSuggestionShown = { - id: string; - type: 'suggestion.shown'; - properties: SuggestionRequest; -}; + id: string + type: "suggestion.shown" + properties: SuggestionRequest +} export type EventSuggestionAccepted = { - id: string; - type: 'suggestion.accepted'; - properties: { - sessionID: string; - requestID: string; - index: number; - action: { - /** - * Button or option label (1-5 words) - */ - label: string; - description?: string; - /** - * Synthetic user prompt to inject when this action is accepted - */ - prompt: string; - }; - }; -}; + id: string + type: "suggestion.accepted" + properties: { + sessionID: string + requestID: string + index: number + action: { + /** + * Button or option label (1-5 words) + */ + label: string + description?: string + /** + * Synthetic user prompt to inject when this action is accepted + */ + prompt: string + } + } +} export type EventSuggestionDismissed = { - id: string; - type: 'suggestion.dismissed'; - properties: { - sessionID: string; - requestID: string; - }; -}; + id: string + type: "suggestion.dismissed" + properties: { + sessionID: string + requestID: string + } +} export type EventKilocodeAgentManagerStart = { - id: string; - type: 'kilocode.agent_manager.start'; - properties: { - requestID: string; - sessionID: string; - sandboxInheritanceToken?: string; - mode: 'worktree' | 'local'; - versions?: boolean; - tasks: Array<{ - prompt?: string; - name?: string; - branchName?: string; - model?: { - providerID: string; - modelID: string; - }; - variant?: string; - }>; - }; -}; + id: string + type: "kilocode.agent_manager.start" + properties: { + requestID: string + sessionID: string + sandboxInheritanceToken?: string + mode: "worktree" | "local" + versions?: boolean + tasks: Array<{ + prompt?: string + name?: string + branchName?: string + model?: { + providerID: string + modelID: string + } + variant?: string + }> + } +} export type EventKilocodeAgentManagerRequested = { - id: string; - type: 'kilocode.agent_manager.requested'; - properties: AgentManagerRequest; -}; + id: string + type: "kilocode.agent_manager.requested" + properties: AgentManagerRequest +} export type EventKilocodeAgentManagerCancelled = { - id: string; - type: 'kilocode.agent_manager.cancelled'; - properties: { - requestID: AgentManagerRequestId; - sessionID: string; - reason: 'cancelled' | 'disposed' | 'timeout'; - }; -}; + id: string + type: "kilocode.agent_manager.cancelled" + properties: { + requestID: AgentManagerRequestId + sessionID: string + reason: "cancelled" | "disposed" | "timeout" + } +} export type EventKilocodeNotebookRequested = { - id: string; - type: 'kilocode.notebook.requested'; - properties: NotebookRequest; -}; + id: string + type: "kilocode.notebook.requested" + properties: NotebookRequest +} export type EventKilocodeNotebookCancelled = { - id: string; - type: 'kilocode.notebook.cancelled'; - properties: { - requestID: NotebookRequestId; - sessionID: string; - reason: 'cancelled' | 'disposed' | 'timeout'; - }; -}; + id: string + type: "kilocode.notebook.cancelled" + properties: { + requestID: NotebookRequestId + sessionID: string + reason: "cancelled" | "disposed" | "timeout" + } +} export type EventKiloSessionsRemoteStatusChanged = { - id: string; - type: 'kilo-sessions.remote-status-changed'; - properties: { - enabled: boolean; - connected: boolean; - }; -}; + id: string + type: "kilo-sessions.remote-status-changed" + properties: { + enabled: boolean + connected: boolean + } +} export type EventLspClientDiagnostics = { - id: string; - type: 'lsp.client.diagnostics'; - properties: { - serverID: string; - path: string; - }; -}; + id: string + type: "lsp.client.diagnostics" + properties: { + serverID: string + path: string + } +} export type EventMemoryStatus = { - id: string; - type: 'memory.status'; - properties: { - directory: string; - sessionID?: string; - enabled: boolean; - state: 'idle' | 'checking' | 'injecting' | 'updating' | 'skipped' | 'error'; - reason?: string; - project: { - bytes: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - estimatedTokens: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - truncated: boolean; - updatedAt?: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - }; - consolidation?: { - trigger: 'explicit' | 'turn-close' | 'rebuild'; - operationCount: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - cost: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - tokens: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - }; - detail?: { - type: 'saved' | 'skipped' | 'recalled'; - message: string; - reason?: string; - duplicateOf?: string; - tokens?: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - operationCount?: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - added?: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - removed?: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - skippedCount?: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - sources?: Array; - files?: Array; - }; - }; -}; + id: string + type: "memory.status" + properties: { + directory: string + sessionID?: string + enabled: boolean + state: "idle" | "checking" | "injecting" | "updating" | "skipped" | "error" + reason?: string + project: { + bytes: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + estimatedTokens: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + truncated: boolean + updatedAt?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + } + consolidation?: { + trigger: "explicit" | "turn-close" | "rebuild" + operationCount: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + cost: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + tokens: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + } + detail?: { + type: "saved" | "skipped" | "recalled" + message: string + reason?: string + duplicateOf?: string + tokens?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + operationCount?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + added?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + removed?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + skippedCount?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + sources?: Array + files?: Array + } + } +} export type EventMemoryUpdated = { - id: string; - type: 'memory.updated'; - properties: { - directory: string; - sessionID?: string; - enabled: boolean; - state: 'idle' | 'checking' | 'injecting' | 'updating' | 'skipped' | 'error'; - reason?: string; - project: { - bytes: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - estimatedTokens: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - truncated: boolean; - updatedAt?: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - }; - consolidation?: { - trigger: 'explicit' | 'turn-close' | 'rebuild'; - operationCount: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - cost: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - tokens: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - }; - detail?: { - type: 'saved' | 'skipped' | 'recalled'; - message: string; - reason?: string; - duplicateOf?: string; - tokens?: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - operationCount?: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - added?: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - removed?: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - skippedCount?: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - sources?: Array; - files?: Array; - }; - }; -}; + id: string + type: "memory.updated" + properties: { + directory: string + sessionID?: string + enabled: boolean + state: "idle" | "checking" | "injecting" | "updating" | "skipped" | "error" + reason?: string + project: { + bytes: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + estimatedTokens: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + truncated: boolean + updatedAt?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + } + consolidation?: { + trigger: "explicit" | "turn-close" | "rebuild" + operationCount: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + cost: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + tokens: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + } + detail?: { + type: "saved" | "skipped" | "recalled" + message: string + reason?: string + duplicateOf?: string + tokens?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + operationCount?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + added?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + removed?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + skippedCount?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + sources?: Array + files?: Array + } + } +} export type EventMemoryError = { - id: string; - type: 'memory.error'; - properties: { - directory: string; - sessionID?: string; - enabled: boolean; - state: 'idle' | 'checking' | 'injecting' | 'updating' | 'skipped' | 'error'; - reason?: string; - project: { - bytes: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - estimatedTokens: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - truncated: boolean; - updatedAt?: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - }; - consolidation?: { - trigger: 'explicit' | 'turn-close' | 'rebuild'; - operationCount: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - cost: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - tokens: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - }; - detail?: { - type: 'saved' | 'skipped' | 'recalled'; - message: string; - reason?: string; - duplicateOf?: string; - tokens?: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - operationCount?: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - added?: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - removed?: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - skippedCount?: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - sources?: Array; - files?: Array; - }; - }; -}; + id: string + type: "memory.error" + properties: { + directory: string + sessionID?: string + enabled: boolean + state: "idle" | "checking" | "injecting" | "updating" | "skipped" | "error" + reason?: string + project: { + bytes: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + estimatedTokens: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + truncated: boolean + updatedAt?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + } + consolidation?: { + trigger: "explicit" | "turn-close" | "rebuild" + operationCount: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + cost: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + tokens: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + } + detail?: { + type: "saved" | "skipped" | "recalled" + message: string + reason?: string + duplicateOf?: string + tokens?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + operationCount?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + added?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + removed?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + skippedCount?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + sources?: Array + files?: Array + } + } +} export type EventIndexingStatus = { - id: string; - type: 'indexing.status'; - properties: { - status: IndexingStatus; - }; -}; + id: string + type: "indexing.status" + properties: { + status: IndexingStatus + } +} export type EventIndexingWarning = { - id: string; - type: 'indexing.warning'; - properties: IndexingWarning; -}; + id: string + type: "indexing.warning" + properties: IndexingWarning +} export type EventModelsDevRefreshed = { - id: string; - type: 'models-dev.refreshed'; - properties: { - [key: string]: unknown; - }; -}; + id: string + type: "models-dev.refreshed" + properties: { + [key: string]: unknown + } +} export type EventIntegrationUpdated = { - id: string; - type: 'integration.updated'; - properties: { - [key: string]: unknown; - }; -}; + id: string + type: "integration.updated" + properties: { + [key: string]: unknown + } +} export type EventIntegrationConnectionUpdated = { - id: string; - type: 'integration.connection.updated'; - properties: { - integrationID: string; - }; -}; + id: string + type: "integration.connection.updated" + properties: { + integrationID: string + } +} export type EventCatalogUpdated = { - id: string; - type: 'catalog.updated'; - properties: { - [key: string]: unknown; - }; -}; + id: string + type: "catalog.updated" + properties: { + [key: string]: unknown + } +} export type EventSessionCreated = { - id: string; - type: 'session.created'; - properties: { - sessionID: string; - info: Session; - }; -}; + id: string + type: "session.created" + properties: { + sessionID: string + info: Session + } +} export type EventSessionUpdated = { - id: string; - type: 'session.updated'; - properties: { - sessionID: string; - info: Session; - }; -}; + id: string + type: "session.updated" + properties: { + sessionID: string + info: Session + } +} export type EventSessionDeleted = { - id: string; - type: 'session.deleted'; - properties: { - sessionID: string; - info: Session; - }; -}; + id: string + type: "session.deleted" + properties: { + sessionID: string + info: Session + } +} export type EventMessageUpdated = { - id: string; - type: 'message.updated'; - properties: { - sessionID: string; - info: Message; - }; -}; + id: string + type: "message.updated" + properties: { + sessionID: string + info: Message + } +} export type EventMessageRemoved = { - id: string; - type: 'message.removed'; - properties: { - sessionID: string; - messageID: string; - }; -}; + id: string + type: "message.removed" + properties: { + sessionID: string + messageID: string + } +} export type EventMessagePartUpdated = { - id: string; - type: 'message.part.updated'; - properties: { - sessionID: string; - part: Part; - time: number; - }; -}; + id: string + type: "message.part.updated" + properties: { + sessionID: string + part: Part + time: number + } +} export type EventMessagePartRemoved = { - id: string; - type: 'message.part.removed'; - properties: { - sessionID: string; - messageID: string; - partID: string; - }; -}; + id: string + type: "message.part.removed" + properties: { + sessionID: string + messageID: string + partID: string + } +} export type EventSessionNextAgentSwitched = { - id: string; - type: 'session.next.agent.switched'; - properties: { - timestamp: number; - sessionID: string; - messageID: string; - agent: string; - }; -}; + id: string + type: "session.next.agent.switched" + properties: { + timestamp: number + sessionID: string + messageID: string + agent: string + } +} export type ModelRef = { - id: string; - providerID: string; - variant?: string; -}; + id: string + providerID: string + variant?: string +} export type EventSessionNextModelSwitched = { - id: string; - type: 'session.next.model.switched'; - properties: { - timestamp: number; - sessionID: string; - messageID: string; - model: ModelRef; - }; -}; + id: string + type: "session.next.model.switched" + properties: { + timestamp: number + sessionID: string + messageID: string + model: ModelRef + } +} export type LocationRef = { - directory: string; - workspaceID?: string; -}; + directory: string + workspaceID?: string +} export type EventSessionNextMoved = { - id: string; - type: 'session.next.moved'; - properties: { - timestamp: number; - sessionID: string; - location: LocationRef; - subdirectory?: string; - }; -}; + id: string + type: "session.next.moved" + properties: { + timestamp: number + sessionID: string + location: LocationRef + subdirectory?: string + } +} export type PromptSource = { - start: number; - end: number; - text: string; -}; + start: number + end: number + text: string +} export type PromptFileAttachment = { - uri: string; - mime: string; - name?: string; - description?: string; - source?: PromptSource; -}; + uri: string + mime: string + name?: string + description?: string + source?: PromptSource +} export type PromptAgentAttachment = { - name: string; - source?: PromptSource; -}; + name: string + source?: PromptSource +} export type EventSessionNextPrompted = { - id: string; - type: 'session.next.prompted'; - properties: { - timestamp: number; - sessionID: string; - messageID: string; - prompt: Prompt; - delivery: 'steer' | 'queue'; - }; -}; + id: string + type: "session.next.prompted" + properties: { + timestamp: number + sessionID: string + messageID: string + prompt: Prompt + delivery: "steer" | "queue" + } +} export type EventSessionNextPromptAdmitted = { - id: string; - type: 'session.next.prompt.admitted'; - properties: { - timestamp: number; - sessionID: string; - messageID: string; - prompt: Prompt; - delivery: 'steer' | 'queue'; - }; -}; + id: string + type: "session.next.prompt.admitted" + properties: { + timestamp: number + sessionID: string + messageID: string + prompt: Prompt + delivery: "steer" | "queue" + } +} export type EventSessionNextContextUpdated = { - id: string; - type: 'session.next.context.updated'; - properties: { - timestamp: number; - sessionID: string; - messageID: string; - text: string; - }; -}; + id: string + type: "session.next.context.updated" + properties: { + timestamp: number + sessionID: string + messageID: string + text: string + } +} export type EventSessionNextSynthetic = { - id: string; - type: 'session.next.synthetic'; - properties: { - timestamp: number; - sessionID: string; - messageID: string; - text: string; - }; -}; + id: string + type: "session.next.synthetic" + properties: { + timestamp: number + sessionID: string + messageID: string + text: string + } +} export type EventSessionNextShellStarted = { - id: string; - type: 'session.next.shell.started'; - properties: { - timestamp: number; - sessionID: string; - messageID: string; - callID: string; - command: string; - }; -}; + id: string + type: "session.next.shell.started" + properties: { + timestamp: number + sessionID: string + messageID: string + callID: string + command: string + } +} export type EventSessionNextShellEnded = { - id: string; - type: 'session.next.shell.ended'; - properties: { - timestamp: number; - sessionID: string; - callID: string; - output: string; - }; -}; + id: string + type: "session.next.shell.ended" + properties: { + timestamp: number + sessionID: string + callID: string + output: string + } +} export type EventSessionNextStepStarted = { - id: string; - type: 'session.next.step.started'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - agent: string; - model: ModelRef; - snapshot?: string; - }; -}; + id: string + type: "session.next.step.started" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + agent: string + model: ModelRef + snapshot?: string + } +} export type EventSessionNextStepEnded = { - id: string; - type: 'session.next.step.ended'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - finish: string; - cost: number; - tokens: { - input: number; - output: number; - reasoning: number; - cache: { - read: number; - write: number; - }; - }; - snapshot?: string; - files?: Array; - }; -}; + id: string + type: "session.next.step.ended" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + finish: string + cost: number + tokens: { + input: number + output: number + reasoning: number + cache: { + read: number + write: number + } + } + snapshot?: string + files?: Array + } +} export type SessionErrorUnknown = { - type: 'unknown'; - message: string; -}; + type: "unknown" + message: string +} export type EventSessionNextStepFailed = { - id: string; - type: 'session.next.step.failed'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - error: SessionErrorUnknown; - }; -}; + id: string + type: "session.next.step.failed" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + error: SessionErrorUnknown + } +} export type EventSessionNextTextStarted = { - id: string; - type: 'session.next.text.started'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - textID: string; - }; -}; + id: string + type: "session.next.text.started" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + textID: string + } +} export type EventSessionNextTextDelta = { - id: string; - type: 'session.next.text.delta'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - textID: string; - delta: string; - }; -}; + id: string + type: "session.next.text.delta" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + textID: string + delta: string + } +} export type EventSessionNextTextEnded = { - id: string; - type: 'session.next.text.ended'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - textID: string; - text: string; - }; -}; + id: string + type: "session.next.text.ended" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + textID: string + text: string + } +} export type LlmProviderMetadata = { - [key: string]: { - [key: string]: unknown; - }; -}; + [key: string]: { + [key: string]: unknown + } +} export type EventSessionNextReasoningStarted = { - id: string; - type: 'session.next.reasoning.started'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - reasoningID: string; - providerMetadata?: LlmProviderMetadata; - }; -}; + id: string + type: "session.next.reasoning.started" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + reasoningID: string + providerMetadata?: LlmProviderMetadata + } +} export type EventSessionNextReasoningDelta = { - id: string; - type: 'session.next.reasoning.delta'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - reasoningID: string; - delta: string; - }; -}; + id: string + type: "session.next.reasoning.delta" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + reasoningID: string + delta: string + } +} export type EventSessionNextReasoningEnded = { - id: string; - type: 'session.next.reasoning.ended'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - reasoningID: string; - text: string; - providerMetadata?: LlmProviderMetadata; - }; -}; + id: string + type: "session.next.reasoning.ended" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + reasoningID: string + text: string + providerMetadata?: LlmProviderMetadata + } +} export type EventSessionNextToolInputStarted = { - id: string; - type: 'session.next.tool.input.started'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - name: string; - }; -}; + id: string + type: "session.next.tool.input.started" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + callID: string + name: string + } +} export type EventSessionNextToolInputDelta = { - id: string; - type: 'session.next.tool.input.delta'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - delta: string; - }; -}; + id: string + type: "session.next.tool.input.delta" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + callID: string + delta: string + } +} export type EventSessionNextToolInputEnded = { - id: string; - type: 'session.next.tool.input.ended'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - text: string; - }; -}; + id: string + type: "session.next.tool.input.ended" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + callID: string + text: string + } +} export type EventSessionNextToolCalled = { - id: string; - type: 'session.next.tool.called'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - tool: string; - input: { - [key: string]: unknown; - }; - provider: { - executed: boolean; - metadata?: LlmProviderMetadata; - }; - }; -}; + id: string + type: "session.next.tool.called" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + callID: string + tool: string + input: { + [key: string]: unknown + } + provider: { + executed: boolean + metadata?: LlmProviderMetadata + } + } +} export type ToolTextContent = { - type: 'text'; - text: string; -}; + type: "text" + text: string +} export type ToolFileContent = { - type: 'file'; - uri: string; - mime: string; - name?: string; -}; + type: "file" + uri: string + mime: string + name?: string +} -export type LlmToolContent = ToolTextContent | ToolFileContent; - -export type LlmStoredToolContent = LlmToolContent | { - type: 'file'; - source: { - type: 'data'; - data: string; - } | { - type: 'url'; - url: string; - } | { - type: 'file'; - uri: string; - }; - mime: string; - name?: string; -} | { - type: 'media'; - mediaType: string; - data: string; - filename?: string; -}; +export type LlmToolContent = ToolTextContent | ToolFileContent export type EventSessionNextToolProgress = { - id: string; - type: 'session.next.tool.progress'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - structured: { - [key: string]: unknown; - }; - content: Array; - }; -}; + id: string + type: "session.next.tool.progress" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + callID: string + structured: { + [key: string]: unknown + } + content: Array + } +} export type EventSessionNextToolSuccess = { - id: string; - type: 'session.next.tool.success'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - structured: { - [key: string]: unknown; - }; - content: Array; - outputPaths?: Array; - result?: unknown; - provider: { - executed: boolean; - metadata?: LlmProviderMetadata; - }; - }; -}; + id: string + type: "session.next.tool.success" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + callID: string + structured: { + [key: string]: unknown + } + content: Array + outputPaths?: Array + result?: unknown + provider: { + executed: boolean + metadata?: LlmProviderMetadata + } + } +} export type EventSessionNextToolFailed = { - id: string; - type: 'session.next.tool.failed'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - error: SessionErrorUnknown; - result?: unknown; - provider: { - executed: boolean; - metadata?: LlmProviderMetadata; - }; - }; -}; + id: string + type: "session.next.tool.failed" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + callID: string + error: SessionErrorUnknown + result?: unknown + provider: { + executed: boolean + metadata?: LlmProviderMetadata + } + } +} export type SessionNextRetryError = { - message: string; - statusCode?: number; - isRetryable: boolean; - responseHeaders?: { - [key: string]: string; - }; - responseBody?: string; - metadata?: { - [key: string]: string; - }; -}; + message: string + statusCode?: number + isRetryable: boolean + responseHeaders?: { + [key: string]: string + } + responseBody?: string + metadata?: { + [key: string]: string + } +} export type EventSessionNextRetried = { - id: string; - type: 'session.next.retried'; - properties: { - timestamp: number; - sessionID: string; - attempt: number; - error: SessionNextRetryError; - }; -}; + id: string + type: "session.next.retried" + properties: { + timestamp: number + sessionID: string + attempt: number + error: SessionNextRetryError + } +} export type EventSessionNextCompactionStarted = { - id: string; - type: 'session.next.compaction.started'; - properties: { - timestamp: number; - sessionID: string; - messageID: string; - reason: 'auto' | 'manual'; - }; -}; + id: string + type: "session.next.compaction.started" + properties: { + timestamp: number + sessionID: string + messageID: string + reason: "auto" | "manual" + } +} export type EventSessionNextCompactionDelta = { - id: string; - type: 'session.next.compaction.delta'; - properties: { - timestamp: number; - sessionID: string; - messageID: string; - text: string; - }; -}; + id: string + type: "session.next.compaction.delta" + properties: { + timestamp: number + sessionID: string + messageID: string + text: string + } +} export type EventSessionNextCompactionEnded = { - id: string; - type: 'session.next.compaction.ended'; - properties: { - timestamp: number; - sessionID: string; - messageID: string; - reason: 'auto' | 'manual'; - text: string; - recent: string; - include?: string; - }; -}; + id: string + type: "session.next.compaction.ended" + properties: { + timestamp: number + sessionID: string + messageID: string + reason: "auto" | "manual" + text: string + recent: string + include?: string + } +} export type FileDiff = { - path: string; - status: 'added' | 'modified' | 'deleted'; - additions: number; - deletions: number; - patch: string; -}; + path: string + status: "added" | "modified" | "deleted" + additions: number + deletions: number + patch: string +} export type RevertState = { - messageID: string; - partID?: string; - snapshot?: string; - diff?: string; - files?: Array; -}; + messageID: string + partID?: string + snapshot?: string + diff?: string + files?: Array +} export type EventSessionNextRevertStaged = { - id: string; - type: 'session.next.revert.staged'; - properties: { - timestamp: number; - sessionID: string; - revert: RevertState; - }; -}; + id: string + type: "session.next.revert.staged" + properties: { + timestamp: number + sessionID: string + revert: RevertState + } +} export type EventSessionNextRevertCleared = { - id: string; - type: 'session.next.revert.cleared'; - properties: { - timestamp: number; - sessionID: string; - }; -}; + id: string + type: "session.next.revert.cleared" + properties: { + timestamp: number + sessionID: string + } +} export type EventSessionNextRevertCommitted = { - id: string; - type: 'session.next.revert.committed'; - properties: { - timestamp: number; - sessionID: string; - messageID: string; - }; -}; + id: string + type: "session.next.revert.committed" + properties: { + timestamp: number + sessionID: string + messageID: string + } +} export type EventMessagePartDelta = { - id: string; - type: 'message.part.delta'; - properties: { - sessionID: string; - messageID: string; - partID: string; - field: string; - delta: string; - }; -}; + id: string + type: "message.part.delta" + properties: { + sessionID: string + messageID: string + partID: string + field: string + delta: string + } +} export type EventSessionDiff = { - id: string; - type: 'session.diff'; - properties: { - sessionID: string; - diff: Array; - }; -}; + id: string + type: "session.diff" + properties: { + sessionID: string + diff: Array + } +} export type EventSessionError = { - id: string; - type: 'session.error'; - properties: { - sessionID?: string; - error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | StructuredOutputError | ContextOverflowError | ContentFilterError | ApiError; - }; -}; + id: string + type: "session.error" + properties: { + sessionID?: string + error?: + | ProviderAuthError + | UnknownError + | MessageOutputLengthError + | MessageAbortedError + | StructuredOutputError + | ContextOverflowError + | ContentFilterError + | ApiError + } +} export type EventInstallationUpdated = { - id: string; - type: 'installation.updated'; - properties: { - version: string; - }; -}; + id: string + type: "installation.updated" + properties: { + version: string + } +} export type EventInstallationUpdateAvailable = { - id: string; - type: 'installation.update-available'; - properties: { - version: string; - }; -}; + id: string + type: "installation.update-available" + properties: { + version: string + } +} export type EventFileEdited = { - id: string; - type: 'file.edited'; - properties: { - file: string; - }; -}; + id: string + type: "file.edited" + properties: { + file: string + } +} export type EventReferenceUpdated = { - id: string; - type: 'reference.updated'; - properties: { - [key: string]: unknown; - }; -}; + id: string + type: "reference.updated" + properties: { + [key: string]: unknown + } +} export type PermissionV2Source = { - type: 'tool'; - messageID: string; - callID: string; -}; + type: "tool" + messageID: string + callID: string +} export type EventPermissionV2Asked = { - id: string; - type: 'permission.v2.asked'; - properties: { - id: string; - sessionID: string; - action: string; - resources: Array; - save?: Array; - metadata?: { - [key: string]: unknown; - }; - source?: PermissionV2Source; - }; -}; + id: string + type: "permission.v2.asked" + properties: { + id: string + sessionID: string + action: string + resources: Array + save?: Array + metadata?: { + [key: string]: unknown + } + source?: PermissionV2Source + } +} -export type PermissionV2Reply = 'once' | 'always' | 'reject'; +export type PermissionV2Reply = "once" | "always" | "reject" export type EventPermissionV2Replied = { - id: string; - type: 'permission.v2.replied'; - properties: { - sessionID: string; - requestID: string; - reply: PermissionV2Reply; - }; -}; + id: string + type: "permission.v2.replied" + properties: { + sessionID: string + requestID: string + reply: PermissionV2Reply + } +} export type EventPluginAdded = { - id: string; - type: 'plugin.added'; - properties: { - id: string; - }; -}; + id: string + type: "plugin.added" + properties: { + id: string + } +} export type EventProjectDirectoriesUpdated = { - id: string; - type: 'project.directories.updated'; - properties: { - projectID: string; - }; -}; + id: string + type: "project.directories.updated" + properties: { + projectID: string + } +} export type EventFileWatcherUpdated = { - id: string; - type: 'file.watcher.updated'; - properties: { - file: string; - event: 'add' | 'change' | 'unlink'; - }; -}; + id: string + type: "file.watcher.updated" + properties: { + file: string + event: "add" | "change" | "unlink" + } +} export type EventPtyCreated = { - id: string; - type: 'pty.created'; - properties: { - info: Pty; - }; -}; + id: string + type: "pty.created" + properties: { + info: Pty + } +} export type EventPtyUpdated = { - id: string; - type: 'pty.updated'; - properties: { - info: Pty; - }; -}; + id: string + type: "pty.updated" + properties: { + info: Pty + } +} export type EventPtyExited = { - id: string; - type: 'pty.exited'; - properties: { - id: string; - exitCode: number; - }; -}; + id: string + type: "pty.exited" + properties: { + id: string + exitCode: number + } +} export type EventPtyDeleted = { - id: string; - type: 'pty.deleted'; - properties: { - id: string; - }; -}; + id: string + type: "pty.deleted" + properties: { + id: string + } +} export type QuestionV2Option = { - /** - * Display text (1-5 words, concise) - */ - label: string; - /** - * Explanation of choice - */ - description: string; -}; + /** + * Display text (1-5 words, concise) + */ + label: string + /** + * Explanation of choice + */ + description: string +} export type QuestionV2Info = { - /** - * Complete question - */ - question: string; - /** - * Very short label (max 30 chars) - */ - header: string; - /** - * Available choices - */ - options: Array; - multiple?: boolean; - custom?: boolean; -}; + /** + * Complete question + */ + question: string + /** + * Very short label (max 30 chars) + */ + header: string + /** + * Available choices + */ + options: Array + multiple?: boolean + custom?: boolean +} export type QuestionV2Tool = { - messageID: string; - callID: string; -}; + messageID: string + callID: string +} export type EventQuestionV2Asked = { - id: string; - type: 'question.v2.asked'; - properties: { - id: string; - sessionID: string; - /** - * Questions to ask - */ - questions: Array; - tool?: QuestionV2Tool; - }; -}; - -export type QuestionV2Answer = Array; - -export type EventQuestionV2Replied = { - id: string; - type: 'question.v2.replied'; - properties: { - sessionID: string; - requestID: string; - answers: Array; - }; -}; - -export type EventQuestionV2Rejected = { - id: string; - type: 'question.v2.rejected'; - properties: { - sessionID: string; - requestID: string; - }; -}; - -export type EventTodoUpdated = { - id: string; - type: 'todo.updated'; - properties: { - sessionID: string; - todos: Array; - }; -}; - -export type EventLspUpdated = { - id: string; - type: 'lsp.updated'; - properties: { - [key: string]: unknown; - }; -}; - -export type EventPermissionAsked = { - id: string; - type: 'permission.asked'; - properties: { - id: string; - sessionID: string; - permission: string; - patterns: Array; - metadata: { - [key: string]: unknown; - }; - always: Array; - tool?: { - messageID: string; - callID: string; - }; - }; -}; - -export type EventPermissionReplied = { - id: string; - type: 'permission.replied'; - properties: { - sessionID: string; - requestID: string; - reply: 'once' | 'always' | 'reject'; - }; -}; - -export type EventMcpToolsChanged = { - id: string; - type: 'mcp.tools.changed'; - properties: { - server: string; - }; -}; - -export type EventMcpBrowserOpenFailed = { - id: string; - type: 'mcp.browser.open.failed'; - properties: { - mcpName: string; - url: string; - }; -}; - -export type EventCommandExecuted = { - id: string; - type: 'command.executed'; - properties: { - name: string; - sessionID: string; - arguments: string; - messageID: string; - }; -}; - -export type ProjectVcs = 'git'; - -export type ProjectIcon = { - url?: string; - override?: string; - color?: string; -}; - -export type ProjectCommands = { - /** - * Startup script to run when creating a new workspace (worktree) - */ - start?: string; -}; - -export type ProjectTime = { - created: number; - updated: number; - initialized?: number; -}; - -export type EventProjectUpdated = { - id: string; - type: 'project.updated'; - properties: { - id: string; - worktree: string; - vcs?: ProjectVcs; - name?: string; - icon?: ProjectIcon; - commands?: ProjectCommands; - time: ProjectTime; - sandboxes: Array; - }; -}; - -export type EventSessionStatus = { - id: string; - type: 'session.status'; - properties: { - sessionID: string; - status: SessionStatus; - }; -}; - -export type EventSessionIdle = { - id: string; - type: 'session.idle'; - properties: { - sessionID: string; - }; -}; - -export type EventQuestionAsked = { - id: string; - type: 'question.asked'; - properties: { - id: string; - sessionID: string; - /** - * Questions to ask - */ - questions: Array; - blocking?: boolean; - tool?: QuestionTool; - }; -}; - -export type EventQuestionReplied = { - id: string; - type: 'question.replied'; - properties: { - sessionID: string; - requestID: string; - answers: Array; - }; -}; - -export type EventQuestionRejected = { - id: string; - type: 'question.rejected'; - properties: { - sessionID: string; - requestID: string; - }; -}; - -export type EventSessionCompacted = { - id: string; - type: 'session.compacted'; - properties: { - sessionID: string; - }; -}; - -export type EventVcsBranchUpdated = { - id: string; - type: 'vcs.branch.updated'; - properties: { - branch?: string; - }; -}; - -export type EventWorkspaceReady = { - id: string; - type: 'workspace.ready'; - properties: { - name: string; - }; -}; - -export type EventWorkspaceFailed = { - id: string; - type: 'workspace.failed'; - properties: { - message: string; - }; -}; - -export type EventWorkspaceStatus = { - id: string; - type: 'workspace.status'; - properties: { - workspaceID: string; - status: 'connected' | 'connecting' | 'disconnected' | 'error'; - }; -}; - -export type EventWorktreeReady = { - id: string; - type: 'worktree.ready'; - properties: { - name: string; - branch?: string; - }; -}; - -export type EventWorktreeFailed = { - id: string; - type: 'worktree.failed'; - properties: { - message: string; - }; -}; - -export type EventServerConnected = { - id: string; - type: 'server.connected'; - properties: { - [key: string]: unknown; - }; -}; - -export type EventGlobalDisposed = { - id: string; - type: 'global.disposed'; - properties: { - [key: string]: unknown; - }; -}; - -export type EventGlobalConfigUpdated = { - id: string; - type: 'global.config.updated'; - properties: { - [key: string]: unknown; - }; -}; - -export type SyncEventSessionCreated = { - type: 'sync'; - id: string; - syncEvent: { - type: 'session.created.1'; - id: string; - seq: number; - aggregateID: string; - data: { - sessionID: string; - info: Session; - }; - }; -}; - -export type SyncEventSessionUpdated = { - type: 'sync'; - id: string; - syncEvent: { - type: 'session.updated.1'; - id: string; - seq: number; - aggregateID: string; - data: { - sessionID: string; - info: Session; - }; - }; -}; - -export type SyncEventSessionDeleted = { - type: 'sync'; - id: string; - syncEvent: { - type: 'session.deleted.1'; - id: string; - seq: number; - aggregateID: string; - data: { - sessionID: string; - info: Session; - }; - }; -}; - -export type SyncEventMessageUpdated = { - type: 'sync'; - id: string; - syncEvent: { - type: 'message.updated.1'; - id: string; - seq: number; - aggregateID: string; - data: { - sessionID: string; - info: Message; - }; - }; -}; - -export type SyncEventMessageRemoved = { - type: 'sync'; - id: string; - syncEvent: { - type: 'message.removed.1'; - id: string; - seq: number; - aggregateID: string; - data: { - sessionID: string; - messageID: string; - }; - }; -}; - -export type SyncEventMessagePartUpdated = { - type: 'sync'; - id: string; - syncEvent: { - type: 'message.part.updated.1'; - id: string; - seq: number; - aggregateID: string; - data: { - sessionID: string; - part: Part; - time: number; - }; - }; -}; - -export type SyncEventMessagePartRemoved = { - type: 'sync'; - id: string; - syncEvent: { - type: 'message.part.removed.1'; - id: string; - seq: number; - aggregateID: string; - data: { - sessionID: string; - messageID: string; - partID: string; - }; - }; -}; - -export type SyncEventSessionNextAgentSwitched = { - type: 'sync'; - id: string; - syncEvent: { - type: 'session.next.agent.switched.1'; - id: string; - seq: number; - aggregateID: string; - data: { - timestamp: number; - sessionID: string; - messageID: string; - agent: string; - }; - }; -}; - -export type SyncEventSessionNextModelSwitched = { - type: 'sync'; - id: string; - syncEvent: { - type: 'session.next.model.switched.1'; - id: string; - seq: number; - aggregateID: string; - data: { - timestamp: number; - sessionID: string; - messageID: string; - model: ModelRef; - }; - }; -}; - -export type SyncEventSessionNextMoved = { - type: 'sync'; - id: string; - syncEvent: { - type: 'session.next.moved.1'; - id: string; - seq: number; - aggregateID: string; - data: { - timestamp: number; - sessionID: string; - location: LocationRef; - subdirectory?: string; - }; - }; -}; - -export type SyncEventSessionNextPrompted = { - type: 'sync'; - id: string; - syncEvent: { - type: 'session.next.prompted.1'; - id: string; - seq: number; - aggregateID: string; - data: { - timestamp: number; - sessionID: string; - messageID: string; - prompt: Prompt; - delivery: 'steer' | 'queue'; - }; - }; -}; - -export type SyncEventSessionNextPromptAdmitted = { - type: 'sync'; - id: string; - syncEvent: { - type: 'session.next.prompt.admitted.1'; - id: string; - seq: number; - aggregateID: string; - data: { - timestamp: number; - sessionID: string; - messageID: string; - prompt: Prompt; - delivery: 'steer' | 'queue'; - }; - }; -}; - -export type SyncEventSessionNextContextUpdated = { - type: 'sync'; - id: string; - syncEvent: { - type: 'session.next.context.updated.1'; - id: string; - seq: number; - aggregateID: string; - data: { - timestamp: number; - sessionID: string; - messageID: string; - text: string; - }; - }; -}; - -export type SyncEventSessionNextSynthetic = { - type: 'sync'; - id: string; - syncEvent: { - type: 'session.next.synthetic.1'; - id: string; - seq: number; - aggregateID: string; - data: { - timestamp: number; - sessionID: string; - messageID: string; - text: string; - }; - }; -}; - -export type SyncEventSessionNextShellStarted = { - type: 'sync'; - id: string; - syncEvent: { - type: 'session.next.shell.started.1'; - id: string; - seq: number; - aggregateID: string; - data: { - timestamp: number; - sessionID: string; - messageID: string; - callID: string; - command: string; - }; - }; -}; - -export type SyncEventSessionNextShellEnded = { - type: 'sync'; - id: string; - syncEvent: { - type: 'session.next.shell.ended.1'; - id: string; - seq: number; - aggregateID: string; - data: { - timestamp: number; - sessionID: string; - callID: string; - output: string; - }; - }; -}; - -export type SyncEventSessionNextStepStarted = { - type: 'sync'; - id: string; - syncEvent: { - type: 'session.next.step.started.1'; - id: string; - seq: number; - aggregateID: string; - data: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - agent: string; - model: ModelRef; - snapshot?: string; - }; - }; -}; - -export type SyncEventSessionNextStepEnded = { - type: 'sync'; - id: string; - syncEvent: { - type: 'session.next.step.ended.2'; - id: string; - seq: number; - aggregateID: string; - data: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - finish: string; - cost: number; - tokens: { - input: number; - output: number; - reasoning: number; - cache: { - read: number; - write: number; - }; - }; - snapshot?: string; - files?: Array; - }; - }; -}; - -export type SyncEventSessionNextStepFailed = { - type: 'sync'; - id: string; - syncEvent: { - type: 'session.next.step.failed.2'; - id: string; - seq: number; - aggregateID: string; - data: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - error: SessionErrorUnknown; - }; - }; -}; - -export type SyncEventSessionNextTextStarted = { - type: 'sync'; - id: string; - syncEvent: { - type: 'session.next.text.started.1'; - id: string; - seq: number; - aggregateID: string; - data: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - textID: string; - }; - }; -}; - -export type SyncEventSessionNextTextEnded = { - type: 'sync'; - id: string; - syncEvent: { - type: 'session.next.text.ended.1'; - id: string; - seq: number; - aggregateID: string; - data: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - textID: string; - text: string; - }; - }; -}; - -export type SyncEventSessionNextReasoningStarted = { - type: 'sync'; - id: string; - syncEvent: { - type: 'session.next.reasoning.started.1'; - id: string; - seq: number; - aggregateID: string; - data: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - reasoningID: string; - providerMetadata?: LlmProviderMetadata; - }; - }; -}; - -export type SyncEventSessionNextReasoningEnded = { - type: 'sync'; - id: string; - syncEvent: { - type: 'session.next.reasoning.ended.1'; - id: string; - seq: number; - aggregateID: string; - data: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - reasoningID: string; - text: string; - providerMetadata?: LlmProviderMetadata; - }; - }; -}; - -export type SyncEventSessionNextToolInputStarted = { - type: 'sync'; - id: string; - syncEvent: { - type: 'session.next.tool.input.started.1'; - id: string; - seq: number; - aggregateID: string; - data: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - name: string; - }; - }; -}; - -export type SyncEventSessionNextToolInputEnded = { - type: 'sync'; - id: string; - syncEvent: { - type: 'session.next.tool.input.ended.1'; - id: string; - seq: number; - aggregateID: string; - data: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - text: string; - }; - }; -}; - -export type SyncEventSessionNextToolCalled = { - type: 'sync'; - id: string; - syncEvent: { - type: 'session.next.tool.called.1'; - id: string; - seq: number; - aggregateID: string; - data: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - tool: string; - input: { - [key: string]: unknown; - }; - provider: { - executed: boolean; - metadata?: LlmProviderMetadata; - }; - }; - }; -}; - -export type SyncEventSessionNextToolProgress = { - type: 'sync'; - id: string; - syncEvent: { - type: 'session.next.tool.progress.1'; - id: string; - seq: number; - aggregateID: string; - data: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - structured: { - [key: string]: unknown; - }; - content: Array; - }; - }; -}; - -export type SyncEventSessionNextToolSuccess = { - type: 'sync'; - id: string; - syncEvent: { - type: 'session.next.tool.success.1'; - id: string; - seq: number; - aggregateID: string; - data: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - structured: { - [key: string]: unknown; - }; - content: Array; - outputPaths?: Array; - result?: unknown; - provider: { - executed: boolean; - metadata?: LlmProviderMetadata; - }; - }; - }; -}; - -export type SyncEventSessionNextToolFailed = { - type: 'sync'; - id: string; - syncEvent: { - type: 'session.next.tool.failed.1'; - id: string; - seq: number; - aggregateID: string; - data: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - error: SessionErrorUnknown; - result?: unknown; - provider: { - executed: boolean; - metadata?: LlmProviderMetadata; - }; - }; - }; -}; - -export type SyncEventSessionNextRetried = { - type: 'sync'; - id: string; - syncEvent: { - type: 'session.next.retried.1'; - id: string; - seq: number; - aggregateID: string; - data: { - timestamp: number; - sessionID: string; - attempt: number; - error: SessionNextRetryError; - }; - }; -}; - -export type SyncEventSessionNextCompactionStarted = { - type: 'sync'; - id: string; - syncEvent: { - type: 'session.next.compaction.started.1'; - id: string; - seq: number; - aggregateID: string; - data: { - timestamp: number; - sessionID: string; - messageID: string; - reason: 'auto' | 'manual'; - }; - }; -}; - -export type SyncEventSessionNextCompactionEnded = { - type: 'sync'; - id: string; - syncEvent: { - type: 'session.next.compaction.ended.1'; - id: string; - seq: number; - aggregateID: string; - data: { - timestamp: number; - sessionID: string; - messageID: string; - reason: 'auto' | 'manual'; - text: string; - recent: string; - include?: string; - }; - }; -}; - -export type SyncEventSessionNextRevertStaged = { - type: 'sync'; - id: string; - syncEvent: { - type: 'session.next.revert.staged.1'; - id: string; - seq: number; - aggregateID: string; - data: { - timestamp: number; - sessionID: string; - revert: RevertState; - }; - }; -}; - -export type SyncEventSessionNextRevertCleared = { - type: 'sync'; - id: string; - syncEvent: { - type: 'session.next.revert.cleared.1'; - id: string; - seq: number; - aggregateID: string; - data: { - timestamp: number; - sessionID: string; - }; - }; -}; - -export type SyncEventSessionNextRevertCommitted = { - type: 'sync'; - id: string; - syncEvent: { - type: 'session.next.revert.committed.1'; - id: string; - seq: number; - aggregateID: string; - data: { - timestamp: number; - sessionID: string; - messageID: string; - }; - }; -}; - -export type ConfigV2ReferenceGit = { - repository: string; - branch?: string; - description?: string; - hidden?: boolean; -}; - -export type ConfigV2ReferenceLocal = { - path: string; - description?: string; - hidden?: boolean; -}; - -export type PolicyEffect = 'allow' | 'deny'; - -export type ConfigV2ExperimentalPolicy = { - action: 'provider.use'; - effect: PolicyEffect; - resource: string; -}; - -export type ProjectDirectories = Array<{ - directory: string; - strategy?: string; -}>; - -export type PtyTicketConnectToken = { - ticket: string; - expires_in: number; -}; - -export type WorkspaceEventConnectionStatus = { - workspaceID: string; - status: 'connected' | 'connecting' | 'disconnected' | 'error'; -}; - -export type LocationInfo = { - directory: string; - workspaceID?: string; - project: { - id: string; - directory: string; - }; -}; - -export type ProviderRequest = { - headers: { - [key: string]: string; - }; - body: { - [key: string]: unknown; - }; -}; - -export type AgentColor = string | 'primary' | 'secondary' | 'accent' | 'success' | 'warning' | 'error' | 'info'; - -export type PermissionV2Effect = 'allow' | 'deny' | 'ask'; - -export type PermissionV2Rule = { - action: string; - resource: string; - effect: PermissionV2Effect; -}; - -export type PermissionV2Ruleset = Array; - -export type AgentV2Info = { - id: string; - model?: ModelRef; - request: ProviderRequest; - system?: string; - description?: string; - mode: 'subagent' | 'primary' | 'all'; - hidden: boolean; - color?: AgentColor; - steps?: number; - permissions: PermissionV2Ruleset; -}; - -export type SessionV2Info = { - id: string; - parentID?: string; - projectID: string; - agent?: string; - model?: ModelRef; - cost: number; - tokens: { - input: number; - output: number; - reasoning: number; - cache: { - read: number; - write: number; - }; - }; - time: { - created: number; - updated: number; - archived?: number; - }; - title: string; - location: LocationRef; - subpath?: string; - revert?: RevertState; -}; - -export type PromptInputFileAttachment = { - uri: string; - name?: string; - description?: string; - source?: PromptSource; -}; - -export type SessionInputAdmitted = { - admittedSeq: number; - id: string; - sessionID: string; - prompt: Prompt; - delivery: 'steer' | 'queue'; - timeCreated: number; - promotedSeq?: number; -}; - -export type SessionMessageAgentSwitched = { - id: string; - metadata?: { - [key: string]: unknown; - }; - time: { - created: number; - }; - type: 'agent-switched'; - agent: string; -}; - -export type SessionMessageModelSwitched = { - id: string; - metadata?: { - [key: string]: unknown; - }; - time: { - created: number; - }; - type: 'model-switched'; - model: ModelRef; -}; - -export type SessionMessageUser = { - id: string; - metadata?: { - [key: string]: unknown; - }; - time: { - created: number; - }; - text: string; - files?: Array; - agents?: Array; - type: 'user'; -}; - -export type SessionMessageSynthetic = { - id: string; - metadata?: { - [key: string]: unknown; - }; - time: { - created: number; - }; - sessionID: string; - text: string; - type: 'synthetic'; -}; - -export type SessionMessageSystem = { - id: string; - metadata?: { - [key: string]: unknown; - }; - time: { - created: number; - }; - type: 'system'; - text: string; -}; - -export type SessionMessageShell = { - id: string; - metadata?: { - [key: string]: unknown; - }; - time: { - created: number; - completed?: number; - }; - type: 'shell'; - callID: string; - command: string; - output: string; -}; - -export type SessionMessageAssistantText = { - type: 'text'; - id: string; - text: string; -}; - -export type SessionMessageAssistantReasoning = { - type: 'reasoning'; - id: string; - text: string; - providerMetadata?: LlmProviderMetadata; - time?: { - created: number; - completed?: number; - }; -}; - -export type SessionMessageToolStatePending = { - status: 'pending'; - input: string; -}; - -export type SessionMessageToolStateRunning = { - status: 'running'; - input: { - [key: string]: unknown; - }; - structured: { - [key: string]: unknown; - }; - content: Array; -}; - -export type SessionMessageToolStateCompleted = { - status: 'completed'; - input: { - [key: string]: unknown; - }; - attachments?: Array; - content: Array; - outputPaths?: Array; - structured: { - [key: string]: unknown; - }; - result?: unknown; -}; - -export type SessionMessageToolStateError = { - status: 'error'; - input: { - [key: string]: unknown; - }; - content: Array; - structured: { - [key: string]: unknown; - }; - error: SessionErrorUnknown; - result?: unknown; -}; - -export type SessionMessageAssistantTool = { - type: 'tool'; - id: string; - name: string; - provider?: { - executed: boolean; - metadata?: LlmProviderMetadata; - resultMetadata?: LlmProviderMetadata; - }; - state: SessionMessageToolStatePending | SessionMessageToolStateRunning | SessionMessageToolStateCompleted | SessionMessageToolStateError; - time: { - created: number; - ran?: number; - completed?: number; - pruned?: number; - }; -}; - -export type SessionMessageAssistant = { - id: string; - metadata?: { - [key: string]: unknown; - }; - time: { - created: number; - completed?: number; - }; - type: 'assistant'; - agent: string; - model: ModelRef; - content: Array; - snapshot?: { - start?: string; - end?: string; - files?: Array; - }; - finish?: string; - cost?: number; - tokens?: { - input: number; - output: number; - reasoning: number; - cache: { - read: number; - write: number; - }; - }; - error?: SessionErrorUnknown; -}; - -export type SessionMessageCompaction = { - type: 'compaction'; - reason: 'auto' | 'manual'; - summary: string; - recent: string; - id: string; - metadata?: { - [key: string]: unknown; - }; - time: { - created: number; - }; -}; - -export type SessionMessage = SessionMessageAgentSwitched | SessionMessageModelSwitched | SessionMessageUser | SessionMessageSynthetic | SessionMessageSystem | SessionMessageShell | SessionMessageAssistant | SessionMessageCompaction; - -export type SessionNextAgentSwitched = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.next.agent.switched'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - timestamp: number; - sessionID: string; - messageID: string; - agent: string; - }; -}; - -export type SessionNextModelSwitched = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.next.model.switched'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - timestamp: number; - sessionID: string; - messageID: string; - model: ModelRef; - }; -}; - -export type SessionNextMoved = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.next.moved'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - timestamp: number; - sessionID: string; - location: LocationRef; - subdirectory?: string; - }; -}; - -export type SessionNextPrompted = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.next.prompted'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - timestamp: number; - sessionID: string; - messageID: string; - prompt: Prompt; - delivery: 'steer' | 'queue'; - }; -}; - -export type SessionNextPromptAdmitted = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.next.prompt.admitted'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - timestamp: number; - sessionID: string; - messageID: string; - prompt: Prompt; - delivery: 'steer' | 'queue'; - }; -}; - -export type SessionNextContextUpdated = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.next.context.updated'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - timestamp: number; - sessionID: string; - messageID: string; - text: string; - }; -}; - -export type SessionNextSynthetic = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.next.synthetic'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - timestamp: number; - sessionID: string; - messageID: string; - text: string; - }; -}; - -export type SessionNextShellStarted = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.next.shell.started'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - timestamp: number; - sessionID: string; - messageID: string; - callID: string; - command: string; - }; -}; - -export type SessionNextShellEnded = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.next.shell.ended'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - timestamp: number; - sessionID: string; - callID: string; - output: string; - }; -}; - -export type SessionNextStepStarted = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.next.step.started'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - agent: string; - model: ModelRef; - snapshot?: string; - }; -}; - -export type SessionNextStepEnded = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.next.step.ended'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - finish: string; - cost: number; - tokens: { - input: number; - output: number; - reasoning: number; - cache: { - read: number; - write: number; - }; - }; - snapshot?: string; - files?: Array; - }; -}; - -export type SessionNextStepFailed = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.next.step.failed'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - error: SessionErrorUnknown; - }; -}; - -export type SessionNextTextStarted = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.next.text.started'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - textID: string; - }; -}; - -export type SessionNextTextEnded = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.next.text.ended'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - textID: string; - text: string; - }; -}; - -export type SessionNextToolInputStarted = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.next.tool.input.started'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - name: string; - }; -}; - -export type SessionNextToolInputEnded = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.next.tool.input.ended'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - text: string; - }; -}; - -export type SessionNextToolCalled = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.next.tool.called'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - tool: string; - input: { - [key: string]: unknown; - }; - provider: { - executed: boolean; - metadata?: LlmProviderMetadata; - }; - }; -}; - -export type SessionNextToolProgress = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.next.tool.progress'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - structured: { - [key: string]: unknown; - }; - content: Array; - }; -}; - -export type SessionNextToolSuccess = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.next.tool.success'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - structured: { - [key: string]: unknown; - }; - content: Array; - outputPaths?: Array; - result?: unknown; - provider: { - executed: boolean; - metadata?: LlmProviderMetadata; - }; - }; -}; - -export type SessionNextToolFailed = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.next.tool.failed'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - error: SessionErrorUnknown; - result?: unknown; - provider: { - executed: boolean; - metadata?: LlmProviderMetadata; - }; - }; -}; - -export type SessionNextReasoningStarted = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.next.reasoning.started'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - reasoningID: string; - providerMetadata?: LlmProviderMetadata; - }; -}; - -export type SessionNextReasoningEnded = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.next.reasoning.ended'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - reasoningID: string; - text: string; - providerMetadata?: LlmProviderMetadata; - }; -}; - -export type SessionNextRetried = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.next.retried'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - timestamp: number; - sessionID: string; - attempt: number; - error: SessionNextRetryError; - }; -}; - -export type SessionNextCompactionStarted = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.next.compaction.started'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - timestamp: number; - sessionID: string; - messageID: string; - reason: 'auto' | 'manual'; - }; -}; - -export type SessionNextCompactionEnded = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.next.compaction.ended'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - timestamp: number; - sessionID: string; - messageID: string; - reason: 'auto' | 'manual'; - text: string; - recent: string; - include?: string; - }; -}; - -export type SessionNextRevertStaged = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.next.revert.staged'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - timestamp: number; - sessionID: string; - revert: RevertState; - }; -}; - -export type SessionNextRevertCleared = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.next.revert.cleared'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - timestamp: number; - sessionID: string; - }; -}; - -export type SessionNextRevertCommitted = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.next.revert.committed'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - timestamp: number; - sessionID: string; - messageID: string; - }; -}; - -export type SessionNextToolProgress1 = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.next.tool.progress'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - structured: { - [key: string]: unknown; - }; - content: Array; - }; -}; - -export type SessionNextToolSuccess1 = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.next.tool.success'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - structured: { - [key: string]: unknown; - }; - content: Array; - outputPaths?: Array; - result?: unknown; - provider: { - executed: boolean; - metadata?: LlmProviderMetadata; - }; - }; -}; - -export type ModelApi = { - id: string; - type: 'aisdk'; - package: string; - url?: string; - settings?: { - [key: string]: unknown; - }; -} | { - id: string; - type: 'native'; - url?: string; - settings: { - [key: string]: unknown; - }; -}; - -export type ModelCapabilities = { - tools: boolean; - input: Array; - output: Array; -}; - -export type ModelCost = { - tier?: { - type: 'context'; - size: number; - }; - input: number; - output: number; - cache: { - read: number; - write: number; - }; -}; - -export type ModelV2Info = { - id: string; - providerID: string; - family?: string; - name: string; - api: ModelApi; - capabilities: ModelCapabilities; - request: { - headers: { - [key: string]: string; - }; - body: { - [key: string]: unknown; - }; - variant?: string; - }; - variants: Array<{ - id: string; - headers: { - [key: string]: string; - }; - body: { - [key: string]: unknown; - }; - }>; - time: { - released: number; - }; - cost: Array; - status: 'alpha' | 'beta' | 'deprecated' | 'active'; - enabled: boolean; - limit: { - context: number; - input?: number; - output: number; - }; -}; - -export type ProviderAisdk = { - type: 'aisdk'; - package: string; - url?: string; - settings?: { - [key: string]: unknown; - }; -}; - -export type ProviderNative = { - type: 'native'; - url?: string; - settings: { - [key: string]: unknown; - }; -}; - -export type ProviderApi = ProviderAisdk | ProviderNative; - -export type ProviderV2Info = { - id: string; - integrationID?: string; - name: string; - disabled?: boolean; - api: ProviderApi; - request: ProviderRequest; -}; - -export type IntegrationWhen = { - key: string; - op: 'eq' | 'neq'; - value: string; -}; - -export type IntegrationTextPrompt = { - type: 'text'; - key: string; - message: string; - placeholder?: string; - when?: IntegrationWhen; -}; - -export type IntegrationSelectPrompt = { - type: 'select'; - key: string; - message: string; - options: Array<{ - label: string; - value: string; - hint?: string; - }>; - when?: IntegrationWhen; -}; - -export type IntegrationOAuthMethod = { - id: string; - type: 'oauth'; - label: string; - prompts?: Array; -}; - -export type IntegrationKeyMethod = { - type: 'key'; - label?: string; -}; - -export type IntegrationEnvMethod = { - type: 'env'; - names: Array; -}; - -export type ConnectionCredentialInfo = { - type: 'credential'; - id: string; - label: string; -}; - -export type ConnectionEnvInfo = { - type: 'env'; - name: string; -}; - -export type ConnectionInfo = ConnectionCredentialInfo | ConnectionEnvInfo; - -export type IntegrationInfo = { - id: string; - name: string; - methods: Array; - connections: Array; -}; - -export type IntegrationAttempt = { - attemptID: string; - url: string; - instructions: string; - mode: 'auto' | 'code'; - time: { - created: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - expires: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - }; -}; - -export type IntegrationAttemptStatus = { - status: 'pending'; - time: { - created: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - expires: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - }; -} | { - status: 'complete'; - time: { - created: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - expires: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - }; -} | { - status: 'failed'; - message: string; - time: { - created: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - expires: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - }; -} | { - status: 'expired'; - time: { - created: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - expires: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - }; -}; - -export type PermissionV2Request = { - id: string; - sessionID: string; - action: string; - resources: Array; - save?: Array; - metadata?: { - [key: string]: unknown; - }; - source?: PermissionV2Source; -}; - -export type PermissionSavedInfo = { - id: string; - projectID: string; - action: string; - resource: string; -}; - -export type FileSystemEntry = { - path: string; - type: 'file' | 'directory'; -}; - -export type CommandV2Info = { - name: string; - template: string; - description?: string; - agent?: string; - model?: ModelRef; - subtask?: boolean; -}; - -export type SkillV2Info = { - name: string; - description?: string; - slash?: boolean; - location: string; - content: string; -}; - -export type ModelsDevRefreshed = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'models-dev.refreshed'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - [key: string]: unknown; - }; -}; - -export type IntegrationUpdated = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'integration.updated'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - [key: string]: unknown; - }; -}; - -export type IntegrationConnectionUpdated = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'integration.connection.updated'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - integrationID: string; - }; -}; - -export type CatalogUpdated = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'catalog.updated'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - [key: string]: unknown; - }; -}; - -export type SessionCreated = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.created'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - sessionID: string; - info: Session; - }; -}; - -export type SessionUpdated = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.updated'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - sessionID: string; - info: Session; - }; -}; - -export type SessionDeleted = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.deleted'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - sessionID: string; - info: Session; - }; -}; - -export type MessageUpdated = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'message.updated'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - sessionID: string; - info: Message; - }; -}; - -export type MessageRemoved = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'message.removed'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - sessionID: string; - messageID: string; - }; -}; - -export type MessagePartUpdated = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'message.part.updated'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - sessionID: string; - part: Part; - time: number; - }; -}; - -export type MessagePartRemoved = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'message.part.removed'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - sessionID: string; - messageID: string; - partID: string; - }; -}; - -export type SessionNextTextDelta = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.next.text.delta'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - textID: string; - delta: string; - }; -}; - -export type SessionNextReasoningDelta = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.next.reasoning.delta'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - reasoningID: string; - delta: string; - }; -}; - -export type SessionNextToolInputDelta = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.next.tool.input.delta'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - delta: string; - }; -}; - -export type SessionNextCompactionDelta = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.next.compaction.delta'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - timestamp: number; - sessionID: string; - messageID: string; - text: string; - }; -}; - -export type MessagePartDelta = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'message.part.delta'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - sessionID: string; - messageID: string; - partID: string; - field: string; - delta: string; - }; -}; - -export type SessionDiff = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.diff'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - sessionID: string; - diff: Array; - }; -}; - -export type SessionError = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.error'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - sessionID?: string; - error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | StructuredOutputError | ContextOverflowError | ContentFilterError | ApiError; - }; -}; - -export type InstallationUpdated = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'installation.updated'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - version: string; - }; -}; - -export type InstallationUpdateAvailable = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'installation.update-available'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - version: string; - }; -}; - -export type FileEdited = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'file.edited'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - file: string; - }; -}; - -export type ReferenceUpdated = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'reference.updated'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - [key: string]: unknown; - }; -}; - -export type PermissionV2Asked = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'permission.v2.asked'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - id: string; - sessionID: string; - action: string; - resources: Array; - save?: Array; - metadata?: { - [key: string]: unknown; - }; - source?: PermissionV2Source; - }; -}; - -export type PermissionV2Replied = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'permission.v2.replied'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - sessionID: string; - requestID: string; - reply: PermissionV2Reply; - }; -}; - -export type PluginAdded = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'plugin.added'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - id: string; - }; -}; - -export type ProjectDirectoriesUpdated = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'project.directories.updated'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - projectID: string; - }; -}; - -export type FileWatcherUpdated = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'file.watcher.updated'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - file: string; - event: 'add' | 'change' | 'unlink'; - }; -}; - -export type PtyCreated = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'pty.created'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - info: Pty; - }; -}; - -export type PtyUpdated = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'pty.updated'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - info: Pty; - }; -}; - -export type PtyExited = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'pty.exited'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - id: string; - exitCode: number; - }; -}; - -export type PtyDeleted = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'pty.deleted'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - id: string; - }; -}; - -export type QuestionV2Asked = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'question.v2.asked'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - id: string; - sessionID: string; - /** - * Questions to ask - */ - questions: Array; - tool?: QuestionV2Tool; - }; -}; - -export type QuestionV2Replied = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'question.v2.replied'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - sessionID: string; - requestID: string; - answers: Array; - }; -}; - -export type QuestionV2Rejected = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'question.v2.rejected'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - sessionID: string; - requestID: string; - }; -}; - -export type TodoUpdated = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'todo.updated'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - sessionID: string; - todos: Array; - }; -}; - -export type LspUpdated = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'lsp.updated'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - [key: string]: unknown; - }; -}; - -export type PermissionAsked = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'permission.asked'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - id: string; - sessionID: string; - permission: string; - patterns: Array; - metadata: { - [key: string]: unknown; - }; - always: Array; - tool?: { - messageID: string; - callID: string; - }; - }; -}; - -export type PermissionReplied = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'permission.replied'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - sessionID: string; - requestID: string; - reply: 'once' | 'always' | 'reject'; - }; -}; - -export type TuiPromptAppend = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'tui.prompt.append'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - text: string; - }; -}; - -export type TuiCommandExecute = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'tui.command.execute'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - command: 'session.list' | 'session.new' | 'session.share' | 'session.interrupt' | 'session.compact' | 'session.page.up' | 'session.page.down' | 'session.line.up' | 'session.line.down' | 'session.half.page.up' | 'session.half.page.down' | 'session.first' | 'session.last' | 'prompt.clear' | 'prompt.submit' | 'agent.cycle' | string; - }; -}; - -export type TuiToastShow = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'tui.toast.show'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - title?: string; - message: string; - variant: 'info' | 'success' | 'warning' | 'error'; - duration?: number; - }; -}; - -export type TuiSessionSelect = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'tui.session.select'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - /** - * Session ID to navigate to - */ - sessionID: string; - }; -}; - -export type McpToolsChanged = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'mcp.tools.changed'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - server: string; - }; -}; - -export type McpBrowserOpenFailed = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'mcp.browser.open.failed'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - mcpName: string; - url: string; - }; -}; - -export type CommandExecuted = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'command.executed'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - name: string; - sessionID: string; - arguments: string; - messageID: string; - }; -}; - -export type ProjectUpdated = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'project.updated'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - id: string; - worktree: string; - vcs?: ProjectVcs; - name?: string; - icon?: ProjectIcon; - commands?: ProjectCommands; - time: ProjectTime; - sandboxes: Array; - }; -}; - -export type SessionIdle = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.idle'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - sessionID: string; - }; -}; - -export type QuestionAsked = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'question.asked'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - id: string; - sessionID: string; - /** - * Questions to ask - */ - questions: Array; - blocking?: boolean; - tool?: QuestionTool; - }; -}; - -export type SessionCompacted = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'session.compacted'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - sessionID: string; - }; -}; - -export type VcsBranchUpdated = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'vcs.branch.updated'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - branch?: string; - }; -}; - -export type WorkspaceReady = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'workspace.ready'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - name: string; - }; -}; - -export type WorkspaceFailed = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'workspace.failed'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - message: string; - }; -}; - -export type WorkspaceStatus = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'workspace.status'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - workspaceID: string; - status: 'connected' | 'connecting' | 'disconnected' | 'error'; - }; -}; - -export type WorktreeReady = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'worktree.ready'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - name: string; - branch?: string; - }; -}; - -export type WorktreeFailed = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'worktree.failed'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - message: string; - }; -}; - -export type ServerConnected = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'server.connected'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - [key: string]: unknown; - }; -}; - -export type GlobalDisposed = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'global.disposed'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - [key: string]: unknown; - }; -}; - -export type GlobalConfigUpdated = { - id: string; - metadata?: { - [key: string]: unknown; - }; - type: 'global.config.updated'; - durable?: { - aggregateID: string; - seq: number; - version: number; - }; - location?: LocationRef; - data: { - [key: string]: unknown; - }; -}; - -export type QuestionV2Request = { - id: string; - sessionID: string; + id: string + type: "question.v2.asked" + properties: { + id: string + sessionID: string /** * Questions to ask */ - questions: Array; - tool?: QuestionV2Tool; -}; + questions: Array + tool?: QuestionV2Tool + } +} + +export type QuestionV2Answer = Array + +export type EventQuestionV2Replied = { + id: string + type: "question.v2.replied" + properties: { + sessionID: string + requestID: string + answers: Array + } +} + +export type EventQuestionV2Rejected = { + id: string + type: "question.v2.rejected" + properties: { + sessionID: string + requestID: string + } +} + +export type EventTodoUpdated = { + id: string + type: "todo.updated" + properties: { + sessionID: string + todos: Array + } +} + +export type EventLspUpdated = { + id: string + type: "lsp.updated" + properties: { + [key: string]: unknown + } +} + +export type EventPermissionAsked = { + id: string + type: "permission.asked" + properties: { + id: string + sessionID: string + permission: string + patterns: Array + metadata: { + [key: string]: unknown + } + always: Array + tool?: { + messageID: string + callID: string + } + } +} + +export type EventPermissionReplied = { + id: string + type: "permission.replied" + properties: { + sessionID: string + requestID: string + reply: "once" | "always" | "reject" + } +} + +export type EventMcpToolsChanged = { + id: string + type: "mcp.tools.changed" + properties: { + server: string + } +} + +export type EventMcpBrowserOpenFailed = { + id: string + type: "mcp.browser.open.failed" + properties: { + mcpName: string + url: string + } +} + +export type EventCommandExecuted = { + id: string + type: "command.executed" + properties: { + name: string + sessionID: string + arguments: string + messageID: string + } +} + +export type ProjectVcs = "git" + +export type ProjectIcon = { + url?: string + override?: string + color?: string +} + +export type ProjectCommands = { + /** + * Startup script to run when creating a new workspace (worktree) + */ + start?: string +} + +export type ProjectTime = { + created: number + updated: number + initialized?: number +} + +export type EventProjectUpdated = { + id: string + type: "project.updated" + properties: { + id: string + worktree: string + vcs?: ProjectVcs + name?: string + icon?: ProjectIcon + commands?: ProjectCommands + time: ProjectTime + sandboxes: Array + } +} + +export type EventSessionStatus = { + id: string + type: "session.status" + properties: { + sessionID: string + status: SessionStatus + } +} + +export type EventSessionIdle = { + id: string + type: "session.idle" + properties: { + sessionID: string + } +} + +export type EventQuestionAsked = { + id: string + type: "question.asked" + properties: { + id: string + sessionID: string + /** + * Questions to ask + */ + questions: Array + blocking?: boolean + tool?: QuestionTool + } +} + +export type EventQuestionReplied = { + id: string + type: "question.replied" + properties: { + sessionID: string + requestID: string + answers: Array + } +} + +export type EventQuestionRejected = { + id: string + type: "question.rejected" + properties: { + sessionID: string + requestID: string + } +} + +export type EventSessionCompacted = { + id: string + type: "session.compacted" + properties: { + sessionID: string + } +} + +export type EventVcsBranchUpdated = { + id: string + type: "vcs.branch.updated" + properties: { + branch?: string + } +} + +export type EventWorkspaceReady = { + id: string + type: "workspace.ready" + properties: { + name: string + } +} + +export type EventWorkspaceFailed = { + id: string + type: "workspace.failed" + properties: { + message: string + } +} + +export type EventWorkspaceStatus = { + id: string + type: "workspace.status" + properties: { + workspaceID: string + status: "connected" | "connecting" | "disconnected" | "error" + } +} + +export type EventWorktreeReady = { + id: string + type: "worktree.ready" + properties: { + name: string + branch?: string + } +} + +export type EventWorktreeFailed = { + id: string + type: "worktree.failed" + properties: { + message: string + } +} + +export type EventServerConnected = { + id: string + type: "server.connected" + properties: { + [key: string]: unknown + } +} + +export type EventGlobalDisposed = { + id: string + type: "global.disposed" + properties: { + [key: string]: unknown + } +} + +export type EventGlobalConfigUpdated = { + id: string + type: "global.config.updated" + properties: { + [key: string]: unknown + } +} + +export type SyncEventSessionCreated = { + type: "sync" + id: string + syncEvent: { + type: "session.created.1" + id: string + seq: number + aggregateID: string + data: { + sessionID: string + info: Session + } + } +} + +export type SyncEventSessionUpdated = { + type: "sync" + id: string + syncEvent: { + type: "session.updated.1" + id: string + seq: number + aggregateID: string + data: { + sessionID: string + info: Session + } + } +} + +export type SyncEventSessionDeleted = { + type: "sync" + id: string + syncEvent: { + type: "session.deleted.1" + id: string + seq: number + aggregateID: string + data: { + sessionID: string + info: Session + } + } +} + +export type SyncEventMessageUpdated = { + type: "sync" + id: string + syncEvent: { + type: "message.updated.1" + id: string + seq: number + aggregateID: string + data: { + sessionID: string + info: Message + } + } +} + +export type SyncEventMessageRemoved = { + type: "sync" + id: string + syncEvent: { + type: "message.removed.1" + id: string + seq: number + aggregateID: string + data: { + sessionID: string + messageID: string + } + } +} + +export type SyncEventMessagePartUpdated = { + type: "sync" + id: string + syncEvent: { + type: "message.part.updated.1" + id: string + seq: number + aggregateID: string + data: { + sessionID: string + part: Part + time: number + } + } +} + +export type SyncEventMessagePartRemoved = { + type: "sync" + id: string + syncEvent: { + type: "message.part.removed.1" + id: string + seq: number + aggregateID: string + data: { + sessionID: string + messageID: string + partID: string + } + } +} + +export type SyncEventSessionNextAgentSwitched = { + type: "sync" + id: string + syncEvent: { + type: "session.next.agent.switched.1" + id: string + seq: number + aggregateID: string + data: { + timestamp: number + sessionID: string + messageID: string + agent: string + } + } +} + +export type SyncEventSessionNextModelSwitched = { + type: "sync" + id: string + syncEvent: { + type: "session.next.model.switched.1" + id: string + seq: number + aggregateID: string + data: { + timestamp: number + sessionID: string + messageID: string + model: ModelRef + } + } +} + +export type SyncEventSessionNextMoved = { + type: "sync" + id: string + syncEvent: { + type: "session.next.moved.1" + id: string + seq: number + aggregateID: string + data: { + timestamp: number + sessionID: string + location: LocationRef + subdirectory?: string + } + } +} + +export type SyncEventSessionNextPrompted = { + type: "sync" + id: string + syncEvent: { + type: "session.next.prompted.1" + id: string + seq: number + aggregateID: string + data: { + timestamp: number + sessionID: string + messageID: string + prompt: Prompt + delivery: "steer" | "queue" + } + } +} + +export type SyncEventSessionNextPromptAdmitted = { + type: "sync" + id: string + syncEvent: { + type: "session.next.prompt.admitted.1" + id: string + seq: number + aggregateID: string + data: { + timestamp: number + sessionID: string + messageID: string + prompt: Prompt + delivery: "steer" | "queue" + } + } +} + +export type SyncEventSessionNextContextUpdated = { + type: "sync" + id: string + syncEvent: { + type: "session.next.context.updated.1" + id: string + seq: number + aggregateID: string + data: { + timestamp: number + sessionID: string + messageID: string + text: string + } + } +} + +export type SyncEventSessionNextSynthetic = { + type: "sync" + id: string + syncEvent: { + type: "session.next.synthetic.1" + id: string + seq: number + aggregateID: string + data: { + timestamp: number + sessionID: string + messageID: string + text: string + } + } +} + +export type SyncEventSessionNextShellStarted = { + type: "sync" + id: string + syncEvent: { + type: "session.next.shell.started.1" + id: string + seq: number + aggregateID: string + data: { + timestamp: number + sessionID: string + messageID: string + callID: string + command: string + } + } +} + +export type SyncEventSessionNextShellEnded = { + type: "sync" + id: string + syncEvent: { + type: "session.next.shell.ended.1" + id: string + seq: number + aggregateID: string + data: { + timestamp: number + sessionID: string + callID: string + output: string + } + } +} + +export type SyncEventSessionNextStepStarted = { + type: "sync" + id: string + syncEvent: { + type: "session.next.step.started.1" + id: string + seq: number + aggregateID: string + data: { + timestamp: number + sessionID: string + assistantMessageID: string + agent: string + model: ModelRef + snapshot?: string + } + } +} + +export type SyncEventSessionNextStepEnded = { + type: "sync" + id: string + syncEvent: { + type: "session.next.step.ended.2" + id: string + seq: number + aggregateID: string + data: { + timestamp: number + sessionID: string + assistantMessageID: string + finish: string + cost: number + tokens: { + input: number + output: number + reasoning: number + cache: { + read: number + write: number + } + } + snapshot?: string + files?: Array + } + } +} + +export type SyncEventSessionNextStepFailed = { + type: "sync" + id: string + syncEvent: { + type: "session.next.step.failed.2" + id: string + seq: number + aggregateID: string + data: { + timestamp: number + sessionID: string + assistantMessageID: string + error: SessionErrorUnknown + } + } +} + +export type SyncEventSessionNextTextStarted = { + type: "sync" + id: string + syncEvent: { + type: "session.next.text.started.1" + id: string + seq: number + aggregateID: string + data: { + timestamp: number + sessionID: string + assistantMessageID: string + textID: string + } + } +} + +export type SyncEventSessionNextTextEnded = { + type: "sync" + id: string + syncEvent: { + type: "session.next.text.ended.1" + id: string + seq: number + aggregateID: string + data: { + timestamp: number + sessionID: string + assistantMessageID: string + textID: string + text: string + } + } +} + +export type SyncEventSessionNextReasoningStarted = { + type: "sync" + id: string + syncEvent: { + type: "session.next.reasoning.started.1" + id: string + seq: number + aggregateID: string + data: { + timestamp: number + sessionID: string + assistantMessageID: string + reasoningID: string + providerMetadata?: LlmProviderMetadata + } + } +} + +export type SyncEventSessionNextReasoningEnded = { + type: "sync" + id: string + syncEvent: { + type: "session.next.reasoning.ended.1" + id: string + seq: number + aggregateID: string + data: { + timestamp: number + sessionID: string + assistantMessageID: string + reasoningID: string + text: string + providerMetadata?: LlmProviderMetadata + } + } +} + +export type SyncEventSessionNextToolInputStarted = { + type: "sync" + id: string + syncEvent: { + type: "session.next.tool.input.started.1" + id: string + seq: number + aggregateID: string + data: { + timestamp: number + sessionID: string + assistantMessageID: string + callID: string + name: string + } + } +} + +export type SyncEventSessionNextToolInputEnded = { + type: "sync" + id: string + syncEvent: { + type: "session.next.tool.input.ended.1" + id: string + seq: number + aggregateID: string + data: { + timestamp: number + sessionID: string + assistantMessageID: string + callID: string + text: string + } + } +} + +export type SyncEventSessionNextToolCalled = { + type: "sync" + id: string + syncEvent: { + type: "session.next.tool.called.1" + id: string + seq: number + aggregateID: string + data: { + timestamp: number + sessionID: string + assistantMessageID: string + callID: string + tool: string + input: { + [key: string]: unknown + } + provider: { + executed: boolean + metadata?: LlmProviderMetadata + } + } + } +} + +export type SyncEventSessionNextToolProgress = { + type: "sync" + id: string + syncEvent: { + type: "session.next.tool.progress.1" + id: string + seq: number + aggregateID: string + data: { + timestamp: number + sessionID: string + assistantMessageID: string + callID: string + structured: { + [key: string]: unknown + } + content: Array + } + } +} + +export type SyncEventSessionNextToolSuccess = { + type: "sync" + id: string + syncEvent: { + type: "session.next.tool.success.1" + id: string + seq: number + aggregateID: string + data: { + timestamp: number + sessionID: string + assistantMessageID: string + callID: string + structured: { + [key: string]: unknown + } + content: Array + outputPaths?: Array + result?: unknown + provider: { + executed: boolean + metadata?: LlmProviderMetadata + } + } + } +} + +export type SyncEventSessionNextToolFailed = { + type: "sync" + id: string + syncEvent: { + type: "session.next.tool.failed.1" + id: string + seq: number + aggregateID: string + data: { + timestamp: number + sessionID: string + assistantMessageID: string + callID: string + error: SessionErrorUnknown + result?: unknown + provider: { + executed: boolean + metadata?: LlmProviderMetadata + } + } + } +} + +export type SyncEventSessionNextRetried = { + type: "sync" + id: string + syncEvent: { + type: "session.next.retried.1" + id: string + seq: number + aggregateID: string + data: { + timestamp: number + sessionID: string + attempt: number + error: SessionNextRetryError + } + } +} + +export type SyncEventSessionNextCompactionStarted = { + type: "sync" + id: string + syncEvent: { + type: "session.next.compaction.started.1" + id: string + seq: number + aggregateID: string + data: { + timestamp: number + sessionID: string + messageID: string + reason: "auto" | "manual" + } + } +} + +export type SyncEventSessionNextCompactionEnded = { + type: "sync" + id: string + syncEvent: { + type: "session.next.compaction.ended.1" + id: string + seq: number + aggregateID: string + data: { + timestamp: number + sessionID: string + messageID: string + reason: "auto" | "manual" + text: string + recent: string + include?: string + } + } +} + +export type SyncEventSessionNextRevertStaged = { + type: "sync" + id: string + syncEvent: { + type: "session.next.revert.staged.1" + id: string + seq: number + aggregateID: string + data: { + timestamp: number + sessionID: string + revert: RevertState + } + } +} + +export type SyncEventSessionNextRevertCleared = { + type: "sync" + id: string + syncEvent: { + type: "session.next.revert.cleared.1" + id: string + seq: number + aggregateID: string + data: { + timestamp: number + sessionID: string + } + } +} + +export type SyncEventSessionNextRevertCommitted = { + type: "sync" + id: string + syncEvent: { + type: "session.next.revert.committed.1" + id: string + seq: number + aggregateID: string + data: { + timestamp: number + sessionID: string + messageID: string + } + } +} + +export type ConfigV2ReferenceGit = { + repository: string + branch?: string + description?: string + hidden?: boolean +} + +export type ConfigV2ReferenceLocal = { + path: string + description?: string + hidden?: boolean +} + +export type PolicyEffect = "allow" | "deny" + +export type ConfigV2ExperimentalPolicy = { + action: "provider.use" + effect: PolicyEffect + resource: string +} + +export type ProjectDirectories = Array<{ + directory: string + strategy?: string +}> + +export type PtyTicketConnectToken = { + ticket: string + expires_in: number +} + +export type WorkspaceEventConnectionStatus = { + workspaceID: string + status: "connected" | "connecting" | "disconnected" | "error" +} + +export type LocationInfo = { + directory: string + workspaceID?: string + project: { + id: string + directory: string + } +} + +export type ProviderRequest = { + headers: { + [key: string]: string + } + body: { + [key: string]: unknown + } +} + +export type AgentColor = string | "primary" | "secondary" | "accent" | "success" | "warning" | "error" | "info" + +export type PermissionV2Effect = "allow" | "deny" | "ask" + +export type PermissionV2Rule = { + action: string + resource: string + effect: PermissionV2Effect +} + +export type PermissionV2Ruleset = Array + +export type AgentV2Info = { + id: string + model?: ModelRef + request: ProviderRequest + system?: string + description?: string + mode: "subagent" | "primary" | "all" + hidden: boolean + color?: AgentColor + steps?: number + permissions: PermissionV2Ruleset +} + +export type SessionV2Info = { + id: string + parentID?: string + projectID: string + agent?: string + model?: ModelRef + cost: number + tokens: { + input: number + output: number + reasoning: number + cache: { + read: number + write: number + } + } + time: { + created: number + updated: number + archived?: number + } + title: string + location: LocationRef + subpath?: string + revert?: RevertState +} + +export type PromptInputFileAttachment = { + uri: string + name?: string + description?: string + source?: PromptSource +} + +export type SessionInputAdmitted = { + admittedSeq: number + id: string + sessionID: string + prompt: Prompt + delivery: "steer" | "queue" + timeCreated: number + promotedSeq?: number +} + +export type SessionMessageAgentSwitched = { + id: string + metadata?: { + [key: string]: unknown + } + time: { + created: number + } + type: "agent-switched" + agent: string +} + +export type SessionMessageModelSwitched = { + id: string + metadata?: { + [key: string]: unknown + } + time: { + created: number + } + type: "model-switched" + model: ModelRef +} + +export type SessionMessageUser = { + id: string + metadata?: { + [key: string]: unknown + } + time: { + created: number + } + text: string + files?: Array + agents?: Array + type: "user" +} + +export type SessionMessageSynthetic = { + id: string + metadata?: { + [key: string]: unknown + } + time: { + created: number + } + sessionID: string + text: string + type: "synthetic" +} + +export type SessionMessageSystem = { + id: string + metadata?: { + [key: string]: unknown + } + time: { + created: number + } + type: "system" + text: string +} + +export type SessionMessageShell = { + id: string + metadata?: { + [key: string]: unknown + } + time: { + created: number + completed?: number + } + type: "shell" + callID: string + command: string + output: string +} + +export type SessionMessageAssistantText = { + type: "text" + id: string + text: string +} + +export type SessionMessageAssistantReasoning = { + type: "reasoning" + id: string + text: string + providerMetadata?: LlmProviderMetadata + time?: { + created: number + completed?: number + } +} + +export type SessionMessageToolStatePending = { + status: "pending" + input: string +} + +export type SessionMessageToolStateRunning = { + status: "running" + input: { + [key: string]: unknown + } + structured: { + [key: string]: unknown + } + content: Array +} + +export type SessionMessageToolStateCompleted = { + status: "completed" + input: { + [key: string]: unknown + } + attachments?: Array + content: Array + outputPaths?: Array + structured: { + [key: string]: unknown + } + result?: unknown +} + +export type SessionMessageToolStateError = { + status: "error" + input: { + [key: string]: unknown + } + content: Array + structured: { + [key: string]: unknown + } + error: SessionErrorUnknown + result?: unknown +} + +export type SessionMessageAssistantTool = { + type: "tool" + id: string + name: string + provider?: { + executed: boolean + metadata?: LlmProviderMetadata + resultMetadata?: LlmProviderMetadata + } + state: + | SessionMessageToolStatePending + | SessionMessageToolStateRunning + | SessionMessageToolStateCompleted + | SessionMessageToolStateError + time: { + created: number + ran?: number + completed?: number + pruned?: number + } +} + +export type SessionMessageAssistant = { + id: string + metadata?: { + [key: string]: unknown + } + time: { + created: number + completed?: number + } + type: "assistant" + agent: string + model: ModelRef + content: Array + snapshot?: { + start?: string + end?: string + files?: Array + } + finish?: string + cost?: number + tokens?: { + input: number + output: number + reasoning: number + cache: { + read: number + write: number + } + } + error?: SessionErrorUnknown +} + +export type SessionMessageCompaction = { + type: "compaction" + reason: "auto" | "manual" + summary: string + recent: string + id: string + metadata?: { + [key: string]: unknown + } + time: { + created: number + } +} + +export type SessionMessage = + | SessionMessageAgentSwitched + | SessionMessageModelSwitched + | SessionMessageUser + | SessionMessageSynthetic + | SessionMessageSystem + | SessionMessageShell + | SessionMessageAssistant + | SessionMessageCompaction + +export type SessionNextAgentSwitched = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.next.agent.switched" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + timestamp: number + sessionID: string + messageID: string + agent: string + } +} + +export type SessionNextModelSwitched = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.next.model.switched" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + timestamp: number + sessionID: string + messageID: string + model: ModelRef + } +} + +export type SessionNextMoved = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.next.moved" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + timestamp: number + sessionID: string + location: LocationRef + subdirectory?: string + } +} + +export type SessionNextPrompted = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.next.prompted" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + timestamp: number + sessionID: string + messageID: string + prompt: Prompt + delivery: "steer" | "queue" + } +} + +export type SessionNextPromptAdmitted = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.next.prompt.admitted" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + timestamp: number + sessionID: string + messageID: string + prompt: Prompt + delivery: "steer" | "queue" + } +} + +export type SessionNextContextUpdated = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.next.context.updated" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + timestamp: number + sessionID: string + messageID: string + text: string + } +} + +export type SessionNextSynthetic = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.next.synthetic" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + timestamp: number + sessionID: string + messageID: string + text: string + } +} + +export type SessionNextShellStarted = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.next.shell.started" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + timestamp: number + sessionID: string + messageID: string + callID: string + command: string + } +} + +export type SessionNextShellEnded = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.next.shell.ended" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + timestamp: number + sessionID: string + callID: string + output: string + } +} + +export type SessionNextStepStarted = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.next.step.started" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + timestamp: number + sessionID: string + assistantMessageID: string + agent: string + model: ModelRef + snapshot?: string + } +} + +export type SessionNextStepEnded = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.next.step.ended" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + timestamp: number + sessionID: string + assistantMessageID: string + finish: string + cost: number + tokens: { + input: number + output: number + reasoning: number + cache: { + read: number + write: number + } + } + snapshot?: string + files?: Array + } +} + +export type SessionNextStepFailed = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.next.step.failed" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + timestamp: number + sessionID: string + assistantMessageID: string + error: SessionErrorUnknown + } +} + +export type SessionNextTextStarted = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.next.text.started" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + timestamp: number + sessionID: string + assistantMessageID: string + textID: string + } +} + +export type SessionNextTextEnded = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.next.text.ended" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + timestamp: number + sessionID: string + assistantMessageID: string + textID: string + text: string + } +} + +export type SessionNextToolInputStarted = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.next.tool.input.started" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + timestamp: number + sessionID: string + assistantMessageID: string + callID: string + name: string + } +} + +export type SessionNextToolInputEnded = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.next.tool.input.ended" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + timestamp: number + sessionID: string + assistantMessageID: string + callID: string + text: string + } +} + +export type SessionNextToolCalled = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.next.tool.called" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + timestamp: number + sessionID: string + assistantMessageID: string + callID: string + tool: string + input: { + [key: string]: unknown + } + provider: { + executed: boolean + metadata?: LlmProviderMetadata + } + } +} + +export type SessionNextToolProgress = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.next.tool.progress" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + timestamp: number + sessionID: string + assistantMessageID: string + callID: string + structured: { + [key: string]: unknown + } + content: Array + } +} + +export type SessionNextToolSuccess = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.next.tool.success" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + timestamp: number + sessionID: string + assistantMessageID: string + callID: string + structured: { + [key: string]: unknown + } + content: Array + outputPaths?: Array + result?: unknown + provider: { + executed: boolean + metadata?: LlmProviderMetadata + } + } +} + +export type SessionNextToolFailed = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.next.tool.failed" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + timestamp: number + sessionID: string + assistantMessageID: string + callID: string + error: SessionErrorUnknown + result?: unknown + provider: { + executed: boolean + metadata?: LlmProviderMetadata + } + } +} + +export type SessionNextReasoningStarted = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.next.reasoning.started" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + timestamp: number + sessionID: string + assistantMessageID: string + reasoningID: string + providerMetadata?: LlmProviderMetadata + } +} + +export type SessionNextReasoningEnded = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.next.reasoning.ended" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + timestamp: number + sessionID: string + assistantMessageID: string + reasoningID: string + text: string + providerMetadata?: LlmProviderMetadata + } +} + +export type SessionNextRetried = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.next.retried" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + timestamp: number + sessionID: string + attempt: number + error: SessionNextRetryError + } +} + +export type SessionNextCompactionStarted = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.next.compaction.started" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + timestamp: number + sessionID: string + messageID: string + reason: "auto" | "manual" + } +} + +export type SessionNextCompactionEnded = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.next.compaction.ended" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + timestamp: number + sessionID: string + messageID: string + reason: "auto" | "manual" + text: string + recent: string + include?: string + } +} + +export type SessionNextRevertStaged = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.next.revert.staged" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + timestamp: number + sessionID: string + revert: RevertState + } +} + +export type SessionNextRevertCleared = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.next.revert.cleared" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + timestamp: number + sessionID: string + } +} + +export type SessionNextRevertCommitted = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.next.revert.committed" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + timestamp: number + sessionID: string + messageID: string + } +} + +export type ModelApi = + | { + id: string + type: "aisdk" + package: string + url?: string + settings?: { + [key: string]: unknown + } + } + | { + id: string + type: "native" + url?: string + settings: { + [key: string]: unknown + } + } + +export type ModelCapabilities = { + tools: boolean + input: Array + output: Array +} + +export type ModelCost = { + tier?: { + type: "context" + size: number + } + input: number + output: number + cache: { + read: number + write: number + } +} + +export type ModelV2Info = { + id: string + providerID: string + family?: string + name: string + api: ModelApi + capabilities: ModelCapabilities + request: { + headers: { + [key: string]: string + } + body: { + [key: string]: unknown + } + variant?: string + } + variants: Array<{ + id: string + headers: { + [key: string]: string + } + body: { + [key: string]: unknown + } + }> + time: { + released: number + } + cost: Array + status: "alpha" | "beta" | "deprecated" | "active" + enabled: boolean + limit: { + context: number + input?: number + output: number + } +} + +export type ProviderAisdk = { + type: "aisdk" + package: string + url?: string + settings?: { + [key: string]: unknown + } +} + +export type ProviderNative = { + type: "native" + url?: string + settings: { + [key: string]: unknown + } +} + +export type ProviderApi = ProviderAisdk | ProviderNative + +export type ProviderV2Info = { + id: string + integrationID?: string + name: string + disabled?: boolean + api: ProviderApi + request: ProviderRequest +} + +export type IntegrationWhen = { + key: string + op: "eq" | "neq" + value: string +} + +export type IntegrationTextPrompt = { + type: "text" + key: string + message: string + placeholder?: string + when?: IntegrationWhen +} + +export type IntegrationSelectPrompt = { + type: "select" + key: string + message: string + options: Array<{ + label: string + value: string + hint?: string + }> + when?: IntegrationWhen +} + +export type IntegrationOAuthMethod = { + id: string + type: "oauth" + label: string + prompts?: Array +} + +export type IntegrationKeyMethod = { + type: "key" + label?: string +} + +export type IntegrationEnvMethod = { + type: "env" + names: Array +} + +export type ConnectionCredentialInfo = { + type: "credential" + id: string + label: string +} + +export type ConnectionEnvInfo = { + type: "env" + name: string +} + +export type ConnectionInfo = ConnectionCredentialInfo | ConnectionEnvInfo + +export type IntegrationInfo = { + id: string + name: string + methods: Array + connections: Array +} + +export type IntegrationAttempt = { + attemptID: string + url: string + instructions: string + mode: "auto" | "code" + time: { + created: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + expires: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + } +} + +export type IntegrationAttemptStatus = + | { + status: "pending" + time: { + created: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + expires: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + } + } + | { + status: "complete" + time: { + created: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + expires: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + } + } + | { + status: "failed" + message: string + time: { + created: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + expires: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + } + } + | { + status: "expired" + time: { + created: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + expires: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + } + } + +export type PermissionV2Request = { + id: string + sessionID: string + action: string + resources: Array + save?: Array + metadata?: { + [key: string]: unknown + } + source?: PermissionV2Source +} + +export type PermissionSavedInfo = { + id: string + projectID: string + action: string + resource: string +} + +export type FileSystemEntry = { + path: string + type: "file" | "directory" +} + +export type CommandV2Info = { + name: string + template: string + description?: string + agent?: string + model?: ModelRef + subtask?: boolean +} + +export type SkillV2Info = { + name: string + description?: string + slash?: boolean + location: string + content: string +} + +export type ModelsDevRefreshed = { + id: string + metadata?: { + [key: string]: unknown + } + type: "models-dev.refreshed" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + [key: string]: unknown + } +} + +export type IntegrationUpdated = { + id: string + metadata?: { + [key: string]: unknown + } + type: "integration.updated" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + [key: string]: unknown + } +} + +export type IntegrationConnectionUpdated = { + id: string + metadata?: { + [key: string]: unknown + } + type: "integration.connection.updated" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + integrationID: string + } +} + +export type CatalogUpdated = { + id: string + metadata?: { + [key: string]: unknown + } + type: "catalog.updated" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + [key: string]: unknown + } +} + +export type SessionCreated = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.created" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + sessionID: string + info: Session + } +} + +export type SessionUpdated = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.updated" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + sessionID: string + info: Session + } +} + +export type SessionDeleted = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.deleted" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + sessionID: string + info: Session + } +} + +export type MessageUpdated = { + id: string + metadata?: { + [key: string]: unknown + } + type: "message.updated" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + sessionID: string + info: Message + } +} + +export type MessageRemoved = { + id: string + metadata?: { + [key: string]: unknown + } + type: "message.removed" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + sessionID: string + messageID: string + } +} + +export type MessagePartUpdated = { + id: string + metadata?: { + [key: string]: unknown + } + type: "message.part.updated" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + sessionID: string + part: Part + time: number + } +} + +export type MessagePartRemoved = { + id: string + metadata?: { + [key: string]: unknown + } + type: "message.part.removed" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + sessionID: string + messageID: string + partID: string + } +} + +export type SessionNextTextDelta = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.next.text.delta" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + timestamp: number + sessionID: string + assistantMessageID: string + textID: string + delta: string + } +} + +export type SessionNextReasoningDelta = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.next.reasoning.delta" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + timestamp: number + sessionID: string + assistantMessageID: string + reasoningID: string + delta: string + } +} + +export type SessionNextToolInputDelta = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.next.tool.input.delta" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + timestamp: number + sessionID: string + assistantMessageID: string + callID: string + delta: string + } +} + +export type SessionNextCompactionDelta = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.next.compaction.delta" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + timestamp: number + sessionID: string + messageID: string + text: string + } +} + +export type MessagePartDelta = { + id: string + metadata?: { + [key: string]: unknown + } + type: "message.part.delta" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + sessionID: string + messageID: string + partID: string + field: string + delta: string + } +} + +export type SessionDiff = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.diff" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + sessionID: string + diff: Array + } +} + +export type SessionError = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.error" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + sessionID?: string + error?: + | ProviderAuthError + | UnknownError + | MessageOutputLengthError + | MessageAbortedError + | StructuredOutputError + | ContextOverflowError + | ContentFilterError + | ApiError + } +} + +export type InstallationUpdated = { + id: string + metadata?: { + [key: string]: unknown + } + type: "installation.updated" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + version: string + } +} + +export type InstallationUpdateAvailable = { + id: string + metadata?: { + [key: string]: unknown + } + type: "installation.update-available" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + version: string + } +} + +export type FileEdited = { + id: string + metadata?: { + [key: string]: unknown + } + type: "file.edited" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + file: string + } +} + +export type ReferenceUpdated = { + id: string + metadata?: { + [key: string]: unknown + } + type: "reference.updated" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + [key: string]: unknown + } +} + +export type PermissionV2Asked = { + id: string + metadata?: { + [key: string]: unknown + } + type: "permission.v2.asked" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + id: string + sessionID: string + action: string + resources: Array + save?: Array + metadata?: { + [key: string]: unknown + } + source?: PermissionV2Source + } +} + +export type PermissionV2Replied = { + id: string + metadata?: { + [key: string]: unknown + } + type: "permission.v2.replied" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + sessionID: string + requestID: string + reply: PermissionV2Reply + } +} + +export type PluginAdded = { + id: string + metadata?: { + [key: string]: unknown + } + type: "plugin.added" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + id: string + } +} + +export type ProjectDirectoriesUpdated = { + id: string + metadata?: { + [key: string]: unknown + } + type: "project.directories.updated" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + projectID: string + } +} + +export type FileWatcherUpdated = { + id: string + metadata?: { + [key: string]: unknown + } + type: "file.watcher.updated" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + file: string + event: "add" | "change" | "unlink" + } +} + +export type PtyCreated = { + id: string + metadata?: { + [key: string]: unknown + } + type: "pty.created" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + info: Pty + } +} + +export type PtyUpdated = { + id: string + metadata?: { + [key: string]: unknown + } + type: "pty.updated" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + info: Pty + } +} + +export type PtyExited = { + id: string + metadata?: { + [key: string]: unknown + } + type: "pty.exited" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + id: string + exitCode: number + } +} + +export type PtyDeleted = { + id: string + metadata?: { + [key: string]: unknown + } + type: "pty.deleted" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + id: string + } +} + +export type QuestionV2Asked = { + id: string + metadata?: { + [key: string]: unknown + } + type: "question.v2.asked" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + id: string + sessionID: string + /** + * Questions to ask + */ + questions: Array + tool?: QuestionV2Tool + } +} + +export type QuestionV2Replied = { + id: string + metadata?: { + [key: string]: unknown + } + type: "question.v2.replied" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + sessionID: string + requestID: string + answers: Array + } +} + +export type QuestionV2Rejected = { + id: string + metadata?: { + [key: string]: unknown + } + type: "question.v2.rejected" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + sessionID: string + requestID: string + } +} + +export type TodoUpdated = { + id: string + metadata?: { + [key: string]: unknown + } + type: "todo.updated" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + sessionID: string + todos: Array + } +} + +export type LspUpdated = { + id: string + metadata?: { + [key: string]: unknown + } + type: "lsp.updated" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + [key: string]: unknown + } +} + +export type PermissionAsked = { + id: string + metadata?: { + [key: string]: unknown + } + type: "permission.asked" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + id: string + sessionID: string + permission: string + patterns: Array + metadata: { + [key: string]: unknown + } + always: Array + tool?: { + messageID: string + callID: string + } + } +} + +export type PermissionReplied = { + id: string + metadata?: { + [key: string]: unknown + } + type: "permission.replied" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + sessionID: string + requestID: string + reply: "once" | "always" | "reject" + } +} + +export type TuiPromptAppend = { + id: string + metadata?: { + [key: string]: unknown + } + type: "tui.prompt.append" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + text: string + } +} + +export type TuiCommandExecute = { + id: string + metadata?: { + [key: string]: unknown + } + type: "tui.command.execute" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + command: + | "session.list" + | "session.new" + | "session.share" + | "session.interrupt" + | "session.compact" + | "session.page.up" + | "session.page.down" + | "session.line.up" + | "session.line.down" + | "session.half.page.up" + | "session.half.page.down" + | "session.first" + | "session.last" + | "prompt.clear" + | "prompt.submit" + | "agent.cycle" + | string + } +} + +export type TuiToastShow = { + id: string + metadata?: { + [key: string]: unknown + } + type: "tui.toast.show" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + title?: string + message: string + variant: "info" | "success" | "warning" | "error" + duration?: number + } +} + +export type TuiSessionSelect = { + id: string + metadata?: { + [key: string]: unknown + } + type: "tui.session.select" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + /** + * Session ID to navigate to + */ + sessionID: string + } +} + +export type McpToolsChanged = { + id: string + metadata?: { + [key: string]: unknown + } + type: "mcp.tools.changed" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + server: string + } +} + +export type McpBrowserOpenFailed = { + id: string + metadata?: { + [key: string]: unknown + } + type: "mcp.browser.open.failed" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + mcpName: string + url: string + } +} + +export type CommandExecuted = { + id: string + metadata?: { + [key: string]: unknown + } + type: "command.executed" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + name: string + sessionID: string + arguments: string + messageID: string + } +} + +export type ProjectUpdated = { + id: string + metadata?: { + [key: string]: unknown + } + type: "project.updated" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + id: string + worktree: string + vcs?: ProjectVcs + name?: string + icon?: ProjectIcon + commands?: ProjectCommands + time: ProjectTime + sandboxes: Array + } +} + +export type SessionIdle = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.idle" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + sessionID: string + } +} + +export type QuestionAsked = { + id: string + metadata?: { + [key: string]: unknown + } + type: "question.asked" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + id: string + sessionID: string + /** + * Questions to ask + */ + questions: Array + blocking?: boolean + tool?: QuestionTool + } +} + +export type SessionCompacted = { + id: string + metadata?: { + [key: string]: unknown + } + type: "session.compacted" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + sessionID: string + } +} + +export type VcsBranchUpdated = { + id: string + metadata?: { + [key: string]: unknown + } + type: "vcs.branch.updated" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + branch?: string + } +} + +export type WorkspaceReady = { + id: string + metadata?: { + [key: string]: unknown + } + type: "workspace.ready" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + name: string + } +} + +export type WorkspaceFailed = { + id: string + metadata?: { + [key: string]: unknown + } + type: "workspace.failed" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + message: string + } +} + +export type WorkspaceStatus = { + id: string + metadata?: { + [key: string]: unknown + } + type: "workspace.status" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + workspaceID: string + status: "connected" | "connecting" | "disconnected" | "error" + } +} + +export type WorktreeReady = { + id: string + metadata?: { + [key: string]: unknown + } + type: "worktree.ready" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + name: string + branch?: string + } +} + +export type WorktreeFailed = { + id: string + metadata?: { + [key: string]: unknown + } + type: "worktree.failed" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + message: string + } +} + +export type ServerConnected = { + id: string + metadata?: { + [key: string]: unknown + } + type: "server.connected" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + [key: string]: unknown + } +} + +export type GlobalDisposed = { + id: string + metadata?: { + [key: string]: unknown + } + type: "global.disposed" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + [key: string]: unknown + } +} + +export type GlobalConfigUpdated = { + id: string + metadata?: { + [key: string]: unknown + } + type: "global.config.updated" + durable?: { + aggregateID: string + seq: number + version: number + } + location?: LocationRef + data: { + [key: string]: unknown + } +} + +export type QuestionV2Request = { + id: string + sessionID: string + /** + * Questions to ask + */ + questions: Array + tool?: QuestionV2Tool +} export type QuestionV2Reply = { + /** + * User answers in order of questions (each answer is an array of selected labels) + */ + answers: Array +} + +export type ReferenceLocalSource = { + type: "local" + path: string + description?: string + hidden?: boolean +} + +export type ReferenceGitSource = { + type: "git" + repository: string + branch?: string + description?: string + hidden?: boolean +} + +export type ReferenceSource = ReferenceLocalSource | ReferenceGitSource + +export type ReferenceInfo = { + name: string + path: string + description?: string + hidden?: boolean + source: ReferenceSource +} + +export type ProjectCopyCopy = { + directory: string +} + +export type EventModelsDevRefreshed1 = { + id: string + type: "models-dev.refreshed" + properties: { + [key: string]: unknown + } +} + +export type EventIntegrationUpdated1 = { + id: string + type: "integration.updated" + properties: { + [key: string]: unknown + } +} + +export type EventIntegrationConnectionUpdated1 = { + id: string + type: "integration.connection.updated" + properties: { + integrationID: string + } +} + +export type EventCatalogUpdated1 = { + id: string + type: "catalog.updated" + properties: { + [key: string]: unknown + } +} + +export type EventSessionCreated1 = { + id: string + type: "session.created" + properties: { + sessionID: string + info: Session + } +} + +export type EventSessionUpdated1 = { + id: string + type: "session.updated" + properties: { + sessionID: string + info: Session + } +} + +export type EventSessionDeleted1 = { + id: string + type: "session.deleted" + properties: { + sessionID: string + info: Session + } +} + +export type EventMessageUpdated1 = { + id: string + type: "message.updated" + properties: { + sessionID: string + info: Message + } +} + +export type EventMessageRemoved1 = { + id: string + type: "message.removed" + properties: { + sessionID: string + messageID: string + } +} + +export type EventMessagePartUpdated1 = { + id: string + type: "message.part.updated" + properties: { + sessionID: string + part: Part + time: number + } +} + +export type EventMessagePartRemoved1 = { + id: string + type: "message.part.removed" + properties: { + sessionID: string + messageID: string + partID: string + } +} + +export type EventSessionNextAgentSwitched1 = { + id: string + type: "session.next.agent.switched" + properties: { + timestamp: number + sessionID: string + messageID: string + agent: string + } +} + +export type EventSessionNextModelSwitched1 = { + id: string + type: "session.next.model.switched" + properties: { + timestamp: number + sessionID: string + messageID: string + model: ModelRef + } +} + +export type EventSessionNextMoved1 = { + id: string + type: "session.next.moved" + properties: { + timestamp: number + sessionID: string + location: LocationRef + subdirectory?: string + } +} + +export type EventSessionNextPrompted1 = { + id: string + type: "session.next.prompted" + properties: { + timestamp: number + sessionID: string + messageID: string + prompt: Prompt + delivery: "steer" | "queue" + } +} + +export type EventSessionNextPromptAdmitted1 = { + id: string + type: "session.next.prompt.admitted" + properties: { + timestamp: number + sessionID: string + messageID: string + prompt: Prompt + delivery: "steer" | "queue" + } +} + +export type EventSessionNextContextUpdated1 = { + id: string + type: "session.next.context.updated" + properties: { + timestamp: number + sessionID: string + messageID: string + text: string + } +} + +export type EventSessionNextSynthetic1 = { + id: string + type: "session.next.synthetic" + properties: { + timestamp: number + sessionID: string + messageID: string + text: string + } +} + +export type EventSessionNextShellStarted1 = { + id: string + type: "session.next.shell.started" + properties: { + timestamp: number + sessionID: string + messageID: string + callID: string + command: string + } +} + +export type EventSessionNextShellEnded1 = { + id: string + type: "session.next.shell.ended" + properties: { + timestamp: number + sessionID: string + callID: string + output: string + } +} + +export type EventSessionNextStepStarted1 = { + id: string + type: "session.next.step.started" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + agent: string + model: ModelRef + snapshot?: string + } +} + +export type EventSessionNextStepEnded1 = { + id: string + type: "session.next.step.ended" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + finish: string + cost: number + tokens: { + input: number + output: number + reasoning: number + cache: { + read: number + write: number + } + } + snapshot?: string + files?: Array + } +} + +export type EventSessionNextStepFailed1 = { + id: string + type: "session.next.step.failed" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + error: SessionErrorUnknown + } +} + +export type EventSessionNextTextStarted1 = { + id: string + type: "session.next.text.started" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + textID: string + } +} + +export type EventSessionNextTextDelta1 = { + id: string + type: "session.next.text.delta" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + textID: string + delta: string + } +} + +export type EventSessionNextTextEnded1 = { + id: string + type: "session.next.text.ended" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + textID: string + text: string + } +} + +export type EventSessionNextReasoningStarted1 = { + id: string + type: "session.next.reasoning.started" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + reasoningID: string + providerMetadata?: LlmProviderMetadata + } +} + +export type EventSessionNextReasoningDelta1 = { + id: string + type: "session.next.reasoning.delta" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + reasoningID: string + delta: string + } +} + +export type EventSessionNextReasoningEnded1 = { + id: string + type: "session.next.reasoning.ended" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + reasoningID: string + text: string + providerMetadata?: LlmProviderMetadata + } +} + +export type EventSessionNextToolInputStarted1 = { + id: string + type: "session.next.tool.input.started" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + callID: string + name: string + } +} + +export type EventSessionNextToolInputDelta1 = { + id: string + type: "session.next.tool.input.delta" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + callID: string + delta: string + } +} + +export type EventSessionNextToolInputEnded1 = { + id: string + type: "session.next.tool.input.ended" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + callID: string + text: string + } +} + +export type EventSessionNextToolCalled1 = { + id: string + type: "session.next.tool.called" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + callID: string + tool: string + input: { + [key: string]: unknown + } + provider: { + executed: boolean + metadata?: LlmProviderMetadata + } + } +} + +export type EventSessionNextToolProgress1 = { + id: string + type: "session.next.tool.progress" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + callID: string + structured: { + [key: string]: unknown + } + content: Array + } +} + +export type EventSessionNextToolSuccess1 = { + id: string + type: "session.next.tool.success" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + callID: string + structured: { + [key: string]: unknown + } + content: Array + outputPaths?: Array + result?: unknown + provider: { + executed: boolean + metadata?: LlmProviderMetadata + } + } +} + +export type EventSessionNextToolFailed1 = { + id: string + type: "session.next.tool.failed" + properties: { + timestamp: number + sessionID: string + assistantMessageID: string + callID: string + error: SessionErrorUnknown + result?: unknown + provider: { + executed: boolean + metadata?: LlmProviderMetadata + } + } +} + +export type EventSessionNextRetried1 = { + id: string + type: "session.next.retried" + properties: { + timestamp: number + sessionID: string + attempt: number + error: SessionNextRetryError + } +} + +export type EventSessionNextCompactionStarted1 = { + id: string + type: "session.next.compaction.started" + properties: { + timestamp: number + sessionID: string + messageID: string + reason: "auto" | "manual" + } +} + +export type EventSessionNextCompactionDelta1 = { + id: string + type: "session.next.compaction.delta" + properties: { + timestamp: number + sessionID: string + messageID: string + text: string + } +} + +export type EventSessionNextCompactionEnded1 = { + id: string + type: "session.next.compaction.ended" + properties: { + timestamp: number + sessionID: string + messageID: string + reason: "auto" | "manual" + text: string + recent: string + include?: string + } +} + +export type EventSessionNextRevertStaged1 = { + id: string + type: "session.next.revert.staged" + properties: { + timestamp: number + sessionID: string + revert: RevertState + } +} + +export type EventSessionNextRevertCleared1 = { + id: string + type: "session.next.revert.cleared" + properties: { + timestamp: number + sessionID: string + } +} + +export type EventSessionNextRevertCommitted1 = { + id: string + type: "session.next.revert.committed" + properties: { + timestamp: number + sessionID: string + messageID: string + } +} + +export type EventMessagePartDelta1 = { + id: string + type: "message.part.delta" + properties: { + sessionID: string + messageID: string + partID: string + field: string + delta: string + } +} + +export type EventSessionDiff1 = { + id: string + type: "session.diff" + properties: { + sessionID: string + diff: Array + } +} + +export type EventSessionError1 = { + id: string + type: "session.error" + properties: { + sessionID?: string + error?: + | ProviderAuthError + | UnknownError + | MessageOutputLengthError + | MessageAbortedError + | StructuredOutputError + | ContextOverflowError + | ContentFilterError + | ApiError + } +} + +export type EventInstallationUpdated1 = { + id: string + type: "installation.updated" + properties: { + version: string + } +} + +export type EventInstallationUpdateAvailable1 = { + id: string + type: "installation.update-available" + properties: { + version: string + } +} + +export type EventFileEdited1 = { + id: string + type: "file.edited" + properties: { + file: string + } +} + +export type EventReferenceUpdated1 = { + id: string + type: "reference.updated" + properties: { + [key: string]: unknown + } +} + +export type EventPermissionV2Asked1 = { + id: string + type: "permission.v2.asked" + properties: { + id: string + sessionID: string + action: string + resources: Array + save?: Array + metadata?: { + [key: string]: unknown + } + source?: PermissionV2Source + } +} + +export type EventPermissionV2Replied1 = { + id: string + type: "permission.v2.replied" + properties: { + sessionID: string + requestID: string + reply: PermissionV2Reply + } +} + +export type EventPluginAdded1 = { + id: string + type: "plugin.added" + properties: { + id: string + } +} + +export type EventProjectDirectoriesUpdated1 = { + id: string + type: "project.directories.updated" + properties: { + projectID: string + } +} + +export type EventFileWatcherUpdated1 = { + id: string + type: "file.watcher.updated" + properties: { + file: string + event: "add" | "change" | "unlink" + } +} + +export type EventPtyCreated1 = { + id: string + type: "pty.created" + properties: { + info: Pty + } +} + +export type EventPtyUpdated1 = { + id: string + type: "pty.updated" + properties: { + info: Pty + } +} + +export type EventPtyExited1 = { + id: string + type: "pty.exited" + properties: { + id: string + exitCode: number + } +} + +export type EventPtyDeleted1 = { + id: string + type: "pty.deleted" + properties: { + id: string + } +} + +export type EventQuestionV2Asked1 = { + id: string + type: "question.v2.asked" + properties: { + id: string + sessionID: string + /** + * Questions to ask + */ + questions: Array + tool?: QuestionV2Tool + } +} + +export type EventQuestionV2Replied1 = { + id: string + type: "question.v2.replied" + properties: { + sessionID: string + requestID: string + answers: Array + } +} + +export type EventQuestionV2Rejected1 = { + id: string + type: "question.v2.rejected" + properties: { + sessionID: string + requestID: string + } +} + +export type EventTodoUpdated1 = { + id: string + type: "todo.updated" + properties: { + sessionID: string + todos: Array + } +} + +export type EventLspUpdated1 = { + id: string + type: "lsp.updated" + properties: { + [key: string]: unknown + } +} + +export type EventPermissionAsked1 = { + id: string + type: "permission.asked" + properties: { + id: string + sessionID: string + permission: string + patterns: Array + metadata: { + [key: string]: unknown + } + always: Array + tool?: { + messageID: string + callID: string + } + } +} + +export type EventPermissionReplied1 = { + id: string + type: "permission.replied" + properties: { + sessionID: string + requestID: string + reply: "once" | "always" | "reject" + } +} + +export type EventTuiPromptAppend1 = { + id: string + type: "tui.prompt.append" + properties: { + text: string + } +} + +export type EventTuiCommandExecute1 = { + id: string + type: "tui.command.execute" + properties: { + command: + | "session.list" + | "session.new" + | "session.share" + | "session.interrupt" + | "session.compact" + | "session.page.up" + | "session.page.down" + | "session.line.up" + | "session.line.down" + | "session.half.page.up" + | "session.half.page.down" + | "session.first" + | "session.last" + | "prompt.clear" + | "prompt.submit" + | "agent.cycle" + | string + } +} + +export type EventTuiToastShow1 = { + id: string + type: "tui.toast.show" + properties: { + title?: string + message: string + variant: "info" | "success" | "warning" | "error" + duration?: number + } +} + +export type EventTuiSessionSelect1 = { + id: string + type: "tui.session.select" + properties: { + /** + * Session ID to navigate to + */ + sessionID: string + } +} + +export type EventMcpToolsChanged1 = { + id: string + type: "mcp.tools.changed" + properties: { + server: string + } +} + +export type EventMcpBrowserOpenFailed1 = { + id: string + type: "mcp.browser.open.failed" + properties: { + mcpName: string + url: string + } +} + +export type EventCommandExecuted1 = { + id: string + type: "command.executed" + properties: { + name: string + sessionID: string + arguments: string + messageID: string + } +} + +export type EventProjectUpdated1 = { + id: string + type: "project.updated" + properties: { + id: string + worktree: string + vcs?: ProjectVcs + name?: string + icon?: ProjectIcon + commands?: ProjectCommands + time: ProjectTime + sandboxes: Array + } +} + +export type EventSessionStatus1 = { + id: string + type: "session.status" + properties: { + sessionID: string + status: SessionStatus + } +} + +export type EventSessionIdle1 = { + id: string + type: "session.idle" + properties: { + sessionID: string + } +} + +export type EventQuestionAsked1 = { + id: string + type: "question.asked" + properties: { + id: string + sessionID: string + /** + * Questions to ask + */ + questions: Array + blocking?: boolean + tool?: QuestionTool + } +} + +export type EventQuestionReplied1 = { + id: string + type: "question.replied" + properties: { + sessionID: string + requestID: string + answers: Array + } +} + +export type EventQuestionRejected1 = { + id: string + type: "question.rejected" + properties: { + sessionID: string + requestID: string + } +} + +export type EventSessionCompacted1 = { + id: string + type: "session.compacted" + properties: { + sessionID: string + } +} + +export type EventVcsBranchUpdated1 = { + id: string + type: "vcs.branch.updated" + properties: { + branch?: string + } +} + +export type EventWorkspaceReady1 = { + id: string + type: "workspace.ready" + properties: { + name: string + } +} + +export type EventWorkspaceFailed1 = { + id: string + type: "workspace.failed" + properties: { + message: string + } +} + +export type EventWorkspaceStatus1 = { + id: string + type: "workspace.status" + properties: { + workspaceID: string + status: "connected" | "connecting" | "disconnected" | "error" + } +} + +export type EventWorktreeReady1 = { + id: string + type: "worktree.ready" + properties: { + name: string + branch?: string + } +} + +export type EventWorktreeFailed1 = { + id: string + type: "worktree.failed" + properties: { + message: string + } +} + +export type EventServerConnected1 = { + id: string + type: "server.connected" + properties: { + [key: string]: unknown + } +} + +export type EventGlobalDisposed1 = { + id: string + type: "global.disposed" + properties: { + [key: string]: unknown + } +} + +export type EventGlobalConfigUpdated1 = { + id: string + type: "global.config.updated" + properties: { + [key: string]: unknown + } +} + +export type EventMemoryStatus1 = { + id: string + type: "memory.status" + properties: { + directory: string + sessionID?: string + enabled: boolean + state: "idle" | "checking" | "injecting" | "updating" | "skipped" | "error" + reason?: string + project: { + bytes: number | "NaN" | "Infinity" | "-Infinity" + estimatedTokens: number | "NaN" | "Infinity" | "-Infinity" + truncated: boolean + updatedAt?: number | "NaN" | "Infinity" | "-Infinity" + } + consolidation?: { + trigger: "explicit" | "turn-close" | "rebuild" + operationCount: number | "NaN" | "Infinity" | "-Infinity" + cost: number | "NaN" | "Infinity" | "-Infinity" + tokens: number | "NaN" | "Infinity" | "-Infinity" + } + detail?: { + type: "saved" | "skipped" | "recalled" + message: string + reason?: string + duplicateOf?: string + tokens?: number | "NaN" | "Infinity" | "-Infinity" + operationCount?: number | "NaN" | "Infinity" | "-Infinity" + added?: number | "NaN" | "Infinity" | "-Infinity" + removed?: number | "NaN" | "Infinity" | "-Infinity" + skippedCount?: number | "NaN" | "Infinity" | "-Infinity" + sources?: Array + files?: Array + } + } +} + +export type EventMemoryUpdated1 = { + id: string + type: "memory.updated" + properties: { + directory: string + sessionID?: string + enabled: boolean + state: "idle" | "checking" | "injecting" | "updating" | "skipped" | "error" + reason?: string + project: { + bytes: number | "NaN" | "Infinity" | "-Infinity" + estimatedTokens: number | "NaN" | "Infinity" | "-Infinity" + truncated: boolean + updatedAt?: number | "NaN" | "Infinity" | "-Infinity" + } + consolidation?: { + trigger: "explicit" | "turn-close" | "rebuild" + operationCount: number | "NaN" | "Infinity" | "-Infinity" + cost: number | "NaN" | "Infinity" | "-Infinity" + tokens: number | "NaN" | "Infinity" | "-Infinity" + } + detail?: { + type: "saved" | "skipped" | "recalled" + message: string + reason?: string + duplicateOf?: string + tokens?: number | "NaN" | "Infinity" | "-Infinity" + operationCount?: number | "NaN" | "Infinity" | "-Infinity" + added?: number | "NaN" | "Infinity" | "-Infinity" + removed?: number | "NaN" | "Infinity" | "-Infinity" + skippedCount?: number | "NaN" | "Infinity" | "-Infinity" + sources?: Array + files?: Array + } + } +} + +export type EventMemoryError1 = { + id: string + type: "memory.error" + properties: { + directory: string + sessionID?: string + enabled: boolean + state: "idle" | "checking" | "injecting" | "updating" | "skipped" | "error" + reason?: string + project: { + bytes: number | "NaN" | "Infinity" | "-Infinity" + estimatedTokens: number | "NaN" | "Infinity" | "-Infinity" + truncated: boolean + updatedAt?: number | "NaN" | "Infinity" | "-Infinity" + } + consolidation?: { + trigger: "explicit" | "turn-close" | "rebuild" + operationCount: number | "NaN" | "Infinity" | "-Infinity" + cost: number | "NaN" | "Infinity" | "-Infinity" + tokens: number | "NaN" | "Infinity" | "-Infinity" + } + detail?: { + type: "saved" | "skipped" | "recalled" + message: string + reason?: string + duplicateOf?: string + tokens?: number | "NaN" | "Infinity" | "-Infinity" + operationCount?: number | "NaN" | "Infinity" | "-Infinity" + added?: number | "NaN" | "Infinity" | "-Infinity" + removed?: number | "NaN" | "Infinity" | "-Infinity" + skippedCount?: number | "NaN" | "Infinity" | "-Infinity" + sources?: Array + files?: Array + } + } +} + +export type EventTuiToastShow22 = { + id: string + type: "tui.toast.show" + properties: { + title?: string + message: string + variant: "info" | "success" | "warning" | "error" + duration?: number + } +} + +export type CredentialOAuth = { + type: "oauth" + methodID: string + refresh: string + access: string + expires: number + metadata?: { + [key: string]: unknown + } +} + +export type CredentialKey = { + type: "key" + key: string + metadata?: { + [key: string]: unknown + } +} + +export type SkillV2DirectorySource = { + type: "directory" + path: string +} + +export type SkillV2UrlSource = { + type: "url" + url: string +} + +export type SkillV2EmbeddedSource = { + type: "embedded" + skill: SkillV2Info +} + +export type BadRequestError = { + name: "BadRequest" + data: { + message: string + kind?: "Params" | "Headers" | "Query" | "Body" | "Payload" + } +} + +export type AuthRemoveData = { + body?: never + path: { + providerID: string + } + query?: never + url: "/auth/{providerID}" +} + +export type AuthRemoveErrors = { + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} + +export type AuthRemoveError = AuthRemoveErrors[keyof AuthRemoveErrors] + +export type AuthRemoveResponses = { + /** + * Successfully removed authentication credentials + */ + 200: boolean +} + +export type AuthRemoveResponse = AuthRemoveResponses[keyof AuthRemoveResponses] + +export type AuthSetData = { + body?: Auth + path: { + providerID: string + } + query?: never + url: "/auth/{providerID}" +} + +export type AuthSetErrors = { + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} + +export type AuthSetError = AuthSetErrors[keyof AuthSetErrors] + +export type AuthSetResponses = { + /** + * Successfully set authentication credentials + */ + 200: boolean +} + +export type AuthSetResponse = AuthSetResponses[keyof AuthSetResponses] + +export type AppLogData = { + body?: { + /** + * Service name for the log entry + */ + service: string + /** + * Log level + */ + level: "debug" | "info" | "error" | "warn" + /** + * Log message + */ + message: string + extra?: { + [key: string]: unknown + } + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/log" +} + +export type AppLogErrors = { + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} + +export type AppLogError = AppLogErrors[keyof AppLogErrors] + +export type AppLogResponses = { + /** + * Log entry written successfully + */ + 200: boolean +} + +export type AppLogResponse = AppLogResponses[keyof AppLogResponses] + +export type ExperimentalControlPlaneMoveSessionData = { + body?: { + sessionID: string + destination: MoveSessionDestination + moveChanges?: boolean + } + path?: never + query?: never + url: "/experimental/control-plane/move-session" +} + +export type ExperimentalControlPlaneMoveSessionErrors = { + /** + * MoveSessionError | InvalidRequestError + */ + 400: MoveSessionError | InvalidRequestError +} + +export type ExperimentalControlPlaneMoveSessionError = + ExperimentalControlPlaneMoveSessionErrors[keyof ExperimentalControlPlaneMoveSessionErrors] + +export type ExperimentalControlPlaneMoveSessionResponses = { + /** + * Session moved + */ + 204: void +} + +export type ExperimentalControlPlaneMoveSessionResponse = + ExperimentalControlPlaneMoveSessionResponses[keyof ExperimentalControlPlaneMoveSessionResponses] + +export type GlobalHealthData = { + body?: never + path?: never + query?: never + url: "/global/health" +} + +export type GlobalHealthErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type GlobalHealthError = GlobalHealthErrors[keyof GlobalHealthErrors] + +export type GlobalHealthResponses = { + /** + * Health information + */ + 200: { + healthy: true + version: string + } +} + +export type GlobalHealthResponse = GlobalHealthResponses[keyof GlobalHealthResponses] + +export type GlobalEventData = { + body?: never + path?: never + query?: never + url: "/global/event" +} + +export type GlobalEventErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type GlobalEventError = GlobalEventErrors[keyof GlobalEventErrors] + +export type GlobalEventResponses = { + /** + * Event stream + */ + 200: GlobalEvent +} + +export type GlobalEventResponse = GlobalEventResponses[keyof GlobalEventResponses] + +export type GlobalConfigGetData = { + body?: never + path?: never + query?: never + url: "/global/config" +} + +export type GlobalConfigGetErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type GlobalConfigGetError = GlobalConfigGetErrors[keyof GlobalConfigGetErrors] + +export type GlobalConfigGetResponses = { + /** + * Get global config info + */ + 200: Config +} + +export type GlobalConfigGetResponse = GlobalConfigGetResponses[keyof GlobalConfigGetResponses] + +export type GlobalConfigUpdateData = { + body?: Config + path?: never + query?: never + url: "/global/config" +} + +export type GlobalConfigUpdateErrors = { + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} + +export type GlobalConfigUpdateError = GlobalConfigUpdateErrors[keyof GlobalConfigUpdateErrors] + +export type GlobalConfigUpdateResponses = { + /** + * Successfully updated global config + */ + 200: Config +} + +export type GlobalConfigUpdateResponse = GlobalConfigUpdateResponses[keyof GlobalConfigUpdateResponses] + +export type GlobalDisposeData = { + body?: never + path?: never + query?: never + url: "/global/dispose" +} + +export type GlobalDisposeErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type GlobalDisposeError = GlobalDisposeErrors[keyof GlobalDisposeErrors] + +export type GlobalDisposeResponses = { + /** + * Global disposed + */ + 200: boolean +} + +export type GlobalDisposeResponse = GlobalDisposeResponses[keyof GlobalDisposeResponses] + +export type GlobalUpgradeData = { + body?: { + target?: string + } + path?: never + query?: never + url: "/global/upgrade" +} + +export type GlobalUpgradeErrors = { + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} + +export type GlobalUpgradeError = GlobalUpgradeErrors[keyof GlobalUpgradeErrors] + +export type GlobalUpgradeResponses = { + /** + * Upgrade result + */ + 200: + | { + success: true + version: string + } + | { + success: false + error: string + } +} + +export type GlobalUpgradeResponse = GlobalUpgradeResponses[keyof GlobalUpgradeResponses] + +export type EventSubscribeData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/event" +} + +export type EventSubscribeResponses = { + /** + * Event stream + */ + 200: Event +} + +export type EventSubscribeResponse = EventSubscribeResponses[keyof EventSubscribeResponses] + +export type ConfigGetData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/config" +} + +export type ConfigGetErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type ConfigGetError = ConfigGetErrors[keyof ConfigGetErrors] + +export type ConfigGetResponses = { + /** + * Get config info + */ + 200: Config +} + +export type ConfigGetResponse = ConfigGetResponses[keyof ConfigGetResponses] + +export type ConfigUpdateData = { + body?: Config + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/config" +} + +export type ConfigUpdateErrors = { + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} + +export type ConfigUpdateError = ConfigUpdateErrors[keyof ConfigUpdateErrors] + +export type ConfigUpdateResponses = { + /** + * Successfully updated config + */ + 200: Config +} + +export type ConfigUpdateResponse = ConfigUpdateResponses[keyof ConfigUpdateResponses] + +export type ConfigWarningsData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/config/warnings" +} + +export type ConfigWarningsErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type ConfigWarningsError = ConfigWarningsErrors[keyof ConfigWarningsErrors] + +export type ConfigWarningsResponses = { + /** + * Config warnings + */ + 200: Array<{ + path: string + message: string + detail?: string + }> +} + +export type ConfigWarningsResponse = ConfigWarningsResponses[keyof ConfigWarningsResponses] + +export type ConfigProvidersData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/config/providers" +} + +export type ConfigProvidersErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type ConfigProvidersError = ConfigProvidersErrors[keyof ConfigProvidersErrors] + +export type ConfigProvidersResponses = { + /** + * List of providers + */ + 200: { + providers: Array + default: { + [key: string]: string + } + } +} + +export type ConfigProvidersResponse = ConfigProvidersResponses[keyof ConfigProvidersResponses] + +export type ExperimentalCapabilitiesGetData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/experimental/capabilities" +} + +export type ExperimentalCapabilitiesGetErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type ExperimentalCapabilitiesGetError = + ExperimentalCapabilitiesGetErrors[keyof ExperimentalCapabilitiesGetErrors] + +export type ExperimentalCapabilitiesGetResponses = { + /** + * Experimental capabilities + */ + 200: ExperimentalCapabilities +} + +export type ExperimentalCapabilitiesGetResponse = + ExperimentalCapabilitiesGetResponses[keyof ExperimentalCapabilitiesGetResponses] + +export type ExperimentalConsoleGetData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/experimental/console" +} + +export type ExperimentalConsoleGetErrors = { + /** + * Bad request + */ + 400: BadRequestError + /** + * InternalServerError + */ + 500: EffectHttpApiErrorInternalServerError +} + +export type ExperimentalConsoleGetError = ExperimentalConsoleGetErrors[keyof ExperimentalConsoleGetErrors] + +export type ExperimentalConsoleGetResponses = { + /** + * Active Console provider metadata + */ + 200: ConsoleState +} + +export type ExperimentalConsoleGetResponse = ExperimentalConsoleGetResponses[keyof ExperimentalConsoleGetResponses] + +export type ExperimentalConsoleListOrgsData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/experimental/console/orgs" +} + +export type ExperimentalConsoleListOrgsErrors = { + /** + * Bad request + */ + 400: BadRequestError + /** + * InternalServerError + */ + 500: EffectHttpApiErrorInternalServerError +} + +export type ExperimentalConsoleListOrgsError = + ExperimentalConsoleListOrgsErrors[keyof ExperimentalConsoleListOrgsErrors] + +export type ExperimentalConsoleListOrgsResponses = { + /** + * Switchable Console orgs + */ + 200: { + orgs: Array<{ + accountID: string + accountEmail: string + accountUrl: string + orgID: string + orgName: string + active: boolean + }> + } +} + +export type ExperimentalConsoleListOrgsResponse = + ExperimentalConsoleListOrgsResponses[keyof ExperimentalConsoleListOrgsResponses] + +export type ExperimentalConsoleSwitchOrgData = { + body?: { + accountID: string + orgID: string + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/experimental/console/switch" +} + +export type ExperimentalConsoleSwitchOrgResponses = { + /** + * Switch success + */ + 200: boolean +} + +export type ExperimentalConsoleSwitchOrgResponse = + ExperimentalConsoleSwitchOrgResponses[keyof ExperimentalConsoleSwitchOrgResponses] + +export type ToolListData = { + body?: never + path?: never + query: { + directory?: string + workspace?: string + provider: string + model: string + } + url: "/experimental/tool" +} + +export type ToolListErrors = { + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} + +export type ToolListError = ToolListErrors[keyof ToolListErrors] + +export type ToolListResponses = { + /** + * Tools + */ + 200: ToolList +} + +export type ToolListResponse = ToolListResponses[keyof ToolListResponses] + +export type ToolIdsData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/experimental/tool/ids" +} + +export type ToolIdsErrors = { + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} + +export type ToolIdsError = ToolIdsErrors[keyof ToolIdsErrors] + +export type ToolIdsResponses = { + /** + * Tool IDs + */ + 200: ToolIds +} + +export type ToolIdsResponse = ToolIdsResponses[keyof ToolIdsResponses] + +export type WorktreeRemoveData = { + body?: WorktreeRemoveInput + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/experimental/worktree" +} + +export type WorktreeRemoveErrors = { + /** + * WorktreeError | InvalidRequestError + */ + 400: WorktreeError | InvalidRequestError +} + +export type WorktreeRemoveError = WorktreeRemoveErrors[keyof WorktreeRemoveErrors] + +export type WorktreeRemoveResponses = { + /** + * Worktree removed + */ + 200: boolean +} + +export type WorktreeRemoveResponse = WorktreeRemoveResponses[keyof WorktreeRemoveResponses] + +export type WorktreeListData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/experimental/worktree" +} + +export type WorktreeListErrors = { + /** + * WorktreeError | InvalidRequestError + */ + 400: WorktreeError | InvalidRequestError +} + +export type WorktreeListError = WorktreeListErrors[keyof WorktreeListErrors] + +export type WorktreeListResponses = { + /** + * List of worktrees + */ + 200: Array +} + +export type WorktreeListResponse = WorktreeListResponses[keyof WorktreeListResponses] + +export type WorktreeCreateData = { + body?: WorktreeCreateInput + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/experimental/worktree" +} + +export type WorktreeCreateErrors = { + /** + * WorktreeError | InvalidRequestError + */ + 400: WorktreeError | InvalidRequestError +} + +export type WorktreeCreateError = WorktreeCreateErrors[keyof WorktreeCreateErrors] + +export type WorktreeCreateResponses = { + /** + * Worktree created + */ + 200: Worktree +} + +export type WorktreeCreateResponse = WorktreeCreateResponses[keyof WorktreeCreateResponses] + +export type WorktreeResetData = { + body?: WorktreeResetInput + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/experimental/worktree/reset" +} + +export type WorktreeResetErrors = { + /** + * WorktreeError | InvalidRequestError + */ + 400: WorktreeError | InvalidRequestError +} + +export type WorktreeResetError = WorktreeResetErrors[keyof WorktreeResetErrors] + +export type WorktreeResetResponses = { + /** + * Worktree reset + */ + 200: boolean +} + +export type WorktreeResetResponse = WorktreeResetResponses[keyof WorktreeResetResponses] + +export type WorktreeDiffData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + base?: string + } + url: "/experimental/worktree/diff" +} + +export type WorktreeDiffErrors = { + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} + +export type WorktreeDiffError = WorktreeDiffErrors[keyof WorktreeDiffErrors] + +export type WorktreeDiffResponses = { + /** + * File diffs + */ + 200: Array +} + +export type WorktreeDiffResponse = WorktreeDiffResponses[keyof WorktreeDiffResponses] + +export type WorktreeDiffSummaryData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + base?: string + } + url: "/experimental/worktree/diff/summary" +} + +export type WorktreeDiffSummaryErrors = { + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} + +export type WorktreeDiffSummaryError = WorktreeDiffSummaryErrors[keyof WorktreeDiffSummaryErrors] + +export type WorktreeDiffSummaryResponses = { + /** + * Diff summary items + */ + 200: Array +} + +export type WorktreeDiffSummaryResponse = WorktreeDiffSummaryResponses[keyof WorktreeDiffSummaryResponses] + +export type WorktreeDiffFileData = { + body?: never + path?: never + query: { + directory?: string + workspace?: string + base?: string + file: string + } + url: "/experimental/worktree/diff/file" +} + +export type WorktreeDiffFileErrors = { + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} + +export type WorktreeDiffFileError = WorktreeDiffFileErrors[keyof WorktreeDiffFileErrors] + +export type WorktreeDiffFileResponses = { + /** + * Diff detail item + */ + 200: WorktreeDiffItem +} + +export type WorktreeDiffFileResponse = WorktreeDiffFileResponses[keyof WorktreeDiffFileResponses] + +export type ExperimentalSessionListData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + projectID?: string + worktrees?: boolean + current?: "true" | "false" + roots?: boolean | "true" | "false" + start?: number + cursor?: number + search?: string + limit?: number + archived?: boolean | "true" | "false" + } + url: "/experimental/session" +} + +export type ExperimentalSessionListErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type ExperimentalSessionListError = ExperimentalSessionListErrors[keyof ExperimentalSessionListErrors] + +export type ExperimentalSessionListResponses = { + /** + * List of sessions + */ + 200: Array +} + +export type ExperimentalSessionListResponse = ExperimentalSessionListResponses[keyof ExperimentalSessionListResponses] + +export type ExperimentalSessionBackgroundData = { + body?: never + path: { + sessionID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/experimental/session/{sessionID}/background" +} + +export type ExperimentalSessionBackgroundErrors = { + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} + +export type ExperimentalSessionBackgroundError = + ExperimentalSessionBackgroundErrors[keyof ExperimentalSessionBackgroundErrors] + +export type ExperimentalSessionBackgroundResponses = { + /** + * Backgrounded subagents + */ + 200: boolean +} + +export type ExperimentalSessionBackgroundResponse = + ExperimentalSessionBackgroundResponses[keyof ExperimentalSessionBackgroundResponses] + +export type ExperimentalResourceListData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/experimental/resource" +} + +export type ExperimentalResourceListErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type ExperimentalResourceListError = ExperimentalResourceListErrors[keyof ExperimentalResourceListErrors] + +export type ExperimentalResourceListResponses = { + /** + * MCP resources + */ + 200: { + [key: string]: McpResource + } +} + +export type ExperimentalResourceListResponse = + ExperimentalResourceListResponses[keyof ExperimentalResourceListResponses] + +export type FindTextData = { + body?: never + path?: never + query: { + directory?: string + workspace?: string + pattern: string + } + url: "/find" +} + +export type FindTextErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type FindTextError = FindTextErrors[keyof FindTextErrors] + +export type FindTextResponses = { + /** + * Matches + */ + 200: Array<{ + path: { + text: string + } + lines: { + text: string + } + line_number: number + absolute_offset: number + submatches: Array<{ + match: { + text: string + } + start: number + end: number + }> + }> +} + +export type FindTextResponse = FindTextResponses[keyof FindTextResponses] + +export type FindFilesData = { + body?: never + path?: never + query: { + directory?: string + workspace?: string + query: string + dirs?: "true" | "false" + type?: "file" | "directory" + limit?: number + } + url: "/find/file" +} + +export type FindFilesErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type FindFilesError = FindFilesErrors[keyof FindFilesErrors] + +export type FindFilesResponses = { + /** + * File paths + */ + 200: Array +} + +export type FindFilesResponse = FindFilesResponses[keyof FindFilesResponses] + +export type FindSymbolsData = { + body?: never + path?: never + query: { + directory?: string + workspace?: string + query: string + } + url: "/find/symbol" +} + +export type FindSymbolsErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type FindSymbolsError = FindSymbolsErrors[keyof FindSymbolsErrors] + +export type FindSymbolsResponses = { + /** + * Symbols + */ + 200: Array +} + +export type FindSymbolsResponse = FindSymbolsResponses[keyof FindSymbolsResponses] + +export type FileListData = { + body?: never + path?: never + query: { + directory?: string + workspace?: string + path: string + } + url: "/file" +} + +export type FileListErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type FileListError = FileListErrors[keyof FileListErrors] + +export type FileListResponses = { + /** + * Files and directories + */ + 200: Array +} + +export type FileListResponse = FileListResponses[keyof FileListResponses] + +export type FileReadData = { + body?: never + path?: never + query: { + directory?: string + workspace?: string + path: string + } + url: "/file/content" +} + +export type FileReadErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type FileReadError = FileReadErrors[keyof FileReadErrors] + +export type FileReadResponses = { + /** + * File content + */ + 200: FileContent +} + +export type FileReadResponse = FileReadResponses[keyof FileReadResponses] + +export type FileStatusData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/file/status" +} + +export type FileStatusErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type FileStatusError = FileStatusErrors[keyof FileStatusErrors] + +export type FileStatusResponses = { + /** + * File status + */ + 200: Array +} + +export type FileStatusResponse = FileStatusResponses[keyof FileStatusResponses] + +export type InstanceDisposeData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/instance/dispose" +} + +export type InstanceDisposeErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type InstanceDisposeError = InstanceDisposeErrors[keyof InstanceDisposeErrors] + +export type InstanceDisposeResponses = { + /** + * Instance disposed + */ + 200: boolean +} + +export type InstanceDisposeResponse = InstanceDisposeResponses[keyof InstanceDisposeResponses] + +export type PathGetData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/path" +} + +export type PathGetErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type PathGetError = PathGetErrors[keyof PathGetErrors] + +export type PathGetResponses = { + /** + * Path + */ + 200: Path +} + +export type PathGetResponse = PathGetResponses[keyof PathGetResponses] + +export type VcsGetData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/vcs" +} + +export type VcsGetErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type VcsGetError = VcsGetErrors[keyof VcsGetErrors] + +export type VcsGetResponses = { + /** + * VCS info + */ + 200: VcsInfo +} + +export type VcsGetResponse = VcsGetResponses[keyof VcsGetResponses] + +export type VcsStatusData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/vcs/status" +} + +export type VcsStatusErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type VcsStatusError = VcsStatusErrors[keyof VcsStatusErrors] + +export type VcsStatusResponses = { + /** + * VCS status + */ + 200: Array +} + +export type VcsStatusResponse = VcsStatusResponses[keyof VcsStatusResponses] + +export type VcsDiffData = { + body?: never + path?: never + query: { + directory?: string + workspace?: string + mode: "git" | "branch" + context?: number + } + url: "/vcs/diff" +} + +export type VcsDiffErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type VcsDiffError = VcsDiffErrors[keyof VcsDiffErrors] + +export type VcsDiffResponses = { + /** + * VCS diff + */ + 200: Array +} + +export type VcsDiffResponse = VcsDiffResponses[keyof VcsDiffResponses] + +export type VcsDiffRawData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/vcs/diff/raw" +} + +export type VcsDiffRawErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type VcsDiffRawError = VcsDiffRawErrors[keyof VcsDiffRawErrors] + +export type VcsDiffRawResponses = { + /** + * Raw VCS diff + */ + 200: string +} + +export type VcsDiffRawResponse = VcsDiffRawResponses[keyof VcsDiffRawResponses] + +export type VcsApplyData = { + body?: { + patch: string + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/vcs/apply" +} + +export type VcsApplyErrors = { + /** + * VcsApplyError | InvalidRequestError + */ + 400: VcsApplyError | InvalidRequestError +} + +export type VcsApplyError2 = VcsApplyErrors[keyof VcsApplyErrors] + +export type VcsApplyResponses = { + /** + * VCS patch applied + */ + 200: { + applied: boolean + } +} + +export type VcsApplyResponse = VcsApplyResponses[keyof VcsApplyResponses] + +export type CommandListData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/command" +} + +export type CommandListErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type CommandListError = CommandListErrors[keyof CommandListErrors] + +export type CommandListResponses = { + /** + * List of commands + */ + 200: Array +} + +export type CommandListResponse = CommandListResponses[keyof CommandListResponses] + +export type AppAgentsData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/agent" +} + +export type AppAgentsErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type AppAgentsError = AppAgentsErrors[keyof AppAgentsErrors] + +export type AppAgentsResponses = { + /** + * List of agents + */ + 200: Array +} + +export type AppAgentsResponse = AppAgentsResponses[keyof AppAgentsResponses] + +export type AppSkillsData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/skill" +} + +export type AppSkillsErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type AppSkillsError = AppSkillsErrors[keyof AppSkillsErrors] + +export type AppSkillsResponses = { + /** + * List of skills + */ + 200: Array<{ + name: string + description?: string + location: string + content: string + }> +} + +export type AppSkillsResponse = AppSkillsResponses[keyof AppSkillsResponses] + +export type LspStatusData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/lsp" +} + +export type LspStatusErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type LspStatusError = LspStatusErrors[keyof LspStatusErrors] + +export type LspStatusResponses = { + /** + * LSP server status + */ + 200: Array +} + +export type LspStatusResponse = LspStatusResponses[keyof LspStatusResponses] + +export type FormatterStatusData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/formatter" +} + +export type FormatterStatusErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type FormatterStatusError = FormatterStatusErrors[keyof FormatterStatusErrors] + +export type FormatterStatusResponses = { + /** + * Formatter status + */ + 200: Array +} + +export type FormatterStatusResponse = FormatterStatusResponses[keyof FormatterStatusResponses] + +export type McpStatusData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/mcp" +} + +export type McpStatusErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type McpStatusError = McpStatusErrors[keyof McpStatusErrors] + +export type McpStatusResponses = { + /** + * MCP server status + */ + 200: { + [key: string]: McpStatus + } +} + +export type McpStatusResponse = McpStatusResponses[keyof McpStatusResponses] + +export type McpAddData = { + body?: { + name: string + config: McpLocalConfig | McpRemoteConfig + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/mcp" +} + +export type McpAddErrors = { + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} + +export type McpAddError = McpAddErrors[keyof McpAddErrors] + +export type McpAddResponses = { + /** + * MCP server added successfully + */ + 200: { + [key: string]: McpStatus + } +} + +export type McpAddResponse = McpAddResponses[keyof McpAddResponses] + +export type McpAuthRemoveData = { + body?: never + path: { + name: string + } + query?: { + directory?: string + workspace?: string + } + url: "/mcp/{name}/auth" +} + +export type McpAuthRemoveErrors = { + /** + * Bad request + */ + 400: BadRequestError + /** + * McpServerNotFoundError + */ + 404: McpServerNotFoundError +} + +export type McpAuthRemoveError = McpAuthRemoveErrors[keyof McpAuthRemoveErrors] + +export type McpAuthRemoveResponses = { + /** + * OAuth credentials removed + */ + 200: { + success: true + } +} + +export type McpAuthRemoveResponse = McpAuthRemoveResponses[keyof McpAuthRemoveResponses] + +export type McpAuthStartData = { + body?: never + path: { + name: string + } + query?: { + directory?: string + workspace?: string + } + url: "/mcp/{name}/auth" +} + +export type McpAuthStartErrors = { + /** + * McpUnsupportedOAuthError | InvalidRequestError + */ + 400: McpUnsupportedOAuthError | InvalidRequestError + /** + * McpServerNotFoundError + */ + 404: McpServerNotFoundError +} + +export type McpAuthStartError = McpAuthStartErrors[keyof McpAuthStartErrors] + +export type McpAuthStartResponses = { + /** + * OAuth flow started + */ + 200: { + authorizationUrl: string + oauthState: string + } +} + +export type McpAuthStartResponse = McpAuthStartResponses[keyof McpAuthStartResponses] + +export type McpAuthCallbackData = { + body?: { + code: string + } + path: { + name: string + } + query?: { + directory?: string + workspace?: string + } + url: "/mcp/{name}/auth/callback" +} + +export type McpAuthCallbackErrors = { + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * McpServerNotFoundError + */ + 404: McpServerNotFoundError +} + +export type McpAuthCallbackError = McpAuthCallbackErrors[keyof McpAuthCallbackErrors] + +export type McpAuthCallbackResponses = { + /** + * OAuth authentication completed + */ + 200: McpStatus +} + +export type McpAuthCallbackResponse = McpAuthCallbackResponses[keyof McpAuthCallbackResponses] + +export type McpAuthAuthenticateData = { + body?: never + path: { + name: string + } + query?: { + directory?: string + workspace?: string + } + url: "/mcp/{name}/auth/authenticate" +} + +export type McpAuthAuthenticateErrors = { + /** + * McpUnsupportedOAuthError | InvalidRequestError + */ + 400: McpUnsupportedOAuthError | InvalidRequestError + /** + * McpServerNotFoundError + */ + 404: McpServerNotFoundError +} + +export type McpAuthAuthenticateError = McpAuthAuthenticateErrors[keyof McpAuthAuthenticateErrors] + +export type McpAuthAuthenticateResponses = { + /** + * OAuth authentication completed + */ + 200: McpStatus +} + +export type McpAuthAuthenticateResponse = McpAuthAuthenticateResponses[keyof McpAuthAuthenticateResponses] + +export type McpConnectData = { + body?: never + path: { + name: string + } + query?: { + directory?: string + workspace?: string + } + url: "/mcp/{name}/connect" +} + +export type McpConnectErrors = { + /** + * Bad request + */ + 400: BadRequestError + /** + * McpServerNotFoundError + */ + 404: McpServerNotFoundError +} + +export type McpConnectError = McpConnectErrors[keyof McpConnectErrors] + +export type McpConnectResponses = { + /** + * MCP server connected successfully + */ + 200: boolean +} + +export type McpConnectResponse = McpConnectResponses[keyof McpConnectResponses] + +export type McpDisconnectData = { + body?: never + path: { + name: string + } + query?: { + directory?: string + workspace?: string + } + url: "/mcp/{name}/disconnect" +} + +export type McpDisconnectErrors = { + /** + * Bad request + */ + 400: BadRequestError + /** + * McpServerNotFoundError + */ + 404: McpServerNotFoundError +} + +export type McpDisconnectError = McpDisconnectErrors[keyof McpDisconnectErrors] + +export type McpDisconnectResponses = { + /** + * MCP server disconnected successfully + */ + 200: boolean +} + +export type McpDisconnectResponse = McpDisconnectResponses[keyof McpDisconnectResponses] + +export type ProjectListData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/project" +} + +export type ProjectListErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type ProjectListError = ProjectListErrors[keyof ProjectListErrors] + +export type ProjectListResponses = { + /** + * List of projects + */ + 200: Array +} + +export type ProjectListResponse = ProjectListResponses[keyof ProjectListResponses] + +export type ProjectCurrentData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/project/current" +} + +export type ProjectCurrentErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type ProjectCurrentError = ProjectCurrentErrors[keyof ProjectCurrentErrors] + +export type ProjectCurrentResponses = { + /** + * Current project information + */ + 200: Project +} + +export type ProjectCurrentResponse = ProjectCurrentResponses[keyof ProjectCurrentResponses] + +export type ProjectInitGitData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/project/git/init" +} + +export type ProjectInitGitErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type ProjectInitGitError = ProjectInitGitErrors[keyof ProjectInitGitErrors] + +export type ProjectInitGitResponses = { + /** + * Project information after git initialization + */ + 200: Project +} + +export type ProjectInitGitResponse = ProjectInitGitResponses[keyof ProjectInitGitResponses] + +export type ProjectUpdateData = { + body?: { + name?: string + icon?: ProjectIcon + commands?: ProjectCommands + } + path: { + projectID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/project/{projectID}" +} + +export type ProjectUpdateErrors = { + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * ProjectNotFoundError + */ + 404: ProjectNotFoundError +} + +export type ProjectUpdateError = ProjectUpdateErrors[keyof ProjectUpdateErrors] + +export type ProjectUpdateResponses = { + /** + * Updated project information + */ + 200: Project +} + +export type ProjectUpdateResponse = ProjectUpdateResponses[keyof ProjectUpdateResponses] + +export type ProjectDirectoriesData = { + body?: never + path: { + projectID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/project/{projectID}/directories" +} + +export type ProjectDirectoriesErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type ProjectDirectoriesError = ProjectDirectoriesErrors[keyof ProjectDirectoriesErrors] + +export type ProjectDirectoriesResponses = { + /** + * Project directories + */ + 200: ProjectDirectories +} + +export type ProjectDirectoriesResponse = ProjectDirectoriesResponses[keyof ProjectDirectoriesResponses] + +export type ExperimentalProjectCopyGenerateNameData = { + body?: { + context?: string + } + path: { + projectID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/experimental/project/{projectID}/copy/generate-name" +} + +export type ExperimentalProjectCopyGenerateNameErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type ExperimentalProjectCopyGenerateNameError = + ExperimentalProjectCopyGenerateNameErrors[keyof ExperimentalProjectCopyGenerateNameErrors] + +export type ExperimentalProjectCopyGenerateNameResponses = { + /** + * Success + */ + 200: { + name: string + } +} + +export type ExperimentalProjectCopyGenerateNameResponse = + ExperimentalProjectCopyGenerateNameResponses[keyof ExperimentalProjectCopyGenerateNameResponses] + +export type PtyShellsData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/pty/shells" +} + +export type PtyShellsErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type PtyShellsError = PtyShellsErrors[keyof PtyShellsErrors] + +export type PtyShellsResponses = { + /** + * List of shells + */ + 200: Array<{ + path: string + name: string + acceptable: boolean + }> +} + +export type PtyShellsResponse = PtyShellsResponses[keyof PtyShellsResponses] + +export type PtyListData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/pty" +} + +export type PtyListErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type PtyListError = PtyListErrors[keyof PtyListErrors] + +export type PtyListResponses = { + /** + * List of sessions + */ + 200: Array +} + +export type PtyListResponse = PtyListResponses[keyof PtyListResponses] + +export type PtyCreateData = { + body?: { + command?: string + args?: Array + cwd?: string + title?: string + env?: { + [key: string]: string + } + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/pty" +} + +export type PtyCreateErrors = { + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} + +export type PtyCreateError = PtyCreateErrors[keyof PtyCreateErrors] + +export type PtyCreateResponses = { + /** + * Created session + */ + 200: Pty +} + +export type PtyCreateResponse = PtyCreateResponses[keyof PtyCreateResponses] + +export type PtyRemoveData = { + body?: never + path: { + ptyID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/pty/{ptyID}" +} + +export type PtyRemoveErrors = { + /** + * Bad request + */ + 400: BadRequestError + /** + * PtyNotFoundError + */ + 404: PtyNotFoundError +} + +export type PtyRemoveError = PtyRemoveErrors[keyof PtyRemoveErrors] + +export type PtyRemoveResponses = { + /** + * Session removed + */ + 200: boolean +} + +export type PtyRemoveResponse = PtyRemoveResponses[keyof PtyRemoveResponses] + +export type PtyGetData = { + body?: never + path: { + ptyID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/pty/{ptyID}" +} + +export type PtyGetErrors = { + /** + * Bad request + */ + 400: BadRequestError + /** + * PtyNotFoundError + */ + 404: PtyNotFoundError +} + +export type PtyGetError = PtyGetErrors[keyof PtyGetErrors] + +export type PtyGetResponses = { + /** + * Session info + */ + 200: Pty +} + +export type PtyGetResponse = PtyGetResponses[keyof PtyGetResponses] + +export type PtyUpdateData = { + body?: { + title?: string + size?: { + rows: number + cols: number + } + sessionID?: string | null + } + path: { + ptyID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/pty/{ptyID}" +} + +export type PtyUpdateErrors = { + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * PtyNotFoundError + */ + 404: PtyNotFoundError +} + +export type PtyUpdateError = PtyUpdateErrors[keyof PtyUpdateErrors] + +export type PtyUpdateResponses = { + /** + * Updated session + */ + 200: Pty +} + +export type PtyUpdateResponse = PtyUpdateResponses[keyof PtyUpdateResponses] + +export type PtyConnectTokenData = { + body?: never + path: { + ptyID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/pty/{ptyID}/connect-token" +} + +export type PtyConnectTokenErrors = { + /** + * Bad request + */ + 400: BadRequestError + /** + * PtyForbiddenError + */ + 403: PtyForbiddenError + /** + * PtyNotFoundError + */ + 404: PtyNotFoundError +} + +export type PtyConnectTokenError = PtyConnectTokenErrors[keyof PtyConnectTokenErrors] + +export type PtyConnectTokenResponses = { + /** + * WebSocket connect token + */ + 200: PtyTicketConnectToken +} + +export type PtyConnectTokenResponse = PtyConnectTokenResponses[keyof PtyConnectTokenResponses] + +export type QuestionListData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/question" +} + +export type QuestionListErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type QuestionListError = QuestionListErrors[keyof QuestionListErrors] + +export type QuestionListResponses = { + /** + * List of pending questions + */ + 200: Array +} + +export type QuestionListResponse = QuestionListResponses[keyof QuestionListResponses] + +export type QuestionReplyData = { + body?: { /** * User answers in order of questions (each answer is an array of selected labels) */ - answers: Array; -}; - -export type ReferenceLocalSource = { - type: 'local'; - path: string; - description?: string; - hidden?: boolean; -}; - -export type ReferenceGitSource = { - type: 'git'; - repository: string; - branch?: string; - description?: string; - hidden?: boolean; -}; - -export type ReferenceSource = ReferenceLocalSource | ReferenceGitSource; - -export type ReferenceInfo = { - name: string; - path: string; - description?: string; - hidden?: boolean; - source: ReferenceSource; -}; - -export type ProjectCopyCopy = { - directory: string; -}; - -export type EventModelsDevRefreshed1 = { - id: string; - type: 'models-dev.refreshed'; - properties: { - [key: string]: unknown; - }; -}; - -export type EventIntegrationUpdated1 = { - id: string; - type: 'integration.updated'; - properties: { - [key: string]: unknown; - }; -}; - -export type EventIntegrationConnectionUpdated1 = { - id: string; - type: 'integration.connection.updated'; - properties: { - integrationID: string; - }; -}; - -export type EventCatalogUpdated1 = { - id: string; - type: 'catalog.updated'; - properties: { - [key: string]: unknown; - }; -}; - -export type EventSessionCreated1 = { - id: string; - type: 'session.created'; - properties: { - sessionID: string; - info: Session; - }; -}; - -export type EventSessionUpdated1 = { - id: string; - type: 'session.updated'; - properties: { - sessionID: string; - info: Session; - }; -}; - -export type EventSessionDeleted1 = { - id: string; - type: 'session.deleted'; - properties: { - sessionID: string; - info: Session; - }; -}; - -export type EventMessageUpdated1 = { - id: string; - type: 'message.updated'; - properties: { - sessionID: string; - info: Message; - }; -}; - -export type EventMessageRemoved1 = { - id: string; - type: 'message.removed'; - properties: { - sessionID: string; - messageID: string; - }; -}; - -export type EventMessagePartUpdated1 = { - id: string; - type: 'message.part.updated'; - properties: { - sessionID: string; - part: Part; - time: number; - }; -}; - -export type EventMessagePartRemoved1 = { - id: string; - type: 'message.part.removed'; - properties: { - sessionID: string; - messageID: string; - partID: string; - }; -}; - -export type EventSessionNextAgentSwitched1 = { - id: string; - type: 'session.next.agent.switched'; - properties: { - timestamp: number; - sessionID: string; - messageID: string; - agent: string; - }; -}; - -export type EventSessionNextModelSwitched1 = { - id: string; - type: 'session.next.model.switched'; - properties: { - timestamp: number; - sessionID: string; - messageID: string; - model: ModelRef; - }; -}; - -export type EventSessionNextMoved1 = { - id: string; - type: 'session.next.moved'; - properties: { - timestamp: number; - sessionID: string; - location: LocationRef; - subdirectory?: string; - }; -}; - -export type EventSessionNextPrompted1 = { - id: string; - type: 'session.next.prompted'; - properties: { - timestamp: number; - sessionID: string; - messageID: string; - prompt: Prompt; - delivery: 'steer' | 'queue'; - }; -}; - -export type EventSessionNextPromptAdmitted1 = { - id: string; - type: 'session.next.prompt.admitted'; - properties: { - timestamp: number; - sessionID: string; - messageID: string; - prompt: Prompt; - delivery: 'steer' | 'queue'; - }; -}; - -export type EventSessionNextContextUpdated1 = { - id: string; - type: 'session.next.context.updated'; - properties: { - timestamp: number; - sessionID: string; - messageID: string; - text: string; - }; -}; - -export type EventSessionNextSynthetic1 = { - id: string; - type: 'session.next.synthetic'; - properties: { - timestamp: number; - sessionID: string; - messageID: string; - text: string; - }; -}; - -export type EventSessionNextShellStarted1 = { - id: string; - type: 'session.next.shell.started'; - properties: { - timestamp: number; - sessionID: string; - messageID: string; - callID: string; - command: string; - }; -}; - -export type EventSessionNextShellEnded1 = { - id: string; - type: 'session.next.shell.ended'; - properties: { - timestamp: number; - sessionID: string; - callID: string; - output: string; - }; -}; - -export type EventSessionNextStepStarted1 = { - id: string; - type: 'session.next.step.started'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - agent: string; - model: ModelRef; - snapshot?: string; - }; -}; - -export type EventSessionNextStepEnded1 = { - id: string; - type: 'session.next.step.ended'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - finish: string; - cost: number; - tokens: { - input: number; - output: number; - reasoning: number; - cache: { - read: number; - write: number; - }; - }; - snapshot?: string; - files?: Array; - }; -}; - -export type EventSessionNextStepFailed1 = { - id: string; - type: 'session.next.step.failed'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - error: SessionErrorUnknown; - }; -}; - -export type EventSessionNextTextStarted1 = { - id: string; - type: 'session.next.text.started'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - textID: string; - }; -}; - -export type EventSessionNextTextDelta1 = { - id: string; - type: 'session.next.text.delta'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - textID: string; - delta: string; - }; -}; - -export type EventSessionNextTextEnded1 = { - id: string; - type: 'session.next.text.ended'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - textID: string; - text: string; - }; -}; - -export type EventSessionNextReasoningStarted1 = { - id: string; - type: 'session.next.reasoning.started'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - reasoningID: string; - providerMetadata?: LlmProviderMetadata; - }; -}; - -export type EventSessionNextReasoningDelta1 = { - id: string; - type: 'session.next.reasoning.delta'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - reasoningID: string; - delta: string; - }; -}; - -export type EventSessionNextReasoningEnded1 = { - id: string; - type: 'session.next.reasoning.ended'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - reasoningID: string; - text: string; - providerMetadata?: LlmProviderMetadata; - }; -}; - -export type EventSessionNextToolInputStarted1 = { - id: string; - type: 'session.next.tool.input.started'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - name: string; - }; -}; - -export type EventSessionNextToolInputDelta1 = { - id: string; - type: 'session.next.tool.input.delta'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - delta: string; - }; -}; - -export type EventSessionNextToolInputEnded1 = { - id: string; - type: 'session.next.tool.input.ended'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - text: string; - }; -}; - -export type EventSessionNextToolCalled1 = { - id: string; - type: 'session.next.tool.called'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - tool: string; - input: { - [key: string]: unknown; - }; - provider: { - executed: boolean; - metadata?: LlmProviderMetadata; - }; - }; -}; - -export type EventSessionNextToolProgress1 = { - id: string; - type: 'session.next.tool.progress'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - structured: { - [key: string]: unknown; - }; - content: Array; - }; -}; - -export type EventSessionNextToolSuccess1 = { - id: string; - type: 'session.next.tool.success'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - structured: { - [key: string]: unknown; - }; - content: Array; - outputPaths?: Array; - result?: unknown; - provider: { - executed: boolean; - metadata?: LlmProviderMetadata; - }; - }; -}; - -export type EventSessionNextToolFailed1 = { - id: string; - type: 'session.next.tool.failed'; - properties: { - timestamp: number; - sessionID: string; - assistantMessageID: string; - callID: string; - error: SessionErrorUnknown; - result?: unknown; - provider: { - executed: boolean; - metadata?: LlmProviderMetadata; - }; - }; -}; - -export type EventSessionNextRetried1 = { - id: string; - type: 'session.next.retried'; - properties: { - timestamp: number; - sessionID: string; - attempt: number; - error: SessionNextRetryError; - }; -}; - -export type EventSessionNextCompactionStarted1 = { - id: string; - type: 'session.next.compaction.started'; - properties: { - timestamp: number; - sessionID: string; - messageID: string; - reason: 'auto' | 'manual'; - }; -}; - -export type EventSessionNextCompactionDelta1 = { - id: string; - type: 'session.next.compaction.delta'; - properties: { - timestamp: number; - sessionID: string; - messageID: string; - text: string; - }; -}; - -export type EventSessionNextCompactionEnded1 = { - id: string; - type: 'session.next.compaction.ended'; - properties: { - timestamp: number; - sessionID: string; - messageID: string; - reason: 'auto' | 'manual'; - text: string; - recent: string; - include?: string; - }; -}; - -export type EventSessionNextRevertStaged1 = { - id: string; - type: 'session.next.revert.staged'; - properties: { - timestamp: number; - sessionID: string; - revert: RevertState; - }; -}; - -export type EventSessionNextRevertCleared1 = { - id: string; - type: 'session.next.revert.cleared'; - properties: { - timestamp: number; - sessionID: string; - }; -}; - -export type EventSessionNextRevertCommitted1 = { - id: string; - type: 'session.next.revert.committed'; - properties: { - timestamp: number; - sessionID: string; - messageID: string; - }; -}; - -export type EventMessagePartDelta1 = { - id: string; - type: 'message.part.delta'; - properties: { - sessionID: string; - messageID: string; - partID: string; - field: string; - delta: string; - }; -}; - -export type EventSessionDiff1 = { - id: string; - type: 'session.diff'; - properties: { - sessionID: string; - diff: Array; - }; -}; - -export type EventSessionError1 = { - id: string; - type: 'session.error'; - properties: { - sessionID?: string; - error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | StructuredOutputError | ContextOverflowError | ContentFilterError | ApiError; - }; -}; - -export type EventInstallationUpdated1 = { - id: string; - type: 'installation.updated'; - properties: { - version: string; - }; -}; - -export type EventInstallationUpdateAvailable1 = { - id: string; - type: 'installation.update-available'; - properties: { - version: string; - }; -}; - -export type EventFileEdited1 = { - id: string; - type: 'file.edited'; - properties: { - file: string; - }; -}; - -export type EventReferenceUpdated1 = { - id: string; - type: 'reference.updated'; - properties: { - [key: string]: unknown; - }; -}; - -export type EventPermissionV2Asked1 = { - id: string; - type: 'permission.v2.asked'; - properties: { - id: string; - sessionID: string; - action: string; - resources: Array; - save?: Array; - metadata?: { - [key: string]: unknown; - }; - source?: PermissionV2Source; - }; -}; - -export type EventPermissionV2Replied1 = { - id: string; - type: 'permission.v2.replied'; - properties: { - sessionID: string; - requestID: string; - reply: PermissionV2Reply; - }; -}; - -export type EventPluginAdded1 = { - id: string; - type: 'plugin.added'; - properties: { - id: string; - }; -}; - -export type EventProjectDirectoriesUpdated1 = { - id: string; - type: 'project.directories.updated'; - properties: { - projectID: string; - }; -}; - -export type EventFileWatcherUpdated1 = { - id: string; - type: 'file.watcher.updated'; - properties: { - file: string; - event: 'add' | 'change' | 'unlink'; - }; -}; - -export type EventPtyCreated1 = { - id: string; - type: 'pty.created'; - properties: { - info: Pty; - }; -}; - -export type EventPtyUpdated1 = { - id: string; - type: 'pty.updated'; - properties: { - info: Pty; - }; -}; - -export type EventPtyExited1 = { - id: string; - type: 'pty.exited'; - properties: { - id: string; - exitCode: number; - }; -}; - -export type EventPtyDeleted1 = { - id: string; - type: 'pty.deleted'; - properties: { - id: string; - }; -}; - -export type EventQuestionV2Asked1 = { - id: string; - type: 'question.v2.asked'; - properties: { - id: string; - sessionID: string; - /** - * Questions to ask - */ - questions: Array; - tool?: QuestionV2Tool; - }; -}; - -export type EventQuestionV2Replied1 = { - id: string; - type: 'question.v2.replied'; - properties: { - sessionID: string; - requestID: string; - answers: Array; - }; -}; - -export type EventQuestionV2Rejected1 = { - id: string; - type: 'question.v2.rejected'; - properties: { - sessionID: string; - requestID: string; - }; -}; - -export type EventTodoUpdated1 = { - id: string; - type: 'todo.updated'; - properties: { - sessionID: string; - todos: Array; - }; -}; - -export type EventLspUpdated1 = { - id: string; - type: 'lsp.updated'; - properties: { - [key: string]: unknown; - }; -}; - -export type EventPermissionAsked1 = { - id: string; - type: 'permission.asked'; - properties: { - id: string; - sessionID: string; - permission: string; - patterns: Array; - metadata: { - [key: string]: unknown; - }; - always: Array; - tool?: { - messageID: string; - callID: string; - }; - }; -}; - -export type EventPermissionReplied1 = { - id: string; - type: 'permission.replied'; - properties: { - sessionID: string; - requestID: string; - reply: 'once' | 'always' | 'reject'; - }; -}; - -export type EventTuiPromptAppend1 = { - id: string; - type: 'tui.prompt.append'; - properties: { - text: string; - }; -}; - -export type EventTuiCommandExecute1 = { - id: string; - type: 'tui.command.execute'; - properties: { - command: 'session.list' | 'session.new' | 'session.share' | 'session.interrupt' | 'session.compact' | 'session.page.up' | 'session.page.down' | 'session.line.up' | 'session.line.down' | 'session.half.page.up' | 'session.half.page.down' | 'session.first' | 'session.last' | 'prompt.clear' | 'prompt.submit' | 'agent.cycle' | string; - }; -}; - -export type EventTuiToastShow1 = { - id: string; - type: 'tui.toast.show'; - properties: { - title?: string; - message: string; - variant: 'info' | 'success' | 'warning' | 'error'; - duration?: number; - }; -}; - -export type EventTuiSessionSelect1 = { - id: string; - type: 'tui.session.select'; - properties: { - /** - * Session ID to navigate to - */ - sessionID: string; - }; -}; - -export type EventMcpToolsChanged1 = { - id: string; - type: 'mcp.tools.changed'; - properties: { - server: string; - }; -}; - -export type EventMcpBrowserOpenFailed1 = { - id: string; - type: 'mcp.browser.open.failed'; - properties: { - mcpName: string; - url: string; - }; -}; - -export type EventCommandExecuted1 = { - id: string; - type: 'command.executed'; - properties: { - name: string; - sessionID: string; - arguments: string; - messageID: string; - }; -}; - -export type EventProjectUpdated1 = { - id: string; - type: 'project.updated'; - properties: { - id: string; - worktree: string; - vcs?: ProjectVcs; - name?: string; - icon?: ProjectIcon; - commands?: ProjectCommands; - time: ProjectTime; - sandboxes: Array; - }; -}; - -export type EventSessionStatus1 = { - id: string; - type: 'session.status'; - properties: { - sessionID: string; - status: SessionStatus; - }; -}; - -export type EventSessionIdle1 = { - id: string; - type: 'session.idle'; - properties: { - sessionID: string; - }; -}; - -export type EventQuestionAsked1 = { - id: string; - type: 'question.asked'; - properties: { - id: string; - sessionID: string; - /** - * Questions to ask - */ - questions: Array; - blocking?: boolean; - tool?: QuestionTool; - }; -}; - -export type EventQuestionReplied1 = { - id: string; - type: 'question.replied'; - properties: { - sessionID: string; - requestID: string; - answers: Array; - }; -}; - -export type EventQuestionRejected1 = { - id: string; - type: 'question.rejected'; - properties: { - sessionID: string; - requestID: string; - }; -}; - -export type EventSessionCompacted1 = { - id: string; - type: 'session.compacted'; - properties: { - sessionID: string; - }; -}; - -export type EventVcsBranchUpdated1 = { - id: string; - type: 'vcs.branch.updated'; - properties: { - branch?: string; - }; -}; - -export type EventWorkspaceReady1 = { - id: string; - type: 'workspace.ready'; - properties: { - name: string; - }; -}; - -export type EventWorkspaceFailed1 = { - id: string; - type: 'workspace.failed'; - properties: { - message: string; - }; -}; - -export type EventWorkspaceStatus1 = { - id: string; - type: 'workspace.status'; - properties: { - workspaceID: string; - status: 'connected' | 'connecting' | 'disconnected' | 'error'; - }; -}; - -export type EventWorktreeReady1 = { - id: string; - type: 'worktree.ready'; - properties: { - name: string; - branch?: string; - }; -}; - -export type EventWorktreeFailed1 = { - id: string; - type: 'worktree.failed'; - properties: { - message: string; - }; -}; - -export type EventServerConnected1 = { - id: string; - type: 'server.connected'; - properties: { - [key: string]: unknown; - }; -}; - -export type EventGlobalDisposed1 = { - id: string; - type: 'global.disposed'; - properties: { - [key: string]: unknown; - }; -}; - -export type EventGlobalConfigUpdated1 = { - id: string; - type: 'global.config.updated'; - properties: { - [key: string]: unknown; - }; -}; - -export type EventMemoryStatus1 = { - id: string; - type: 'memory.status'; - properties: { - directory: string; - sessionID?: string; - enabled: boolean; - state: 'idle' | 'checking' | 'injecting' | 'updating' | 'skipped' | 'error'; - reason?: string; - project: { - bytes: number | 'NaN' | 'Infinity' | '-Infinity'; - estimatedTokens: number | 'NaN' | 'Infinity' | '-Infinity'; - truncated: boolean; - updatedAt?: number | 'NaN' | 'Infinity' | '-Infinity'; - }; - consolidation?: { - trigger: 'explicit' | 'turn-close' | 'rebuild'; - operationCount: number | 'NaN' | 'Infinity' | '-Infinity'; - cost: number | 'NaN' | 'Infinity' | '-Infinity'; - tokens: number | 'NaN' | 'Infinity' | '-Infinity'; - }; - detail?: { - type: 'saved' | 'skipped' | 'recalled'; - message: string; - reason?: string; - duplicateOf?: string; - tokens?: number | 'NaN' | 'Infinity' | '-Infinity'; - operationCount?: number | 'NaN' | 'Infinity' | '-Infinity'; - added?: number | 'NaN' | 'Infinity' | '-Infinity'; - removed?: number | 'NaN' | 'Infinity' | '-Infinity'; - skippedCount?: number | 'NaN' | 'Infinity' | '-Infinity'; - sources?: Array; - files?: Array; - }; - }; -}; - -export type EventMemoryUpdated1 = { - id: string; - type: 'memory.updated'; - properties: { - directory: string; - sessionID?: string; - enabled: boolean; - state: 'idle' | 'checking' | 'injecting' | 'updating' | 'skipped' | 'error'; - reason?: string; - project: { - bytes: number | 'NaN' | 'Infinity' | '-Infinity'; - estimatedTokens: number | 'NaN' | 'Infinity' | '-Infinity'; - truncated: boolean; - updatedAt?: number | 'NaN' | 'Infinity' | '-Infinity'; - }; - consolidation?: { - trigger: 'explicit' | 'turn-close' | 'rebuild'; - operationCount: number | 'NaN' | 'Infinity' | '-Infinity'; - cost: number | 'NaN' | 'Infinity' | '-Infinity'; - tokens: number | 'NaN' | 'Infinity' | '-Infinity'; - }; - detail?: { - type: 'saved' | 'skipped' | 'recalled'; - message: string; - reason?: string; - duplicateOf?: string; - tokens?: number | 'NaN' | 'Infinity' | '-Infinity'; - operationCount?: number | 'NaN' | 'Infinity' | '-Infinity'; - added?: number | 'NaN' | 'Infinity' | '-Infinity'; - removed?: number | 'NaN' | 'Infinity' | '-Infinity'; - skippedCount?: number | 'NaN' | 'Infinity' | '-Infinity'; - sources?: Array; - files?: Array; - }; - }; -}; - -export type EventMemoryError1 = { - id: string; - type: 'memory.error'; - properties: { - directory: string; - sessionID?: string; - enabled: boolean; - state: 'idle' | 'checking' | 'injecting' | 'updating' | 'skipped' | 'error'; - reason?: string; - project: { - bytes: number | 'NaN' | 'Infinity' | '-Infinity'; - estimatedTokens: number | 'NaN' | 'Infinity' | '-Infinity'; - truncated: boolean; - updatedAt?: number | 'NaN' | 'Infinity' | '-Infinity'; - }; - consolidation?: { - trigger: 'explicit' | 'turn-close' | 'rebuild'; - operationCount: number | 'NaN' | 'Infinity' | '-Infinity'; - cost: number | 'NaN' | 'Infinity' | '-Infinity'; - tokens: number | 'NaN' | 'Infinity' | '-Infinity'; - }; - detail?: { - type: 'saved' | 'skipped' | 'recalled'; - message: string; - reason?: string; - duplicateOf?: string; - tokens?: number | 'NaN' | 'Infinity' | '-Infinity'; - operationCount?: number | 'NaN' | 'Infinity' | '-Infinity'; - added?: number | 'NaN' | 'Infinity' | '-Infinity'; - removed?: number | 'NaN' | 'Infinity' | '-Infinity'; - skippedCount?: number | 'NaN' | 'Infinity' | '-Infinity'; - sources?: Array; - files?: Array; - }; - }; -}; - -export type EventTuiToastShow22 = { - id: string; - type: 'tui.toast.show'; - properties: { - title?: string; - message: string; - variant: 'info' | 'success' | 'warning' | 'error'; - duration?: number; - }; -}; - -export type CredentialOAuth = { - type: 'oauth'; - methodID: string; - refresh: string; - access: string; - expires: number; - metadata?: { - [key: string]: unknown; - }; -}; - -export type CredentialKey = { - type: 'key'; - key: string; - metadata?: { - [key: string]: unknown; - }; -}; - -export type SkillV2DirectorySource = { - type: 'directory'; - path: string; -}; - -export type SkillV2UrlSource = { - type: 'url'; - url: string; -}; - -export type SkillV2EmbeddedSource = { - type: 'embedded'; - skill: SkillV2Info; -}; - -export type BadRequestError = { - name: 'BadRequest'; - data: { - message: string; - kind?: 'Params' | 'Headers' | 'Query' | 'Body' | 'Payload'; - }; -}; - -export type AuthRemoveData = { - body?: never; - path: { - providerID: string; - }; - query?: never; - url: '/auth/{providerID}'; -}; - -export type AuthRemoveErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; - -export type AuthRemoveError = AuthRemoveErrors[keyof AuthRemoveErrors]; - -export type AuthRemoveResponses = { - /** - * Successfully removed authentication credentials - */ - 200: boolean; -}; - -export type AuthRemoveResponse = AuthRemoveResponses[keyof AuthRemoveResponses]; - -export type AuthSetData = { - body?: Auth; - path: { - providerID: string; - }; - query?: never; - url: '/auth/{providerID}'; -}; - -export type AuthSetErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; - -export type AuthSetError = AuthSetErrors[keyof AuthSetErrors]; - -export type AuthSetResponses = { - /** - * Successfully set authentication credentials - */ - 200: boolean; -}; - -export type AuthSetResponse = AuthSetResponses[keyof AuthSetResponses]; - -export type AppLogData = { - body?: { - /** - * Service name for the log entry - */ - service: string; - /** - * Log level - */ - level: 'debug' | 'info' | 'error' | 'warn'; - /** - * Log message - */ - message: string; - extra?: { - [key: string]: unknown; - }; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/log'; -}; - -export type AppLogErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; - -export type AppLogError = AppLogErrors[keyof AppLogErrors]; - -export type AppLogResponses = { - /** - * Log entry written successfully - */ - 200: boolean; -}; - -export type AppLogResponse = AppLogResponses[keyof AppLogResponses]; - -export type ExperimentalControlPlaneMoveSessionData = { - body?: { - sessionID: string; - destination: MoveSessionDestination; - moveChanges?: boolean; - }; - path?: never; - query?: never; - url: '/experimental/control-plane/move-session'; -}; - -export type ExperimentalControlPlaneMoveSessionErrors = { - /** - * MoveSessionError | InvalidRequestError - */ - 400: MoveSessionError | InvalidRequestError; -}; - -export type ExperimentalControlPlaneMoveSessionError = ExperimentalControlPlaneMoveSessionErrors[keyof ExperimentalControlPlaneMoveSessionErrors]; - -export type ExperimentalControlPlaneMoveSessionResponses = { - /** - * Session moved - */ - 204: void; -}; - -export type ExperimentalControlPlaneMoveSessionResponse = ExperimentalControlPlaneMoveSessionResponses[keyof ExperimentalControlPlaneMoveSessionResponses]; - -export type GlobalHealthData = { - body?: never; - path?: never; - query?: never; - url: '/global/health'; -}; - -export type GlobalHealthErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type GlobalHealthError = GlobalHealthErrors[keyof GlobalHealthErrors]; - -export type GlobalHealthResponses = { - /** - * Health information - */ - 200: { - healthy: true; - version: string; - }; -}; - -export type GlobalHealthResponse = GlobalHealthResponses[keyof GlobalHealthResponses]; - -export type GlobalEventData = { - body?: never; - path?: never; - query?: never; - url: '/global/event'; -}; - -export type GlobalEventErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type GlobalEventError = GlobalEventErrors[keyof GlobalEventErrors]; - -export type GlobalEventResponses = { - /** - * Event stream - */ - 200: GlobalEvent; -}; - -export type GlobalEventResponse = GlobalEventResponses[keyof GlobalEventResponses]; - -export type GlobalConfigGetData = { - body?: never; - path?: never; - query?: never; - url: '/global/config'; -}; - -export type GlobalConfigGetErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type GlobalConfigGetError = GlobalConfigGetErrors[keyof GlobalConfigGetErrors]; - -export type GlobalConfigGetResponses = { - /** - * Get global config info - */ - 200: Config; -}; - -export type GlobalConfigGetResponse = GlobalConfigGetResponses[keyof GlobalConfigGetResponses]; - -export type GlobalConfigUpdateData = { - body?: Config; - path?: never; - query?: never; - url: '/global/config'; -}; - -export type GlobalConfigUpdateErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; - -export type GlobalConfigUpdateError = GlobalConfigUpdateErrors[keyof GlobalConfigUpdateErrors]; - -export type GlobalConfigUpdateResponses = { - /** - * Successfully updated global config - */ - 200: Config; -}; - -export type GlobalConfigUpdateResponse = GlobalConfigUpdateResponses[keyof GlobalConfigUpdateResponses]; - -export type GlobalDisposeData = { - body?: never; - path?: never; - query?: never; - url: '/global/dispose'; -}; - -export type GlobalDisposeErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type GlobalDisposeError = GlobalDisposeErrors[keyof GlobalDisposeErrors]; - -export type GlobalDisposeResponses = { - /** - * Global disposed - */ - 200: boolean; -}; - -export type GlobalDisposeResponse = GlobalDisposeResponses[keyof GlobalDisposeResponses]; - -export type GlobalUpgradeData = { - body?: { - target?: string; - }; - path?: never; - query?: never; - url: '/global/upgrade'; -}; - -export type GlobalUpgradeErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; - -export type GlobalUpgradeError = GlobalUpgradeErrors[keyof GlobalUpgradeErrors]; - -export type GlobalUpgradeResponses = { - /** - * Upgrade result - */ - 200: { - success: true; - version: string; - } | { - success: false; - error: string; - }; -}; - -export type GlobalUpgradeResponse = GlobalUpgradeResponses[keyof GlobalUpgradeResponses]; - -export type EventSubscribeData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/event'; -}; - -export type EventSubscribeResponses = { - /** - * Event stream - */ - 200: Event; -}; - -export type EventSubscribeResponse = EventSubscribeResponses[keyof EventSubscribeResponses]; - -export type ConfigGetData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/config'; -}; - -export type ConfigGetErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type ConfigGetError = ConfigGetErrors[keyof ConfigGetErrors]; - -export type ConfigGetResponses = { - /** - * Get config info - */ - 200: Config; -}; - -export type ConfigGetResponse = ConfigGetResponses[keyof ConfigGetResponses]; - -export type ConfigUpdateData = { - body?: Config; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/config'; -}; - -export type ConfigUpdateErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; - -export type ConfigUpdateError = ConfigUpdateErrors[keyof ConfigUpdateErrors]; - -export type ConfigUpdateResponses = { - /** - * Successfully updated config - */ - 200: Config; -}; - -export type ConfigUpdateResponse = ConfigUpdateResponses[keyof ConfigUpdateResponses]; - -export type ConfigWarningsData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/config/warnings'; -}; - -export type ConfigWarningsErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type ConfigWarningsError = ConfigWarningsErrors[keyof ConfigWarningsErrors]; - -export type ConfigWarningsResponses = { - /** - * Config warnings - */ - 200: Array<{ - path: string; - message: string; - detail?: string; - }>; -}; - -export type ConfigWarningsResponse = ConfigWarningsResponses[keyof ConfigWarningsResponses]; - -export type ConfigProvidersData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/config/providers'; -}; - -export type ConfigProvidersErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type ConfigProvidersError = ConfigProvidersErrors[keyof ConfigProvidersErrors]; - -export type ConfigProvidersResponses = { - /** - * List of providers - */ - 200: { - providers: Array; - default: { - [key: string]: string; - }; - }; -}; - -export type ConfigProvidersResponse = ConfigProvidersResponses[keyof ConfigProvidersResponses]; - -export type ExperimentalCapabilitiesGetData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/experimental/capabilities'; -}; - -export type ExperimentalCapabilitiesGetErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type ExperimentalCapabilitiesGetError = ExperimentalCapabilitiesGetErrors[keyof ExperimentalCapabilitiesGetErrors]; - -export type ExperimentalCapabilitiesGetResponses = { - /** - * Experimental capabilities - */ - 200: ExperimentalCapabilities; -}; - -export type ExperimentalCapabilitiesGetResponse = ExperimentalCapabilitiesGetResponses[keyof ExperimentalCapabilitiesGetResponses]; - -export type ExperimentalConsoleGetData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/experimental/console'; -}; - -export type ExperimentalConsoleGetErrors = { - /** - * Bad request - */ - 400: BadRequestError; - /** - * InternalServerError - */ - 500: EffectHttpApiErrorInternalServerError; -}; - -export type ExperimentalConsoleGetError = ExperimentalConsoleGetErrors[keyof ExperimentalConsoleGetErrors]; - -export type ExperimentalConsoleGetResponses = { - /** - * Active Console provider metadata - */ - 200: ConsoleState; -}; - -export type ExperimentalConsoleGetResponse = ExperimentalConsoleGetResponses[keyof ExperimentalConsoleGetResponses]; - -export type ExperimentalConsoleListOrgsData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/experimental/console/orgs'; -}; - -export type ExperimentalConsoleListOrgsErrors = { - /** - * Bad request - */ - 400: BadRequestError; - /** - * InternalServerError - */ - 500: EffectHttpApiErrorInternalServerError; -}; - -export type ExperimentalConsoleListOrgsError = ExperimentalConsoleListOrgsErrors[keyof ExperimentalConsoleListOrgsErrors]; - -export type ExperimentalConsoleListOrgsResponses = { - /** - * Switchable Console orgs - */ - 200: { - orgs: Array<{ - accountID: string; - accountEmail: string; - accountUrl: string; - orgID: string; - orgName: string; - active: boolean; - }>; - }; -}; - -export type ExperimentalConsoleListOrgsResponse = ExperimentalConsoleListOrgsResponses[keyof ExperimentalConsoleListOrgsResponses]; - -export type ExperimentalConsoleSwitchOrgData = { - body?: { - accountID: string; - orgID: string; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/experimental/console/switch'; -}; - -export type ExperimentalConsoleSwitchOrgResponses = { - /** - * Switch success - */ - 200: boolean; -}; - -export type ExperimentalConsoleSwitchOrgResponse = ExperimentalConsoleSwitchOrgResponses[keyof ExperimentalConsoleSwitchOrgResponses]; - -export type ToolListData = { - body?: never; - path?: never; - query: { - directory?: string; - workspace?: string; - provider: string; - model: string; - }; - url: '/experimental/tool'; -}; - -export type ToolListErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; - -export type ToolListError = ToolListErrors[keyof ToolListErrors]; - -export type ToolListResponses = { - /** - * Tools - */ - 200: ToolList; -}; - -export type ToolListResponse = ToolListResponses[keyof ToolListResponses]; - -export type ToolIdsData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/experimental/tool/ids'; -}; - -export type ToolIdsErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; - -export type ToolIdsError = ToolIdsErrors[keyof ToolIdsErrors]; - -export type ToolIdsResponses = { - /** - * Tool IDs - */ - 200: ToolIds; -}; - -export type ToolIdsResponse = ToolIdsResponses[keyof ToolIdsResponses]; - -export type WorktreeRemoveData = { - body?: WorktreeRemoveInput; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/experimental/worktree'; -}; - -export type WorktreeRemoveErrors = { - /** - * WorktreeError | InvalidRequestError - */ - 400: WorktreeError | InvalidRequestError; -}; - -export type WorktreeRemoveError = WorktreeRemoveErrors[keyof WorktreeRemoveErrors]; - -export type WorktreeRemoveResponses = { - /** - * Worktree removed - */ - 200: boolean; -}; - -export type WorktreeRemoveResponse = WorktreeRemoveResponses[keyof WorktreeRemoveResponses]; - -export type WorktreeListData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/experimental/worktree'; -}; - -export type WorktreeListErrors = { - /** - * WorktreeError | InvalidRequestError - */ - 400: WorktreeError | InvalidRequestError; -}; - -export type WorktreeListError = WorktreeListErrors[keyof WorktreeListErrors]; - -export type WorktreeListResponses = { - /** - * List of worktrees - */ - 200: Array; -}; - -export type WorktreeListResponse = WorktreeListResponses[keyof WorktreeListResponses]; - -export type WorktreeCreateData = { - body?: WorktreeCreateInput; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/experimental/worktree'; -}; - -export type WorktreeCreateErrors = { - /** - * WorktreeError | InvalidRequestError - */ - 400: WorktreeError | InvalidRequestError; -}; - -export type WorktreeCreateError = WorktreeCreateErrors[keyof WorktreeCreateErrors]; - -export type WorktreeCreateResponses = { - /** - * Worktree created - */ - 200: Worktree; -}; - -export type WorktreeCreateResponse = WorktreeCreateResponses[keyof WorktreeCreateResponses]; - -export type WorktreeResetData = { - body?: WorktreeResetInput; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/experimental/worktree/reset'; -}; - -export type WorktreeResetErrors = { - /** - * WorktreeError | InvalidRequestError - */ - 400: WorktreeError | InvalidRequestError; -}; - -export type WorktreeResetError = WorktreeResetErrors[keyof WorktreeResetErrors]; - -export type WorktreeResetResponses = { - /** - * Worktree reset - */ - 200: boolean; -}; - -export type WorktreeResetResponse = WorktreeResetResponses[keyof WorktreeResetResponses]; - -export type WorktreeDiffData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - base?: string; - }; - url: '/experimental/worktree/diff'; -}; - -export type WorktreeDiffErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; - -export type WorktreeDiffError = WorktreeDiffErrors[keyof WorktreeDiffErrors]; - -export type WorktreeDiffResponses = { - /** - * File diffs - */ - 200: Array; -}; - -export type WorktreeDiffResponse = WorktreeDiffResponses[keyof WorktreeDiffResponses]; - -export type WorktreeDiffSummaryData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - base?: string; - }; - url: '/experimental/worktree/diff/summary'; -}; - -export type WorktreeDiffSummaryErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; - -export type WorktreeDiffSummaryError = WorktreeDiffSummaryErrors[keyof WorktreeDiffSummaryErrors]; - -export type WorktreeDiffSummaryResponses = { - /** - * Diff summary items - */ - 200: Array; -}; - -export type WorktreeDiffSummaryResponse = WorktreeDiffSummaryResponses[keyof WorktreeDiffSummaryResponses]; - -export type WorktreeDiffFileData = { - body?: never; - path?: never; - query: { - directory?: string; - workspace?: string; - base?: string; - file: string; - }; - url: '/experimental/worktree/diff/file'; -}; - -export type WorktreeDiffFileErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; - -export type WorktreeDiffFileError = WorktreeDiffFileErrors[keyof WorktreeDiffFileErrors]; - -export type WorktreeDiffFileResponses = { - /** - * Diff detail item - */ - 200: WorktreeDiffItem; -}; - -export type WorktreeDiffFileResponse = WorktreeDiffFileResponses[keyof WorktreeDiffFileResponses]; - -export type ExperimentalSessionListData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - projectID?: string; - worktrees?: boolean; - current?: 'true' | 'false'; - roots?: boolean | 'true' | 'false'; - start?: number; - cursor?: number; - search?: string; - limit?: number; - archived?: boolean | 'true' | 'false'; - }; - url: '/experimental/session'; -}; - -export type ExperimentalSessionListErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type ExperimentalSessionListError = ExperimentalSessionListErrors[keyof ExperimentalSessionListErrors]; - -export type ExperimentalSessionListResponses = { - /** - * List of sessions - */ - 200: Array; -}; - -export type ExperimentalSessionListResponse = ExperimentalSessionListResponses[keyof ExperimentalSessionListResponses]; - -export type ExperimentalSessionBackgroundData = { - body?: never; - path: { - sessionID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/experimental/session/{sessionID}/background'; -}; - -export type ExperimentalSessionBackgroundErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; - -export type ExperimentalSessionBackgroundError = ExperimentalSessionBackgroundErrors[keyof ExperimentalSessionBackgroundErrors]; - -export type ExperimentalSessionBackgroundResponses = { - /** - * Backgrounded subagents - */ - 200: boolean; -}; - -export type ExperimentalSessionBackgroundResponse = ExperimentalSessionBackgroundResponses[keyof ExperimentalSessionBackgroundResponses]; - -export type ExperimentalResourceListData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/experimental/resource'; -}; - -export type ExperimentalResourceListErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type ExperimentalResourceListError = ExperimentalResourceListErrors[keyof ExperimentalResourceListErrors]; - -export type ExperimentalResourceListResponses = { - /** - * MCP resources - */ - 200: { - [key: string]: McpResource; - }; -}; - -export type ExperimentalResourceListResponse = ExperimentalResourceListResponses[keyof ExperimentalResourceListResponses]; - -export type FindTextData = { - body?: never; - path?: never; - query: { - directory?: string; - workspace?: string; - pattern: string; - }; - url: '/find'; -}; - -export type FindTextErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type FindTextError = FindTextErrors[keyof FindTextErrors]; - -export type FindTextResponses = { - /** - * Matches - */ - 200: Array<{ - path: { - text: string; - }; - lines: { - text: string; - }; - line_number: number; - absolute_offset: number; - submatches: Array<{ - match: { - text: string; - }; - start: number; - end: number; - }>; - }>; -}; - -export type FindTextResponse = FindTextResponses[keyof FindTextResponses]; - -export type FindFilesData = { - body?: never; - path?: never; - query: { - directory?: string; - workspace?: string; - query: string; - dirs?: 'true' | 'false'; - type?: 'file' | 'directory'; - limit?: number; - }; - url: '/find/file'; -}; - -export type FindFilesErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type FindFilesError = FindFilesErrors[keyof FindFilesErrors]; - -export type FindFilesResponses = { - /** - * File paths - */ - 200: Array; -}; - -export type FindFilesResponse = FindFilesResponses[keyof FindFilesResponses]; - -export type FindSymbolsData = { - body?: never; - path?: never; - query: { - directory?: string; - workspace?: string; - query: string; - }; - url: '/find/symbol'; -}; - -export type FindSymbolsErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type FindSymbolsError = FindSymbolsErrors[keyof FindSymbolsErrors]; - -export type FindSymbolsResponses = { - /** - * Symbols - */ - 200: Array; -}; - -export type FindSymbolsResponse = FindSymbolsResponses[keyof FindSymbolsResponses]; - -export type FileListData = { - body?: never; - path?: never; - query: { - directory?: string; - workspace?: string; - path: string; - }; - url: '/file'; -}; - -export type FileListErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type FileListError = FileListErrors[keyof FileListErrors]; - -export type FileListResponses = { - /** - * Files and directories - */ - 200: Array; -}; - -export type FileListResponse = FileListResponses[keyof FileListResponses]; - -export type FileReadData = { - body?: never; - path?: never; - query: { - directory?: string; - workspace?: string; - path: string; - }; - url: '/file/content'; -}; - -export type FileReadErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type FileReadError = FileReadErrors[keyof FileReadErrors]; - -export type FileReadResponses = { - /** - * File content - */ - 200: FileContent; -}; - -export type FileReadResponse = FileReadResponses[keyof FileReadResponses]; - -export type FileStatusData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/file/status'; -}; - -export type FileStatusErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type FileStatusError = FileStatusErrors[keyof FileStatusErrors]; - -export type FileStatusResponses = { - /** - * File status - */ - 200: Array; -}; - -export type FileStatusResponse = FileStatusResponses[keyof FileStatusResponses]; - -export type InstanceDisposeData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/instance/dispose'; -}; - -export type InstanceDisposeErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type InstanceDisposeError = InstanceDisposeErrors[keyof InstanceDisposeErrors]; - -export type InstanceDisposeResponses = { - /** - * Instance disposed - */ - 200: boolean; -}; - -export type InstanceDisposeResponse = InstanceDisposeResponses[keyof InstanceDisposeResponses]; - -export type PathGetData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/path'; -}; - -export type PathGetErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type PathGetError = PathGetErrors[keyof PathGetErrors]; - -export type PathGetResponses = { - /** - * Path - */ - 200: Path; -}; - -export type PathGetResponse = PathGetResponses[keyof PathGetResponses]; - -export type VcsGetData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/vcs'; -}; - -export type VcsGetErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type VcsGetError = VcsGetErrors[keyof VcsGetErrors]; - -export type VcsGetResponses = { - /** - * VCS info - */ - 200: VcsInfo; -}; - -export type VcsGetResponse = VcsGetResponses[keyof VcsGetResponses]; - -export type VcsStatusData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/vcs/status'; -}; - -export type VcsStatusErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type VcsStatusError = VcsStatusErrors[keyof VcsStatusErrors]; - -export type VcsStatusResponses = { - /** - * VCS status - */ - 200: Array; -}; - -export type VcsStatusResponse = VcsStatusResponses[keyof VcsStatusResponses]; - -export type VcsDiffData = { - body?: never; - path?: never; - query: { - directory?: string; - workspace?: string; - mode: 'git' | 'branch'; - context?: number; - }; - url: '/vcs/diff'; -}; - -export type VcsDiffErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type VcsDiffError = VcsDiffErrors[keyof VcsDiffErrors]; - -export type VcsDiffResponses = { - /** - * VCS diff - */ - 200: Array; -}; - -export type VcsDiffResponse = VcsDiffResponses[keyof VcsDiffResponses]; - -export type VcsDiffRawData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/vcs/diff/raw'; -}; - -export type VcsDiffRawErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type VcsDiffRawError = VcsDiffRawErrors[keyof VcsDiffRawErrors]; - -export type VcsDiffRawResponses = { - /** - * Raw VCS diff - */ - 200: string; -}; - -export type VcsDiffRawResponse = VcsDiffRawResponses[keyof VcsDiffRawResponses]; - -export type VcsApplyData = { - body?: { - patch: string; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/vcs/apply'; -}; - -export type VcsApplyErrors = { - /** - * VcsApplyError | InvalidRequestError - */ - 400: VcsApplyError | InvalidRequestError; -}; - -export type VcsApplyError2 = VcsApplyErrors[keyof VcsApplyErrors]; - -export type VcsApplyResponses = { - /** - * VCS patch applied - */ - 200: { - applied: boolean; - }; -}; - -export type VcsApplyResponse = VcsApplyResponses[keyof VcsApplyResponses]; - -export type CommandListData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/command'; -}; - -export type CommandListErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type CommandListError = CommandListErrors[keyof CommandListErrors]; - -export type CommandListResponses = { - /** - * List of commands - */ - 200: Array; -}; - -export type CommandListResponse = CommandListResponses[keyof CommandListResponses]; - -export type AppAgentsData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/agent'; -}; - -export type AppAgentsErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type AppAgentsError = AppAgentsErrors[keyof AppAgentsErrors]; - -export type AppAgentsResponses = { - /** - * List of agents - */ - 200: Array; -}; - -export type AppAgentsResponse = AppAgentsResponses[keyof AppAgentsResponses]; - -export type AppSkillsData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/skill'; -}; - -export type AppSkillsErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type AppSkillsError = AppSkillsErrors[keyof AppSkillsErrors]; - -export type AppSkillsResponses = { - /** - * List of skills - */ - 200: Array<{ - name: string; - description?: string; - location: string; - content: string; - }>; -}; - -export type AppSkillsResponse = AppSkillsResponses[keyof AppSkillsResponses]; - -export type LspStatusData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/lsp'; -}; - -export type LspStatusErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type LspStatusError = LspStatusErrors[keyof LspStatusErrors]; - -export type LspStatusResponses = { - /** - * LSP server status - */ - 200: Array; -}; - -export type LspStatusResponse = LspStatusResponses[keyof LspStatusResponses]; - -export type FormatterStatusData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/formatter'; -}; - -export type FormatterStatusErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type FormatterStatusError = FormatterStatusErrors[keyof FormatterStatusErrors]; - -export type FormatterStatusResponses = { - /** - * Formatter status - */ - 200: Array; -}; - -export type FormatterStatusResponse = FormatterStatusResponses[keyof FormatterStatusResponses]; - -export type McpStatusData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/mcp'; -}; - -export type McpStatusErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type McpStatusError = McpStatusErrors[keyof McpStatusErrors]; - -export type McpStatusResponses = { - /** - * MCP server status - */ - 200: { - [key: string]: McpStatus; - }; -}; - -export type McpStatusResponse = McpStatusResponses[keyof McpStatusResponses]; - -export type McpAddData = { - body?: { - name: string; - config: McpLocalConfig | McpRemoteConfig; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/mcp'; -}; - -export type McpAddErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; - -export type McpAddError = McpAddErrors[keyof McpAddErrors]; - -export type McpAddResponses = { - /** - * MCP server added successfully - */ - 200: { - [key: string]: McpStatus; - }; -}; - -export type McpAddResponse = McpAddResponses[keyof McpAddResponses]; - -export type McpAuthRemoveData = { - body?: never; - path: { - name: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/mcp/{name}/auth'; -}; - -export type McpAuthRemoveErrors = { - /** - * Bad request - */ - 400: BadRequestError; - /** - * McpServerNotFoundError - */ - 404: McpServerNotFoundError; -}; - -export type McpAuthRemoveError = McpAuthRemoveErrors[keyof McpAuthRemoveErrors]; - -export type McpAuthRemoveResponses = { - /** - * OAuth credentials removed - */ - 200: { - success: true; - }; -}; - -export type McpAuthRemoveResponse = McpAuthRemoveResponses[keyof McpAuthRemoveResponses]; - -export type McpAuthStartData = { - body?: never; - path: { - name: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/mcp/{name}/auth'; -}; - -export type McpAuthStartErrors = { - /** - * McpUnsupportedOAuthError | InvalidRequestError - */ - 400: McpUnsupportedOAuthError | InvalidRequestError; - /** - * McpServerNotFoundError - */ - 404: McpServerNotFoundError; -}; - -export type McpAuthStartError = McpAuthStartErrors[keyof McpAuthStartErrors]; - -export type McpAuthStartResponses = { - /** - * OAuth flow started - */ - 200: { - authorizationUrl: string; - oauthState: string; - }; -}; - -export type McpAuthStartResponse = McpAuthStartResponses[keyof McpAuthStartResponses]; - -export type McpAuthCallbackData = { - body?: { - code: string; - }; - path: { - name: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/mcp/{name}/auth/callback'; -}; - -export type McpAuthCallbackErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * McpServerNotFoundError - */ - 404: McpServerNotFoundError; -}; - -export type McpAuthCallbackError = McpAuthCallbackErrors[keyof McpAuthCallbackErrors]; - -export type McpAuthCallbackResponses = { - /** - * OAuth authentication completed - */ - 200: McpStatus; -}; - -export type McpAuthCallbackResponse = McpAuthCallbackResponses[keyof McpAuthCallbackResponses]; - -export type McpAuthAuthenticateData = { - body?: never; - path: { - name: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/mcp/{name}/auth/authenticate'; -}; - -export type McpAuthAuthenticateErrors = { - /** - * McpUnsupportedOAuthError | InvalidRequestError - */ - 400: McpUnsupportedOAuthError | InvalidRequestError; - /** - * McpServerNotFoundError - */ - 404: McpServerNotFoundError; -}; - -export type McpAuthAuthenticateError = McpAuthAuthenticateErrors[keyof McpAuthAuthenticateErrors]; - -export type McpAuthAuthenticateResponses = { - /** - * OAuth authentication completed - */ - 200: McpStatus; -}; - -export type McpAuthAuthenticateResponse = McpAuthAuthenticateResponses[keyof McpAuthAuthenticateResponses]; - -export type McpConnectData = { - body?: never; - path: { - name: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/mcp/{name}/connect'; -}; - -export type McpConnectErrors = { - /** - * Bad request - */ - 400: BadRequestError; - /** - * McpServerNotFoundError - */ - 404: McpServerNotFoundError; -}; - -export type McpConnectError = McpConnectErrors[keyof McpConnectErrors]; - -export type McpConnectResponses = { - /** - * MCP server connected successfully - */ - 200: boolean; -}; - -export type McpConnectResponse = McpConnectResponses[keyof McpConnectResponses]; - -export type McpDisconnectData = { - body?: never; - path: { - name: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/mcp/{name}/disconnect'; -}; - -export type McpDisconnectErrors = { - /** - * Bad request - */ - 400: BadRequestError; - /** - * McpServerNotFoundError - */ - 404: McpServerNotFoundError; -}; - -export type McpDisconnectError = McpDisconnectErrors[keyof McpDisconnectErrors]; - -export type McpDisconnectResponses = { - /** - * MCP server disconnected successfully - */ - 200: boolean; -}; - -export type McpDisconnectResponse = McpDisconnectResponses[keyof McpDisconnectResponses]; - -export type ProjectListData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/project'; -}; - -export type ProjectListErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type ProjectListError = ProjectListErrors[keyof ProjectListErrors]; - -export type ProjectListResponses = { - /** - * List of projects - */ - 200: Array; -}; - -export type ProjectListResponse = ProjectListResponses[keyof ProjectListResponses]; - -export type ProjectCurrentData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/project/current'; -}; - -export type ProjectCurrentErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type ProjectCurrentError = ProjectCurrentErrors[keyof ProjectCurrentErrors]; - -export type ProjectCurrentResponses = { - /** - * Current project information - */ - 200: Project; -}; - -export type ProjectCurrentResponse = ProjectCurrentResponses[keyof ProjectCurrentResponses]; - -export type ProjectInitGitData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/project/git/init'; -}; - -export type ProjectInitGitErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type ProjectInitGitError = ProjectInitGitErrors[keyof ProjectInitGitErrors]; - -export type ProjectInitGitResponses = { - /** - * Project information after git initialization - */ - 200: Project; -}; - -export type ProjectInitGitResponse = ProjectInitGitResponses[keyof ProjectInitGitResponses]; - -export type ProjectUpdateData = { - body?: { - name?: string; - icon?: ProjectIcon; - commands?: ProjectCommands; - }; - path: { - projectID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/project/{projectID}'; -}; - -export type ProjectUpdateErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * ProjectNotFoundError - */ - 404: ProjectNotFoundError; -}; - -export type ProjectUpdateError = ProjectUpdateErrors[keyof ProjectUpdateErrors]; - -export type ProjectUpdateResponses = { - /** - * Updated project information - */ - 200: Project; -}; - -export type ProjectUpdateResponse = ProjectUpdateResponses[keyof ProjectUpdateResponses]; - -export type ProjectDirectoriesData = { - body?: never; - path: { - projectID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/project/{projectID}/directories'; -}; - -export type ProjectDirectoriesErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type ProjectDirectoriesError = ProjectDirectoriesErrors[keyof ProjectDirectoriesErrors]; - -export type ProjectDirectoriesResponses = { - /** - * Project directories - */ - 200: ProjectDirectories; -}; - -export type ProjectDirectoriesResponse = ProjectDirectoriesResponses[keyof ProjectDirectoriesResponses]; - -export type ExperimentalProjectCopyGenerateNameData = { - body?: { - context?: string; - }; - path: { - projectID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/experimental/project/{projectID}/copy/generate-name'; -}; - -export type ExperimentalProjectCopyGenerateNameErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type ExperimentalProjectCopyGenerateNameError = ExperimentalProjectCopyGenerateNameErrors[keyof ExperimentalProjectCopyGenerateNameErrors]; - -export type ExperimentalProjectCopyGenerateNameResponses = { - /** - * Success - */ - 200: { - name: string; - }; -}; - -export type ExperimentalProjectCopyGenerateNameResponse = ExperimentalProjectCopyGenerateNameResponses[keyof ExperimentalProjectCopyGenerateNameResponses]; - -export type PtyShellsData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/pty/shells'; -}; - -export type PtyShellsErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type PtyShellsError = PtyShellsErrors[keyof PtyShellsErrors]; - -export type PtyShellsResponses = { - /** - * List of shells - */ - 200: Array<{ - path: string; - name: string; - acceptable: boolean; - }>; -}; - -export type PtyShellsResponse = PtyShellsResponses[keyof PtyShellsResponses]; - -export type PtyListData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/pty'; -}; - -export type PtyListErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type PtyListError = PtyListErrors[keyof PtyListErrors]; - -export type PtyListResponses = { - /** - * List of sessions - */ - 200: Array; -}; - -export type PtyListResponse = PtyListResponses[keyof PtyListResponses]; - -export type PtyCreateData = { - body?: { - command?: string; - args?: Array; - cwd?: string; - title?: string; - env?: { - [key: string]: string; - }; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/pty'; -}; - -export type PtyCreateErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; - -export type PtyCreateError = PtyCreateErrors[keyof PtyCreateErrors]; - -export type PtyCreateResponses = { - /** - * Created session - */ - 200: Pty; -}; - -export type PtyCreateResponse = PtyCreateResponses[keyof PtyCreateResponses]; - -export type PtyRemoveData = { - body?: never; - path: { - ptyID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/pty/{ptyID}'; -}; - -export type PtyRemoveErrors = { - /** - * Bad request - */ - 400: BadRequestError; - /** - * PtyNotFoundError - */ - 404: PtyNotFoundError; -}; - -export type PtyRemoveError = PtyRemoveErrors[keyof PtyRemoveErrors]; - -export type PtyRemoveResponses = { - /** - * Session removed - */ - 200: boolean; -}; - -export type PtyRemoveResponse = PtyRemoveResponses[keyof PtyRemoveResponses]; - -export type PtyGetData = { - body?: never; - path: { - ptyID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/pty/{ptyID}'; -}; - -export type PtyGetErrors = { - /** - * Bad request - */ - 400: BadRequestError; - /** - * PtyNotFoundError - */ - 404: PtyNotFoundError; -}; - -export type PtyGetError = PtyGetErrors[keyof PtyGetErrors]; - -export type PtyGetResponses = { - /** - * Session info - */ - 200: Pty; -}; - -export type PtyGetResponse = PtyGetResponses[keyof PtyGetResponses]; - -export type PtyUpdateData = { - body?: { - title?: string; - size?: { - rows: number; - cols: number; - }; - sessionID?: string | null; - }; - path: { - ptyID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/pty/{ptyID}'; -}; - -export type PtyUpdateErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * PtyNotFoundError - */ - 404: PtyNotFoundError; -}; - -export type PtyUpdateError = PtyUpdateErrors[keyof PtyUpdateErrors]; - -export type PtyUpdateResponses = { - /** - * Updated session - */ - 200: Pty; -}; - -export type PtyUpdateResponse = PtyUpdateResponses[keyof PtyUpdateResponses]; - -export type PtyConnectTokenData = { - body?: never; - path: { - ptyID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/pty/{ptyID}/connect-token'; -}; - -export type PtyConnectTokenErrors = { - /** - * Bad request - */ - 400: BadRequestError; - /** - * PtyForbiddenError - */ - 403: PtyForbiddenError; - /** - * PtyNotFoundError - */ - 404: PtyNotFoundError; -}; - -export type PtyConnectTokenError = PtyConnectTokenErrors[keyof PtyConnectTokenErrors]; - -export type PtyConnectTokenResponses = { - /** - * WebSocket connect token - */ - 200: PtyTicketConnectToken; -}; - -export type PtyConnectTokenResponse = PtyConnectTokenResponses[keyof PtyConnectTokenResponses]; - -export type QuestionListData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/question'; -}; - -export type QuestionListErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; - -export type QuestionListError = QuestionListErrors[keyof QuestionListErrors]; - -export type QuestionListResponses = { - /** - * List of pending questions - */ - 200: Array; -}; - -export type QuestionListResponse = QuestionListResponses[keyof QuestionListResponses]; - -export type QuestionReplyData = { - body?: { - /** - * User answers in order of questions (each answer is an array of selected labels) - */ - answers: Array; - }; - path: { - requestID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/question/{requestID}/reply'; -}; + answers: Array + } + path: { + requestID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/question/{requestID}/reply" +} export type QuestionReplyErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * QuestionNotFoundError - */ - 404: QuestionNotFoundError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * QuestionNotFoundError + */ + 404: QuestionNotFoundError +} -export type QuestionReplyError = QuestionReplyErrors[keyof QuestionReplyErrors]; +export type QuestionReplyError = QuestionReplyErrors[keyof QuestionReplyErrors] export type QuestionReplyResponses = { - /** - * Question answered successfully - */ - 200: boolean; -}; + /** + * Question answered successfully + */ + 200: boolean +} -export type QuestionReplyResponse = QuestionReplyResponses[keyof QuestionReplyResponses]; +export type QuestionReplyResponse = QuestionReplyResponses[keyof QuestionReplyResponses] export type QuestionRejectData = { - body?: never; - path: { - requestID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/question/{requestID}/reject'; -}; + body?: never + path: { + requestID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/question/{requestID}/reject" +} export type QuestionRejectErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * QuestionNotFoundError - */ - 404: QuestionNotFoundError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * QuestionNotFoundError + */ + 404: QuestionNotFoundError +} -export type QuestionRejectError = QuestionRejectErrors[keyof QuestionRejectErrors]; +export type QuestionRejectError = QuestionRejectErrors[keyof QuestionRejectErrors] export type QuestionRejectResponses = { - /** - * Question rejected successfully - */ - 200: boolean; -}; + /** + * Question rejected successfully + */ + 200: boolean +} -export type QuestionRejectResponse = QuestionRejectResponses[keyof QuestionRejectResponses]; +export type QuestionRejectResponse = QuestionRejectResponses[keyof QuestionRejectResponses] export type PermissionListData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/permission'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/permission" +} export type PermissionListErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type PermissionListError = PermissionListErrors[keyof PermissionListErrors]; +export type PermissionListError = PermissionListErrors[keyof PermissionListErrors] export type PermissionListResponses = { - /** - * List of pending permissions - */ - 200: Array; -}; + /** + * List of pending permissions + */ + 200: Array +} -export type PermissionListResponse = PermissionListResponses[keyof PermissionListResponses]; +export type PermissionListResponse = PermissionListResponses[keyof PermissionListResponses] export type PermissionReplyData = { - body?: { - reply: 'once' | 'always' | 'reject'; - message?: string; - }; - path: { - requestID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/permission/{requestID}/reply'; -}; + body?: { + reply: "once" | "always" | "reject" + message?: string + } + path: { + requestID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/permission/{requestID}/reply" +} export type PermissionReplyErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * PermissionNotFoundError - */ - 404: PermissionNotFoundError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * PermissionNotFoundError + */ + 404: PermissionNotFoundError +} -export type PermissionReplyError = PermissionReplyErrors[keyof PermissionReplyErrors]; +export type PermissionReplyError = PermissionReplyErrors[keyof PermissionReplyErrors] export type PermissionReplyResponses = { - /** - * Permission processed successfully - */ - 200: boolean; -}; + /** + * Permission processed successfully + */ + 200: boolean +} -export type PermissionReplyResponse = PermissionReplyResponses[keyof PermissionReplyResponses]; +export type PermissionReplyResponse = PermissionReplyResponses[keyof PermissionReplyResponses] export type PermissionSaveAlwaysRulesData = { - body?: { - approvedAlways?: Array; - deniedAlways?: Array; - }; - path: { - requestID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/permission/{requestID}/always-rules'; -}; + body?: { + approvedAlways?: Array + deniedAlways?: Array + } + path: { + requestID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/permission/{requestID}/always-rules" +} export type PermissionSaveAlwaysRulesErrors = { - /** - * Bad request - */ - 400: BadRequestError; - /** - * PermissionNotFoundError - */ - 404: PermissionNotFoundError; -}; + /** + * Bad request + */ + 400: BadRequestError + /** + * PermissionNotFoundError + */ + 404: PermissionNotFoundError +} -export type PermissionSaveAlwaysRulesError = PermissionSaveAlwaysRulesErrors[keyof PermissionSaveAlwaysRulesErrors]; +export type PermissionSaveAlwaysRulesError = PermissionSaveAlwaysRulesErrors[keyof PermissionSaveAlwaysRulesErrors] export type PermissionSaveAlwaysRulesResponses = { - /** - * Always-rules saved - */ - 200: boolean; -}; + /** + * Always-rules saved + */ + 200: boolean +} -export type PermissionSaveAlwaysRulesResponse = PermissionSaveAlwaysRulesResponses[keyof PermissionSaveAlwaysRulesResponses]; +export type PermissionSaveAlwaysRulesResponse = + PermissionSaveAlwaysRulesResponses[keyof PermissionSaveAlwaysRulesResponses] export type PermissionAllowEverythingData = { - body?: { - enable: boolean; - requestID?: string; - sessionID?: string; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/permission/allow-everything'; -}; + body?: { + enable: boolean + requestID?: string + sessionID?: string + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/permission/allow-everything" +} export type PermissionAllowEverythingErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * PermissionNotFoundError - */ - 404: PermissionNotFoundError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * PermissionNotFoundError + */ + 404: PermissionNotFoundError +} -export type PermissionAllowEverythingError = PermissionAllowEverythingErrors[keyof PermissionAllowEverythingErrors]; +export type PermissionAllowEverythingError = PermissionAllowEverythingErrors[keyof PermissionAllowEverythingErrors] export type PermissionAllowEverythingResponses = { - /** - * Success - */ - 200: boolean; -}; + /** + * Success + */ + 200: boolean +} -export type PermissionAllowEverythingResponse = PermissionAllowEverythingResponses[keyof PermissionAllowEverythingResponses]; +export type PermissionAllowEverythingResponse = + PermissionAllowEverythingResponses[keyof PermissionAllowEverythingResponses] export type ProviderListData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/provider'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/provider" +} export type ProviderListErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type ProviderListError = ProviderListErrors[keyof ProviderListErrors]; +export type ProviderListError = ProviderListErrors[keyof ProviderListErrors] export type ProviderListResponses = { - /** - * List of providers - */ - 200: { - all: Array; - default: { - [key: string]: string; - }; - connected: Array; - failed: Array; - }; -}; + /** + * List of providers + */ + 200: { + all: Array + default: { + [key: string]: string + } + connected: Array + failed: Array + } +} -export type ProviderListResponse = ProviderListResponses[keyof ProviderListResponses]; +export type ProviderListResponse = ProviderListResponses[keyof ProviderListResponses] export type ProviderAuthData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/provider/auth'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/provider/auth" +} export type ProviderAuthErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type ProviderAuthError2 = ProviderAuthErrors[keyof ProviderAuthErrors]; +export type ProviderAuthError2 = ProviderAuthErrors[keyof ProviderAuthErrors] export type ProviderAuthResponses = { - /** - * Provider auth methods - */ - 200: { - [key: string]: Array; - }; -}; + /** + * Provider auth methods + */ + 200: { + [key: string]: Array + } +} -export type ProviderAuthResponse = ProviderAuthResponses[keyof ProviderAuthResponses]; +export type ProviderAuthResponse = ProviderAuthResponses[keyof ProviderAuthResponses] export type ProviderOauthAuthorizeData = { - body?: { - /** - * Auth method index - */ - method: number; - inputs?: { - [key: string]: string; - }; - }; - path: { - providerID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/provider/{providerID}/oauth/authorize'; -}; + body?: { + /** + * Auth method index + */ + method: number + inputs?: { + [key: string]: string + } + } + path: { + providerID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/provider/{providerID}/oauth/authorize" +} export type ProviderOauthAuthorizeErrors = { - /** - * ProviderAuthError | InvalidRequestError - */ - 400: ProviderAuthError1 | InvalidRequestError; -}; + /** + * ProviderAuthError | InvalidRequestError + */ + 400: ProviderAuthError1 | InvalidRequestError +} -export type ProviderOauthAuthorizeError = ProviderOauthAuthorizeErrors[keyof ProviderOauthAuthorizeErrors]; +export type ProviderOauthAuthorizeError = ProviderOauthAuthorizeErrors[keyof ProviderOauthAuthorizeErrors] export type ProviderOauthAuthorizeResponses = { - /** - * Authorization URL and method - */ - 200: ProviderAuthAuthorization; -}; + /** + * Authorization URL and method + */ + 200: ProviderAuthAuthorization +} -export type ProviderOauthAuthorizeResponse = ProviderOauthAuthorizeResponses[keyof ProviderOauthAuthorizeResponses]; +export type ProviderOauthAuthorizeResponse = ProviderOauthAuthorizeResponses[keyof ProviderOauthAuthorizeResponses] export type ProviderOauthCallbackData = { - body?: { - /** - * Auth method index - */ - method: number; - code?: string; - }; - path: { - providerID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/provider/{providerID}/oauth/callback'; -}; + body?: { + /** + * Auth method index + */ + method: number + code?: string + } + path: { + providerID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/provider/{providerID}/oauth/callback" +} export type ProviderOauthCallbackErrors = { - /** - * ProviderAuthError | InvalidRequestError - */ - 400: ProviderAuthError1 | InvalidRequestError; -}; + /** + * ProviderAuthError | InvalidRequestError + */ + 400: ProviderAuthError1 | InvalidRequestError +} -export type ProviderOauthCallbackError = ProviderOauthCallbackErrors[keyof ProviderOauthCallbackErrors]; +export type ProviderOauthCallbackError = ProviderOauthCallbackErrors[keyof ProviderOauthCallbackErrors] export type ProviderOauthCallbackResponses = { - /** - * OAuth callback processed successfully - */ - 200: boolean; -}; + /** + * OAuth callback processed successfully + */ + 200: boolean +} -export type ProviderOauthCallbackResponse = ProviderOauthCallbackResponses[keyof ProviderOauthCallbackResponses]; +export type ProviderOauthCallbackResponse = ProviderOauthCallbackResponses[keyof ProviderOauthCallbackResponses] export type SessionListData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - scope?: 'project'; - path?: string; - roots?: boolean | 'true' | 'false'; - start?: number; - search?: string; - limit?: number; - }; - url: '/session'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + scope?: "project" + path?: string + roots?: boolean | "true" | "false" + start?: number + search?: string + limit?: number + } + url: "/session" +} export type SessionListErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type SessionListError = SessionListErrors[keyof SessionListErrors]; +export type SessionListError = SessionListErrors[keyof SessionListErrors] export type SessionListResponses = { - /** - * List of sessions - */ - 200: Array; -}; + /** + * List of sessions + */ + 200: Array +} -export type SessionListResponse = SessionListResponses[keyof SessionListResponses]; +export type SessionListResponse = SessionListResponses[keyof SessionListResponses] export type SessionCreateData = { - body?: { - parentID?: string; - title?: string; - agent?: string; - model?: { - id: string; - providerID: string; - variant?: string; - }; - metadata?: { - [key: string]: unknown; - }; - permission?: PermissionRuleset; - platform?: string; - workspaceID?: string; - sandboxInheritanceToken?: string; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/session'; -}; + body?: { + parentID?: string + title?: string + agent?: string + model?: { + id: string + providerID: string + variant?: string + } + metadata?: { + [key: string]: unknown + } + permission?: PermissionRuleset + platform?: string + workspaceID?: string + sandboxInheritanceToken?: string + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/session" +} export type SessionCreateErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} -export type SessionCreateError = SessionCreateErrors[keyof SessionCreateErrors]; +export type SessionCreateError = SessionCreateErrors[keyof SessionCreateErrors] export type SessionCreateResponses = { - /** - * Successfully created session - */ - 200: Session3; -}; + /** + * Successfully created session + */ + 200: Session3 +} -export type SessionCreateResponse = SessionCreateResponses[keyof SessionCreateResponses]; +export type SessionCreateResponse = SessionCreateResponses[keyof SessionCreateResponses] export type SessionStatusData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/session/status'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/session/status" +} export type SessionStatusErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} -export type SessionStatusError = SessionStatusErrors[keyof SessionStatusErrors]; +export type SessionStatusError = SessionStatusErrors[keyof SessionStatusErrors] export type SessionStatusResponses = { - /** - * Get session status - */ - 200: { - [key: string]: SessionStatus; - }; -}; + /** + * Get session status + */ + 200: { + [key: string]: SessionStatus + } +} -export type SessionStatusResponse = SessionStatusResponses[keyof SessionStatusResponses]; +export type SessionStatusResponse = SessionStatusResponses[keyof SessionStatusResponses] export type SessionDeleteData = { - body?: never; - path: { - sessionID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/session/{sessionID}'; -}; + body?: never + path: { + sessionID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/session/{sessionID}" +} export type SessionDeleteErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * NotFoundError - */ - 404: NotFoundError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * NotFoundError + */ + 404: NotFoundError +} -export type SessionDeleteError = SessionDeleteErrors[keyof SessionDeleteErrors]; +export type SessionDeleteError = SessionDeleteErrors[keyof SessionDeleteErrors] export type SessionDeleteResponses = { - /** - * Successfully deleted session - */ - 200: boolean; -}; + /** + * Successfully deleted session + */ + 200: boolean +} -export type SessionDeleteResponse = SessionDeleteResponses[keyof SessionDeleteResponses]; +export type SessionDeleteResponse = SessionDeleteResponses[keyof SessionDeleteResponses] export type SessionGetData = { - body?: never; - path: { - sessionID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/session/{sessionID}'; -}; + body?: never + path: { + sessionID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/session/{sessionID}" +} export type SessionGetErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * NotFoundError - */ - 404: NotFoundError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * NotFoundError + */ + 404: NotFoundError +} -export type SessionGetError = SessionGetErrors[keyof SessionGetErrors]; +export type SessionGetError = SessionGetErrors[keyof SessionGetErrors] export type SessionGetResponses = { - /** - * Get session - */ - 200: Session2; -}; + /** + * Get session + */ + 200: Session2 +} -export type SessionGetResponse = SessionGetResponses[keyof SessionGetResponses]; +export type SessionGetResponse = SessionGetResponses[keyof SessionGetResponses] export type SessionUpdateData = { - body?: { - title?: string; - metadata?: { - [key: string]: unknown; - }; - permission?: PermissionRuleset; - time?: { - archived?: number; - }; - }; - path: { - sessionID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/session/{sessionID}'; -}; + body?: { + title?: string + metadata?: { + [key: string]: unknown + } + permission?: PermissionRuleset + time?: { + archived?: number + } + } + path: { + sessionID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/session/{sessionID}" +} export type SessionUpdateErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * NotFoundError - */ - 404: NotFoundError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * NotFoundError + */ + 404: NotFoundError +} -export type SessionUpdateError = SessionUpdateErrors[keyof SessionUpdateErrors]; +export type SessionUpdateError = SessionUpdateErrors[keyof SessionUpdateErrors] export type SessionUpdateResponses = { - /** - * Successfully updated session - */ - 200: Session4; -}; + /** + * Successfully updated session + */ + 200: Session4 +} -export type SessionUpdateResponse = SessionUpdateResponses[keyof SessionUpdateResponses]; +export type SessionUpdateResponse = SessionUpdateResponses[keyof SessionUpdateResponses] export type SessionChildrenData = { - body?: never; - path: { - sessionID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/session/{sessionID}/children'; -}; + body?: never + path: { + sessionID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/session/{sessionID}/children" +} export type SessionChildrenErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * NotFoundError - */ - 404: NotFoundError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * NotFoundError + */ + 404: NotFoundError +} -export type SessionChildrenError = SessionChildrenErrors[keyof SessionChildrenErrors]; +export type SessionChildrenError = SessionChildrenErrors[keyof SessionChildrenErrors] export type SessionChildrenResponses = { - /** - * List of children - */ - 200: Array; -}; + /** + * List of children + */ + 200: Array +} -export type SessionChildrenResponse = SessionChildrenResponses[keyof SessionChildrenResponses]; +export type SessionChildrenResponse = SessionChildrenResponses[keyof SessionChildrenResponses] export type SessionTodoData = { - body?: never; - path: { - sessionID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/session/{sessionID}/todo'; -}; + body?: never + path: { + sessionID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/session/{sessionID}/todo" +} export type SessionTodoErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * NotFoundError - */ - 404: NotFoundError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * NotFoundError + */ + 404: NotFoundError +} -export type SessionTodoError = SessionTodoErrors[keyof SessionTodoErrors]; +export type SessionTodoError = SessionTodoErrors[keyof SessionTodoErrors] export type SessionTodoResponses = { - /** - * Todo list - */ - 200: Array; -}; + /** + * Todo list + */ + 200: Array +} -export type SessionTodoResponse = SessionTodoResponses[keyof SessionTodoResponses]; +export type SessionTodoResponse = SessionTodoResponses[keyof SessionTodoResponses] export type SessionDiffData = { - body?: never; - path: { - sessionID: string; - }; - query?: { - directory?: string; - workspace?: string; - messageID?: string; - }; - url: '/session/{sessionID}/diff'; -}; + body?: never + path: { + sessionID: string + } + query?: { + directory?: string + workspace?: string + messageID?: string + } + url: "/session/{sessionID}/diff" +} export type SessionDiffErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type SessionDiffError = SessionDiffErrors[keyof SessionDiffErrors]; +export type SessionDiffError = SessionDiffErrors[keyof SessionDiffErrors] export type SessionDiffResponses = { - /** - * Successfully retrieved diff - */ - 200: Array; -}; + /** + * Successfully retrieved diff + */ + 200: Array +} -export type SessionDiffResponse = SessionDiffResponses[keyof SessionDiffResponses]; +export type SessionDiffResponse = SessionDiffResponses[keyof SessionDiffResponses] export type SessionMessagesData = { - body?: never; - path: { - sessionID: string; - }; - query?: { - directory?: string; - workspace?: string; - limit?: number; - before?: string; - }; - url: '/session/{sessionID}/message'; -}; + body?: never + path: { + sessionID: string + } + query?: { + directory?: string + workspace?: string + limit?: number + before?: string + } + url: "/session/{sessionID}/message" +} export type SessionMessagesErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * NotFoundError - */ - 404: NotFoundError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * NotFoundError + */ + 404: NotFoundError +} -export type SessionMessagesError = SessionMessagesErrors[keyof SessionMessagesErrors]; +export type SessionMessagesError = SessionMessagesErrors[keyof SessionMessagesErrors] export type SessionMessagesResponses = { - /** - * List of messages - */ - 200: Array<{ - info: Message; - parts: Array; - }>; -}; + /** + * List of messages + */ + 200: Array<{ + info: Message + parts: Array + }> +} -export type SessionMessagesResponse2 = SessionMessagesResponses[keyof SessionMessagesResponses]; +export type SessionMessagesResponse2 = SessionMessagesResponses[keyof SessionMessagesResponses] export type SessionPromptData = { - body?: { - messageID?: string; - model?: { - providerID: string; - modelID: string; - }; - agent?: string; - noReply?: boolean; - tools?: { - [key: string]: boolean; - }; - format?: OutputFormat; - system?: string; - variant?: string; - snapshotInitialization?: 'wait'; - editorContext?: { - directory?: string; - worktree?: string; - visibleFiles?: Array; - openTabs?: Array; - activeFile?: string; - shell?: string; - }; - parts: Array; - }; - path: { - sessionID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/session/{sessionID}/message'; -}; + body?: { + messageID?: string + model?: { + providerID: string + modelID: string + } + agent?: string + noReply?: boolean + tools?: { + [key: string]: boolean + } + format?: OutputFormat + system?: string + variant?: string + snapshotInitialization?: "wait" + editorContext?: { + directory?: string + worktree?: string + visibleFiles?: Array + openTabs?: Array + activeFile?: string + shell?: string + } + parts: Array + } + path: { + sessionID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/session/{sessionID}/message" +} export type SessionPromptErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * NotFoundError - */ - 404: NotFoundError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * NotFoundError + */ + 404: NotFoundError +} -export type SessionPromptError = SessionPromptErrors[keyof SessionPromptErrors]; +export type SessionPromptError = SessionPromptErrors[keyof SessionPromptErrors] export type SessionPromptResponses = { - /** - * Created message - */ - 200: { - info: AssistantMessage; - parts: Array; - }; -}; + /** + * Created message + */ + 200: { + info: AssistantMessage + parts: Array + } +} -export type SessionPromptResponse = SessionPromptResponses[keyof SessionPromptResponses]; +export type SessionPromptResponse = SessionPromptResponses[keyof SessionPromptResponses] export type SessionDeleteMessageData = { - body?: never; - path: { - sessionID: string; - messageID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/session/{sessionID}/message/{messageID}'; -}; + body?: never + path: { + sessionID: string + messageID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/session/{sessionID}/message/{messageID}" +} export type SessionDeleteMessageErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * NotFoundError - */ - 404: NotFoundError; - /** - * SessionBusyError - */ - 409: SessionBusyError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * NotFoundError + */ + 404: NotFoundError + /** + * SessionBusyError + */ + 409: SessionBusyError +} -export type SessionDeleteMessageError = SessionDeleteMessageErrors[keyof SessionDeleteMessageErrors]; +export type SessionDeleteMessageError = SessionDeleteMessageErrors[keyof SessionDeleteMessageErrors] export type SessionDeleteMessageResponses = { - /** - * Successfully deleted message - */ - 200: boolean; -}; + /** + * Successfully deleted message + */ + 200: boolean +} -export type SessionDeleteMessageResponse = SessionDeleteMessageResponses[keyof SessionDeleteMessageResponses]; +export type SessionDeleteMessageResponse = SessionDeleteMessageResponses[keyof SessionDeleteMessageResponses] export type SessionMessageData = { - body?: never; - path: { - sessionID: string; - messageID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/session/{sessionID}/message/{messageID}'; -}; + body?: never + path: { + sessionID: string + messageID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/session/{sessionID}/message/{messageID}" +} export type SessionMessageErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * NotFoundError - */ - 404: NotFoundError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * NotFoundError + */ + 404: NotFoundError +} -export type SessionMessageError = SessionMessageErrors[keyof SessionMessageErrors]; +export type SessionMessageError = SessionMessageErrors[keyof SessionMessageErrors] export type SessionMessageResponses = { - /** - * Message - */ - 200: { - info: Message; - parts: Array; - }; -}; + /** + * Message + */ + 200: { + info: Message + parts: Array + } +} -export type SessionMessageResponse = SessionMessageResponses[keyof SessionMessageResponses]; +export type SessionMessageResponse = SessionMessageResponses[keyof SessionMessageResponses] export type SessionForkData = { - body?: { - messageID?: string; - }; - path: { - sessionID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/session/{sessionID}/fork'; -}; + body?: { + messageID?: string + } + path: { + sessionID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/session/{sessionID}/fork" +} export type SessionForkErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * NotFoundError - */ - 404: NotFoundError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * NotFoundError + */ + 404: NotFoundError +} -export type SessionForkError = SessionForkErrors[keyof SessionForkErrors]; +export type SessionForkError = SessionForkErrors[keyof SessionForkErrors] export type SessionForkResponses = { - /** - * 200 - */ - 200: Session5; -}; + /** + * 200 + */ + 200: Session5 +} -export type SessionForkResponse = SessionForkResponses[keyof SessionForkResponses]; +export type SessionForkResponse = SessionForkResponses[keyof SessionForkResponses] export type SessionAbortData = { - body?: never; - path: { - sessionID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/session/{sessionID}/abort'; -}; + body?: never + path: { + sessionID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/session/{sessionID}/abort" +} export type SessionAbortErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} -export type SessionAbortError = SessionAbortErrors[keyof SessionAbortErrors]; +export type SessionAbortError = SessionAbortErrors[keyof SessionAbortErrors] export type SessionAbortResponses = { - /** - * Aborted session - */ - 200: boolean; -}; + /** + * Aborted session + */ + 200: boolean +} -export type SessionAbortResponse = SessionAbortResponses[keyof SessionAbortResponses]; +export type SessionAbortResponse = SessionAbortResponses[keyof SessionAbortResponses] export type SessionInitData = { - body?: { - modelID: string; - providerID: string; - messageID: string; - }; - path: { - sessionID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/session/{sessionID}/init'; -}; + body?: { + modelID: string + providerID: string + messageID: string + } + path: { + sessionID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/session/{sessionID}/init" +} export type SessionInitErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * NotFoundError - */ - 404: NotFoundError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * NotFoundError + */ + 404: NotFoundError +} -export type SessionInitError = SessionInitErrors[keyof SessionInitErrors]; +export type SessionInitError = SessionInitErrors[keyof SessionInitErrors] export type SessionInitResponses = { - /** - * 200 - */ - 200: boolean; -}; + /** + * 200 + */ + 200: boolean +} -export type SessionInitResponse = SessionInitResponses[keyof SessionInitResponses]; +export type SessionInitResponse = SessionInitResponses[keyof SessionInitResponses] export type SessionUnshareData = { - body?: never; - path: { - sessionID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/session/{sessionID}/share'; -}; + body?: never + path: { + sessionID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/session/{sessionID}/share" +} export type SessionUnshareErrors = { - /** - * Bad request - */ - 400: BadRequestError; - /** - * NotFoundError - */ - 404: NotFoundError; - /** - * InternalServerError - */ - 500: EffectHttpApiErrorInternalServerError; -}; + /** + * Bad request + */ + 400: BadRequestError + /** + * NotFoundError + */ + 404: NotFoundError + /** + * InternalServerError + */ + 500: EffectHttpApiErrorInternalServerError +} -export type SessionUnshareError = SessionUnshareErrors[keyof SessionUnshareErrors]; +export type SessionUnshareError = SessionUnshareErrors[keyof SessionUnshareErrors] export type SessionUnshareResponses = { - /** - * Successfully unshared session - */ - 200: Session7; -}; + /** + * Successfully unshared session + */ + 200: Session7 +} -export type SessionUnshareResponse = SessionUnshareResponses[keyof SessionUnshareResponses]; +export type SessionUnshareResponse = SessionUnshareResponses[keyof SessionUnshareResponses] export type SessionShareData = { - body?: never; - path: { - sessionID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/session/{sessionID}/share'; -}; + body?: never + path: { + sessionID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/session/{sessionID}/share" +} export type SessionShareErrors = { - /** - * Bad request - */ - 400: BadRequestError; - /** - * NotFoundError - */ - 404: NotFoundError; - /** - * InternalServerError - */ - 500: EffectHttpApiErrorInternalServerError; -}; + /** + * Bad request + */ + 400: BadRequestError + /** + * NotFoundError + */ + 404: NotFoundError + /** + * InternalServerError + */ + 500: EffectHttpApiErrorInternalServerError +} -export type SessionShareError = SessionShareErrors[keyof SessionShareErrors]; +export type SessionShareError = SessionShareErrors[keyof SessionShareErrors] export type SessionShareResponses = { - /** - * Successfully shared session - */ - 200: Session6; -}; + /** + * Successfully shared session + */ + 200: Session6 +} -export type SessionShareResponse = SessionShareResponses[keyof SessionShareResponses]; +export type SessionShareResponse = SessionShareResponses[keyof SessionShareResponses] export type SessionSummarizeData = { - body?: { - providerID: string; - modelID: string; - auto?: boolean; - }; - path: { - sessionID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/session/{sessionID}/summarize'; -}; + body?: { + providerID: string + modelID: string + auto?: boolean + } + path: { + sessionID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/session/{sessionID}/summarize" +} export type SessionSummarizeErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * NotFoundError - */ - 404: NotFoundError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * NotFoundError + */ + 404: NotFoundError +} -export type SessionSummarizeError = SessionSummarizeErrors[keyof SessionSummarizeErrors]; +export type SessionSummarizeError = SessionSummarizeErrors[keyof SessionSummarizeErrors] export type SessionSummarizeResponses = { - /** - * Summarized session - */ - 200: boolean; -}; + /** + * Summarized session + */ + 200: boolean +} -export type SessionSummarizeResponse = SessionSummarizeResponses[keyof SessionSummarizeResponses]; +export type SessionSummarizeResponse = SessionSummarizeResponses[keyof SessionSummarizeResponses] export type SessionPromptAsyncData = { - body?: { - messageID?: string; - model?: { - providerID: string; - modelID: string; - }; - agent?: string; - noReply?: boolean; - tools?: { - [key: string]: boolean; - }; - format?: OutputFormat; - system?: string; - variant?: string; - snapshotInitialization?: 'wait'; - editorContext?: { - directory?: string; - worktree?: string; - visibleFiles?: Array; - openTabs?: Array; - activeFile?: string; - shell?: string; - }; - parts: Array; - }; - path: { - sessionID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/session/{sessionID}/prompt_async'; -}; + body?: { + messageID?: string + model?: { + providerID: string + modelID: string + } + agent?: string + noReply?: boolean + tools?: { + [key: string]: boolean + } + format?: OutputFormat + system?: string + variant?: string + snapshotInitialization?: "wait" + editorContext?: { + directory?: string + worktree?: string + visibleFiles?: Array + openTabs?: Array + activeFile?: string + shell?: string + } + parts: Array + } + path: { + sessionID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/session/{sessionID}/prompt_async" +} export type SessionPromptAsyncErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * NotFoundError - */ - 404: NotFoundError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * NotFoundError + */ + 404: NotFoundError +} -export type SessionPromptAsyncError = SessionPromptAsyncErrors[keyof SessionPromptAsyncErrors]; +export type SessionPromptAsyncError = SessionPromptAsyncErrors[keyof SessionPromptAsyncErrors] export type SessionPromptAsyncResponses = { - /** - * Prompt accepted - */ - 204: void; -}; + /** + * Prompt accepted + */ + 204: void +} -export type SessionPromptAsyncResponse = SessionPromptAsyncResponses[keyof SessionPromptAsyncResponses]; +export type SessionPromptAsyncResponse = SessionPromptAsyncResponses[keyof SessionPromptAsyncResponses] export type SessionCommandData = { - body?: { - messageID?: string; - agent?: string; - model?: string; - arguments: string; - command: string; - variant?: string; - snapshotInitialization?: 'wait'; - parts?: Array<{ - id?: string; - type: 'file'; - mime: string; - filename?: string; - url: string; - source?: FilePartSource; - }>; - }; - path: { - sessionID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/session/{sessionID}/command'; -}; + body?: { + messageID?: string + agent?: string + model?: string + arguments: string + command: string + variant?: string + snapshotInitialization?: "wait" + parts?: Array<{ + id?: string + type: "file" + mime: string + filename?: string + url: string + source?: FilePartSource + }> + } + path: { + sessionID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/session/{sessionID}/command" +} export type SessionCommandErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * NotFoundError - */ - 404: NotFoundError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * NotFoundError + */ + 404: NotFoundError +} -export type SessionCommandError = SessionCommandErrors[keyof SessionCommandErrors]; +export type SessionCommandError = SessionCommandErrors[keyof SessionCommandErrors] export type SessionCommandResponses = { - /** - * Created message - */ - 200: { - info: AssistantMessage; - parts: Array; - }; -}; + /** + * Created message + */ + 200: { + info: AssistantMessage + parts: Array + } +} -export type SessionCommandResponse = SessionCommandResponses[keyof SessionCommandResponses]; +export type SessionCommandResponse = SessionCommandResponses[keyof SessionCommandResponses] export type SessionShellData = { - body?: { - messageID?: string; - agent: string; - model?: { - providerID: string; - modelID: string; - }; - command: string; - }; - path: { - sessionID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/session/{sessionID}/shell'; -}; + body?: { + messageID?: string + agent: string + model?: { + providerID: string + modelID: string + } + command: string + } + path: { + sessionID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/session/{sessionID}/shell" +} export type SessionShellErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * NotFoundError - */ - 404: NotFoundError; - /** - * SessionBusyError - */ - 409: SessionBusyError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * NotFoundError + */ + 404: NotFoundError + /** + * SessionBusyError + */ + 409: SessionBusyError +} -export type SessionShellError = SessionShellErrors[keyof SessionShellErrors]; +export type SessionShellError = SessionShellErrors[keyof SessionShellErrors] export type SessionShellResponses = { - /** - * Created message - */ - 200: { - info: Message; - parts: Array; - }; -}; + /** + * Created message + */ + 200: { + info: Message + parts: Array + } +} -export type SessionShellResponse = SessionShellResponses[keyof SessionShellResponses]; +export type SessionShellResponse = SessionShellResponses[keyof SessionShellResponses] export type SessionRevertData = { - body?: { - messageID: string; - partID?: string; - }; - path: { - sessionID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/session/{sessionID}/revert'; -}; + body?: { + messageID: string + partID?: string + } + path: { + sessionID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/session/{sessionID}/revert" +} export type SessionRevertErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * NotFoundError - */ - 404: NotFoundError; - /** - * SessionBusyError - */ - 409: SessionBusyError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * NotFoundError + */ + 404: NotFoundError + /** + * SessionBusyError + */ + 409: SessionBusyError +} -export type SessionRevertError = SessionRevertErrors[keyof SessionRevertErrors]; +export type SessionRevertError = SessionRevertErrors[keyof SessionRevertErrors] export type SessionRevertResponses = { - /** - * Updated session - */ - 200: Session8; -}; + /** + * Updated session + */ + 200: Session8 +} -export type SessionRevertResponse = SessionRevertResponses[keyof SessionRevertResponses]; +export type SessionRevertResponse = SessionRevertResponses[keyof SessionRevertResponses] export type SessionUnrevertData = { - body?: never; - path: { - sessionID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/session/{sessionID}/unrevert'; -}; + body?: never + path: { + sessionID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/session/{sessionID}/unrevert" +} export type SessionUnrevertErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * NotFoundError - */ - 404: NotFoundError; - /** - * SessionBusyError - */ - 409: SessionBusyError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * NotFoundError + */ + 404: NotFoundError + /** + * SessionBusyError + */ + 409: SessionBusyError +} -export type SessionUnrevertError = SessionUnrevertErrors[keyof SessionUnrevertErrors]; +export type SessionUnrevertError = SessionUnrevertErrors[keyof SessionUnrevertErrors] export type SessionUnrevertResponses = { - /** - * Updated session - */ - 200: Session9; -}; + /** + * Updated session + */ + 200: Session9 +} -export type SessionUnrevertResponse = SessionUnrevertResponses[keyof SessionUnrevertResponses]; +export type SessionUnrevertResponse = SessionUnrevertResponses[keyof SessionUnrevertResponses] export type PermissionRespondData = { - body?: { - response: 'once' | 'always' | 'reject'; - }; - path: { - sessionID: string; - permissionID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/session/{sessionID}/permissions/{permissionID}'; -}; + body?: { + response: "once" | "always" | "reject" + } + path: { + sessionID: string + permissionID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/session/{sessionID}/permissions/{permissionID}" +} export type PermissionRespondErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * NotFoundError | PermissionNotFoundError - */ - 404: NotFoundError | PermissionNotFoundError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * NotFoundError | PermissionNotFoundError + */ + 404: NotFoundError | PermissionNotFoundError +} -export type PermissionRespondError = PermissionRespondErrors[keyof PermissionRespondErrors]; +export type PermissionRespondError = PermissionRespondErrors[keyof PermissionRespondErrors] export type PermissionRespondResponses = { - /** - * Permission processed successfully - */ - 200: boolean; -}; + /** + * Permission processed successfully + */ + 200: boolean +} -export type PermissionRespondResponse = PermissionRespondResponses[keyof PermissionRespondResponses]; +export type PermissionRespondResponse = PermissionRespondResponses[keyof PermissionRespondResponses] export type PartDeleteData = { - body?: never; - path: { - sessionID: string; - messageID: string; - partID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/session/{sessionID}/message/{messageID}/part/{partID}'; -}; + body?: never + path: { + sessionID: string + messageID: string + partID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/session/{sessionID}/message/{messageID}/part/{partID}" +} export type PartDeleteErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * NotFoundError - */ - 404: NotFoundError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * NotFoundError + */ + 404: NotFoundError +} -export type PartDeleteError = PartDeleteErrors[keyof PartDeleteErrors]; +export type PartDeleteError = PartDeleteErrors[keyof PartDeleteErrors] export type PartDeleteResponses = { - /** - * Successfully deleted part - */ - 200: boolean; -}; + /** + * Successfully deleted part + */ + 200: boolean +} -export type PartDeleteResponse = PartDeleteResponses[keyof PartDeleteResponses]; +export type PartDeleteResponse = PartDeleteResponses[keyof PartDeleteResponses] export type PartUpdateData = { - body?: Part; - path: { - sessionID: string; - messageID: string; - partID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/session/{sessionID}/message/{messageID}/part/{partID}'; -}; + body?: Part + path: { + sessionID: string + messageID: string + partID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/session/{sessionID}/message/{messageID}/part/{partID}" +} export type PartUpdateErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * NotFoundError - */ - 404: NotFoundError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * NotFoundError + */ + 404: NotFoundError +} -export type PartUpdateError = PartUpdateErrors[keyof PartUpdateErrors]; +export type PartUpdateError = PartUpdateErrors[keyof PartUpdateErrors] export type PartUpdateResponses = { - /** - * Successfully updated part - */ - 200: Part; -}; + /** + * Successfully updated part + */ + 200: Part +} -export type PartUpdateResponse = PartUpdateResponses[keyof PartUpdateResponses]; +export type PartUpdateResponse = PartUpdateResponses[keyof PartUpdateResponses] export type SessionViewedData = { - body?: { - viewer: { - id: string; - active: boolean; - }; - attached: Array; - visible: Array; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/session/viewed'; -}; + body?: { + viewer: { + id: string + active: boolean + } + attached: Array + visible: Array + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/session/viewed" +} export type SessionViewedErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} -export type SessionViewedError = SessionViewedErrors[keyof SessionViewedErrors]; +export type SessionViewedError = SessionViewedErrors[keyof SessionViewedErrors] export type SessionViewedResponses = { - /** - * Viewed sessions updated - */ - 200: boolean; -}; + /** + * Viewed sessions updated + */ + 200: boolean +} -export type SessionViewedResponse = SessionViewedResponses[keyof SessionViewedResponses]; +export type SessionViewedResponse = SessionViewedResponses[keyof SessionViewedResponses] export type SyncStartData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/sync/start'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/sync/start" +} export type SyncStartErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type SyncStartError = SyncStartErrors[keyof SyncStartErrors]; +export type SyncStartError = SyncStartErrors[keyof SyncStartErrors] export type SyncStartResponses = { - /** - * Workspace sync started - */ - 200: boolean; -}; + /** + * Workspace sync started + */ + 200: boolean +} -export type SyncStartResponse = SyncStartResponses[keyof SyncStartResponses]; +export type SyncStartResponse = SyncStartResponses[keyof SyncStartResponses] export type SyncReplayData = { - body?: { - directory: string; - events: Array<{ - id: string; - aggregateID: string; - seq: number; - type: string; - data: { - [key: string]: unknown; - }; - }>; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/sync/replay'; -}; + body?: { + directory: string + events: Array<{ + id: string + aggregateID: string + seq: number + type: string + data: { + [key: string]: unknown + } + }> + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/sync/replay" +} export type SyncReplayErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} -export type SyncReplayError = SyncReplayErrors[keyof SyncReplayErrors]; +export type SyncReplayError = SyncReplayErrors[keyof SyncReplayErrors] export type SyncReplayResponses = { - /** - * Replayed sync events - */ - 200: { - sessionID: string; - }; -}; + /** + * Replayed sync events + */ + 200: { + sessionID: string + } +} -export type SyncReplayResponse = SyncReplayResponses[keyof SyncReplayResponses]; +export type SyncReplayResponse = SyncReplayResponses[keyof SyncReplayResponses] export type SyncStealData = { - body?: { - sessionID: string; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/sync/steal'; -}; + body?: { + sessionID: string + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/sync/steal" +} export type SyncStealErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} -export type SyncStealError = SyncStealErrors[keyof SyncStealErrors]; +export type SyncStealError = SyncStealErrors[keyof SyncStealErrors] export type SyncStealResponses = { - /** - * Session stolen into workspace - */ - 200: { - sessionID: string; - }; -}; + /** + * Session stolen into workspace + */ + 200: { + sessionID: string + } +} -export type SyncStealResponse = SyncStealResponses[keyof SyncStealResponses]; +export type SyncStealResponse = SyncStealResponses[keyof SyncStealResponses] export type SyncHistoryListData = { - body?: { - [key: string]: number; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/sync/history'; -}; + body?: { + [key: string]: number + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/sync/history" +} export type SyncHistoryListErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} -export type SyncHistoryListError = SyncHistoryListErrors[keyof SyncHistoryListErrors]; +export type SyncHistoryListError = SyncHistoryListErrors[keyof SyncHistoryListErrors] export type SyncHistoryListResponses = { - /** - * Sync events - */ - 200: Array<{ - id: string; - aggregate_id: string; - seq: number; - type: string; - data: { - [key: string]: unknown; - }; - }>; -}; + /** + * Sync events + */ + 200: Array<{ + id: string + aggregate_id: string + seq: number + type: string + data: { + [key: string]: unknown + } + }> +} -export type SyncHistoryListResponse = SyncHistoryListResponses[keyof SyncHistoryListResponses]; +export type SyncHistoryListResponse = SyncHistoryListResponses[keyof SyncHistoryListResponses] export type TuiAppendPromptData = { - body?: { - text: string; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/tui/append-prompt'; -}; + body?: { + text: string + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/tui/append-prompt" +} export type TuiAppendPromptErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} -export type TuiAppendPromptError = TuiAppendPromptErrors[keyof TuiAppendPromptErrors]; +export type TuiAppendPromptError = TuiAppendPromptErrors[keyof TuiAppendPromptErrors] export type TuiAppendPromptResponses = { - /** - * Prompt processed successfully - */ - 200: boolean; -}; + /** + * Prompt processed successfully + */ + 200: boolean +} -export type TuiAppendPromptResponse = TuiAppendPromptResponses[keyof TuiAppendPromptResponses]; +export type TuiAppendPromptResponse = TuiAppendPromptResponses[keyof TuiAppendPromptResponses] export type TuiOpenHelpData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/tui/open-help'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/tui/open-help" +} export type TuiOpenHelpErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type TuiOpenHelpError = TuiOpenHelpErrors[keyof TuiOpenHelpErrors]; +export type TuiOpenHelpError = TuiOpenHelpErrors[keyof TuiOpenHelpErrors] export type TuiOpenHelpResponses = { - /** - * Help dialog opened successfully - */ - 200: boolean; -}; + /** + * Help dialog opened successfully + */ + 200: boolean +} -export type TuiOpenHelpResponse = TuiOpenHelpResponses[keyof TuiOpenHelpResponses]; +export type TuiOpenHelpResponse = TuiOpenHelpResponses[keyof TuiOpenHelpResponses] export type TuiOpenSessionsData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/tui/open-sessions'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/tui/open-sessions" +} export type TuiOpenSessionsErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type TuiOpenSessionsError = TuiOpenSessionsErrors[keyof TuiOpenSessionsErrors]; +export type TuiOpenSessionsError = TuiOpenSessionsErrors[keyof TuiOpenSessionsErrors] export type TuiOpenSessionsResponses = { - /** - * Session dialog opened successfully - */ - 200: boolean; -}; + /** + * Session dialog opened successfully + */ + 200: boolean +} -export type TuiOpenSessionsResponse = TuiOpenSessionsResponses[keyof TuiOpenSessionsResponses]; +export type TuiOpenSessionsResponse = TuiOpenSessionsResponses[keyof TuiOpenSessionsResponses] export type TuiOpenThemesData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/tui/open-themes'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/tui/open-themes" +} export type TuiOpenThemesErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type TuiOpenThemesError = TuiOpenThemesErrors[keyof TuiOpenThemesErrors]; +export type TuiOpenThemesError = TuiOpenThemesErrors[keyof TuiOpenThemesErrors] export type TuiOpenThemesResponses = { - /** - * Theme dialog opened successfully - */ - 200: boolean; -}; + /** + * Theme dialog opened successfully + */ + 200: boolean +} -export type TuiOpenThemesResponse = TuiOpenThemesResponses[keyof TuiOpenThemesResponses]; +export type TuiOpenThemesResponse = TuiOpenThemesResponses[keyof TuiOpenThemesResponses] export type TuiOpenModelsData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/tui/open-models'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/tui/open-models" +} export type TuiOpenModelsErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type TuiOpenModelsError = TuiOpenModelsErrors[keyof TuiOpenModelsErrors]; +export type TuiOpenModelsError = TuiOpenModelsErrors[keyof TuiOpenModelsErrors] export type TuiOpenModelsResponses = { - /** - * Model dialog opened successfully - */ - 200: boolean; -}; + /** + * Model dialog opened successfully + */ + 200: boolean +} -export type TuiOpenModelsResponse = TuiOpenModelsResponses[keyof TuiOpenModelsResponses]; +export type TuiOpenModelsResponse = TuiOpenModelsResponses[keyof TuiOpenModelsResponses] export type TuiSubmitPromptData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/tui/submit-prompt'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/tui/submit-prompt" +} export type TuiSubmitPromptErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type TuiSubmitPromptError = TuiSubmitPromptErrors[keyof TuiSubmitPromptErrors]; +export type TuiSubmitPromptError = TuiSubmitPromptErrors[keyof TuiSubmitPromptErrors] export type TuiSubmitPromptResponses = { - /** - * Prompt submitted successfully - */ - 200: boolean; -}; + /** + * Prompt submitted successfully + */ + 200: boolean +} -export type TuiSubmitPromptResponse = TuiSubmitPromptResponses[keyof TuiSubmitPromptResponses]; +export type TuiSubmitPromptResponse = TuiSubmitPromptResponses[keyof TuiSubmitPromptResponses] export type TuiClearPromptData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/tui/clear-prompt'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/tui/clear-prompt" +} export type TuiClearPromptErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type TuiClearPromptError = TuiClearPromptErrors[keyof TuiClearPromptErrors]; +export type TuiClearPromptError = TuiClearPromptErrors[keyof TuiClearPromptErrors] export type TuiClearPromptResponses = { - /** - * Prompt cleared successfully - */ - 200: boolean; -}; + /** + * Prompt cleared successfully + */ + 200: boolean +} -export type TuiClearPromptResponse = TuiClearPromptResponses[keyof TuiClearPromptResponses]; +export type TuiClearPromptResponse = TuiClearPromptResponses[keyof TuiClearPromptResponses] export type TuiExecuteCommandData = { - body?: { - command: string; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/tui/execute-command'; -}; + body?: { + command: string + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/tui/execute-command" +} export type TuiExecuteCommandErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} -export type TuiExecuteCommandError = TuiExecuteCommandErrors[keyof TuiExecuteCommandErrors]; +export type TuiExecuteCommandError = TuiExecuteCommandErrors[keyof TuiExecuteCommandErrors] export type TuiExecuteCommandResponses = { - /** - * Command executed successfully - */ - 200: boolean; -}; + /** + * Command executed successfully + */ + 200: boolean +} -export type TuiExecuteCommandResponse = TuiExecuteCommandResponses[keyof TuiExecuteCommandResponses]; +export type TuiExecuteCommandResponse = TuiExecuteCommandResponses[keyof TuiExecuteCommandResponses] export type TuiShowToastData = { - body?: { - title?: string; - message: string; - variant: 'info' | 'success' | 'warning' | 'error'; - duration?: number; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/tui/show-toast'; -}; + body?: { + title?: string + message: string + variant: "info" | "success" | "warning" | "error" + duration?: number + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/tui/show-toast" +} export type TuiShowToastErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type TuiShowToastError = TuiShowToastErrors[keyof TuiShowToastErrors]; +export type TuiShowToastError = TuiShowToastErrors[keyof TuiShowToastErrors] export type TuiShowToastResponses = { - /** - * Toast notification shown successfully - */ - 200: boolean; -}; + /** + * Toast notification shown successfully + */ + 200: boolean +} -export type TuiShowToastResponse = TuiShowToastResponses[keyof TuiShowToastResponses]; +export type TuiShowToastResponse = TuiShowToastResponses[keyof TuiShowToastResponses] export type TuiPublishData = { - body?: EventTuiPromptAppend2 | EventTuiCommandExecute2 | EventTuiToastShow2 | EventTuiSessionSelect2; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/tui/publish'; -}; + body?: EventTuiPromptAppend2 | EventTuiCommandExecute2 | EventTuiToastShow2 | EventTuiSessionSelect2 + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/tui/publish" +} export type TuiPublishErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} -export type TuiPublishError = TuiPublishErrors[keyof TuiPublishErrors]; +export type TuiPublishError = TuiPublishErrors[keyof TuiPublishErrors] export type TuiPublishResponses = { - /** - * Event published successfully - */ - 200: boolean; -}; + /** + * Event published successfully + */ + 200: boolean +} -export type TuiPublishResponse = TuiPublishResponses[keyof TuiPublishResponses]; +export type TuiPublishResponse = TuiPublishResponses[keyof TuiPublishResponses] export type TuiSelectSessionData = { - body?: { - /** - * Session ID to navigate to - */ - sessionID: string; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/tui/select-session'; -}; + body?: { + /** + * Session ID to navigate to + */ + sessionID: string + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/tui/select-session" +} export type TuiSelectSessionErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * NotFoundError - */ - 404: NotFoundError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * NotFoundError + */ + 404: NotFoundError +} -export type TuiSelectSessionError = TuiSelectSessionErrors[keyof TuiSelectSessionErrors]; +export type TuiSelectSessionError = TuiSelectSessionErrors[keyof TuiSelectSessionErrors] export type TuiSelectSessionResponses = { - /** - * Session selected successfully - */ - 200: boolean; -}; + /** + * Session selected successfully + */ + 200: boolean +} -export type TuiSelectSessionResponse = TuiSelectSessionResponses[keyof TuiSelectSessionResponses]; +export type TuiSelectSessionResponse = TuiSelectSessionResponses[keyof TuiSelectSessionResponses] export type TuiControlNextData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/tui/control/next'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/tui/control/next" +} export type TuiControlNextErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type TuiControlNextError = TuiControlNextErrors[keyof TuiControlNextErrors]; +export type TuiControlNextError = TuiControlNextErrors[keyof TuiControlNextErrors] export type TuiControlNextResponses = { - /** - * Next TUI request - */ - 200: { - path: string; - body: unknown; - }; -}; + /** + * Next TUI request + */ + 200: { + path: string + body: unknown + } +} -export type TuiControlNextResponse = TuiControlNextResponses[keyof TuiControlNextResponses]; +export type TuiControlNextResponse = TuiControlNextResponses[keyof TuiControlNextResponses] export type TuiControlResponseData = { - body?: unknown; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/tui/control/response'; -}; + body?: unknown + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/tui/control/response" +} export type TuiControlResponseErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type TuiControlResponseError = TuiControlResponseErrors[keyof TuiControlResponseErrors]; +export type TuiControlResponseError = TuiControlResponseErrors[keyof TuiControlResponseErrors] export type TuiControlResponseResponses = { - /** - * Response submitted successfully - */ - 200: boolean; -}; + /** + * Response submitted successfully + */ + 200: boolean +} -export type TuiControlResponseResponse = TuiControlResponseResponses[keyof TuiControlResponseResponses]; +export type TuiControlResponseResponse = TuiControlResponseResponses[keyof TuiControlResponseResponses] export type ExperimentalWorkspaceAdapterListData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/experimental/workspace/adapter'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/experimental/workspace/adapter" +} export type ExperimentalWorkspaceAdapterListErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type ExperimentalWorkspaceAdapterListError = ExperimentalWorkspaceAdapterListErrors[keyof ExperimentalWorkspaceAdapterListErrors]; +export type ExperimentalWorkspaceAdapterListError = + ExperimentalWorkspaceAdapterListErrors[keyof ExperimentalWorkspaceAdapterListErrors] export type ExperimentalWorkspaceAdapterListResponses = { - /** - * Workspace adapters - */ - 200: Array<{ - type: string; - name: string; - description: string; - }>; -}; + /** + * Workspace adapters + */ + 200: Array<{ + type: string + name: string + description: string + }> +} -export type ExperimentalWorkspaceAdapterListResponse = ExperimentalWorkspaceAdapterListResponses[keyof ExperimentalWorkspaceAdapterListResponses]; +export type ExperimentalWorkspaceAdapterListResponse = + ExperimentalWorkspaceAdapterListResponses[keyof ExperimentalWorkspaceAdapterListResponses] export type ExperimentalWorkspaceListData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/experimental/workspace'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/experimental/workspace" +} export type ExperimentalWorkspaceListErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type ExperimentalWorkspaceListError = ExperimentalWorkspaceListErrors[keyof ExperimentalWorkspaceListErrors]; +export type ExperimentalWorkspaceListError = ExperimentalWorkspaceListErrors[keyof ExperimentalWorkspaceListErrors] export type ExperimentalWorkspaceListResponses = { - /** - * Workspaces - */ - 200: Array; -}; + /** + * Workspaces + */ + 200: Array +} -export type ExperimentalWorkspaceListResponse = ExperimentalWorkspaceListResponses[keyof ExperimentalWorkspaceListResponses]; +export type ExperimentalWorkspaceListResponse = + ExperimentalWorkspaceListResponses[keyof ExperimentalWorkspaceListResponses] export type ExperimentalWorkspaceCreateData = { - body?: { - id?: string; - type: string; - branch?: string | null; - extra?: unknown | null; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/experimental/workspace'; -}; + body?: { + id?: string + type: string + branch?: string | null + extra?: unknown | null + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/experimental/workspace" +} export type ExperimentalWorkspaceCreateErrors = { - /** - * WorkspaceCreateError | BadRequest | InvalidRequestError - */ - 400: WorkspaceCreateError | EffectHttpApiErrorBadRequest | InvalidRequestError; -}; + /** + * WorkspaceCreateError | BadRequest | InvalidRequestError + */ + 400: WorkspaceCreateError | EffectHttpApiErrorBadRequest | InvalidRequestError +} -export type ExperimentalWorkspaceCreateError = ExperimentalWorkspaceCreateErrors[keyof ExperimentalWorkspaceCreateErrors]; +export type ExperimentalWorkspaceCreateError = + ExperimentalWorkspaceCreateErrors[keyof ExperimentalWorkspaceCreateErrors] export type ExperimentalWorkspaceCreateResponses = { - /** - * Workspace created - */ - 200: Workspace; -}; + /** + * Workspace created + */ + 200: Workspace +} -export type ExperimentalWorkspaceCreateResponse = ExperimentalWorkspaceCreateResponses[keyof ExperimentalWorkspaceCreateResponses]; +export type ExperimentalWorkspaceCreateResponse = + ExperimentalWorkspaceCreateResponses[keyof ExperimentalWorkspaceCreateResponses] export type ExperimentalWorkspaceSyncListData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/experimental/workspace/sync-list'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/experimental/workspace/sync-list" +} export type ExperimentalWorkspaceSyncListErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type ExperimentalWorkspaceSyncListError = ExperimentalWorkspaceSyncListErrors[keyof ExperimentalWorkspaceSyncListErrors]; +export type ExperimentalWorkspaceSyncListError = + ExperimentalWorkspaceSyncListErrors[keyof ExperimentalWorkspaceSyncListErrors] export type ExperimentalWorkspaceSyncListResponses = { - /** - * Workspace list synced - */ - 204: void; -}; + /** + * Workspace list synced + */ + 204: void +} -export type ExperimentalWorkspaceSyncListResponse = ExperimentalWorkspaceSyncListResponses[keyof ExperimentalWorkspaceSyncListResponses]; +export type ExperimentalWorkspaceSyncListResponse = + ExperimentalWorkspaceSyncListResponses[keyof ExperimentalWorkspaceSyncListResponses] export type ExperimentalWorkspaceStatusData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/experimental/workspace/status'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/experimental/workspace/status" +} export type ExperimentalWorkspaceStatusErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type ExperimentalWorkspaceStatusError = ExperimentalWorkspaceStatusErrors[keyof ExperimentalWorkspaceStatusErrors]; +export type ExperimentalWorkspaceStatusError = + ExperimentalWorkspaceStatusErrors[keyof ExperimentalWorkspaceStatusErrors] export type ExperimentalWorkspaceStatusResponses = { - /** - * Workspace status - */ - 200: Array; -}; + /** + * Workspace status + */ + 200: Array +} -export type ExperimentalWorkspaceStatusResponse = ExperimentalWorkspaceStatusResponses[keyof ExperimentalWorkspaceStatusResponses]; +export type ExperimentalWorkspaceStatusResponse = + ExperimentalWorkspaceStatusResponses[keyof ExperimentalWorkspaceStatusResponses] export type ExperimentalWorkspaceRemoveData = { - body?: never; - path: { - id: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/experimental/workspace/{id}'; -}; + body?: never + path: { + id: string + } + query?: { + directory?: string + workspace?: string + } + url: "/experimental/workspace/{id}" +} export type ExperimentalWorkspaceRemoveErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} -export type ExperimentalWorkspaceRemoveError = ExperimentalWorkspaceRemoveErrors[keyof ExperimentalWorkspaceRemoveErrors]; +export type ExperimentalWorkspaceRemoveError = + ExperimentalWorkspaceRemoveErrors[keyof ExperimentalWorkspaceRemoveErrors] export type ExperimentalWorkspaceRemoveResponses = { - /** - * Workspace removed - */ - 200: Workspace; -}; + /** + * Workspace removed + */ + 200: Workspace +} -export type ExperimentalWorkspaceRemoveResponse = ExperimentalWorkspaceRemoveResponses[keyof ExperimentalWorkspaceRemoveResponses]; +export type ExperimentalWorkspaceRemoveResponse = + ExperimentalWorkspaceRemoveResponses[keyof ExperimentalWorkspaceRemoveResponses] export type ExperimentalWorkspaceWarpData = { - body?: { - id: string | null; - sessionID: string; - copyChanges?: boolean; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/experimental/workspace/warp'; -}; + body?: { + id: string | null + sessionID: string + copyChanges?: boolean + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/experimental/workspace/warp" +} export type ExperimentalWorkspaceWarpErrors = { - /** - * WorkspaceWarpError | VcsApplyError | InvalidRequestError - */ - 400: WorkspaceWarpError | VcsApplyError | InvalidRequestError; - /** - * NotFoundError - */ - 404: NotFoundError; -}; + /** + * WorkspaceWarpError | VcsApplyError | InvalidRequestError + */ + 400: WorkspaceWarpError | VcsApplyError | InvalidRequestError + /** + * NotFoundError + */ + 404: NotFoundError +} -export type ExperimentalWorkspaceWarpError = ExperimentalWorkspaceWarpErrors[keyof ExperimentalWorkspaceWarpErrors]; +export type ExperimentalWorkspaceWarpError = ExperimentalWorkspaceWarpErrors[keyof ExperimentalWorkspaceWarpErrors] export type ExperimentalWorkspaceWarpResponses = { - /** - * Session warped - */ - 204: void; -}; + /** + * Session warped + */ + 204: void +} -export type ExperimentalWorkspaceWarpResponse = ExperimentalWorkspaceWarpResponses[keyof ExperimentalWorkspaceWarpResponses]; +export type ExperimentalWorkspaceWarpResponse = + ExperimentalWorkspaceWarpResponses[keyof ExperimentalWorkspaceWarpResponses] export type AgentBuilderPreviewData = { - body?: { - id: string; - scope?: 'global' | 'project'; - description?: string; - mode?: 'primary' | 'subagent' | 'all'; - model?: string; - color?: string; - steps?: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - tools?: Array; - permission?: { - [key: string]: unknown; - }; - prompt: string; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/agent-builder/preview'; -}; + body?: { + id: string + scope?: "global" | "project" + description?: string + mode?: "primary" | "subagent" | "all" + model?: string + color?: string + steps?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + tools?: Array + permission?: { + [key: string]: unknown + } + prompt: string + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/agent-builder/preview" +} export type AgentBuilderPreviewErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} -export type AgentBuilderPreviewError = AgentBuilderPreviewErrors[keyof AgentBuilderPreviewErrors]; +export type AgentBuilderPreviewError = AgentBuilderPreviewErrors[keyof AgentBuilderPreviewErrors] export type AgentBuilderPreviewResponses = { - /** - * Agent markdown preview - */ - 200: { - id: string; - scope: 'global' | 'project'; - path: string; - markdown: string; - }; -}; + /** + * Agent markdown preview + */ + 200: { + id: string + scope: "global" | "project" + path: string + markdown: string + } +} -export type AgentBuilderPreviewResponse = AgentBuilderPreviewResponses[keyof AgentBuilderPreviewResponses]; +export type AgentBuilderPreviewResponse = AgentBuilderPreviewResponses[keyof AgentBuilderPreviewResponses] export type AgentBuilderSaveData = { - body?: { - id?: string; - scope?: 'global' | 'project'; - description?: string; - mode?: 'primary' | 'subagent' | 'all'; - model?: string; - color?: string; - steps?: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - tools?: Array; - permission?: { - [key: string]: unknown; - }; - prompt: string; - }; - path: { - id: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/agent-builder/{id}'; -}; + body?: { + id?: string + scope?: "global" | "project" + description?: string + mode?: "primary" | "subagent" | "all" + model?: string + color?: string + steps?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + tools?: Array + permission?: { + [key: string]: unknown + } + prompt: string + } + path: { + id: string + } + query?: { + directory?: string + workspace?: string + } + url: "/agent-builder/{id}" +} export type AgentBuilderSaveErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} -export type AgentBuilderSaveError = AgentBuilderSaveErrors[keyof AgentBuilderSaveErrors]; +export type AgentBuilderSaveError = AgentBuilderSaveErrors[keyof AgentBuilderSaveErrors] export type AgentBuilderSaveResponses = { - /** - * Saved agent markdown - */ - 200: { - id: string; - scope: 'global' | 'project'; - path: string; - markdown: string; - }; -}; + /** + * Saved agent markdown + */ + 200: { + id: string + scope: "global" | "project" + path: string + markdown: string + } +} -export type AgentBuilderSaveResponse = AgentBuilderSaveResponses[keyof AgentBuilderSaveResponses]; +export type AgentBuilderSaveResponse = AgentBuilderSaveResponses[keyof AgentBuilderSaveResponses] export type BackgroundProcessListData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/background-process'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/background-process" +} export type BackgroundProcessListErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type BackgroundProcessListError = BackgroundProcessListErrors[keyof BackgroundProcessListErrors]; +export type BackgroundProcessListError = BackgroundProcessListErrors[keyof BackgroundProcessListErrors] export type BackgroundProcessListResponses = { - /** - * List of background processes - */ - 200: Array; -}; + /** + * List of background processes + */ + 200: Array +} -export type BackgroundProcessListResponse = BackgroundProcessListResponses[keyof BackgroundProcessListResponses]; +export type BackgroundProcessListResponse = BackgroundProcessListResponses[keyof BackgroundProcessListResponses] export type BackgroundProcessGetData = { - body?: never; - path: { - processID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/background-process/{processID}'; -}; + body?: never + path: { + processID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/background-process/{processID}" +} export type BackgroundProcessGetErrors = { - /** - * Bad request - */ - 400: BadRequestError; - /** - * Not found - */ - 404: NotFoundError; -}; + /** + * Bad request + */ + 400: BadRequestError + /** + * Not found + */ + 404: NotFoundError +} -export type BackgroundProcessGetError = BackgroundProcessGetErrors[keyof BackgroundProcessGetErrors]; +export type BackgroundProcessGetError = BackgroundProcessGetErrors[keyof BackgroundProcessGetErrors] export type BackgroundProcessGetResponses = { - /** - * Background process info - */ - 200: BackgroundProcessInfo; -}; + /** + * Background process info + */ + 200: BackgroundProcessInfo +} -export type BackgroundProcessGetResponse = BackgroundProcessGetResponses[keyof BackgroundProcessGetResponses]; +export type BackgroundProcessGetResponse = BackgroundProcessGetResponses[keyof BackgroundProcessGetResponses] export type BackgroundProcessLogsData = { - body?: never; - path: { - processID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/background-process/{processID}/logs'; -}; + body?: never + path: { + processID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/background-process/{processID}/logs" +} export type BackgroundProcessLogsErrors = { - /** - * Bad request - */ - 400: BadRequestError; - /** - * Not found - */ - 404: NotFoundError; -}; + /** + * Bad request + */ + 400: BadRequestError + /** + * Not found + */ + 404: NotFoundError +} -export type BackgroundProcessLogsError = BackgroundProcessLogsErrors[keyof BackgroundProcessLogsErrors]; +export type BackgroundProcessLogsError = BackgroundProcessLogsErrors[keyof BackgroundProcessLogsErrors] export type BackgroundProcessLogsResponses = { - /** - * Background process logs - */ - 200: BackgroundProcessLogs; -}; + /** + * Background process logs + */ + 200: BackgroundProcessLogs +} -export type BackgroundProcessLogsResponse = BackgroundProcessLogsResponses[keyof BackgroundProcessLogsResponses]; +export type BackgroundProcessLogsResponse = BackgroundProcessLogsResponses[keyof BackgroundProcessLogsResponses] export type BackgroundProcessStopData = { - body?: never; - path: { - processID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/background-process/{processID}/stop'; -}; + body?: never + path: { + processID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/background-process/{processID}/stop" +} export type BackgroundProcessStopErrors = { - /** - * Bad request - */ - 400: BadRequestError; - /** - * Not found - */ - 404: NotFoundError; -}; + /** + * Bad request + */ + 400: BadRequestError + /** + * Not found + */ + 404: NotFoundError +} -export type BackgroundProcessStopError = BackgroundProcessStopErrors[keyof BackgroundProcessStopErrors]; +export type BackgroundProcessStopError = BackgroundProcessStopErrors[keyof BackgroundProcessStopErrors] export type BackgroundProcessStopResponses = { - /** - * Stopped background process - */ - 200: BackgroundProcessInfo; -}; + /** + * Stopped background process + */ + 200: BackgroundProcessInfo +} -export type BackgroundProcessStopResponse = BackgroundProcessStopResponses[keyof BackgroundProcessStopResponses]; +export type BackgroundProcessStopResponse = BackgroundProcessStopResponses[keyof BackgroundProcessStopResponses] export type BackgroundProcessRestartData = { - body?: never; - path: { - processID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/background-process/{processID}/restart'; -}; + body?: never + path: { + processID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/background-process/{processID}/restart" +} export type BackgroundProcessRestartErrors = { - /** - * Bad request - */ - 400: BadRequestError; - /** - * Not found - */ - 404: NotFoundError; -}; + /** + * Bad request + */ + 400: BadRequestError + /** + * Not found + */ + 404: NotFoundError +} -export type BackgroundProcessRestartError = BackgroundProcessRestartErrors[keyof BackgroundProcessRestartErrors]; +export type BackgroundProcessRestartError = BackgroundProcessRestartErrors[keyof BackgroundProcessRestartErrors] export type BackgroundProcessRestartResponses = { - /** - * Restarted background process - */ - 200: BackgroundProcessInfo; -}; + /** + * Restarted background process + */ + 200: BackgroundProcessInfo +} -export type BackgroundProcessRestartResponse = BackgroundProcessRestartResponses[keyof BackgroundProcessRestartResponses]; +export type BackgroundProcessRestartResponse = + BackgroundProcessRestartResponses[keyof BackgroundProcessRestartResponses] export type BackgroundProcessStopSessionData = { - body?: never; - path: { - sessionID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/background-process/session/{sessionID}/stop'; -}; + body?: never + path: { + sessionID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/background-process/session/{sessionID}/stop" +} export type BackgroundProcessStopSessionErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type BackgroundProcessStopSessionError = BackgroundProcessStopSessionErrors[keyof BackgroundProcessStopSessionErrors]; +export type BackgroundProcessStopSessionError = + BackgroundProcessStopSessionErrors[keyof BackgroundProcessStopSessionErrors] export type BackgroundProcessStopSessionResponses = { - /** - * Stopped session background processes - */ - 200: boolean; -}; + /** + * Stopped session background processes + */ + 200: boolean +} -export type BackgroundProcessStopSessionResponse = BackgroundProcessStopSessionResponses[keyof BackgroundProcessStopSessionResponses]; +export type BackgroundProcessStopSessionResponse = + BackgroundProcessStopSessionResponses[keyof BackgroundProcessStopSessionResponses] export type BranchNameGenerateData = { - body?: { - prompt: string; - providerID?: string; - modelID?: string; - }; - path: { - sessionID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/session/{sessionID}/branch-name'; -}; + body?: { + prompt: string + providerID?: string + modelID?: string + } + path: { + sessionID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/session/{sessionID}/branch-name" +} export type BranchNameGenerateErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type BranchNameGenerateError = BranchNameGenerateErrors[keyof BranchNameGenerateErrors]; +export type BranchNameGenerateError = BranchNameGenerateErrors[keyof BranchNameGenerateErrors] export type BranchNameGenerateResponses = { - /** - * Generated branch name or null when the task is not clear yet - */ - 200: { - branch: string | null; - }; -}; + /** + * Generated branch name or null when the task is not clear yet + */ + 200: { + branch: string | null + } +} -export type BranchNameGenerateResponse = BranchNameGenerateResponses[keyof BranchNameGenerateResponses]; +export type BranchNameGenerateResponse = BranchNameGenerateResponses[keyof BranchNameGenerateResponses] export type CommitMessageGenerateData = { - body?: { - /** - * Workspace/repo path - */ - path: string; - selectedFiles?: Array; - previousMessage?: string; - language?: string; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/commit-message'; -}; + body?: { + /** + * Workspace/repo path + */ + path: string + selectedFiles?: Array + previousMessage?: string + language?: string + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/commit-message" +} export type CommitMessageGenerateErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * CommitMessageNoChangesError - */ - 422: CommitMessageNoChangesError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * CommitMessageNoChangesError + */ + 422: CommitMessageNoChangesError +} -export type CommitMessageGenerateError = CommitMessageGenerateErrors[keyof CommitMessageGenerateErrors]; +export type CommitMessageGenerateError = CommitMessageGenerateErrors[keyof CommitMessageGenerateErrors] export type CommitMessageGenerateResponses = { - /** - * Generated commit message - */ - 200: { - message: string; - }; -}; + /** + * Generated commit message + */ + 200: { + message: string + } +} -export type CommitMessageGenerateResponse = CommitMessageGenerateResponses[keyof CommitMessageGenerateResponses]; +export type CommitMessageGenerateResponse = CommitMessageGenerateResponses[keyof CommitMessageGenerateResponses] export type ConfigOverlayData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - scope?: 'global' | 'project'; - }; - url: '/config/overlay'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + scope?: "global" | "project" + } + url: "/config/overlay" +} export type ConfigOverlayErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type ConfigOverlayError = ConfigOverlayErrors[keyof ConfigOverlayErrors]; +export type ConfigOverlayError = ConfigOverlayErrors[keyof ConfigOverlayErrors] export type ConfigOverlayResponses = { - /** - * Resolved config overlay - */ - 200: ConfigOverlayResponse; -}; + /** + * Resolved config overlay + */ + 200: ConfigOverlayResponse +} -export type ConfigOverlayResponse2 = ConfigOverlayResponses[keyof ConfigOverlayResponses]; +export type ConfigOverlayResponse2 = ConfigOverlayResponses[keyof ConfigOverlayResponses] export type ConfigOverlayUpdateData = { - body?: { - scope?: 'global' | 'project'; - set?: { - [key: string]: unknown; - }; - unset?: Array>; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/config/overlay'; -}; + body?: { + scope?: "global" | "project" + set?: { + [key: string]: unknown + } + unset?: Array> + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/config/overlay" +} export type ConfigOverlayUpdateErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type ConfigOverlayUpdateError = ConfigOverlayUpdateErrors[keyof ConfigOverlayUpdateErrors]; +export type ConfigOverlayUpdateError = ConfigOverlayUpdateErrors[keyof ConfigOverlayUpdateErrors] export type ConfigOverlayUpdateResponses = { - /** - * Effective configuration after patch - */ - 200: Config; -}; + /** + * Effective configuration after patch + */ + 200: Config +} -export type ConfigOverlayUpdateResponse = ConfigOverlayUpdateResponses[keyof ConfigOverlayUpdateResponses]; +export type ConfigOverlayUpdateResponse = ConfigOverlayUpdateResponses[keyof ConfigOverlayUpdateResponses] export type ConfigSourcesData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/config/sources'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/config/sources" +} export type ConfigSourcesErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type ConfigSourcesError = ConfigSourcesErrors[keyof ConfigSourcesErrors]; +export type ConfigSourcesError = ConfigSourcesErrors[keyof ConfigSourcesErrors] export type ConfigSourcesResponses = { - /** - * Config source inventory - */ - 200: ConfigSourcesResponse; -}; + /** + * Config source inventory + */ + 200: ConfigSourcesResponse +} -export type ConfigSourcesResponse2 = ConfigSourcesResponses[keyof ConfigSourcesResponses]; +export type ConfigSourcesResponse2 = ConfigSourcesResponses[keyof ConfigSourcesResponses] export type ConfigEffectiveData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/config/effective'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/config/effective" +} export type ConfigEffectiveErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type ConfigEffectiveError = ConfigEffectiveErrors[keyof ConfigEffectiveErrors]; +export type ConfigEffectiveError = ConfigEffectiveErrors[keyof ConfigEffectiveErrors] export type ConfigEffectiveResponses = { - /** - * Effective config info - */ - 200: Config; -}; + /** + * Effective config info + */ + 200: Config +} -export type ConfigEffectiveResponse = ConfigEffectiveResponses[keyof ConfigEffectiveResponses]; +export type ConfigEffectiveResponse = ConfigEffectiveResponses[keyof ConfigEffectiveResponses] export type ConfigRulesData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - scope?: 'project'; - }; - url: '/config/rules'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + scope?: "project" + } + url: "/config/rules" +} export type ConfigRulesErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type ConfigRulesError = ConfigRulesErrors[keyof ConfigRulesErrors]; +export type ConfigRulesError = ConfigRulesErrors[keyof ConfigRulesErrors] export type ConfigRulesResponses = { - /** - * Project rules - */ - 200: ConfigRulesResponse; -}; + /** + * Project rules + */ + 200: ConfigRulesResponse +} -export type ConfigRulesResponse2 = ConfigRulesResponses[keyof ConfigRulesResponses]; +export type ConfigRulesResponse2 = ConfigRulesResponses[keyof ConfigRulesResponses] export type ConfigRulesUpdateData = { - body?: { - scope?: 'project'; - content: string; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/config/rules'; -}; + body?: { + scope?: "project" + content: string + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/config/rules" +} export type ConfigRulesUpdateErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type ConfigRulesUpdateError = ConfigRulesUpdateErrors[keyof ConfigRulesUpdateErrors]; +export type ConfigRulesUpdateError = ConfigRulesUpdateErrors[keyof ConfigRulesUpdateErrors] export type ConfigRulesUpdateResponses = { - /** - * Project rules after update - */ - 200: ConfigRulesResponse; -}; + /** + * Project rules after update + */ + 200: ConfigRulesResponse +} -export type ConfigRulesUpdateResponse = ConfigRulesUpdateResponses[keyof ConfigRulesUpdateResponses]; +export type ConfigRulesUpdateResponse = ConfigRulesUpdateResponses[keyof ConfigRulesUpdateResponses] export type ConfigModelStateData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/config/model-state'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/config/model-state" +} export type ConfigModelStateErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type ConfigModelStateError = ConfigModelStateErrors[keyof ConfigModelStateErrors]; +export type ConfigModelStateError = ConfigModelStateErrors[keyof ConfigModelStateErrors] export type ConfigModelStateResponses = { - /** - * Model state - */ - 200: ConfigModelStateResponse; -}; + /** + * Model state + */ + 200: ConfigModelStateResponse +} -export type ConfigModelStateResponse2 = ConfigModelStateResponses[keyof ConfigModelStateResponses]; +export type ConfigModelStateResponse2 = ConfigModelStateResponses[keyof ConfigModelStateResponses] export type ConfigModelStateUpdateData = { - body?: { - favorite?: Array<{ - providerID: string; - modelID: string; - }>; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/config/model-state'; -}; + body?: { + favorite?: Array<{ + providerID: string + modelID: string + }> + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/config/model-state" +} export type ConfigModelStateUpdateErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type ConfigModelStateUpdateError = ConfigModelStateUpdateErrors[keyof ConfigModelStateUpdateErrors]; +export type ConfigModelStateUpdateError = ConfigModelStateUpdateErrors[keyof ConfigModelStateUpdateErrors] export type ConfigModelStateUpdateResponses = { - /** - * Updated model state - */ - 200: ConfigModelStateResponse; -}; + /** + * Updated model state + */ + 200: ConfigModelStateResponse +} -export type ConfigModelStateUpdateResponse = ConfigModelStateUpdateResponses[keyof ConfigModelStateUpdateResponses]; +export type ConfigModelStateUpdateResponse = ConfigModelStateUpdateResponses[keyof ConfigModelStateUpdateResponses] export type TuiConfigGetData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/tui/config'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/tui/config" +} export type TuiConfigGetErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type TuiConfigGetError = TuiConfigGetErrors[keyof TuiConfigGetErrors]; +export type TuiConfigGetError = TuiConfigGetErrors[keyof TuiConfigGetErrors] export type TuiConfigGetResponses = { - /** - * Effective TUI configuration - */ - 200: TuiConfigGetResponse; -}; + /** + * Effective TUI configuration + */ + 200: TuiConfigGetResponse +} -export type TuiConfigGetResponse2 = TuiConfigGetResponses[keyof TuiConfigGetResponses]; +export type TuiConfigGetResponse2 = TuiConfigGetResponses[keyof TuiConfigGetResponses] export type TuiConfigUpdateData = { - body?: { - $schema?: string; - theme?: string; - keybinds?: { - [key: string]: string; - }; - plugin?: Array; - plugin_enabled?: { - [key: string]: boolean; - }; - /** - * Status icon style shown in terminal titles - */ - title_icon?: 'none' | 'unicode' | 'emojis'; - scroll_speed?: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - scroll_acceleration?: { - enabled: boolean; - }; - diff_style?: 'auto' | 'stacked'; - mouse?: boolean; - attention?: { - enabled?: boolean; - notifications?: boolean; - sound?: boolean; - volume?: number | 'NaN' | 'Infinity' | '-Infinity' | 'Infinity' | '-Infinity' | 'NaN'; - }; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - scope?: 'project' | 'global'; - }; - url: '/tui/config'; -}; + body?: { + $schema?: string + theme?: string + keybinds?: { + [key: string]: string + } + plugin?: Array< + | string + | [ + string, + { + [key: string]: unknown + }, + ] + > + plugin_enabled?: { + [key: string]: boolean + } + /** + * Status icon style shown in terminal titles + */ + title_icon?: "none" | "unicode" | "emojis" + scroll_speed?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + scroll_acceleration?: { + enabled: boolean + } + diff_style?: "auto" | "stacked" + mouse?: boolean + attention?: { + enabled?: boolean + notifications?: boolean + sound?: boolean + volume?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" + } + } + path?: never + query?: { + directory?: string + workspace?: string + scope?: "project" | "global" + } + url: "/tui/config" +} export type TuiConfigUpdateErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} -export type TuiConfigUpdateError = TuiConfigUpdateErrors[keyof TuiConfigUpdateErrors]; +export type TuiConfigUpdateError = TuiConfigUpdateErrors[keyof TuiConfigUpdateErrors] export type TuiConfigUpdateResponses = { - /** - * Effective TUI configuration after the update - */ - 200: TuiConfigGetResponse; -}; + /** + * Effective TUI configuration after the update + */ + 200: TuiConfigGetResponse +} -export type TuiConfigUpdateResponse = TuiConfigUpdateResponses[keyof TuiConfigUpdateResponses]; +export type TuiConfigUpdateResponse = TuiConfigUpdateResponses[keyof TuiConfigUpdateResponses] export type TuiKeybindListData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/tui/keybinds'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/tui/keybinds" +} export type TuiKeybindListErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type TuiKeybindListError = TuiKeybindListErrors[keyof TuiKeybindListErrors]; +export type TuiKeybindListError = TuiKeybindListErrors[keyof TuiKeybindListErrors] export type TuiKeybindListResponses = { - /** - * TUI keybind metadata - */ - 200: TuiKeybindListResponse; -}; + /** + * TUI keybind metadata + */ + 200: TuiKeybindListResponse +} -export type TuiKeybindListResponse2 = TuiKeybindListResponses[keyof TuiKeybindListResponses]; +export type TuiKeybindListResponse2 = TuiKeybindListResponses[keyof TuiKeybindListResponses] export type EnhancePromptEnhanceData = { - body?: { - /** - * The user's draft prompt to enhance - */ - text: string; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/enhance-prompt'; -}; + body?: { + /** + * The user's draft prompt to enhance + */ + text: string + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/enhance-prompt" +} export type EnhancePromptEnhanceErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} -export type EnhancePromptEnhanceError = EnhancePromptEnhanceErrors[keyof EnhancePromptEnhanceErrors]; +export type EnhancePromptEnhanceError = EnhancePromptEnhanceErrors[keyof EnhancePromptEnhanceErrors] export type EnhancePromptEnhanceResponses = { - /** - * Enhanced prompt text - */ - 200: { - text: string; - }; -}; + /** + * Enhanced prompt text + */ + 200: { + text: string + } +} -export type EnhancePromptEnhanceResponse = EnhancePromptEnhanceResponses[keyof EnhancePromptEnhanceResponses]; +export type EnhancePromptEnhanceResponse = EnhancePromptEnhanceResponses[keyof EnhancePromptEnhanceResponses] export type IndexingStatusData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/indexing/status'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/indexing/status" +} export type IndexingStatusErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type IndexingStatusError = IndexingStatusErrors[keyof IndexingStatusErrors]; +export type IndexingStatusError = IndexingStatusErrors[keyof IndexingStatusErrors] export type IndexingStatusResponses = { - /** - * Indexing status - */ - 200: IndexingStatus; -}; + /** + * Indexing status + */ + 200: IndexingStatus +} -export type IndexingStatusResponse = IndexingStatusResponses[keyof IndexingStatusResponses]; +export type IndexingStatusResponse = IndexingStatusResponses[keyof IndexingStatusResponses] export type IndexingWarningsData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/indexing/warnings'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/indexing/warnings" +} export type IndexingWarningsErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type IndexingWarningsError = IndexingWarningsErrors[keyof IndexingWarningsErrors]; +export type IndexingWarningsError = IndexingWarningsErrors[keyof IndexingWarningsErrors] export type IndexingWarningsResponses = { - /** - * Indexing warnings - */ - 200: Array; -}; + /** + * Indexing warnings + */ + 200: Array +} -export type IndexingWarningsResponse = IndexingWarningsResponses[keyof IndexingWarningsResponses]; +export type IndexingWarningsResponse = IndexingWarningsResponses[keyof IndexingWarningsResponses] export type IndexingModelsData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/indexing/models'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/indexing/models" +} export type IndexingModelsErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type IndexingModelsError = IndexingModelsErrors[keyof IndexingModelsErrors]; +export type IndexingModelsError = IndexingModelsErrors[keyof IndexingModelsErrors] export type IndexingModelsResponses = { - /** - * Kilo embedding model catalog - */ - 200: KiloEmbeddingModelCatalog; -}; + /** + * Kilo embedding model catalog + */ + 200: KiloEmbeddingModelCatalog +} -export type IndexingModelsResponse = IndexingModelsResponses[keyof IndexingModelsResponses]; +export type IndexingModelsResponse = IndexingModelsResponses[keyof IndexingModelsResponses] export type InstanceReloadData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/instance/reload'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/instance/reload" +} export type InstanceReloadErrors = { - /** - * Bad request - */ - 400: BadRequestError; - /** - * ConflictError - */ - 409: ConflictError; -}; + /** + * Bad request + */ + 400: BadRequestError + /** + * ConflictError + */ + 409: ConflictError +} -export type InstanceReloadError = InstanceReloadErrors[keyof InstanceReloadErrors]; +export type InstanceReloadError = InstanceReloadErrors[keyof InstanceReloadErrors] export type InstanceReloadResponses = { - /** - * Instance reloaded - */ - 200: boolean; -}; + /** + * Instance reloaded + */ + 200: boolean +} -export type InstanceReloadResponse = InstanceReloadResponses[keyof InstanceReloadResponses]; +export type InstanceReloadResponse = InstanceReloadResponses[keyof InstanceReloadResponses] export type InteractiveTerminalListData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/interactive-terminal'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/interactive-terminal" +} export type InteractiveTerminalListErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type InteractiveTerminalListError = InteractiveTerminalListErrors[keyof InteractiveTerminalListErrors]; +export type InteractiveTerminalListError = InteractiveTerminalListErrors[keyof InteractiveTerminalListErrors] export type InteractiveTerminalListResponses = { - /** - * List of interactive terminals - */ - 200: Array; -}; + /** + * List of interactive terminals + */ + 200: Array +} -export type InteractiveTerminalListResponse = InteractiveTerminalListResponses[keyof InteractiveTerminalListResponses]; +export type InteractiveTerminalListResponse = InteractiveTerminalListResponses[keyof InteractiveTerminalListResponses] export type InteractiveTerminalGetData = { - body?: never; - path: { - terminalID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/interactive-terminal/{terminalID}'; -}; + body?: never + path: { + terminalID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/interactive-terminal/{terminalID}" +} export type InteractiveTerminalGetErrors = { - /** - * Bad request - */ - 400: BadRequestError; - /** - * Not found - */ - 404: NotFoundError; -}; + /** + * Bad request + */ + 400: BadRequestError + /** + * Not found + */ + 404: NotFoundError +} -export type InteractiveTerminalGetError = InteractiveTerminalGetErrors[keyof InteractiveTerminalGetErrors]; +export type InteractiveTerminalGetError = InteractiveTerminalGetErrors[keyof InteractiveTerminalGetErrors] export type InteractiveTerminalGetResponses = { - /** - * Interactive terminal snapshot - */ - 200: InteractiveTerminalSnapshot; -}; + /** + * Interactive terminal snapshot + */ + 200: InteractiveTerminalSnapshot +} -export type InteractiveTerminalGetResponse = InteractiveTerminalGetResponses[keyof InteractiveTerminalGetResponses]; +export type InteractiveTerminalGetResponse = InteractiveTerminalGetResponses[keyof InteractiveTerminalGetResponses] export type InteractiveTerminalWriteData = { - body?: InteractiveTerminalWriteInput; - path: { - terminalID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/interactive-terminal/{terminalID}/input'; -}; + body?: InteractiveTerminalWriteInput + path: { + terminalID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/interactive-terminal/{terminalID}/input" +} export type InteractiveTerminalWriteErrors = { - /** - * Bad request - */ - 400: BadRequestError; - /** - * Not found - */ - 404: NotFoundError; -}; + /** + * Bad request + */ + 400: BadRequestError + /** + * Not found + */ + 404: NotFoundError +} -export type InteractiveTerminalWriteError = InteractiveTerminalWriteErrors[keyof InteractiveTerminalWriteErrors]; +export type InteractiveTerminalWriteError = InteractiveTerminalWriteErrors[keyof InteractiveTerminalWriteErrors] export type InteractiveTerminalWriteResponses = { - /** - * Input written - */ - 200: boolean; -}; + /** + * Input written + */ + 200: boolean +} -export type InteractiveTerminalWriteResponse = InteractiveTerminalWriteResponses[keyof InteractiveTerminalWriteResponses]; +export type InteractiveTerminalWriteResponse = + InteractiveTerminalWriteResponses[keyof InteractiveTerminalWriteResponses] export type InteractiveTerminalResizeData = { - body?: InteractiveTerminalResizeInput; - path: { - terminalID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/interactive-terminal/{terminalID}/resize'; -}; + body?: InteractiveTerminalResizeInput + path: { + terminalID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/interactive-terminal/{terminalID}/resize" +} export type InteractiveTerminalResizeErrors = { - /** - * Bad request - */ - 400: BadRequestError; - /** - * Not found - */ - 404: NotFoundError; -}; + /** + * Bad request + */ + 400: BadRequestError + /** + * Not found + */ + 404: NotFoundError +} -export type InteractiveTerminalResizeError = InteractiveTerminalResizeErrors[keyof InteractiveTerminalResizeErrors]; +export type InteractiveTerminalResizeError = InteractiveTerminalResizeErrors[keyof InteractiveTerminalResizeErrors] export type InteractiveTerminalResizeResponses = { - /** - * Terminal resized - */ - 200: boolean; -}; + /** + * Terminal resized + */ + 200: boolean +} -export type InteractiveTerminalResizeResponse = InteractiveTerminalResizeResponses[keyof InteractiveTerminalResizeResponses]; +export type InteractiveTerminalResizeResponse = + InteractiveTerminalResizeResponses[keyof InteractiveTerminalResizeResponses] export type InteractiveTerminalCloseData = { - body?: never; - path: { - terminalID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/interactive-terminal/{terminalID}/close'; -}; + body?: never + path: { + terminalID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/interactive-terminal/{terminalID}/close" +} export type InteractiveTerminalCloseErrors = { - /** - * Bad request - */ - 400: BadRequestError; - /** - * Not found - */ - 404: NotFoundError; -}; + /** + * Bad request + */ + 400: BadRequestError + /** + * Not found + */ + 404: NotFoundError +} -export type InteractiveTerminalCloseError = InteractiveTerminalCloseErrors[keyof InteractiveTerminalCloseErrors]; +export type InteractiveTerminalCloseError = InteractiveTerminalCloseErrors[keyof InteractiveTerminalCloseErrors] export type InteractiveTerminalCloseResponses = { - /** - * Terminal closed - */ - 200: boolean; -}; + /** + * Terminal closed + */ + 200: boolean +} -export type InteractiveTerminalCloseResponse = InteractiveTerminalCloseResponses[keyof InteractiveTerminalCloseResponses]; +export type InteractiveTerminalCloseResponse = + InteractiveTerminalCloseResponses[keyof InteractiveTerminalCloseResponses] export type KiloProfileData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/kilo/profile'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/kilo/profile" +} export type KiloProfileErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} -export type KiloProfileError = KiloProfileErrors[keyof KiloProfileErrors]; +export type KiloProfileError = KiloProfileErrors[keyof KiloProfileErrors] export type KiloProfileResponses = { - /** - * Profile data - */ - 200: { - profile: { - email: string; - name?: string; - organizations?: Array<{ - id: string; - name: string; - role: string; - }>; - selectedOrganizationId?: string; - hasPersonalAccount?: boolean; - }; - balance: { - balance: number; - } | null; - kiloPass: { - currentPeriodBaseCreditsUsd: number; - currentPeriodUsageUsd: number; - currentPeriodBonusCreditsUsd: number; - nextBillingAt?: string | null; - } | null; - currentOrgId: string | null; - }; -}; + /** + * Profile data + */ + 200: { + profile: { + email: string + name?: string + organizations?: Array<{ + id: string + name: string + role: string + }> + selectedOrganizationId?: string + hasPersonalAccount?: boolean + } + balance: { + balance: number + } | null + kiloPass: { + currentPeriodBaseCreditsUsd: number + currentPeriodUsageUsd: number + currentPeriodBonusCreditsUsd: number + nextBillingAt?: string | null + } | null + currentOrgId: string | null + } +} -export type KiloProfileResponse = KiloProfileResponses[keyof KiloProfileResponses]; +export type KiloProfileResponse = KiloProfileResponses[keyof KiloProfileResponses] export type KiloAuthStatusData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/kilo/auth-status'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/kilo/auth-status" +} export type KiloAuthStatusErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} -export type KiloAuthStatusError = KiloAuthStatusErrors[keyof KiloAuthStatusErrors]; +export type KiloAuthStatusError = KiloAuthStatusErrors[keyof KiloAuthStatusErrors] export type KiloAuthStatusResponses = { - /** - * Kilo authentication status - */ - 200: { - authenticated: boolean; - type?: 'api' | 'oauth'; - }; -}; + /** + * Kilo authentication status + */ + 200: { + authenticated: boolean + type?: "api" | "oauth" + } +} -export type KiloAuthStatusResponse = KiloAuthStatusResponses[keyof KiloAuthStatusResponses]; +export type KiloAuthStatusResponse = KiloAuthStatusResponses[keyof KiloAuthStatusResponses] export type KiloModesData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/kilo/modes'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/kilo/modes" +} export type KiloModesErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type KiloModesError = KiloModesErrors[keyof KiloModesErrors]; +export type KiloModesError = KiloModesErrors[keyof KiloModesErrors] export type KiloModesResponses = { - /** - * Organization modes list - */ - 200: { - modes: Array<{ - id: string; - organization_id: string; - name: string; - slug: string; - created_by: string; - created_at: string; - updated_at: string; - config: { - roleDefinition?: string; - whenToUse?: string; - description?: string; - customInstructions?: string; - groups?: Array; - }; - }>; - }; -}; + /** + * Organization modes list + */ + 200: { + modes: Array<{ + id: string + organization_id: string + name: string + slug: string + created_by: string + created_at: string + updated_at: string + config: { + roleDefinition?: string + whenToUse?: string + description?: string + customInstructions?: string + groups?: Array< + | string + | [ + string, + { + fileRegex?: string | null + description?: string | null + }, + ] + > + } + }> + } +} -export type KiloModesResponse = KiloModesResponses[keyof KiloModesResponses]; +export type KiloModesResponse = KiloModesResponses[keyof KiloModesResponses] export type KiloFimData = { - body?: { - prefix: string; - suffix: string; - provider?: string; - model?: string; - maxTokens?: number; - temperature?: number; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/kilo/fim'; -}; + body?: { + prefix: string + suffix: string + provider?: string + model?: string + maxTokens?: number + temperature?: number + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/kilo/fim" +} export type KiloFimErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} -export type KiloFimError = KiloFimErrors[keyof KiloFimErrors]; +export type KiloFimError = KiloFimErrors[keyof KiloFimErrors] export type KiloFimResponses = { - /** - * Streaming FIM completion response - */ - 200: { - choices?: Array<{ - delta?: { - content?: string; - }; - text?: string; - }>; - usage?: { - prompt_tokens?: number; - completion_tokens?: number; - }; - cost?: number; - }; -}; + /** + * Streaming FIM completion response + */ + 200: { + choices?: Array<{ + delta?: { + content?: string + } + text?: string + }> + usage?: { + prompt_tokens?: number + completion_tokens?: number + } + cost?: number + } +} -export type KiloFimResponse = KiloFimResponses[keyof KiloFimResponses]; +export type KiloFimResponse = KiloFimResponses[keyof KiloFimResponses] export type KiloEditData = { - body?: { - provider?: string; - model?: string; - maxTokens?: number; - currentFilePath: string; - currentFileContent: string; - cursorLine: number; - cursorCharacter: number; - editableRegionStartLine: number; - editableRegionEndLine: number; - recentlyViewedSnippets: Array<{ - filepath: string; - content: string; - }>; - editDiffHistory: Array; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/kilo/edit'; -}; + body?: { + provider?: string + model?: string + maxTokens?: number + currentFilePath: string + currentFileContent: string + cursorLine: number + cursorCharacter: number + editableRegionStartLine: number + editableRegionEndLine: number + recentlyViewedSnippets: Array<{ + filepath: string + content: string + }> + editDiffHistory: Array + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/kilo/edit" +} export type KiloEditErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} -export type KiloEditError = KiloEditErrors[keyof KiloEditErrors]; +export type KiloEditError = KiloEditErrors[keyof KiloEditErrors] export type KiloEditResponses = { - /** - * Next Edit completion - */ - 200: { - content: string; - usage?: { - prompt_tokens?: number; - completion_tokens?: number; - }; - }; -}; + /** + * Next Edit completion + */ + 200: { + content: string + usage?: { + prompt_tokens?: number + completion_tokens?: number + } + } +} -export type KiloEditResponse = KiloEditResponses[keyof KiloEditResponses]; +export type KiloEditResponse = KiloEditResponses[keyof KiloEditResponses] export type KiloAudioTranscriptionsData = { - body?: { - model: string; - input_audio: { - data: string; - format: string; - }; - language?: string; - prompt?: string; - temperature?: number; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/kilo/audio/transcriptions'; -}; + body?: { + model: string + input_audio: { + data: string + format: string + } + language?: string + prompt?: string + temperature?: number + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/kilo/audio/transcriptions" +} export type KiloAudioTranscriptionsErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} -export type KiloAudioTranscriptionsError = KiloAudioTranscriptionsErrors[keyof KiloAudioTranscriptionsErrors]; +export type KiloAudioTranscriptionsError = KiloAudioTranscriptionsErrors[keyof KiloAudioTranscriptionsErrors] export type KiloAudioTranscriptionsResponses = { - /** - * Transcription response - */ - 200: { - text: string; - usage?: unknown; - }; -}; + /** + * Transcription response + */ + 200: { + text: string + usage?: unknown + } +} -export type KiloAudioTranscriptionsResponse = KiloAudioTranscriptionsResponses[keyof KiloAudioTranscriptionsResponses]; +export type KiloAudioTranscriptionsResponse = KiloAudioTranscriptionsResponses[keyof KiloAudioTranscriptionsResponses] export type KiloModelsImagesData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/kilo/models/images'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/kilo/models/images" +} export type KiloModelsImagesErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} -export type KiloModelsImagesError = KiloModelsImagesErrors[keyof KiloModelsImagesErrors]; +export type KiloModelsImagesError = KiloModelsImagesErrors[keyof KiloModelsImagesErrors] export type KiloModelsImagesResponses = { - /** - * Image-capable model list - */ - 200: Array<{ - id: string; - name: string; - description?: string; - }>; -}; + /** + * Image-capable model list + */ + 200: Array<{ + id: string + name: string + description?: string + }> +} -export type KiloModelsImagesResponse = KiloModelsImagesResponses[keyof KiloModelsImagesResponses]; +export type KiloModelsImagesResponse = KiloModelsImagesResponses[keyof KiloModelsImagesResponses] export type KiloNotificationsData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/kilo/notifications'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/kilo/notifications" +} export type KiloNotificationsErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} -export type KiloNotificationsError = KiloNotificationsErrors[keyof KiloNotificationsErrors]; +export type KiloNotificationsError = KiloNotificationsErrors[keyof KiloNotificationsErrors] export type KiloNotificationsResponses = { - /** - * Notifications list - */ - 200: Array<{ - id: string; - title: string; - message: string; - action?: { - actionText: string; - actionURL: string; - }; - showIn?: Array; - suggestModelId?: string; - }>; -}; + /** + * Notifications list + */ + 200: Array<{ + id: string + title: string + message: string + action?: { + actionText: string + actionURL: string + } + showIn?: Array + suggestModelId?: string + }> +} -export type KiloNotificationsResponse = KiloNotificationsResponses[keyof KiloNotificationsResponses]; +export type KiloNotificationsResponse = KiloNotificationsResponses[keyof KiloNotificationsResponses] export type KiloOrganizationSetData = { - body?: { - organizationId: string | null; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/kilo/organization'; -}; + body?: { + organizationId: string | null + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/kilo/organization" +} export type KiloOrganizationSetErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} -export type KiloOrganizationSetError = KiloOrganizationSetErrors[keyof KiloOrganizationSetErrors]; +export type KiloOrganizationSetError = KiloOrganizationSetErrors[keyof KiloOrganizationSetErrors] export type KiloOrganizationSetResponses = { - /** - * Organization updated successfully - */ - 200: boolean; -}; + /** + * Organization updated successfully + */ + 200: boolean +} -export type KiloOrganizationSetResponse = KiloOrganizationSetResponses[keyof KiloOrganizationSetResponses]; +export type KiloOrganizationSetResponse = KiloOrganizationSetResponses[keyof KiloOrganizationSetResponses] export type KiloClawStatusData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/kilo/claw/status'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/kilo/claw/status" +} export type KiloClawStatusErrors = { - /** - * Bad request - */ - 400: BadRequestError; - /** - * ServiceUnavailable - */ - 503: EffectHttpApiErrorServiceUnavailable; -}; + /** + * Bad request + */ + 400: BadRequestError + /** + * ServiceUnavailable + */ + 503: EffectHttpApiErrorServiceUnavailable +} -export type KiloClawStatusError = KiloClawStatusErrors[keyof KiloClawStatusErrors]; +export type KiloClawStatusError = KiloClawStatusErrors[keyof KiloClawStatusErrors] export type KiloClawStatusResponses = { - /** - * Instance status - */ - 200: { - status: 'provisioned' | 'starting' | 'restarting' | 'recovering' | 'running' | 'stopped' | 'destroying' | 'restoring' | null; - sandboxId?: string; - flyRegion?: string; - machineSize?: { - cpus: number; - memory_mb: number; - }; - openclawVersion?: string | null; - lastStartedAt?: string | null; - lastStoppedAt?: string | null; - channelCount?: number; - secretCount?: number; - userId?: string; - botName?: string | null; - }; -}; + /** + * Instance status + */ + 200: { + status: + | "provisioned" + | "starting" + | "restarting" + | "recovering" + | "running" + | "stopped" + | "destroying" + | "restoring" + | null + sandboxId?: string + flyRegion?: string + machineSize?: { + cpus: number + memory_mb: number + } + openclawVersion?: string | null + lastStartedAt?: string | null + lastStoppedAt?: string | null + channelCount?: number + secretCount?: number + userId?: string + botName?: string | null + } +} -export type KiloClawStatusResponse = KiloClawStatusResponses[keyof KiloClawStatusResponses]; +export type KiloClawStatusResponse = KiloClawStatusResponses[keyof KiloClawStatusResponses] export type KiloClawChatCredentialsData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/kilo/claw/chat-credentials'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/kilo/claw/chat-credentials" +} export type KiloClawChatCredentialsErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type KiloClawChatCredentialsError = KiloClawChatCredentialsErrors[keyof KiloClawChatCredentialsErrors]; +export type KiloClawChatCredentialsError = KiloClawChatCredentialsErrors[keyof KiloClawChatCredentialsErrors] export type KiloClawChatCredentialsResponses = { - /** - * Kilo Chat credentials or null - */ - 200: { - token: string; - expiresAt: string; - kiloChatUrl: string; - eventServiceUrl: string; - } | null; -}; + /** + * Kilo Chat credentials or null + */ + 200: { + token: string + expiresAt: string + kiloChatUrl: string + eventServiceUrl: string + } | null +} -export type KiloClawChatCredentialsResponse = KiloClawChatCredentialsResponses[keyof KiloClawChatCredentialsResponses]; +export type KiloClawChatCredentialsResponse = KiloClawChatCredentialsResponses[keyof KiloClawChatCredentialsResponses] export type KiloCloudSessionsData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - cursor?: string; - limit?: number; - gitUrl?: string; - }; - url: '/kilo/cloud-sessions'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + cursor?: string + limit?: number + gitUrl?: string + } + url: "/kilo/cloud-sessions" +} export type KiloCloudSessionsErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} -export type KiloCloudSessionsError = KiloCloudSessionsErrors[keyof KiloCloudSessionsErrors]; +export type KiloCloudSessionsError = KiloCloudSessionsErrors[keyof KiloCloudSessionsErrors] export type KiloCloudSessionsResponses = { - /** - * Cloud sessions list - */ - 200: { - cliSessions: Array<{ - session_id: string; - title: string | null; - created_at: string; - updated_at: string; - version: number; - }>; - nextCursor: string | null; - }; -}; + /** + * Cloud sessions list + */ + 200: { + cliSessions: Array<{ + session_id: string + title: string | null + created_at: string + updated_at: string + version: number + }> + nextCursor: string | null + } +} -export type KiloCloudSessionsResponse = KiloCloudSessionsResponses[keyof KiloCloudSessionsResponses]; +export type KiloCloudSessionsResponse = KiloCloudSessionsResponses[keyof KiloCloudSessionsResponses] export type KiloCloudSessionGetData = { - body?: never; - path: { - id: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/kilo/cloud/session/{id}'; -}; + body?: never + path: { + id: string + } + query?: { + directory?: string + workspace?: string + } + url: "/kilo/cloud/session/{id}" +} export type KiloCloudSessionGetErrors = { - /** - * Bad request - */ - 400: BadRequestError; - /** - * Not found - */ - 404: NotFoundError; -}; + /** + * Bad request + */ + 400: BadRequestError + /** + * Not found + */ + 404: NotFoundError +} -export type KiloCloudSessionGetError = KiloCloudSessionGetErrors[keyof KiloCloudSessionGetErrors]; +export type KiloCloudSessionGetError = KiloCloudSessionGetErrors[keyof KiloCloudSessionGetErrors] export type KiloCloudSessionGetResponses = { - /** - * Cloud session data - */ - 200: { - info: { - id: string; - title: string; - time: { - created: number; - updated: number; - }; - }; - messages: Array<{ - info: { - id: string; - sessionID: string; - role: 'user' | 'assistant'; - time: { - created: number; - completed?: number; - }; - }; - parts: Array<{ - id: string; - sessionID: string; - messageID: string; - type: string; - }>; - }>; - }; -}; + /** + * Cloud session data + */ + 200: { + info: { + id: string + title: string + time: { + created: number + updated: number + } + } + messages: Array<{ + info: { + id: string + sessionID: string + role: "user" | "assistant" + time: { + created: number + completed?: number + } + } + parts: Array<{ + id: string + sessionID: string + messageID: string + type: string + }> + }> + } +} -export type KiloCloudSessionGetResponse = KiloCloudSessionGetResponses[keyof KiloCloudSessionGetResponses]; +export type KiloCloudSessionGetResponse = KiloCloudSessionGetResponses[keyof KiloCloudSessionGetResponses] export type KiloCloudSessionImportData = { - body?: { - sessionId: string; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/kilo/cloud/session/import'; -}; + body?: { + sessionId: string + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/kilo/cloud/session/import" +} export type KiloCloudSessionImportErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * Not found - */ - 404: NotFoundError; - /** - * CloudSessionImportError - */ - 500: CloudSessionImportError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * Not found + */ + 404: NotFoundError + /** + * CloudSessionImportError + */ + 500: CloudSessionImportError +} -export type KiloCloudSessionImportError = KiloCloudSessionImportErrors[keyof KiloCloudSessionImportErrors]; +export type KiloCloudSessionImportError = KiloCloudSessionImportErrors[keyof KiloCloudSessionImportErrors] export type KiloCloudSessionImportResponses = { - /** - * Imported session info - */ - 200: { - id: string; - title: string; - time: { - created: number; - updated: number; - }; - }; -}; + /** + * Imported session info + */ + 200: { + id: string + title: string + time: { + created: number + updated: number + } + } +} -export type KiloCloudSessionImportResponse = KiloCloudSessionImportResponses[keyof KiloCloudSessionImportResponses]; +export type KiloCloudSessionImportResponse = KiloCloudSessionImportResponses[keyof KiloCloudSessionImportResponses] export type KilocodeHeapSnapshotData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/kilocode/heap/snapshot'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/kilocode/heap/snapshot" +} export type KilocodeHeapSnapshotErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} -export type KilocodeHeapSnapshotError = KilocodeHeapSnapshotErrors[keyof KilocodeHeapSnapshotErrors]; +export type KilocodeHeapSnapshotError = KilocodeHeapSnapshotErrors[keyof KilocodeHeapSnapshotErrors] export type KilocodeHeapSnapshotResponses = { - /** - * Heap snapshot file path - */ - 200: string; -}; + /** + * Heap snapshot file path + */ + 200: string +} -export type KilocodeHeapSnapshotResponse = KilocodeHeapSnapshotResponses[keyof KilocodeHeapSnapshotResponses]; +export type KilocodeHeapSnapshotResponse = KilocodeHeapSnapshotResponses[keyof KilocodeHeapSnapshotResponses] export type KilocodeAgentRequirementsData = { - body?: never; - path?: never; - query: { - directory?: string; - workspace?: string; - agent: string; - }; - url: '/kilocode/agent/requirements'; -}; + body?: never + path?: never + query: { + directory?: string + workspace?: string + agent: string + } + url: "/kilocode/agent/requirements" +} export type KilocodeAgentRequirementsErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type KilocodeAgentRequirementsError = KilocodeAgentRequirementsErrors[keyof KilocodeAgentRequirementsErrors]; +export type KilocodeAgentRequirementsError = KilocodeAgentRequirementsErrors[keyof KilocodeAgentRequirementsErrors] export type KilocodeAgentRequirementsResponses = { - /** - * Agent requirement status - */ - 200: AgentRequirementResult; -}; + /** + * Agent requirement status + */ + 200: AgentRequirementResult +} -export type KilocodeAgentRequirementsResponse = KilocodeAgentRequirementsResponses[keyof KilocodeAgentRequirementsResponses]; +export type KilocodeAgentRequirementsResponse = + KilocodeAgentRequirementsResponses[keyof KilocodeAgentRequirementsResponses] export type KilocodeRemoveSkillData = { - body?: { - location: string; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/kilocode/skill/remove'; -}; + body?: { + location: string + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/kilocode/skill/remove" +} export type KilocodeRemoveSkillErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} -export type KilocodeRemoveSkillError = KilocodeRemoveSkillErrors[keyof KilocodeRemoveSkillErrors]; +export type KilocodeRemoveSkillError = KilocodeRemoveSkillErrors[keyof KilocodeRemoveSkillErrors] export type KilocodeRemoveSkillResponses = { - /** - * Skill removed - */ - 200: boolean; -}; + /** + * Skill removed + */ + 200: boolean +} -export type KilocodeRemoveSkillResponse = KilocodeRemoveSkillResponses[keyof KilocodeRemoveSkillResponses]; +export type KilocodeRemoveSkillResponse = KilocodeRemoveSkillResponses[keyof KilocodeRemoveSkillResponses] export type KilocodeRemoveAgentData = { - body?: { - name: string; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/kilocode/agent/remove'; -}; + body?: { + name: string + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/kilocode/agent/remove" +} export type KilocodeRemoveAgentErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} -export type KilocodeRemoveAgentError = KilocodeRemoveAgentErrors[keyof KilocodeRemoveAgentErrors]; +export type KilocodeRemoveAgentError = KilocodeRemoveAgentErrors[keyof KilocodeRemoveAgentErrors] export type KilocodeRemoveAgentResponses = { - /** - * Agent removed - */ - 200: boolean; -}; + /** + * Agent removed + */ + 200: boolean +} -export type KilocodeRemoveAgentResponse = KilocodeRemoveAgentResponses[keyof KilocodeRemoveAgentResponses]; +export type KilocodeRemoveAgentResponse = KilocodeRemoveAgentResponses[keyof KilocodeRemoveAgentResponses] export type KilocodeNotebookListData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/kilocode/notebook'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/kilocode/notebook" +} export type KilocodeNotebookListErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type KilocodeNotebookListError = KilocodeNotebookListErrors[keyof KilocodeNotebookListErrors]; +export type KilocodeNotebookListError = KilocodeNotebookListErrors[keyof KilocodeNotebookListErrors] export type KilocodeNotebookListResponses = { - /** - * Pending notebook host requests - */ - 200: Array; -}; + /** + * Pending notebook host requests + */ + 200: Array +} -export type KilocodeNotebookListResponse = KilocodeNotebookListResponses[keyof KilocodeNotebookListResponses]; +export type KilocodeNotebookListResponse = KilocodeNotebookListResponses[keyof KilocodeNotebookListResponses] export type KilocodeNotebookReplyData = { - body?: { - result: NotebookResult; - }; - path: { - requestID: NotebookRequestId; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/kilocode/notebook/{requestID}/reply'; -}; + body?: { + result: NotebookResult + } + path: { + requestID: NotebookRequestId + } + query?: { + directory?: string + workspace?: string + } + url: "/kilocode/notebook/{requestID}/reply" +} export type KilocodeNotebookReplyErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * Not found - */ - 404: NotFoundError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * Not found + */ + 404: NotFoundError +} -export type KilocodeNotebookReplyError = KilocodeNotebookReplyErrors[keyof KilocodeNotebookReplyErrors]; +export type KilocodeNotebookReplyError = KilocodeNotebookReplyErrors[keyof KilocodeNotebookReplyErrors] export type KilocodeNotebookReplyResponses = { - /** - * Notebook reply accepted - */ - 200: boolean; -}; + /** + * Notebook reply accepted + */ + 200: boolean +} -export type KilocodeNotebookReplyResponse = KilocodeNotebookReplyResponses[keyof KilocodeNotebookReplyResponses]; +export type KilocodeNotebookReplyResponse = KilocodeNotebookReplyResponses[keyof KilocodeNotebookReplyResponses] export type KilocodeNotebookRejectData = { - body?: { - error: NotebookFailure; - }; - path: { - requestID: NotebookRequestId; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/kilocode/notebook/{requestID}/reject'; -}; + body?: { + error: NotebookFailure + } + path: { + requestID: NotebookRequestId + } + query?: { + directory?: string + workspace?: string + } + url: "/kilocode/notebook/{requestID}/reject" +} export type KilocodeNotebookRejectErrors = { - /** - * Bad request - */ - 400: BadRequestError; - /** - * Not found - */ - 404: NotFoundError; -}; + /** + * Bad request + */ + 400: BadRequestError + /** + * Not found + */ + 404: NotFoundError +} -export type KilocodeNotebookRejectError = KilocodeNotebookRejectErrors[keyof KilocodeNotebookRejectErrors]; +export type KilocodeNotebookRejectError = KilocodeNotebookRejectErrors[keyof KilocodeNotebookRejectErrors] export type KilocodeNotebookRejectResponses = { - /** - * Notebook rejection accepted - */ - 200: boolean; -}; + /** + * Notebook rejection accepted + */ + 200: boolean +} -export type KilocodeNotebookRejectResponse = KilocodeNotebookRejectResponses[keyof KilocodeNotebookRejectResponses]; +export type KilocodeNotebookRejectResponse = KilocodeNotebookRejectResponses[keyof KilocodeNotebookRejectResponses] export type KilocodeAgentManagerListData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/kilocode/agent-manager'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/kilocode/agent-manager" +} export type KilocodeAgentManagerListErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type KilocodeAgentManagerListError = KilocodeAgentManagerListErrors[keyof KilocodeAgentManagerListErrors]; +export type KilocodeAgentManagerListError = KilocodeAgentManagerListErrors[keyof KilocodeAgentManagerListErrors] export type KilocodeAgentManagerListResponses = { - /** - * Pending Agent Manager host requests - */ - 200: Array; -}; + /** + * Pending Agent Manager host requests + */ + 200: Array +} -export type KilocodeAgentManagerListResponse = KilocodeAgentManagerListResponses[keyof KilocodeAgentManagerListResponses]; +export type KilocodeAgentManagerListResponse = + KilocodeAgentManagerListResponses[keyof KilocodeAgentManagerListResponses] export type KilocodeAgentManagerReplyData = { - body?: { - result: AgentManagerResult; - }; - path: { - requestID: AgentManagerRequestId; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/kilocode/agent-manager/{requestID}/reply'; -}; + body?: { + result: AgentManagerResult + } + path: { + requestID: AgentManagerRequestId + } + query?: { + directory?: string + workspace?: string + } + url: "/kilocode/agent-manager/{requestID}/reply" +} export type KilocodeAgentManagerReplyErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * Not found - */ - 404: NotFoundError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * Not found + */ + 404: NotFoundError +} -export type KilocodeAgentManagerReplyError = KilocodeAgentManagerReplyErrors[keyof KilocodeAgentManagerReplyErrors]; +export type KilocodeAgentManagerReplyError = KilocodeAgentManagerReplyErrors[keyof KilocodeAgentManagerReplyErrors] export type KilocodeAgentManagerReplyResponses = { - /** - * Agent Manager reply accepted - */ - 200: boolean; -}; + /** + * Agent Manager reply accepted + */ + 200: boolean +} -export type KilocodeAgentManagerReplyResponse = KilocodeAgentManagerReplyResponses[keyof KilocodeAgentManagerReplyResponses]; +export type KilocodeAgentManagerReplyResponse = + KilocodeAgentManagerReplyResponses[keyof KilocodeAgentManagerReplyResponses] export type KilocodeAgentManagerRejectData = { - body?: { - error: AgentManagerFailure; - }; - path: { - requestID: AgentManagerRequestId; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/kilocode/agent-manager/{requestID}/reject'; -}; + body?: { + error: AgentManagerFailure + } + path: { + requestID: AgentManagerRequestId + } + query?: { + directory?: string + workspace?: string + } + url: "/kilocode/agent-manager/{requestID}/reject" +} export type KilocodeAgentManagerRejectErrors = { - /** - * Bad request - */ - 400: BadRequestError; - /** - * Not found - */ - 404: NotFoundError; -}; + /** + * Bad request + */ + 400: BadRequestError + /** + * Not found + */ + 404: NotFoundError +} -export type KilocodeAgentManagerRejectError = KilocodeAgentManagerRejectErrors[keyof KilocodeAgentManagerRejectErrors]; +export type KilocodeAgentManagerRejectError = KilocodeAgentManagerRejectErrors[keyof KilocodeAgentManagerRejectErrors] export type KilocodeAgentManagerRejectResponses = { - /** - * Agent Manager rejection accepted - */ - 200: boolean; -}; + /** + * Agent Manager rejection accepted + */ + 200: boolean +} -export type KilocodeAgentManagerRejectResponse = KilocodeAgentManagerRejectResponses[keyof KilocodeAgentManagerRejectResponses]; +export type KilocodeAgentManagerRejectResponse = + KilocodeAgentManagerRejectResponses[keyof KilocodeAgentManagerRejectResponses] export type KilocodeSessionModelUsageData = { - body?: never; - path: { - sessionID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/session/{sessionID}/model-usage'; -}; + body?: never + path: { + sessionID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/session/{sessionID}/model-usage" +} export type KilocodeSessionModelUsageErrors = { - /** - * Bad request - */ - 400: BadRequestError; - /** - * Not found - */ - 404: NotFoundError; -}; + /** + * Bad request + */ + 400: BadRequestError + /** + * Not found + */ + 404: NotFoundError +} -export type KilocodeSessionModelUsageError = KilocodeSessionModelUsageErrors[keyof KilocodeSessionModelUsageErrors]; +export type KilocodeSessionModelUsageError = KilocodeSessionModelUsageErrors[keyof KilocodeSessionModelUsageErrors] export type KilocodeSessionModelUsageResponses = { - /** - * Model usage for a session tree - */ - 200: { - sessionIDs: Array; - totals: { - steps: number; - cost: number; - tokens: { - input: number; - output: number; - reasoning: number; - cache: { - read: number; - write: number; - }; - }; - }; - models: Array<{ - providerID: string; - modelID: string; - steps: number; - cost: number; - tokens: { - input: number; - output: number; - reasoning: number; - cache: { - read: number; - write: number; - }; - }; - }>; - }; -}; + /** + * Model usage for a session tree + */ + 200: { + sessionIDs: Array + totals: { + steps: number + cost: number + tokens: { + input: number + output: number + reasoning: number + cache: { + read: number + write: number + } + } + } + models: Array<{ + providerID: string + modelID: string + steps: number + cost: number + tokens: { + input: number + output: number + reasoning: number + cache: { + read: number + write: number + } + } + }> + } +} -export type KilocodeSessionModelUsageResponse = KilocodeSessionModelUsageResponses[keyof KilocodeSessionModelUsageResponses]; +export type KilocodeSessionModelUsageResponse = + KilocodeSessionModelUsageResponses[keyof KilocodeSessionModelUsageResponses] export type AnacondaDesktopStatusData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/kilocode/anaconda-desktop/status'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/kilocode/anaconda-desktop/status" +} export type AnacondaDesktopStatusErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type AnacondaDesktopStatusError = AnacondaDesktopStatusErrors[keyof AnacondaDesktopStatusErrors]; +export type AnacondaDesktopStatusError = AnacondaDesktopStatusErrors[keyof AnacondaDesktopStatusErrors] export type AnacondaDesktopStatusResponses = { - /** - * Anaconda Desktop setup status - */ - 200: AnacondaDesktopStatus; -}; + /** + * Anaconda Desktop setup status + */ + 200: AnacondaDesktopStatus +} -export type AnacondaDesktopStatusResponse = AnacondaDesktopStatusResponses[keyof AnacondaDesktopStatusResponses]; +export type AnacondaDesktopStatusResponse = AnacondaDesktopStatusResponses[keyof AnacondaDesktopStatusResponses] export type AnacondaDesktopOpenData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/kilocode/anaconda-desktop/open'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/kilocode/anaconda-desktop/open" +} export type AnacondaDesktopOpenErrors = { - /** - * Bad request - */ - 400: BadRequestError; - /** - * AnacondaDesktopConflictError - */ - 409: AnacondaDesktopConflictError; - /** - * AnacondaDesktopOperationError - */ - 500: AnacondaDesktopOperationError; -}; + /** + * Bad request + */ + 400: BadRequestError + /** + * AnacondaDesktopConflictError + */ + 409: AnacondaDesktopConflictError + /** + * AnacondaDesktopOperationError + */ + 500: AnacondaDesktopOperationError +} -export type AnacondaDesktopOpenError = AnacondaDesktopOpenErrors[keyof AnacondaDesktopOpenErrors]; +export type AnacondaDesktopOpenError = AnacondaDesktopOpenErrors[keyof AnacondaDesktopOpenErrors] export type AnacondaDesktopOpenResponses = { - /** - * Anaconda Desktop opened - */ - 200: true; -}; + /** + * Anaconda Desktop opened + */ + 200: true +} -export type AnacondaDesktopOpenResponse = AnacondaDesktopOpenResponses[keyof AnacondaDesktopOpenResponses]; +export type AnacondaDesktopOpenResponse = AnacondaDesktopOpenResponses[keyof AnacondaDesktopOpenResponses] export type AnacondaDesktopSyncData = { - body?: { - acknowledgeToolLimitations?: boolean; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/kilocode/anaconda-desktop/sync'; -}; + body?: { + acknowledgeToolLimitations?: boolean + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/kilocode/anaconda-desktop/sync" +} export type AnacondaDesktopSyncErrors = { - /** - * Bad request - */ - 400: BadRequestError; - /** - * AnacondaDesktopConflictError - */ - 409: AnacondaDesktopConflictError; - /** - * AnacondaDesktopOperationError - */ - 500: AnacondaDesktopOperationError; -}; + /** + * Bad request + */ + 400: BadRequestError + /** + * AnacondaDesktopConflictError + */ + 409: AnacondaDesktopConflictError + /** + * AnacondaDesktopOperationError + */ + 500: AnacondaDesktopOperationError +} -export type AnacondaDesktopSyncError = AnacondaDesktopSyncErrors[keyof AnacondaDesktopSyncErrors]; +export type AnacondaDesktopSyncError = AnacondaDesktopSyncErrors[keyof AnacondaDesktopSyncErrors] export type AnacondaDesktopSyncResponses = { - /** - * Anaconda Desktop connection synchronized - */ - 200: { - type: 'ready'; - serverID: string; - serverName?: string; - models: Array<{ - id: string; - name: string; - }>; - context: number; - toolcall: 'supported' | 'unsupported' | 'unknown'; - }; -}; + /** + * Anaconda Desktop connection synchronized + */ + 200: { + type: "ready" + serverID: string + serverName?: string + models: Array<{ + id: string + name: string + }> + context: number + toolcall: "supported" | "unsupported" | "unknown" + } +} -export type AnacondaDesktopSyncResponse = AnacondaDesktopSyncResponses[keyof AnacondaDesktopSyncResponses]; +export type AnacondaDesktopSyncResponse = AnacondaDesktopSyncResponses[keyof AnacondaDesktopSyncResponses] export type NetworkListData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/network'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/network" +} export type NetworkListErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type NetworkListError = NetworkListErrors[keyof NetworkListErrors]; +export type NetworkListError = NetworkListErrors[keyof NetworkListErrors] export type NetworkListResponses = { - /** - * List of pending network reconnect requests - */ - 200: Array; -}; + /** + * List of pending network reconnect requests + */ + 200: Array +} -export type NetworkListResponse = NetworkListResponses[keyof NetworkListResponses]; +export type NetworkListResponse = NetworkListResponses[keyof NetworkListResponses] export type NetworkReplyData = { - body?: never; - path: { - requestID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/network/{requestID}/reply'; -}; + body?: never + path: { + requestID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/network/{requestID}/reply" +} export type NetworkReplyErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * Not found - */ - 404: NotFoundError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * Not found + */ + 404: NotFoundError +} -export type NetworkReplyError = NetworkReplyErrors[keyof NetworkReplyErrors]; +export type NetworkReplyError = NetworkReplyErrors[keyof NetworkReplyErrors] export type NetworkReplyResponses = { - /** - * Network wait resumed successfully - */ - 200: boolean; -}; + /** + * Network wait resumed successfully + */ + 200: boolean +} -export type NetworkReplyResponse = NetworkReplyResponses[keyof NetworkReplyResponses]; +export type NetworkReplyResponse = NetworkReplyResponses[keyof NetworkReplyResponses] export type NetworkRejectData = { - body?: never; - path: { - requestID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/network/{requestID}/reject'; -}; + body?: never + path: { + requestID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/network/{requestID}/reject" +} export type NetworkRejectErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * Not found - */ - 404: NotFoundError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * Not found + */ + 404: NotFoundError +} -export type NetworkRejectError = NetworkRejectErrors[keyof NetworkRejectErrors]; +export type NetworkRejectError = NetworkRejectErrors[keyof NetworkRejectErrors] export type NetworkRejectResponses = { - /** - * Network wait rejected successfully - */ - 200: boolean; -}; + /** + * Network wait rejected successfully + */ + 200: boolean +} -export type NetworkRejectResponse = NetworkRejectResponses[keyof NetworkRejectResponses]; +export type NetworkRejectResponse = NetworkRejectResponses[keyof NetworkRejectResponses] export type RemoteEnableData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/remote/enable'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/remote/enable" +} export type RemoteEnableErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type RemoteEnableError = RemoteEnableErrors[keyof RemoteEnableErrors]; +export type RemoteEnableError = RemoteEnableErrors[keyof RemoteEnableErrors] export type RemoteEnableResponses = { - /** - * Remote connection enabled - */ - 200: { - enabled: boolean; - connected: boolean; - }; -}; + /** + * Remote connection enabled + */ + 200: { + enabled: boolean + connected: boolean + } +} -export type RemoteEnableResponse = RemoteEnableResponses[keyof RemoteEnableResponses]; +export type RemoteEnableResponse = RemoteEnableResponses[keyof RemoteEnableResponses] export type RemoteDisableData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/remote/disable'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/remote/disable" +} export type RemoteDisableErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type RemoteDisableError = RemoteDisableErrors[keyof RemoteDisableErrors]; +export type RemoteDisableError = RemoteDisableErrors[keyof RemoteDisableErrors] export type RemoteDisableResponses = { - /** - * Remote connection disabled - */ - 200: { - enabled: boolean; - connected: boolean; - }; -}; + /** + * Remote connection disabled + */ + 200: { + enabled: boolean + connected: boolean + } +} -export type RemoteDisableResponse = RemoteDisableResponses[keyof RemoteDisableResponses]; +export type RemoteDisableResponse = RemoteDisableResponses[keyof RemoteDisableResponses] export type RemoteStatusData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/remote/status'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/remote/status" +} export type RemoteStatusErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type RemoteStatusError = RemoteStatusErrors[keyof RemoteStatusErrors]; +export type RemoteStatusError = RemoteStatusErrors[keyof RemoteStatusErrors] export type RemoteStatusResponses = { - /** - * Remote connection status - */ - 200: { - enabled: boolean; - connected: boolean; - }; -}; + /** + * Remote connection status + */ + 200: { + enabled: boolean + connected: boolean + } +} -export type RemoteStatusResponse = RemoteStatusResponses[keyof RemoteStatusResponses]; +export type RemoteStatusResponse = RemoteStatusResponses[keyof RemoteStatusResponses] export type SandboxSupportData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/sandbox/support'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/sandbox/support" +} export type SandboxSupportErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type SandboxSupportError = SandboxSupportErrors[keyof SandboxSupportErrors]; +export type SandboxSupportError = SandboxSupportErrors[keyof SandboxSupportErrors] export type SandboxSupportResponses = { - /** - * Sandbox backend support - */ - 200: { - available: boolean; - reason?: string; - }; -}; + /** + * Sandbox backend support + */ + 200: { + available: boolean + reason?: string + } +} -export type SandboxSupportResponse = SandboxSupportResponses[keyof SandboxSupportResponses]; +export type SandboxSupportResponse = SandboxSupportResponses[keyof SandboxSupportResponses] export type SandboxStatusData = { - body?: never; - path: { - sessionID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/session/{sessionID}/sandbox'; -}; + body?: never + path: { + sessionID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/session/{sessionID}/sandbox" +} export type SandboxStatusErrors = { - /** - * Bad request - */ - 400: BadRequestError; - /** - * NotFoundError - */ - 404: NotFoundError; -}; + /** + * Bad request + */ + 400: BadRequestError + /** + * NotFoundError + */ + 404: NotFoundError +} -export type SandboxStatusError = SandboxStatusErrors[keyof SandboxStatusErrors]; +export type SandboxStatusError = SandboxStatusErrors[keyof SandboxStatusErrors] export type SandboxStatusResponses = { - /** - * Session sandbox status - */ - 200: { - directory: string; - enabled: boolean; - available: boolean; - reason?: string; - version: number; - }; -}; + /** + * Session sandbox status + */ + 200: { + directory: string + enabled: boolean + available: boolean + reason?: string + version: number + } +} -export type SandboxStatusResponse = SandboxStatusResponses[keyof SandboxStatusResponses]; +export type SandboxStatusResponse = SandboxStatusResponses[keyof SandboxStatusResponses] export type SandboxToggleData = { - body?: never; - path: { - sessionID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/session/{sessionID}/sandbox/toggle'; -}; + body?: never + path: { + sessionID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/session/{sessionID}/sandbox/toggle" +} export type SandboxToggleErrors = { - /** - * Bad request - */ - 400: BadRequestError; - /** - * NotFoundError - */ - 404: NotFoundError; -}; + /** + * Bad request + */ + 400: BadRequestError + /** + * NotFoundError + */ + 404: NotFoundError +} -export type SandboxToggleError = SandboxToggleErrors[keyof SandboxToggleErrors]; +export type SandboxToggleError = SandboxToggleErrors[keyof SandboxToggleErrors] export type SandboxToggleResponses = { - /** - * Updated session sandbox status - */ - 200: { - directory: string; - enabled: boolean; - available: boolean; - reason?: string; - version: number; - }; -}; + /** + * Updated session sandbox status + */ + 200: { + directory: string + enabled: boolean + available: boolean + reason?: string + version: number + } +} -export type SandboxToggleResponse = SandboxToggleResponses[keyof SandboxToggleResponses]; +export type SandboxToggleResponse = SandboxToggleResponses[keyof SandboxToggleResponses] export type KilocodeSessionImportProjectData = { - body?: { - id: string; - worktree: string; - vcs?: string; - name?: string; - iconUrl?: string; - iconColor?: string; - timeCreated: number; - timeUpdated: number; - timeInitialized?: number; - sandboxes: Array; - commands?: { - start?: string; - }; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/kilocode/session-import/project'; -}; + body?: { + id: string + worktree: string + vcs?: string + name?: string + iconUrl?: string + iconColor?: string + timeCreated: number + timeUpdated: number + timeInitialized?: number + sandboxes: Array + commands?: { + start?: string + } + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/kilocode/session-import/project" +} export type KilocodeSessionImportProjectErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} -export type KilocodeSessionImportProjectError = KilocodeSessionImportProjectErrors[keyof KilocodeSessionImportProjectErrors]; +export type KilocodeSessionImportProjectError = + KilocodeSessionImportProjectErrors[keyof KilocodeSessionImportProjectErrors] export type KilocodeSessionImportProjectResponses = { - /** - * Project import result - */ - 200: KilocodeSessionImportResult; -}; + /** + * Project import result + */ + 200: KilocodeSessionImportResult +} -export type KilocodeSessionImportProjectResponse = KilocodeSessionImportProjectResponses[keyof KilocodeSessionImportProjectResponses]; +export type KilocodeSessionImportProjectResponse = + KilocodeSessionImportProjectResponses[keyof KilocodeSessionImportProjectResponses] export type KilocodeSessionImportSessionData = { - body?: { - id: string; - projectID: string; - force?: boolean; - workspaceID?: string; - parentID?: string; - slug: string; - directory: string; - title: string; - version: string; - shareURL?: string; - summary?: { - additions: number; - deletions: number; - files: number; - diffs?: Array<{ - [key: string]: unknown; - }>; - }; - revert?: { - messageID: string; - partID?: string; - snapshot?: string; - diff?: string; - workspace?: 'restored' | 'snapshots-disabled' | 'unavailable'; - }; - permission?: { - [key: string]: unknown; - }; - timeCreated: number; - timeUpdated: number; - timeCompacting?: number; - timeArchived?: number; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/kilocode/session-import/session'; -}; + body?: { + id: string + projectID: string + force?: boolean + workspaceID?: string + parentID?: string + slug: string + directory: string + title: string + version: string + shareURL?: string + summary?: { + additions: number + deletions: number + files: number + diffs?: Array<{ + [key: string]: unknown + }> + } + revert?: { + messageID: string + partID?: string + snapshot?: string + diff?: string + workspace?: "restored" | "snapshots-disabled" | "unavailable" + } + permission?: { + [key: string]: unknown + } + timeCreated: number + timeUpdated: number + timeCompacting?: number + timeArchived?: number + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/kilocode/session-import/session" +} export type KilocodeSessionImportSessionErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} -export type KilocodeSessionImportSessionError = KilocodeSessionImportSessionErrors[keyof KilocodeSessionImportSessionErrors]; +export type KilocodeSessionImportSessionError = + KilocodeSessionImportSessionErrors[keyof KilocodeSessionImportSessionErrors] export type KilocodeSessionImportSessionResponses = { - /** - * Session import result - */ - 200: KilocodeSessionImportResult; -}; + /** + * Session import result + */ + 200: KilocodeSessionImportResult +} -export type KilocodeSessionImportSessionResponse = KilocodeSessionImportSessionResponses[keyof KilocodeSessionImportSessionResponses]; +export type KilocodeSessionImportSessionResponse = + KilocodeSessionImportSessionResponses[keyof KilocodeSessionImportSessionResponses] export type KilocodeSessionImportMessageData = { - body?: { - id: string; - sessionID: string; - timeCreated: number; - data: { - role: 'user'; - time: { - created: number; - }; - agent: string; - model: { - providerID: string; - modelID: string; - }; - tools?: { - [key: string]: boolean; - }; - } | { - role: 'assistant'; - time: { - created: number; - completed?: number; - }; - parentID: string; - modelID: string; - providerID: string; - mode: string; - agent: string; - path: { - cwd: string; - root: string; - }; - summary?: boolean; - cost: number; - tokens: { - total?: number; - input: number; - output: number; - reasoning: number; - cache: { - read: number; - write: number; - }; - }; - structured?: unknown; - variant?: string; - finish?: string; - }; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/kilocode/session-import/message'; -}; + body?: { + id: string + sessionID: string + timeCreated: number + data: + | { + role: "user" + time: { + created: number + } + agent: string + model: { + providerID: string + modelID: string + } + tools?: { + [key: string]: boolean + } + } + | { + role: "assistant" + time: { + created: number + completed?: number + } + parentID: string + modelID: string + providerID: string + mode: string + agent: string + path: { + cwd: string + root: string + } + summary?: boolean + cost: number + tokens: { + total?: number + input: number + output: number + reasoning: number + cache: { + read: number + write: number + } + } + structured?: unknown + variant?: string + finish?: string + } + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/kilocode/session-import/message" +} export type KilocodeSessionImportMessageErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} -export type KilocodeSessionImportMessageError = KilocodeSessionImportMessageErrors[keyof KilocodeSessionImportMessageErrors]; +export type KilocodeSessionImportMessageError = + KilocodeSessionImportMessageErrors[keyof KilocodeSessionImportMessageErrors] export type KilocodeSessionImportMessageResponses = { - /** - * Message import result - */ - 200: KilocodeSessionImportResult; -}; + /** + * Message import result + */ + 200: KilocodeSessionImportResult +} -export type KilocodeSessionImportMessageResponse = KilocodeSessionImportMessageResponses[keyof KilocodeSessionImportMessageResponses]; +export type KilocodeSessionImportMessageResponse = + KilocodeSessionImportMessageResponses[keyof KilocodeSessionImportMessageResponses] export type KilocodeSessionImportPartData = { - body?: { - id: string; - messageID: string; - sessionID: string; - timeCreated?: number; - data: { - type: 'text'; - text: string; - synthetic?: boolean; - ignored?: boolean; - time?: { - start: number; - end?: number; - }; - metadata?: { - [key: string]: unknown; - }; - } | { - type: 'reasoning'; - text: string; - metadata?: { - [key: string]: unknown; - }; - time: { - start: number; - end?: number; - }; - } | { - type: 'tool'; - callID: string; - tool: string; - state: { - status: 'pending'; + body?: { + id: string + messageID: string + sessionID: string + timeCreated?: number + data: + | { + type: "text" + text: string + synthetic?: boolean + ignored?: boolean + time?: { + start: number + end?: number + } + metadata?: { + [key: string]: unknown + } + } + | { + type: "reasoning" + text: string + metadata?: { + [key: string]: unknown + } + time: { + start: number + end?: number + } + } + | { + type: "tool" + callID: string + tool: string + state: + | { + status: "pending" input: { - [key: string]: unknown; - }; - raw: string; - } | { - status: 'running'; + [key: string]: unknown + } + raw: string + } + | { + status: "running" input: { - [key: string]: unknown; - }; - title?: string; + [key: string]: unknown + } + title?: string metadata?: { - [key: string]: unknown; - }; + [key: string]: unknown + } time: { - start: number; - }; - } | { - status: 'completed'; + start: number + } + } + | { + status: "completed" input: { - [key: string]: unknown; - }; - output: string; - title: string; + [key: string]: unknown + } + output: string + title: string metadata: { - [key: string]: unknown; - }; + [key: string]: unknown + } time: { - start: number; - end: number; - compacted?: number; - }; - } | { - status: 'error'; + start: number + end: number + compacted?: number + } + } + | { + status: "error" input: { - [key: string]: unknown; - }; - error: string; + [key: string]: unknown + } + error: string metadata?: { - [key: string]: unknown; - }; + [key: string]: unknown + } time: { - start: number; - end: number; - }; - }; - metadata?: { - [key: string]: unknown; - }; - }; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/kilocode/session-import/part'; -}; + start: number + end: number + } + } + metadata?: { + [key: string]: unknown + } + } + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/kilocode/session-import/part" +} export type KilocodeSessionImportPartErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} -export type KilocodeSessionImportPartError = KilocodeSessionImportPartErrors[keyof KilocodeSessionImportPartErrors]; +export type KilocodeSessionImportPartError = KilocodeSessionImportPartErrors[keyof KilocodeSessionImportPartErrors] export type KilocodeSessionImportPartResponses = { - /** - * Part import result - */ - 200: KilocodeSessionImportResult; -}; + /** + * Part import result + */ + 200: KilocodeSessionImportResult +} -export type KilocodeSessionImportPartResponse = KilocodeSessionImportPartResponses[keyof KilocodeSessionImportPartResponses]; +export type KilocodeSessionImportPartResponse = + KilocodeSessionImportPartResponses[keyof KilocodeSessionImportPartResponses] export type SuggestionListData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/suggestion'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/suggestion" +} export type SuggestionListErrors = { - /** - * Bad request - */ - 400: BadRequestError; -}; + /** + * Bad request + */ + 400: BadRequestError +} -export type SuggestionListError = SuggestionListErrors[keyof SuggestionListErrors]; +export type SuggestionListError = SuggestionListErrors[keyof SuggestionListErrors] export type SuggestionListResponses = { - /** - * List of pending suggestions - */ - 200: Array; -}; + /** + * List of pending suggestions + */ + 200: Array +} -export type SuggestionListResponse = SuggestionListResponses[keyof SuggestionListResponses]; +export type SuggestionListResponse = SuggestionListResponses[keyof SuggestionListResponses] export type SuggestionAcceptData = { - body?: { - /** - * Zero-based action index to accept - */ - index: number; - }; - path: { - requestID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/suggestion/{requestID}/accept'; -}; + body?: { + /** + * Zero-based action index to accept + */ + index: number + } + path: { + requestID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/suggestion/{requestID}/accept" +} export type SuggestionAcceptErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * Not found - */ - 404: NotFoundError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * Not found + */ + 404: NotFoundError +} -export type SuggestionAcceptError = SuggestionAcceptErrors[keyof SuggestionAcceptErrors]; +export type SuggestionAcceptError = SuggestionAcceptErrors[keyof SuggestionAcceptErrors] export type SuggestionAcceptResponses = { - /** - * Suggestion accepted successfully - */ - 200: boolean; -}; + /** + * Suggestion accepted successfully + */ + 200: boolean +} -export type SuggestionAcceptResponse = SuggestionAcceptResponses[keyof SuggestionAcceptResponses]; +export type SuggestionAcceptResponse = SuggestionAcceptResponses[keyof SuggestionAcceptResponses] export type SuggestionDismissData = { - body?: never; - path: { - requestID: string; - }; - query?: { - directory?: string; - workspace?: string; - }; - url: '/suggestion/{requestID}/dismiss'; -}; + body?: never + path: { + requestID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/suggestion/{requestID}/dismiss" +} export type SuggestionDismissErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; - /** - * Not found - */ - 404: NotFoundError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError + /** + * Not found + */ + 404: NotFoundError +} -export type SuggestionDismissError = SuggestionDismissErrors[keyof SuggestionDismissErrors]; +export type SuggestionDismissError = SuggestionDismissErrors[keyof SuggestionDismissErrors] export type SuggestionDismissResponses = { - /** - * Suggestion dismissed successfully - */ - 200: boolean; -}; + /** + * Suggestion dismissed successfully + */ + 200: boolean +} -export type SuggestionDismissResponse = SuggestionDismissResponses[keyof SuggestionDismissResponses]; +export type SuggestionDismissResponse = SuggestionDismissResponses[keyof SuggestionDismissResponses] export type TelemetryCaptureData = { - body?: { - /** - * Event name - */ - event: string; - properties?: { - [key: string]: unknown; - }; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/telemetry/capture'; -}; + body?: { + /** + * Event name + */ + event: string + properties?: { + [key: string]: unknown + } + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/telemetry/capture" +} export type TelemetryCaptureErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} -export type TelemetryCaptureError = TelemetryCaptureErrors[keyof TelemetryCaptureErrors]; +export type TelemetryCaptureError = TelemetryCaptureErrors[keyof TelemetryCaptureErrors] export type TelemetryCaptureResponses = { - /** - * Event captured - */ - 200: boolean; -}; + /** + * Event captured + */ + 200: boolean +} -export type TelemetryCaptureResponse = TelemetryCaptureResponses[keyof TelemetryCaptureResponses]; +export type TelemetryCaptureResponse = TelemetryCaptureResponses[keyof TelemetryCaptureResponses] export type TelemetrySetEnabledData = { - body?: { - enabled: boolean; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/telemetry/setEnabled'; -}; + body?: { + enabled: boolean + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/telemetry/setEnabled" +} export type TelemetrySetEnabledErrors = { - /** - * BadRequest | InvalidRequestError - */ - 400: EffectHttpApiErrorBadRequest | InvalidRequestError; -}; + /** + * BadRequest | InvalidRequestError + */ + 400: EffectHttpApiErrorBadRequest | InvalidRequestError +} -export type TelemetrySetEnabledError = TelemetrySetEnabledErrors[keyof TelemetrySetEnabledErrors]; +export type TelemetrySetEnabledError = TelemetrySetEnabledErrors[keyof TelemetrySetEnabledErrors] export type TelemetrySetEnabledResponses = { - /** - * State updated - */ - 200: boolean; -}; + /** + * State updated + */ + 200: boolean +} -export type TelemetrySetEnabledResponse = TelemetrySetEnabledResponses[keyof TelemetrySetEnabledResponses]; +export type TelemetrySetEnabledResponse = TelemetrySetEnabledResponses[keyof TelemetrySetEnabledResponses] export type MemoryStatusData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/memory/status'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/memory/status" +} export type MemoryStatusErrors = { - /** - * MemoryApiClientError | InvalidRequestError - */ - 400: MemoryApiClientError | InvalidRequestError; - /** - * MemoryApiServerError - */ - 503: MemoryApiServerError; -}; + /** + * MemoryApiClientError | InvalidRequestError + */ + 400: MemoryApiClientError | InvalidRequestError + /** + * MemoryApiServerError + */ + 503: MemoryApiServerError +} -export type MemoryStatusError = MemoryStatusErrors[keyof MemoryStatusErrors]; +export type MemoryStatusError = MemoryStatusErrors[keyof MemoryStatusErrors] export type MemoryStatusResponses = { - /** - * Memory status - */ - 200: { - root: string; - state: { - version: 1; - enabled: boolean; - scope: 'project'; - autoInject: boolean; - autoConsolidate: boolean; - verbose: boolean; - capture: { - mode: 'selective'; - turnClose: boolean; - explicit: boolean; - maxOpsPerRun: number; - minIntervalMs: number; - timeoutMs: number; - }; - limits: { - maxProjectIndexBytes: number; - maxSessionFiles: number; - maxRecentSessions: number; - maxConsolidationInputBytes: number; - maxLineChars: number; - maxSessionLineChars: number; - }; - stats: { - lastInjectedAt: number; - lastInjectedBytes: number; - lastInjectedTokens: number; - lastInjectedSessionID: string; - lastTypedConsolidationAt: number; - lastSessionSavedAt: number; - lastConsolidationCost: number; - lastConsolidationTokens: number; - lastOperationCount: number; - lastRecallAt: number; - lastRecallCount: number; - lastRecallSessionID: string; - }; - }; - exists: { - state: boolean; - index: boolean; - }; - index: { - bytes: number; - estimatedTokens: number; - preview: string; - }; - }; -}; + /** + * Memory status + */ + 200: { + root: string + state: { + version: 1 + enabled: boolean + scope: "project" + autoInject: boolean + autoConsolidate: boolean + verbose: boolean + capture: { + mode: "selective" + turnClose: boolean + explicit: boolean + maxOpsPerRun: number + minIntervalMs: number + timeoutMs: number + } + limits: { + maxProjectIndexBytes: number + maxSessionFiles: number + maxRecentSessions: number + maxConsolidationInputBytes: number + maxLineChars: number + maxSessionLineChars: number + } + stats: { + lastInjectedAt: number + lastInjectedBytes: number + lastInjectedTokens: number + lastInjectedSessionID: string + lastTypedConsolidationAt: number + lastSessionSavedAt: number + lastConsolidationCost: number + lastConsolidationTokens: number + lastOperationCount: number + lastRecallAt: number + lastRecallCount: number + lastRecallSessionID: string + } + } + exists: { + state: boolean + index: boolean + } + index: { + bytes: number + estimatedTokens: number + preview: string + } + } +} -export type MemoryStatusResponse = MemoryStatusResponses[keyof MemoryStatusResponses]; +export type MemoryStatusResponse = MemoryStatusResponses[keyof MemoryStatusResponses] export type MemoryShowData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/memory/show'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/memory/show" +} export type MemoryShowErrors = { - /** - * MemoryApiClientError | InvalidRequestError - */ - 400: MemoryApiClientError | InvalidRequestError; - /** - * MemoryApiServerError - */ - 503: MemoryApiServerError; -}; + /** + * MemoryApiClientError | InvalidRequestError + */ + 400: MemoryApiClientError | InvalidRequestError + /** + * MemoryApiServerError + */ + 503: MemoryApiServerError +} -export type MemoryShowError = MemoryShowErrors[keyof MemoryShowErrors]; +export type MemoryShowError = MemoryShowErrors[keyof MemoryShowErrors] export type MemoryShowResponses = { - /** - * Memory source and index - */ - 200: { - root: string; - state: { - version: 1; - enabled: boolean; - scope: 'project'; - autoInject: boolean; - autoConsolidate: boolean; - verbose: boolean; - capture: { - mode: 'selective'; - turnClose: boolean; - explicit: boolean; - maxOpsPerRun: number; - minIntervalMs: number; - timeoutMs: number; - }; - limits: { - maxProjectIndexBytes: number; - maxSessionFiles: number; - maxRecentSessions: number; - maxConsolidationInputBytes: number; - maxLineChars: number; - maxSessionLineChars: number; - }; - stats: { - lastInjectedAt: number; - lastInjectedBytes: number; - lastInjectedTokens: number; - lastInjectedSessionID: string; - lastTypedConsolidationAt: number; - lastSessionSavedAt: number; - lastConsolidationCost: number; - lastConsolidationTokens: number; - lastOperationCount: number; - lastRecallAt: number; - lastRecallCount: number; - lastRecallSessionID: string; - }; - }; - sources: { - project: string; - environment: string; - corrections: string; - }; - index: string; - items: string; - changes: string; - decisions: string; - }; -}; + /** + * Memory source and index + */ + 200: { + root: string + state: { + version: 1 + enabled: boolean + scope: "project" + autoInject: boolean + autoConsolidate: boolean + verbose: boolean + capture: { + mode: "selective" + turnClose: boolean + explicit: boolean + maxOpsPerRun: number + minIntervalMs: number + timeoutMs: number + } + limits: { + maxProjectIndexBytes: number + maxSessionFiles: number + maxRecentSessions: number + maxConsolidationInputBytes: number + maxLineChars: number + maxSessionLineChars: number + } + stats: { + lastInjectedAt: number + lastInjectedBytes: number + lastInjectedTokens: number + lastInjectedSessionID: string + lastTypedConsolidationAt: number + lastSessionSavedAt: number + lastConsolidationCost: number + lastConsolidationTokens: number + lastOperationCount: number + lastRecallAt: number + lastRecallCount: number + lastRecallSessionID: string + } + } + sources: { + project: string + environment: string + corrections: string + } + index: string + items: string + changes: string + decisions: string + } +} -export type MemoryShowResponse = MemoryShowResponses[keyof MemoryShowResponses]; +export type MemoryShowResponse = MemoryShowResponses[keyof MemoryShowResponses] export type MemoryEnableData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/memory/enable'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/memory/enable" +} export type MemoryEnableErrors = { - /** - * MemoryApiClientError | InvalidRequestError - */ - 400: MemoryApiClientError | InvalidRequestError; - /** - * MemoryApiServerError - */ - 503: MemoryApiServerError; -}; + /** + * MemoryApiClientError | InvalidRequestError + */ + 400: MemoryApiClientError | InvalidRequestError + /** + * MemoryApiServerError + */ + 503: MemoryApiServerError +} -export type MemoryEnableError = MemoryEnableErrors[keyof MemoryEnableErrors]; +export type MemoryEnableError = MemoryEnableErrors[keyof MemoryEnableErrors] export type MemoryEnableResponses = { - /** - * Memory enabled - */ - 200: { - root: string; - state: { - version: 1; - enabled: boolean; - scope: 'project'; - autoInject: boolean; - autoConsolidate: boolean; - verbose: boolean; - capture: { - mode: 'selective'; - turnClose: boolean; - explicit: boolean; - maxOpsPerRun: number; - minIntervalMs: number; - timeoutMs: number; - }; - limits: { - maxProjectIndexBytes: number; - maxSessionFiles: number; - maxRecentSessions: number; - maxConsolidationInputBytes: number; - maxLineChars: number; - maxSessionLineChars: number; - }; - stats: { - lastInjectedAt: number; - lastInjectedBytes: number; - lastInjectedTokens: number; - lastInjectedSessionID: string; - lastTypedConsolidationAt: number; - lastSessionSavedAt: number; - lastConsolidationCost: number; - lastConsolidationTokens: number; - lastOperationCount: number; - lastRecallAt: number; - lastRecallCount: number; - lastRecallSessionID: string; - }; - }; - index: { - text: string; - bytes: number; - tokens: number; - truncated: boolean; - }; - }; -}; + /** + * Memory enabled + */ + 200: { + root: string + state: { + version: 1 + enabled: boolean + scope: "project" + autoInject: boolean + autoConsolidate: boolean + verbose: boolean + capture: { + mode: "selective" + turnClose: boolean + explicit: boolean + maxOpsPerRun: number + minIntervalMs: number + timeoutMs: number + } + limits: { + maxProjectIndexBytes: number + maxSessionFiles: number + maxRecentSessions: number + maxConsolidationInputBytes: number + maxLineChars: number + maxSessionLineChars: number + } + stats: { + lastInjectedAt: number + lastInjectedBytes: number + lastInjectedTokens: number + lastInjectedSessionID: string + lastTypedConsolidationAt: number + lastSessionSavedAt: number + lastConsolidationCost: number + lastConsolidationTokens: number + lastOperationCount: number + lastRecallAt: number + lastRecallCount: number + lastRecallSessionID: string + } + } + index: { + text: string + bytes: number + tokens: number + truncated: boolean + } + } +} -export type MemoryEnableResponse = MemoryEnableResponses[keyof MemoryEnableResponses]; +export type MemoryEnableResponse = MemoryEnableResponses[keyof MemoryEnableResponses] export type MemoryDisableData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/memory/disable'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/memory/disable" +} export type MemoryDisableErrors = { - /** - * MemoryApiClientError | InvalidRequestError - */ - 400: MemoryApiClientError | InvalidRequestError; - /** - * MemoryApiServerError - */ - 503: MemoryApiServerError; -}; + /** + * MemoryApiClientError | InvalidRequestError + */ + 400: MemoryApiClientError | InvalidRequestError + /** + * MemoryApiServerError + */ + 503: MemoryApiServerError +} -export type MemoryDisableError = MemoryDisableErrors[keyof MemoryDisableErrors]; +export type MemoryDisableError = MemoryDisableErrors[keyof MemoryDisableErrors] export type MemoryDisableResponses = { - /** - * Memory disabled - */ - 200: { - root: string; - state: { - version: 1; - enabled: boolean; - scope: 'project'; - autoInject: boolean; - autoConsolidate: boolean; - verbose: boolean; - capture: { - mode: 'selective'; - turnClose: boolean; - explicit: boolean; - maxOpsPerRun: number; - minIntervalMs: number; - timeoutMs: number; - }; - limits: { - maxProjectIndexBytes: number; - maxSessionFiles: number; - maxRecentSessions: number; - maxConsolidationInputBytes: number; - maxLineChars: number; - maxSessionLineChars: number; - }; - stats: { - lastInjectedAt: number; - lastInjectedBytes: number; - lastInjectedTokens: number; - lastInjectedSessionID: string; - lastTypedConsolidationAt: number; - lastSessionSavedAt: number; - lastConsolidationCost: number; - lastConsolidationTokens: number; - lastOperationCount: number; - lastRecallAt: number; - lastRecallCount: number; - lastRecallSessionID: string; - }; - }; - }; -}; + /** + * Memory disabled + */ + 200: { + root: string + state: { + version: 1 + enabled: boolean + scope: "project" + autoInject: boolean + autoConsolidate: boolean + verbose: boolean + capture: { + mode: "selective" + turnClose: boolean + explicit: boolean + maxOpsPerRun: number + minIntervalMs: number + timeoutMs: number + } + limits: { + maxProjectIndexBytes: number + maxSessionFiles: number + maxRecentSessions: number + maxConsolidationInputBytes: number + maxLineChars: number + maxSessionLineChars: number + } + stats: { + lastInjectedAt: number + lastInjectedBytes: number + lastInjectedTokens: number + lastInjectedSessionID: string + lastTypedConsolidationAt: number + lastSessionSavedAt: number + lastConsolidationCost: number + lastConsolidationTokens: number + lastOperationCount: number + lastRecallAt: number + lastRecallCount: number + lastRecallSessionID: string + } + } + } +} -export type MemoryDisableResponse = MemoryDisableResponses[keyof MemoryDisableResponses]; +export type MemoryDisableResponse = MemoryDisableResponses[keyof MemoryDisableResponses] export type MemoryConfigureData = { - body?: { - autoConsolidate?: boolean; - verbose?: boolean; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/memory/configure'; -}; + body?: { + autoConsolidate?: boolean + verbose?: boolean + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/memory/configure" +} export type MemoryConfigureErrors = { - /** - * MemoryApiClientError | InvalidRequestError - */ - 400: MemoryApiClientError | InvalidRequestError; - /** - * MemoryApiServerError - */ - 503: MemoryApiServerError; -}; + /** + * MemoryApiClientError | InvalidRequestError + */ + 400: MemoryApiClientError | InvalidRequestError + /** + * MemoryApiServerError + */ + 503: MemoryApiServerError +} -export type MemoryConfigureError = MemoryConfigureErrors[keyof MemoryConfigureErrors]; +export type MemoryConfigureError = MemoryConfigureErrors[keyof MemoryConfigureErrors] export type MemoryConfigureResponses = { - /** - * Memory configured - */ - 200: { - root: string; - state: { - version: 1; - enabled: boolean; - scope: 'project'; - autoInject: boolean; - autoConsolidate: boolean; - verbose: boolean; - capture: { - mode: 'selective'; - turnClose: boolean; - explicit: boolean; - maxOpsPerRun: number; - minIntervalMs: number; - timeoutMs: number; - }; - limits: { - maxProjectIndexBytes: number; - maxSessionFiles: number; - maxRecentSessions: number; - maxConsolidationInputBytes: number; - maxLineChars: number; - maxSessionLineChars: number; - }; - stats: { - lastInjectedAt: number; - lastInjectedBytes: number; - lastInjectedTokens: number; - lastInjectedSessionID: string; - lastTypedConsolidationAt: number; - lastSessionSavedAt: number; - lastConsolidationCost: number; - lastConsolidationTokens: number; - lastOperationCount: number; - lastRecallAt: number; - lastRecallCount: number; - lastRecallSessionID: string; - }; - }; - }; -}; + /** + * Memory configured + */ + 200: { + root: string + state: { + version: 1 + enabled: boolean + scope: "project" + autoInject: boolean + autoConsolidate: boolean + verbose: boolean + capture: { + mode: "selective" + turnClose: boolean + explicit: boolean + maxOpsPerRun: number + minIntervalMs: number + timeoutMs: number + } + limits: { + maxProjectIndexBytes: number + maxSessionFiles: number + maxRecentSessions: number + maxConsolidationInputBytes: number + maxLineChars: number + maxSessionLineChars: number + } + stats: { + lastInjectedAt: number + lastInjectedBytes: number + lastInjectedTokens: number + lastInjectedSessionID: string + lastTypedConsolidationAt: number + lastSessionSavedAt: number + lastConsolidationCost: number + lastConsolidationTokens: number + lastOperationCount: number + lastRecallAt: number + lastRecallCount: number + lastRecallSessionID: string + } + } + } +} -export type MemoryConfigureResponse = MemoryConfigureResponses[keyof MemoryConfigureResponses]; +export type MemoryConfigureResponse = MemoryConfigureResponses[keyof MemoryConfigureResponses] export type MemoryRebuildData = { - body?: never; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/memory/rebuild'; -}; + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/memory/rebuild" +} export type MemoryRebuildErrors = { - /** - * MemoryApiClientError | InvalidRequestError - */ - 400: MemoryApiClientError | InvalidRequestError; - /** - * MemoryApiServerError - */ - 503: MemoryApiServerError; -}; + /** + * MemoryApiClientError | InvalidRequestError + */ + 400: MemoryApiClientError | InvalidRequestError + /** + * MemoryApiServerError + */ + 503: MemoryApiServerError +} -export type MemoryRebuildError = MemoryRebuildErrors[keyof MemoryRebuildErrors]; +export type MemoryRebuildError = MemoryRebuildErrors[keyof MemoryRebuildErrors] export type MemoryRebuildResponses = { - /** - * Memory rebuilt - */ - 200: { - root: string; - state: { - version: 1; - enabled: boolean; - scope: 'project'; - autoInject: boolean; - autoConsolidate: boolean; - verbose: boolean; - capture: { - mode: 'selective'; - turnClose: boolean; - explicit: boolean; - maxOpsPerRun: number; - minIntervalMs: number; - timeoutMs: number; - }; - limits: { - maxProjectIndexBytes: number; - maxSessionFiles: number; - maxRecentSessions: number; - maxConsolidationInputBytes: number; - maxLineChars: number; - maxSessionLineChars: number; - }; - stats: { - lastInjectedAt: number; - lastInjectedBytes: number; - lastInjectedTokens: number; - lastInjectedSessionID: string; - lastTypedConsolidationAt: number; - lastSessionSavedAt: number; - lastConsolidationCost: number; - lastConsolidationTokens: number; - lastOperationCount: number; - lastRecallAt: number; - lastRecallCount: number; - lastRecallSessionID: string; - }; - }; - index: { - text: string; - bytes: number; - tokens: number; - truncated: boolean; - }; - }; -}; + /** + * Memory rebuilt + */ + 200: { + root: string + state: { + version: 1 + enabled: boolean + scope: "project" + autoInject: boolean + autoConsolidate: boolean + verbose: boolean + capture: { + mode: "selective" + turnClose: boolean + explicit: boolean + maxOpsPerRun: number + minIntervalMs: number + timeoutMs: number + } + limits: { + maxProjectIndexBytes: number + maxSessionFiles: number + maxRecentSessions: number + maxConsolidationInputBytes: number + maxLineChars: number + maxSessionLineChars: number + } + stats: { + lastInjectedAt: number + lastInjectedBytes: number + lastInjectedTokens: number + lastInjectedSessionID: string + lastTypedConsolidationAt: number + lastSessionSavedAt: number + lastConsolidationCost: number + lastConsolidationTokens: number + lastOperationCount: number + lastRecallAt: number + lastRecallCount: number + lastRecallSessionID: string + } + } + index: { + text: string + bytes: number + tokens: number + truncated: boolean + } + } +} -export type MemoryRebuildResponse = MemoryRebuildResponses[keyof MemoryRebuildResponses]; +export type MemoryRebuildResponse = MemoryRebuildResponses[keyof MemoryRebuildResponses] export type MemoryRememberData = { - body?: { - text: string; - key?: string; - file?: 'project.md' | 'environment.md' | 'corrections.md'; - section?: string; - sessionID?: string; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/memory/remember'; -}; + body?: { + text: string + key?: string + file?: "project.md" | "environment.md" | "corrections.md" + section?: string + sessionID?: string + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/memory/remember" +} export type MemoryRememberErrors = { - /** - * MemoryApiClientError | InvalidRequestError - */ - 400: MemoryApiClientError | InvalidRequestError; - /** - * MemoryApiServerError - */ - 503: MemoryApiServerError; -}; + /** + * MemoryApiClientError | InvalidRequestError + */ + 400: MemoryApiClientError | InvalidRequestError + /** + * MemoryApiServerError + */ + 503: MemoryApiServerError +} -export type MemoryRememberError = MemoryRememberErrors[keyof MemoryRememberErrors]; +export type MemoryRememberError = MemoryRememberErrors[keyof MemoryRememberErrors] export type MemoryRememberResponses = { - /** - * Memory operation result - */ - 200: { - operationCount: number; - added: number; - removed: number; - skipped: Array<{ - reason: 'self_referential' | 'out_of_scope' | 'secret'; - text?: string; - }>; - index: { - text: string; - bytes: number; - tokens: number; - truncated: boolean; - }; - }; -}; + /** + * Memory operation result + */ + 200: { + operationCount: number + added: number + removed: number + skipped: Array<{ + reason: "self_referential" | "out_of_scope" | "secret" + text?: string + }> + index: { + text: string + bytes: number + tokens: number + truncated: boolean + } + } +} -export type MemoryRememberResponse = MemoryRememberResponses[keyof MemoryRememberResponses]; +export type MemoryRememberResponse = MemoryRememberResponses[keyof MemoryRememberResponses] export type MemoryCorrectData = { - body?: { - text: string; - key?: string; - sessionID?: string; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/memory/correct'; -}; + body?: { + text: string + key?: string + sessionID?: string + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/memory/correct" +} export type MemoryCorrectErrors = { - /** - * MemoryApiClientError | InvalidRequestError - */ - 400: MemoryApiClientError | InvalidRequestError; - /** - * MemoryApiServerError - */ - 503: MemoryApiServerError; -}; + /** + * MemoryApiClientError | InvalidRequestError + */ + 400: MemoryApiClientError | InvalidRequestError + /** + * MemoryApiServerError + */ + 503: MemoryApiServerError +} -export type MemoryCorrectError = MemoryCorrectErrors[keyof MemoryCorrectErrors]; +export type MemoryCorrectError = MemoryCorrectErrors[keyof MemoryCorrectErrors] export type MemoryCorrectResponses = { - /** - * Memory correction result - */ - 200: { - operationCount: number; - added: number; - removed: number; - skipped: Array<{ - reason: 'self_referential' | 'out_of_scope' | 'secret'; - text?: string; - }>; - index: { - text: string; - bytes: number; - tokens: number; - truncated: boolean; - }; - }; -}; + /** + * Memory correction result + */ + 200: { + operationCount: number + added: number + removed: number + skipped: Array<{ + reason: "self_referential" | "out_of_scope" | "secret" + text?: string + }> + index: { + text: string + bytes: number + tokens: number + truncated: boolean + } + } +} -export type MemoryCorrectResponse = MemoryCorrectResponses[keyof MemoryCorrectResponses]; +export type MemoryCorrectResponse = MemoryCorrectResponses[keyof MemoryCorrectResponses] export type MemoryForgetData = { - body?: { - query: string; - sessionID?: string; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/memory/forget'; -}; + body?: { + query: string + sessionID?: string + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/memory/forget" +} export type MemoryForgetErrors = { - /** - * MemoryApiClientError | InvalidRequestError - */ - 400: MemoryApiClientError | InvalidRequestError; - /** - * MemoryApiServerError - */ - 503: MemoryApiServerError; -}; + /** + * MemoryApiClientError | InvalidRequestError + */ + 400: MemoryApiClientError | InvalidRequestError + /** + * MemoryApiServerError + */ + 503: MemoryApiServerError +} -export type MemoryForgetError = MemoryForgetErrors[keyof MemoryForgetErrors]; +export type MemoryForgetError = MemoryForgetErrors[keyof MemoryForgetErrors] export type MemoryForgetResponses = { - /** - * Memory forget result - */ - 200: { - operationCount: number; - added: number; - removed: number; - skipped: Array<{ - reason: 'self_referential' | 'out_of_scope' | 'secret'; - text?: string; - }>; - index: { - text: string; - bytes: number; - tokens: number; - truncated: boolean; - }; - }; -}; + /** + * Memory forget result + */ + 200: { + operationCount: number + added: number + removed: number + skipped: Array<{ + reason: "self_referential" | "out_of_scope" | "secret" + text?: string + }> + index: { + text: string + bytes: number + tokens: number + truncated: boolean + } + } +} -export type MemoryForgetResponse = MemoryForgetResponses[keyof MemoryForgetResponses]; +export type MemoryForgetResponse = MemoryForgetResponses[keyof MemoryForgetResponses] export type MemoryPurgeData = { - body?: { - confirm: true; - }; - path?: never; - query?: { - directory?: string; - workspace?: string; - }; - url: '/memory/purge'; -}; + body?: { + confirm: true + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/memory/purge" +} export type MemoryPurgeErrors = { - /** - * MemoryApiClientError | InvalidRequestError - */ - 400: MemoryApiClientError | InvalidRequestError; - /** - * MemoryApiServerError - */ - 503: MemoryApiServerError; -}; + /** + * MemoryApiClientError | InvalidRequestError + */ + 400: MemoryApiClientError | InvalidRequestError + /** + * MemoryApiServerError + */ + 503: MemoryApiServerError +} -export type MemoryPurgeError = MemoryPurgeErrors[keyof MemoryPurgeErrors]; +export type MemoryPurgeError = MemoryPurgeErrors[keyof MemoryPurgeErrors] export type MemoryPurgeResponses = { - /** - * Memory purged - */ - 200: { - root: string; - purged: boolean; - }; -}; + /** + * Memory purged + */ + 200: { + root: string + purged: boolean + } +} -export type MemoryPurgeResponse = MemoryPurgeResponses[keyof MemoryPurgeResponses]; +export type MemoryPurgeResponse = MemoryPurgeResponses[keyof MemoryPurgeResponses] export type V2HealthGetData = { - body?: never; - path?: never; - query?: never; - url: '/api/health'; -}; + body?: never + path?: never + query?: never + url: "/api/health" +} export type V2HealthGetErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError +} -export type V2HealthGetError = V2HealthGetErrors[keyof V2HealthGetErrors]; +export type V2HealthGetError = V2HealthGetErrors[keyof V2HealthGetErrors] export type V2HealthGetResponses = { - /** - * Success - */ - 200: { - healthy: true; - }; -}; + /** + * Success + */ + 200: { + healthy: true + } +} -export type V2HealthGetResponse = V2HealthGetResponses[keyof V2HealthGetResponses]; +export type V2HealthGetResponse = V2HealthGetResponses[keyof V2HealthGetResponses] export type V2LocationGetData = { - body?: never; - path?: never; - query?: { - location?: { - directory?: string; - workspace?: string; - }; - }; - url: '/api/location'; -}; + body?: never + path?: never + query?: { + location?: { + directory?: string + workspace?: string + } + } + url: "/api/location" +} export type V2LocationGetErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError +} -export type V2LocationGetError = V2LocationGetErrors[keyof V2LocationGetErrors]; +export type V2LocationGetError = V2LocationGetErrors[keyof V2LocationGetErrors] export type V2LocationGetResponses = { - /** - * Location.Info - */ - 200: LocationInfo; -}; + /** + * Location.Info + */ + 200: LocationInfo +} -export type V2LocationGetResponse = V2LocationGetResponses[keyof V2LocationGetResponses]; +export type V2LocationGetResponse = V2LocationGetResponses[keyof V2LocationGetResponses] export type V2AgentListData = { - body?: never; - path?: never; - query?: { - location?: { - directory?: string; - workspace?: string; - }; - }; - url: '/api/agent'; -}; + body?: never + path?: never + query?: { + location?: { + directory?: string + workspace?: string + } + } + url: "/api/agent" +} export type V2AgentListErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError +} -export type V2AgentListError = V2AgentListErrors[keyof V2AgentListErrors]; +export type V2AgentListError = V2AgentListErrors[keyof V2AgentListErrors] export type V2AgentListResponses = { - /** - * Success - */ - 200: { - location: LocationInfo; - data: Array; - }; -}; + /** + * Success + */ + 200: { + location: LocationInfo + data: Array + } +} -export type V2AgentListResponse = V2AgentListResponses[keyof V2AgentListResponses]; +export type V2AgentListResponse = V2AgentListResponses[keyof V2AgentListResponses] export type V2SessionListData = { - body?: never; - path?: never; - query?: { - workspace?: string; - limit?: number; - order?: 'asc' | 'desc'; - search?: string; - directory?: string; - project?: string; - subpath?: string; - /** - * Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. - */ - cursor?: string; - }; - url: '/api/session'; -}; + body?: never + path?: never + query?: { + workspace?: string + limit?: number + order?: "asc" | "desc" + search?: string + directory?: string + project?: string + subpath?: string + /** + * Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. + */ + cursor?: string + } + url: "/api/session" +} export type V2SessionListErrors = { - /** - * InvalidCursorError | InvalidRequestError - */ - 400: InvalidCursorError | InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; -}; + /** + * InvalidCursorError | InvalidRequestError + */ + 400: InvalidCursorError | InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError +} -export type V2SessionListError = V2SessionListErrors[keyof V2SessionListErrors]; +export type V2SessionListError = V2SessionListErrors[keyof V2SessionListErrors] export type V2SessionListResponses = { - /** - * SessionsResponse - */ - 200: SessionsResponse; -}; + /** + * SessionsResponse + */ + 200: SessionsResponse +} -export type V2SessionListResponse = V2SessionListResponses[keyof V2SessionListResponses]; +export type V2SessionListResponse = V2SessionListResponses[keyof V2SessionListResponses] export type V2SessionCreateData = { - body: { - id?: string; - agent?: string; - model?: ModelRef; - location?: LocationRef; - }; - path?: never; - query?: never; - url: '/api/session'; -}; + body: { + id?: string + agent?: string + model?: ModelRef + location?: LocationRef + } + path?: never + query?: never + url: "/api/session" +} export type V2SessionCreateErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError +} -export type V2SessionCreateError = V2SessionCreateErrors[keyof V2SessionCreateErrors]; +export type V2SessionCreateError = V2SessionCreateErrors[keyof V2SessionCreateErrors] export type V2SessionCreateResponses = { - /** - * Success - */ - 200: { - data: SessionV2Info; - }; -}; + /** + * Success + */ + 200: { + data: SessionV2Info + } +} -export type V2SessionCreateResponse = V2SessionCreateResponses[keyof V2SessionCreateResponses]; +export type V2SessionCreateResponse = V2SessionCreateResponses[keyof V2SessionCreateResponses] export type V2SessionActiveData = { - body?: never; - path?: never; - query?: never; - url: '/api/session/active'; -}; + body?: never + path?: never + query?: never + url: "/api/session/active" +} export type V2SessionActiveErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError +} -export type V2SessionActiveError = V2SessionActiveErrors[keyof V2SessionActiveErrors]; +export type V2SessionActiveError = V2SessionActiveErrors[keyof V2SessionActiveErrors] export type V2SessionActiveResponses = { - /** - * Success - */ - 200: { - data: { - [key: string]: unknown | SessionActive; - }; - }; -}; + /** + * Success + */ + 200: { + data: { + [key: string]: unknown | SessionActive + } + } +} -export type V2SessionActiveResponse = V2SessionActiveResponses[keyof V2SessionActiveResponses]; +export type V2SessionActiveResponse = V2SessionActiveResponses[keyof V2SessionActiveResponses] export type V2SessionGetData = { - body?: never; - path: { - sessionID: string; - }; - query?: never; - url: '/api/session/{sessionID}'; -}; + body?: never + path: { + sessionID: string + } + query?: never + url: "/api/session/{sessionID}" +} export type V2SessionGetErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; - /** - * SessionNotFoundError - */ - 404: SessionNotFoundError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError + /** + * SessionNotFoundError + */ + 404: SessionNotFoundError +} -export type V2SessionGetError = V2SessionGetErrors[keyof V2SessionGetErrors]; +export type V2SessionGetError = V2SessionGetErrors[keyof V2SessionGetErrors] export type V2SessionGetResponses = { - /** - * Success - */ - 200: { - data: SessionV2Info; - }; -}; + /** + * Success + */ + 200: { + data: SessionV2Info + } +} -export type V2SessionGetResponse = V2SessionGetResponses[keyof V2SessionGetResponses]; +export type V2SessionGetResponse = V2SessionGetResponses[keyof V2SessionGetResponses] export type V2SessionSwitchAgentData = { - body: { - agent: string; - }; - path: { - sessionID: string; - }; - query?: never; - url: '/api/session/{sessionID}/agent'; -}; + body: { + agent: string + } + path: { + sessionID: string + } + query?: never + url: "/api/session/{sessionID}/agent" +} export type V2SessionSwitchAgentErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; - /** - * SessionNotFoundError - */ - 404: SessionNotFoundError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError + /** + * SessionNotFoundError + */ + 404: SessionNotFoundError +} -export type V2SessionSwitchAgentError = V2SessionSwitchAgentErrors[keyof V2SessionSwitchAgentErrors]; +export type V2SessionSwitchAgentError = V2SessionSwitchAgentErrors[keyof V2SessionSwitchAgentErrors] export type V2SessionSwitchAgentResponses = { - /** - * - */ - 204: void; -}; + /** + * + */ + 204: void +} -export type V2SessionSwitchAgentResponse = V2SessionSwitchAgentResponses[keyof V2SessionSwitchAgentResponses]; +export type V2SessionSwitchAgentResponse = V2SessionSwitchAgentResponses[keyof V2SessionSwitchAgentResponses] export type V2SessionSwitchModelData = { - body: { - model: ModelRef; - }; - path: { - sessionID: string; - }; - query?: never; - url: '/api/session/{sessionID}/model'; -}; + body: { + model: ModelRef + } + path: { + sessionID: string + } + query?: never + url: "/api/session/{sessionID}/model" +} export type V2SessionSwitchModelErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; - /** - * SessionNotFoundError - */ - 404: SessionNotFoundError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError + /** + * SessionNotFoundError + */ + 404: SessionNotFoundError +} -export type V2SessionSwitchModelError = V2SessionSwitchModelErrors[keyof V2SessionSwitchModelErrors]; +export type V2SessionSwitchModelError = V2SessionSwitchModelErrors[keyof V2SessionSwitchModelErrors] export type V2SessionSwitchModelResponses = { - /** - * - */ - 204: void; -}; + /** + * + */ + 204: void +} -export type V2SessionSwitchModelResponse = V2SessionSwitchModelResponses[keyof V2SessionSwitchModelResponses]; +export type V2SessionSwitchModelResponse = V2SessionSwitchModelResponses[keyof V2SessionSwitchModelResponses] export type V2SessionPromptData = { - body: { - id?: string; - prompt: PromptInput; - delivery?: 'steer' | 'queue'; - resume?: boolean; - }; - path: { - sessionID: string; - }; - query?: never; - url: '/api/session/{sessionID}/prompt'; -}; + body: { + id?: string + prompt: PromptInput + delivery?: "steer" | "queue" + resume?: boolean + } + path: { + sessionID: string + } + query?: never + url: "/api/session/{sessionID}/prompt" +} export type V2SessionPromptErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; - /** - * SessionNotFoundError - */ - 404: SessionNotFoundError; - /** - * ConflictError - */ - 409: ConflictError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError + /** + * SessionNotFoundError + */ + 404: SessionNotFoundError + /** + * ConflictError + */ + 409: ConflictError +} -export type V2SessionPromptError = V2SessionPromptErrors[keyof V2SessionPromptErrors]; +export type V2SessionPromptError = V2SessionPromptErrors[keyof V2SessionPromptErrors] export type V2SessionPromptResponses = { - /** - * Success - */ - 200: { - data: SessionInputAdmitted; - }; -}; + /** + * Success + */ + 200: { + data: SessionInputAdmitted + } +} -export type V2SessionPromptResponse = V2SessionPromptResponses[keyof V2SessionPromptResponses]; +export type V2SessionPromptResponse = V2SessionPromptResponses[keyof V2SessionPromptResponses] export type V2SessionCompactData = { - body?: never; - path: { - sessionID: string; - }; - query?: never; - url: '/api/session/{sessionID}/compact'; -}; + body?: never + path: { + sessionID: string + } + query?: never + url: "/api/session/{sessionID}/compact" +} export type V2SessionCompactErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; - /** - * SessionNotFoundError - */ - 404: SessionNotFoundError; - /** - * ServiceUnavailableError - */ - 503: ServiceUnavailableError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError + /** + * SessionNotFoundError + */ + 404: SessionNotFoundError + /** + * ServiceUnavailableError + */ + 503: ServiceUnavailableError +} -export type V2SessionCompactError = V2SessionCompactErrors[keyof V2SessionCompactErrors]; +export type V2SessionCompactError = V2SessionCompactErrors[keyof V2SessionCompactErrors] export type V2SessionCompactResponses = { - /** - * - */ - 204: void; -}; + /** + * + */ + 204: void +} -export type V2SessionCompactResponse = V2SessionCompactResponses[keyof V2SessionCompactResponses]; +export type V2SessionCompactResponse = V2SessionCompactResponses[keyof V2SessionCompactResponses] export type V2SessionWaitData = { - body?: never; - path: { - sessionID: string; - }; - query?: never; - url: '/api/session/{sessionID}/wait'; -}; + body?: never + path: { + sessionID: string + } + query?: never + url: "/api/session/{sessionID}/wait" +} export type V2SessionWaitErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; - /** - * SessionNotFoundError - */ - 404: SessionNotFoundError; - /** - * ServiceUnavailableError - */ - 503: ServiceUnavailableError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError + /** + * SessionNotFoundError + */ + 404: SessionNotFoundError + /** + * ServiceUnavailableError + */ + 503: ServiceUnavailableError +} -export type V2SessionWaitError = V2SessionWaitErrors[keyof V2SessionWaitErrors]; +export type V2SessionWaitError = V2SessionWaitErrors[keyof V2SessionWaitErrors] export type V2SessionWaitResponses = { - /** - * - */ - 204: void; -}; + /** + * + */ + 204: void +} -export type V2SessionWaitResponse = V2SessionWaitResponses[keyof V2SessionWaitResponses]; +export type V2SessionWaitResponse = V2SessionWaitResponses[keyof V2SessionWaitResponses] export type V2SessionRevertStageData = { - body: { - messageID: string; - files?: boolean; - }; - path: { - sessionID: string; - }; - query?: never; - url: '/api/session/{sessionID}/revert/stage'; -}; + body: { + messageID: string + files?: boolean + } + path: { + sessionID: string + } + query?: never + url: "/api/session/{sessionID}/revert/stage" +} export type V2SessionRevertStageErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; - /** - * MessageNotFoundError | SessionNotFoundError - */ - 404: MessageNotFoundError | SessionNotFoundError; - /** - * UnknownError - */ - 500: UnknownError1; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError + /** + * MessageNotFoundError | SessionNotFoundError + */ + 404: MessageNotFoundError | SessionNotFoundError + /** + * UnknownError + */ + 500: UnknownError1 +} -export type V2SessionRevertStageError = V2SessionRevertStageErrors[keyof V2SessionRevertStageErrors]; +export type V2SessionRevertStageError = V2SessionRevertStageErrors[keyof V2SessionRevertStageErrors] export type V2SessionRevertStageResponses = { - /** - * Success - */ - 200: { - data: RevertState; - }; -}; + /** + * Success + */ + 200: { + data: RevertState + } +} -export type V2SessionRevertStageResponse = V2SessionRevertStageResponses[keyof V2SessionRevertStageResponses]; +export type V2SessionRevertStageResponse = V2SessionRevertStageResponses[keyof V2SessionRevertStageResponses] export type V2SessionRevertClearData = { - body?: never; - path: { - sessionID: string; - }; - query?: never; - url: '/api/session/{sessionID}/revert/clear'; -}; + body?: never + path: { + sessionID: string + } + query?: never + url: "/api/session/{sessionID}/revert/clear" +} export type V2SessionRevertClearErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; - /** - * SessionNotFoundError - */ - 404: SessionNotFoundError; - /** - * UnknownError - */ - 500: UnknownError1; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError + /** + * SessionNotFoundError + */ + 404: SessionNotFoundError + /** + * UnknownError + */ + 500: UnknownError1 +} -export type V2SessionRevertClearError = V2SessionRevertClearErrors[keyof V2SessionRevertClearErrors]; +export type V2SessionRevertClearError = V2SessionRevertClearErrors[keyof V2SessionRevertClearErrors] export type V2SessionRevertClearResponses = { - /** - * - */ - 204: void; -}; + /** + * + */ + 204: void +} -export type V2SessionRevertClearResponse = V2SessionRevertClearResponses[keyof V2SessionRevertClearResponses]; +export type V2SessionRevertClearResponse = V2SessionRevertClearResponses[keyof V2SessionRevertClearResponses] export type V2SessionRevertCommitData = { - body?: never; - path: { - sessionID: string; - }; - query?: never; - url: '/api/session/{sessionID}/revert/commit'; -}; + body?: never + path: { + sessionID: string + } + query?: never + url: "/api/session/{sessionID}/revert/commit" +} export type V2SessionRevertCommitErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; - /** - * SessionNotFoundError - */ - 404: SessionNotFoundError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError + /** + * SessionNotFoundError + */ + 404: SessionNotFoundError +} -export type V2SessionRevertCommitError = V2SessionRevertCommitErrors[keyof V2SessionRevertCommitErrors]; +export type V2SessionRevertCommitError = V2SessionRevertCommitErrors[keyof V2SessionRevertCommitErrors] export type V2SessionRevertCommitResponses = { - /** - * - */ - 204: void; -}; + /** + * + */ + 204: void +} -export type V2SessionRevertCommitResponse = V2SessionRevertCommitResponses[keyof V2SessionRevertCommitResponses]; +export type V2SessionRevertCommitResponse = V2SessionRevertCommitResponses[keyof V2SessionRevertCommitResponses] export type V2SessionContextData = { - body?: never; - path: { - sessionID: string; - }; - query?: never; - url: '/api/session/{sessionID}/context'; -}; + body?: never + path: { + sessionID: string + } + query?: never + url: "/api/session/{sessionID}/context" +} export type V2SessionContextErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; - /** - * SessionNotFoundError - */ - 404: SessionNotFoundError; - /** - * UnknownError - */ - 500: UnknownError1; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError + /** + * SessionNotFoundError + */ + 404: SessionNotFoundError + /** + * UnknownError + */ + 500: UnknownError1 +} -export type V2SessionContextError = V2SessionContextErrors[keyof V2SessionContextErrors]; +export type V2SessionContextError = V2SessionContextErrors[keyof V2SessionContextErrors] export type V2SessionContextResponses = { - /** - * Success - */ - 200: { - data: Array; - }; -}; + /** + * Success + */ + 200: { + data: Array + } +} -export type V2SessionContextResponse = V2SessionContextResponses[keyof V2SessionContextResponses]; +export type V2SessionContextResponse = V2SessionContextResponses[keyof V2SessionContextResponses] export type V2SessionHistoryData = { - body?: never; - path: { - sessionID: string; - }; - query?: { - limit?: string; - after?: string; - }; - url: '/api/session/{sessionID}/history'; -}; + body?: never + path: { + sessionID: string + } + query?: { + limit?: number + after?: number + } + url: "/api/session/{sessionID}/history" +} export type V2SessionHistoryErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; - /** - * SessionNotFoundError - */ - 404: SessionNotFoundError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError + /** + * SessionNotFoundError + */ + 404: SessionNotFoundError +} -export type V2SessionHistoryError = V2SessionHistoryErrors[keyof V2SessionHistoryErrors]; +export type V2SessionHistoryError = V2SessionHistoryErrors[keyof V2SessionHistoryErrors] export type V2SessionHistoryResponses = { - /** - * SessionHistory - */ - 200: SessionHistory; -}; + /** + * SessionHistory + */ + 200: SessionHistory +} -export type V2SessionHistoryResponse = V2SessionHistoryResponses[keyof V2SessionHistoryResponses]; +export type V2SessionHistoryResponse = V2SessionHistoryResponses[keyof V2SessionHistoryResponses] export type V2SessionEventsData = { - body?: never; - path: { - sessionID: string; - }; - query?: { - after?: string; - }; - url: '/api/session/{sessionID}/event'; -}; + body?: never + path: { + sessionID: string + } + query?: { + after?: string + } + url: "/api/session/{sessionID}/event" +} export type V2SessionEventsErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; - /** - * SessionNotFoundError - */ - 404: SessionNotFoundError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError + /** + * SessionNotFoundError + */ + 404: SessionNotFoundError +} -export type V2SessionEventsError = V2SessionEventsErrors[keyof V2SessionEventsErrors]; +export type V2SessionEventsError = V2SessionEventsErrors[keyof V2SessionEventsErrors] export type V2SessionEventsResponses = { - /** - * Success - */ - 200: { - id: string; - event: string; - data: SessionDurableEventStream; - }; -}; + /** + * Success + */ + 200: { + id: string + event: string + data: SessionDurableEventStream + } +} -export type V2SessionEventsResponse = V2SessionEventsResponses[keyof V2SessionEventsResponses]; +export type V2SessionEventsResponse = V2SessionEventsResponses[keyof V2SessionEventsResponses] export type V2SessionInterruptData = { - body?: never; - path: { - sessionID: string; - }; - query?: never; - url: '/api/session/{sessionID}/interrupt'; -}; + body?: never + path: { + sessionID: string + } + query?: never + url: "/api/session/{sessionID}/interrupt" +} export type V2SessionInterruptErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; - /** - * SessionNotFoundError - */ - 404: SessionNotFoundError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError + /** + * SessionNotFoundError + */ + 404: SessionNotFoundError +} -export type V2SessionInterruptError = V2SessionInterruptErrors[keyof V2SessionInterruptErrors]; +export type V2SessionInterruptError = V2SessionInterruptErrors[keyof V2SessionInterruptErrors] export type V2SessionInterruptResponses = { - /** - * - */ - 204: void; -}; + /** + * + */ + 204: void +} -export type V2SessionInterruptResponse = V2SessionInterruptResponses[keyof V2SessionInterruptResponses]; +export type V2SessionInterruptResponse = V2SessionInterruptResponses[keyof V2SessionInterruptResponses] export type V2SessionMessageData = { - body?: never; - path: { - sessionID: string; - messageID: string; - }; - query?: never; - url: '/api/session/{sessionID}/message/{messageID}'; -}; + body?: never + path: { + sessionID: string + messageID: string + } + query?: never + url: "/api/session/{sessionID}/message/{messageID}" +} export type V2SessionMessageErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; - /** - * SessionNotFoundError | MessageNotFoundError - */ - 404: MessageNotFoundError | SessionNotFoundError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError + /** + * SessionNotFoundError | MessageNotFoundError + */ + 404: MessageNotFoundError | SessionNotFoundError +} -export type V2SessionMessageError = V2SessionMessageErrors[keyof V2SessionMessageErrors]; +export type V2SessionMessageError = V2SessionMessageErrors[keyof V2SessionMessageErrors] export type V2SessionMessageResponses = { - /** - * Success - */ - 200: { - data: SessionMessage; - }; -}; + /** + * Success + */ + 200: { + data: SessionMessage + } +} -export type V2SessionMessageResponse = V2SessionMessageResponses[keyof V2SessionMessageResponses]; +export type V2SessionMessageResponse = V2SessionMessageResponses[keyof V2SessionMessageResponses] export type V2SessionMessagesData = { - body?: never; - path: { - sessionID: string; - }; - query?: { - limit?: number; - order?: 'asc' | 'desc'; - /** - * Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order. - */ - cursor?: string; - }; - url: '/api/session/{sessionID}/message'; -}; + body?: never + path: { + sessionID: string + } + query?: { + limit?: number + order?: "asc" | "desc" + /** + * Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order. + */ + cursor?: string + } + url: "/api/session/{sessionID}/message" +} export type V2SessionMessagesErrors = { - /** - * InvalidCursorError | InvalidRequestError - */ - 400: InvalidCursorError | InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; - /** - * SessionNotFoundError - */ - 404: SessionNotFoundError; - /** - * UnknownError - */ - 500: UnknownError1; -}; + /** + * InvalidCursorError | InvalidRequestError + */ + 400: InvalidCursorError | InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError + /** + * SessionNotFoundError + */ + 404: SessionNotFoundError + /** + * UnknownError + */ + 500: UnknownError1 +} -export type V2SessionMessagesError = V2SessionMessagesErrors[keyof V2SessionMessagesErrors]; +export type V2SessionMessagesError = V2SessionMessagesErrors[keyof V2SessionMessagesErrors] export type V2SessionMessagesResponses = { - /** - * SessionMessagesResponse - */ - 200: SessionMessagesResponse; -}; + /** + * SessionMessagesResponse + */ + 200: SessionMessagesResponse +} -export type V2SessionMessagesResponse = V2SessionMessagesResponses[keyof V2SessionMessagesResponses]; +export type V2SessionMessagesResponse = V2SessionMessagesResponses[keyof V2SessionMessagesResponses] export type V2ModelListData = { - body?: never; - path?: never; - query?: { - location?: { - directory?: string; - workspace?: string; - }; - }; - url: '/api/model'; -}; + body?: never + path?: never + query?: { + location?: { + directory?: string + workspace?: string + } + } + url: "/api/model" +} export type V2ModelListErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; - /** - * ServiceUnavailableError - */ - 503: ServiceUnavailableError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError + /** + * ServiceUnavailableError + */ + 503: ServiceUnavailableError +} -export type V2ModelListError = V2ModelListErrors[keyof V2ModelListErrors]; +export type V2ModelListError = V2ModelListErrors[keyof V2ModelListErrors] export type V2ModelListResponses = { - /** - * Success - */ - 200: { - location: LocationInfo; - data: Array; - }; -}; + /** + * Success + */ + 200: { + location: LocationInfo + data: Array + } +} -export type V2ModelListResponse = V2ModelListResponses[keyof V2ModelListResponses]; +export type V2ModelListResponse = V2ModelListResponses[keyof V2ModelListResponses] export type V2ProviderListData = { - body?: never; - path?: never; - query?: { - location?: { - directory?: string; - workspace?: string; - }; - }; - url: '/api/provider'; -}; + body?: never + path?: never + query?: { + location?: { + directory?: string + workspace?: string + } + } + url: "/api/provider" +} export type V2ProviderListErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; - /** - * ServiceUnavailableError - */ - 503: ServiceUnavailableError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError + /** + * ServiceUnavailableError + */ + 503: ServiceUnavailableError +} -export type V2ProviderListError = V2ProviderListErrors[keyof V2ProviderListErrors]; +export type V2ProviderListError = V2ProviderListErrors[keyof V2ProviderListErrors] export type V2ProviderListResponses = { - /** - * Success - */ - 200: { - location: LocationInfo; - data: Array; - }; -}; + /** + * Success + */ + 200: { + location: LocationInfo + data: Array + } +} -export type V2ProviderListResponse = V2ProviderListResponses[keyof V2ProviderListResponses]; +export type V2ProviderListResponse = V2ProviderListResponses[keyof V2ProviderListResponses] export type V2ProviderGetData = { - body?: never; - path: { - providerID: string; - }; - query?: { - location?: { - directory?: string; - workspace?: string; - }; - }; - url: '/api/provider/{providerID}'; -}; + body?: never + path: { + providerID: string + } + query?: { + location?: { + directory?: string + workspace?: string + } + } + url: "/api/provider/{providerID}" +} export type V2ProviderGetErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; - /** - * ProviderNotFoundError - */ - 404: ProviderNotFoundError; - /** - * ServiceUnavailableError - */ - 503: ServiceUnavailableError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError + /** + * ProviderNotFoundError + */ + 404: ProviderNotFoundError + /** + * ServiceUnavailableError + */ + 503: ServiceUnavailableError +} -export type V2ProviderGetError = V2ProviderGetErrors[keyof V2ProviderGetErrors]; +export type V2ProviderGetError = V2ProviderGetErrors[keyof V2ProviderGetErrors] export type V2ProviderGetResponses = { - /** - * Success - */ - 200: { - location: LocationInfo; - data: ProviderV2Info; - }; -}; + /** + * Success + */ + 200: { + location: LocationInfo + data: ProviderV2Info + } +} -export type V2ProviderGetResponse = V2ProviderGetResponses[keyof V2ProviderGetResponses]; +export type V2ProviderGetResponse = V2ProviderGetResponses[keyof V2ProviderGetResponses] export type V2IntegrationListData = { - body?: never; - path?: never; - query?: { - location?: { - directory?: string; - workspace?: string; - }; - }; - url: '/api/integration'; -}; + body?: never + path?: never + query?: { + location?: { + directory?: string + workspace?: string + } + } + url: "/api/integration" +} export type V2IntegrationListErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError +} -export type V2IntegrationListError = V2IntegrationListErrors[keyof V2IntegrationListErrors]; +export type V2IntegrationListError = V2IntegrationListErrors[keyof V2IntegrationListErrors] export type V2IntegrationListResponses = { - /** - * Success - */ - 200: { - location: LocationInfo; - data: Array; - }; -}; + /** + * Success + */ + 200: { + location: LocationInfo + data: Array + } +} -export type V2IntegrationListResponse = V2IntegrationListResponses[keyof V2IntegrationListResponses]; +export type V2IntegrationListResponse = V2IntegrationListResponses[keyof V2IntegrationListResponses] export type V2IntegrationGetData = { - body?: never; - path: { - integrationID: string; - }; - query?: { - location?: { - directory?: string; - workspace?: string; - }; - }; - url: '/api/integration/{integrationID}'; -}; + body?: never + path: { + integrationID: string + } + query?: { + location?: { + directory?: string + workspace?: string + } + } + url: "/api/integration/{integrationID}" +} export type V2IntegrationGetErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError +} -export type V2IntegrationGetError = V2IntegrationGetErrors[keyof V2IntegrationGetErrors]; +export type V2IntegrationGetError = V2IntegrationGetErrors[keyof V2IntegrationGetErrors] export type V2IntegrationGetResponses = { - /** - * Success - */ - 200: { - location: LocationInfo; - data: IntegrationInfo; - }; -}; + /** + * Success + */ + 200: { + location: LocationInfo + data: IntegrationInfo + } +} -export type V2IntegrationGetResponse = V2IntegrationGetResponses[keyof V2IntegrationGetResponses]; +export type V2IntegrationGetResponse = V2IntegrationGetResponses[keyof V2IntegrationGetResponses] export type V2IntegrationConnectKeyData = { - body: { - key: string; - label?: string; - }; - path: { - integrationID: string; - }; - query?: { - location?: { - directory?: string; - workspace?: string; - }; - }; - url: '/api/integration/{integrationID}/connect/key'; -}; + body: { + key: string + label?: string + } + path: { + integrationID: string + } + query?: { + location?: { + directory?: string + workspace?: string + } + } + url: "/api/integration/{integrationID}/connect/key" +} export type V2IntegrationConnectKeyErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError +} -export type V2IntegrationConnectKeyError = V2IntegrationConnectKeyErrors[keyof V2IntegrationConnectKeyErrors]; +export type V2IntegrationConnectKeyError = V2IntegrationConnectKeyErrors[keyof V2IntegrationConnectKeyErrors] export type V2IntegrationConnectKeyResponses = { - /** - * - */ - 204: void; -}; + /** + * + */ + 204: void +} -export type V2IntegrationConnectKeyResponse = V2IntegrationConnectKeyResponses[keyof V2IntegrationConnectKeyResponses]; +export type V2IntegrationConnectKeyResponse = V2IntegrationConnectKeyResponses[keyof V2IntegrationConnectKeyResponses] export type V2IntegrationConnectOauthData = { - body: { - methodID: string; - inputs: { - [key: string]: string; - }; - label?: string; - }; - path: { - integrationID: string; - }; - query?: { - location?: { - directory?: string; - workspace?: string; - }; - }; - url: '/api/integration/{integrationID}/connect/oauth'; -}; + body: { + methodID: string + inputs: { + [key: string]: string + } + label?: string + } + path: { + integrationID: string + } + query?: { + location?: { + directory?: string + workspace?: string + } + } + url: "/api/integration/{integrationID}/connect/oauth" +} export type V2IntegrationConnectOauthErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError +} -export type V2IntegrationConnectOauthError = V2IntegrationConnectOauthErrors[keyof V2IntegrationConnectOauthErrors]; +export type V2IntegrationConnectOauthError = V2IntegrationConnectOauthErrors[keyof V2IntegrationConnectOauthErrors] export type V2IntegrationConnectOauthResponses = { - /** - * Success - */ - 200: { - location: LocationInfo; - data: IntegrationAttempt; - }; -}; + /** + * Success + */ + 200: { + location: LocationInfo + data: IntegrationAttempt + } +} -export type V2IntegrationConnectOauthResponse = V2IntegrationConnectOauthResponses[keyof V2IntegrationConnectOauthResponses]; +export type V2IntegrationConnectOauthResponse = + V2IntegrationConnectOauthResponses[keyof V2IntegrationConnectOauthResponses] export type V2IntegrationAttemptCancelData = { - body?: never; - path: { - attemptID: string; - }; - query?: { - location?: { - directory?: string; - workspace?: string; - }; - }; - url: '/api/integration/attempt/{attemptID}'; -}; + body?: never + path: { + attemptID: string + } + query?: { + location?: { + directory?: string + workspace?: string + } + } + url: "/api/integration/attempt/{attemptID}" +} export type V2IntegrationAttemptCancelErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError +} -export type V2IntegrationAttemptCancelError = V2IntegrationAttemptCancelErrors[keyof V2IntegrationAttemptCancelErrors]; +export type V2IntegrationAttemptCancelError = V2IntegrationAttemptCancelErrors[keyof V2IntegrationAttemptCancelErrors] export type V2IntegrationAttemptCancelResponses = { - /** - * - */ - 204: void; -}; + /** + * + */ + 204: void +} -export type V2IntegrationAttemptCancelResponse = V2IntegrationAttemptCancelResponses[keyof V2IntegrationAttemptCancelResponses]; +export type V2IntegrationAttemptCancelResponse = + V2IntegrationAttemptCancelResponses[keyof V2IntegrationAttemptCancelResponses] export type V2IntegrationAttemptStatusData = { - body?: never; - path: { - attemptID: string; - }; - query?: { - location?: { - directory?: string; - workspace?: string; - }; - }; - url: '/api/integration/attempt/{attemptID}'; -}; + body?: never + path: { + attemptID: string + } + query?: { + location?: { + directory?: string + workspace?: string + } + } + url: "/api/integration/attempt/{attemptID}" +} export type V2IntegrationAttemptStatusErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError +} -export type V2IntegrationAttemptStatusError = V2IntegrationAttemptStatusErrors[keyof V2IntegrationAttemptStatusErrors]; +export type V2IntegrationAttemptStatusError = V2IntegrationAttemptStatusErrors[keyof V2IntegrationAttemptStatusErrors] export type V2IntegrationAttemptStatusResponses = { - /** - * Success - */ - 200: { - location: LocationInfo; - data: IntegrationAttemptStatus; - }; -}; + /** + * Success + */ + 200: { + location: LocationInfo + data: IntegrationAttemptStatus + } +} -export type V2IntegrationAttemptStatusResponse = V2IntegrationAttemptStatusResponses[keyof V2IntegrationAttemptStatusResponses]; +export type V2IntegrationAttemptStatusResponse = + V2IntegrationAttemptStatusResponses[keyof V2IntegrationAttemptStatusResponses] export type V2IntegrationAttemptCompleteData = { - body: { - code?: string; - }; - path: { - attemptID: string; - }; - query?: { - location?: { - directory?: string; - workspace?: string; - }; - }; - url: '/api/integration/attempt/{attemptID}/complete'; -}; + body: { + code?: string + } + path: { + attemptID: string + } + query?: { + location?: { + directory?: string + workspace?: string + } + } + url: "/api/integration/attempt/{attemptID}/complete" +} export type V2IntegrationAttemptCompleteErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError +} -export type V2IntegrationAttemptCompleteError = V2IntegrationAttemptCompleteErrors[keyof V2IntegrationAttemptCompleteErrors]; +export type V2IntegrationAttemptCompleteError = + V2IntegrationAttemptCompleteErrors[keyof V2IntegrationAttemptCompleteErrors] export type V2IntegrationAttemptCompleteResponses = { - /** - * - */ - 204: void; -}; + /** + * + */ + 204: void +} -export type V2IntegrationAttemptCompleteResponse = V2IntegrationAttemptCompleteResponses[keyof V2IntegrationAttemptCompleteResponses]; +export type V2IntegrationAttemptCompleteResponse = + V2IntegrationAttemptCompleteResponses[keyof V2IntegrationAttemptCompleteResponses] export type V2CredentialRemoveData = { - body?: never; - path: { - credentialID: string; - }; - query?: { - location?: { - directory?: string; - workspace?: string; - }; - }; - url: '/api/credential/{credentialID}'; -}; + body?: never + path: { + credentialID: string + } + query?: { + location?: { + directory?: string + workspace?: string + } + } + url: "/api/credential/{credentialID}" +} export type V2CredentialRemoveErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError +} -export type V2CredentialRemoveError = V2CredentialRemoveErrors[keyof V2CredentialRemoveErrors]; +export type V2CredentialRemoveError = V2CredentialRemoveErrors[keyof V2CredentialRemoveErrors] export type V2CredentialRemoveResponses = { - /** - * - */ - 204: void; -}; + /** + * + */ + 204: void +} -export type V2CredentialRemoveResponse = V2CredentialRemoveResponses[keyof V2CredentialRemoveResponses]; +export type V2CredentialRemoveResponse = V2CredentialRemoveResponses[keyof V2CredentialRemoveResponses] export type V2CredentialUpdateData = { - body: { - label: string; - }; - path: { - credentialID: string; - }; - query?: { - location?: { - directory?: string; - workspace?: string; - }; - }; - url: '/api/credential/{credentialID}'; -}; + body: { + label: string + } + path: { + credentialID: string + } + query?: { + location?: { + directory?: string + workspace?: string + } + } + url: "/api/credential/{credentialID}" +} export type V2CredentialUpdateErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError +} -export type V2CredentialUpdateError = V2CredentialUpdateErrors[keyof V2CredentialUpdateErrors]; +export type V2CredentialUpdateError = V2CredentialUpdateErrors[keyof V2CredentialUpdateErrors] export type V2CredentialUpdateResponses = { - /** - * - */ - 204: void; -}; + /** + * + */ + 204: void +} -export type V2CredentialUpdateResponse = V2CredentialUpdateResponses[keyof V2CredentialUpdateResponses]; +export type V2CredentialUpdateResponse = V2CredentialUpdateResponses[keyof V2CredentialUpdateResponses] export type V2PermissionRequestListData = { - body?: never; - path?: never; - query?: { - location?: { - directory?: string; - workspace?: string; - }; - }; - url: '/api/permission/request'; -}; + body?: never + path?: never + query?: { + location?: { + directory?: string + workspace?: string + } + } + url: "/api/permission/request" +} export type V2PermissionRequestListErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError +} -export type V2PermissionRequestListError = V2PermissionRequestListErrors[keyof V2PermissionRequestListErrors]; +export type V2PermissionRequestListError = V2PermissionRequestListErrors[keyof V2PermissionRequestListErrors] export type V2PermissionRequestListResponses = { - /** - * Success - */ - 200: { - location: LocationInfo; - data: Array; - }; -}; + /** + * Success + */ + 200: { + location: LocationInfo + data: Array + } +} -export type V2PermissionRequestListResponse = V2PermissionRequestListResponses[keyof V2PermissionRequestListResponses]; +export type V2PermissionRequestListResponse = V2PermissionRequestListResponses[keyof V2PermissionRequestListResponses] export type V2PermissionSavedListData = { - body?: never; - path?: never; - query?: { - projectID?: string; - }; - url: '/api/permission/saved'; -}; + body?: never + path?: never + query?: { + projectID?: string + } + url: "/api/permission/saved" +} export type V2PermissionSavedListErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError +} -export type V2PermissionSavedListError = V2PermissionSavedListErrors[keyof V2PermissionSavedListErrors]; +export type V2PermissionSavedListError = V2PermissionSavedListErrors[keyof V2PermissionSavedListErrors] export type V2PermissionSavedListResponses = { - /** - * Success - */ - 200: { - data: Array; - }; -}; + /** + * Success + */ + 200: { + data: Array + } +} -export type V2PermissionSavedListResponse = V2PermissionSavedListResponses[keyof V2PermissionSavedListResponses]; +export type V2PermissionSavedListResponse = V2PermissionSavedListResponses[keyof V2PermissionSavedListResponses] export type V2PermissionSavedRemoveData = { - body?: never; - path: { - id: string; - }; - query?: never; - url: '/api/permission/saved/{id}'; -}; + body?: never + path: { + id: string + } + query?: never + url: "/api/permission/saved/{id}" +} export type V2PermissionSavedRemoveErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError +} -export type V2PermissionSavedRemoveError = V2PermissionSavedRemoveErrors[keyof V2PermissionSavedRemoveErrors]; +export type V2PermissionSavedRemoveError = V2PermissionSavedRemoveErrors[keyof V2PermissionSavedRemoveErrors] export type V2PermissionSavedRemoveResponses = { - /** - * - */ - 204: void; -}; + /** + * + */ + 204: void +} -export type V2PermissionSavedRemoveResponse = V2PermissionSavedRemoveResponses[keyof V2PermissionSavedRemoveResponses]; +export type V2PermissionSavedRemoveResponse = V2PermissionSavedRemoveResponses[keyof V2PermissionSavedRemoveResponses] export type V2SessionPermissionListData = { - body?: never; - path: { - sessionID: string; - }; - query?: never; - url: '/api/session/{sessionID}/permission'; -}; + body?: never + path: { + sessionID: string + } + query?: never + url: "/api/session/{sessionID}/permission" +} export type V2SessionPermissionListErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; - /** - * SessionNotFoundError - */ - 404: SessionNotFoundError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError + /** + * SessionNotFoundError + */ + 404: SessionNotFoundError +} -export type V2SessionPermissionListError = V2SessionPermissionListErrors[keyof V2SessionPermissionListErrors]; +export type V2SessionPermissionListError = V2SessionPermissionListErrors[keyof V2SessionPermissionListErrors] export type V2SessionPermissionListResponses = { - /** - * Success - */ - 200: { - data: Array; - }; -}; + /** + * Success + */ + 200: { + data: Array + } +} -export type V2SessionPermissionListResponse = V2SessionPermissionListResponses[keyof V2SessionPermissionListResponses]; +export type V2SessionPermissionListResponse = V2SessionPermissionListResponses[keyof V2SessionPermissionListResponses] export type V2SessionPermissionCreateData = { - body: { - id?: string; - action: string; - resources: Array; - save?: Array; - metadata?: { - [key: string]: unknown; - }; - source?: PermissionV2Source; - agent?: string; - }; - path: { - sessionID: string; - }; - query?: never; - url: '/api/session/{sessionID}/permission'; -}; + body: { + id?: string + action: string + resources: Array + save?: Array + metadata?: { + [key: string]: unknown + } + source?: PermissionV2Source + agent?: string + } + path: { + sessionID: string + } + query?: never + url: "/api/session/{sessionID}/permission" +} export type V2SessionPermissionCreateErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; - /** - * SessionNotFoundError - */ - 404: SessionNotFoundError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError + /** + * SessionNotFoundError + */ + 404: SessionNotFoundError +} -export type V2SessionPermissionCreateError = V2SessionPermissionCreateErrors[keyof V2SessionPermissionCreateErrors]; +export type V2SessionPermissionCreateError = V2SessionPermissionCreateErrors[keyof V2SessionPermissionCreateErrors] export type V2SessionPermissionCreateResponses = { - /** - * Success - */ - 200: { - data: { - id: string; - effect: PermissionV2Effect; - }; - }; -}; + /** + * Success + */ + 200: { + data: { + id: string + effect: PermissionV2Effect + } + } +} -export type V2SessionPermissionCreateResponse = V2SessionPermissionCreateResponses[keyof V2SessionPermissionCreateResponses]; +export type V2SessionPermissionCreateResponse = + V2SessionPermissionCreateResponses[keyof V2SessionPermissionCreateResponses] export type V2SessionPermissionGetData = { - body?: never; - path: { - sessionID: string; - requestID: string; - }; - query?: never; - url: '/api/session/{sessionID}/permission/{requestID}'; -}; + body?: never + path: { + sessionID: string + requestID: string + } + query?: never + url: "/api/session/{sessionID}/permission/{requestID}" +} export type V2SessionPermissionGetErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; - /** - * SessionNotFoundError | PermissionNotFoundError - */ - 404: PermissionNotFoundError | SessionNotFoundError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError + /** + * SessionNotFoundError | PermissionNotFoundError + */ + 404: PermissionNotFoundError | SessionNotFoundError +} -export type V2SessionPermissionGetError = V2SessionPermissionGetErrors[keyof V2SessionPermissionGetErrors]; +export type V2SessionPermissionGetError = V2SessionPermissionGetErrors[keyof V2SessionPermissionGetErrors] export type V2SessionPermissionGetResponses = { - /** - * Success - */ - 200: { - data: PermissionV2Request; - }; -}; + /** + * Success + */ + 200: { + data: PermissionV2Request + } +} -export type V2SessionPermissionGetResponse = V2SessionPermissionGetResponses[keyof V2SessionPermissionGetResponses]; +export type V2SessionPermissionGetResponse = V2SessionPermissionGetResponses[keyof V2SessionPermissionGetResponses] export type V2SessionPermissionReplyData = { - body: { - reply: PermissionV2Reply; - message?: string; - }; - path: { - sessionID: string; - requestID: string; - }; - query?: never; - url: '/api/session/{sessionID}/permission/{requestID}/reply'; -}; + body: { + reply: PermissionV2Reply + message?: string + } + path: { + sessionID: string + requestID: string + } + query?: never + url: "/api/session/{sessionID}/permission/{requestID}/reply" +} export type V2SessionPermissionReplyErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; - /** - * SessionNotFoundError | PermissionNotFoundError - */ - 404: PermissionNotFoundError | SessionNotFoundError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError + /** + * SessionNotFoundError | PermissionNotFoundError + */ + 404: PermissionNotFoundError | SessionNotFoundError +} -export type V2SessionPermissionReplyError = V2SessionPermissionReplyErrors[keyof V2SessionPermissionReplyErrors]; +export type V2SessionPermissionReplyError = V2SessionPermissionReplyErrors[keyof V2SessionPermissionReplyErrors] export type V2SessionPermissionReplyResponses = { - /** - * - */ - 204: void; -}; + /** + * + */ + 204: void +} -export type V2SessionPermissionReplyResponse = V2SessionPermissionReplyResponses[keyof V2SessionPermissionReplyResponses]; +export type V2SessionPermissionReplyResponse = + V2SessionPermissionReplyResponses[keyof V2SessionPermissionReplyResponses] export type V2FsReadData = { - body?: never; - path?: never; - query?: { - location?: { - directory?: string; - workspace?: string; - }; - path?: string; - }; - url: '/api/fs/read/*'; -}; + body?: never + path?: never + query?: { + location?: { + directory?: string + workspace?: string + } + path?: string + } + url: "/api/fs/read/*" +} export type V2FsReadErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError +} -export type V2FsReadError = V2FsReadErrors[keyof V2FsReadErrors]; +export type V2FsReadError = V2FsReadErrors[keyof V2FsReadErrors] export type V2FsReadResponses = { - /** - * Success - */ - 200: Blob | File; -}; + /** + * Success + */ + 200: Blob | File +} -export type V2FsReadResponse = V2FsReadResponses[keyof V2FsReadResponses]; +export type V2FsReadResponse = V2FsReadResponses[keyof V2FsReadResponses] export type V2FsListData = { - body?: never; - path?: never; - query?: { - location?: { - directory?: string; - workspace?: string; - }; - path?: string; - }; - url: '/api/fs/list'; -}; + body?: never + path?: never + query?: { + location?: { + directory?: string + workspace?: string + } + path?: string + } + url: "/api/fs/list" +} export type V2FsListErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError +} -export type V2FsListError = V2FsListErrors[keyof V2FsListErrors]; +export type V2FsListError = V2FsListErrors[keyof V2FsListErrors] export type V2FsListResponses = { - /** - * Success - */ - 200: { - location: LocationInfo; - data: Array; - }; -}; + /** + * Success + */ + 200: { + location: LocationInfo + data: Array + } +} -export type V2FsListResponse = V2FsListResponses[keyof V2FsListResponses]; +export type V2FsListResponse = V2FsListResponses[keyof V2FsListResponses] export type V2FsFindData = { - body?: never; - path?: never; - query: { - location?: { - directory?: string; - workspace?: string; - }; - query: string; - type?: 'file' | 'directory'; - limit?: string; - }; - url: '/api/fs/find'; -}; + body?: never + path?: never + query: { + location?: { + directory?: string + workspace?: string + } + query: string + type?: "file" | "directory" + limit?: string + } + url: "/api/fs/find" +} export type V2FsFindErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError +} -export type V2FsFindError = V2FsFindErrors[keyof V2FsFindErrors]; +export type V2FsFindError = V2FsFindErrors[keyof V2FsFindErrors] export type V2FsFindResponses = { - /** - * Success - */ - 200: { - location: LocationInfo; - data: Array; - }; -}; + /** + * Success + */ + 200: { + location: LocationInfo + data: Array + } +} -export type V2FsFindResponse = V2FsFindResponses[keyof V2FsFindResponses]; +export type V2FsFindResponse = V2FsFindResponses[keyof V2FsFindResponses] export type V2CommandListData = { - body?: never; - path?: never; - query?: { - location?: { - directory?: string; - workspace?: string; - }; - }; - url: '/api/command'; -}; + body?: never + path?: never + query?: { + location?: { + directory?: string + workspace?: string + } + } + url: "/api/command" +} export type V2CommandListErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError +} -export type V2CommandListError = V2CommandListErrors[keyof V2CommandListErrors]; +export type V2CommandListError = V2CommandListErrors[keyof V2CommandListErrors] export type V2CommandListResponses = { - /** - * Success - */ - 200: { - location: LocationInfo; - data: Array; - }; -}; + /** + * Success + */ + 200: { + location: LocationInfo + data: Array + } +} -export type V2CommandListResponse = V2CommandListResponses[keyof V2CommandListResponses]; +export type V2CommandListResponse = V2CommandListResponses[keyof V2CommandListResponses] export type V2SkillListData = { - body?: never; - path?: never; - query?: { - location?: { - directory?: string; - workspace?: string; - }; - }; - url: '/api/skill'; -}; + body?: never + path?: never + query?: { + location?: { + directory?: string + workspace?: string + } + } + url: "/api/skill" +} export type V2SkillListErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError +} -export type V2SkillListError = V2SkillListErrors[keyof V2SkillListErrors]; +export type V2SkillListError = V2SkillListErrors[keyof V2SkillListErrors] export type V2SkillListResponses = { - /** - * Success - */ - 200: { - location: LocationInfo; - data: Array; - }; -}; + /** + * Success + */ + 200: { + location: LocationInfo + data: Array + } +} -export type V2SkillListResponse = V2SkillListResponses[keyof V2SkillListResponses]; +export type V2SkillListResponse = V2SkillListResponses[keyof V2SkillListResponses] export type V2EventSubscribeData = { - body?: never; - path?: never; - query?: never; - url: '/api/event'; -}; + body?: never + path?: never + query?: never + url: "/api/event" +} export type V2EventSubscribeErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError +} -export type V2EventSubscribeError = V2EventSubscribeErrors[keyof V2EventSubscribeErrors]; +export type V2EventSubscribeError = V2EventSubscribeErrors[keyof V2EventSubscribeErrors] export type V2EventSubscribeResponses = { - /** - * Event stream - */ - 200: V2Event; -}; + /** + * Event stream + */ + 200: V2Event +} -export type V2EventSubscribeResponse = V2EventSubscribeResponses[keyof V2EventSubscribeResponses]; +export type V2EventSubscribeResponse = V2EventSubscribeResponses[keyof V2EventSubscribeResponses] export type V2PtyListData = { - body?: never; - path?: never; - query?: { - location?: { - directory?: string; - workspace?: string; - }; - }; - url: '/api/pty'; -}; + body?: never + path?: never + query?: { + location?: { + directory?: string + workspace?: string + } + } + url: "/api/pty" +} export type V2PtyListErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError +} -export type V2PtyListError = V2PtyListErrors[keyof V2PtyListErrors]; +export type V2PtyListError = V2PtyListErrors[keyof V2PtyListErrors] export type V2PtyListResponses = { - /** - * Success - */ - 200: { - location: LocationInfo; - data: Array; - }; -}; + /** + * Success + */ + 200: { + location: LocationInfo + data: Array + } +} -export type V2PtyListResponse = V2PtyListResponses[keyof V2PtyListResponses]; +export type V2PtyListResponse = V2PtyListResponses[keyof V2PtyListResponses] export type V2PtyCreateData = { - body: { - command?: string; - args?: Array; - cwd?: string; - title?: string; - env?: { - [key: string]: string; - }; - }; - path?: never; - query?: { - location?: { - directory?: string; - workspace?: string; - }; - }; - url: '/api/pty'; -}; + body: { + command?: string + args?: Array + cwd?: string + title?: string + env?: { + [key: string]: string + } + } + path?: never + query?: { + location?: { + directory?: string + workspace?: string + } + } + url: "/api/pty" +} export type V2PtyCreateErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError +} -export type V2PtyCreateError = V2PtyCreateErrors[keyof V2PtyCreateErrors]; +export type V2PtyCreateError = V2PtyCreateErrors[keyof V2PtyCreateErrors] export type V2PtyCreateResponses = { - /** - * Success - */ - 200: { - location: LocationInfo; - data: Pty; - }; -}; + /** + * Success + */ + 200: { + location: LocationInfo + data: Pty + } +} -export type V2PtyCreateResponse = V2PtyCreateResponses[keyof V2PtyCreateResponses]; +export type V2PtyCreateResponse = V2PtyCreateResponses[keyof V2PtyCreateResponses] export type V2PtyRemoveData = { - body?: never; - path: { - ptyID: string; - }; - query?: { - location?: { - directory?: string; - workspace?: string; - }; - }; - url: '/api/pty/{ptyID}'; -}; + body?: never + path: { + ptyID: string + } + query?: { + location?: { + directory?: string + workspace?: string + } + } + url: "/api/pty/{ptyID}" +} export type V2PtyRemoveErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; - /** - * PtyNotFoundError - */ - 404: PtyNotFoundError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError + /** + * PtyNotFoundError + */ + 404: PtyNotFoundError +} -export type V2PtyRemoveError = V2PtyRemoveErrors[keyof V2PtyRemoveErrors]; +export type V2PtyRemoveError = V2PtyRemoveErrors[keyof V2PtyRemoveErrors] export type V2PtyRemoveResponses = { - /** - * - */ - 204: void; -}; + /** + * + */ + 204: void +} -export type V2PtyRemoveResponse = V2PtyRemoveResponses[keyof V2PtyRemoveResponses]; +export type V2PtyRemoveResponse = V2PtyRemoveResponses[keyof V2PtyRemoveResponses] export type V2PtyGetData = { - body?: never; - path: { - ptyID: string; - }; - query?: { - location?: { - directory?: string; - workspace?: string; - }; - }; - url: '/api/pty/{ptyID}'; -}; + body?: never + path: { + ptyID: string + } + query?: { + location?: { + directory?: string + workspace?: string + } + } + url: "/api/pty/{ptyID}" +} export type V2PtyGetErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; - /** - * PtyNotFoundError - */ - 404: PtyNotFoundError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError + /** + * PtyNotFoundError + */ + 404: PtyNotFoundError +} -export type V2PtyGetError = V2PtyGetErrors[keyof V2PtyGetErrors]; +export type V2PtyGetError = V2PtyGetErrors[keyof V2PtyGetErrors] export type V2PtyGetResponses = { - /** - * Success - */ - 200: { - location: LocationInfo; - data: Pty; - }; -}; + /** + * Success + */ + 200: { + location: LocationInfo + data: Pty + } +} -export type V2PtyGetResponse = V2PtyGetResponses[keyof V2PtyGetResponses]; +export type V2PtyGetResponse = V2PtyGetResponses[keyof V2PtyGetResponses] export type V2PtyUpdateData = { - body: { - title?: string; - size?: { - rows: number; - cols: number; - }; - }; - path: { - ptyID: string; - }; - query?: { - location?: { - directory?: string; - workspace?: string; - }; - }; - url: '/api/pty/{ptyID}'; -}; + body: { + title?: string + size?: { + rows: number + cols: number + } + } + path: { + ptyID: string + } + query?: { + location?: { + directory?: string + workspace?: string + } + } + url: "/api/pty/{ptyID}" +} export type V2PtyUpdateErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; - /** - * PtyNotFoundError - */ - 404: PtyNotFoundError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError + /** + * PtyNotFoundError + */ + 404: PtyNotFoundError +} -export type V2PtyUpdateError = V2PtyUpdateErrors[keyof V2PtyUpdateErrors]; +export type V2PtyUpdateError = V2PtyUpdateErrors[keyof V2PtyUpdateErrors] export type V2PtyUpdateResponses = { - /** - * Success - */ - 200: { - location: LocationInfo; - data: Pty; - }; -}; + /** + * Success + */ + 200: { + location: LocationInfo + data: Pty + } +} -export type V2PtyUpdateResponse = V2PtyUpdateResponses[keyof V2PtyUpdateResponses]; +export type V2PtyUpdateResponse = V2PtyUpdateResponses[keyof V2PtyUpdateResponses] export type V2PtyConnectTokenData = { - body?: never; - path: { - ptyID: string; - }; - query?: { - location?: { - directory?: string; - workspace?: string; - }; - }; - url: '/api/pty/{ptyID}/connect-token'; -}; + body?: never + path: { + ptyID: string + } + query?: { + location?: { + directory?: string + workspace?: string + } + } + url: "/api/pty/{ptyID}/connect-token" +} export type V2PtyConnectTokenErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; - /** - * ForbiddenError - */ - 403: ForbiddenError; - /** - * PtyNotFoundError - */ - 404: PtyNotFoundError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError + /** + * ForbiddenError + */ + 403: ForbiddenError + /** + * PtyNotFoundError + */ + 404: PtyNotFoundError +} -export type V2PtyConnectTokenError = V2PtyConnectTokenErrors[keyof V2PtyConnectTokenErrors]; +export type V2PtyConnectTokenError = V2PtyConnectTokenErrors[keyof V2PtyConnectTokenErrors] export type V2PtyConnectTokenResponses = { - /** - * Success - */ - 200: { - location: LocationInfo; - data: PtyTicketConnectToken; - }; -}; + /** + * Success + */ + 200: { + location: LocationInfo + data: PtyTicketConnectToken + } +} -export type V2PtyConnectTokenResponse = V2PtyConnectTokenResponses[keyof V2PtyConnectTokenResponses]; +export type V2PtyConnectTokenResponse = V2PtyConnectTokenResponses[keyof V2PtyConnectTokenResponses] export type V2PtyConnectData = { - body?: never; - path: { - ptyID: string; - }; - query?: { - 'location[directory]'?: string; - 'location[workspace]'?: string; - cursor?: string; - ticket?: string; - }; - url: '/api/pty/{ptyID}/connect'; -}; + body?: never + path: { + ptyID: string + } + query?: { + "location[directory]"?: string + "location[workspace]"?: string + cursor?: string + ticket?: string + } + url: "/api/pty/{ptyID}/connect" +} export type V2PtyConnectErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; - /** - * ForbiddenError - */ - 403: ForbiddenError; - /** - * PtyNotFoundError - */ - 404: PtyNotFoundError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError + /** + * ForbiddenError + */ + 403: ForbiddenError + /** + * PtyNotFoundError + */ + 404: PtyNotFoundError +} -export type V2PtyConnectError = V2PtyConnectErrors[keyof V2PtyConnectErrors]; +export type V2PtyConnectError = V2PtyConnectErrors[keyof V2PtyConnectErrors] export type V2PtyConnectResponses = { - /** - * Success - */ - 200: boolean; -}; + /** + * Success + */ + 200: boolean +} -export type V2PtyConnectResponse = V2PtyConnectResponses[keyof V2PtyConnectResponses]; +export type V2PtyConnectResponse = V2PtyConnectResponses[keyof V2PtyConnectResponses] export type V2QuestionRequestListData = { - body?: never; - path?: never; - query?: { - location?: { - directory?: string; - workspace?: string; - }; - }; - url: '/api/question/request'; -}; + body?: never + path?: never + query?: { + location?: { + directory?: string + workspace?: string + } + } + url: "/api/question/request" +} export type V2QuestionRequestListErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError +} -export type V2QuestionRequestListError = V2QuestionRequestListErrors[keyof V2QuestionRequestListErrors]; +export type V2QuestionRequestListError = V2QuestionRequestListErrors[keyof V2QuestionRequestListErrors] export type V2QuestionRequestListResponses = { - /** - * Success - */ - 200: { - location: LocationInfo; - data: Array; - }; -}; + /** + * Success + */ + 200: { + location: LocationInfo + data: Array + } +} -export type V2QuestionRequestListResponse = V2QuestionRequestListResponses[keyof V2QuestionRequestListResponses]; +export type V2QuestionRequestListResponse = V2QuestionRequestListResponses[keyof V2QuestionRequestListResponses] export type V2SessionQuestionListData = { - body?: never; - path: { - sessionID: string; - }; - query?: never; - url: '/api/session/{sessionID}/question'; -}; + body?: never + path: { + sessionID: string + } + query?: never + url: "/api/session/{sessionID}/question" +} export type V2SessionQuestionListErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; - /** - * SessionNotFoundError - */ - 404: SessionNotFoundError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError + /** + * SessionNotFoundError + */ + 404: SessionNotFoundError +} -export type V2SessionQuestionListError = V2SessionQuestionListErrors[keyof V2SessionQuestionListErrors]; +export type V2SessionQuestionListError = V2SessionQuestionListErrors[keyof V2SessionQuestionListErrors] export type V2SessionQuestionListResponses = { - /** - * Success - */ - 200: { - data: Array; - }; -}; + /** + * Success + */ + 200: { + data: Array + } +} -export type V2SessionQuestionListResponse = V2SessionQuestionListResponses[keyof V2SessionQuestionListResponses]; +export type V2SessionQuestionListResponse = V2SessionQuestionListResponses[keyof V2SessionQuestionListResponses] export type V2SessionQuestionReplyData = { - body: QuestionV2Reply; - path: { - sessionID: string; - requestID: string; - }; - query?: never; - url: '/api/session/{sessionID}/question/{requestID}/reply'; -}; + body: QuestionV2Reply + path: { + sessionID: string + requestID: string + } + query?: never + url: "/api/session/{sessionID}/question/{requestID}/reply" +} export type V2SessionQuestionReplyErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; - /** - * SessionNotFoundError | QuestionNotFoundError - */ - 404: QuestionNotFoundError | SessionNotFoundError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError + /** + * SessionNotFoundError | QuestionNotFoundError + */ + 404: QuestionNotFoundError | SessionNotFoundError +} -export type V2SessionQuestionReplyError = V2SessionQuestionReplyErrors[keyof V2SessionQuestionReplyErrors]; +export type V2SessionQuestionReplyError = V2SessionQuestionReplyErrors[keyof V2SessionQuestionReplyErrors] export type V2SessionQuestionReplyResponses = { - /** - * - */ - 204: void; -}; + /** + * + */ + 204: void +} -export type V2SessionQuestionReplyResponse = V2SessionQuestionReplyResponses[keyof V2SessionQuestionReplyResponses]; +export type V2SessionQuestionReplyResponse = V2SessionQuestionReplyResponses[keyof V2SessionQuestionReplyResponses] export type V2SessionQuestionRejectData = { - body?: never; - path: { - sessionID: string; - requestID: string; - }; - query?: never; - url: '/api/session/{sessionID}/question/{requestID}/reject'; -}; + body?: never + path: { + sessionID: string + requestID: string + } + query?: never + url: "/api/session/{sessionID}/question/{requestID}/reject" +} export type V2SessionQuestionRejectErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; - /** - * SessionNotFoundError | QuestionNotFoundError - */ - 404: QuestionNotFoundError | SessionNotFoundError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError + /** + * SessionNotFoundError | QuestionNotFoundError + */ + 404: QuestionNotFoundError | SessionNotFoundError +} -export type V2SessionQuestionRejectError = V2SessionQuestionRejectErrors[keyof V2SessionQuestionRejectErrors]; +export type V2SessionQuestionRejectError = V2SessionQuestionRejectErrors[keyof V2SessionQuestionRejectErrors] export type V2SessionQuestionRejectResponses = { - /** - * - */ - 204: void; -}; + /** + * + */ + 204: void +} -export type V2SessionQuestionRejectResponse = V2SessionQuestionRejectResponses[keyof V2SessionQuestionRejectResponses]; +export type V2SessionQuestionRejectResponse = V2SessionQuestionRejectResponses[keyof V2SessionQuestionRejectResponses] export type V2ReferenceListData = { - body?: never; - path?: never; - query?: { - location?: { - directory?: string; - workspace?: string; - }; - }; - url: '/api/reference'; -}; + body?: never + path?: never + query?: { + location?: { + directory?: string + workspace?: string + } + } + url: "/api/reference" +} export type V2ReferenceListErrors = { - /** - * InvalidRequestError - */ - 400: InvalidRequestError; - /** - * UnauthorizedError - */ - 401: UnauthorizedError; -}; + /** + * InvalidRequestError + */ + 400: InvalidRequestError + /** + * UnauthorizedError + */ + 401: UnauthorizedError +} -export type V2ReferenceListError = V2ReferenceListErrors[keyof V2ReferenceListErrors]; +export type V2ReferenceListError = V2ReferenceListErrors[keyof V2ReferenceListErrors] export type V2ReferenceListResponses = { - /** - * Success - */ - 200: { - location: LocationInfo; - data: Array; - }; -}; + /** + * Success + */ + 200: { + location: LocationInfo + data: Array + } +} -export type V2ReferenceListResponse = V2ReferenceListResponses[keyof V2ReferenceListResponses]; +export type V2ReferenceListResponse = V2ReferenceListResponses[keyof V2ReferenceListResponses] export type V2ProjectCopyRemoveData = { - body?: { - directory: string; - force: boolean; - }; - path: { - projectID: string; - }; - query?: { - location?: { - directory?: string; - workspace?: string; - }; - }; - url: '/experimental/project/{projectID}/copy'; -}; + body?: { + directory: string + force: boolean + } + path: { + projectID: string + } + query?: { + location?: { + directory?: string + workspace?: string + } + } + url: "/experimental/project/{projectID}/copy" +} export type V2ProjectCopyRemoveErrors = { - /** - * ProjectCopyError | InvalidRequestError - */ - 400: ProjectCopyError | InvalidRequestError; -}; + /** + * ProjectCopyError | InvalidRequestError + */ + 400: ProjectCopyError | InvalidRequestError +} -export type V2ProjectCopyRemoveError = V2ProjectCopyRemoveErrors[keyof V2ProjectCopyRemoveErrors]; +export type V2ProjectCopyRemoveError = V2ProjectCopyRemoveErrors[keyof V2ProjectCopyRemoveErrors] export type V2ProjectCopyRemoveResponses = { - /** - * - */ - 204: void; -}; + /** + * + */ + 204: void +} -export type V2ProjectCopyRemoveResponse = V2ProjectCopyRemoveResponses[keyof V2ProjectCopyRemoveResponses]; +export type V2ProjectCopyRemoveResponse = V2ProjectCopyRemoveResponses[keyof V2ProjectCopyRemoveResponses] export type V2ProjectCopyCreateData = { - body?: { - strategy: string; - directory: string; - name?: string; - }; - path: { - projectID: string; - }; - query?: { - location?: { - directory?: string; - workspace?: string; - }; - }; - url: '/experimental/project/{projectID}/copy'; -}; + body?: { + strategy: string + directory: string + name?: string + } + path: { + projectID: string + } + query?: { + location?: { + directory?: string + workspace?: string + } + } + url: "/experimental/project/{projectID}/copy" +} export type V2ProjectCopyCreateErrors = { - /** - * ProjectCopyError | InvalidRequestError - */ - 400: ProjectCopyError | InvalidRequestError; -}; + /** + * ProjectCopyError | InvalidRequestError + */ + 400: ProjectCopyError | InvalidRequestError +} -export type V2ProjectCopyCreateError = V2ProjectCopyCreateErrors[keyof V2ProjectCopyCreateErrors]; +export type V2ProjectCopyCreateError = V2ProjectCopyCreateErrors[keyof V2ProjectCopyCreateErrors] export type V2ProjectCopyCreateResponses = { - /** - * ProjectCopy.Copy - */ - 200: ProjectCopyCopy; -}; + /** + * ProjectCopy.Copy + */ + 200: ProjectCopyCopy +} -export type V2ProjectCopyCreateResponse = V2ProjectCopyCreateResponses[keyof V2ProjectCopyCreateResponses]; +export type V2ProjectCopyCreateResponse = V2ProjectCopyCreateResponses[keyof V2ProjectCopyCreateResponses] export type V2ProjectCopyRefreshData = { - body?: never; - path: { - projectID: string; - }; - query?: { - location?: { - directory?: string; - workspace?: string; - }; - }; - url: '/experimental/project/{projectID}/copy/refresh'; -}; + body?: never + path: { + projectID: string + } + query?: { + location?: { + directory?: string + workspace?: string + } + } + url: "/experimental/project/{projectID}/copy/refresh" +} export type V2ProjectCopyRefreshErrors = { - /** - * ProjectCopyError | InvalidRequestError - */ - 400: ProjectCopyError | InvalidRequestError; -}; + /** + * ProjectCopyError | InvalidRequestError + */ + 400: ProjectCopyError | InvalidRequestError +} -export type V2ProjectCopyRefreshError = V2ProjectCopyRefreshErrors[keyof V2ProjectCopyRefreshErrors]; +export type V2ProjectCopyRefreshError = V2ProjectCopyRefreshErrors[keyof V2ProjectCopyRefreshErrors] export type V2ProjectCopyRefreshResponses = { - /** - * - */ - 204: void; -}; + /** + * + */ + 204: void +} -export type V2ProjectCopyRefreshResponse = V2ProjectCopyRefreshResponses[keyof V2ProjectCopyRefreshResponses]; +export type V2ProjectCopyRefreshResponse = V2ProjectCopyRefreshResponses[keyof V2ProjectCopyRefreshResponses] export type PtyConnectData = { - body?: never; - path: { - ptyID: string; - }; - query?: { - directory?: string; - workspace?: string; - cursor?: string; - ticket?: string; - }; - url: '/pty/{ptyID}/connect'; -}; + body?: never + path: { + ptyID: string + } + query?: { + directory?: string + workspace?: string + cursor?: string + ticket?: string + } + url: "/pty/{ptyID}/connect" +} export type PtyConnectErrors = { - /** - * Forbidden - */ - 403: EffectHttpApiErrorForbidden; - /** - * Not found - */ - 404: NotFoundError; -}; + /** + * Forbidden + */ + 403: EffectHttpApiErrorForbidden + /** + * Not found + */ + 404: NotFoundError +} -export type PtyConnectError = PtyConnectErrors[keyof PtyConnectErrors]; +export type PtyConnectError = PtyConnectErrors[keyof PtyConnectErrors] export type PtyConnectResponses = { - /** - * Connected session - */ - 200: boolean; -}; + /** + * Connected session + */ + 200: boolean +} -export type PtyConnectResponse = PtyConnectResponses[keyof PtyConnectResponses]; +export type PtyConnectResponse = PtyConnectResponses[keyof PtyConnectResponses] diff --git a/packages/sdk/openapi.json b/packages/sdk/openapi.json index f5c85789c25..17e553149b5 100644 --- a/packages/sdk/openapi.json +++ b/packages/sdk/openapi.json @@ -4431,7 +4431,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/Pty1" + "$ref": "#/components/schemas/Pty" }, "description": "List of sessions" } @@ -4485,7 +4485,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Pty2" + "$ref": "#/components/schemas/Pty" } } } @@ -4588,7 +4588,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Pty3" + "$ref": "#/components/schemas/Pty" } } } @@ -4659,7 +4659,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Pty4" + "$ref": "#/components/schemas/Pty" } } } @@ -19794,7 +19794,7 @@ }, "/api/health": { "get": { - "tags": ["opencode HttpApi"], + "tags": ["Kilo HttpApi"], "operationId": "v2.health.get", "parameters": [], "security": [], @@ -19850,7 +19850,7 @@ }, "/api/location": { "get": { - "tags": ["opencode HttpApi"], + "tags": ["Kilo HttpApi"], "operationId": "v2.location.get", "parameters": [ { @@ -19918,7 +19918,7 @@ }, "/api/agent": { "get": { - "tags": ["opencode HttpApi"], + "tags": ["Kilo HttpApi"], "operationId": "v2.agent.list", "parameters": [ { @@ -22590,7 +22590,7 @@ }, "/api/credential/{credentialID}": { "patch": { - "tags": ["opencode HttpApi"], + "tags": ["Kilo HttpApi"], "operationId": "v2.credential.update", "parameters": [ { @@ -22674,7 +22674,7 @@ ] }, "delete": { - "tags": ["opencode HttpApi"], + "tags": ["Kilo HttpApi"], "operationId": "v2.credential.remove", "parameters": [ { @@ -28293,6 +28293,17 @@ "exitCode": { "type": "integer", "minimum": 0 + }, + "sessionID": { + "anyOf": [ + { + "type": "string", + "pattern": "^ses" + }, + { + "type": "null" + } + ] } }, "required": ["id", "title", "command", "args", "cwd", "status", "pid"], @@ -35003,132 +35014,6 @@ "required": ["_tag", "projectID", "message"], "additionalProperties": false }, - "Pty1": { - "type": "object", - "properties": { - "id": { - "type": "string", - "pattern": "^pty" - }, - "title": { - "type": "string" - }, - "command": { - "type": "string" - }, - "args": { - "type": "array", - "items": { - "type": "string" - } - }, - "cwd": { - "type": "string" - }, - "status": { - "type": "string", - "enum": ["running", "exited"] - }, - "pid": { - "type": "integer", - "minimum": 0 - }, - "exitCode": { - "type": "integer", - "minimum": 0 - }, - "sessionID": { - "type": "string", - "pattern": "^ses" - } - }, - "required": ["id", "title", "command", "args", "cwd", "status", "pid"], - "additionalProperties": false - }, - "Pty2": { - "type": "object", - "properties": { - "id": { - "type": "string", - "pattern": "^pty" - }, - "title": { - "type": "string" - }, - "command": { - "type": "string" - }, - "args": { - "type": "array", - "items": { - "type": "string" - } - }, - "cwd": { - "type": "string" - }, - "status": { - "type": "string", - "enum": ["running", "exited"] - }, - "pid": { - "type": "integer", - "minimum": 0 - }, - "exitCode": { - "type": "integer", - "minimum": 0 - }, - "sessionID": { - "type": "string", - "pattern": "^ses" - } - }, - "required": ["id", "title", "command", "args", "cwd", "status", "pid"], - "additionalProperties": false - }, - "Pty3": { - "type": "object", - "properties": { - "id": { - "type": "string", - "pattern": "^pty" - }, - "title": { - "type": "string" - }, - "command": { - "type": "string" - }, - "args": { - "type": "array", - "items": { - "type": "string" - } - }, - "cwd": { - "type": "string" - }, - "status": { - "type": "string", - "enum": ["running", "exited"] - }, - "pid": { - "type": "integer", - "minimum": 0 - }, - "exitCode": { - "type": "integer", - "minimum": 0 - }, - "sessionID": { - "type": "string", - "pattern": "^ses" - } - }, - "required": ["id", "title", "command", "args", "cwd", "status", "pid"], - "additionalProperties": false - }, "PtyNotFoundError": { "type": "object", "properties": { @@ -35146,48 +35031,6 @@ "required": ["_tag", "ptyID", "message"], "additionalProperties": false }, - "Pty4": { - "type": "object", - "properties": { - "id": { - "type": "string", - "pattern": "^pty" - }, - "title": { - "type": "string" - }, - "command": { - "type": "string" - }, - "args": { - "type": "array", - "items": { - "type": "string" - } - }, - "cwd": { - "type": "string" - }, - "status": { - "type": "string", - "enum": ["running", "exited"] - }, - "pid": { - "type": "integer", - "minimum": 0 - }, - "exitCode": { - "type": "integer", - "minimum": 0 - }, - "sessionID": { - "type": "string", - "pattern": "^ses" - } - }, - "required": ["id", "title", "command", "args", "cwd", "status", "pid"], - "additionalProperties": false - }, "PtyForbiddenError": { "type": "object", "properties": { @@ -58145,15 +57988,15 @@ "description": "Kilo memory routes." }, { - "name": "opencode HttpApi", + "name": "Kilo HttpApi", "description": "Experimental HttpApi surface for selected instance routes." }, { - "name": "opencode HttpApi", + "name": "Kilo HttpApi", "description": "Experimental HttpApi surface for selected instance routes." }, { - "name": "opencode HttpApi", + "name": "Kilo HttpApi", "description": "Experimental HttpApi surface for selected instance routes." }, { @@ -58177,7 +58020,7 @@ "description": "Integration discovery and authentication routes." }, { - "name": "opencode HttpApi", + "name": "Kilo HttpApi", "description": "Experimental HttpApi surface for selected instance routes." }, { diff --git a/packages/tui/src/app.tsx b/packages/tui/src/app.tsx index 59d0887607f..531925b2afe 100644 --- a/packages/tui/src/app.tsx +++ b/packages/tui/src/app.tsx @@ -954,16 +954,10 @@ function App(props: { onSnapshot?: () => Promise; pluginHost: TuiPlugi dialog.clear() }, }, - { - name: "permission.mode", - title: - local.permission.mode === "auto" ? "Disable auto-approve permissions" : "Enable auto-approve permissions", - category: "System", - run: () => { - local.permission.toggle() - dialog.clear() - }, - }, + // kilocode_change - upstream's in-memory auto-approve toggle is not mounted: Kilo ships + // `permission.allow_everything` (kilocode/cli/cmd/tui/app.tsx), which persists through + // permission.allowEverything. Two near-identical System entries with different persistence + // semantics is user-visible confusion. ].map((command) => ({ namespace: "palette", ...command, diff --git a/packages/tui/src/component/error-component.tsx b/packages/tui/src/component/error-component.tsx index b44317005b5..30d8bdb0e04 100644 --- a/packages/tui/src/component/error-component.tsx +++ b/packages/tui/src/component/error-component.tsx @@ -23,6 +23,7 @@ export function ErrorComponent(props: { error: Error; reset: () => void; mode?: const term = tryUseTerminalDimensions() const width = () => term?.().width ?? process.stdout.columns ?? 80 const height = () => term?.().height ?? process.stdout.rows ?? 24 + // kilocode_change end const exit = useExit() const clipboard = useClipboard() @@ -118,13 +119,7 @@ export function ErrorComponent(props: { error: Error; reset: () => void; mode?: const showFooter = () => height() >= 20 return ( - + {/* Headline */} diff --git a/packages/tui/src/context/data.tsx b/packages/tui/src/context/data.tsx index 92f340f4be6..68664974542 100644 --- a/packages/tui/src/context/data.tsx +++ b/packages/tui/src/context/data.tsx @@ -64,36 +64,6 @@ export function eventLocation(metadata: { directory: string; workspace?: string } // kilocode_change end -// kilocode_change start - released rows persist legacy tool content shapes; normalize them for the store -function toolContent(items: readonly unknown[]): SessionMessageToolStateCompleted["content"] { - return items.map((item) => { - const value = item as Record - if (value.type === "media") - return { - type: "file" as const, - uri: String(value.data).startsWith("data:") ? value.data : `data:${value.mediaType};base64,${value.data}`, - mime: value.mediaType, - ...(value.filename === undefined ? {} : { name: value.filename }), - } - if (value.type === "file" && value.source !== undefined) { - const source = value.source - return { - type: "file" as const, - uri: - source.type === "data" - ? `data:${value.mime};base64,${source.data}` - : source.type === "url" - ? source.url - : source.uri, - mime: value.mime, - ...(value.name === undefined ? {} : { name: value.name }), - } - } - return value - }) as SessionMessageToolStateCompleted["content"] -} -// kilocode_change end - export const { use: useData, provider: DataProvider } = createSimpleContext({ name: "Data", init: () => { @@ -340,7 +310,7 @@ export const { use: useData, provider: DataProvider } = createSimpleContext({ const match = message.latestTool(message.assistant(draft, event.data.assistantMessageID), event.data.callID) if (match?.state.status !== "running") return match.state.structured = event.data.structured - match.state.content = toolContent(event.data.content) // kilocode_change + match.state.content = event.data.content }) break case "session.next.tool.success": @@ -351,7 +321,7 @@ export const { use: useData, provider: DataProvider } = createSimpleContext({ status: "completed", input: match.state.input, structured: event.data.structured, - content: toolContent(event.data.content), // kilocode_change + content: event.data.content, result: event.data.result, } match.provider = { diff --git a/script/check-model-tool-network.ts b/script/check-model-tool-network.ts index 11aee69bb7c..a3ac2799e7b 100644 --- a/script/check-model-tool-network.ts +++ b/script/check-model-tool-network.ts @@ -106,7 +106,9 @@ const structure = [ ...(!network.includes("host.map((item) => item.id)") ? [" kilocode/sandbox/network.ts must derive host-executed tool IDs from network-tools.ts"] : []), - ...(!registry.includes("Layer.provide(ToolNetwork.httpLayer)") + // kilocode_change - v1.17.13 moved registry wiring from Layer.provide onto the LayerNode graph + ...(!registry.includes("Layer.provide(ToolNetwork.httpLayer)") && + !/LayerNode\.make\(\{\s*service:\s*HttpClient\.HttpClient,\s*layer:\s*ToolNetwork\.httpLayer/.test(registry) ? [" tool/registry.ts must provide the policy-aware ToolNetwork HTTP layer"] : []), ...(registry.includes("FetchHttpClient.layer")