From 34c29df60d09f41e719a162ebdb328aa81bdfd26 Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Wed, 19 Aug 2026 20:13:52 -0400 Subject: [PATCH] fix(command): simplify callback consumers --- packages/cli/src/acp/event.ts | 6 + packages/cli/src/acp/service.ts | 1 + packages/cli/test/acp/event.test.ts | 39 + packages/core/src/command.ts | 15 +- packages/core/src/config/plugin/command.ts | 33 +- packages/core/src/mcp/index.ts | 6 +- packages/core/src/plugin/command.ts | 3 +- packages/core/test/command.test.ts | 24 + packages/core/test/config/command.test.ts | 90 +- packages/protocol/openapi.json | 2953 +++++++++++++---- packages/schema/src/mcp-event.ts | 9 +- packages/schema/test/event-manifest.test.ts | 7 +- packages/tui/src/component/prompt/index.tsx | 26 +- packages/tui/src/mini/stream-v2.transport.ts | 17 +- .../tui/test/mini/stream-v2.transport.test.ts | 10 +- 15 files changed, 2458 insertions(+), 781 deletions(-) diff --git a/packages/cli/src/acp/event.ts b/packages/cli/src/acp/event.ts index 750b92f83a5..86746a5f091 100644 --- a/packages/cli/src/acp/event.ts +++ b/packages/cli/src/acp/event.ts @@ -76,6 +76,7 @@ export async function streamTurn(input: { readonly cwd: string readonly start: TurnStart readonly writeTextFile: boolean + readonly action?: boolean readonly submit: (signal: AbortSignal) => Promise readonly control: TurnControl readonly childSessionUpdate?: (update: ChildSessionUpdate) => Promise @@ -345,6 +346,11 @@ export async function streamTurn(input: { await input.submit(control.admission.signal).catch((error) => { if (!control.cancelled) throw error }) + if (input.action) { + streamController.abort() + await completed.catch(() => {}) + return response(undefined, undefined, "succeeded", control.cancelled, undefined) + } if (control.cancelled) { await input.client.session.interrupt({ sessionID: input.sessionID }).catch(() => {}) if (!started) { diff --git a/packages/cli/src/acp/service.ts b/packages/cli/src/acp/service.ts index 5cae2d995c6..5764beb51df 100644 --- a/packages/cli/src/acp/service.ts +++ b/packages/cli/src/acp/service.ts @@ -326,6 +326,7 @@ export function make(input: { readonly client: OpenCodeClient; readonly connecti cwd: state.cwd, start: prepared.start, writeTextFile: capabilities.writeTextFile, + action: prepared.command !== undefined, control, connectionSignal: input.connection.signal, sessionSignal: state.abort.signal, diff --git a/packages/cli/test/acp/event.test.ts b/packages/cli/test/acp/event.test.ts index 9a37e5e9139..b6bef9a5670 100644 --- a/packages/cli/test/acp/event.test.ts +++ b/packages/cli/test/acp/event.test.ts @@ -121,3 +121,42 @@ test("acp prompt resolves after ordered turn updates", async () => { controller.enqueue(encoder.encode(`data: ${JSON.stringify(event)}\n\n`)) } }) + +test("acp action resolves without prompt lifecycle events", async () => { + const encoder = new TextEncoder() + const server = Bun.serve({ + port: 0, + fetch(request) { + if (new URL(request.url).pathname !== "/api/event") return new Response(null, { status: 404 }) + return new Response( + new ReadableStream({ + start(controller) { + controller.enqueue(encoder.encode(`data: ${JSON.stringify({ type: "server.connected", data: {} })}\n\n`)) + }, + }), + { headers: { "content-type": "text/event-stream" } }, + ) + }, + }) + + try { + const response = await streamTurn({ + client: OpenCode.make({ baseUrl: server.url.toString() }), + connection: { + sessionUpdate: async () => {}, + requestPermission: async () => ({ outcome: { outcome: "cancelled" } }), + }, + sessionID: "ses_test", + cwd: "/workspace", + start: { type: "input", id: "msg_action" }, + writeTextFile: false, + action: true, + control: { cancelled: false, admission: new AbortController() }, + submit: async () => {}, + }) + + expect(response).toMatchObject({ stopReason: "end_turn" }) + } finally { + await server.stop(true) + } +}) diff --git a/packages/core/src/command.ts b/packages/core/src/command.ts index 99f367e7e95..e1eaefc457d 100644 --- a/packages/core/src/command.ts +++ b/packages/core/src/command.ts @@ -5,7 +5,7 @@ import type { PromptInput } from "@opencode-ai/schema/prompt-input" import type { Session } from "@opencode-ai/schema/session" import type { SessionInbox } from "@opencode-ai/schema/session-inbox" import { makeLocationNode } from "@opencode-ai/util/effect/app-node" -import { Cause, Context, Effect, Layer, Schema } from "effect" +import { Context, Effect, Layer, Schema } from "effect" import { Bus } from "./bus.js" import { State } from "./state.js" @@ -83,9 +83,8 @@ export const layer = Layer.effect( if (!definition) return yield* new NotFoundError({ command: input.name, message: `Command not found: ${input.name}` }) return yield* definition.execute(input.invocation).pipe( - Effect.mapError( - (error) => new ExecutionError({ command: input.name, message: Cause.pretty(Cause.fail(error)) }), - ), + Effect.tapError((error) => Effect.logError("command execution failed", { command: input.name, error })), + Effect.mapError((error) => new ExecutionError({ command: input.name, message: errorMessage(error) })), ) }), }) @@ -97,3 +96,11 @@ export const node = makeLocationNode({ layer, deps: [Bus.node], }) + +function errorMessage(error: unknown) { + if (error instanceof Error) return error.message + if (typeof error === "string") return error + if (error && typeof error === "object" && "message" in error && typeof error.message === "string") + return error.message + return "Command execution failed" +} diff --git a/packages/core/src/config/plugin/command.ts b/packages/core/src/config/plugin/command.ts index bcc0e2815c1..661ab0183bd 100644 --- a/packages/core/src/config/plugin/command.ts +++ b/packages/core/src/config/plugin/command.ts @@ -6,13 +6,13 @@ import { Info, type Entry } from "@opencode-ai/schema/config" import { ConfigCommand } from "@opencode-ai/schema/config/command" import { Model } from "@opencode-ai/schema/model" import { Provider } from "@opencode-ai/schema/provider" -import { Global } from "@opencode-ai/util/global" import { AppProcess } from "@opencode-ai/util/process" import path from "path" import { Effect, Option, Schema, Stream } from "effect" import { ChildProcess } from "effect/unstable/process" import { Config } from "../../config.js" import { Location } from "../../location.js" +import { Shell } from "../../shell.js" import { ShellSelect } from "../../shell/select.js" import { FSUtil } from "@opencode-ai/util/fs-util" import { ConfigMarkdown } from "../markdown.js" @@ -24,9 +24,9 @@ export const Plugin = define({ effect: Effect.fn(function* (ctx) { const config = yield* Config.Service const fs = yield* FSUtil.Service - const global = yield* Global.Service const location = yield* Location.Service const processes = yield* AppProcess.Service + const shell = yield* Shell.Service const load = Effect.fn("ConfigCommandPlugin.load")(function* () { return yield* Effect.forEach(yield* config.entries(), (entry) => { if (entry.type === "document") return Effect.succeed([{ commands: entry.info.commands }]) @@ -69,10 +69,12 @@ export const Plugin = define({ execute: (input) => Effect.gen(function* () { const agent = command.agent === undefined ? undefined : Agent.ID.make(command.agent) - const session = yield* ctx.session.get({ sessionID: input.sessionID }) - if (agent !== undefined && session.agent !== agent) - yield* ctx.session.switchAgent({ sessionID: input.sessionID, agent }) - const commandAgent = agent === undefined ? undefined : (yield* ctx.agent.get({ agentID: agent })).data + const commandAgent = yield* Effect.gen(function* () { + if (agent === undefined) return + const session = yield* ctx.session.get({ sessionID: input.sessionID }) + if (session.agent !== agent) yield* ctx.session.switchAgent({ sessionID: input.sessionID, agent }) + return (yield* ctx.agent.get({ agentID: agent })).data + }) const model = command.model === undefined ? commandAgent?.model @@ -91,7 +93,7 @@ export const Plugin = define({ config, location, processes, - bin: global.bin, + shell, }), delivery: input.delivery, }) @@ -156,7 +158,7 @@ function evaluateTemplate( readonly config: Config.Interface readonly location: Location.Info readonly processes: AppProcess.Interface - readonly bin: string + readonly shell: Shell.Interface }, ) { return Effect.gen(function* () { @@ -177,13 +179,14 @@ function evaluateTemplate( : withArguments.trim() const matches = Array.from(text.matchAll(shellRegex)) if (matches.length === 0) return text - const shell = ShellSelect.preferred(Config.latest(yield* services.config.entries(), "shell"), undefined, services.bin) + const shell = yield* services.shell.name() const outputs = yield* Effect.forEach( matches, - (match) => - services.processes + (match) => { + const source = match[1] ?? "" + return services.processes .run( - ChildProcess.make(shell, ShellSelect.args(shell, match[1] ?? ""), { + ChildProcess.make(shell, ShellSelect.args(shell, source), { cwd: services.location.directory, stdin: "ignore", }), @@ -191,7 +194,11 @@ function evaluateTemplate( ) .pipe( Effect.map((result) => (result.output ?? Buffer.concat([result.stdout, result.stderr])).toString("utf8")), - ), + Effect.mapError((error) => + new Error(`Shell interpolation failed for ${JSON.stringify(source)}: ${error.message}`), + ), + ) + }, { concurrency: 2 }, ) const iterator = outputs[Symbol.iterator]() diff --git a/packages/core/src/mcp/index.ts b/packages/core/src/mcp/index.ts index 05e156a705f..a4522131132 100644 --- a/packages/core/src/mcp/index.ts +++ b/packages/core/src/mcp/index.ts @@ -2,6 +2,7 @@ export * as MCP from "./index.js" import { Mcp } from "@opencode-ai/schema/mcp" import { McpEvent } from "@opencode-ai/schema/mcp-event" +import { ephemeral } from "@opencode-ai/schema/event" import { createHash } from "node:crypto" import { isDeepStrictEqual } from "node:util" import { Cause, Context, Deferred, Effect, Exit, FiberSet, Layer, Schema, Scope, Stream, Types } from "effect" @@ -18,6 +19,7 @@ import { State } from "../state.js" import type { MCPClient } from "./client.js" export const ServerName = Schema.String.pipe(Schema.brand("MCP.ServerName")) +export const PromptsChanged = ephemeral({ type: "mcp.prompts.changed", schema: { server: Schema.String } }) export type ServerName = typeof ServerName.Type // The status union is a public wire contract, so it lives in @opencode-ai/schema and is re-exported here. @@ -427,7 +429,7 @@ export const layer = (options?: Options) => Effect.map((defs) => { entry.prompts = defs.map((def) => toPrompt(name, def)) }), - Effect.andThen(bus.publish(McpEvent.PromptsChanged, { server: name })), + Effect.andThen(bus.publish(PromptsChanged, { server: name })), ) // Runs a connection callback under the server lock, dropping it if the connection is no longer @@ -546,7 +548,7 @@ export const layer = (options?: Options) => yield* Scope.close(scope, Exit.void) yield* bus.publish(McpEvent.ToolsChanged, { server: name }).pipe(Effect.ignore) yield* bus.publish(McpEvent.ResourcesChanged, { server: name }).pipe(Effect.ignore) - yield* bus.publish(McpEvent.PromptsChanged, { server: name }).pipe(Effect.ignore) + yield* bus.publish(PromptsChanged, { server: name }).pipe(Effect.ignore) }) const disposeServer = Effect.fnUntraced(function* (name: ServerName, entry: ServerEntry) { diff --git a/packages/core/src/plugin/command.ts b/packages/core/src/plugin/command.ts index e835812136a..150343ba0f3 100644 --- a/packages/core/src/plugin/command.ts +++ b/packages/core/src/plugin/command.ts @@ -1,7 +1,6 @@ export * as CommandPlugin from "./command.js" import { define } from "@opencode-ai/plugin/effect/plugin" -import { McpEvent } from "@opencode-ai/schema/mcp-event" import { Effect, Stream } from "effect" import { Bus } from "../bus.js" import { Location } from "../location.js" @@ -17,7 +16,7 @@ export const Plugin = define({ const bus = yield* Bus.Service const loaded = { prompts: [] as MCP.Prompt[] } yield* bus - .subscribe(McpEvent.PromptsChanged) + .subscribe(MCP.PromptsChanged) .pipe( Stream.runForEach(() => mcp.prompts().pipe( diff --git a/packages/core/test/command.test.ts b/packages/core/test/command.test.ts index 0cd9f1f9346..8c43e5388ee 100644 --- a/packages/core/test/command.test.ts +++ b/packages/core/test/command.test.ts @@ -44,4 +44,28 @@ describe("Command", () => { expect(yield* command.list()).toEqual([Command.Info.make({ name: "goal", description: "Second" })]) }), ) + + it.effect("returns callback error messages without stack traces", () => + Effect.gen(function* () { + const command = yield* Command.Service + yield* command.transform((draft) => { + draft.add({ + name: "fail", + execute: () => Effect.fail(new Error("command failed")), + }) + }) + + const error = yield* command + .execute({ + name: "fail", + invocation: { + sessionID: Session.ID.make("ses_test"), + prompt: { text: "" }, + delivery: "steer", + }, + }) + .pipe(Effect.flip) + expect(error).toMatchObject({ _tag: "Command.ExecutionError", message: "command failed" }) + }), + ) }) diff --git a/packages/core/test/config/command.test.ts b/packages/core/test/config/command.test.ts index d1f598eca58..3049a2ac77f 100644 --- a/packages/core/test/config/command.test.ts +++ b/packages/core/test/config/command.test.ts @@ -1,9 +1,12 @@ import fs from "fs/promises" import path from "path" import { describe, expect } from "bun:test" -import { Deferred, Effect, Fiber, Layer, Option, PubSub, Schema, Stream } from "effect" +import { DateTime, Deferred, Effect, Fiber, Layer, Option, PubSub, Schema, Stream } from "effect" import { advance, drain } from "../lib/clock" import { Directory, Document, Event, Info } from "@opencode-ai/schema/config" +import { Session } from "@opencode-ai/schema/session" +import { SessionInbox } from "@opencode-ai/schema/session-inbox" +import { SessionMessage } from "@opencode-ai/schema/session-message" import { Command } from "@opencode-ai/core/command" import { Config } from "@opencode-ai/core/config" import { ConfigCommandPlugin } from "@opencode-ai/core/config/plugin/command" @@ -18,6 +21,7 @@ import { AppProcess } from "@opencode-ai/util/process" import { Location } from "@opencode-ai/core/location" import { MCP } from "@opencode-ai/core/mcp/index" import { AbsolutePath } from "@opencode-ai/core/schema" +import { Shell } from "@opencode-ai/core/shell" import { Watcher } from "@opencode-ai/core/filesystem/watcher" import { emptyCredentialNode, emptyWellknownNode } from "../fixture/config-nodes" import { emptyConfigLayer, emptyMcpLayer, testLocationLayer } from "../fixture/mcp" @@ -26,13 +30,28 @@ import { tmpdir } from "../fixture/tmpdir" import { testEffect } from "../lib/effect" import { host } from "../plugin/host" +const shellLayer = Layer.succeed( + Shell.Service, + Shell.Service.of({ + name: () => Effect.succeed("sh"), + create: () => Effect.die("unused shell.create"), + list: () => Effect.die("unused shell.list"), + get: () => Effect.die("unused shell.get"), + wait: () => Effect.die("unused shell.wait"), + timeout: () => Effect.die("unused shell.timeout"), + output: () => Effect.die("unused shell.output"), + remove: () => Effect.die("unused shell.remove"), + }), +) + const it = testEffect( AppNodeBuilder.build( - LayerNode.group([Command.node, Bus.node, FSUtil.node, AppProcess.node, Global.node, Location.node]), + LayerNode.group([Command.node, Bus.node, FSUtil.node, AppProcess.node, Location.node, Shell.node]), [ - [MCP.node, emptyMcpLayer], - [Config.node, emptyConfigLayer], - [Location.node, testLocationLayer], + [MCP.node, emptyMcpLayer], + [Config.node, emptyConfigLayer], + [Location.node, testLocationLayer], + [Shell.node, shellLayer], ], ), ) @@ -66,6 +85,7 @@ Review files`, const bus = yield* Bus.Service const update = yield* bus.publish(Event.Updated, {}) const updates = yield* PubSub.unbounded() + const prompts: { text: string; files?: readonly { readonly uri: string }[]; delivery?: string }[] = [] yield* ConfigCommandPlugin.Plugin.effect( host({ command: { @@ -74,6 +94,20 @@ Review files`, reload: command.reload, }, event: { subscribe: () => Stream.fromPubSub(updates) }, + session: { + prompt: (input) => + Effect.sync(() => { + prompts.push({ text: input.text, files: input.files, delivery: input.delivery }) + return SessionInbox.User.make({ + id: SessionMessage.ID.make("msg_test"), + sessionID: input.sessionID, + timeCreated: DateTime.makeUnsafe(0), + type: "user", + payload: { text: input.text }, + delivery: input.delivery ?? "steer", + }) + }), + }, }), ).pipe( Effect.provide( @@ -95,6 +129,21 @@ Review files`, Command.Info.make({ name: "empty" }), Command.Info.make({ name: "nested/docs" }), ]) + yield* command.execute({ + name: "nested/docs", + invocation: { + sessionID: Session.ID.make("ses_test"), + prompt: { text: "details", files: [{ uri: "file:///tmp/context.md" }] }, + delivery: "queue", + }, + }) + expect(prompts).toEqual([ + { + text: "Write docs\n\ndetails", + files: [{ uri: "file:///tmp/context.md" }], + delivery: "queue", + }, + ]) yield* Effect.promise(() => fs.writeFile(path.join(tmp.path, "commands", "review.md"), markdown("Review again", "Review again")), @@ -106,6 +155,15 @@ Review files`, yield* Effect.sleep("10 millis") } expect((yield* command.get("review"))?.description).toBe("Review again") + yield* command.execute({ + name: "review", + invocation: { + sessionID: Session.ID.make("ses_test"), + prompt: { text: "latest" }, + delivery: "steer", + }, + }) + expect(prompts.at(-1)?.text).toBe("Review again\n\nlatest") }), ), ), @@ -296,18 +354,20 @@ describeNative("ConfigCommandPlugin native watcher", () => { AppProcess.node, Global.node, Location.node, + Shell.node, ]), [ - [ - Location.node, - Layer.succeed( - Location.Service, - Location.Service.of(location({ directory: AbsolutePath.make(path.join(tmp, "project")) })), - ), - ], - [Global.node, Global.layerWith({ config: global, home: path.join(global, "home") })], - [Credential.node, emptyCredentialNode], - [WellKnown.node, emptyWellknownNode], + [ + Location.node, + Layer.succeed( + Location.Service, + Location.Service.of(location({ directory: AbsolutePath.make(path.join(tmp, "project")) })), + ), + ], + [Global.node, Global.layerWith({ config: global, home: path.join(global, "home") })], + [Shell.node, shellLayer], + [Credential.node, emptyCredentialNode], + [WellKnown.node, emptyWellknownNode], ], ), ), diff --git a/packages/protocol/openapi.json b/packages/protocol/openapi.json index 7b37a8ca31b..e3dddde009b 100644 --- a/packages/protocol/openapi.json +++ b/packages/protocol/openapi.json @@ -8,7 +8,9 @@ "paths": { "/api/health": { "get": { - "tags": ["health"], + "tags": [ + "health" + ], "operationId": "v2.health.get", "parameters": [], "security": [], @@ -50,7 +52,9 @@ }, "/api/server": { "get": { - "tags": ["server"], + "tags": [ + "server" + ], "operationId": "v2.server.get", "parameters": [], "security": [], @@ -69,7 +73,9 @@ } } }, - "required": ["urls"], + "required": [ + "urls" + ], "additionalProperties": false } } @@ -102,7 +108,9 @@ }, "/api/location": { "get": { - "tags": ["location"], + "tags": [ + "location" + ], "operationId": "v2.location.get", "parameters": [ { @@ -155,7 +163,9 @@ }, "/api/agent": { "get": { - "tags": ["agent"], + "tags": [ + "agent" + ], "operationId": "v2.agent.list", "parameters": [ { @@ -188,7 +198,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -221,7 +234,9 @@ }, "/api/agent/{agentID}": { "get": { - "tags": ["agent"], + "tags": [ + "agent" + ], "operationId": "v2.agent.get", "parameters": [ { @@ -259,7 +274,10 @@ "$ref": "#/components/schemas/Agent.Info" } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -302,7 +320,9 @@ }, "/api/plugin": { "get": { - "tags": ["plugin"], + "tags": [ + "plugin" + ], "operationId": "v2.plugin.list", "parameters": [ { @@ -335,7 +355,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -362,13 +385,15 @@ } } }, - "description": "Retrieve currently loaded plugins.", + "description": "Retrieve enabled server plugins and their current status.", "summary": "List plugins" } }, "/api/session": { "get": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.list", "parameters": [ { @@ -414,7 +439,10 @@ "anyOf": [ { "type": "string", - "enum": ["asc", "desc"] + "enum": [ + "asc", + "desc" + ] }, { "type": "null" @@ -449,7 +477,9 @@ }, { "type": "string", - "enum": ["null"] + "enum": [ + "null" + ] } ], "description": "Filter by parent session. Use null to return only root sessions." @@ -570,7 +600,9 @@ "summary": "List sessions" }, "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.create", "parameters": [], "security": [], @@ -586,7 +618,9 @@ "$ref": "#/components/schemas/Session.Info" } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -640,13 +674,20 @@ "$ref": "#/components/schemas/Union_" }, "agent": { - "$ref": "#/components/schemas/Union_2" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "model": { - "$ref": "#/components/schemas/Union_3" + "$ref": "#/components/schemas/Union_2" }, "location": { - "$ref": "#/components/schemas/Union_4" + "$ref": "#/components/schemas/Union_3" } }, "additionalProperties": false @@ -659,7 +700,9 @@ }, "/api/session/import": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.import", "parameters": [], "security": [], @@ -675,7 +718,9 @@ "$ref": "#/components/schemas/Session.Info" } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -727,10 +772,13 @@ "$ref": "#/components/schemas/Arrays_" }, "location": { - "$ref": "#/components/schemas/Union_4" + "$ref": "#/components/schemas/Union_3" } }, - "required": ["info", "messages"], + "required": [ + "info", + "messages" + ], "additionalProperties": false } } @@ -741,7 +789,9 @@ }, "/api/session/{sessionID}/export": { "get": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.export", "parameters": [ { @@ -761,7 +811,7 @@ "name": "sanitize", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_7" + "$ref": "#/components/schemas/Union_6" }, "required": false } @@ -779,7 +829,9 @@ "$ref": "#/components/schemas/SessionTransfer.Data" } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -832,7 +884,9 @@ }, "/api/session/active": { "get": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.active", "parameters": [], "security": [], @@ -853,7 +907,9 @@ } } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -886,7 +942,9 @@ }, "/api/session/{sessionID}": { "get": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.get", "parameters": [ { @@ -916,7 +974,9 @@ "$ref": "#/components/schemas/Session.Info" } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -957,7 +1017,9 @@ "summary": "Get session" }, "delete": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.remove", "parameters": [ { @@ -1023,7 +1085,9 @@ }, "/api/session/{sessionID}/fork": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.fork", "parameters": [ { @@ -1053,7 +1117,9 @@ "$ref": "#/components/schemas/Session.Info" } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -1119,7 +1185,9 @@ "$ref": "#/components/schemas/Session.ForkRequestBoundary" } }, - "required": ["boundary"], + "required": [ + "boundary" + ], "additionalProperties": false } } @@ -1130,7 +1198,9 @@ }, "/api/session/{sessionID}/agent": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.switchAgent", "parameters": [ { @@ -1202,7 +1272,9 @@ "type": "string" } }, - "required": ["agent"], + "required": [ + "agent" + ], "additionalProperties": false } } @@ -1213,7 +1285,9 @@ }, "/api/session/{sessionID}/model": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.switchModel", "parameters": [ { @@ -1285,7 +1359,9 @@ "$ref": "#/components/schemas/Model.Ref" } }, - "required": ["model"], + "required": [ + "model" + ], "additionalProperties": false } } @@ -1296,7 +1372,9 @@ }, "/api/session/{sessionID}/rename": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.rename", "parameters": [ { @@ -1368,7 +1446,9 @@ "type": "string" } }, - "required": ["title"], + "required": [ + "title" + ], "additionalProperties": false } } @@ -1379,7 +1459,9 @@ }, "/api/session/{sessionID}/move": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.move", "parameters": [ { @@ -1459,10 +1541,12 @@ ] }, "delivery": { - "$ref": "#/components/schemas/Union_8" + "$ref": "#/components/schemas/Union_7" } }, - "required": ["directory"], + "required": [ + "directory" + ], "additionalProperties": false } } @@ -1473,7 +1557,9 @@ }, "/api/session/{sessionID}/prompt": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.prompt", "parameters": [ { @@ -1503,7 +1589,9 @@ "$ref": "#/components/schemas/Session.Inbox.User" } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -1573,7 +1661,7 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/Union_9" + "$ref": "#/components/schemas/Union_8" }, "text": { "type": "string" @@ -1591,13 +1679,15 @@ "$ref": "#/components/schemas/Objects_3" }, "delivery": { - "$ref": "#/components/schemas/Union_8" + "$ref": "#/components/schemas/Union_7" }, "resume": { - "$ref": "#/components/schemas/Union_10" + "$ref": "#/components/schemas/Union_9" } }, - "required": ["text"], + "required": [ + "text" + ], "additionalProperties": false } } @@ -1608,7 +1698,9 @@ }, "/api/session/{sessionID}/command": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.command", "parameters": [ { @@ -1627,36 +1719,15 @@ ], "security": [], "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/Session.Inbox.User" - } - }, - "required": ["data"], - "additionalProperties": false - } - } - } + "204": { + "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/InvalidRequestErrorEncoded" - }, - { - "$ref": "#/components/schemas/InvalidRequestErrorEncoded" - } - ] + "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } @@ -1691,28 +1762,18 @@ } } }, - "409": { - "description": "ConflictError", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConflictErrorEncoded" - } - } - } - }, "500": { - "description": "CommandEvaluationError", + "description": "CommandExecutionError", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CommandEvaluationErrorEncoded" + "$ref": "#/components/schemas/CommandExecutionErrorEncoded" } } } } }, - "description": "Resolve a slash command into prompt input, admit it durably, and schedule execution unless resume is false.", + "description": "Execute a slash command callback immediately.", "summary": "Run command", "requestBody": { "content": { @@ -1720,20 +1781,11 @@ "schema": { "type": "object", "properties": { - "id": { - "$ref": "#/components/schemas/Union_9" - }, "command": { "type": "string" }, - "arguments": { - "$ref": "#/components/schemas/Union_" - }, - "agent": { - "$ref": "#/components/schemas/Union_2" - }, - "model": { - "$ref": "#/components/schemas/Union_3" + "text": { + "type": "string" }, "files": { "$ref": "#/components/schemas/Arrays_4" @@ -1745,13 +1797,13 @@ "$ref": "#/components/schemas/Arrays_6" }, "delivery": { - "$ref": "#/components/schemas/Union_8" - }, - "resume": { - "$ref": "#/components/schemas/Union_10" + "$ref": "#/components/schemas/Union_7" } }, - "required": ["command"], + "required": [ + "command", + "text" + ], "additionalProperties": false } } @@ -1762,7 +1814,9 @@ }, "/api/session/{sessionID}/skill": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.skill", "parameters": [ { @@ -1834,16 +1888,18 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/Union_9" + "$ref": "#/components/schemas/Union_8" }, "skill": { "type": "string" }, "resume": { - "$ref": "#/components/schemas/Union_10" + "$ref": "#/components/schemas/Union_9" } }, - "required": ["skill"], + "required": [ + "skill" + ], "additionalProperties": false } } @@ -1854,7 +1910,9 @@ }, "/api/session/{sessionID}/synthetic": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.synthetic", "parameters": [ { @@ -1884,7 +1942,9 @@ "$ref": "#/components/schemas/Session.Inbox.Synthetic" } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -1947,7 +2007,7 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/Union_9" + "$ref": "#/components/schemas/Union_8" }, "text": { "type": "string" @@ -1959,13 +2019,15 @@ "$ref": "#/components/schemas/Objects_" }, "delivery": { - "$ref": "#/components/schemas/Union_8" + "$ref": "#/components/schemas/Union_7" }, "resume": { - "$ref": "#/components/schemas/Union_10" + "$ref": "#/components/schemas/Union_9" } }, - "required": ["text"], + "required": [ + "text" + ], "additionalProperties": false } } @@ -1976,7 +2038,9 @@ }, "/api/session/{sessionID}/shell": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.shell", "parameters": [ { @@ -2063,7 +2127,9 @@ "type": "string" } }, - "required": ["command"], + "required": [ + "command" + ], "additionalProperties": false } } @@ -2074,7 +2140,9 @@ }, "/api/session/{sessionID}/compact": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.compact", "parameters": [ { @@ -2104,7 +2172,9 @@ "$ref": "#/components/schemas/Session.Inbox.Compaction" } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -2167,10 +2237,10 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/Union_9" + "$ref": "#/components/schemas/Union_8" }, "delivery": { - "$ref": "#/components/schemas/Union_8" + "$ref": "#/components/schemas/Union_7" } }, "additionalProperties": false @@ -2183,7 +2253,9 @@ }, "/api/session/{sessionID}/wait": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.wait", "parameters": [ { @@ -2259,7 +2331,9 @@ }, "/api/session/{sessionID}/revert/stage": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.revert.stage", "parameters": [ { @@ -2289,7 +2363,9 @@ "$ref": "#/components/schemas/Session.Revert" } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -2373,10 +2449,12 @@ ] }, "files": { - "$ref": "#/components/schemas/Union_10" + "$ref": "#/components/schemas/Union_9" } }, - "required": ["messageID"], + "required": [ + "messageID" + ], "additionalProperties": false } } @@ -2387,7 +2465,9 @@ }, "/api/session/{sessionID}/revert/clear": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.revert.clear", "parameters": [ { @@ -2472,7 +2552,9 @@ }, "/api/session/{sessionID}/revert/commit": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.revert.commit", "parameters": [ { @@ -2547,7 +2629,9 @@ }, "/api/session/{sessionID}/context": { "get": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.context", "parameters": [ { @@ -2580,7 +2664,9 @@ } } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -2633,7 +2719,9 @@ }, "/api/session/{sessionID}/inbox": { "get": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.inbox.list", "parameters": [ { @@ -2666,7 +2754,9 @@ } } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -2709,7 +2799,9 @@ }, "/api/session/{sessionID}/inbox/{inboxID}": { "delete": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.inbox.cancel", "parameters": [ { @@ -2791,7 +2883,9 @@ }, "/api/session/{sessionID}/inbox/{inboxID}/steer": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.inbox.steer", "parameters": [ { @@ -2873,7 +2967,9 @@ }, "/api/session/{sessionID}/inbox/{inboxID}/queue": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.inbox.queue", "parameters": [ { @@ -2955,7 +3051,9 @@ }, "/api/session/{sessionID}/instructions/entries": { "get": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.instructions.entry.list", "parameters": [ { @@ -2988,7 +3086,9 @@ } } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -3038,7 +3138,9 @@ }, "/api/session/{sessionID}/instructions/entries/{key}": { "put": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.instructions.entry.put", "parameters": [ { @@ -3126,7 +3228,9 @@ "properties": { "value": {} }, - "required": ["value"], + "required": [ + "value" + ], "additionalProperties": false } } @@ -3135,7 +3239,9 @@ } }, "delete": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.instructions.entry.remove", "parameters": [ { @@ -3209,7 +3315,9 @@ }, "/api/session/{sessionID}/generate": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.generate", "parameters": [ { @@ -3298,7 +3406,9 @@ "type": "string" } }, - "required": ["prompt"], + "required": [ + "prompt" + ], "additionalProperties": false } } @@ -3309,7 +3419,9 @@ }, "/api/experimental/session/{sessionID}/log": { "get": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.log", "parameters": [ { @@ -3344,7 +3456,7 @@ "name": "follow", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_7" + "$ref": "#/components/schemas/Union_6" }, "required": false } @@ -3375,7 +3487,11 @@ "$ref": "#/components/schemas/SessionLogItemEncoded" } }, - "required": ["id", "event", "data"], + "required": [ + "id", + "event", + "data" + ], "additionalProperties": false }, "x-effect-stream": { @@ -3389,13 +3505,18 @@ "properties": { "_tag": { "type": "string", - "enum": ["Fail"] + "enum": [ + "Fail" + ] }, "error": { "not": {} } }, - "required": ["_tag", "error"], + "required": [ + "_tag", + "error" + ], "additionalProperties": false }, { @@ -3403,11 +3524,16 @@ "properties": { "_tag": { "type": "string", - "enum": ["Die"] + "enum": [ + "Die" + ] }, "defect": {} }, - "required": ["_tag", "defect"], + "required": [ + "_tag", + "defect" + ], "additionalProperties": false }, { @@ -3415,7 +3541,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["Interrupt"] + "enum": [ + "Interrupt" + ] }, "fiberId": { "anyOf": [ @@ -3428,7 +3556,10 @@ ] } }, - "required": ["_tag", "fiberId"], + "required": [ + "_tag", + "fiberId" + ], "additionalProperties": false } ] @@ -3479,7 +3610,9 @@ }, "/api/session/{sessionID}/interrupt": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.interrupt", "parameters": [ { @@ -3499,7 +3632,7 @@ "name": "continue", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_7" + "$ref": "#/components/schemas/Union_6" }, "required": false } @@ -3553,7 +3686,9 @@ }, "/api/session/{sessionID}/background": { "post": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.background", "parameters": [ { @@ -3619,7 +3754,9 @@ }, "/api/session/{sessionID}/message/{messageID}": { "get": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.message", "parameters": [ { @@ -3662,7 +3799,9 @@ "$ref": "#/components/schemas/Session.Message.Info" } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -3712,7 +3851,9 @@ }, "/api/session/{sessionID}/environment": { "put": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.session.environment", "parameters": [ { @@ -3780,7 +3921,9 @@ } } }, - "required": ["variables"], + "required": [ + "variables" + ], "additionalProperties": false } } @@ -3791,7 +3934,9 @@ }, "/api/session/{sessionID}/message": { "get": { - "tags": ["session"], + "tags": [ + "session" + ], "operationId": "v2.message.list", "parameters": [ { @@ -3830,7 +3975,10 @@ "anyOf": [ { "type": "string", - "enum": ["asc", "desc"] + "enum": [ + "asc", + "desc" + ] }, { "type": "null" @@ -3923,7 +4071,9 @@ }, "/api/model": { "get": { - "tags": ["model"], + "tags": [ + "model" + ], "operationId": "v2.model.list", "parameters": [ { @@ -3956,7 +4106,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -3999,7 +4152,9 @@ }, "/api/model/default": { "get": { - "tags": ["model"], + "tags": [ + "model" + ], "operationId": "v2.model.default", "parameters": [ { @@ -4036,7 +4191,10 @@ ] } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -4079,7 +4237,9 @@ }, "/api/generate": { "post": { - "tags": ["generate"], + "tags": [ + "generate" + ], "operationId": "v2.generate.text", "parameters": [ { @@ -4155,10 +4315,12 @@ "type": "string" }, "model": { - "$ref": "#/components/schemas/Union_3" + "$ref": "#/components/schemas/Union_2" } }, - "required": ["prompt"], + "required": [ + "prompt" + ], "additionalProperties": false } } @@ -4169,7 +4331,9 @@ }, "/api/provider": { "get": { - "tags": ["provider"], + "tags": [ + "provider" + ], "operationId": "v2.provider.list", "parameters": [ { @@ -4202,7 +4366,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -4245,7 +4412,9 @@ }, "/api/provider/{providerID}": { "get": { - "tags": ["provider"], + "tags": [ + "provider" + ], "operationId": "v2.provider.get", "parameters": [ { @@ -4283,7 +4452,10 @@ "$ref": "#/components/schemas/Provider.Info" } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -4336,7 +4508,9 @@ }, "/api/integration": { "get": { - "tags": ["integration"], + "tags": [ + "integration" + ], "operationId": "v2.integration.list", "parameters": [ { @@ -4369,7 +4543,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -4402,7 +4579,9 @@ }, "/api/integration/{integrationID}": { "get": { - "tags": ["integration"], + "tags": [ + "integration" + ], "operationId": "v2.integration.get", "parameters": [ { @@ -4447,7 +4626,10 @@ ] } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -4480,7 +4662,9 @@ }, "/api/experimental/integration/wellknown": { "post": { - "tags": ["integration"], + "tags": [ + "integration" + ], "operationId": "v2.experimental.integration.wellknown.add", "parameters": [ { @@ -4539,7 +4723,9 @@ "type": "string" } }, - "required": ["url"], + "required": [ + "url" + ], "additionalProperties": false } } @@ -4550,7 +4736,9 @@ }, "/api/integration/{integrationID}/connect/key": { "post": { - "tags": ["integration"], + "tags": [ + "integration" + ], "operationId": "v2.integration.connect.key", "parameters": [ { @@ -4617,13 +4805,15 @@ "type": "string" }, "answer": { - "$ref": "#/components/schemas/Union_12" + "$ref": "#/components/schemas/Union_11" }, "label": { "$ref": "#/components/schemas/Union_" } }, - "required": ["key"], + "required": [ + "key" + ], "additionalProperties": false } } @@ -4634,7 +4824,9 @@ }, "/api/integration/{integrationID}/connect/oauth": { "post": { - "tags": ["integration"], + "tags": [ + "integration" + ], "operationId": "v2.integration.oauth.connect", "parameters": [ { @@ -4672,7 +4864,10 @@ "$ref": "#/components/schemas/Integration.AttemptEncoded" } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -4718,13 +4913,15 @@ "type": "string" }, "answer": { - "$ref": "#/components/schemas/Union_12" + "$ref": "#/components/schemas/Union_11" }, "label": { "$ref": "#/components/schemas/Union_" } }, - "required": ["methodID"], + "required": [ + "methodID" + ], "additionalProperties": false } } @@ -4735,7 +4932,9 @@ }, "/api/integration/{integrationID}/connect/oauth/{attemptID}": { "get": { - "tags": ["integration"], + "tags": [ + "integration" + ], "operationId": "v2.integration.oauth.status", "parameters": [ { @@ -4781,7 +4980,10 @@ "$ref": "#/components/schemas/Integration.AttemptStatus" } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -4812,7 +5014,9 @@ "summary": "Get OAuth attempt status" }, "delete": { - "tags": ["integration"], + "tags": [ + "integration" + ], "operationId": "v2.integration.oauth.cancel", "parameters": [ { @@ -4874,7 +5078,9 @@ }, "/api/integration/{integrationID}/connect/oauth/{attemptID}/complete": { "post": { - "tags": ["integration"], + "tags": [ + "integration" + ], "operationId": "v2.integration.oauth.complete", "parameters": [ { @@ -4959,7 +5165,9 @@ }, "/api/integration/{integrationID}/connect/command": { "post": { - "tags": ["integration"], + "tags": [ + "integration" + ], "operationId": "v2.integration.command.connect", "parameters": [ { @@ -4997,7 +5205,10 @@ "$ref": "#/components/schemas/Integration.CommandAttempt" } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -5046,7 +5257,9 @@ "$ref": "#/components/schemas/Union_" } }, - "required": ["methodID"], + "required": [ + "methodID" + ], "additionalProperties": false } } @@ -5057,7 +5270,9 @@ }, "/api/integration/{integrationID}/connect/command/{attemptID}": { "get": { - "tags": ["integration"], + "tags": [ + "integration" + ], "operationId": "v2.integration.command.status", "parameters": [ { @@ -5103,7 +5318,10 @@ "$ref": "#/components/schemas/Integration.CommandAttemptStatus" } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -5134,7 +5352,9 @@ "summary": "Get command attempt status" }, "delete": { - "tags": ["integration"], + "tags": [ + "integration" + ], "operationId": "v2.integration.command.cancel", "parameters": [ { @@ -5196,7 +5416,9 @@ }, "/api/mcp": { "get": { - "tags": ["mcp"], + "tags": [ + "mcp" + ], "operationId": "v2.mcp.list", "parameters": [ { @@ -5229,7 +5451,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -5262,7 +5487,9 @@ }, "/api/mcp/{server}": { "put": { - "tags": ["mcp"], + "tags": [ + "mcp" + ], "operationId": "v2.mcp.add", "parameters": [ { @@ -5329,7 +5556,9 @@ ] } }, - "required": ["config"], + "required": [ + "config" + ], "additionalProperties": false } } @@ -5338,7 +5567,9 @@ } }, "delete": { - "tags": ["mcp"], + "tags": [ + "mcp" + ], "operationId": "v2.mcp.remove", "parameters": [ { @@ -5402,7 +5633,9 @@ }, "/api/mcp/{server}/connect": { "post": { - "tags": ["mcp"], + "tags": [ + "mcp" + ], "operationId": "v2.mcp.connect", "parameters": [ { @@ -5466,7 +5699,9 @@ }, "/api/mcp/{server}/disconnect": { "post": { - "tags": ["mcp"], + "tags": [ + "mcp" + ], "operationId": "v2.mcp.disconnect", "parameters": [ { @@ -5530,7 +5765,9 @@ }, "/api/mcp/resource": { "get": { - "tags": ["mcp"], + "tags": [ + "mcp" + ], "operationId": "v2.mcp.resource.catalog", "parameters": [ { @@ -5560,7 +5797,10 @@ "$ref": "#/components/schemas/Mcp.ResourceCatalog" } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -5593,7 +5833,9 @@ }, "/api/credential/{credentialID}": { "patch": { - "tags": ["credential"], + "tags": [ + "credential" + ], "operationId": "v2.credential.update", "parameters": [ { @@ -5653,7 +5895,9 @@ "type": "string" } }, - "required": ["label"], + "required": [ + "label" + ], "additionalProperties": false } } @@ -5662,7 +5906,9 @@ } }, "delete": { - "tags": ["credential"], + "tags": [ + "credential" + ], "operationId": "v2.credential.remove", "parameters": [ { @@ -5716,7 +5962,9 @@ }, "/api/project": { "get": { - "tags": ["project"], + "tags": [ + "project" + ], "operationId": "v2.project.list", "parameters": [], "security": [], @@ -5761,7 +6009,9 @@ }, "/api/project/current": { "get": { - "tags": ["project"], + "tags": [ + "project" + ], "operationId": "v2.project.current", "parameters": [ { @@ -5814,7 +6064,9 @@ }, "/api/form/request": { "get": { - "tags": ["form"], + "tags": [ + "form" + ], "operationId": "v2.form.request.list", "parameters": [ { @@ -5847,7 +6099,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -5880,7 +6135,9 @@ }, "/api/session/{sessionID}/form": { "get": { - "tags": ["form"], + "tags": [ + "form" + ], "operationId": "v2.session.form.list", "parameters": [ { @@ -5908,7 +6165,9 @@ } } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -5956,7 +6215,9 @@ "summary": "List session forms" }, "post": { - "tags": ["form"], + "tags": [ + "form" + ], "operationId": "v2.session.form.create", "parameters": [ { @@ -5981,7 +6242,9 @@ "$ref": "#/components/schemas/Form.Info" } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -6058,7 +6321,9 @@ }, "/api/session/{sessionID}/form/{formID}": { "get": { - "tags": ["form"], + "tags": [ + "form" + ], "operationId": "v2.session.form.get", "parameters": [ { @@ -6096,7 +6361,9 @@ "$ref": "#/components/schemas/Form.Info" } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -6149,7 +6416,9 @@ }, "/api/session/{sessionID}/form/{formID}/state": { "get": { - "tags": ["form"], + "tags": [ + "form" + ], "operationId": "v2.session.form.state", "parameters": [ { @@ -6187,7 +6456,9 @@ "$ref": "#/components/schemas/Form.State" } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -6240,7 +6511,9 @@ }, "/api/session/{sessionID}/form/{formID}/reply": { "post": { - "tags": ["form"], + "tags": [ + "form" + ], "operationId": "v2.session.form.reply", "parameters": [ { @@ -6344,7 +6617,9 @@ }, "/api/session/{sessionID}/form/{formID}/cancel": { "post": { - "tags": ["form"], + "tags": [ + "form" + ], "operationId": "v2.session.form.cancel", "parameters": [ { @@ -6431,7 +6706,9 @@ }, "/api/permission/request": { "get": { - "tags": ["permission"], + "tags": [ + "permission" + ], "operationId": "v2.permission.request.list", "parameters": [ { @@ -6464,7 +6741,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -6497,7 +6777,9 @@ }, "/api/permission/saved": { "get": { - "tags": ["permission"], + "tags": [ + "permission" + ], "operationId": "v2.permission.saved.list", "parameters": [ { @@ -6532,7 +6814,9 @@ } } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -6565,7 +6849,9 @@ }, "/api/permission/saved/{id}": { "delete": { - "tags": ["permission"], + "tags": [ + "permission" + ], "operationId": "v2.permission.saved.remove", "parameters": [ { @@ -6609,7 +6895,9 @@ }, "/api/session/{sessionID}/permission": { "post": { - "tags": ["permission"], + "tags": [ + "permission" + ], "operationId": "v2.session.permission.create", "parameters": [ { @@ -6650,11 +6938,16 @@ "$ref": "#/components/schemas/Permission.Effect" } }, - "required": ["id", "effect"], + "required": [ + "id", + "effect" + ], "additionalProperties": false } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -6737,10 +7030,20 @@ "$ref": "#/components/schemas/Permission.Source" }, "agent": { - "$ref": "#/components/schemas/Union_2" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, - "required": ["action", "resources"], + "required": [ + "action", + "resources" + ], "additionalProperties": false } } @@ -6749,7 +7052,9 @@ } }, "get": { - "tags": ["permission"], + "tags": [ + "permission" + ], "operationId": "v2.session.permission.list", "parameters": [ { @@ -6782,7 +7087,9 @@ } } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -6832,7 +7139,9 @@ }, "/api/session/{sessionID}/permission/{requestID}": { "get": { - "tags": ["permission"], + "tags": [ + "permission" + ], "operationId": "v2.session.permission.get", "parameters": [ { @@ -6875,7 +7184,9 @@ "$ref": "#/components/schemas/Permission.Request" } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false } } @@ -6928,7 +7239,9 @@ }, "/api/session/{sessionID}/permission/{requestID}/reply": { "post": { - "tags": ["permission"], + "tags": [ + "permission" + ], "operationId": "v2.session.permission.reply", "parameters": [ { @@ -7019,7 +7332,9 @@ "$ref": "#/components/schemas/Union_" } }, - "required": ["reply"], + "required": [ + "reply" + ], "additionalProperties": false } } @@ -7030,7 +7345,9 @@ }, "/api/fs/read/*": { "get": { - "tags": ["filesystem"], + "tags": [ + "filesystem" + ], "operationId": "v2.fs.read", "parameters": [ { @@ -7084,7 +7401,9 @@ }, "/api/fs/list": { "get": { - "tags": ["filesystem"], + "tags": [ + "filesystem" + ], "operationId": "v2.fs.list", "parameters": [ { @@ -7132,7 +7451,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -7165,7 +7487,9 @@ }, "/api/fs/find": { "get": { - "tags": ["filesystem"], + "tags": [ + "filesystem" + ], "operationId": "v2.fs.find", "parameters": [ { @@ -7191,7 +7515,10 @@ "in": "query", "schema": { "type": "string", - "enum": ["file", "directory"] + "enum": [ + "file", + "directory" + ] }, "required": false }, @@ -7230,7 +7557,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -7263,7 +7593,9 @@ }, "/api/command": { "get": { - "tags": ["command"], + "tags": [ + "command" + ], "operationId": "v2.command.list", "parameters": [ { @@ -7296,7 +7628,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -7329,7 +7664,9 @@ }, "/api/skill": { "get": { - "tags": ["skill"], + "tags": [ + "skill" + ], "operationId": "v2.skill.list", "parameters": [ { @@ -7362,7 +7699,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -7395,7 +7735,9 @@ }, "/api/event": { "get": { - "tags": ["event"], + "tags": [ + "event" + ], "operationId": "v2.event.subscribe", "parameters": [], "security": [], @@ -7424,7 +7766,11 @@ "$ref": "#/components/schemas/V2EventEncoded" } }, - "required": ["id", "event", "data"], + "required": [ + "id", + "event", + "data" + ], "additionalProperties": false }, "x-effect-stream": { @@ -7438,13 +7784,18 @@ "properties": { "_tag": { "type": "string", - "enum": ["Fail"] + "enum": [ + "Fail" + ] }, "error": { "not": {} } }, - "required": ["_tag", "error"], + "required": [ + "_tag", + "error" + ], "additionalProperties": false }, { @@ -7452,11 +7803,16 @@ "properties": { "_tag": { "type": "string", - "enum": ["Die"] + "enum": [ + "Die" + ] }, "defect": {} }, - "required": ["_tag", "defect"], + "required": [ + "_tag", + "defect" + ], "additionalProperties": false }, { @@ -7464,7 +7820,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["Interrupt"] + "enum": [ + "Interrupt" + ] }, "fiberId": { "anyOf": [ @@ -7477,7 +7835,10 @@ ] } }, - "required": ["_tag", "fiberId"], + "required": [ + "_tag", + "fiberId" + ], "additionalProperties": false } ] @@ -7518,7 +7879,9 @@ }, "/api/pty": { "get": { - "tags": ["pty"], + "tags": [ + "pty" + ], "operationId": "v2.pty.list", "parameters": [ { @@ -7551,7 +7914,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -7582,7 +7948,9 @@ "summary": "List PTY sessions" }, "post": { - "tags": ["pty"], + "tags": [ + "pty" + ], "operationId": "v2.pty.create", "parameters": [ { @@ -7612,7 +7980,10 @@ "$ref": "#/components/schemas/Pty" } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -7679,7 +8050,9 @@ }, "/api/pty/{ptyID}": { "get": { - "tags": ["pty"], + "tags": [ + "pty" + ], "operationId": "v2.pty.get", "parameters": [ { @@ -7722,7 +8095,10 @@ "$ref": "#/components/schemas/Pty" } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -7763,7 +8139,9 @@ "summary": "Get PTY session" }, "put": { - "tags": ["pty"], + "tags": [ + "pty" + ], "operationId": "v2.pty.update", "parameters": [ { @@ -7806,7 +8184,10 @@ "$ref": "#/components/schemas/Pty" } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -7874,7 +8255,10 @@ ] } }, - "required": ["rows", "cols"], + "required": [ + "rows", + "cols" + ], "additionalProperties": false } }, @@ -7886,7 +8270,9 @@ } }, "delete": { - "tags": ["pty"], + "tags": [ + "pty" + ], "operationId": "v2.pty.remove", "parameters": [ { @@ -7955,7 +8341,9 @@ }, "/api/pty/{ptyID}/connect-token": { "post": { - "tags": ["pty"], + "tags": [ + "pty" + ], "operationId": "v2.pty.connect.token", "parameters": [ { @@ -7998,7 +8386,10 @@ "$ref": "#/components/schemas/PtyTicket.ConnectToken" } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -8051,7 +8442,9 @@ }, "/api/pty/{ptyID}/connect": { "get": { - "tags": ["pty"], + "tags": [ + "pty" + ], "operationId": "v2.pty.connect", "parameters": [ { @@ -8156,7 +8549,9 @@ }, "/api/shell": { "get": { - "tags": ["shell"], + "tags": [ + "shell" + ], "operationId": "v2.shell.list", "parameters": [ { @@ -8189,7 +8584,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -8220,7 +8618,9 @@ "summary": "List running shell commands" }, "post": { - "tags": ["shell"], + "tags": [ + "shell" + ], "operationId": "v2.shell.create", "parameters": [ { @@ -8250,7 +8650,10 @@ "$ref": "#/components/schemas/Shell.Info" } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -8303,7 +8706,10 @@ "type": "object" } }, - "required": ["command", "timeout"], + "required": [ + "command", + "timeout" + ], "additionalProperties": false } } @@ -8314,7 +8720,9 @@ }, "/api/shell/{id}": { "get": { - "tags": ["shell"], + "tags": [ + "shell" + ], "operationId": "v2.shell.get", "parameters": [ { @@ -8357,7 +8765,10 @@ "$ref": "#/components/schemas/Shell.Info" } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -8398,7 +8809,9 @@ "summary": "Get shell command" }, "delete": { - "tags": ["shell"], + "tags": [ + "shell" + ], "operationId": "v2.shell.remove", "parameters": [ { @@ -8467,7 +8880,9 @@ }, "/api/shell/{id}/timeout": { "patch": { - "tags": ["shell"], + "tags": [ + "shell" + ], "operationId": "v2.shell.timeout", "parameters": [ { @@ -8510,7 +8925,10 @@ "$ref": "#/components/schemas/Shell.Info" } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -8564,7 +8982,9 @@ ] } }, - "required": ["timeout"], + "required": [ + "timeout" + ], "additionalProperties": false } } @@ -8575,7 +8995,9 @@ }, "/api/shell/{id}/output": { "get": { - "tags": ["shell"], + "tags": [ + "shell" + ], "operationId": "v2.shell.output", "parameters": [ { @@ -8644,7 +9066,10 @@ "$ref": "#/components/schemas/Objects_2" } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -8687,7 +9112,9 @@ }, "/api/reference": { "get": { - "tags": ["reference"], + "tags": [ + "reference" + ], "operationId": "v2.reference.list", "parameters": [ { @@ -8720,7 +9147,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -8753,7 +9183,9 @@ }, "/api/worktree/{projectID}": { "get": { - "tags": ["worktree"], + "tags": [ + "worktree" + ], "operationId": "v2.worktree.list", "parameters": [ { @@ -8802,7 +9234,9 @@ "summary": "List worktrees" }, "post": { - "tags": ["worktree"], + "tags": [ + "worktree" + ], "operationId": "v2.worktree.create", "parameters": [ { @@ -8875,7 +9309,10 @@ "type": "string" } }, - "required": ["strategy", "directory"], + "required": [ + "strategy", + "directory" + ], "additionalProperties": false } } @@ -8884,7 +9321,9 @@ } }, "delete": { - "tags": ["worktree"], + "tags": [ + "worktree" + ], "operationId": "v2.worktree.remove", "parameters": [ { @@ -8944,7 +9383,10 @@ "type": "boolean" } }, - "required": ["directory", "force"], + "required": [ + "directory", + "force" + ], "additionalProperties": false } } @@ -8955,7 +9397,9 @@ }, "/api/worktree/{projectID}/refresh": { "post": { - "tags": ["worktree"], + "tags": [ + "worktree" + ], "operationId": "v2.worktree.refresh", "parameters": [ { @@ -9006,7 +9450,9 @@ }, "/api/vcs": { "get": { - "tags": ["vcs"], + "tags": [ + "vcs" + ], "operationId": "v2.vcs.get", "parameters": [ { @@ -9036,7 +9482,10 @@ "$ref": "#/components/schemas/Vcs.Info" } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -9069,7 +9518,9 @@ }, "/api/vcs/status": { "get": { - "tags": ["vcs"], + "tags": [ + "vcs" + ], "operationId": "v2.vcs.status", "parameters": [ { @@ -9102,7 +9553,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -9135,7 +9589,9 @@ }, "/api/vcs/diff": { "get": { - "tags": ["vcs"], + "tags": [ + "vcs" + ], "operationId": "v2.vcs.diff", "parameters": [ { @@ -9191,7 +9647,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -9224,7 +9683,9 @@ }, "/api/debug/location": { "get": { - "tags": ["debug"], + "tags": [ + "debug" + ], "operationId": "v2.debug.location.list", "parameters": [], "security": [], @@ -9267,7 +9728,9 @@ "summary": "List loaded locations" }, "delete": { - "tags": ["debug"], + "tags": [ + "debug" + ], "operationId": "v2.debug.location.evict", "parameters": [ { @@ -9313,7 +9776,9 @@ }, "/api/experimental/migration/v1": { "get": { - "tags": ["migration"], + "tags": [ + "migration" + ], "operationId": "v2.experimental.migration.v1.status", "parameters": [], "security": [], @@ -9329,10 +9794,15 @@ "properties": { "status": { "type": "string", - "enum": ["required", "completed"] + "enum": [ + "required", + "completed" + ] } }, - "required": ["status"], + "required": [ + "status" + ], "additionalProperties": false }, { @@ -9340,7 +9810,9 @@ "properties": { "status": { "type": "string", - "enum": ["running"] + "enum": [ + "running" + ] }, "progress": { "type": "object", @@ -9379,11 +9851,16 @@ ] } }, - "required": ["label"], + "required": [ + "label" + ], "additionalProperties": false } }, - "required": ["status", "progress"], + "required": [ + "status", + "progress" + ], "additionalProperties": false }, { @@ -9391,13 +9868,18 @@ "properties": { "status": { "type": "string", - "enum": ["error"] + "enum": [ + "error" + ] }, "error": { "type": "string" } }, - "required": ["status", "error"], + "required": [ + "status", + "error" + ], "additionalProperties": false } ] @@ -9432,7 +9914,9 @@ }, "/api/websearch/provider": { "get": { - "tags": ["websearch"], + "tags": [ + "websearch" + ], "operationId": "v2.websearch.providers", "parameters": [ { @@ -9465,7 +9949,10 @@ } } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -9508,7 +9995,9 @@ }, "/api/websearch": { "post": { - "tags": ["websearch"], + "tags": [ + "websearch" + ], "operationId": "v2.websearch.query", "parameters": [ { @@ -9538,7 +10027,10 @@ "$ref": "#/components/schemas/WebSearch.ResponseEncoded" } }, - "required": ["location", "data"], + "required": [ + "location", + "data" + ], "additionalProperties": false } } @@ -9597,7 +10089,9 @@ "type": "string" } }, - "required": ["query"], + "required": [ + "query" + ], "additionalProperties": false } } @@ -9608,7 +10102,9 @@ }, "/api/config": { "get": { - "tags": ["config"], + "tags": [ + "config" + ], "operationId": "v2.config.get", "parameters": [ { @@ -9670,7 +10166,9 @@ "properties": { "healthy": { "type": "boolean", - "enum": [true] + "enum": [ + true + ] }, "version": { "type": "string" @@ -9684,7 +10182,11 @@ ] } }, - "required": ["healthy", "version", "pid"], + "required": [ + "healthy", + "version", + "pid" + ], "additionalProperties": false }, "UnauthorizedErrorEncoded": { @@ -9692,13 +10194,18 @@ "properties": { "_tag": { "type": "string", - "enum": ["UnauthorizedError"] + "enum": [ + "UnauthorizedError" + ] }, "message": { "type": "string" } }, - "required": ["_tag", "message"], + "required": [ + "_tag", + "message" + ], "additionalProperties": false }, "Union_": { @@ -9716,7 +10223,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["InvalidRequestError"] + "enum": [ + "InvalidRequestError" + ] }, "message": { "type": "string" @@ -9728,7 +10237,10 @@ "$ref": "#/components/schemas/Union_" } }, - "required": ["_tag", "message"], + "required": [ + "_tag", + "message" + ], "additionalProperties": false }, "Union_1": { @@ -9777,11 +10289,18 @@ "type": "string" } }, - "required": ["id", "directory", "canonical"], + "required": [ + "id", + "directory", + "canonical" + ], "additionalProperties": false } }, - "required": ["directory", "project"], + "required": [ + "directory", + "project" + ], "additionalProperties": false }, "Model.Ref": { @@ -9797,7 +10316,10 @@ "type": "string" } }, - "required": ["id", "providerID"], + "required": [ + "id", + "providerID" + ], "additionalProperties": false }, "Provider.Settings": { @@ -9819,7 +10341,11 @@ "type": "object" } }, - "required": ["settings", "headers", "body"], + "required": [ + "settings", + "headers", + "body" + ], "additionalProperties": false }, "Agent.Color": { @@ -9827,7 +10353,11 @@ }, "Permission.Effect": { "type": "string", - "enum": ["allow", "deny", "ask"] + "enum": [ + "allow", + "deny", + "ask" + ] }, "Permission.Rule": { "type": "object", @@ -9842,7 +10372,11 @@ "$ref": "#/components/schemas/Permission.Effect" } }, - "required": ["action", "resource", "effect"], + "required": [ + "action", + "resource", + "effect" + ], "additionalProperties": false }, "Permission.Ruleset": { @@ -9874,7 +10408,11 @@ }, "mode": { "type": "string", - "enum": ["subagent", "primary", "all"] + "enum": [ + "subagent", + "primary", + "all" + ] }, "hidden": { "type": "boolean" @@ -9894,7 +10432,14 @@ "$ref": "#/components/schemas/Permission.Ruleset" } }, - "required": ["id", "name", "request", "mode", "hidden", "permissions"], + "required": [ + "id", + "name", + "request", + "mode", + "hidden", + "permissions" + ], "additionalProperties": false }, "AgentNotFoundErrorEncoded": { @@ -9902,7 +10447,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["AgentNotFoundError"] + "enum": [ + "AgentNotFoundError" + ] }, "agentID": { "type": "string" @@ -9911,18 +10458,145 @@ "type": "string" } }, - "required": ["_tag", "agentID", "message"], + "required": [ + "_tag", + "agentID", + "message" + ], "additionalProperties": false }, - "Plugin.Info": { - "type": "object", - "properties": { - "id": { - "type": "string" + "Plugin.Source": { + "anyOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "builtin" + ] + } + }, + "required": [ + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "package" + ] + }, + "package": { + "type": "string" + } + }, + "required": [ + "type", + "package" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "local" + ] + }, + "path": { + "type": "string" + } + }, + "required": [ + "type", + "path" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "sdk" + ] + } + }, + "required": [ + "type" + ], + "additionalProperties": false } - }, - "required": ["id"], - "additionalProperties": false + ] + }, + "Plugin.Info": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "source": { + "$ref": "#/components/schemas/Plugin.Source" + }, + "status": { + "type": "string", + "enum": [ + "active" + ] + }, + "tui": { + "type": "boolean" + } + }, + "required": [ + "id", + "source", + "status", + "tui" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "source": { + "$ref": "#/components/schemas/Plugin.Source" + }, + "status": { + "type": "string", + "enum": [ + "failed" + ] + }, + "error": { + "type": "string" + }, + "tui": { + "type": "boolean" + } + }, + "required": [ + "source", + "status", + "error", + "tui" + ], + "additionalProperties": false + } + ] }, "Session.ForkBoundary": { "anyOf": [ @@ -9931,7 +10605,9 @@ "properties": { "type": { "type": "string", - "enum": ["before"] + "enum": [ + "before" + ] }, "messageID": { "type": "string", @@ -9942,7 +10618,10 @@ ] } }, - "required": ["type", "messageID"], + "required": [ + "type", + "messageID" + ], "additionalProperties": false }, { @@ -9950,7 +10629,9 @@ "properties": { "type": { "type": "string", - "enum": ["through"] + "enum": [ + "through" + ] }, "messageID": { "type": "string", @@ -9961,7 +10642,10 @@ ] } }, - "required": ["type", "messageID"], + "required": [ + "type", + "messageID" + ], "additionalProperties": false } ] @@ -9991,11 +10675,19 @@ "type": "number" } }, - "required": ["read", "write"], + "required": [ + "read", + "write" + ], "additionalProperties": false } }, - "required": ["input", "output", "reasoning", "cache"], + "required": [ + "input", + "output", + "reasoning", + "cache" + ], "additionalProperties": false }, "Location.Ref": { @@ -10013,7 +10705,9 @@ ] } }, - "required": ["directory"], + "required": [ + "directory" + ], "additionalProperties": false }, "FileDiff.Info": { @@ -10043,10 +10737,20 @@ }, "status": { "type": "string", - "enum": ["added", "deleted", "modified"] + "enum": [ + "added", + "deleted", + "modified" + ] } }, - "required": ["file", "patch", "additions", "deletions", "status"], + "required": [ + "file", + "patch", + "additions", + "deletions", + "status" + ], "additionalProperties": false }, "Session.Revert": { @@ -10073,7 +10777,9 @@ } } }, - "required": ["messageID"], + "required": [ + "messageID" + ], "additionalProperties": false }, "Session.Info": { @@ -10110,7 +10816,10 @@ "$ref": "#/components/schemas/Session.ForkBoundary" } }, - "required": ["sessionID", "boundary"], + "required": [ + "sessionID", + "boundary" + ], "additionalProperties": false }, "projectID": { @@ -10141,7 +10850,10 @@ "type": "number" } }, - "required": ["created", "updated"], + "required": [ + "created", + "updated" + ], "additionalProperties": false }, "title": { @@ -10157,7 +10869,14 @@ "$ref": "#/components/schemas/Session.Revert" } }, - "required": ["id", "projectID", "cost", "tokens", "time", "location"], + "required": [ + "id", + "projectID", + "cost", + "tokens", + "time", + "location" + ], "additionalProperties": false }, "SessionsResponse": { @@ -10196,7 +10915,10 @@ "additionalProperties": false } }, - "required": ["data", "cursor"], + "required": [ + "data", + "cursor" + ], "additionalProperties": false }, "InvalidCursorErrorEncoded": { @@ -10204,26 +10926,21 @@ "properties": { "_tag": { "type": "string", - "enum": ["InvalidCursorError"] + "enum": [ + "InvalidCursorError" + ] }, "message": { "type": "string" } }, - "required": ["_tag", "message"], + "required": [ + "_tag", + "message" + ], "additionalProperties": false }, "Union_2": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "Union_3": { "anyOf": [ { "$ref": "#/components/schemas/Model.Ref" @@ -10233,7 +10950,7 @@ } ] }, - "Union_4": { + "Union_3": { "anyOf": [ { "$ref": "#/components/schemas/Location.Ref" @@ -10253,7 +10970,9 @@ "type": "number" } }, - "required": ["created"], + "required": [ + "created" + ], "additionalProperties": false }, "Session.Message.AgentSelected": { @@ -10275,7 +10994,9 @@ }, "type": { "type": "string", - "enum": ["agent-switched"] + "enum": [ + "agent-switched" + ] }, "agent": { "type": "string" @@ -10284,7 +11005,12 @@ "type": "string" } }, - "required": ["id", "time", "type", "agent"], + "required": [ + "id", + "time", + "type", + "agent" + ], "additionalProperties": false }, "Session.Message.ModelSelected": { @@ -10306,7 +11032,9 @@ }, "type": { "type": "string", - "enum": ["model-switched"] + "enum": [ + "model-switched" + ] }, "model": { "$ref": "#/components/schemas/Model.Ref" @@ -10315,7 +11043,12 @@ "$ref": "#/components/schemas/Model.Ref" } }, - "required": ["id", "time", "type", "model"], + "required": [ + "id", + "time", + "type", + "model" + ], "additionalProperties": false }, "Session.Message.LocationSwitched": { @@ -10337,7 +11070,9 @@ }, "type": { "type": "string", - "enum": ["location-switched"] + "enum": [ + "location-switched" + ] }, "location": { "$ref": "#/components/schemas/Location.Ref" @@ -10361,11 +11096,18 @@ "type": "string" } }, - "required": ["location"], + "required": [ + "location" + ], "additionalProperties": false } }, - "required": ["id", "time", "type", "location"], + "required": [ + "id", + "time", + "type", + "location" + ], "additionalProperties": false }, "Prompt.Base64": { @@ -10383,10 +11125,14 @@ "properties": { "type": { "type": "string", - "enum": ["inline"] + "enum": [ + "inline" + ] } }, - "required": ["type"], + "required": [ + "type" + ], "additionalProperties": false }, { @@ -10394,13 +11140,18 @@ "properties": { "type": { "type": "string", - "enum": ["uri"] + "enum": [ + "uri" + ] }, "uri": { "type": "string" } }, - "required": ["type", "uri"], + "required": [ + "type", + "uri" + ], "additionalProperties": false } ] @@ -10418,7 +11169,11 @@ "type": "string" } }, - "required": ["start", "end", "text"], + "required": [ + "start", + "end", + "text" + ], "additionalProperties": false }, "Prompt.FileAttachment": { @@ -10443,7 +11198,11 @@ "$ref": "#/components/schemas/Prompt.Mention" } }, - "required": ["data", "mime", "source"], + "required": [ + "data", + "mime", + "source" + ], "additionalProperties": false }, "Arrays_1": { @@ -10462,7 +11221,9 @@ "$ref": "#/components/schemas/Prompt.Mention" } }, - "required": ["name"], + "required": [ + "name" + ], "additionalProperties": false }, "Arrays_2": { @@ -10487,7 +11248,11 @@ "$ref": "#/components/schemas/Prompt.Mention" } }, - "required": ["id", "name", "text"], + "required": [ + "id", + "name", + "text" + ], "additionalProperties": false }, "Arrays_3": { @@ -10527,10 +11292,17 @@ }, "type": { "type": "string", - "enum": ["user"] + "enum": [ + "user" + ] } }, - "required": ["id", "time", "text", "type"], + "required": [ + "id", + "time", + "text", + "type" + ], "additionalProperties": false }, "Session.Message.Synthetic": { @@ -10558,10 +11330,17 @@ }, "type": { "type": "string", - "enum": ["synthetic"] + "enum": [ + "synthetic" + ] } }, - "required": ["id", "time", "text", "type"], + "required": [ + "id", + "time", + "text", + "type" + ], "additionalProperties": false }, "Session.Message.System": { @@ -10583,7 +11362,9 @@ }, "type": { "type": "string", - "enum": ["system"] + "enum": [ + "system" + ] }, "text": { "type": "string" @@ -10592,7 +11373,12 @@ "type": "string" } }, - "required": ["id", "time", "type", "text"], + "required": [ + "id", + "time", + "type", + "text" + ], "additionalProperties": false }, "Session.Message.Skill": { @@ -10614,7 +11400,9 @@ }, "type": { "type": "string", - "enum": ["skill"] + "enum": [ + "skill" + ] }, "skill": { "type": "string" @@ -10626,16 +11414,32 @@ "type": "string" } }, - "required": ["id", "time", "type", "skill", "name", "text"], + "required": [ + "id", + "time", + "type", + "skill", + "name", + "text" + ], "additionalProperties": false }, + "Union_4": { + "type": "string", + "enum": [ + "running", + "exited", + "timeout", + "killed" + ] + }, "Union_5": { "type": "string", - "enum": ["running", "exited", "timeout", "killed"] - }, - "Union_6": { - "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] + "enum": [ + "Infinity", + "-Infinity", + "NaN" + ] }, "Objects_2": { "type": "object", @@ -10663,7 +11467,12 @@ "type": "boolean" } }, - "required": ["output", "cursor", "size", "truncated"], + "required": [ + "output", + "cursor", + "size", + "truncated" + ], "additionalProperties": false }, "Session.Message.Shell": { @@ -10690,12 +11499,16 @@ "type": "number" } }, - "required": ["created"], + "required": [ + "created" + ], "additionalProperties": false }, "type": { "type": "string", - "enum": ["shell"] + "enum": [ + "shell" + ] }, "shellID": { "type": "string", @@ -10709,7 +11522,7 @@ "type": "string" }, "status": { - "$ref": "#/components/schemas/Union_5" + "$ref": "#/components/schemas/Union_4" }, "exit": { "anyOf": [ @@ -10717,7 +11530,7 @@ "type": "number" }, { - "$ref": "#/components/schemas/Union_6" + "$ref": "#/components/schemas/Union_5" } ] }, @@ -10725,7 +11538,14 @@ "$ref": "#/components/schemas/Objects_2" } }, - "required": ["id", "time", "type", "shellID", "command", "status"], + "required": [ + "id", + "time", + "type", + "shellID", + "command", + "status" + ], "additionalProperties": false }, "Session.Message.ProviderState": { @@ -10736,7 +11556,9 @@ "properties": { "type": { "type": "string", - "enum": ["text"] + "enum": [ + "text" + ] }, "text": { "type": "string" @@ -10745,7 +11567,10 @@ "$ref": "#/components/schemas/Session.Message.ProviderState" } }, - "required": ["type", "text"], + "required": [ + "type", + "text" + ], "additionalProperties": false }, "Session.Message.ProviderState_1": { @@ -10756,7 +11581,9 @@ "properties": { "type": { "type": "string", - "enum": ["reasoning"] + "enum": [ + "reasoning" + ] }, "text": { "type": "string" @@ -10774,11 +11601,16 @@ "type": "number" } }, - "required": ["created"], + "required": [ + "created" + ], "additionalProperties": false } }, - "required": ["type", "text"], + "required": [ + "type", + "text" + ], "additionalProperties": false }, "Session.Message.ProviderState_2": { @@ -10792,13 +11624,18 @@ "properties": { "status": { "type": "string", - "enum": ["streaming"] + "enum": [ + "streaming" + ] }, "input": { "type": "string" } }, - "required": ["status", "input"], + "required": [ + "status", + "input" + ], "additionalProperties": false }, "Session.Message.ToolState.Running": { @@ -10806,7 +11643,9 @@ "properties": { "status": { "type": "string", - "enum": ["running"] + "enum": [ + "running" + ] }, "input": { "type": "object" @@ -10815,7 +11654,11 @@ "type": "object" } }, - "required": ["status", "input", "metadata"], + "required": [ + "status", + "input", + "metadata" + ], "additionalProperties": false }, "Tool.TextContent": { @@ -10823,13 +11666,18 @@ "properties": { "type": { "type": "string", - "enum": ["text"] + "enum": [ + "text" + ] }, "text": { "type": "string" } }, - "required": ["type", "text"], + "required": [ + "type", + "text" + ], "additionalProperties": false }, "Tool.FileContent": { @@ -10837,7 +11685,9 @@ "properties": { "type": { "type": "string", - "enum": ["file"] + "enum": [ + "file" + ] }, "uri": { "type": "string" @@ -10849,7 +11699,11 @@ "$ref": "#/components/schemas/Union_" } }, - "required": ["type", "uri", "mime"], + "required": [ + "type", + "uri", + "mime" + ], "additionalProperties": false }, "Tool.Content": { @@ -10867,7 +11721,9 @@ "properties": { "status": { "type": "string", - "enum": ["completed"] + "enum": [ + "completed" + ] }, "input": { "type": "object" @@ -10888,7 +11744,11 @@ "type": "object" } }, - "required": ["status", "input", "content"], + "required": [ + "status", + "input", + "content" + ], "additionalProperties": false }, "Session.StructuredError": { @@ -10910,7 +11770,10 @@ ] } }, - "required": ["type", "message"], + "required": [ + "type", + "message" + ], "additionalProperties": false }, "Session.Message.ToolState.Error": { @@ -10918,7 +11781,9 @@ "properties": { "status": { "type": "string", - "enum": ["error"] + "enum": [ + "error" + ] }, "input": { "type": "object" @@ -10942,7 +11807,11 @@ "type": "object" } }, - "required": ["status", "input", "error"], + "required": [ + "status", + "input", + "error" + ], "additionalProperties": false }, "Session.Message.Assistant.Tool": { @@ -10950,7 +11819,9 @@ "properties": { "type": { "type": "string", - "enum": ["tool"] + "enum": [ + "tool" + ] }, "id": { "type": "string" @@ -10996,11 +11867,19 @@ "type": "number" } }, - "required": ["created"], + "required": [ + "created" + ], "additionalProperties": false } }, - "required": ["type", "id", "name", "state", "time"], + "required": [ + "type", + "id", + "name", + "state", + "time" + ], "additionalProperties": false }, "Session.Message.Assistant.Retry": { @@ -11021,7 +11900,11 @@ "$ref": "#/components/schemas/Session.StructuredError" } }, - "required": ["attempt", "at", "error"], + "required": [ + "attempt", + "at", + "error" + ], "additionalProperties": false }, "Session.Message.Assistant": { @@ -11048,12 +11931,16 @@ "type": "number" } }, - "required": ["created"], + "required": [ + "created" + ], "additionalProperties": false }, "type": { "type": "string", - "enum": ["assistant"] + "enum": [ + "assistant" + ] }, "agent": { "type": "string" @@ -11097,7 +11984,14 @@ }, "finish": { "type": "string", - "enum": ["stop", "length", "tool-calls", "content-filter", "error", "unknown"] + "enum": [ + "stop", + "length", + "tool-calls", + "content-filter", + "error", + "unknown" + ] }, "cost": { "$ref": "#/components/schemas/Money.USD" @@ -11112,7 +12006,14 @@ "$ref": "#/components/schemas/Session.Message.Assistant.Retry" } }, - "required": ["id", "time", "type", "agent", "model", "content"], + "required": [ + "id", + "time", + "type", + "agent", + "model", + "content" + ], "additionalProperties": false }, "Session.Message.Compaction.Running": { @@ -11120,7 +12021,9 @@ "properties": { "type": { "type": "string", - "enum": ["compaction"] + "enum": [ + "compaction" + ] }, "id": { "type": "string", @@ -11138,11 +12041,16 @@ }, "status": { "type": "string", - "enum": ["running"] + "enum": [ + "running" + ] }, "reason": { "type": "string", - "enum": ["auto", "manual"] + "enum": [ + "auto", + "manual" + ] }, "summary": { "type": "string" @@ -11151,7 +12059,15 @@ "type": "string" } }, - "required": ["type", "id", "time", "status", "reason", "summary", "recent"], + "required": [ + "type", + "id", + "time", + "status", + "reason", + "summary", + "recent" + ], "additionalProperties": false }, "Session.Message.Compaction.Completed": { @@ -11159,7 +12075,9 @@ "properties": { "type": { "type": "string", - "enum": ["compaction"] + "enum": [ + "compaction" + ] }, "id": { "type": "string", @@ -11177,11 +12095,16 @@ }, "status": { "type": "string", - "enum": ["completed"] + "enum": [ + "completed" + ] }, "reason": { "type": "string", - "enum": ["auto", "manual"] + "enum": [ + "auto", + "manual" + ] }, "summary": { "type": "string" @@ -11190,7 +12113,15 @@ "type": "string" } }, - "required": ["type", "id", "time", "status", "reason", "summary", "recent"], + "required": [ + "type", + "id", + "time", + "status", + "reason", + "summary", + "recent" + ], "additionalProperties": false }, "Session.Message.Compaction.Failed": { @@ -11198,7 +12129,9 @@ "properties": { "type": { "type": "string", - "enum": ["compaction"] + "enum": [ + "compaction" + ] }, "id": { "type": "string", @@ -11216,17 +12149,29 @@ }, "status": { "type": "string", - "enum": ["failed"] + "enum": [ + "failed" + ] }, "reason": { "type": "string", - "enum": ["auto", "manual"] + "enum": [ + "auto", + "manual" + ] }, "error": { "$ref": "#/components/schemas/Session.StructuredError" } }, - "required": ["type", "id", "time", "status", "reason", "error"], + "required": [ + "type", + "id", + "time", + "status", + "reason", + "error" + ], "additionalProperties": false }, "Session.Message.Compaction": { @@ -11287,7 +12232,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["ConflictError"] + "enum": [ + "ConflictError" + ] }, "message": { "type": "string" @@ -11296,14 +12243,20 @@ "$ref": "#/components/schemas/Union_" } }, - "required": ["_tag", "message"], + "required": [ + "_tag", + "message" + ], "additionalProperties": false }, - "Union_7": { + "Union_6": { "anyOf": [ { "type": "string", - "enum": ["true", "false"] + "enum": [ + "true", + "false" + ] }, { "type": "null" @@ -11320,7 +12273,10 @@ "$ref": "#/components/schemas/Arrays_" } }, - "required": ["info", "messages"], + "required": [ + "info", + "messages" + ], "additionalProperties": false }, "SessionNotFoundErrorEncoded": { @@ -11328,7 +12284,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["SessionNotFoundError"] + "enum": [ + "SessionNotFoundError" + ] }, "sessionID": { "type": "string" @@ -11337,7 +12295,11 @@ "type": "string" } }, - "required": ["_tag", "sessionID", "message"], + "required": [ + "_tag", + "sessionID", + "message" + ], "additionalProperties": false }, "UnknownErrorEncoded": { @@ -11345,7 +12307,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["UnknownError"] + "enum": [ + "UnknownError" + ] }, "message": { "type": "string" @@ -11354,7 +12318,10 @@ "$ref": "#/components/schemas/Union_" } }, - "required": ["_tag", "message"], + "required": [ + "_tag", + "message" + ], "additionalProperties": false }, "SessionActive": { @@ -11362,10 +12329,14 @@ "properties": { "type": { "type": "string", - "enum": ["running"] + "enum": [ + "running" + ] } }, - "required": ["type"], + "required": [ + "type" + ], "additionalProperties": false }, "Session.ForkRequestBoundary": { @@ -11375,7 +12346,9 @@ "properties": { "type": { "type": "string", - "enum": ["before"] + "enum": [ + "before" + ] }, "messageID": { "type": "string", @@ -11386,7 +12359,10 @@ ] } }, - "required": ["type", "messageID"], + "required": [ + "type", + "messageID" + ], "additionalProperties": false }, { @@ -11394,10 +12370,14 @@ "properties": { "type": { "type": "string", - "enum": ["through"] + "enum": [ + "through" + ] } }, - "required": ["type"], + "required": [ + "type" + ], "additionalProperties": false } ] @@ -11407,7 +12387,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["MessageNotFoundError"] + "enum": [ + "MessageNotFoundError" + ] }, "sessionID": { "type": "string" @@ -11419,14 +12401,22 @@ "type": "string" } }, - "required": ["_tag", "sessionID", "messageID", "message"], + "required": [ + "_tag", + "sessionID", + "messageID", + "message" + ], "additionalProperties": false }, "Session.Inbox.Delivery": { "type": "string", - "enum": ["steer", "queue"] + "enum": [ + "steer", + "queue" + ] }, - "Union_8": { + "Union_7": { "anyOf": [ { "$ref": "#/components/schemas/Session.Inbox.Delivery" @@ -11436,7 +12426,7 @@ } ] }, - "Union_9": { + "Union_8": { "anyOf": [ { "type": "string", @@ -11467,7 +12457,9 @@ "$ref": "#/components/schemas/Prompt.Mention" } }, - "required": ["uri"], + "required": [ + "uri" + ], "additionalProperties": false }, "Arrays_4": { @@ -11492,7 +12484,9 @@ "$ref": "#/components/schemas/Prompt.Mention" } }, - "required": ["id"], + "required": [ + "id" + ], "additionalProperties": false }, "Arrays_6": { @@ -11504,7 +12498,7 @@ "Objects_3": { "type": "object" }, - "Union_10": { + "Union_9": { "anyOf": [ { "type": "boolean" @@ -11533,7 +12527,9 @@ "$ref": "#/components/schemas/Objects_3" } }, - "required": ["text"], + "required": [ + "text" + ], "additionalProperties": false }, "Session.Inbox.User": { @@ -11560,7 +12556,9 @@ }, "type": { "type": "string", - "enum": ["user"] + "enum": [ + "user" + ] }, "payload": { "$ref": "#/components/schemas/Session.Inbox.UserPayload" @@ -11569,7 +12567,14 @@ "$ref": "#/components/schemas/Session.Inbox.Delivery" } }, - "required": ["id", "sessionID", "timeCreated", "type", "payload", "delivery"], + "required": [ + "id", + "sessionID", + "timeCreated", + "type", + "payload", + "delivery" + ], "additionalProperties": false }, "CommandNotFoundErrorEncoded": { @@ -11577,7 +12582,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["CommandNotFoundError"] + "enum": [ + "CommandNotFoundError" + ] }, "command": { "type": "string" @@ -11586,15 +12593,21 @@ "type": "string" } }, - "required": ["_tag", "command", "message"], + "required": [ + "_tag", + "command", + "message" + ], "additionalProperties": false }, - "CommandEvaluationErrorEncoded": { + "CommandExecutionErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", - "enum": ["CommandEvaluationError"] + "enum": [ + "CommandExecutionError" + ] }, "command": { "type": "string" @@ -11603,7 +12616,11 @@ "type": "string" } }, - "required": ["_tag", "command", "message"], + "required": [ + "_tag", + "command", + "message" + ], "additionalProperties": false }, "SkillNotFoundErrorEncoded": { @@ -11611,7 +12628,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["SkillNotFoundError"] + "enum": [ + "SkillNotFoundError" + ] }, "skill": { "type": "string" @@ -11620,7 +12639,11 @@ "type": "string" } }, - "required": ["_tag", "skill", "message"], + "required": [ + "_tag", + "skill", + "message" + ], "additionalProperties": false }, "Session.Inbox.SyntheticPayload": { @@ -11636,7 +12659,9 @@ "type": "object" } }, - "required": ["text"], + "required": [ + "text" + ], "additionalProperties": false }, "Session.Inbox.Synthetic": { @@ -11663,7 +12688,9 @@ }, "type": { "type": "string", - "enum": ["synthetic"] + "enum": [ + "synthetic" + ] }, "payload": { "$ref": "#/components/schemas/Session.Inbox.SyntheticPayload" @@ -11672,7 +12699,14 @@ "$ref": "#/components/schemas/Session.Inbox.Delivery" } }, - "required": ["id", "sessionID", "timeCreated", "type", "payload", "delivery"], + "required": [ + "id", + "sessionID", + "timeCreated", + "type", + "payload", + "delivery" + ], "additionalProperties": false }, "Session.Inbox.CompactionPayload": { @@ -11709,7 +12743,9 @@ }, "type": { "type": "string", - "enum": ["compaction"] + "enum": [ + "compaction" + ] }, "payload": { "$ref": "#/components/schemas/Session.Inbox.CompactionPayload" @@ -11718,7 +12754,14 @@ "$ref": "#/components/schemas/Session.Inbox.Delivery" } }, - "required": ["id", "sessionID", "timeCreated", "type", "payload", "delivery"], + "required": [ + "id", + "sessionID", + "timeCreated", + "type", + "payload", + "delivery" + ], "additionalProperties": false }, "ServiceUnavailableErrorEncoded": { @@ -11726,7 +12769,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["ServiceUnavailableError"] + "enum": [ + "ServiceUnavailableError" + ] }, "message": { "type": "string" @@ -11735,7 +12780,10 @@ "$ref": "#/components/schemas/Union_" } }, - "required": ["_tag", "message"], + "required": [ + "_tag", + "message" + ], "additionalProperties": false }, "SessionBusyErrorEncoded": { @@ -11743,7 +12791,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["SessionBusyError"] + "enum": [ + "SessionBusyError" + ] }, "sessionID": { "type": "string" @@ -11752,7 +12802,11 @@ "type": "string" } }, - "required": ["_tag", "sessionID", "message"], + "required": [ + "_tag", + "sessionID", + "message" + ], "additionalProperties": false }, "Session.Inbox.MovePayload": { @@ -11768,7 +12822,10 @@ "type": "string" } }, - "required": ["location", "projectID"], + "required": [ + "location", + "projectID" + ], "additionalProperties": false }, "Session.Inbox.Move": { @@ -11795,7 +12852,9 @@ }, "type": { "type": "string", - "enum": ["move"] + "enum": [ + "move" + ] }, "payload": { "$ref": "#/components/schemas/Session.Inbox.MovePayload" @@ -11804,7 +12863,14 @@ "$ref": "#/components/schemas/Session.Inbox.Delivery" } }, - "required": ["id", "sessionID", "timeCreated", "type", "payload", "delivery"], + "required": [ + "id", + "sessionID", + "timeCreated", + "type", + "payload", + "delivery" + ], "additionalProperties": false }, "Session.Inbox.Info": { @@ -11842,7 +12908,10 @@ "description": "JSON value attached to the session's instructions" } }, - "required": ["key", "value"], + "required": [ + "key", + "value" + ], "additionalProperties": false }, "InstructionEntryValueTooLargeErrorEncoded": { @@ -11850,7 +12919,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["InstructionEntryValueTooLargeError"] + "enum": [ + "InstructionEntryValueTooLargeError" + ] }, "actualBytes": { "type": "integer" @@ -11862,7 +12933,12 @@ "type": "string" } }, - "required": ["_tag", "actualBytes", "maxBytes", "message"], + "required": [ + "_tag", + "actualBytes", + "maxBytes", + "message" + ], "additionalProperties": false }, "SessionGenerateResponse": { @@ -11875,11 +12951,15 @@ "type": "string" } }, - "required": ["text"], + "required": [ + "text" + ], "additionalProperties": false } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false }, "SessionLogItemEncoded": { @@ -11908,14 +12988,21 @@ "additionalProperties": false } }, - "required": ["data", "cursor"], + "required": [ + "data", + "cursor" + ], "additionalProperties": false }, "Model.ReasoningField": { "anyOf": [ { "type": "string", - "enum": ["reasoning", "reasoning_content", "reasoning_text"] + "enum": [ + "reasoning", + "reasoning_content", + "reasoning_text" + ] }, { "type": "string" @@ -11924,7 +13011,10 @@ }, "Model.MaxTokensField": { "type": "string", - "enum": ["max_completion_tokens", "max_tokens"] + "enum": [ + "max_completion_tokens", + "max_tokens" + ] }, "Model.Compatibility": { "type": "object", @@ -11972,7 +13062,11 @@ } } }, - "required": ["tools", "input", "output"], + "required": [ + "tools", + "input", + "output" + ], "additionalProperties": false }, "Model.Variant": { @@ -11991,7 +13085,9 @@ "$ref": "#/components/schemas/Objects_6" } }, - "required": ["id"], + "required": [ + "id" + ], "additionalProperties": false }, "Money.USDPerMillionTokens": { @@ -12005,13 +13101,18 @@ "properties": { "type": { "type": "string", - "enum": ["context"] + "enum": [ + "context" + ] }, "size": { "type": "integer" } }, - "required": ["type", "size"], + "required": [ + "type", + "size" + ], "additionalProperties": false }, "input": { @@ -12030,11 +13131,18 @@ "$ref": "#/components/schemas/Money.USDPerMillionTokens" } }, - "required": ["read", "write"], + "required": [ + "read", + "write" + ], "additionalProperties": false } }, - "required": ["input", "output", "cache"], + "required": [ + "input", + "output", + "cache" + ], "additionalProperties": false }, "Model.Info": { @@ -12086,7 +13194,9 @@ "type": "number" } }, - "required": ["released"], + "required": [ + "released" + ], "additionalProperties": false }, "cost": { @@ -12097,7 +13207,12 @@ }, "status": { "type": "string", - "enum": ["alpha", "beta", "deprecated", "active"] + "enum": [ + "alpha", + "beta", + "deprecated", + "active" + ] }, "enabled": { "type": "boolean" @@ -12115,7 +13230,10 @@ "type": "integer" } }, - "required": ["context", "output"], + "required": [ + "context", + "output" + ], "additionalProperties": false } }, @@ -12144,11 +13262,15 @@ "type": "string" } }, - "required": ["text"], + "required": [ + "text" + ], "additionalProperties": false } }, - "required": ["data"], + "required": [ + "data" + ], "additionalProperties": false }, "Provider.Info": { @@ -12165,7 +13287,11 @@ }, "activation": { "type": "string", - "enum": ["auto", "enabled", "disabled"] + "enum": [ + "auto", + "enabled", + "disabled" + ] }, "package": { "type": "string" @@ -12180,7 +13306,12 @@ "$ref": "#/components/schemas/Objects_6" } }, - "required": ["id", "name", "activation", "package"], + "required": [ + "id", + "name", + "activation", + "package" + ], "additionalProperties": false }, "ProviderNotFoundErrorEncoded": { @@ -12188,7 +13319,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["ProviderNotFoundError"] + "enum": [ + "ProviderNotFoundError" + ] }, "providerID": { "type": "string" @@ -12197,16 +13330,20 @@ "type": "string" } }, - "required": ["_tag", "providerID", "message"], + "required": [ + "_tag", + "providerID", + "message" + ], "additionalProperties": false }, - "Union_11": { + "Union_10": { "anyOf": [ { "type": "number" }, { - "$ref": "#/components/schemas/Union_6" + "$ref": "#/components/schemas/Union_5" } ] }, @@ -12218,7 +13355,10 @@ }, "op": { "type": "string", - "enum": ["eq", "neq"] + "enum": [ + "eq", + "neq" + ] }, "value": { "anyOf": [ @@ -12226,7 +13366,7 @@ "type": "string" }, { - "$ref": "#/components/schemas/Union_11" + "$ref": "#/components/schemas/Union_10" }, { "type": "boolean" @@ -12234,7 +13374,11 @@ ] } }, - "required": ["key", "op", "value"], + "required": [ + "key", + "op", + "value" + ], "additionalProperties": false }, "Arrays_7": { @@ -12256,7 +13400,10 @@ "type": "string" } }, - "required": ["value", "label"], + "required": [ + "value", + "label" + ], "additionalProperties": false }, "Form.StringField": { @@ -12279,11 +13426,18 @@ }, "type": { "type": "string", - "enum": ["string"] + "enum": [ + "string" + ] }, "format": { "type": "string", - "enum": ["email", "uri", "date", "date-time"] + "enum": [ + "email", + "uri", + "date", + "date-time" + ] }, "minLength": { "type": "integer", @@ -12320,7 +13474,10 @@ "type": "boolean" } }, - "required": ["key", "type"], + "required": [ + "key", + "type" + ], "additionalProperties": false }, "Form.NumberField": { @@ -12343,7 +13500,9 @@ }, "type": { "type": "string", - "enum": ["number"] + "enum": [ + "number" + ] }, "minimum": { "anyOf": [ @@ -12351,7 +13510,7 @@ "type": "number" }, { - "$ref": "#/components/schemas/Union_6" + "$ref": "#/components/schemas/Union_5" } ] }, @@ -12361,7 +13520,7 @@ "type": "number" }, { - "$ref": "#/components/schemas/Union_6" + "$ref": "#/components/schemas/Union_5" } ] }, @@ -12371,12 +13530,15 @@ "type": "number" }, { - "$ref": "#/components/schemas/Union_6" + "$ref": "#/components/schemas/Union_5" } ] } }, - "required": ["key", "type"], + "required": [ + "key", + "type" + ], "additionalProperties": false }, "Form.IntegerField": { @@ -12399,7 +13561,9 @@ }, "type": { "type": "string", - "enum": ["integer"] + "enum": [ + "integer" + ] }, "minimum": { "anyOf": [ @@ -12407,7 +13571,7 @@ "type": "number" }, { - "$ref": "#/components/schemas/Union_6" + "$ref": "#/components/schemas/Union_5" } ] }, @@ -12417,7 +13581,7 @@ "type": "number" }, { - "$ref": "#/components/schemas/Union_6" + "$ref": "#/components/schemas/Union_5" } ] }, @@ -12427,12 +13591,15 @@ "type": "number" }, { - "$ref": "#/components/schemas/Union_6" + "$ref": "#/components/schemas/Union_5" } ] } }, - "required": ["key", "type"], + "required": [ + "key", + "type" + ], "additionalProperties": false }, "Form.BooleanField": { @@ -12455,13 +13622,18 @@ }, "type": { "type": "string", - "enum": ["boolean"] + "enum": [ + "boolean" + ] }, "default": { "type": "boolean" } }, - "required": ["key", "type"], + "required": [ + "key", + "type" + ], "additionalProperties": false }, "Form.MultiselectField": { @@ -12484,7 +13656,9 @@ }, "type": { "type": "string", - "enum": ["multiselect"] + "enum": [ + "multiselect" + ] }, "options": { "type": "array", @@ -12518,7 +13692,11 @@ } } }, - "required": ["key", "type", "options"], + "required": [ + "key", + "type", + "options" + ], "additionalProperties": false }, "Form.ExternalField": { @@ -12529,7 +13707,9 @@ }, "type": { "type": "string", - "enum": ["external"] + "enum": [ + "external" + ] }, "url": { "type": "string" @@ -12541,7 +13721,11 @@ "type": "string" } }, - "required": ["key", "type", "url"], + "required": [ + "key", + "type", + "url" + ], "additionalProperties": false }, "Form.Field": { @@ -12586,7 +13770,9 @@ }, "type": { "type": "string", - "enum": ["oauth"] + "enum": [ + "oauth" + ] }, "label": { "type": "string" @@ -12595,7 +13781,11 @@ "$ref": "#/components/schemas/Form.Fields" } }, - "required": ["id", "type", "label"], + "required": [ + "id", + "type", + "label" + ], "additionalProperties": false }, "Integration.CommandMethod": { @@ -12606,7 +13796,9 @@ }, "type": { "type": "string", - "enum": ["command"] + "enum": [ + "command" + ] }, "label": { "type": "string" @@ -12618,7 +13810,12 @@ } } }, - "required": ["id", "type", "label", "command"], + "required": [ + "id", + "type", + "label", + "command" + ], "additionalProperties": false }, "Form.Fields_1": { @@ -12638,7 +13835,9 @@ "properties": { "type": { "type": "string", - "enum": ["key"] + "enum": [ + "key" + ] }, "label": { "type": "string" @@ -12647,7 +13846,9 @@ "$ref": "#/components/schemas/Form.Fields_1" } }, - "required": ["type"], + "required": [ + "type" + ], "additionalProperties": false }, "Integration.EnvMethod": { @@ -12655,7 +13856,9 @@ "properties": { "type": { "type": "string", - "enum": ["env"] + "enum": [ + "env" + ] }, "names": { "type": "array", @@ -12664,7 +13867,10 @@ } } }, - "required": ["type", "names"], + "required": [ + "type", + "names" + ], "additionalProperties": false }, "Integration.Method": { @@ -12688,7 +13894,9 @@ "properties": { "type": { "type": "string", - "enum": ["credential"] + "enum": [ + "credential" + ] }, "id": { "type": "string" @@ -12697,7 +13905,11 @@ "type": "string" } }, - "required": ["type", "id", "label"], + "required": [ + "type", + "id", + "label" + ], "additionalProperties": false }, "Connection.EnvInfo": { @@ -12705,13 +13917,18 @@ "properties": { "type": { "type": "string", - "enum": ["env"] + "enum": [ + "env" + ] }, "name": { "type": "string" } }, - "required": ["type", "name"], + "required": [ + "type", + "name" + ], "additionalProperties": false }, "Connection.Info": { @@ -12746,7 +13963,12 @@ } } }, - "required": ["id", "name", "methods", "connections"], + "required": [ + "id", + "name", + "methods", + "connections" + ], "additionalProperties": false }, "Form.Value": { @@ -12755,7 +13977,7 @@ "type": "string" }, { - "$ref": "#/components/schemas/Union_11" + "$ref": "#/components/schemas/Union_10" }, { "type": "boolean" @@ -12774,7 +13996,7 @@ "$ref": "#/components/schemas/Form.Value" } }, - "Union_12": { + "Union_11": { "anyOf": [ { "$ref": "#/components/schemas/Form.Answer" @@ -12788,13 +14010,16 @@ "type": "object", "properties": { "created": { - "$ref": "#/components/schemas/Union_11" + "$ref": "#/components/schemas/Union_10" }, "expires": { - "$ref": "#/components/schemas/Union_11" + "$ref": "#/components/schemas/Union_10" } }, - "required": ["created", "expires"], + "required": [ + "created", + "expires" + ], "additionalProperties": false }, "Integration.AttemptEncoded": { @@ -12811,13 +14036,22 @@ }, "mode": { "type": "string", - "enum": ["auto", "code"] + "enum": [ + "auto", + "code" + ] }, "time": { "$ref": "#/components/schemas/Objects_7" } }, - "required": ["attemptID", "url", "instructions", "mode", "time"], + "required": [ + "attemptID", + "url", + "instructions", + "mode", + "time" + ], "additionalProperties": false }, "Integration.AttemptStatus": { @@ -12827,13 +14061,18 @@ "properties": { "status": { "type": "string", - "enum": ["pending"] + "enum": [ + "pending" + ] }, "time": { "$ref": "#/components/schemas/Objects_7" } }, - "required": ["status", "time"], + "required": [ + "status", + "time" + ], "additionalProperties": false }, { @@ -12841,13 +14080,18 @@ "properties": { "status": { "type": "string", - "enum": ["complete"] + "enum": [ + "complete" + ] }, "time": { "$ref": "#/components/schemas/Objects_7" } }, - "required": ["status", "time"], + "required": [ + "status", + "time" + ], "additionalProperties": false }, { @@ -12855,7 +14099,9 @@ "properties": { "status": { "type": "string", - "enum": ["failed"] + "enum": [ + "failed" + ] }, "message": { "type": "string" @@ -12864,7 +14110,11 @@ "$ref": "#/components/schemas/Objects_7" } }, - "required": ["status", "message", "time"], + "required": [ + "status", + "message", + "time" + ], "additionalProperties": false }, { @@ -12872,13 +14122,18 @@ "properties": { "status": { "type": "string", - "enum": ["expired"] + "enum": [ + "expired" + ] }, "time": { "$ref": "#/components/schemas/Objects_7" } }, - "required": ["status", "time"], + "required": [ + "status", + "time" + ], "additionalProperties": false } ] @@ -12893,7 +14148,10 @@ "$ref": "#/components/schemas/Objects_7" } }, - "required": ["attemptID", "time"], + "required": [ + "attemptID", + "time" + ], "additionalProperties": false }, "Integration.CommandAttemptStatus": { @@ -12903,7 +14161,9 @@ "properties": { "status": { "type": "string", - "enum": ["pending"] + "enum": [ + "pending" + ] }, "message": { "type": "string" @@ -12912,7 +14172,10 @@ "$ref": "#/components/schemas/Objects_7" } }, - "required": ["status", "time"], + "required": [ + "status", + "time" + ], "additionalProperties": false }, { @@ -12920,13 +14183,18 @@ "properties": { "status": { "type": "string", - "enum": ["complete"] + "enum": [ + "complete" + ] }, "time": { "$ref": "#/components/schemas/Objects_7" } }, - "required": ["status", "time"], + "required": [ + "status", + "time" + ], "additionalProperties": false }, { @@ -12934,7 +14202,9 @@ "properties": { "status": { "type": "string", - "enum": ["failed"] + "enum": [ + "failed" + ] }, "message": { "type": "string" @@ -12943,7 +14213,11 @@ "$ref": "#/components/schemas/Objects_7" } }, - "required": ["status", "message", "time"], + "required": [ + "status", + "message", + "time" + ], "additionalProperties": false }, { @@ -12951,13 +14225,18 @@ "properties": { "status": { "type": "string", - "enum": ["expired"] + "enum": [ + "expired" + ] }, "time": { "$ref": "#/components/schemas/Objects_7" } }, - "required": ["status", "time"], + "required": [ + "status", + "time" + ], "additionalProperties": false } ] @@ -12967,10 +14246,14 @@ "properties": { "status": { "type": "string", - "enum": ["connected"] + "enum": [ + "connected" + ] } }, - "required": ["status"], + "required": [ + "status" + ], "additionalProperties": false }, "Mcp.Status.Pending": { @@ -12978,10 +14261,14 @@ "properties": { "status": { "type": "string", - "enum": ["pending"] + "enum": [ + "pending" + ] } }, - "required": ["status"], + "required": [ + "status" + ], "additionalProperties": false }, "Mcp.Status.Disabled": { @@ -12989,10 +14276,14 @@ "properties": { "status": { "type": "string", - "enum": ["disabled"] + "enum": [ + "disabled" + ] } }, - "required": ["status"], + "required": [ + "status" + ], "additionalProperties": false }, "Mcp.Status.Failed": { @@ -13000,13 +14291,18 @@ "properties": { "status": { "type": "string", - "enum": ["failed"] + "enum": [ + "failed" + ] }, "error": { "type": "string" } }, - "required": ["status", "error"], + "required": [ + "status", + "error" + ], "additionalProperties": false }, "Mcp.Status.NeedsAuth": { @@ -13014,10 +14310,14 @@ "properties": { "status": { "type": "string", - "enum": ["needs_auth"] + "enum": [ + "needs_auth" + ] } }, - "required": ["status"], + "required": [ + "status" + ], "additionalProperties": false }, "Mcp.Server": { @@ -13049,7 +14349,10 @@ "type": "string" } }, - "required": ["name", "status"], + "required": [ + "name", + "status" + ], "additionalProperties": false }, "Objects_8": { @@ -13087,7 +14390,9 @@ "properties": { "type": { "type": "string", - "enum": ["local"] + "enum": [ + "local" + ] }, "command": { "type": "array", @@ -13114,7 +14419,10 @@ "$ref": "#/components/schemas/Objects_8" } }, - "required": ["type", "command"], + "required": [ + "type", + "command" + ], "additionalProperties": false }, "Mcp.OAuthConfigEncoded": { @@ -13149,7 +14457,9 @@ "properties": { "type": { "type": "string", - "enum": ["remote"] + "enum": [ + "remote" + ] }, "url": { "type": "string" @@ -13167,7 +14477,9 @@ }, { "type": "boolean", - "enum": [false] + "enum": [ + false + ] } ] }, @@ -13181,7 +14493,10 @@ "$ref": "#/components/schemas/Objects_8" } }, - "required": ["type", "url"], + "required": [ + "type", + "url" + ], "additionalProperties": false }, "McpServerNotFoundErrorEncoded": { @@ -13189,7 +14504,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["McpServerNotFoundError"] + "enum": [ + "McpServerNotFoundError" + ] }, "server": { "type": "string" @@ -13198,7 +14515,11 @@ "type": "string" } }, - "required": ["_tag", "server", "message"], + "required": [ + "_tag", + "server", + "message" + ], "additionalProperties": false }, "Mcp.Resource": { @@ -13220,7 +14541,11 @@ "type": "string" } }, - "required": ["server", "name", "uri"], + "required": [ + "server", + "name", + "uri" + ], "additionalProperties": false }, "Mcp.ResourceTemplate": { @@ -13242,7 +14567,11 @@ "type": "string" } }, - "required": ["server", "name", "uriTemplate"], + "required": [ + "server", + "name", + "uriTemplate" + ], "additionalProperties": false }, "Mcp.ResourceCatalog": { @@ -13261,12 +14590,18 @@ } } }, - "required": ["resources", "templates"], + "required": [ + "resources", + "templates" + ], "additionalProperties": false }, "Project.Vcs": { "type": "string", - "enum": ["git", "hg"] + "enum": [ + "git", + "hg" + ] }, "Project.Icon": { "type": "object", @@ -13321,7 +14656,10 @@ ] } }, - "required": ["created", "updated"], + "required": [ + "created", + "updated" + ], "additionalProperties": false }, "Project": { @@ -13355,7 +14693,12 @@ } } }, - "required": ["id", "canonical", "time", "sandboxes"], + "required": [ + "id", + "canonical", + "time", + "sandboxes" + ], "additionalProperties": false }, "Project.Current": { @@ -13371,7 +14714,11 @@ "type": "string" } }, - "required": ["id", "directory", "canonical"], + "required": [ + "id", + "directory", + "canonical" + ], "additionalProperties": false }, "Form.Metadata": { @@ -13413,7 +14760,12 @@ "$ref": "#/components/schemas/Form.Fields_2" } }, - "required": ["id", "sessionID", "title", "fields"], + "required": [ + "id", + "sessionID", + "title", + "fields" + ], "additionalProperties": false }, "Form.CreatePayload": { @@ -13444,7 +14796,10 @@ "$ref": "#/components/schemas/Form.Fields_2" } }, - "required": ["title", "fields"], + "required": [ + "title", + "fields" + ], "additionalProperties": false }, "FormNotFoundErrorEncoded": { @@ -13452,7 +14807,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["FormNotFoundError"] + "enum": [ + "FormNotFoundError" + ] }, "id": { "type": "string" @@ -13461,7 +14818,11 @@ "type": "string" } }, - "required": ["_tag", "id", "message"], + "required": [ + "_tag", + "id", + "message" + ], "additionalProperties": false }, "Form.State": { @@ -13471,10 +14832,14 @@ "properties": { "status": { "type": "string", - "enum": ["pending"] + "enum": [ + "pending" + ] } }, - "required": ["status"], + "required": [ + "status" + ], "additionalProperties": false }, { @@ -13482,13 +14847,18 @@ "properties": { "status": { "type": "string", - "enum": ["answered"] + "enum": [ + "answered" + ] }, "answer": { "$ref": "#/components/schemas/Form.Answer" } }, - "required": ["status", "answer"], + "required": [ + "status", + "answer" + ], "additionalProperties": false }, { @@ -13496,10 +14866,14 @@ "properties": { "status": { "type": "string", - "enum": ["cancelled"] + "enum": [ + "cancelled" + ] } }, - "required": ["status"], + "required": [ + "status" + ], "additionalProperties": false } ] @@ -13511,7 +14885,9 @@ "$ref": "#/components/schemas/Form.Answer" } }, - "required": ["answer"], + "required": [ + "answer" + ], "additionalProperties": false }, "FormAlreadySettledErrorEncoded": { @@ -13519,7 +14895,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["FormAlreadySettledError"] + "enum": [ + "FormAlreadySettledError" + ] }, "id": { "type": "string" @@ -13528,7 +14906,11 @@ "type": "string" } }, - "required": ["_tag", "id", "message"], + "required": [ + "_tag", + "id", + "message" + ], "additionalProperties": false }, "FormInvalidAnswerErrorEncoded": { @@ -13536,7 +14918,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["FormInvalidAnswerError"] + "enum": [ + "FormInvalidAnswerError" + ] }, "id": { "type": "string" @@ -13545,7 +14929,11 @@ "type": "string" } }, - "required": ["_tag", "id", "message"], + "required": [ + "_tag", + "id", + "message" + ], "additionalProperties": false }, "Arrays_8": { @@ -13570,7 +14958,9 @@ "properties": { "type": { "type": "string", - "enum": ["tool"] + "enum": [ + "tool" + ] }, "messageID": { "type": "string" @@ -13579,7 +14969,11 @@ "type": "string" } }, - "required": ["type", "messageID", "id"], + "required": [ + "type", + "messageID", + "id" + ], "additionalProperties": false } ] @@ -13619,7 +15013,12 @@ "$ref": "#/components/schemas/Permission.Source" } }, - "required": ["id", "sessionID", "action", "resources"], + "required": [ + "id", + "sessionID", + "action", + "resources" + ], "additionalProperties": false }, "PermissionSaved.Info": { @@ -13638,7 +15037,12 @@ "type": "string" } }, - "required": ["id", "projectID", "action", "resource"], + "required": [ + "id", + "projectID", + "action", + "resource" + ], "additionalProperties": false }, "PermissionNotFoundErrorEncoded": { @@ -13646,7 +15050,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["PermissionNotFoundError"] + "enum": [ + "PermissionNotFoundError" + ] }, "requestID": { "type": "string" @@ -13655,12 +15061,20 @@ "type": "string" } }, - "required": ["_tag", "requestID", "message"], + "required": [ + "_tag", + "requestID", + "message" + ], "additionalProperties": false }, "Permission.Reply": { "type": "string", - "enum": ["once", "always", "reject"] + "enum": [ + "once", + "always", + "reject" + ] }, "FileSystem.Entry": { "type": "object", @@ -13670,10 +15084,16 @@ }, "type": { "type": "string", - "enum": ["file", "directory"] + "enum": [ + "file", + "directory" + ] } }, - "required": ["path", "type"], + "required": [ + "path", + "type" + ], "additionalProperties": false }, "Command.Info": { @@ -13682,23 +15102,13 @@ "name": { "type": "string" }, - "template": { - "type": "string" - }, "description": { "type": "string" - }, - "agent": { - "type": "string" - }, - "model": { - "$ref": "#/components/schemas/Model.Ref" - }, - "subtask": { - "type": "boolean" } }, - "required": ["name", "template"], + "required": [ + "name" + ], "additionalProperties": false }, "Skill.Info": { @@ -13726,7 +15136,12 @@ "type": "string" } }, - "required": ["id", "name", "location", "content"], + "required": [ + "id", + "name", + "location", + "content" + ], "additionalProperties": false }, "V2EventEncoded": { @@ -13761,7 +15176,10 @@ }, "status": { "type": "string", - "enum": ["running", "exited"] + "enum": [ + "running", + "exited" + ] }, "pid": { "type": "integer", @@ -13780,7 +15198,15 @@ ] } }, - "required": ["id", "title", "command", "args", "cwd", "status", "pid"], + "required": [ + "id", + "title", + "command", + "args", + "cwd", + "status", + "pid" + ], "additionalProperties": false }, "PtyNotFoundErrorEncoded": { @@ -13788,7 +15214,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["PtyNotFoundError"] + "enum": [ + "PtyNotFoundError" + ] }, "ptyID": { "type": "string" @@ -13797,7 +15225,11 @@ "type": "string" } }, - "required": ["_tag", "ptyID", "message"], + "required": [ + "_tag", + "ptyID", + "message" + ], "additionalProperties": false }, "PtyTicket.ConnectToken": { @@ -13815,7 +15247,10 @@ ] } }, - "required": ["ticket", "expires_in"], + "required": [ + "ticket", + "expires_in" + ], "additionalProperties": false }, "ForbiddenErrorEncoded": { @@ -13823,13 +15258,18 @@ "properties": { "_tag": { "type": "string", - "enum": ["ForbiddenError"] + "enum": [ + "ForbiddenError" + ] }, "message": { "type": "string" } }, - "required": ["_tag", "message"], + "required": [ + "_tag", + "message" + ], "additionalProperties": false }, "Shell.Info": { @@ -13844,7 +15284,7 @@ ] }, "status": { - "$ref": "#/components/schemas/Union_5" + "$ref": "#/components/schemas/Union_4" }, "command": { "type": "string" @@ -13882,11 +15322,22 @@ "type": "number" } }, - "required": ["started"], + "required": [ + "started" + ], "additionalProperties": false } }, - "required": ["id", "status", "command", "cwd", "shell", "file", "metadata", "time"], + "required": [ + "id", + "status", + "command", + "cwd", + "shell", + "file", + "metadata", + "time" + ], "additionalProperties": false }, "ShellNotFoundErrorEncoded": { @@ -13894,7 +15345,9 @@ "properties": { "_tag": { "type": "string", - "enum": ["ShellNotFoundError"] + "enum": [ + "ShellNotFoundError" + ] }, "id": { "type": "string" @@ -13903,7 +15356,11 @@ "type": "string" } }, - "required": ["_tag", "id", "message"], + "required": [ + "_tag", + "id", + "message" + ], "additionalProperties": false }, "Reference.LocalSource": { @@ -13911,7 +15368,9 @@ "properties": { "type": { "type": "string", - "enum": ["local"] + "enum": [ + "local" + ] }, "path": { "type": "string" @@ -13923,7 +15382,10 @@ "type": "boolean" } }, - "required": ["type", "path"], + "required": [ + "type", + "path" + ], "additionalProperties": false }, "Reference.GitSource": { @@ -13931,7 +15393,9 @@ "properties": { "type": { "type": "string", - "enum": ["git"] + "enum": [ + "git" + ] }, "repository": { "type": "string" @@ -13946,7 +15410,10 @@ "type": "boolean" } }, - "required": ["type", "repository"], + "required": [ + "type", + "repository" + ], "additionalProperties": false }, "Reference.Source": { @@ -13978,7 +15445,11 @@ "$ref": "#/components/schemas/Reference.Source" } }, - "required": ["name", "path", "source"], + "required": [ + "name", + "path", + "source" + ], "additionalProperties": false }, "Worktree.Directory": { @@ -13991,7 +15462,9 @@ "type": "string" } }, - "required": ["directory"], + "required": [ + "directory" + ], "additionalProperties": false }, "Worktree.List": { @@ -14007,7 +15480,9 @@ "type": "string" } }, - "required": ["directory"], + "required": [ + "directory" + ], "additionalProperties": false }, "WorktreeErrorEncoded": { @@ -14015,7 +15490,9 @@ "properties": { "name": { "type": "string", - "enum": ["WorktreeError"] + "enum": [ + "WorktreeError" + ] }, "data": { "type": "object", @@ -14024,14 +15501,19 @@ "type": "string" }, "forceRequired": { - "$ref": "#/components/schemas/Union_10" + "$ref": "#/components/schemas/Union_9" } }, - "required": ["message"], + "required": [ + "message" + ], "additionalProperties": false } }, - "required": ["name", "data"], + "required": [ + "name", + "data" + ], "additionalProperties": false }, "Vcs.Branch": { @@ -14053,7 +15535,9 @@ "$ref": "#/components/schemas/Vcs.Branch" } }, - "required": ["branch"], + "required": [ + "branch" + ], "additionalProperties": false }, "Vcs.FileStatus": { @@ -14080,15 +15564,27 @@ }, "status": { "type": "string", - "enum": ["added", "deleted", "modified"] + "enum": [ + "added", + "deleted", + "modified" + ] } }, - "required": ["file", "additions", "deletions", "status"], + "required": [ + "file", + "additions", + "deletions", + "status" + ], "additionalProperties": false }, "Vcs.Mode": { "type": "string", - "enum": ["working", "branch"] + "enum": [ + "working", + "branch" + ] }, "WebSearch.Provider": { "type": "object", @@ -14100,7 +15596,10 @@ "type": "string" } }, - "required": ["id", "name"], + "required": [ + "id", + "name" + ], "additionalProperties": false }, "WebSearch.Result": { @@ -14125,7 +15624,10 @@ "additionalProperties": false } }, - "required": ["url", "time"], + "required": [ + "url", + "time" + ], "additionalProperties": false }, "WebSearch.ResponseEncoded": { @@ -14141,10 +15643,13 @@ } } }, - "required": ["providerID", "results"], + "required": [ + "providerID", + "results" + ], "additionalProperties": false }, - "Union_13": { + "Union_12": { "anyOf": [ { "type": "string", @@ -14182,7 +15687,10 @@ ] } }, - "required": ["providerID", "model"], + "required": [ + "providerID", + "model" + ], "additionalProperties": false } ] @@ -14200,7 +15708,7 @@ "type": "object", "properties": { "model": { - "$ref": "#/components/schemas/Union_13" + "$ref": "#/components/schemas/Union_12" }, "request": { "type": "object", @@ -14222,7 +15730,11 @@ }, "mode": { "type": "string", - "enum": ["subagent", "primary", "all"] + "enum": [ + "subagent", + "primary", + "all" + ] }, "hidden": { "type": "boolean" @@ -14307,7 +15819,9 @@ "type": "object" } }, - "required": ["command"], + "required": [ + "command" + ], "additionalProperties": false }, "Config.CommandEncoded": { @@ -14323,13 +15837,15 @@ "type": "string" }, "model": { - "$ref": "#/components/schemas/Union_13" + "$ref": "#/components/schemas/Union_12" }, "subtask": { "type": "boolean" } }, - "required": ["template"], + "required": [ + "template" + ], "additionalProperties": false }, "Config.Reference.GitEncoded": { @@ -14348,7 +15864,9 @@ "type": "boolean" } }, - "required": ["repository"], + "required": [ + "repository" + ], "additionalProperties": false }, "Config.Reference.LocalEncoded": { @@ -14364,7 +15882,9 @@ "type": "boolean" } }, - "required": ["path"], + "required": [ + "path" + ], "additionalProperties": false }, "ConfigWebSearch.InfoEncoded": { @@ -14374,7 +15894,9 @@ "anyOf": [ { "type": "string", - "enum": ["random"] + "enum": [ + "random" + ] }, { "type": "string" @@ -14382,7 +15904,9 @@ ] } }, - "required": ["provider"], + "required": [ + "provider" + ], "additionalProperties": false }, "Config.Plugin.EntryEncoded": { @@ -14395,7 +15919,9 @@ "type": "object" } }, - "required": ["package"], + "required": [ + "package" + ], "additionalProperties": false }, "Config.WarmingEncoded": { @@ -14421,13 +15947,18 @@ "properties": { "type": { "type": "string", - "enum": ["context"] + "enum": [ + "context" + ] }, "size": { "type": "integer" } }, - "required": ["type", "size"], + "required": [ + "type", + "size" + ], "additionalProperties": false }, "input": { @@ -14449,7 +15980,10 @@ "additionalProperties": false } }, - "required": ["input", "output"], + "required": [ + "input", + "output" + ], "additionalProperties": false }, "Config.ModelEncoded": { @@ -14500,7 +16034,9 @@ "$ref": "#/components/schemas/Objects_11" } }, - "required": ["id"], + "required": [ + "id" + ], "additionalProperties": false } }, @@ -14581,7 +16117,7 @@ "type": "string" }, "model": { - "$ref": "#/components/schemas/Union_13" + "$ref": "#/components/schemas/Union_12" }, "default_agent": { "type": "string" @@ -14593,13 +16129,19 @@ }, { "type": "string", - "enum": ["notify"] + "enum": [ + "notify" + ] } ] }, "share": { "type": "string", - "enum": ["manual", "auto", "disabled"] + "enum": [ + "manual", + "auto", + "disabled" + ] }, "enterprise": { "type": "object", @@ -14664,10 +16206,14 @@ "properties": { "disabled": { "type": "boolean", - "enum": [true] + "enum": [ + true + ] } }, - "required": ["disabled"], + "required": [ + "disabled" + ], "additionalProperties": false }, { @@ -14830,7 +16376,9 @@ "anyOf": [ { "type": "boolean", - "enum": [false] + "enum": [ + false + ] }, { "$ref": "#/components/schemas/ConfigWebSearch.InfoEncoded" @@ -14887,17 +16435,26 @@ "properties": { "action": { "type": "string", - "enum": ["provider.use"] + "enum": [ + "provider.use" + ] }, "resource": { "type": "string" }, "effect": { "type": "string", - "enum": ["allow", "deny"] + "enum": [ + "allow", + "deny" + ] } }, - "required": ["action", "resource", "effect"], + "required": [ + "action", + "resource", + "effect" + ], "additionalProperties": false } } @@ -14912,7 +16469,9 @@ "properties": { "type": { "type": "string", - "enum": ["document"] + "enum": [ + "document" + ] }, "path": { "type": "string" @@ -14921,7 +16480,10 @@ "$ref": "#/components/schemas/Config.InfoEncoded" } }, - "required": ["type", "info"], + "required": [ + "type", + "info" + ], "additionalProperties": false }, "Config.DirectoryEncoded": { @@ -14929,13 +16491,18 @@ "properties": { "type": { "type": "string", - "enum": ["directory"] + "enum": [ + "directory" + ] }, "path": { "type": "string" } }, - "required": ["type", "path"], + "required": [ + "type", + "path" + ], "additionalProperties": false }, "Config.AgentsDirectoryEncoded": { @@ -14943,13 +16510,18 @@ "properties": { "type": { "type": "string", - "enum": ["agents"] + "enum": [ + "agents" + ] }, "path": { "type": "string" } }, - "required": ["type", "path"], + "required": [ + "type", + "path" + ], "additionalProperties": false }, "Config.ClaudeDirectoryEncoded": { @@ -14957,13 +16529,18 @@ "properties": { "type": { "type": "string", - "enum": ["claude"] + "enum": [ + "claude" + ] }, "path": { "type": "string" } }, - "required": ["type", "path"], + "required": [ + "type", + "path" + ], "additionalProperties": false }, "Config.Entry": { diff --git a/packages/schema/src/mcp-event.ts b/packages/schema/src/mcp-event.ts index 5b95d5d6d01..5e53ce0c78b 100644 --- a/packages/schema/src/mcp-event.ts +++ b/packages/schema/src/mcp-event.ts @@ -17,13 +17,6 @@ export const ResourcesChanged = Event.ephemeral({ }, }) -export const PromptsChanged = Event.ephemeral({ - type: "mcp.prompts.changed", - schema: { - server: Schema.String, - }, -}) - // Emitted whenever a server's connection status settles (connected, failed, needs_auth, closed) so // observers can refresh status without polling. export const StatusChanged = Event.ephemeral({ @@ -33,4 +26,4 @@ export const StatusChanged = Event.ephemeral({ }, }) -export const Definitions = Event.inventory(ToolsChanged, ResourcesChanged, PromptsChanged, StatusChanged) +export const Definitions = Event.inventory(ToolsChanged, ResourcesChanged, StatusChanged) diff --git a/packages/schema/test/event-manifest.test.ts b/packages/schema/test/event-manifest.test.ts index 0b3a5d42708..d61334c5518 100644 --- a/packages/schema/test/event-manifest.test.ts +++ b/packages/schema/test/event-manifest.test.ts @@ -66,12 +66,7 @@ describe("public event manifest", () => { expect(Form.Event.Definitions).toEqual([Form.Event.Created, Form.Event.Replied, Form.Event.Cancelled]) expect(Reference.Event.Definitions).toEqual([Reference.Event.Updated]) expect(Plugin.Event.Definitions).toEqual([Plugin.Event.Added, Plugin.Event.Updated]) - expect(McpEvent.Definitions).toEqual([ - McpEvent.ToolsChanged, - McpEvent.ResourcesChanged, - McpEvent.PromptsChanged, - McpEvent.StatusChanged, - ]) + expect(McpEvent.Definitions).toEqual([McpEvent.ToolsChanged, McpEvent.ResourcesChanged, McpEvent.StatusChanged]) expect(EventManifest.Latest.has("mcp.browser.open.failed")).toBe(false) expect(EventManifest.Latest.has("ide.installed")).toBe(false) expect(IdeEvent.Definitions).toEqual([IdeEvent.Installed]) diff --git a/packages/tui/src/component/prompt/index.tsx b/packages/tui/src/component/prompt/index.tsx index e707ccae210..ddbb7f26f0f 100644 --- a/packages/tui/src/component/prompt/index.tsx +++ b/packages/tui/src/component/prompt/index.tsx @@ -1230,23 +1230,8 @@ export function Prompt(props: PromptProps) { }) setStore("mode", "normal") } else if (slashHead && isCommand) { - move.startSubmit() - const model = { providerID: selection.providerID, id: selection.modelID, variant } - const cancelCommit = local.model.trackSessionCommit(sessionID, model) - - void (async () => { - if (!session) { - await data.session.sync(sessionID) - session = data.session.get(sessionID) - } - if (session?.agent !== agent.id) await client.api.session.switchAgent({ sessionID, agent: agent.id }) - if ( - session?.model?.providerID !== model.providerID || - session.model.id !== model.id || - session.model.variant !== model.variant - ) - await client.api.session.switchModel({ sessionID, model }) - await client.api.session.command({ + void client.api.session + .command({ sessionID, command: slashHead.name, text: slashHead.arguments, @@ -1255,10 +1240,9 @@ export function Prompt(props: PromptProps) { skills: store.prompt.skills?.length ? store.prompt.skills : undefined, delivery, }) - })().catch((error) => { - cancelCommit() - toast.show({ title: "Failed to run command", message: errorMessage(error), variant: "error" }) - }) + .catch((error) => { + toast.show({ title: "Failed to run command", message: errorMessage(error), variant: "error" }) + }) } else if (isSkill) { move.startSubmit() void client.api.session.skill({ diff --git a/packages/tui/src/mini/stream-v2.transport.ts b/packages/tui/src/mini/stream-v2.transport.ts index 38fdee36bc3..ed101cbe23a 100644 --- a/packages/tui/src/mini/stream-v2.transport.ts +++ b/packages/tui/src/mini/stream-v2.transport.ts @@ -1647,12 +1647,6 @@ export async function createSessionTransport(input: StreamInput): Promise admitPrompt(next, client, next.prompt.delivery ?? "steer"), - admitted, - ) + await admitPrompt(next, client, next.prompt.delivery ?? "steer") + admitted?.() return } diff --git a/packages/tui/test/mini/stream-v2.transport.test.ts b/packages/tui/test/mini/stream-v2.transport.test.ts index 0bb886585e1..e65a8ca459d 100644 --- a/packages/tui/test/mini/stream-v2.transport.test.ts +++ b/packages/tui/test/mini/stream-v2.transport.test.ts @@ -2858,14 +2858,8 @@ describe("V2 mini transport", () => { skills: [{ id: "api-design", mention: { start: 13, end: 24, text: "/api-design" } }], delivery: "steer", }) - expect(client.session.switchAgent).toHaveBeenCalledWith( - { sessionID: "ses_1", agent: "build" }, - expect.anything(), - ) - expect(client.session.switchModel).toHaveBeenCalledWith( - { sessionID: "ses_1", model: { providerID: "test", id: "model", variant: undefined } }, - expect.anything(), - ) + expect(client.session.switchAgent).not.toHaveBeenCalled() + expect(client.session.switchModel).not.toHaveBeenCalled() await transport.close() })