diff --git a/packages/cli/src/commands/commands.ts b/packages/cli/src/commands/commands.ts index 384dab43316..437d1854979 100644 --- a/packages/cli/src/commands/commands.ts +++ b/packages/cli/src/commands/commands.ts @@ -1,4 +1,5 @@ import { Argument, Flag } from "effect/unstable/cli" +import { Schema } from "effect" import { Spec } from "../framework/spec" declare const OPENCODE_CLI_NAME: string | undefined @@ -187,6 +188,37 @@ const Root = Spec.make(typeof OPENCODE_CLI_NAME === "string" ? OPENCODE_CLI_NAME description: "List all available models", params: ServerParams, }), + Spec.make("stats", { + description: "Show shareable usage statistics", + params: { + ...ServerParams, + days: Flag.integer("days").pipe( + Flag.withSchema(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0))), + Flag.withDescription("Show the last N days; 0 means today"), + Flag.optional, + ), + year: Flag.integer("year").pipe( + Flag.withSchema(Schema.Int.check(Schema.isBetween({ minimum: 1970, maximum: 9_999 }))), + Flag.withDescription("Show a calendar year"), + Flag.optional, + ), + all: Flag.boolean("all").pipe(Flag.withDescription("Show lifetime statistics"), Flag.withDefault(false)), + project: Flag.string("project").pipe( + Flag.withDescription('Filter by project ID, or use "." for the current project'), + Flag.optional, + ), + models: Flag.boolean("models").pipe(Flag.withDescription("Show model usage"), Flag.withDefault(false)), + tools: Flag.boolean("tools").pipe(Flag.withDescription("Show tool reliability"), Flag.withDefault(false)), + cost: Flag.boolean("cost").pipe(Flag.withDescription("Show cost and token details"), Flag.withDefault(false)), + full: Flag.boolean("full").pipe(Flag.withDescription("Show every detailed section"), Flag.withDefault(false)), + limit: Flag.integer("limit").pipe( + Flag.withSchema(Schema.Int.check(Schema.isGreaterThanOrEqualTo(1))), + Flag.withDescription("Number of rows in detailed sections"), + Flag.withDefault(5), + ), + json: Flag.boolean("json").pipe(Flag.withDescription("Output statistics as JSON"), Flag.withDefault(false)), + }, + }), Spec.make("export", { description: "Export session data as JSON", params: { diff --git a/packages/cli/src/commands/handlers/stats.ts b/packages/cli/src/commands/handlers/stats.ts new file mode 100644 index 00000000000..395cb5cd985 --- /dev/null +++ b/packages/cli/src/commands/handlers/stats.ts @@ -0,0 +1,402 @@ +import { OpenCode, type SessionStatsInfo } from "@opencode-ai/client" +import { Service } from "@opencode-ai/client/effect/service" +import { Effect, Option } from "effect" +import { EOL } from "node:os" +import { Commands } from "../commands" +import { Runtime } from "../../framework/runtime" +import { ServerConnection } from "../../services/server-connection" +import { errorMessage } from "../../util/error" + +const handler = Effect.fn("cli.stats")(function* (input: Runtime.Input) { + const days = Option.getOrUndefined(input.days) + const year = Option.getOrUndefined(input.year) + const project = Option.getOrUndefined(input.project) + if ([days !== undefined, year !== undefined, input.all].filter(Boolean).length > 1) + yield* Effect.fail(new Error("--days, --year, and --all cannot be combined")) + + const server = yield* ServerConnection.resolve({ + server: Option.getOrUndefined(input.server), + standalone: input.standalone, + }) + const client = OpenCode.make({ baseUrl: server.endpoint.url, headers: Service.headers(server.endpoint) }) + const range = statsRange({ days, year, all: input.all }) + const projectID = + project === "." + ? yield* request(server.endpoint.url, (signal) => + client.location + .get({ location: { directory: process.cwd() } }, { signal }) + .then((location) => location.project.id), + ) + : project + const details = input.models || input.tools || input.cost || input.full + const stats = yield* request(server.endpoint.url, (signal) => + client.session.stats( + { + from: range.from, + to: range.to, + project: projectID, + timezone: Intl.DateTimeFormat().resolvedOptions().timeZone || "UTC", + models: input.json || input.models || input.full, + tools: input.json || input.tools || input.full, + toolSummary: input.json || input.tools || input.full || !details, + }, + { signal }, + ), + ) + const output = input.json + ? JSON.stringify(stats, null, 2) + : renderStats(stats, { + label: range.label, + scope: project === undefined ? "all projects" : project === "." ? "current project" : "selected project", + models: input.models || input.full, + tools: input.tools || input.full, + cost: input.cost || input.full, + limit: input.limit, + color: process.stdout.isTTY && process.env.NO_COLOR === undefined, + width: process.stdout.columns ?? 80, + }) + process.stdout.write(output + EOL) +}) + +export default Runtime.handler(Commands.commands.stats, (input) => + handler(input).pipe( + Effect.catch((error) => + Effect.sync(() => { + process.stderr.write(errorMessage(error) + EOL) + process.exitCode = 1 + }), + ), + ), +) + +function request(url: string, run: (signal: AbortSignal) => Promise) { + return Effect.tryPromise({ + try: () => run(AbortSignal.timeout(30_000)), + catch: (cause) => new Error(`Could not reach server at ${url}`, { cause }), + }) +} + +type RenderOptions = { + label: string + scope: string + models: boolean + tools: boolean + cost: boolean + limit: number + color: boolean + width: number +} + +const colors = terminalPalette() + +export function renderStats(stats: SessionStatsInfo, options: RenderOptions) { + const totalTokens = tokenTotal(stats.tokens) + const terminalTools = stats.tools.succeeded + stats.tools.failed + const toolRate = terminalTools === 0 ? undefined : (stats.tools.succeeded / terminalTools) * 100 + const primary = `1;${colors.primary}` + const sessionLine = [ + metricCount(stats.sessions, "session", options.color), + stats.subagents > 0 ? metricCount(stats.subagents, "subagent", options.color) : undefined, + ] + .filter((value) => value !== undefined) + .join(" · ") + const toolSummary = + toolRate === undefined ? "no tool calls" : `${style(formatPercent(toolRate), primary, options.color)} tool success` + const details = options.models || options.tools || options.cost + const empty = stats.sessions === 0 && stats.prompts === 0 && stats.steps === 0 + const heading = `${style("opencode stats", primary, options.color)} ${style(`· ${options.label} · ${options.scope}`, "2", options.color)}` + const lines = details + ? [style(`${options.label} · ${options.scope}`, "2", options.color)] + : empty + ? [ + heading, + "", + style("no activity in this range", "2", options.color), + "", + style("opencode.ai", "2", options.color), + ] + : [ + heading, + "", + ...renderActivity(stats.activity, stats.range.from, stats.range.to, options.color, options.width), + "", + sessionLine, + `${metricCount(stats.prompts, "prompt", options.color)} · ${metricCount(stats.steps, "step", options.color)} · ${metricCount(totalTokens, "token", options.color)}`, + `${toolSummary} · ${metricCount(stats.activeDays, "active day", options.color)} · best streak ${style(stats.streak.toString(), primary, options.color)} day${stats.streak === 1 ? "" : "s"}`, + "", + style("opencode.ai", "2", options.color), + ] + + if (options.cost) lines.push(...(lines.length > 0 ? [""] : []), ...renderCost(stats)) + if (options.models) + lines.push(...(lines.length > 0 ? [""] : []), ...renderModels(stats, options.limit, options.width)) + if (options.tools) lines.push(...(lines.length > 0 ? [""] : []), ...renderTools(stats, options.limit, options.width)) + return lines.join(EOL) +} + +function statsRange(input: { days?: number; year?: number; all: boolean }) { + const now = new Date() + const to = now.getTime() + 1 + if (input.all) return { from: undefined, to, label: "all time" } + if (input.days !== undefined) { + const from = new Date(now.getFullYear(), now.getMonth(), now.getDate()) + from.setDate(from.getDate() - Math.max(0, input.days - 1)) + return { + from: from.getTime(), + to, + label: input.days === 0 || input.days === 1 ? "today" : `last ${input.days} days`, + } + } + const year = input.year ?? now.getFullYear() + return { + from: new Date(year, 0, 1).getTime(), + to: year === now.getFullYear() ? to : new Date(year + 1, 0, 1).getTime(), + label: year === now.getFullYear() ? `${year} so far` : year.toString(), + } +} + +function renderActivity( + activity: SessionStatsInfo["activity"], + from: number, + to: number, + color: boolean, + width: number, +) { + const values = new Map(activity.map((day) => [day.date, day.steps])) + const rangeStart = dateOrdinal(new Date(from)) + const rangeEnd = dateOrdinal(new Date(to - 1)) + const end = new Date(to - 1) + end.setHours(12, 0, 0, 0) + end.setDate(end.getDate() + (7 - mondayIndex(end) - 1)) + const start = new Date(from) + start.setHours(12, 0, 0, 0) + start.setDate(start.getDate() - mondayIndex(start)) + const maxWeeks = Math.max(1, Math.min(53, width - 4)) + const totalWeeks = Math.floor((dateOrdinal(end) - dateOrdinal(start)) / 7) + 1 + const latest = new Date(end) + latest.setDate(latest.getDate() - (maxWeeks - 1) * 7) + if (start < latest) start.setTime(latest.getTime()) + + const active = [...values.values()].filter((value) => value > 0) + const levels = [...new Set(active)].sort((a, b) => a - b) + const weekStarts = Array.from({ length: Math.floor((dateOrdinal(end) - dateOrdinal(start)) / 7) + 1 }, (_, week) => { + const date = new Date(start) + date.setDate(date.getDate() + week * 7) + return date + }) + const weeks = weekStarts.map((week) => + Array.from({ length: 7 }, (_, day) => { + const date = new Date(week) + date.setDate(date.getDate() + day) + const ordinal = dateOrdinal(date) + if (ordinal < rangeStart || ordinal > rangeEnd) return " " + return activityGlyph(values.get(dateKey(date)) ?? 0, levels, color) + }), + ) + const weekdays = ["Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"] + return [ + style(totalWeeks > maxWeeks ? `activity · last ${maxWeeks} weeks` : "activity", `1;${colors.primary}`, color), + ` ${style(monthLabels(weekStarts), "2", color)}`, + ...weekdays.flatMap((label, day) => [ + `${style(label, "2", color)} ${weeks.map((week) => week[day]).join("")}`, + ...(day === weekdays.length - 1 ? [] : [""]), + ]), + "", + ` ${style("less", "2", color)} ${[0, 1, 2, 3, 4].map((level) => paintActivity(level, color)).join("")} ${style("more", "2", color)}`, + ] +} + +function renderCost(stats: SessionStatsInfo) { + const input = stats.tokens.input + stats.tokens.cache.read + stats.tokens.cache.write + const cached = input === 0 ? 0 : (stats.tokens.cache.read / input) * 100 + return [ + "COST & TOKENS", + row("cost", `$${stats.cost.toFixed(2)}`), + row("input", formatNumber(stats.tokens.input)), + row("output", formatNumber(stats.tokens.output)), + row("reasoning", formatNumber(stats.tokens.reasoning)), + row("cache read", formatNumber(stats.tokens.cache.read)), + row("cache write", formatNumber(stats.tokens.cache.write)), + row("cached input", formatPercent(cached)), + ] +} + +function renderModels(stats: SessionStatsInfo, limit: number, width: number) { + if (stats.models.length === 0) return ["MODELS", " no model usage"] + const models = stats.models.slice(0, limit) + const more = stats.models.length - models.length + if (width < 68) + return [ + "MODELS", + ...models.flatMap((item) => [ + truncate( + `${item.model.providerID}/${item.model.id}${item.model.variant ? `#${item.model.variant}` : ""}`, + width, + ), + ` ${formatNumber(tokenTotal(item.tokens))} tokens · ${formatNumber(item.steps)} steps · $${item.cost.toFixed(2)}`, + ]), + ...(more > 0 ? ["", `+${more.toLocaleString("en-US")} more model${more === 1 ? "" : "s"}`] : []), + ] + return [ + "MODELS", + tableHeader("model", "tokens", "steps", "cost"), + ...models.map((item) => + tableRow( + `${item.model.providerID}/${item.model.id}${item.model.variant ? `#${item.model.variant}` : ""}`, + formatNumber(tokenTotal(item.tokens)), + formatNumber(item.steps), + `$${item.cost.toFixed(2)}`, + ), + ), + ...(more > 0 ? ["", `+${more.toLocaleString("en-US")} more model${more === 1 ? "" : "s"}`] : []), + ] +} + +function renderTools(stats: SessionStatsInfo, limit: number, width: number) { + if (stats.toolUsage.length === 0) return ["TOOL RELIABILITY", " no tool calls"] + const tools = stats.toolUsage.slice(0, limit) + const more = stats.toolUsage.length - tools.length + if (width < 68) + return [ + "TOOL RELIABILITY", + ...tools.flatMap((tool) => { + const terminal = tool.succeeded + tool.failed + return [ + truncate(tool.name, width), + ` ${formatNumber(tool.calls)} calls · ${terminal === 0 ? "-" : formatPercent((tool.failed / terminal) * 100)} error · ${tool.durationP50 === undefined ? "-" : formatDuration(tool.durationP50)} p50`, + ] + }), + "", + `${formatNumber(stats.tools.succeeded + stats.tools.failed)} finished calls · ${formatNumber(stats.tools.unfinished)} unfinished`, + ...(more > 0 ? [`+${more.toLocaleString("en-US")} more tool${more === 1 ? "" : "s"}`] : []), + ] + return [ + "TOOL RELIABILITY", + tableHeader("tool", "calls", "error", "p50"), + ...tools.map((tool) => { + const terminal = tool.succeeded + tool.failed + return tableRow( + tool.name, + formatNumber(tool.calls), + terminal === 0 ? "-" : formatPercent((tool.failed / terminal) * 100), + tool.durationP50 === undefined ? "-" : formatDuration(tool.durationP50), + ) + }), + "", + `${formatNumber(stats.tools.succeeded + stats.tools.failed)} finished calls · ${formatNumber(stats.tools.unfinished)} unfinished`, + ...(more > 0 ? [`+${more.toLocaleString("en-US")} more tool${more === 1 ? "" : "s"}`] : []), + ] +} + +function row(label: string, value: string) { + return ` ${label.padEnd(20)}${value}` +} + +function tableHeader(label: string, second: string, third: string, fourth: string) { + return tableRow(label, second, third, fourth) +} + +function tableRow(label: string, second: string, third: string, fourth: string) { + return `${truncate(label, 34).padEnd(34)}${second.padStart(10)}${third.padStart(12)}${fourth.padStart(12)}` +} + +function truncate(value: string, width: number) { + return value.length <= width ? value : value.slice(0, width - 1) + "…" +} + +function tokenTotal(tokens: SessionStatsInfo["tokens"]) { + return tokens.input + tokens.output + tokens.reasoning + tokens.cache.read + tokens.cache.write +} + +function formatNumber(value: number) { + if (value >= 1_000_000_000) return `${trimDecimal(value / 1_000_000_000)}b` + if (value >= 1_000_000) return `${trimDecimal(value / 1_000_000)}m` + if (value >= 1_000) return `${trimDecimal(value / 1_000)}k` + return Math.round(value).toLocaleString("en-US") +} + +function trimDecimal(value: number) { + return value.toFixed(1).replace(/\.0$/, "") +} + +function formatPercent(value: number) { + return `${value.toFixed(value >= 10 ? 1 : 2)}%` +} + +function formatDuration(value: number) { + if (value < 1_000) return `${Math.round(value)}ms` + return `${trimDecimal(value / 1_000)}s` +} + +function metricCount(value: number, noun: string, color: boolean) { + return `${style(formatNumber(value), `1;${colors.primary}`, color)} ${noun}${value === 1 ? "" : "s"}` +} + +function style(value: string, code: string, color: boolean) { + return color ? `\x1b[${code}m${value}\x1b[0m` : value +} + +function activityGlyph(value: number, levels: number[], color: boolean) { + if (value === 0) return paintActivity(0, color) + const index = levels.indexOf(value) + const level = Math.max(1, Math.ceil(((index + 1) / levels.length) * 4)) + return paintActivity(level, color) +} + +function paintActivity(level: number, color: boolean) { + const glyph = ["·", "░", "▒", "▓", "█"][level] + if (!color) return glyph + if (level === 0) return `\x1b[2m${glyph}\x1b[22m` + return `\x1b[${colors.activity[level - 1]}m${glyph}\x1b[39m` +} + +function terminalPalette() { + const background = Number(process.env.COLORFGBG?.split(";").at(-1)) + if (Number.isFinite(background) && background >= 7) + return { + primary: "38;2;59;125;216", + activity: ["38;2;153;169;192", "38;2;122;155;200", "38;2;90;140;208", "38;2;59;125;216"], + } + if (Number.isFinite(background)) + return { + primary: "38;2;250;178;131", + activity: ["38;2;117;99;87", "38;2;161;125;102", "38;2;206;152;116", "38;2;250;178;131"], + } + return { primary: "36", activity: ["2;36", "36", "1;36", "1;96"] } +} + +function monthLabels(weeks: Date[]) { + const line: string[] = [] + weeks.reduce((previous, week, index) => { + const middle = new Date(week) + middle.setDate(middle.getDate() + 3) + const month = middle.getMonth() + if (month === previous) return previous + Intl.DateTimeFormat("en-US", { month: "short" }) + .format(middle) + .split("") + .forEach((character, offset) => { + line[index + offset] = character + }) + return month + }, -1) + return Array.from({ length: Math.max(weeks.length, line.length) }, (_, index) => line[index] ?? " ") + .join("") + .trimEnd() +} + +function mondayIndex(date: Date) { + return (date.getDay() + 6) % 7 +} + +function dateKey(date: Date) { + return [ + date.getFullYear(), + String(date.getMonth() + 1).padStart(2, "0"), + String(date.getDate()).padStart(2, "0"), + ].join("-") +} + +function dateOrdinal(date: Date) { + return Math.floor(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()) / 86_400_000) +} diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts index f344f450577..49eb0162d34 100755 --- a/packages/cli/src/index.ts +++ b/packages/cli/src/index.ts @@ -43,6 +43,7 @@ const Handlers = Runtime.handlers(Commands, { remove: () => import("./commands/handlers/plugin/remove"), }, models: () => import("./commands/handlers/models"), + stats: () => import("./commands/handlers/stats"), export: () => import("./commands/handlers/export"), import: () => import("./commands/handlers/import"), mini: () => import("./commands/handlers/mini"), diff --git a/packages/cli/test/stats.test.ts b/packages/cli/test/stats.test.ts new file mode 100644 index 00000000000..3089baf96c5 --- /dev/null +++ b/packages/cli/test/stats.test.ts @@ -0,0 +1,124 @@ +import { describe, expect, test } from "bun:test" +import type { SessionStatsInfo } from "@opencode-ai/client" +import { renderStats } from "../src/commands/handlers/stats" + +const stats: SessionStatsInfo = { + range: { from: Date.UTC(2026, 0, 1), to: Date.UTC(2026, 0, 8) }, + sessions: 2, + subagents: 1, + prompts: 4, + steps: 6, + tokens: { input: 10_000, output: 2_000, reasoning: 1_000, cache: { read: 5_000, write: 500 } }, + cost: 12.34, + tools: { calls: 10, succeeded: 8, failed: 2, unfinished: 0 }, + activeDays: 2, + streak: 2, + activity: [ + { date: "2026-01-02", steps: 2 }, + { date: "2026-01-03", steps: 4 }, + ], + models: [ + { + model: { providerID: "anthropic", id: "sonnet" }, + steps: 6, + tokens: { input: 10_000, output: 2_000, reasoning: 1_000, cache: { read: 5_000, write: 500 } }, + cost: 12.34, + }, + ], + toolUsage: [{ name: "private_tool", calls: 10, succeeded: 8, failed: 2, unfinished: 0, durationP50: 250 }], +} + +describe("stats rendering", () => { + test("keeps the default card shareable", () => { + const output = renderStats(stats, options()) + expect(output).toContain("opencode stats · 2026 so far · all projects") + expect(output).toContain("activity") + expect(output).toMatch(/Mo .*(?:\r?\n){2}Tu/) + expect(output).toMatch(/Su .*(?:\r?\n){2} less/) + expect(output).toContain("less ·░▒▓█ more") + expect(output).toContain("2 sessions · 1 subagent") + expect(output).toContain("80.0% tool success · 2 active days · best streak 2 days") + expect(output).not.toContain("private_tool") + expect(output).not.toContain("$12.34") + }) + + test("renders only requested detail tables", () => { + const output = renderStats(stats, options({ tools: true, cost: true })) + expect(output).toContain("COST & TOKENS") + expect(output).toContain("TOOL RELIABILITY") + expect(output).toContain("private_tool") + expect(output).toContain("tool") + expect(output).toContain("calls") + expect(output).toContain("cached input 32.3%") + expect(output).not.toContain("opencode stats") + expect(output).not.toContain("activity") + }) + + test("shows when detail tables omit rows", () => { + const output = renderStats( + { + ...stats, + models: [ + ...stats.models, + { + model: { providerID: "anthropic", id: "haiku" }, + steps: 2, + tokens: { input: 2_000, output: 500, reasoning: 0, cache: { read: 1_000, write: 0 } }, + cost: 1.25, + }, + ], + toolUsage: [ + ...stats.toolUsage, + { name: "grep", calls: 4, succeeded: 4, failed: 0, unfinished: 0, durationP50: 20 }, + ], + }, + options({ models: true, tools: true, limit: 1 }), + ) + expect(output).toContain("+1 more model") + expect(output).toContain("+1 more tool") + }) + + test("uses the OpenCode palette in color mode", () => { + const output = renderStats(stats, options({ color: true })) + expect(output).toContain("\x1b[1;36m") + expect(output).not.toContain("38;5;45") + }) + + test("uses compact layouts in narrow terminals", () => { + const output = renderStats(stats, options({ models: true, width: 48 })) + expect(output).toContain("anthropic/sonnet") + expect(output).toContain("18.5k tokens · 6 steps · $12.34") + expect(output.split(/\r?\n/).every((line) => line.length <= 48)).toBe(true) + }) + + test("renders a concise empty state", () => { + const output = renderStats( + { ...stats, sessions: 0, subagents: 0, prompts: 0, steps: 0, activeDays: 0, streak: 0, activity: [] }, + options(), + ) + expect(output).toContain("no activity in this range") + expect(output).not.toContain("less ·░▒▓█ more") + }) + + test("labels activity when terminal width truncates the requested range", () => { + const output = renderStats( + { ...stats, range: { from: Date.UTC(2020, 0, 1), to: Date.UTC(2026, 0, 8) } }, + options({ width: 20 }), + ) + expect(output).toContain("activity · last 16 weeks") + }) +}) + +function options(input: Partial[1]> = {}): Parameters[1] { + return { + label: "2026 so far", + scope: "all projects", + models: false, + tools: false, + cost: false, + limit: 5, + color: false, + width: 80, + ...input, + } +} diff --git a/packages/client/src/effect/api/api.ts b/packages/client/src/effect/api/api.ts index a2c002a0f1b..c169c01df67 100644 --- a/packages/client/src/effect/api/api.ts +++ b/packages/client/src/effect/api/api.ts @@ -10,6 +10,7 @@ import type { Project } from "@opencode-ai/schema/project" import type { RelativePath } from "@opencode-ai/schema/schema" import type { Brand } from "effect" import type { Model } from "@opencode-ai/schema/model" +import type { DateTime } from "effect" import type { SessionMessage } from "@opencode-ai/schema/session-message" import type { SessionInbox } from "@opencode-ai/schema/session-inbox" import type { PromptInput } from "@opencode-ai/schema/prompt-input" @@ -111,6 +112,59 @@ export type SessionListOutput = { } export type SessionListOperation = (input?: SessionListInput) => Effect.Effect +export type SessionStatsInput = { + readonly from?: number | undefined + readonly to?: number | undefined + readonly project?: Project.ID | undefined + readonly timezone?: string | undefined + readonly models?: boolean | undefined + readonly tools?: boolean | undefined + readonly toolSummary?: boolean | undefined +} +export type SessionStatsOutput = { + readonly range: { readonly from: DateTime.Utc; readonly to: DateTime.Utc } + readonly sessions: number + readonly subagents: number + readonly prompts: number + readonly steps: number + readonly tokens: { + readonly input: number + readonly output: number + readonly reasoning: number + readonly cache: { readonly read: number; readonly write: number } + } + readonly cost: number & Brand.Brand<"Money.USD"> + readonly tools: { + readonly calls: number + readonly succeeded: number + readonly failed: number + readonly unfinished: number + } + readonly activeDays: number + readonly streak: number + readonly activity: ReadonlyArray<{ readonly date: string; readonly steps: number }> + readonly models: ReadonlyArray<{ + readonly model: Model.Ref + readonly steps: number + readonly tokens: { + readonly input: number + readonly output: number + readonly reasoning: number + readonly cache: { readonly read: number; readonly write: number } + } + readonly cost: number & Brand.Brand<"Money.USD"> + }> + readonly toolUsage: ReadonlyArray<{ + readonly name: string + readonly calls: number + readonly succeeded: number + readonly failed: number + readonly unfinished: number + readonly durationP50?: number | undefined + }> +} +export type SessionStatsOperation = (input?: SessionStatsInput) => Effect.Effect + export type SessionCreateInput = { readonly id?: Session.ID | undefined readonly title?: string | undefined @@ -966,6 +1020,7 @@ export type SessionViewOperation = (input: SessionViewInput) => Effec export interface SessionApi { readonly list: SessionListOperation + readonly stats: SessionStatsOperation readonly create: SessionCreateOperation readonly import: SessionImportOperation readonly export: SessionExportOperation diff --git a/packages/client/src/effect/generated/client.ts b/packages/client/src/effect/generated/client.ts index c1a4e08065b..b88b5e2224d 100644 --- a/packages/client/src/effect/generated/client.ts +++ b/packages/client/src/effect/generated/client.ts @@ -17,6 +17,8 @@ import type { PluginListOutput, SessionListInput, SessionListOutput, + SessionStatsInput, + SessionStatsOutput, SessionCreateInput, SessionCreateOutput, SessionImportInput, @@ -305,6 +307,24 @@ const EndpointSessionList = (raw: RawClient["server.session"]) => (input?: Sessi }).pipe(Effect.mapError(mapClientError)), ) +const EndpointSessionStats = (raw: RawClient["server.session"]) => (input?: SessionStatsInput) => + preserveEffect()( + raw["session.stats"]({ + query: { + from: input?.["from"], + to: input?.["to"], + project: input?.["project"], + timezone: input?.["timezone"], + models: input?.["models"], + tools: input?.["tools"], + toolSummary: input?.["toolSummary"], + }, + }).pipe( + Effect.mapError(mapClientError), + Effect.map((value) => value.data), + ), + ) + const EndpointSessionCreate = (raw: RawClient["server.session"]) => (input?: SessionCreateInput) => preserveEffect()( raw["session.create"]({ @@ -632,6 +652,7 @@ const EndpointSessionView = (raw: RawClient["server.session"]) => (input: Sessio const adaptGroupSession = (raw: RawClient["server.session"]) => ({ list: EndpointSessionList(raw), + stats: EndpointSessionStats(raw), create: EndpointSessionCreate(raw), import: EndpointSessionImport(raw), export: EndpointSessionExport(raw), diff --git a/packages/client/src/promise/generated/client.ts b/packages/client/src/promise/generated/client.ts index 9151f83e52f..3f73c56ec20 100644 --- a/packages/client/src/promise/generated/client.ts +++ b/packages/client/src/promise/generated/client.ts @@ -11,6 +11,8 @@ import type { PluginListOutput, SessionListInput, SessionListOutput, + SessionStatsInput, + SessionStatsOutput, SessionCreateInput, SessionCreateOutput, SessionImportInput, @@ -454,6 +456,26 @@ export function make(options: ClientOptions) { }, requestOptions, ), + stats: (input?: SessionStatsInput, requestOptions?: RequestOptions) => + request<{ readonly data: SessionStatsOutput }>( + { + method: "GET", + path: `/api/session/stats`, + query: { + from: input?.["from"], + to: input?.["to"], + project: input?.["project"], + timezone: input?.["timezone"], + models: input?.["models"], + tools: input?.["tools"], + toolSummary: input?.["toolSummary"], + }, + successStatus: 200, + declaredStatuses: [400, 401], + empty: false, + }, + requestOptions, + ).then((value) => value.data), create: (input?: SessionCreateInput, requestOptions?: RequestOptions) => request<{ readonly data: SessionCreateOutput }>( { diff --git a/packages/client/src/promise/generated/types.ts b/packages/client/src/promise/generated/types.ts index 2af0d4d96f2..81e5c9672a8 100644 --- a/packages/client/src/promise/generated/types.ts +++ b/packages/client/src/promise/generated/types.ts @@ -37,6 +37,17 @@ export type FileDiffInfo = { status: "added" | "deleted" | "modified" } +export type SessionStatsActivity = { date: string; steps: number } + +export type SessionStatsToolUsage = { + name: string + calls: number + succeeded: number + failed: number + unfinished: number + durationP50?: number +} + export type SessionMessageAgentSelected = { id: string metadata?: { [x: string]: JsonValue } @@ -422,6 +433,8 @@ export type V2EventServerConnected = { export type SessionRevert = { messageID: string; partID?: string; snapshot?: string; files?: Array } +export type SessionStatsModelUsage = { model: ModelRef; steps: number; tokens: TokenUsageInfo; cost: MoneyUSD } + export type SessionMessageModelSelected = { id: string metadata?: { [x: string]: JsonValue } @@ -1538,6 +1551,22 @@ export type SessionRevertStaged = { data: { sessionID: string; revert: SessionRevert } } +export type SessionStatsInfo = { + range: { from: number; to: number } + sessions: number + subagents: number + prompts: number + steps: number + tokens: TokenUsageInfo + cost: MoneyUSD + tools: { calls: number; succeeded: number; failed: number; unfinished: number } + activeDays: number + streak: number + activity: Array + models: Array + toolUsage: Array +} + export type SessionMessageUser = { id: string metadata?: { [x: string]: JsonValue } @@ -2446,6 +2475,74 @@ export type SessionListInput = { export type SessionListOutput = SessionsResponse +export type SessionStatsInput = { + readonly from?: { + readonly from?: number | undefined + readonly to?: number | undefined + readonly project?: string | undefined + readonly timezone?: string | undefined + readonly models?: boolean | undefined + readonly tools?: boolean | undefined + readonly toolSummary?: boolean | undefined + }["from"] + readonly to?: { + readonly from?: number | undefined + readonly to?: number | undefined + readonly project?: string | undefined + readonly timezone?: string | undefined + readonly models?: boolean | undefined + readonly tools?: boolean | undefined + readonly toolSummary?: boolean | undefined + }["to"] + readonly project?: { + readonly from?: number | undefined + readonly to?: number | undefined + readonly project?: string | undefined + readonly timezone?: string | undefined + readonly models?: boolean | undefined + readonly tools?: boolean | undefined + readonly toolSummary?: boolean | undefined + }["project"] + readonly timezone?: { + readonly from?: number | undefined + readonly to?: number | undefined + readonly project?: string | undefined + readonly timezone?: string | undefined + readonly models?: boolean | undefined + readonly tools?: boolean | undefined + readonly toolSummary?: boolean | undefined + }["timezone"] + readonly models?: { + readonly from?: number | undefined + readonly to?: number | undefined + readonly project?: string | undefined + readonly timezone?: string | undefined + readonly models?: boolean | undefined + readonly tools?: boolean | undefined + readonly toolSummary?: boolean | undefined + }["models"] + readonly tools?: { + readonly from?: number | undefined + readonly to?: number | undefined + readonly project?: string | undefined + readonly timezone?: string | undefined + readonly models?: boolean | undefined + readonly tools?: boolean | undefined + readonly toolSummary?: boolean | undefined + }["tools"] + readonly toolSummary?: { + readonly from?: number | undefined + readonly to?: number | undefined + readonly project?: string | undefined + readonly timezone?: string | undefined + readonly models?: boolean | undefined + readonly tools?: boolean | undefined + readonly toolSummary?: boolean | undefined + }["toolSummary"] +} + +export type SessionStatsOutput = { data: SessionStatsInfo }["data"] + export type SessionCreateInput = { readonly id?: { readonly id?: string | null diff --git a/packages/core/src/session/stats.ts b/packages/core/src/session/stats.ts new file mode 100644 index 00000000000..e65fa3171a8 --- /dev/null +++ b/packages/core/src/session/stats.ts @@ -0,0 +1,387 @@ +export * as SessionStats from "./stats.js" + +import { DateTime, Effect, Option, Schema } from "effect" +import { and, eq, gte, inArray, lt, sql } from "drizzle-orm" +import { Model } from "@opencode-ai/schema/model" +import { Money } from "@opencode-ai/schema/money" +import { Project } from "@opencode-ai/schema/project" +import { Provider } from "@opencode-ai/schema/provider" +import { SessionEvent } from "@opencode-ai/schema/session-event" +import { Database } from "../database/database.js" +import { EventTable } from "../event/sql.js" +import { SessionMessageTable, SessionTable } from "./sql.js" + +type Input = { + readonly from?: number + readonly to?: number + readonly projectID?: Project.ID + readonly timezone?: string + readonly models?: boolean + readonly tools?: boolean + readonly toolSummary?: boolean +} + +type Tokens = { + input: number + output: number + reasoning: number + cache: { read: number; write: number } +} + +type MessageRow = { + sessionID: string + parentID: string | null + type: "user" | "assistant" + timeCreated: number + providerID: string | null + modelID: string | null + variant: string | null + input: number | null + output: number | null + reasoning: number | null + cacheRead: number | null + cacheWrite: number | null + cost: number | null +} + +type ToolRow = { + name: string | null + status: string | null + duration: number | null +} + +type ToolSummaryRow = { status: string | null; count: number } + +type ModelAggregate = { + model: Model.Ref + steps: number + tokens: Tokens + cost: number +} + +type ToolAggregate = { + name: string + calls: number + succeeded: number + failed: number + unfinished: number + durations: number[] +} + +const decodeUsage = Schema.decodeUnknownOption(SessionEvent.UsageRecorded.data) +const Window = 31 * 24 * 60 * 60 * 1_000 + +export const get = Effect.fn("SessionStats.get")(function* (input: Input = {}) { + const db = (yield* Database.Service).db + const now = Date.now() + const to = input.to ?? now + const earliest = + input.from ?? + (yield* db + .get<{ time: number | null }>(sql`SELECT min(time_created) AS time FROM ${SessionMessageTable}`) + .pipe(Effect.orDie))?.time ?? + to + const ranges = windows(earliest, to) + const sessions = new Set() + const subagents = new Set() + const sessionIDs = new Set() + const activity = new Map() + const models = new Map() + const tools = new Map() + const totals = { + prompts: 0, + steps: 0, + tokens: emptyTokens(), + cost: 0, + tools: { calls: 0, succeeded: 0, failed: 0, unfinished: 0 }, + } + const dateKey = makeDateKey(input.timezone) + const project = input.projectID === undefined ? sql`` : sql`AND session.project_id = ${input.projectID}` + + yield* Effect.forEach( + ranges, + (range) => + db + .all( + sql` + SELECT + message.session_id AS sessionID, + session.parent_id AS parentID, + message.type AS type, + message.time_created AS timeCreated, + json_extract(message.data, '$.model.providerID') AS providerID, + json_extract(message.data, '$.model.id') AS modelID, + json_extract(message.data, '$.model.variant') AS variant, + json_extract(message.data, '$.tokens.input') AS input, + json_extract(message.data, '$.tokens.output') AS output, + json_extract(message.data, '$.tokens.reasoning') AS reasoning, + json_extract(message.data, '$.tokens.cache.read') AS cacheRead, + json_extract(message.data, '$.tokens.cache.write') AS cacheWrite, + json_extract(message.data, '$.cost') AS cost + FROM ${SessionMessageTable} AS message + JOIN ${SessionTable} AS session ON session.id = message.session_id + WHERE message.type IN ('user', 'assistant') + AND message.time_created >= ${range.from} + AND message.time_created < ${range.to} + AND (session.fork_session_id IS NULL OR message.time_created >= session.time_created) + ${project} + `, + ) + .pipe( + Effect.orDie, + Effect.tap((rows) => + Effect.sync(() => { + rows.forEach((row) => { + sessionIDs.add(row.sessionID) + if (row.parentID === null) sessions.add(row.sessionID) + else subagents.add(row.sessionID) + if (row.type === "user") { + if (row.parentID === null) totals.prompts++ + return + } + + totals.steps++ + const tokens = rowTokens(row) + addTokens(totals.tokens, tokens) + totals.cost += row.cost ?? 0 + const day = dateKey(row.timeCreated) + activity.set(day, (activity.get(day) ?? 0) + 1) + if (!input.models || !row.providerID || !row.modelID) return + const key = `${row.providerID}/${row.modelID}#${row.variant ?? ""}` + const model = models.get(key) ?? { + model: { + providerID: Provider.ID.make(row.providerID), + id: Model.ID.make(row.modelID), + variant: row.variant ? Model.VariantID.make(row.variant) : undefined, + }, + steps: 0, + tokens: emptyTokens(), + cost: 0, + } + models.set(key, model) + model.steps++ + model.cost += row.cost ?? 0 + addTokens(model.tokens, tokens) + }) + }), + ), + ), + { concurrency: 1, discard: true }, + ) + + if (input.tools || input.toolSummary) + yield* Effect.forEach( + ranges, + (range) => { + if (!input.tools) + return db + .all( + sql` + SELECT json_extract(content.value, '$.state.status') AS status, count(*) AS count + FROM ${SessionMessageTable} AS message + JOIN ${SessionTable} AS session ON session.id = message.session_id, + json_each(message.data, '$.content') AS content + WHERE message.type = 'assistant' + AND message.time_created >= ${range.from} + AND message.time_created < ${range.to} + AND (session.fork_session_id IS NULL OR message.time_created >= session.time_created) + AND json_extract(content.value, '$.type') = 'tool' + ${project} + GROUP BY status + `, + ) + .pipe( + Effect.orDie, + Effect.tap((rows) => + Effect.sync(() => rows.forEach((row) => addToolStatus(totals.tools, row.status, row.count))), + ), + Effect.asVoid, + ) + return db + .all( + sql` + SELECT + json_extract(content.value, '$.name') AS name, + json_extract(content.value, '$.state.status') AS status, + CASE + WHEN json_extract(content.value, '$.time.completed') IS NULL THEN NULL + ELSE json_extract(content.value, '$.time.completed') + - coalesce(json_extract(content.value, '$.time.ran'), json_extract(content.value, '$.time.created')) + END AS duration + FROM ${SessionMessageTable} AS message + JOIN ${SessionTable} AS session ON session.id = message.session_id, + json_each(message.data, '$.content') AS content + WHERE message.type = 'assistant' + AND message.time_created >= ${range.from} + AND message.time_created < ${range.to} + AND (session.fork_session_id IS NULL OR message.time_created >= session.time_created) + AND json_extract(content.value, '$.type') = 'tool' + ${project} + `, + ) + .pipe( + Effect.orDie, + Effect.tap((rows) => + Effect.sync(() => { + rows.forEach((row) => { + addToolStatus(totals.tools, row.status, 1) + if (!row.name) return + const tool = tools.get(row.name) ?? { + name: row.name, + calls: 0, + succeeded: 0, + failed: 0, + unfinished: 0, + durations: [], + } + tools.set(row.name, tool) + addToolStatus(tool, row.status, 1) + if (row.duration !== null) tool.durations.push(row.duration) + }) + }), + ), + Effect.asVoid, + ) + }, + { concurrency: 1, discard: true }, + ) + + const ids = [...sessionIDs] + const events = (yield* Effect.forEach( + Array.from({ length: Math.ceil(ids.length / 500) }, (_, index) => ids.slice(index * 500, (index + 1) * 500)), + (batch) => + db + .select({ created: EventTable.created, data: EventTable.data }) + .from(EventTable) + .where( + and( + inArray(EventTable.aggregate_id, batch), + eq(EventTable.type, SessionEvent.UsageRecorded.type), + input.from === undefined ? undefined : gte(EventTable.created, input.from), + input.to === undefined ? undefined : lt(EventTable.created, input.to), + ), + ) + .all() + .pipe(Effect.orDie), + { concurrency: 4 }, + )).flat() + events.forEach((row) => { + const decoded = decodeUsage(row.data) + if (Option.isNone(decoded)) return + addTokens(totals.tokens, decoded.value.tokens) + totals.cost += decoded.value.cost + }) + + const days = [...activity.entries()].sort(([a], [b]) => a.localeCompare(b)) + return { + range: { from: DateTime.makeUnsafe(earliest), to: DateTime.makeUnsafe(to) }, + sessions: sessions.size, + subagents: subagents.size, + prompts: totals.prompts, + steps: totals.steps, + tokens: totals.tokens, + cost: Money.USD.make(totals.cost), + tools: totals.tools, + activeDays: days.length, + streak: longestStreak(days.map(([date]) => date)), + activity: days.map(([date, steps]) => ({ date, steps })), + models: [...models.values()] + .sort((a, b) => tokenTotal(b.tokens) - tokenTotal(a.tokens)) + .map((model) => ({ ...model, cost: Money.USD.make(model.cost) })), + toolUsage: [...tools.values()] + .sort((a, b) => b.calls - a.calls) + .map((tool) => ({ + name: tool.name, + calls: tool.calls, + succeeded: tool.succeeded, + failed: tool.failed, + unfinished: tool.unfinished, + durationP50: median(tool.durations), + })), + } +}) + +function windows(from: number, to: number) { + return Array.from({ length: Math.max(1, Math.ceil((to - from) / Window)) }, (_, index) => ({ + from: from + index * Window, + to: Math.min(to, from + (index + 1) * Window), + })) +} + +function rowTokens(row: MessageRow): Tokens { + return { + input: row.input ?? 0, + output: row.output ?? 0, + reasoning: row.reasoning ?? 0, + cache: { read: row.cacheRead ?? 0, write: row.cacheWrite ?? 0 }, + } +} + +function emptyTokens(): Tokens { + return { input: 0, output: 0, reasoning: 0, cache: { read: 0, write: 0 } } +} + +function addTokens(target: Tokens, source: Tokens) { + target.input += source.input + target.output += source.output + target.reasoning += source.reasoning + target.cache.read += source.cache.read + target.cache.write += source.cache.write +} + +function tokenTotal(tokens: Tokens) { + return tokens.input + tokens.output + tokens.reasoning + tokens.cache.read + tokens.cache.write +} + +function addToolStatus( + target: { calls: number; succeeded: number; failed: number; unfinished: number }, + status: string | null, + count: number, +) { + target.calls += count + if (status === "completed") { + target.succeeded += count + return + } + if (status === "error") { + target.failed += count + return + } + target.unfinished += count +} + +function makeDateKey(timezone = "UTC") { + const formatter = new Intl.DateTimeFormat("en-US", { + timeZone: timezone, + year: "numeric", + month: "2-digit", + day: "2-digit", + }) + return (time: number) => { + const parts = Object.fromEntries(formatter.formatToParts(time).map((part) => [part.type, part.value])) + return `${parts.year}-${parts.month}-${parts.day}` + } +} + +function longestStreak(days: string[]) { + return days.reduce( + (result, day, index) => { + const previous = days[index - 1] + const current = previous && dayOrdinal(day) - dayOrdinal(previous) === 1 ? result.current + 1 : 1 + return { current, longest: Math.max(result.longest, current) } + }, + { current: 0, longest: 0 }, + ).longest +} + +function dayOrdinal(value: string) { + const [year, month, day] = value.split("-").map(Number) + return Math.floor(Date.UTC(year, month - 1, day) / 86_400_000) +} + +function median(values: number[]) { + if (values.length === 0) return undefined + const sorted = values.toSorted((a, b) => a - b) + const middle = Math.floor(sorted.length / 2) + return sorted.length % 2 === 0 ? (sorted[middle - 1] + sorted[middle]) / 2 : sorted[middle] +} diff --git a/packages/core/test/session-stats.test.ts b/packages/core/test/session-stats.test.ts new file mode 100644 index 00000000000..f8b2fc3c272 --- /dev/null +++ b/packages/core/test/session-stats.test.ts @@ -0,0 +1,239 @@ +import { describe, expect } from "bun:test" +import { Agent } from "@opencode-ai/schema/agent" +import { Event } from "@opencode-ai/schema/event" +import { Model } from "@opencode-ai/schema/model" +import { Money } from "@opencode-ai/schema/money" +import { Project } from "@opencode-ai/schema/project" +import { Provider } from "@opencode-ai/schema/provider" +import { Session } from "@opencode-ai/schema/session" +import { SessionEvent } from "@opencode-ai/schema/session-event" +import { SessionMessage } from "@opencode-ai/schema/session-message" +import { AbsolutePath } from "@opencode-ai/core/schema" +import { Database } from "@opencode-ai/core/database/database" +import { EventSequenceTable, EventTable } from "@opencode-ai/core/event/sql" +import { ProjectTable } from "@opencode-ai/core/project/sql" +import { SessionMessageTable, SessionTable } from "@opencode-ai/core/session/sql" +import { SessionStats } from "@opencode-ai/core/session/stats" +import { AppNodeBuilder } from "@opencode-ai/core/effect/app-node-builder" +import { DateTime, Effect, Schema } from "effect" +import { testEffect } from "./lib/effect" + +const it = testEffect(AppNodeBuilder.build(Database.node)) +const projectID = Project.ID.make("stats-project") +const sessionID = Session.ID.make("ses_stats_root") +const childID = Session.ID.make("ses_stats_child") +const forkID = Session.ID.make("ses_stats_fork") +const encodeMessage = Schema.encodeSync(SessionMessage.Info) +const encodeUsage = Schema.encodeSync(SessionEvent.UsageRecorded.data) + +describe("SessionStats", () => { + it.effect("aggregates activity and tool reliability without reading message payloads outside the range", () => + Effect.gen(function* () { + const db = (yield* Database.Service).db + yield* db + .insert(ProjectTable) + .values({ id: projectID, worktree: AbsolutePath.make("/stats"), name: "stats", sandboxes: [] }) + .run() + .pipe(Effect.orDie) + yield* db + .insert(SessionTable) + .values([ + { id: sessionID, project_id: projectID, slug: "root", directory: "/stats", version: "test" }, + { + id: childID, + project_id: projectID, + parent_id: sessionID, + slug: "child", + directory: "/stats", + version: "test", + }, + { + id: forkID, + project_id: projectID, + fork_session_id: sessionID, + slug: "fork", + directory: "/stats", + version: "test", + time_created: Date.UTC(2026, 0, 4), + }, + ]) + .run() + .pipe(Effect.orDie) + yield* db + .insert(SessionMessageTable) + .values([ + messageRow( + sessionID, + 1, + SessionMessage.User.make({ + id: SessionMessage.ID.make("msg_stats_user"), + type: "user", + text: "hello", + time: { created: DateTime.makeUnsafe(Date.UTC(2026, 0, 2, 9)) }, + }), + ), + messageRow( + sessionID, + 2, + assistant("msg_stats_assistant", Date.UTC(2026, 0, 2, 10), [ + SessionMessage.AssistantTool.make({ + type: "tool", + id: "call_read", + name: "read", + state: SessionMessage.ToolStateCompleted.make({ + status: "completed", + input: {}, + content: [{ type: "text", text: "ok" }], + }), + time: { + created: DateTime.makeUnsafe(Date.UTC(2026, 0, 2, 10)), + ran: DateTime.makeUnsafe(Date.UTC(2026, 0, 2, 10, 0, 1)), + completed: DateTime.makeUnsafe(Date.UTC(2026, 0, 2, 10, 0, 1, 250)), + }, + }), + SessionMessage.AssistantTool.make({ + type: "tool", + id: "call_edit", + name: "edit", + state: SessionMessage.ToolStateError.make({ + status: "error", + input: {}, + error: { type: "tool", message: "failed" }, + }), + time: { + created: DateTime.makeUnsafe(Date.UTC(2026, 0, 2, 10)), + completed: DateTime.makeUnsafe(Date.UTC(2026, 0, 2, 10, 0, 2)), + }, + }), + ]), + ), + messageRow(childID, 1, assistant("msg_stats_child", Date.UTC(2026, 0, 3, 10), [], "large", 2)), + messageRow( + forkID, + 1, + SessionMessage.User.make({ + id: SessionMessage.ID.make("msg_stats_fork_copied_user"), + type: "user", + text: "copied", + time: { created: DateTime.makeUnsafe(Date.UTC(2026, 0, 2, 9)) }, + }), + ), + messageRow( + forkID, + 2, + assistant("msg_stats_fork_copied_assistant", Date.UTC(2026, 0, 2, 10), [ + SessionMessage.AssistantTool.make({ + type: "tool", + id: "call_copied", + name: "copied", + state: SessionMessage.ToolStateCompleted.make({ + status: "completed", + input: {}, + content: [{ type: "text", text: "copied" }], + }), + time: { + created: DateTime.makeUnsafe(Date.UTC(2026, 0, 2, 10)), + completed: DateTime.makeUnsafe(Date.UTC(2026, 0, 2, 10, 0, 1)), + }, + }), + ]), + ), + messageRow(forkID, 3, assistant("msg_stats_fork_new", Date.UTC(2026, 0, 5, 10), [], "fork-new")), + messageRow(sessionID, 3, assistant("msg_stats_outside", Date.UTC(2025, 11, 31, 10), [])), + ]) + .run() + .pipe(Effect.orDie) + yield* db + .insert(EventSequenceTable) + .values([ + { aggregate_id: sessionID, seq: 0 }, + { aggregate_id: childID, seq: 0 }, + ]) + .run() + .pipe(Effect.orDie) + yield* db + .insert(EventTable) + .values({ + id: Event.ID.make("evt_stats_usage"), + aggregate_id: sessionID, + seq: 0, + created: Date.UTC(2026, 0, 2, 10, 0, 3), + type: SessionEvent.UsageRecorded.type, + data: encodeUsage({ + sessionID, + source: "title", + cost: Money.USD.make(0.5), + tokens: { input: 1, output: 1, reasoning: 1, cache: { read: 1, write: 1 } }, + }), + }) + .run() + .pipe(Effect.orDie) + + const stats = yield* SessionStats.get({ + from: Date.UTC(2026, 0, 1), + to: Date.UTC(2026, 1, 1), + timezone: "UTC", + models: true, + tools: true, + }) + + expect(stats.sessions).toBe(2) + expect(stats.subagents).toBe(1) + expect(stats.prompts).toBe(1) + expect(stats.steps).toBe(3) + expect(stats.tokens).toEqual({ input: 41, output: 21, reasoning: 9, cache: { read: 17, write: 5 } }) + expect(stats.cost).toBe(Money.USD.make(6.5)) + expect(stats.tools).toEqual({ calls: 2, succeeded: 1, failed: 1, unfinished: 0 }) + expect(stats.activity).toEqual([ + { date: "2026-01-02", steps: 1 }, + { date: "2026-01-03", steps: 1 }, + { date: "2026-01-05", steps: 1 }, + ]) + expect(stats.streak).toBe(2) + expect(stats.models.map((model) => String(model.model.id))).toEqual(["large", "sonnet", "fork-new"]) + expect(stats.toolUsage).toMatchObject([ + { name: "read", calls: 1, succeeded: 1, failed: 0, durationP50: 250 }, + { name: "edit", calls: 1, succeeded: 0, failed: 1, durationP50: 2_000 }, + ]) + + const summary = yield* SessionStats.get({ + from: Date.UTC(2026, 0, 1), + to: Date.UTC(2026, 1, 1), + timezone: "UTC", + toolSummary: true, + }) + expect(summary.models).toEqual([]) + expect(summary.toolUsage).toEqual([]) + expect(summary.tools).toEqual({ calls: 2, succeeded: 1, failed: 1, unfinished: 0 }) + }), + ) +}) + +function assistant( + id: string, + created: number, + content: SessionMessage.AssistantContent[], + model = "sonnet", + scale = 1, +) { + return SessionMessage.Assistant.make({ + id: SessionMessage.ID.make(id), + type: "assistant", + agent: Agent.ID.make("build"), + model: { id: Model.ID.make(model), providerID: Provider.ID.make("anthropic") }, + content, + cost: Money.USD.make(1.5 * scale), + tokens: { input: 10 * scale, output: 5 * scale, reasoning: 2 * scale, cache: { read: 4 * scale, write: scale } }, + time: { created: DateTime.makeUnsafe(created), completed: DateTime.makeUnsafe(created + 2_000) }, + }) +} + +function messageRow( + sessionID: Session.ID, + seq: number, + message: SessionMessage.Info, +): typeof SessionMessageTable.$inferInsert { + const encoded = encodeMessage(message) + const { id, type, ...data } = encoded + return { id: SessionMessage.ID.make(id), session_id: sessionID, type, seq, time_created: encoded.time.created, data } +} diff --git a/packages/protocol/openapi.json b/packages/protocol/openapi.json index 2a0a4ab9435..71c7593f808 100644 --- a/packages/protocol/openapi.json +++ b/packages/protocol/openapi.json @@ -109,7 +109,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -162,7 +192,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -236,7 +296,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -309,7 +399,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -378,11 +498,7 @@ "anyOf": [ { "type": "string", - "allOf": [ - { - "pattern": "^wrk" - } - ] + "pattern": "^wrk" }, { "type": "null" @@ -428,7 +544,14 @@ "name": "search", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "required": false }, @@ -441,11 +564,7 @@ "anyOf": [ { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, { "type": "string", @@ -625,11 +744,7 @@ "anyOf": [ { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, { "type": "null" @@ -637,16 +752,44 @@ ] }, "title": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "agent": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "model": { - "$ref": "#/components/schemas/Union_6a162d0a021d" + "anyOf": [ + { + "$ref": "#/components/schemas/Model.Ref" + }, + { + "type": "null" + } + ] }, "location": { - "$ref": "#/components/schemas/Union_5ee94d3ca88d" + "anyOf": [ + { + "$ref": "#/components/schemas/Location.Ref" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -657,6 +800,171 @@ } } }, + "/api/session/stats": { + "get": { + "tags": ["session"], + "operationId": "v2.session.stats", + "parameters": [ + { + "name": "from", + "in": "query", + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "required": false + }, + { + "name": "to", + "in": "query", + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "required": false + }, + { + "name": "project", + "in": "query", + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "required": false + }, + { + "name": "timezone", + "in": "query", + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "required": false + }, + { + "name": "models", + "in": "query", + "schema": { + "anyOf": [ + { + "type": "string", + "enum": ["true", "false"] + }, + { + "type": "null" + } + ] + }, + "required": false + }, + { + "name": "tools", + "in": "query", + "schema": { + "anyOf": [ + { + "type": "string", + "enum": ["true", "false"] + }, + { + "type": "null" + } + ] + }, + "required": false + }, + { + "name": "toolSummary", + "in": "query", + "schema": { + "anyOf": [ + { + "type": "string", + "enum": ["true", "false"] + }, + { + "type": "null" + } + ] + }, + "required": false + } + ], + "security": [], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/SessionStats.Info" + } + }, + "required": ["data"], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "InvalidRequestError", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/InvalidRequestErrorEncoded" + }, + { + "$ref": "#/components/schemas/InvalidRequestErrorEncoded" + } + ] + } + } + } + }, + "401": { + "description": "UnauthorizedError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorEncoded" + } + } + } + } + }, + "description": "Aggregate local session activity, usage, and tool reliability for a time range.", + "summary": "Get session statistics" + } + }, "/api/session/import": { "post": { "tags": ["session"], @@ -724,10 +1032,20 @@ "$ref": "#/components/schemas/Session.Info" }, "messages": { - "$ref": "#/components/schemas/Arrays_fa246a9267ec" + "type": "array", + "items": { + "$ref": "#/components/schemas/Session.Message.Info" + } }, "location": { - "$ref": "#/components/schemas/Union_5ee94d3ca88d" + "anyOf": [ + { + "$ref": "#/components/schemas/Location.Ref" + }, + { + "type": "null" + } + ] } }, "required": ["info", "messages"], @@ -749,11 +1067,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -761,7 +1075,15 @@ "name": "sanitize", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_e13209ef6bf4" + "anyOf": [ + { + "type": "string", + "enum": ["true", "false"] + }, + { + "type": "null" + } + ] }, "required": false } @@ -894,11 +1216,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -965,11 +1283,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -1031,11 +1345,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -1138,11 +1448,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -1221,11 +1527,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -1304,11 +1606,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -1387,11 +1685,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -1452,14 +1746,17 @@ }, "workspaceID": { "type": "string", - "allOf": [ - { - "pattern": "^wrk" - } - ] + "pattern": "^wrk" }, "delivery": { - "$ref": "#/components/schemas/Union_1f50b1b03235" + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Inbox.Delivery" + }, + { + "type": "null" + } + ] } }, "required": ["directory"], @@ -1481,11 +1778,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -1573,28 +1866,59 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/Union_f8b4c9e24aa0" + "anyOf": [ + { + "type": "string", + "pattern": "^msg_" + }, + { + "type": "null" + } + ] }, "text": { "type": "string" }, "files": { - "$ref": "#/components/schemas/Arrays_3ff7cb2a474f" + "type": "array", + "items": { + "$ref": "#/components/schemas/PromptInput.FileAttachment" + } }, "agents": { - "$ref": "#/components/schemas/Arrays_e1027de4b984" + "type": "array", + "items": { + "$ref": "#/components/schemas/Prompt.AgentAttachment" + } }, "skills": { - "$ref": "#/components/schemas/Arrays_c17502465996" + "type": "array", + "items": { + "$ref": "#/components/schemas/PromptInput.SkillAttachment" + } }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "delivery": { - "$ref": "#/components/schemas/Union_1f50b1b03235" + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Inbox.Delivery" + }, + { + "type": "null" + } + ] }, "resume": { - "$ref": "#/components/schemas/Union_6a1762611a44" + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": ["text"], @@ -1616,11 +1940,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -1721,34 +2041,86 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/Union_f8b4c9e24aa0" + "anyOf": [ + { + "type": "string", + "pattern": "^msg_" + }, + { + "type": "null" + } + ] }, "command": { "type": "string" }, "arguments": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "agent": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "model": { - "$ref": "#/components/schemas/Union_6a162d0a021d" + "anyOf": [ + { + "$ref": "#/components/schemas/Model.Ref" + }, + { + "type": "null" + } + ] }, "files": { - "$ref": "#/components/schemas/Arrays_3ff7cb2a474f" + "type": "array", + "items": { + "$ref": "#/components/schemas/PromptInput.FileAttachment" + } }, "agents": { - "$ref": "#/components/schemas/Arrays_e1027de4b984" + "type": "array", + "items": { + "$ref": "#/components/schemas/Prompt.AgentAttachment" + } }, "skills": { - "$ref": "#/components/schemas/Arrays_c17502465996" + "type": "array", + "items": { + "$ref": "#/components/schemas/PromptInput.SkillAttachment" + } }, "delivery": { - "$ref": "#/components/schemas/Union_1f50b1b03235" + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Inbox.Delivery" + }, + { + "type": "null" + } + ] }, "resume": { - "$ref": "#/components/schemas/Union_6a1762611a44" + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": ["command"], @@ -1770,11 +2142,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -1834,13 +2202,28 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/Union_f8b4c9e24aa0" + "anyOf": [ + { + "type": "string", + "pattern": "^msg_" + }, + { + "type": "null" + } + ] }, "skill": { "type": "string" }, "resume": { - "$ref": "#/components/schemas/Union_6a1762611a44" + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": ["skill"], @@ -1862,11 +2245,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -1947,22 +2326,51 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/Union_f8b4c9e24aa0" + "anyOf": [ + { + "type": "string", + "pattern": "^msg_" + }, + { + "type": "null" + } + ] }, "text": { "type": "string" }, "description": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "delivery": { - "$ref": "#/components/schemas/Union_1f50b1b03235" + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Inbox.Delivery" + }, + { + "type": "null" + } + ] }, "resume": { - "$ref": "#/components/schemas/Union_6a1762611a44" + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": ["text"], @@ -1984,11 +2392,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -2048,11 +2452,7 @@ "anyOf": [ { "type": "string", - "allOf": [ - { - "pattern": "^evt_" - } - ] + "pattern": "^evt_" }, { "type": "null" @@ -2082,11 +2482,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -2167,10 +2563,25 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/Union_f8b4c9e24aa0" + "anyOf": [ + { + "type": "string", + "pattern": "^msg_" + }, + { + "type": "null" + } + ] }, "delivery": { - "$ref": "#/components/schemas/Union_1f50b1b03235" + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Inbox.Delivery" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -2191,11 +2602,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -2267,11 +2674,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -2366,14 +2769,17 @@ "properties": { "messageID": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "files": { - "$ref": "#/components/schemas/Union_6a1762611a44" + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": ["messageID"], @@ -2395,11 +2801,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -2480,11 +2882,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -2555,11 +2953,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -2641,11 +3035,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -2717,11 +3107,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -2730,11 +3116,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "required": true } @@ -2799,11 +3181,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -2812,11 +3190,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "required": true } @@ -2881,11 +3255,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -2894,11 +3264,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "required": true } @@ -2963,11 +3329,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -3046,11 +3408,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -3143,11 +3501,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -3217,11 +3571,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -3317,11 +3667,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -3344,7 +3690,15 @@ "name": "follow", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_e13209ef6bf4" + "anyOf": [ + { + "type": "string", + "enum": ["true", "false"] + }, + { + "type": "null" + } + ] }, "required": false } @@ -3487,11 +3841,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -3499,7 +3849,15 @@ "name": "continue", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_e13209ef6bf4" + "anyOf": [ + { + "type": "string", + "enum": ["true", "false"] + }, + { + "type": "null" + } + ] }, "required": false } @@ -3561,11 +3919,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -3627,11 +3981,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -3640,11 +3990,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "required": true } @@ -3720,11 +4066,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -3799,11 +4141,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -3854,11 +4192,7 @@ "properties": { "idle": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 } }, "required": ["idle"], @@ -3880,11 +4214,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -4011,7 +4341,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4087,7 +4447,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4167,7 +4557,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4236,7 +4656,14 @@ "type": "string" }, "model": { - "$ref": "#/components/schemas/Union_6a162d0a021d" + "anyOf": [ + { + "$ref": "#/components/schemas/Model.Ref" + }, + { + "type": "null" + } + ] } }, "required": ["prompt"], @@ -4257,7 +4684,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4341,7 +4798,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4424,7 +4911,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4498,7 +5015,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4568,7 +5115,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4646,7 +5223,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4698,10 +5305,24 @@ "type": "string" }, "answer": { - "$ref": "#/components/schemas/Union_636af7bc29f5" + "anyOf": [ + { + "$ref": "#/components/schemas/Form.Answer" + }, + { + "type": "null" + } + ] }, "label": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": ["key"], @@ -4730,7 +5351,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4799,10 +5450,24 @@ "type": "string" }, "answer": { - "$ref": "#/components/schemas/Union_636af7bc29f5" + "anyOf": [ + { + "$ref": "#/components/schemas/Form.Answer" + }, + { + "type": "null" + } + ] }, "label": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": ["methodID"], @@ -4839,7 +5504,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4916,7 +5611,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4978,7 +5703,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5027,7 +5782,14 @@ "type": "object", "properties": { "code": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -5055,7 +5817,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5124,7 +5916,14 @@ "type": "string" }, "label": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": ["methodID"], @@ -5161,7 +5960,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5238,7 +6067,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5284,7 +6143,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5358,7 +6247,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5434,7 +6353,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5498,7 +6447,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5562,7 +6541,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5618,7 +6627,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5689,7 +6728,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5758,7 +6827,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5849,7 +6948,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5902,7 +7031,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -6155,11 +7314,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^frm_" - } - ] + "pattern": "^frm_" }, "required": true } @@ -6246,11 +7401,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^frm_" - } - ] + "pattern": "^frm_" }, "required": true } @@ -6337,11 +7488,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^frm_" - } - ] + "pattern": "^frm_" }, "required": true } @@ -6441,11 +7588,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^frm_" - } - ] + "pattern": "^frm_" }, "required": true } @@ -6519,7 +7662,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -6698,11 +7871,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -6721,11 +7890,7 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^per" - } - ] + "pattern": "^per" }, "effect": { "$ref": "#/components/schemas/Permission.Effect" @@ -6791,11 +7956,7 @@ "anyOf": [ { "type": "string", - "allOf": [ - { - "pattern": "^per" - } - ] + "pattern": "^per" }, { "type": "null" @@ -6806,19 +7967,32 @@ "type": "string" }, "resources": { - "$ref": "#/components/schemas/Arrays_681004346c78" + "type": "array", + "items": { + "type": "string" + } }, "save": { - "$ref": "#/components/schemas/Arrays_681004346c78" + "type": "array", + "items": { + "type": "string" + } }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "source": { "$ref": "#/components/schemas/Permission.Source" }, "agent": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": ["action", "resources"], @@ -6838,11 +8012,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -6921,11 +8091,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -6934,11 +8100,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^per" - } - ] + "pattern": "^per" }, "required": true } @@ -7017,11 +8179,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -7030,11 +8188,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^per" - } - ] + "pattern": "^per" }, "required": true } @@ -7097,7 +8251,14 @@ "$ref": "#/components/schemas/Permission.Reply" }, "message": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": ["reply"], @@ -7118,7 +8279,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -7172,7 +8363,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -7253,7 +8474,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -7351,7 +8602,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -7417,7 +8698,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -7606,7 +8917,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -7670,7 +9011,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -7768,11 +9139,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^pty" - } - ] + "pattern": "^pty" }, "required": true }, @@ -7780,7 +9147,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -7852,11 +9249,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^pty" - } - ] + "pattern": "^pty" }, "required": true }, @@ -7864,7 +9257,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -7940,19 +9363,11 @@ "properties": { "rows": { "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] + "exclusiveMinimum": 0 }, "cols": { "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] + "exclusiveMinimum": 0 } }, "required": ["rows", "cols"], @@ -7975,11 +9390,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^pty" - } - ] + "pattern": "^pty" }, "required": true }, @@ -7987,7 +9398,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -8044,11 +9485,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^pty" - } - ] + "pattern": "^pty" }, "required": true }, @@ -8056,7 +9493,14 @@ "name": "x-opencode-ticket", "in": "header", "schema": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "required": false }, @@ -8064,7 +9508,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -8148,11 +9622,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^pty" - } - ] + "pattern": "^pty" }, "required": true }, @@ -8252,7 +9722,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -8316,7 +9816,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -8382,11 +9912,7 @@ }, "timeout": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "metadata": { "type": "object" @@ -8411,11 +9937,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^sh_" - } - ] + "pattern": "^sh_" }, "required": true }, @@ -8423,7 +9945,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -8495,11 +10047,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^sh_" - } - ] + "pattern": "^sh_" }, "required": true }, @@ -8507,7 +10055,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -8564,11 +10142,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^sh_" - } - ] + "pattern": "^sh_" }, "required": true }, @@ -8576,7 +10150,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -8646,11 +10250,7 @@ "properties": { "timeout": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 } }, "required": ["timeout"], @@ -8672,11 +10272,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^sh_" - } - ] + "pattern": "^sh_" }, "required": true }, @@ -8684,7 +10280,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -8695,11 +10321,7 @@ "in": "query", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?$" - } - ] + "pattern": "^[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?$" }, "required": false }, @@ -8708,11 +10330,7 @@ "in": "query", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?$" - } - ] + "pattern": "^[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?$" }, "required": false } @@ -8730,7 +10348,25 @@ "$ref": "#/components/schemas/Location.InfoEncoded" }, "data": { - "$ref": "#/components/schemas/Objects_9d53a00b1efb" + "type": "object", + "properties": { + "output": { + "type": "string" + }, + "cursor": { + "type": "integer", + "minimum": 0 + }, + "size": { + "type": "integer", + "minimum": 0 + }, + "truncated": { + "type": "boolean" + } + }, + "required": ["output", "cursor", "size", "truncated"], + "additionalProperties": false } }, "required": ["location", "data"], @@ -8783,7 +10419,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -9102,7 +10768,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -9165,7 +10861,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -9231,7 +10957,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -9363,7 +11119,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -9441,11 +11227,7 @@ "anyOf": [ { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, { "type": "null" @@ -9456,11 +11238,7 @@ "anyOf": [ { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, { "type": "null" @@ -9528,7 +11306,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -9604,7 +11412,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -9704,7 +11542,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -9790,11 +11658,7 @@ }, "steps": { "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] + "exclusiveMinimum": 0 }, "permissions": { "$ref": "#/components/schemas/Permission.Ruleset" @@ -9820,54 +11684,6 @@ "required": ["_tag", "agentID", "message"], "additionalProperties": false }, - "Arrays_042d796a7901": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Prompt.FileAttachment" - } - }, - "Arrays_3ff7cb2a474f": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PromptInput.FileAttachment" - } - }, - "Arrays_4df8e9fdc8e1": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Form.When" - } - }, - "Arrays_681004346c78": { - "type": "array", - "items": { - "type": "string" - } - }, - "Arrays_92aa8803e81f": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Prompt.SkillAttachment" - } - }, - "Arrays_c17502465996": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PromptInput.SkillAttachment" - } - }, - "Arrays_e1027de4b984": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Prompt.AgentAttachment" - } - }, - "Arrays_fa246a9267ec": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Session.Message.Info" - } - }, "Command.Info": { "type": "object", "properties": { @@ -9931,16 +11747,43 @@ "type": "object", "properties": { "model": { - "$ref": "#/components/schemas/Union_85ca62cf1a33" + "anyOf": [ + { + "type": "string", + "pattern": "^[^/#]+\\/[^#]+(?:#[^#]+)?$" + }, + { + "type": "object", + "properties": { + "providerID": { + "type": "string", + "pattern": "^[^/#]+$" + }, + "model": { + "type": "string", + "pattern": "^[^#]+$" + }, + "variant": { + "type": "string", + "pattern": "^[^#]+$" + } + }, + "required": ["providerID", "model"], + "additionalProperties": false + } + ] }, "request": { "type": "object", "properties": { "headers": { - "$ref": "#/components/schemas/Objects_3f161562db4a" + "type": "object", + "additionalProperties": { + "type": "string" + } }, "body": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" } }, "additionalProperties": false @@ -9960,19 +11803,11 @@ }, "color": { "type": "string", - "allOf": [ - { - "pattern": "^#[0-9a-fA-F]{6}$" - } - ] + "pattern": "^#[0-9a-fA-F]{6}$" }, "steps": { "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] + "exclusiveMinimum": 0 }, "disabled": { "type": "boolean" @@ -10024,7 +11859,31 @@ "type": "string" }, "model": { - "$ref": "#/components/schemas/Union_85ca62cf1a33" + "anyOf": [ + { + "type": "string", + "pattern": "^[^/#]+\\/[^#]+(?:#[^#]+)?$" + }, + { + "type": "object", + "properties": { + "providerID": { + "type": "string", + "pattern": "^[^/#]+$" + }, + "model": { + "type": "string", + "pattern": "^[^#]+$" + }, + "variant": { + "type": "string", + "pattern": "^[^#]+$" + } + }, + "required": ["providerID", "model"], + "additionalProperties": false + } + ] }, "subtask": { "type": "boolean" @@ -10117,7 +11976,31 @@ "type": "string" }, "model": { - "$ref": "#/components/schemas/Union_85ca62cf1a33" + "anyOf": [ + { + "type": "string", + "pattern": "^[^/#]+\\/[^#]+(?:#[^#]+)?$" + }, + { + "type": "object", + "properties": { + "providerID": { + "type": "string", + "pattern": "^[^/#]+$" + }, + "model": { + "type": "string", + "pattern": "^[^#]+$" + }, + "variant": { + "type": "string", + "pattern": "^[^#]+$" + } + }, + "required": ["providerID", "model"], + "additionalProperties": false + } + ] }, "default_agent": { "type": "string" @@ -10225,27 +12108,15 @@ }, "max_width": { "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] + "exclusiveMinimum": 0 }, "max_height": { "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] + "exclusiveMinimum": 0 }, "max_base64_bytes": { "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] + "exclusiveMinimum": 0 } }, "additionalProperties": false @@ -10258,19 +12129,11 @@ "properties": { "max_lines": { "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] + "exclusiveMinimum": 0 }, "max_bytes": { "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] + "exclusiveMinimum": 0 } }, "additionalProperties": false @@ -10279,7 +12142,22 @@ "type": "object", "properties": { "timeout": { - "$ref": "#/components/schemas/Objects_7b507c2fd81f" + "type": "object", + "properties": { + "startup": { + "type": "integer", + "exclusiveMinimum": 0 + }, + "catalog": { + "type": "integer", + "exclusiveMinimum": 0 + }, + "execution": { + "type": "integer", + "exclusiveMinimum": 0 + } + }, + "additionalProperties": false }, "servers": { "type": "object", @@ -10308,22 +12186,14 @@ "properties": { "tokens": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 } }, "additionalProperties": false }, "buffer": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 } }, "additionalProperties": false @@ -10410,11 +12280,7 @@ }, "subagent_depth": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "policies": { "type": "array", @@ -10532,13 +12398,16 @@ "type": "string" }, "settings": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "headers": { - "$ref": "#/components/schemas/Objects_3f161562db4a" + "type": "object", + "additionalProperties": { + "type": "string" + } }, "body": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "capabilities": { "$ref": "#/components/schemas/Model.Capabilities" @@ -10552,13 +12421,16 @@ "type": "string" }, "settings": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "headers": { - "$ref": "#/components/schemas/Objects_3f161562db4a" + "type": "object", + "additionalProperties": { + "type": "string" + } }, "body": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" } }, "required": ["id"], @@ -10628,13 +12500,16 @@ "type": "string" }, "settings": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "headers": { - "$ref": "#/components/schemas/Objects_3f161562db4a" + "type": "object", + "additionalProperties": { + "type": "string" + } }, "body": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "models": { "type": "object", @@ -10724,7 +12599,14 @@ "type": "string" }, "resource": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": ["_tag", "message"], @@ -10782,19 +12664,11 @@ }, "additions": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "deletions": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "status": { "type": "string", @@ -10854,7 +12728,10 @@ "type": "boolean" }, "when": { - "$ref": "#/components/schemas/Arrays_4df8e9fdc8e1" + "type": "array", + "items": { + "$ref": "#/components/schemas/Form.When" + } }, "type": { "type": "string", @@ -10874,11 +12751,7 @@ "anyOf": [ { "type": "string", - "allOf": [ - { - "pattern": "^frm_" - } - ] + "pattern": "^frm_" }, { "type": "null" @@ -10984,11 +12857,7 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^frm_" - } - ] + "pattern": "^frm_" }, "sessionID": { "type": "string" @@ -11022,7 +12891,10 @@ "type": "boolean" }, "when": { - "$ref": "#/components/schemas/Arrays_4df8e9fdc8e1" + "type": "array", + "items": { + "$ref": "#/components/schemas/Form.When" + } }, "type": { "type": "string", @@ -11034,7 +12906,8 @@ "type": "number" }, { - "$ref": "#/components/schemas/Union_97d8d2942510" + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] } ] }, @@ -11044,7 +12917,8 @@ "type": "number" }, { - "$ref": "#/components/schemas/Union_97d8d2942510" + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] } ] }, @@ -11054,7 +12928,8 @@ "type": "number" }, { - "$ref": "#/components/schemas/Union_97d8d2942510" + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] } ] } @@ -11081,7 +12956,10 @@ "type": "boolean" }, "when": { - "$ref": "#/components/schemas/Arrays_4df8e9fdc8e1" + "type": "array", + "items": { + "$ref": "#/components/schemas/Form.When" + } }, "type": { "type": "string", @@ -11095,19 +12973,11 @@ }, "minItems": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "maxItems": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "custom": { "type": "boolean" @@ -11138,7 +13008,10 @@ "type": "boolean" }, "when": { - "$ref": "#/components/schemas/Arrays_4df8e9fdc8e1" + "type": "array", + "items": { + "$ref": "#/components/schemas/Form.When" + } }, "type": { "type": "string", @@ -11150,7 +13023,8 @@ "type": "number" }, { - "$ref": "#/components/schemas/Union_97d8d2942510" + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] } ] }, @@ -11160,7 +13034,8 @@ "type": "number" }, { - "$ref": "#/components/schemas/Union_97d8d2942510" + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] } ] }, @@ -11170,7 +13045,8 @@ "type": "number" }, { - "$ref": "#/components/schemas/Union_97d8d2942510" + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] } ] } @@ -11260,7 +13136,10 @@ "type": "boolean" }, "when": { - "$ref": "#/components/schemas/Arrays_4df8e9fdc8e1" + "type": "array", + "items": { + "$ref": "#/components/schemas/Form.When" + } }, "type": { "type": "string", @@ -11272,19 +13151,11 @@ }, "minLength": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "maxLength": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "pattern": { "type": "string" @@ -11314,7 +13185,15 @@ "type": "string" }, { - "$ref": "#/components/schemas/Union_00be4ed53f19" + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] }, { "type": "boolean" @@ -11343,7 +13222,15 @@ "type": "string" }, { - "$ref": "#/components/schemas/Union_00be4ed53f19" + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] }, { "type": "boolean" @@ -11437,12 +13324,8 @@ }, "InstructionEntry.Key": { "type": "string", - "allOf": [ - { - "pattern": "^[a-z0-9][a-z0-9._-]*$", - "description": "Instruction entry key (lowercase alphanumerics plus . _ -)" - } - ] + "pattern": "^[a-z0-9][a-z0-9._-]*$", + "description": "Instruction entry key (lowercase alphanumerics plus . _ -)" }, "InstructionEntryValueTooLargeErrorEncoded": { "type": "object", @@ -11481,7 +13364,33 @@ "enum": ["auto", "code"] }, "time": { - "$ref": "#/components/schemas/Objects_03af97aacac9" + "type": "object", + "properties": { + "created": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + }, + "expires": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + } + }, + "required": ["created", "expires"], + "additionalProperties": false } }, "required": ["attemptID", "url", "instructions", "mode", "time"], @@ -11497,7 +13406,33 @@ "enum": ["pending"] }, "time": { - "$ref": "#/components/schemas/Objects_03af97aacac9" + "type": "object", + "properties": { + "created": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + }, + "expires": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + } + }, + "required": ["created", "expires"], + "additionalProperties": false } }, "required": ["status", "time"], @@ -11511,7 +13446,33 @@ "enum": ["complete"] }, "time": { - "$ref": "#/components/schemas/Objects_03af97aacac9" + "type": "object", + "properties": { + "created": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + }, + "expires": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + } + }, + "required": ["created", "expires"], + "additionalProperties": false } }, "required": ["status", "time"], @@ -11528,7 +13489,33 @@ "type": "string" }, "time": { - "$ref": "#/components/schemas/Objects_03af97aacac9" + "type": "object", + "properties": { + "created": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + }, + "expires": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + } + }, + "required": ["created", "expires"], + "additionalProperties": false } }, "required": ["status", "message", "time"], @@ -11542,7 +13529,33 @@ "enum": ["expired"] }, "time": { - "$ref": "#/components/schemas/Objects_03af97aacac9" + "type": "object", + "properties": { + "created": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + }, + "expires": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + } + }, + "required": ["created", "expires"], + "additionalProperties": false } }, "required": ["status", "time"], @@ -11557,7 +13570,33 @@ "type": "string" }, "time": { - "$ref": "#/components/schemas/Objects_03af97aacac9" + "type": "object", + "properties": { + "created": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + }, + "expires": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + } + }, + "required": ["created", "expires"], + "additionalProperties": false } }, "required": ["attemptID", "time"], @@ -11576,7 +13615,33 @@ "type": "string" }, "time": { - "$ref": "#/components/schemas/Objects_03af97aacac9" + "type": "object", + "properties": { + "created": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + }, + "expires": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + } + }, + "required": ["created", "expires"], + "additionalProperties": false } }, "required": ["status", "time"], @@ -11590,7 +13655,33 @@ "enum": ["complete"] }, "time": { - "$ref": "#/components/schemas/Objects_03af97aacac9" + "type": "object", + "properties": { + "created": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + }, + "expires": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + } + }, + "required": ["created", "expires"], + "additionalProperties": false } }, "required": ["status", "time"], @@ -11607,7 +13698,33 @@ "type": "string" }, "time": { - "$ref": "#/components/schemas/Objects_03af97aacac9" + "type": "object", + "properties": { + "created": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + }, + "expires": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + } + }, + "required": ["created", "expires"], + "additionalProperties": false } }, "required": ["status", "message", "time"], @@ -11621,7 +13738,33 @@ "enum": ["expired"] }, "time": { - "$ref": "#/components/schemas/Objects_03af97aacac9" + "type": "object", + "properties": { + "created": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + }, + "expires": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + } + }, + "required": ["created", "expires"], + "additionalProperties": false } }, "required": ["status", "time"], @@ -11772,10 +13915,24 @@ "type": "string" }, "kind": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "field": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": ["_tag", "message"], @@ -11789,11 +13946,7 @@ }, "workspaceID": { "type": "string", - "allOf": [ - { - "pattern": "^wrk" - } - ] + "pattern": "^wrk" }, "project": { "type": "object", @@ -11823,11 +13976,7 @@ }, "workspaceID": { "type": "string", - "allOf": [ - { - "pattern": "^wrk" - } - ] + "pattern": "^wrk" } }, "required": ["directory"], @@ -11862,7 +14011,22 @@ "type": "boolean" }, "timeout": { - "$ref": "#/components/schemas/Objects_7b507c2fd81f" + "type": "object", + "properties": { + "startup": { + "type": "integer", + "exclusiveMinimum": 0 + }, + "catalog": { + "type": "integer", + "exclusiveMinimum": 0 + }, + "execution": { + "type": "integer", + "exclusiveMinimum": 0 + } + }, + "additionalProperties": false } }, "required": ["type", "command"], @@ -11882,12 +14046,8 @@ }, "callback_port": { "type": "integer", - "allOf": [ - { - "minimum": 1, - "maximum": 65535 - } - ] + "minimum": 1, + "maximum": 65535 }, "redirect_uri": { "type": "string" @@ -11929,7 +14089,22 @@ "type": "boolean" }, "timeout": { - "$ref": "#/components/schemas/Objects_7b507c2fd81f" + "type": "object", + "properties": { + "startup": { + "type": "integer", + "exclusiveMinimum": 0 + }, + "catalog": { + "type": "integer", + "exclusiveMinimum": 0 + }, + "execution": { + "type": "integer", + "exclusiveMinimum": 0 + } + }, + "additionalProperties": false } }, "required": ["type", "url"], @@ -12230,13 +14405,16 @@ "type": "string" }, "settings": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "headers": { - "$ref": "#/components/schemas/Objects_3f161562db4a" + "type": "object", + "additionalProperties": { + "type": "string" + } }, "body": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "capabilities": { "$ref": "#/components/schemas/Model.Capabilities" @@ -12340,13 +14518,16 @@ "type": "string" }, "settings": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "headers": { - "$ref": "#/components/schemas/Objects_3f161562db4a" + "type": "object", + "additionalProperties": { + "type": "string" + } }, "body": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" } }, "required": ["id"], @@ -12358,97 +14539,6 @@ "Money.USDPerMillionTokens": { "type": "number" }, - "Objects_03af97aacac9": { - "type": "object", - "properties": { - "created": { - "$ref": "#/components/schemas/Union_00be4ed53f19" - }, - "expires": { - "$ref": "#/components/schemas/Union_00be4ed53f19" - } - }, - "required": ["created", "expires"], - "additionalProperties": false - }, - "Objects_3f161562db4a": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "Objects_7b507c2fd81f": { - "type": "object", - "properties": { - "startup": { - "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] - }, - "catalog": { - "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] - }, - "execution": { - "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] - } - }, - "additionalProperties": false - }, - "Objects_9d53a00b1efb": { - "type": "object", - "properties": { - "output": { - "type": "string" - }, - "cursor": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "size": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "truncated": { - "type": "boolean" - } - }, - "required": ["output", "cursor", "size", "truncated"], - "additionalProperties": false - }, - "Objects_a2c799262a3c": { - "type": "object" - }, - "Objects_d7bbfd8ec2f6": { - "type": "object", - "properties": { - "created": { - "type": "number" - } - }, - "required": ["created"], - "additionalProperties": false - }, "Permission.Effect": { "type": "string", "enum": ["allow", "deny", "ask"] @@ -12462,31 +14552,29 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^per" - } - ] + "pattern": "^per" }, "sessionID": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "action": { "type": "string" }, "resources": { - "$ref": "#/components/schemas/Arrays_681004346c78" + "type": "array", + "items": { + "type": "string" + } }, "save": { - "$ref": "#/components/schemas/Arrays_681004346c78" + "type": "array", + "items": { + "type": "string" + } }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "source": { "$ref": "#/components/schemas/Permission.Source" @@ -12755,27 +14843,15 @@ "properties": { "created": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "updated": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "initialized": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 } }, "required": ["created", "updated"], @@ -12800,11 +14876,7 @@ }, "Prompt.Base64": { "type": "string", - "allOf": [ - { - "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" - } - ] + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" }, "Prompt.FileAttachment": { "type": "object", @@ -12944,13 +15016,16 @@ "type": "string" }, "settings": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "headers": { - "$ref": "#/components/schemas/Objects_3f161562db4a" + "type": "object", + "additionalProperties": { + "type": "string" + } }, "body": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" } }, "required": ["id", "name", "activation", "package"], @@ -13000,11 +15075,7 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^pty" - } - ] + "pattern": "^pty" }, "title": { "type": "string" @@ -13027,19 +15098,11 @@ }, "pid": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "exitCode": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 } }, "required": ["id", "title", "command", "args", "cwd", "status", "pid"], @@ -13070,11 +15133,7 @@ }, "expires_in": { "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] + "exclusiveMinimum": 0 } }, "required": ["ticket", "expires_in"], @@ -13167,11 +15226,7 @@ }, "pid": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 } }, "required": ["healthy", "version", "pid"], @@ -13188,7 +15243,14 @@ "type": "string" }, "service": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": ["_tag", "message"], @@ -13205,11 +15267,7 @@ }, "messageID": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" } }, "required": ["type", "messageID"], @@ -13224,11 +15282,7 @@ }, "messageID": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" } }, "required": ["type", "messageID"], @@ -13247,11 +15301,7 @@ }, "messageID": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" } }, "required": ["type", "messageID"], @@ -13275,19 +15325,11 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "sessionID": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "timeCreated": { "type": "number" @@ -13341,19 +15383,11 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "sessionID": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "timeCreated": { "type": "number" @@ -13393,19 +15427,11 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "sessionID": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "timeCreated": { "type": "number" @@ -13445,19 +15471,11 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "sessionID": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "timeCreated": { "type": "number" @@ -13483,16 +15501,25 @@ "type": "string" }, "files": { - "$ref": "#/components/schemas/Arrays_042d796a7901" + "type": "array", + "items": { + "$ref": "#/components/schemas/Prompt.FileAttachment" + } }, "agents": { - "$ref": "#/components/schemas/Arrays_e1027de4b984" + "type": "array", + "items": { + "$ref": "#/components/schemas/Prompt.AgentAttachment" + } }, "skills": { - "$ref": "#/components/schemas/Arrays_92aa8803e81f" + "type": "array", + "items": { + "$ref": "#/components/schemas/Prompt.SkillAttachment" + } }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" } }, "required": ["text"], @@ -13503,30 +15530,18 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "parentID": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "fork": { "type": "object", "properties": { "sessionID": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "boundary": { "$ref": "#/components/schemas/Session.ForkBoundary" @@ -13597,17 +15612,20 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { - "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + "type": "object", + "properties": { + "created": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false }, "type": { "type": "string", @@ -13628,14 +15646,10 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { "type": "object", @@ -13755,11 +15769,7 @@ "properties": { "attempt": { "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] + "exclusiveMinimum": 0 }, "at": { "type": "number" @@ -13868,17 +15878,20 @@ }, "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { - "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + "type": "object", + "properties": { + "created": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false }, "status": { "type": "string", @@ -13907,17 +15920,20 @@ }, "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { - "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + "type": "object", + "properties": { + "created": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false }, "status": { "type": "string", @@ -13943,17 +15959,20 @@ }, "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { - "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + "type": "object", + "properties": { + "created": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false }, "status": { "type": "string", @@ -14012,17 +16031,20 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { - "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + "type": "object", + "properties": { + "created": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false }, "type": { "type": "string", @@ -14062,17 +16084,20 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { - "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + "type": "object", + "properties": { + "created": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false }, "type": { "type": "string", @@ -14108,14 +16133,10 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { "type": "object", @@ -14136,17 +16157,14 @@ }, "shellID": { "type": "string", - "allOf": [ - { - "pattern": "^sh_" - } - ] + "pattern": "^sh_" }, "command": { "type": "string" }, "status": { - "$ref": "#/components/schemas/Union_b6d68a8b3572" + "type": "string", + "enum": ["running", "exited", "timeout", "killed"] }, "exit": { "anyOf": [ @@ -14154,12 +16172,31 @@ "type": "number" }, { - "$ref": "#/components/schemas/Union_97d8d2942510" + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] } ] }, "output": { - "$ref": "#/components/schemas/Objects_9d53a00b1efb" + "type": "object", + "properties": { + "output": { + "type": "string" + }, + "cursor": { + "type": "integer", + "minimum": 0 + }, + "size": { + "type": "integer", + "minimum": 0 + }, + "truncated": { + "type": "boolean" + } + }, + "required": ["output", "cursor", "size", "truncated"], + "additionalProperties": false } }, "required": ["id", "time", "type", "shellID", "command", "status"], @@ -14170,17 +16207,20 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { - "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + "type": "object", + "properties": { + "created": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false }, "type": { "type": "string", @@ -14204,17 +16244,20 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { - "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + "type": "object", + "properties": { + "created": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false }, "text": { "type": "string" @@ -14235,17 +16278,20 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { - "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + "type": "object", + "properties": { + "created": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false }, "type": { "type": "string", @@ -14358,29 +16404,41 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { - "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + "type": "object", + "properties": { + "created": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false }, "text": { "type": "string" }, "files": { - "$ref": "#/components/schemas/Arrays_042d796a7901" + "type": "array", + "items": { + "$ref": "#/components/schemas/Prompt.FileAttachment" + } }, "agents": { - "$ref": "#/components/schemas/Arrays_e1027de4b984" + "type": "array", + "items": { + "$ref": "#/components/schemas/Prompt.AgentAttachment" + } }, "skills": { - "$ref": "#/components/schemas/Arrays_92aa8803e81f" + "type": "array", + "items": { + "$ref": "#/components/schemas/Prompt.SkillAttachment" + } }, "type": { "type": "string", @@ -14395,11 +16453,7 @@ "properties": { "messageID": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "partID": { "type": "string" @@ -14428,12 +16482,8 @@ }, "status": { "type": "integer", - "allOf": [ - { - "minimum": 100, - "maximum": 599 - } - ] + "minimum": 100, + "maximum": 599 } }, "required": ["type", "message"], @@ -14501,10 +16551,24 @@ "type": "object", "properties": { "previous": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "next": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -14530,6 +16594,174 @@ "required": ["_tag", "sessionID", "message"], "additionalProperties": false }, + "SessionStats.Activity": { + "type": "object", + "properties": { + "date": { + "type": "string" + }, + "steps": { + "type": "integer", + "minimum": 0 + } + }, + "required": ["date", "steps"], + "additionalProperties": false + }, + "SessionStats.Info": { + "type": "object", + "properties": { + "range": { + "type": "object", + "properties": { + "from": { + "type": "number" + }, + "to": { + "type": "number" + } + }, + "required": ["from", "to"], + "additionalProperties": false + }, + "sessions": { + "type": "integer", + "minimum": 0 + }, + "subagents": { + "type": "integer", + "minimum": 0 + }, + "prompts": { + "type": "integer", + "minimum": 0 + }, + "steps": { + "type": "integer", + "minimum": 0 + }, + "tokens": { + "$ref": "#/components/schemas/TokenUsage.Info" + }, + "cost": { + "$ref": "#/components/schemas/Money.USD" + }, + "tools": { + "type": "object", + "properties": { + "calls": { + "type": "integer", + "minimum": 0 + }, + "succeeded": { + "type": "integer", + "minimum": 0 + }, + "failed": { + "type": "integer", + "minimum": 0 + }, + "unfinished": { + "type": "integer", + "minimum": 0 + } + }, + "required": ["calls", "succeeded", "failed", "unfinished"], + "additionalProperties": false + }, + "activeDays": { + "type": "integer", + "minimum": 0 + }, + "streak": { + "type": "integer", + "minimum": 0 + }, + "activity": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SessionStats.Activity" + } + }, + "models": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SessionStats.ModelUsage" + } + }, + "toolUsage": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SessionStats.ToolUsage" + } + } + }, + "required": [ + "range", + "sessions", + "subagents", + "prompts", + "steps", + "tokens", + "cost", + "tools", + "activeDays", + "streak", + "activity", + "models", + "toolUsage" + ], + "additionalProperties": false + }, + "SessionStats.ModelUsage": { + "type": "object", + "properties": { + "model": { + "$ref": "#/components/schemas/Model.Ref" + }, + "steps": { + "type": "integer", + "minimum": 0 + }, + "tokens": { + "$ref": "#/components/schemas/TokenUsage.Info" + }, + "cost": { + "$ref": "#/components/schemas/Money.USD" + } + }, + "required": ["model", "steps", "tokens", "cost"], + "additionalProperties": false + }, + "SessionStats.ToolUsage": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "calls": { + "type": "integer", + "minimum": 0 + }, + "succeeded": { + "type": "integer", + "minimum": 0 + }, + "failed": { + "type": "integer", + "minimum": 0 + }, + "unfinished": { + "type": "integer", + "minimum": 0 + }, + "durationP50": { + "type": "number" + } + }, + "required": ["name", "calls", "succeeded", "failed", "unfinished"], + "additionalProperties": false + }, "SessionTransfer.Data": { "type": "object", "properties": { @@ -14537,7 +16769,10 @@ "$ref": "#/components/schemas/Session.Info" }, "messages": { - "$ref": "#/components/schemas/Arrays_fa246a9267ec" + "type": "array", + "items": { + "$ref": "#/components/schemas/Session.Message.Info" + } } }, "required": ["info", "messages"], @@ -14587,14 +16822,11 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^sh_" - } - ] + "pattern": "^sh_" }, "status": { - "$ref": "#/components/schemas/Union_b6d68a8b3572" + "type": "string", + "enum": ["running", "exited", "timeout", "killed"] }, "command": { "type": "string" @@ -14610,11 +16842,7 @@ }, "pid": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "exit": { "type": "number" @@ -14754,7 +16982,14 @@ "type": "string" }, "name": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": ["type", "uri", "mime"], @@ -14788,172 +17023,6 @@ "required": ["_tag", "message"], "additionalProperties": false }, - "Union_00be4ed53f19": { - "anyOf": [ - { - "type": "number" - }, - { - "$ref": "#/components/schemas/Union_97d8d2942510" - } - ] - }, - "Union_1f50b1b03235": { - "anyOf": [ - { - "$ref": "#/components/schemas/Session.Inbox.Delivery" - }, - { - "type": "null" - } - ] - }, - "Union_5ee94d3ca88d": { - "anyOf": [ - { - "$ref": "#/components/schemas/Location.Ref" - }, - { - "type": "null" - } - ] - }, - "Union_636af7bc29f5": { - "anyOf": [ - { - "$ref": "#/components/schemas/Form.Answer" - }, - { - "type": "null" - } - ] - }, - "Union_6a162d0a021d": { - "anyOf": [ - { - "$ref": "#/components/schemas/Model.Ref" - }, - { - "type": "null" - } - ] - }, - "Union_6a1762611a44": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "Union_85ca62cf1a33": { - "anyOf": [ - { - "type": "string", - "allOf": [ - { - "pattern": "^[^/#]+\\/[^#]+(?:#[^#]+)?$" - } - ] - }, - { - "type": "object", - "properties": { - "providerID": { - "type": "string", - "allOf": [ - { - "pattern": "^[^/#]+$" - } - ] - }, - "model": { - "type": "string", - "allOf": [ - { - "pattern": "^[^#]+$" - } - ] - }, - "variant": { - "type": "string", - "allOf": [ - { - "pattern": "^[^#]+$" - } - ] - } - }, - "required": ["providerID", "model"], - "additionalProperties": false - } - ] - }, - "Union_97d8d2942510": { - "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] - }, - "Union_b6d68a8b3572": { - "type": "string", - "enum": ["running", "exited", "timeout", "killed"] - }, - "Union_e13209ef6bf4": { - "anyOf": [ - { - "type": "string", - "enum": ["true", "false"] - }, - { - "type": "null" - } - ] - }, - "Union_f090cb615c84": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "Union_f8b4c9e24aa0": { - "anyOf": [ - { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - { - "type": "null" - } - ] - }, - "Union_ffefb7e3c81d": { - "anyOf": [ - { - "type": "object", - "properties": { - "directory": { - "$ref": "#/components/schemas/Union_f090cb615c84" - }, - "workspace": { - "$ref": "#/components/schemas/Union_f090cb615c84" - } - }, - "additionalProperties": false - }, - { - "type": "null" - } - ] - }, "UnknownErrorEncoded": { "type": "object", "properties": { @@ -14965,7 +17034,14 @@ "type": "string" }, "ref": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": ["_tag", "message"], @@ -14995,19 +17071,11 @@ }, "additions": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "deletions": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "status": { "type": "string", @@ -15128,7 +17196,14 @@ "type": "string" }, "forceRequired": { - "$ref": "#/components/schemas/Union_6a1762611a44" + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": ["message"], diff --git a/packages/protocol/src/groups/session.ts b/packages/protocol/src/groups/session.ts index b73f290c4cc..e5291fae6a6 100644 --- a/packages/protocol/src/groups/session.ts +++ b/packages/protocol/src/groups/session.ts @@ -3,6 +3,7 @@ import { SessionTransfer } from "@opencode-ai/schema/session-transfer" import { SessionInbox } from "@opencode-ai/schema/session-inbox" import { PromptInput } from "@opencode-ai/schema/prompt-input" import { Session } from "@opencode-ai/schema/session" +import { SessionStats } from "@opencode-ai/schema/session-stats" import { InstructionEntry } from "@opencode-ai/schema/instruction-entry" import { Project } from "@opencode-ai/schema/project" import { AbsolutePath, NonNegativeInt, PositiveInt, RelativePath, statics } from "@opencode-ai/schema/schema" @@ -146,6 +147,27 @@ export const makeSessionGroup = (sessionLo }), ), ) + .add( + HttpApiEndpoint.get("session.stats", "/api/session/stats", { + query: Schema.Struct({ + from: Schema.NumberFromString.pipe(Schema.optional), + to: Schema.NumberFromString.pipe(Schema.optional), + project: Project.ID.pipe(Schema.optional), + timezone: Schema.String.pipe(Schema.optional), + models: BooleanFromString.pipe(Schema.optional), + tools: BooleanFromString.pipe(Schema.optional), + toolSummary: BooleanFromString.pipe(Schema.optional), + }), + success: Schema.Struct({ data: SessionStats.Info }), + error: InvalidRequestError, + }).annotateMerge( + OpenApi.annotations({ + identifier: "v2.session.stats", + summary: "Get session statistics", + description: "Aggregate local session activity, usage, and tool reliability for a time range.", + }), + ), + ) .add( HttpApiEndpoint.post("session.create", "/api/session", { payload: Schema.Struct({ diff --git a/packages/schema/src/index.ts b/packages/schema/src/index.ts index ec554688ac5..767687e747e 100644 --- a/packages/schema/src/index.ts +++ b/packages/schema/src/index.ts @@ -24,6 +24,7 @@ export { Vcs } from "./vcs.js" export { SessionInbox } from "./session-inbox.js" export { SessionError } from "./session-error.js" export { SessionMessage } from "./session-message.js" +export { SessionStats } from "./session-stats.js" export { SessionTransfer } from "./session-transfer.js" export { Snapshot } from "./snapshot.js" export { Shell } from "./shell.js" diff --git a/packages/schema/src/session-stats.ts b/packages/schema/src/session-stats.ts new file mode 100644 index 00000000000..532e59d78c3 --- /dev/null +++ b/packages/schema/src/session-stats.ts @@ -0,0 +1,56 @@ +export * as SessionStats from "./session-stats.js" + +import { Schema } from "effect" +import { Model } from "./model.js" +import { Money } from "./money.js" +import { DateTimeUtcFromMillis, NonNegativeInt, optional } from "./schema.js" +import { TokenUsage } from "./token-usage.js" + +export const Activity = Schema.Struct({ + date: Schema.String, + steps: NonNegativeInt, +}).annotate({ identifier: "SessionStats.Activity" }) +export type Activity = typeof Activity.Type + +export const ModelUsage = Schema.Struct({ + model: Model.Ref, + steps: NonNegativeInt, + tokens: TokenUsage.Info, + cost: Money.USD, +}).annotate({ identifier: "SessionStats.ModelUsage" }) +export type ModelUsage = typeof ModelUsage.Type + +export const ToolUsage = Schema.Struct({ + name: Schema.String, + calls: NonNegativeInt, + succeeded: NonNegativeInt, + failed: NonNegativeInt, + unfinished: NonNegativeInt, + durationP50: Schema.Finite.pipe(optional), +}).annotate({ identifier: "SessionStats.ToolUsage" }) +export type ToolUsage = typeof ToolUsage.Type + +export const Info = Schema.Struct({ + range: Schema.Struct({ + from: DateTimeUtcFromMillis, + to: DateTimeUtcFromMillis, + }), + sessions: NonNegativeInt, + subagents: NonNegativeInt, + prompts: NonNegativeInt, + steps: NonNegativeInt, + tokens: TokenUsage.Info, + cost: Money.USD, + tools: Schema.Struct({ + calls: NonNegativeInt, + succeeded: NonNegativeInt, + failed: NonNegativeInt, + unfinished: NonNegativeInt, + }), + activeDays: NonNegativeInt, + streak: NonNegativeInt, + activity: Schema.Array(Activity), + models: Schema.Array(ModelUsage), + toolUsage: Schema.Array(ToolUsage), +}).annotate({ identifier: "SessionStats.Info" }) +export type Info = typeof Info.Type diff --git a/packages/server/src/handlers/session.ts b/packages/server/src/handlers/session.ts index ebe21e25c72..49fb9f932a5 100644 --- a/packages/server/src/handlers/session.ts +++ b/packages/server/src/handlers/session.ts @@ -1,4 +1,5 @@ import { Session } from "@opencode-ai/core/session" +import { SessionStats } from "@opencode-ai/core/session/stats" import { SessionTransfer } from "@opencode-ai/core/session/transfer" import { InstructionEntry } from "@opencode-ai/core/session/instruction-entry" import { DateTime, Effect, Stream } from "effect" @@ -86,6 +87,29 @@ export const SessionHandler = HttpApiBuilder.group(Api, "server.session", (handl } }), ) + .handle( + "session.stats", + Effect.fn(function* (ctx) { + if (ctx.query.from !== undefined && ctx.query.to !== undefined && ctx.query.from >= ctx.query.to) + return yield* new InvalidRequestError({ message: "Stats range must end after it starts" }) + const timezone = ctx.query.timezone ?? "UTC" + yield* Effect.try({ + try: () => new Intl.DateTimeFormat("en-US", { timeZone: timezone }), + catch: () => new InvalidRequestError({ message: `Invalid time zone: ${timezone}` }), + }) + return { + data: yield* SessionStats.get({ + from: ctx.query.from, + to: ctx.query.to, + projectID: ctx.query.project, + timezone, + models: ctx.query.models, + tools: ctx.query.tools, + toolSummary: ctx.query.toolSummary, + }), + } + }), + ) .handle( "session.create", Effect.fn(function* (ctx) { diff --git a/packages/www/openapi.json b/packages/www/openapi.json index 2a0a4ab9435..71c7593f808 100644 --- a/packages/www/openapi.json +++ b/packages/www/openapi.json @@ -109,7 +109,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -162,7 +192,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -236,7 +296,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -309,7 +399,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -378,11 +498,7 @@ "anyOf": [ { "type": "string", - "allOf": [ - { - "pattern": "^wrk" - } - ] + "pattern": "^wrk" }, { "type": "null" @@ -428,7 +544,14 @@ "name": "search", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "required": false }, @@ -441,11 +564,7 @@ "anyOf": [ { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, { "type": "string", @@ -625,11 +744,7 @@ "anyOf": [ { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, { "type": "null" @@ -637,16 +752,44 @@ ] }, "title": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "agent": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "model": { - "$ref": "#/components/schemas/Union_6a162d0a021d" + "anyOf": [ + { + "$ref": "#/components/schemas/Model.Ref" + }, + { + "type": "null" + } + ] }, "location": { - "$ref": "#/components/schemas/Union_5ee94d3ca88d" + "anyOf": [ + { + "$ref": "#/components/schemas/Location.Ref" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -657,6 +800,171 @@ } } }, + "/api/session/stats": { + "get": { + "tags": ["session"], + "operationId": "v2.session.stats", + "parameters": [ + { + "name": "from", + "in": "query", + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "required": false + }, + { + "name": "to", + "in": "query", + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "required": false + }, + { + "name": "project", + "in": "query", + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "required": false + }, + { + "name": "timezone", + "in": "query", + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "required": false + }, + { + "name": "models", + "in": "query", + "schema": { + "anyOf": [ + { + "type": "string", + "enum": ["true", "false"] + }, + { + "type": "null" + } + ] + }, + "required": false + }, + { + "name": "tools", + "in": "query", + "schema": { + "anyOf": [ + { + "type": "string", + "enum": ["true", "false"] + }, + { + "type": "null" + } + ] + }, + "required": false + }, + { + "name": "toolSummary", + "in": "query", + "schema": { + "anyOf": [ + { + "type": "string", + "enum": ["true", "false"] + }, + { + "type": "null" + } + ] + }, + "required": false + } + ], + "security": [], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/SessionStats.Info" + } + }, + "required": ["data"], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "InvalidRequestError", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/InvalidRequestErrorEncoded" + }, + { + "$ref": "#/components/schemas/InvalidRequestErrorEncoded" + } + ] + } + } + } + }, + "401": { + "description": "UnauthorizedError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorEncoded" + } + } + } + } + }, + "description": "Aggregate local session activity, usage, and tool reliability for a time range.", + "summary": "Get session statistics" + } + }, "/api/session/import": { "post": { "tags": ["session"], @@ -724,10 +1032,20 @@ "$ref": "#/components/schemas/Session.Info" }, "messages": { - "$ref": "#/components/schemas/Arrays_fa246a9267ec" + "type": "array", + "items": { + "$ref": "#/components/schemas/Session.Message.Info" + } }, "location": { - "$ref": "#/components/schemas/Union_5ee94d3ca88d" + "anyOf": [ + { + "$ref": "#/components/schemas/Location.Ref" + }, + { + "type": "null" + } + ] } }, "required": ["info", "messages"], @@ -749,11 +1067,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -761,7 +1075,15 @@ "name": "sanitize", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_e13209ef6bf4" + "anyOf": [ + { + "type": "string", + "enum": ["true", "false"] + }, + { + "type": "null" + } + ] }, "required": false } @@ -894,11 +1216,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -965,11 +1283,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -1031,11 +1345,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -1138,11 +1448,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -1221,11 +1527,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -1304,11 +1606,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -1387,11 +1685,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -1452,14 +1746,17 @@ }, "workspaceID": { "type": "string", - "allOf": [ - { - "pattern": "^wrk" - } - ] + "pattern": "^wrk" }, "delivery": { - "$ref": "#/components/schemas/Union_1f50b1b03235" + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Inbox.Delivery" + }, + { + "type": "null" + } + ] } }, "required": ["directory"], @@ -1481,11 +1778,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -1573,28 +1866,59 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/Union_f8b4c9e24aa0" + "anyOf": [ + { + "type": "string", + "pattern": "^msg_" + }, + { + "type": "null" + } + ] }, "text": { "type": "string" }, "files": { - "$ref": "#/components/schemas/Arrays_3ff7cb2a474f" + "type": "array", + "items": { + "$ref": "#/components/schemas/PromptInput.FileAttachment" + } }, "agents": { - "$ref": "#/components/schemas/Arrays_e1027de4b984" + "type": "array", + "items": { + "$ref": "#/components/schemas/Prompt.AgentAttachment" + } }, "skills": { - "$ref": "#/components/schemas/Arrays_c17502465996" + "type": "array", + "items": { + "$ref": "#/components/schemas/PromptInput.SkillAttachment" + } }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "delivery": { - "$ref": "#/components/schemas/Union_1f50b1b03235" + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Inbox.Delivery" + }, + { + "type": "null" + } + ] }, "resume": { - "$ref": "#/components/schemas/Union_6a1762611a44" + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": ["text"], @@ -1616,11 +1940,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -1721,34 +2041,86 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/Union_f8b4c9e24aa0" + "anyOf": [ + { + "type": "string", + "pattern": "^msg_" + }, + { + "type": "null" + } + ] }, "command": { "type": "string" }, "arguments": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "agent": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "model": { - "$ref": "#/components/schemas/Union_6a162d0a021d" + "anyOf": [ + { + "$ref": "#/components/schemas/Model.Ref" + }, + { + "type": "null" + } + ] }, "files": { - "$ref": "#/components/schemas/Arrays_3ff7cb2a474f" + "type": "array", + "items": { + "$ref": "#/components/schemas/PromptInput.FileAttachment" + } }, "agents": { - "$ref": "#/components/schemas/Arrays_e1027de4b984" + "type": "array", + "items": { + "$ref": "#/components/schemas/Prompt.AgentAttachment" + } }, "skills": { - "$ref": "#/components/schemas/Arrays_c17502465996" + "type": "array", + "items": { + "$ref": "#/components/schemas/PromptInput.SkillAttachment" + } }, "delivery": { - "$ref": "#/components/schemas/Union_1f50b1b03235" + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Inbox.Delivery" + }, + { + "type": "null" + } + ] }, "resume": { - "$ref": "#/components/schemas/Union_6a1762611a44" + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": ["command"], @@ -1770,11 +2142,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -1834,13 +2202,28 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/Union_f8b4c9e24aa0" + "anyOf": [ + { + "type": "string", + "pattern": "^msg_" + }, + { + "type": "null" + } + ] }, "skill": { "type": "string" }, "resume": { - "$ref": "#/components/schemas/Union_6a1762611a44" + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": ["skill"], @@ -1862,11 +2245,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -1947,22 +2326,51 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/Union_f8b4c9e24aa0" + "anyOf": [ + { + "type": "string", + "pattern": "^msg_" + }, + { + "type": "null" + } + ] }, "text": { "type": "string" }, "description": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "delivery": { - "$ref": "#/components/schemas/Union_1f50b1b03235" + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Inbox.Delivery" + }, + { + "type": "null" + } + ] }, "resume": { - "$ref": "#/components/schemas/Union_6a1762611a44" + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": ["text"], @@ -1984,11 +2392,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -2048,11 +2452,7 @@ "anyOf": [ { "type": "string", - "allOf": [ - { - "pattern": "^evt_" - } - ] + "pattern": "^evt_" }, { "type": "null" @@ -2082,11 +2482,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -2167,10 +2563,25 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/Union_f8b4c9e24aa0" + "anyOf": [ + { + "type": "string", + "pattern": "^msg_" + }, + { + "type": "null" + } + ] }, "delivery": { - "$ref": "#/components/schemas/Union_1f50b1b03235" + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Inbox.Delivery" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -2191,11 +2602,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -2267,11 +2674,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -2366,14 +2769,17 @@ "properties": { "messageID": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "files": { - "$ref": "#/components/schemas/Union_6a1762611a44" + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": ["messageID"], @@ -2395,11 +2801,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -2480,11 +2882,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -2555,11 +2953,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -2641,11 +3035,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -2717,11 +3107,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -2730,11 +3116,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "required": true } @@ -2799,11 +3181,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -2812,11 +3190,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "required": true } @@ -2881,11 +3255,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -2894,11 +3264,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "required": true } @@ -2963,11 +3329,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -3046,11 +3408,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -3143,11 +3501,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -3217,11 +3571,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -3317,11 +3667,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -3344,7 +3690,15 @@ "name": "follow", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_e13209ef6bf4" + "anyOf": [ + { + "type": "string", + "enum": ["true", "false"] + }, + { + "type": "null" + } + ] }, "required": false } @@ -3487,11 +3841,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -3499,7 +3849,15 @@ "name": "continue", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_e13209ef6bf4" + "anyOf": [ + { + "type": "string", + "enum": ["true", "false"] + }, + { + "type": "null" + } + ] }, "required": false } @@ -3561,11 +3919,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -3627,11 +3981,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -3640,11 +3990,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "required": true } @@ -3720,11 +4066,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -3799,11 +4141,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -3854,11 +4192,7 @@ "properties": { "idle": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 } }, "required": ["idle"], @@ -3880,11 +4214,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -4011,7 +4341,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4087,7 +4447,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4167,7 +4557,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4236,7 +4656,14 @@ "type": "string" }, "model": { - "$ref": "#/components/schemas/Union_6a162d0a021d" + "anyOf": [ + { + "$ref": "#/components/schemas/Model.Ref" + }, + { + "type": "null" + } + ] } }, "required": ["prompt"], @@ -4257,7 +4684,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4341,7 +4798,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4424,7 +4911,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4498,7 +5015,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4568,7 +5115,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4646,7 +5223,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4698,10 +5305,24 @@ "type": "string" }, "answer": { - "$ref": "#/components/schemas/Union_636af7bc29f5" + "anyOf": [ + { + "$ref": "#/components/schemas/Form.Answer" + }, + { + "type": "null" + } + ] }, "label": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": ["key"], @@ -4730,7 +5351,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4799,10 +5450,24 @@ "type": "string" }, "answer": { - "$ref": "#/components/schemas/Union_636af7bc29f5" + "anyOf": [ + { + "$ref": "#/components/schemas/Form.Answer" + }, + { + "type": "null" + } + ] }, "label": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": ["methodID"], @@ -4839,7 +5504,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4916,7 +5611,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4978,7 +5703,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5027,7 +5782,14 @@ "type": "object", "properties": { "code": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -5055,7 +5817,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5124,7 +5916,14 @@ "type": "string" }, "label": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": ["methodID"], @@ -5161,7 +5960,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5238,7 +6067,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5284,7 +6143,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5358,7 +6247,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5434,7 +6353,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5498,7 +6447,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5562,7 +6541,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5618,7 +6627,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5689,7 +6728,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5758,7 +6827,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5849,7 +6948,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5902,7 +7031,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -6155,11 +7314,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^frm_" - } - ] + "pattern": "^frm_" }, "required": true } @@ -6246,11 +7401,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^frm_" - } - ] + "pattern": "^frm_" }, "required": true } @@ -6337,11 +7488,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^frm_" - } - ] + "pattern": "^frm_" }, "required": true } @@ -6441,11 +7588,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^frm_" - } - ] + "pattern": "^frm_" }, "required": true } @@ -6519,7 +7662,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -6698,11 +7871,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -6721,11 +7890,7 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^per" - } - ] + "pattern": "^per" }, "effect": { "$ref": "#/components/schemas/Permission.Effect" @@ -6791,11 +7956,7 @@ "anyOf": [ { "type": "string", - "allOf": [ - { - "pattern": "^per" - } - ] + "pattern": "^per" }, { "type": "null" @@ -6806,19 +7967,32 @@ "type": "string" }, "resources": { - "$ref": "#/components/schemas/Arrays_681004346c78" + "type": "array", + "items": { + "type": "string" + } }, "save": { - "$ref": "#/components/schemas/Arrays_681004346c78" + "type": "array", + "items": { + "type": "string" + } }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "source": { "$ref": "#/components/schemas/Permission.Source" }, "agent": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": ["action", "resources"], @@ -6838,11 +8012,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -6921,11 +8091,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -6934,11 +8100,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^per" - } - ] + "pattern": "^per" }, "required": true } @@ -7017,11 +8179,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -7030,11 +8188,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^per" - } - ] + "pattern": "^per" }, "required": true } @@ -7097,7 +8251,14 @@ "$ref": "#/components/schemas/Permission.Reply" }, "message": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": ["reply"], @@ -7118,7 +8279,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -7172,7 +8363,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -7253,7 +8474,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -7351,7 +8602,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -7417,7 +8698,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -7606,7 +8917,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -7670,7 +9011,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -7768,11 +9139,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^pty" - } - ] + "pattern": "^pty" }, "required": true }, @@ -7780,7 +9147,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -7852,11 +9249,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^pty" - } - ] + "pattern": "^pty" }, "required": true }, @@ -7864,7 +9257,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -7940,19 +9363,11 @@ "properties": { "rows": { "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] + "exclusiveMinimum": 0 }, "cols": { "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] + "exclusiveMinimum": 0 } }, "required": ["rows", "cols"], @@ -7975,11 +9390,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^pty" - } - ] + "pattern": "^pty" }, "required": true }, @@ -7987,7 +9398,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -8044,11 +9485,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^pty" - } - ] + "pattern": "^pty" }, "required": true }, @@ -8056,7 +9493,14 @@ "name": "x-opencode-ticket", "in": "header", "schema": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "required": false }, @@ -8064,7 +9508,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -8148,11 +9622,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^pty" - } - ] + "pattern": "^pty" }, "required": true }, @@ -8252,7 +9722,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -8316,7 +9816,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -8382,11 +9912,7 @@ }, "timeout": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "metadata": { "type": "object" @@ -8411,11 +9937,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^sh_" - } - ] + "pattern": "^sh_" }, "required": true }, @@ -8423,7 +9945,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -8495,11 +10047,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^sh_" - } - ] + "pattern": "^sh_" }, "required": true }, @@ -8507,7 +10055,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -8564,11 +10142,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^sh_" - } - ] + "pattern": "^sh_" }, "required": true }, @@ -8576,7 +10150,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -8646,11 +10250,7 @@ "properties": { "timeout": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 } }, "required": ["timeout"], @@ -8672,11 +10272,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^sh_" - } - ] + "pattern": "^sh_" }, "required": true }, @@ -8684,7 +10280,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -8695,11 +10321,7 @@ "in": "query", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?$" - } - ] + "pattern": "^[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?$" }, "required": false }, @@ -8708,11 +10330,7 @@ "in": "query", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?$" - } - ] + "pattern": "^[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?$" }, "required": false } @@ -8730,7 +10348,25 @@ "$ref": "#/components/schemas/Location.InfoEncoded" }, "data": { - "$ref": "#/components/schemas/Objects_9d53a00b1efb" + "type": "object", + "properties": { + "output": { + "type": "string" + }, + "cursor": { + "type": "integer", + "minimum": 0 + }, + "size": { + "type": "integer", + "minimum": 0 + }, + "truncated": { + "type": "boolean" + } + }, + "required": ["output", "cursor", "size", "truncated"], + "additionalProperties": false } }, "required": ["location", "data"], @@ -8783,7 +10419,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -9102,7 +10768,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -9165,7 +10861,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -9231,7 +10957,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -9363,7 +11119,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -9441,11 +11227,7 @@ "anyOf": [ { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, { "type": "null" @@ -9456,11 +11238,7 @@ "anyOf": [ { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, { "type": "null" @@ -9528,7 +11306,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -9604,7 +11412,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -9704,7 +11542,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -9790,11 +11658,7 @@ }, "steps": { "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] + "exclusiveMinimum": 0 }, "permissions": { "$ref": "#/components/schemas/Permission.Ruleset" @@ -9820,54 +11684,6 @@ "required": ["_tag", "agentID", "message"], "additionalProperties": false }, - "Arrays_042d796a7901": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Prompt.FileAttachment" - } - }, - "Arrays_3ff7cb2a474f": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PromptInput.FileAttachment" - } - }, - "Arrays_4df8e9fdc8e1": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Form.When" - } - }, - "Arrays_681004346c78": { - "type": "array", - "items": { - "type": "string" - } - }, - "Arrays_92aa8803e81f": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Prompt.SkillAttachment" - } - }, - "Arrays_c17502465996": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PromptInput.SkillAttachment" - } - }, - "Arrays_e1027de4b984": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Prompt.AgentAttachment" - } - }, - "Arrays_fa246a9267ec": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Session.Message.Info" - } - }, "Command.Info": { "type": "object", "properties": { @@ -9931,16 +11747,43 @@ "type": "object", "properties": { "model": { - "$ref": "#/components/schemas/Union_85ca62cf1a33" + "anyOf": [ + { + "type": "string", + "pattern": "^[^/#]+\\/[^#]+(?:#[^#]+)?$" + }, + { + "type": "object", + "properties": { + "providerID": { + "type": "string", + "pattern": "^[^/#]+$" + }, + "model": { + "type": "string", + "pattern": "^[^#]+$" + }, + "variant": { + "type": "string", + "pattern": "^[^#]+$" + } + }, + "required": ["providerID", "model"], + "additionalProperties": false + } + ] }, "request": { "type": "object", "properties": { "headers": { - "$ref": "#/components/schemas/Objects_3f161562db4a" + "type": "object", + "additionalProperties": { + "type": "string" + } }, "body": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" } }, "additionalProperties": false @@ -9960,19 +11803,11 @@ }, "color": { "type": "string", - "allOf": [ - { - "pattern": "^#[0-9a-fA-F]{6}$" - } - ] + "pattern": "^#[0-9a-fA-F]{6}$" }, "steps": { "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] + "exclusiveMinimum": 0 }, "disabled": { "type": "boolean" @@ -10024,7 +11859,31 @@ "type": "string" }, "model": { - "$ref": "#/components/schemas/Union_85ca62cf1a33" + "anyOf": [ + { + "type": "string", + "pattern": "^[^/#]+\\/[^#]+(?:#[^#]+)?$" + }, + { + "type": "object", + "properties": { + "providerID": { + "type": "string", + "pattern": "^[^/#]+$" + }, + "model": { + "type": "string", + "pattern": "^[^#]+$" + }, + "variant": { + "type": "string", + "pattern": "^[^#]+$" + } + }, + "required": ["providerID", "model"], + "additionalProperties": false + } + ] }, "subtask": { "type": "boolean" @@ -10117,7 +11976,31 @@ "type": "string" }, "model": { - "$ref": "#/components/schemas/Union_85ca62cf1a33" + "anyOf": [ + { + "type": "string", + "pattern": "^[^/#]+\\/[^#]+(?:#[^#]+)?$" + }, + { + "type": "object", + "properties": { + "providerID": { + "type": "string", + "pattern": "^[^/#]+$" + }, + "model": { + "type": "string", + "pattern": "^[^#]+$" + }, + "variant": { + "type": "string", + "pattern": "^[^#]+$" + } + }, + "required": ["providerID", "model"], + "additionalProperties": false + } + ] }, "default_agent": { "type": "string" @@ -10225,27 +12108,15 @@ }, "max_width": { "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] + "exclusiveMinimum": 0 }, "max_height": { "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] + "exclusiveMinimum": 0 }, "max_base64_bytes": { "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] + "exclusiveMinimum": 0 } }, "additionalProperties": false @@ -10258,19 +12129,11 @@ "properties": { "max_lines": { "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] + "exclusiveMinimum": 0 }, "max_bytes": { "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] + "exclusiveMinimum": 0 } }, "additionalProperties": false @@ -10279,7 +12142,22 @@ "type": "object", "properties": { "timeout": { - "$ref": "#/components/schemas/Objects_7b507c2fd81f" + "type": "object", + "properties": { + "startup": { + "type": "integer", + "exclusiveMinimum": 0 + }, + "catalog": { + "type": "integer", + "exclusiveMinimum": 0 + }, + "execution": { + "type": "integer", + "exclusiveMinimum": 0 + } + }, + "additionalProperties": false }, "servers": { "type": "object", @@ -10308,22 +12186,14 @@ "properties": { "tokens": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 } }, "additionalProperties": false }, "buffer": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 } }, "additionalProperties": false @@ -10410,11 +12280,7 @@ }, "subagent_depth": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "policies": { "type": "array", @@ -10532,13 +12398,16 @@ "type": "string" }, "settings": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "headers": { - "$ref": "#/components/schemas/Objects_3f161562db4a" + "type": "object", + "additionalProperties": { + "type": "string" + } }, "body": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "capabilities": { "$ref": "#/components/schemas/Model.Capabilities" @@ -10552,13 +12421,16 @@ "type": "string" }, "settings": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "headers": { - "$ref": "#/components/schemas/Objects_3f161562db4a" + "type": "object", + "additionalProperties": { + "type": "string" + } }, "body": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" } }, "required": ["id"], @@ -10628,13 +12500,16 @@ "type": "string" }, "settings": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "headers": { - "$ref": "#/components/schemas/Objects_3f161562db4a" + "type": "object", + "additionalProperties": { + "type": "string" + } }, "body": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "models": { "type": "object", @@ -10724,7 +12599,14 @@ "type": "string" }, "resource": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": ["_tag", "message"], @@ -10782,19 +12664,11 @@ }, "additions": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "deletions": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "status": { "type": "string", @@ -10854,7 +12728,10 @@ "type": "boolean" }, "when": { - "$ref": "#/components/schemas/Arrays_4df8e9fdc8e1" + "type": "array", + "items": { + "$ref": "#/components/schemas/Form.When" + } }, "type": { "type": "string", @@ -10874,11 +12751,7 @@ "anyOf": [ { "type": "string", - "allOf": [ - { - "pattern": "^frm_" - } - ] + "pattern": "^frm_" }, { "type": "null" @@ -10984,11 +12857,7 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^frm_" - } - ] + "pattern": "^frm_" }, "sessionID": { "type": "string" @@ -11022,7 +12891,10 @@ "type": "boolean" }, "when": { - "$ref": "#/components/schemas/Arrays_4df8e9fdc8e1" + "type": "array", + "items": { + "$ref": "#/components/schemas/Form.When" + } }, "type": { "type": "string", @@ -11034,7 +12906,8 @@ "type": "number" }, { - "$ref": "#/components/schemas/Union_97d8d2942510" + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] } ] }, @@ -11044,7 +12917,8 @@ "type": "number" }, { - "$ref": "#/components/schemas/Union_97d8d2942510" + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] } ] }, @@ -11054,7 +12928,8 @@ "type": "number" }, { - "$ref": "#/components/schemas/Union_97d8d2942510" + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] } ] } @@ -11081,7 +12956,10 @@ "type": "boolean" }, "when": { - "$ref": "#/components/schemas/Arrays_4df8e9fdc8e1" + "type": "array", + "items": { + "$ref": "#/components/schemas/Form.When" + } }, "type": { "type": "string", @@ -11095,19 +12973,11 @@ }, "minItems": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "maxItems": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "custom": { "type": "boolean" @@ -11138,7 +13008,10 @@ "type": "boolean" }, "when": { - "$ref": "#/components/schemas/Arrays_4df8e9fdc8e1" + "type": "array", + "items": { + "$ref": "#/components/schemas/Form.When" + } }, "type": { "type": "string", @@ -11150,7 +13023,8 @@ "type": "number" }, { - "$ref": "#/components/schemas/Union_97d8d2942510" + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] } ] }, @@ -11160,7 +13034,8 @@ "type": "number" }, { - "$ref": "#/components/schemas/Union_97d8d2942510" + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] } ] }, @@ -11170,7 +13045,8 @@ "type": "number" }, { - "$ref": "#/components/schemas/Union_97d8d2942510" + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] } ] } @@ -11260,7 +13136,10 @@ "type": "boolean" }, "when": { - "$ref": "#/components/schemas/Arrays_4df8e9fdc8e1" + "type": "array", + "items": { + "$ref": "#/components/schemas/Form.When" + } }, "type": { "type": "string", @@ -11272,19 +13151,11 @@ }, "minLength": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "maxLength": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "pattern": { "type": "string" @@ -11314,7 +13185,15 @@ "type": "string" }, { - "$ref": "#/components/schemas/Union_00be4ed53f19" + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] }, { "type": "boolean" @@ -11343,7 +13222,15 @@ "type": "string" }, { - "$ref": "#/components/schemas/Union_00be4ed53f19" + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] }, { "type": "boolean" @@ -11437,12 +13324,8 @@ }, "InstructionEntry.Key": { "type": "string", - "allOf": [ - { - "pattern": "^[a-z0-9][a-z0-9._-]*$", - "description": "Instruction entry key (lowercase alphanumerics plus . _ -)" - } - ] + "pattern": "^[a-z0-9][a-z0-9._-]*$", + "description": "Instruction entry key (lowercase alphanumerics plus . _ -)" }, "InstructionEntryValueTooLargeErrorEncoded": { "type": "object", @@ -11481,7 +13364,33 @@ "enum": ["auto", "code"] }, "time": { - "$ref": "#/components/schemas/Objects_03af97aacac9" + "type": "object", + "properties": { + "created": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + }, + "expires": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + } + }, + "required": ["created", "expires"], + "additionalProperties": false } }, "required": ["attemptID", "url", "instructions", "mode", "time"], @@ -11497,7 +13406,33 @@ "enum": ["pending"] }, "time": { - "$ref": "#/components/schemas/Objects_03af97aacac9" + "type": "object", + "properties": { + "created": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + }, + "expires": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + } + }, + "required": ["created", "expires"], + "additionalProperties": false } }, "required": ["status", "time"], @@ -11511,7 +13446,33 @@ "enum": ["complete"] }, "time": { - "$ref": "#/components/schemas/Objects_03af97aacac9" + "type": "object", + "properties": { + "created": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + }, + "expires": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + } + }, + "required": ["created", "expires"], + "additionalProperties": false } }, "required": ["status", "time"], @@ -11528,7 +13489,33 @@ "type": "string" }, "time": { - "$ref": "#/components/schemas/Objects_03af97aacac9" + "type": "object", + "properties": { + "created": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + }, + "expires": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + } + }, + "required": ["created", "expires"], + "additionalProperties": false } }, "required": ["status", "message", "time"], @@ -11542,7 +13529,33 @@ "enum": ["expired"] }, "time": { - "$ref": "#/components/schemas/Objects_03af97aacac9" + "type": "object", + "properties": { + "created": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + }, + "expires": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + } + }, + "required": ["created", "expires"], + "additionalProperties": false } }, "required": ["status", "time"], @@ -11557,7 +13570,33 @@ "type": "string" }, "time": { - "$ref": "#/components/schemas/Objects_03af97aacac9" + "type": "object", + "properties": { + "created": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + }, + "expires": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + } + }, + "required": ["created", "expires"], + "additionalProperties": false } }, "required": ["attemptID", "time"], @@ -11576,7 +13615,33 @@ "type": "string" }, "time": { - "$ref": "#/components/schemas/Objects_03af97aacac9" + "type": "object", + "properties": { + "created": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + }, + "expires": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + } + }, + "required": ["created", "expires"], + "additionalProperties": false } }, "required": ["status", "time"], @@ -11590,7 +13655,33 @@ "enum": ["complete"] }, "time": { - "$ref": "#/components/schemas/Objects_03af97aacac9" + "type": "object", + "properties": { + "created": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + }, + "expires": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + } + }, + "required": ["created", "expires"], + "additionalProperties": false } }, "required": ["status", "time"], @@ -11607,7 +13698,33 @@ "type": "string" }, "time": { - "$ref": "#/components/schemas/Objects_03af97aacac9" + "type": "object", + "properties": { + "created": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + }, + "expires": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + } + }, + "required": ["created", "expires"], + "additionalProperties": false } }, "required": ["status", "message", "time"], @@ -11621,7 +13738,33 @@ "enum": ["expired"] }, "time": { - "$ref": "#/components/schemas/Objects_03af97aacac9" + "type": "object", + "properties": { + "created": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + }, + "expires": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + } + }, + "required": ["created", "expires"], + "additionalProperties": false } }, "required": ["status", "time"], @@ -11772,10 +13915,24 @@ "type": "string" }, "kind": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "field": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": ["_tag", "message"], @@ -11789,11 +13946,7 @@ }, "workspaceID": { "type": "string", - "allOf": [ - { - "pattern": "^wrk" - } - ] + "pattern": "^wrk" }, "project": { "type": "object", @@ -11823,11 +13976,7 @@ }, "workspaceID": { "type": "string", - "allOf": [ - { - "pattern": "^wrk" - } - ] + "pattern": "^wrk" } }, "required": ["directory"], @@ -11862,7 +14011,22 @@ "type": "boolean" }, "timeout": { - "$ref": "#/components/schemas/Objects_7b507c2fd81f" + "type": "object", + "properties": { + "startup": { + "type": "integer", + "exclusiveMinimum": 0 + }, + "catalog": { + "type": "integer", + "exclusiveMinimum": 0 + }, + "execution": { + "type": "integer", + "exclusiveMinimum": 0 + } + }, + "additionalProperties": false } }, "required": ["type", "command"], @@ -11882,12 +14046,8 @@ }, "callback_port": { "type": "integer", - "allOf": [ - { - "minimum": 1, - "maximum": 65535 - } - ] + "minimum": 1, + "maximum": 65535 }, "redirect_uri": { "type": "string" @@ -11929,7 +14089,22 @@ "type": "boolean" }, "timeout": { - "$ref": "#/components/schemas/Objects_7b507c2fd81f" + "type": "object", + "properties": { + "startup": { + "type": "integer", + "exclusiveMinimum": 0 + }, + "catalog": { + "type": "integer", + "exclusiveMinimum": 0 + }, + "execution": { + "type": "integer", + "exclusiveMinimum": 0 + } + }, + "additionalProperties": false } }, "required": ["type", "url"], @@ -12230,13 +14405,16 @@ "type": "string" }, "settings": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "headers": { - "$ref": "#/components/schemas/Objects_3f161562db4a" + "type": "object", + "additionalProperties": { + "type": "string" + } }, "body": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "capabilities": { "$ref": "#/components/schemas/Model.Capabilities" @@ -12340,13 +14518,16 @@ "type": "string" }, "settings": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "headers": { - "$ref": "#/components/schemas/Objects_3f161562db4a" + "type": "object", + "additionalProperties": { + "type": "string" + } }, "body": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" } }, "required": ["id"], @@ -12358,97 +14539,6 @@ "Money.USDPerMillionTokens": { "type": "number" }, - "Objects_03af97aacac9": { - "type": "object", - "properties": { - "created": { - "$ref": "#/components/schemas/Union_00be4ed53f19" - }, - "expires": { - "$ref": "#/components/schemas/Union_00be4ed53f19" - } - }, - "required": ["created", "expires"], - "additionalProperties": false - }, - "Objects_3f161562db4a": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "Objects_7b507c2fd81f": { - "type": "object", - "properties": { - "startup": { - "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] - }, - "catalog": { - "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] - }, - "execution": { - "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] - } - }, - "additionalProperties": false - }, - "Objects_9d53a00b1efb": { - "type": "object", - "properties": { - "output": { - "type": "string" - }, - "cursor": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "size": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "truncated": { - "type": "boolean" - } - }, - "required": ["output", "cursor", "size", "truncated"], - "additionalProperties": false - }, - "Objects_a2c799262a3c": { - "type": "object" - }, - "Objects_d7bbfd8ec2f6": { - "type": "object", - "properties": { - "created": { - "type": "number" - } - }, - "required": ["created"], - "additionalProperties": false - }, "Permission.Effect": { "type": "string", "enum": ["allow", "deny", "ask"] @@ -12462,31 +14552,29 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^per" - } - ] + "pattern": "^per" }, "sessionID": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "action": { "type": "string" }, "resources": { - "$ref": "#/components/schemas/Arrays_681004346c78" + "type": "array", + "items": { + "type": "string" + } }, "save": { - "$ref": "#/components/schemas/Arrays_681004346c78" + "type": "array", + "items": { + "type": "string" + } }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "source": { "$ref": "#/components/schemas/Permission.Source" @@ -12755,27 +14843,15 @@ "properties": { "created": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "updated": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "initialized": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 } }, "required": ["created", "updated"], @@ -12800,11 +14876,7 @@ }, "Prompt.Base64": { "type": "string", - "allOf": [ - { - "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" - } - ] + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" }, "Prompt.FileAttachment": { "type": "object", @@ -12944,13 +15016,16 @@ "type": "string" }, "settings": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "headers": { - "$ref": "#/components/schemas/Objects_3f161562db4a" + "type": "object", + "additionalProperties": { + "type": "string" + } }, "body": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" } }, "required": ["id", "name", "activation", "package"], @@ -13000,11 +15075,7 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^pty" - } - ] + "pattern": "^pty" }, "title": { "type": "string" @@ -13027,19 +15098,11 @@ }, "pid": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "exitCode": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 } }, "required": ["id", "title", "command", "args", "cwd", "status", "pid"], @@ -13070,11 +15133,7 @@ }, "expires_in": { "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] + "exclusiveMinimum": 0 } }, "required": ["ticket", "expires_in"], @@ -13167,11 +15226,7 @@ }, "pid": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 } }, "required": ["healthy", "version", "pid"], @@ -13188,7 +15243,14 @@ "type": "string" }, "service": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": ["_tag", "message"], @@ -13205,11 +15267,7 @@ }, "messageID": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" } }, "required": ["type", "messageID"], @@ -13224,11 +15282,7 @@ }, "messageID": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" } }, "required": ["type", "messageID"], @@ -13247,11 +15301,7 @@ }, "messageID": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" } }, "required": ["type", "messageID"], @@ -13275,19 +15325,11 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "sessionID": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "timeCreated": { "type": "number" @@ -13341,19 +15383,11 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "sessionID": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "timeCreated": { "type": "number" @@ -13393,19 +15427,11 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "sessionID": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "timeCreated": { "type": "number" @@ -13445,19 +15471,11 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "sessionID": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "timeCreated": { "type": "number" @@ -13483,16 +15501,25 @@ "type": "string" }, "files": { - "$ref": "#/components/schemas/Arrays_042d796a7901" + "type": "array", + "items": { + "$ref": "#/components/schemas/Prompt.FileAttachment" + } }, "agents": { - "$ref": "#/components/schemas/Arrays_e1027de4b984" + "type": "array", + "items": { + "$ref": "#/components/schemas/Prompt.AgentAttachment" + } }, "skills": { - "$ref": "#/components/schemas/Arrays_92aa8803e81f" + "type": "array", + "items": { + "$ref": "#/components/schemas/Prompt.SkillAttachment" + } }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" } }, "required": ["text"], @@ -13503,30 +15530,18 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "parentID": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "fork": { "type": "object", "properties": { "sessionID": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "boundary": { "$ref": "#/components/schemas/Session.ForkBoundary" @@ -13597,17 +15612,20 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { - "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + "type": "object", + "properties": { + "created": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false }, "type": { "type": "string", @@ -13628,14 +15646,10 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { "type": "object", @@ -13755,11 +15769,7 @@ "properties": { "attempt": { "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] + "exclusiveMinimum": 0 }, "at": { "type": "number" @@ -13868,17 +15878,20 @@ }, "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { - "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + "type": "object", + "properties": { + "created": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false }, "status": { "type": "string", @@ -13907,17 +15920,20 @@ }, "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { - "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + "type": "object", + "properties": { + "created": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false }, "status": { "type": "string", @@ -13943,17 +15959,20 @@ }, "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { - "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + "type": "object", + "properties": { + "created": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false }, "status": { "type": "string", @@ -14012,17 +16031,20 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { - "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + "type": "object", + "properties": { + "created": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false }, "type": { "type": "string", @@ -14062,17 +16084,20 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { - "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + "type": "object", + "properties": { + "created": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false }, "type": { "type": "string", @@ -14108,14 +16133,10 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { "type": "object", @@ -14136,17 +16157,14 @@ }, "shellID": { "type": "string", - "allOf": [ - { - "pattern": "^sh_" - } - ] + "pattern": "^sh_" }, "command": { "type": "string" }, "status": { - "$ref": "#/components/schemas/Union_b6d68a8b3572" + "type": "string", + "enum": ["running", "exited", "timeout", "killed"] }, "exit": { "anyOf": [ @@ -14154,12 +16172,31 @@ "type": "number" }, { - "$ref": "#/components/schemas/Union_97d8d2942510" + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] } ] }, "output": { - "$ref": "#/components/schemas/Objects_9d53a00b1efb" + "type": "object", + "properties": { + "output": { + "type": "string" + }, + "cursor": { + "type": "integer", + "minimum": 0 + }, + "size": { + "type": "integer", + "minimum": 0 + }, + "truncated": { + "type": "boolean" + } + }, + "required": ["output", "cursor", "size", "truncated"], + "additionalProperties": false } }, "required": ["id", "time", "type", "shellID", "command", "status"], @@ -14170,17 +16207,20 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { - "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + "type": "object", + "properties": { + "created": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false }, "type": { "type": "string", @@ -14204,17 +16244,20 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { - "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + "type": "object", + "properties": { + "created": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false }, "text": { "type": "string" @@ -14235,17 +16278,20 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { - "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + "type": "object", + "properties": { + "created": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false }, "type": { "type": "string", @@ -14358,29 +16404,41 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { - "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + "type": "object", + "properties": { + "created": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false }, "text": { "type": "string" }, "files": { - "$ref": "#/components/schemas/Arrays_042d796a7901" + "type": "array", + "items": { + "$ref": "#/components/schemas/Prompt.FileAttachment" + } }, "agents": { - "$ref": "#/components/schemas/Arrays_e1027de4b984" + "type": "array", + "items": { + "$ref": "#/components/schemas/Prompt.AgentAttachment" + } }, "skills": { - "$ref": "#/components/schemas/Arrays_92aa8803e81f" + "type": "array", + "items": { + "$ref": "#/components/schemas/Prompt.SkillAttachment" + } }, "type": { "type": "string", @@ -14395,11 +16453,7 @@ "properties": { "messageID": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "partID": { "type": "string" @@ -14428,12 +16482,8 @@ }, "status": { "type": "integer", - "allOf": [ - { - "minimum": 100, - "maximum": 599 - } - ] + "minimum": 100, + "maximum": 599 } }, "required": ["type", "message"], @@ -14501,10 +16551,24 @@ "type": "object", "properties": { "previous": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "next": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -14530,6 +16594,174 @@ "required": ["_tag", "sessionID", "message"], "additionalProperties": false }, + "SessionStats.Activity": { + "type": "object", + "properties": { + "date": { + "type": "string" + }, + "steps": { + "type": "integer", + "minimum": 0 + } + }, + "required": ["date", "steps"], + "additionalProperties": false + }, + "SessionStats.Info": { + "type": "object", + "properties": { + "range": { + "type": "object", + "properties": { + "from": { + "type": "number" + }, + "to": { + "type": "number" + } + }, + "required": ["from", "to"], + "additionalProperties": false + }, + "sessions": { + "type": "integer", + "minimum": 0 + }, + "subagents": { + "type": "integer", + "minimum": 0 + }, + "prompts": { + "type": "integer", + "minimum": 0 + }, + "steps": { + "type": "integer", + "minimum": 0 + }, + "tokens": { + "$ref": "#/components/schemas/TokenUsage.Info" + }, + "cost": { + "$ref": "#/components/schemas/Money.USD" + }, + "tools": { + "type": "object", + "properties": { + "calls": { + "type": "integer", + "minimum": 0 + }, + "succeeded": { + "type": "integer", + "minimum": 0 + }, + "failed": { + "type": "integer", + "minimum": 0 + }, + "unfinished": { + "type": "integer", + "minimum": 0 + } + }, + "required": ["calls", "succeeded", "failed", "unfinished"], + "additionalProperties": false + }, + "activeDays": { + "type": "integer", + "minimum": 0 + }, + "streak": { + "type": "integer", + "minimum": 0 + }, + "activity": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SessionStats.Activity" + } + }, + "models": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SessionStats.ModelUsage" + } + }, + "toolUsage": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SessionStats.ToolUsage" + } + } + }, + "required": [ + "range", + "sessions", + "subagents", + "prompts", + "steps", + "tokens", + "cost", + "tools", + "activeDays", + "streak", + "activity", + "models", + "toolUsage" + ], + "additionalProperties": false + }, + "SessionStats.ModelUsage": { + "type": "object", + "properties": { + "model": { + "$ref": "#/components/schemas/Model.Ref" + }, + "steps": { + "type": "integer", + "minimum": 0 + }, + "tokens": { + "$ref": "#/components/schemas/TokenUsage.Info" + }, + "cost": { + "$ref": "#/components/schemas/Money.USD" + } + }, + "required": ["model", "steps", "tokens", "cost"], + "additionalProperties": false + }, + "SessionStats.ToolUsage": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "calls": { + "type": "integer", + "minimum": 0 + }, + "succeeded": { + "type": "integer", + "minimum": 0 + }, + "failed": { + "type": "integer", + "minimum": 0 + }, + "unfinished": { + "type": "integer", + "minimum": 0 + }, + "durationP50": { + "type": "number" + } + }, + "required": ["name", "calls", "succeeded", "failed", "unfinished"], + "additionalProperties": false + }, "SessionTransfer.Data": { "type": "object", "properties": { @@ -14537,7 +16769,10 @@ "$ref": "#/components/schemas/Session.Info" }, "messages": { - "$ref": "#/components/schemas/Arrays_fa246a9267ec" + "type": "array", + "items": { + "$ref": "#/components/schemas/Session.Message.Info" + } } }, "required": ["info", "messages"], @@ -14587,14 +16822,11 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^sh_" - } - ] + "pattern": "^sh_" }, "status": { - "$ref": "#/components/schemas/Union_b6d68a8b3572" + "type": "string", + "enum": ["running", "exited", "timeout", "killed"] }, "command": { "type": "string" @@ -14610,11 +16842,7 @@ }, "pid": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "exit": { "type": "number" @@ -14754,7 +16982,14 @@ "type": "string" }, "name": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": ["type", "uri", "mime"], @@ -14788,172 +17023,6 @@ "required": ["_tag", "message"], "additionalProperties": false }, - "Union_00be4ed53f19": { - "anyOf": [ - { - "type": "number" - }, - { - "$ref": "#/components/schemas/Union_97d8d2942510" - } - ] - }, - "Union_1f50b1b03235": { - "anyOf": [ - { - "$ref": "#/components/schemas/Session.Inbox.Delivery" - }, - { - "type": "null" - } - ] - }, - "Union_5ee94d3ca88d": { - "anyOf": [ - { - "$ref": "#/components/schemas/Location.Ref" - }, - { - "type": "null" - } - ] - }, - "Union_636af7bc29f5": { - "anyOf": [ - { - "$ref": "#/components/schemas/Form.Answer" - }, - { - "type": "null" - } - ] - }, - "Union_6a162d0a021d": { - "anyOf": [ - { - "$ref": "#/components/schemas/Model.Ref" - }, - { - "type": "null" - } - ] - }, - "Union_6a1762611a44": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "Union_85ca62cf1a33": { - "anyOf": [ - { - "type": "string", - "allOf": [ - { - "pattern": "^[^/#]+\\/[^#]+(?:#[^#]+)?$" - } - ] - }, - { - "type": "object", - "properties": { - "providerID": { - "type": "string", - "allOf": [ - { - "pattern": "^[^/#]+$" - } - ] - }, - "model": { - "type": "string", - "allOf": [ - { - "pattern": "^[^#]+$" - } - ] - }, - "variant": { - "type": "string", - "allOf": [ - { - "pattern": "^[^#]+$" - } - ] - } - }, - "required": ["providerID", "model"], - "additionalProperties": false - } - ] - }, - "Union_97d8d2942510": { - "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] - }, - "Union_b6d68a8b3572": { - "type": "string", - "enum": ["running", "exited", "timeout", "killed"] - }, - "Union_e13209ef6bf4": { - "anyOf": [ - { - "type": "string", - "enum": ["true", "false"] - }, - { - "type": "null" - } - ] - }, - "Union_f090cb615c84": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "Union_f8b4c9e24aa0": { - "anyOf": [ - { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - { - "type": "null" - } - ] - }, - "Union_ffefb7e3c81d": { - "anyOf": [ - { - "type": "object", - "properties": { - "directory": { - "$ref": "#/components/schemas/Union_f090cb615c84" - }, - "workspace": { - "$ref": "#/components/schemas/Union_f090cb615c84" - } - }, - "additionalProperties": false - }, - { - "type": "null" - } - ] - }, "UnknownErrorEncoded": { "type": "object", "properties": { @@ -14965,7 +17034,14 @@ "type": "string" }, "ref": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": ["_tag", "message"], @@ -14995,19 +17071,11 @@ }, "additions": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "deletions": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "status": { "type": "string", @@ -15128,7 +17196,14 @@ "type": "string" }, "forceRequired": { - "$ref": "#/components/schemas/Union_6a1762611a44" + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": ["message"], diff --git a/packages/www/public/openapi.json b/packages/www/public/openapi.json index 2a0a4ab9435..71c7593f808 100644 --- a/packages/www/public/openapi.json +++ b/packages/www/public/openapi.json @@ -109,7 +109,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -162,7 +192,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -236,7 +296,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -309,7 +399,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -378,11 +498,7 @@ "anyOf": [ { "type": "string", - "allOf": [ - { - "pattern": "^wrk" - } - ] + "pattern": "^wrk" }, { "type": "null" @@ -428,7 +544,14 @@ "name": "search", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "required": false }, @@ -441,11 +564,7 @@ "anyOf": [ { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, { "type": "string", @@ -625,11 +744,7 @@ "anyOf": [ { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, { "type": "null" @@ -637,16 +752,44 @@ ] }, "title": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "agent": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "model": { - "$ref": "#/components/schemas/Union_6a162d0a021d" + "anyOf": [ + { + "$ref": "#/components/schemas/Model.Ref" + }, + { + "type": "null" + } + ] }, "location": { - "$ref": "#/components/schemas/Union_5ee94d3ca88d" + "anyOf": [ + { + "$ref": "#/components/schemas/Location.Ref" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -657,6 +800,171 @@ } } }, + "/api/session/stats": { + "get": { + "tags": ["session"], + "operationId": "v2.session.stats", + "parameters": [ + { + "name": "from", + "in": "query", + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "required": false + }, + { + "name": "to", + "in": "query", + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "required": false + }, + { + "name": "project", + "in": "query", + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "required": false + }, + { + "name": "timezone", + "in": "query", + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "required": false + }, + { + "name": "models", + "in": "query", + "schema": { + "anyOf": [ + { + "type": "string", + "enum": ["true", "false"] + }, + { + "type": "null" + } + ] + }, + "required": false + }, + { + "name": "tools", + "in": "query", + "schema": { + "anyOf": [ + { + "type": "string", + "enum": ["true", "false"] + }, + { + "type": "null" + } + ] + }, + "required": false + }, + { + "name": "toolSummary", + "in": "query", + "schema": { + "anyOf": [ + { + "type": "string", + "enum": ["true", "false"] + }, + { + "type": "null" + } + ] + }, + "required": false + } + ], + "security": [], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/SessionStats.Info" + } + }, + "required": ["data"], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "InvalidRequestError", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/InvalidRequestErrorEncoded" + }, + { + "$ref": "#/components/schemas/InvalidRequestErrorEncoded" + } + ] + } + } + } + }, + "401": { + "description": "UnauthorizedError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorEncoded" + } + } + } + } + }, + "description": "Aggregate local session activity, usage, and tool reliability for a time range.", + "summary": "Get session statistics" + } + }, "/api/session/import": { "post": { "tags": ["session"], @@ -724,10 +1032,20 @@ "$ref": "#/components/schemas/Session.Info" }, "messages": { - "$ref": "#/components/schemas/Arrays_fa246a9267ec" + "type": "array", + "items": { + "$ref": "#/components/schemas/Session.Message.Info" + } }, "location": { - "$ref": "#/components/schemas/Union_5ee94d3ca88d" + "anyOf": [ + { + "$ref": "#/components/schemas/Location.Ref" + }, + { + "type": "null" + } + ] } }, "required": ["info", "messages"], @@ -749,11 +1067,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -761,7 +1075,15 @@ "name": "sanitize", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_e13209ef6bf4" + "anyOf": [ + { + "type": "string", + "enum": ["true", "false"] + }, + { + "type": "null" + } + ] }, "required": false } @@ -894,11 +1216,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -965,11 +1283,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -1031,11 +1345,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -1138,11 +1448,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -1221,11 +1527,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -1304,11 +1606,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -1387,11 +1685,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -1452,14 +1746,17 @@ }, "workspaceID": { "type": "string", - "allOf": [ - { - "pattern": "^wrk" - } - ] + "pattern": "^wrk" }, "delivery": { - "$ref": "#/components/schemas/Union_1f50b1b03235" + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Inbox.Delivery" + }, + { + "type": "null" + } + ] } }, "required": ["directory"], @@ -1481,11 +1778,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -1573,28 +1866,59 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/Union_f8b4c9e24aa0" + "anyOf": [ + { + "type": "string", + "pattern": "^msg_" + }, + { + "type": "null" + } + ] }, "text": { "type": "string" }, "files": { - "$ref": "#/components/schemas/Arrays_3ff7cb2a474f" + "type": "array", + "items": { + "$ref": "#/components/schemas/PromptInput.FileAttachment" + } }, "agents": { - "$ref": "#/components/schemas/Arrays_e1027de4b984" + "type": "array", + "items": { + "$ref": "#/components/schemas/Prompt.AgentAttachment" + } }, "skills": { - "$ref": "#/components/schemas/Arrays_c17502465996" + "type": "array", + "items": { + "$ref": "#/components/schemas/PromptInput.SkillAttachment" + } }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "delivery": { - "$ref": "#/components/schemas/Union_1f50b1b03235" + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Inbox.Delivery" + }, + { + "type": "null" + } + ] }, "resume": { - "$ref": "#/components/schemas/Union_6a1762611a44" + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": ["text"], @@ -1616,11 +1940,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -1721,34 +2041,86 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/Union_f8b4c9e24aa0" + "anyOf": [ + { + "type": "string", + "pattern": "^msg_" + }, + { + "type": "null" + } + ] }, "command": { "type": "string" }, "arguments": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "agent": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "model": { - "$ref": "#/components/schemas/Union_6a162d0a021d" + "anyOf": [ + { + "$ref": "#/components/schemas/Model.Ref" + }, + { + "type": "null" + } + ] }, "files": { - "$ref": "#/components/schemas/Arrays_3ff7cb2a474f" + "type": "array", + "items": { + "$ref": "#/components/schemas/PromptInput.FileAttachment" + } }, "agents": { - "$ref": "#/components/schemas/Arrays_e1027de4b984" + "type": "array", + "items": { + "$ref": "#/components/schemas/Prompt.AgentAttachment" + } }, "skills": { - "$ref": "#/components/schemas/Arrays_c17502465996" + "type": "array", + "items": { + "$ref": "#/components/schemas/PromptInput.SkillAttachment" + } }, "delivery": { - "$ref": "#/components/schemas/Union_1f50b1b03235" + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Inbox.Delivery" + }, + { + "type": "null" + } + ] }, "resume": { - "$ref": "#/components/schemas/Union_6a1762611a44" + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": ["command"], @@ -1770,11 +2142,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -1834,13 +2202,28 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/Union_f8b4c9e24aa0" + "anyOf": [ + { + "type": "string", + "pattern": "^msg_" + }, + { + "type": "null" + } + ] }, "skill": { "type": "string" }, "resume": { - "$ref": "#/components/schemas/Union_6a1762611a44" + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": ["skill"], @@ -1862,11 +2245,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -1947,22 +2326,51 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/Union_f8b4c9e24aa0" + "anyOf": [ + { + "type": "string", + "pattern": "^msg_" + }, + { + "type": "null" + } + ] }, "text": { "type": "string" }, "description": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "delivery": { - "$ref": "#/components/schemas/Union_1f50b1b03235" + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Inbox.Delivery" + }, + { + "type": "null" + } + ] }, "resume": { - "$ref": "#/components/schemas/Union_6a1762611a44" + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": ["text"], @@ -1984,11 +2392,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -2048,11 +2452,7 @@ "anyOf": [ { "type": "string", - "allOf": [ - { - "pattern": "^evt_" - } - ] + "pattern": "^evt_" }, { "type": "null" @@ -2082,11 +2482,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -2167,10 +2563,25 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/Union_f8b4c9e24aa0" + "anyOf": [ + { + "type": "string", + "pattern": "^msg_" + }, + { + "type": "null" + } + ] }, "delivery": { - "$ref": "#/components/schemas/Union_1f50b1b03235" + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Inbox.Delivery" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -2191,11 +2602,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -2267,11 +2674,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -2366,14 +2769,17 @@ "properties": { "messageID": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "files": { - "$ref": "#/components/schemas/Union_6a1762611a44" + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": ["messageID"], @@ -2395,11 +2801,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -2480,11 +2882,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -2555,11 +2953,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -2641,11 +3035,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -2717,11 +3107,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -2730,11 +3116,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "required": true } @@ -2799,11 +3181,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -2812,11 +3190,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "required": true } @@ -2881,11 +3255,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -2894,11 +3264,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "required": true } @@ -2963,11 +3329,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -3046,11 +3408,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -3143,11 +3501,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -3217,11 +3571,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -3317,11 +3667,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -3344,7 +3690,15 @@ "name": "follow", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_e13209ef6bf4" + "anyOf": [ + { + "type": "string", + "enum": ["true", "false"] + }, + { + "type": "null" + } + ] }, "required": false } @@ -3487,11 +3841,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -3499,7 +3849,15 @@ "name": "continue", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_e13209ef6bf4" + "anyOf": [ + { + "type": "string", + "enum": ["true", "false"] + }, + { + "type": "null" + } + ] }, "required": false } @@ -3561,11 +3919,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -3627,11 +3981,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -3640,11 +3990,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "required": true } @@ -3720,11 +4066,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -3799,11 +4141,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -3854,11 +4192,7 @@ "properties": { "idle": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 } }, "required": ["idle"], @@ -3880,11 +4214,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -4011,7 +4341,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4087,7 +4447,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4167,7 +4557,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4236,7 +4656,14 @@ "type": "string" }, "model": { - "$ref": "#/components/schemas/Union_6a162d0a021d" + "anyOf": [ + { + "$ref": "#/components/schemas/Model.Ref" + }, + { + "type": "null" + } + ] } }, "required": ["prompt"], @@ -4257,7 +4684,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4341,7 +4798,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4424,7 +4911,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4498,7 +5015,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4568,7 +5115,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4646,7 +5223,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4698,10 +5305,24 @@ "type": "string" }, "answer": { - "$ref": "#/components/schemas/Union_636af7bc29f5" + "anyOf": [ + { + "$ref": "#/components/schemas/Form.Answer" + }, + { + "type": "null" + } + ] }, "label": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": ["key"], @@ -4730,7 +5351,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4799,10 +5450,24 @@ "type": "string" }, "answer": { - "$ref": "#/components/schemas/Union_636af7bc29f5" + "anyOf": [ + { + "$ref": "#/components/schemas/Form.Answer" + }, + { + "type": "null" + } + ] }, "label": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": ["methodID"], @@ -4839,7 +5504,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4916,7 +5611,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -4978,7 +5703,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5027,7 +5782,14 @@ "type": "object", "properties": { "code": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -5055,7 +5817,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5124,7 +5916,14 @@ "type": "string" }, "label": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": ["methodID"], @@ -5161,7 +5960,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5238,7 +6067,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5284,7 +6143,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5358,7 +6247,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5434,7 +6353,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5498,7 +6447,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5562,7 +6541,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5618,7 +6627,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5689,7 +6728,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5758,7 +6827,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5849,7 +6948,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -5902,7 +7031,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -6155,11 +7314,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^frm_" - } - ] + "pattern": "^frm_" }, "required": true } @@ -6246,11 +7401,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^frm_" - } - ] + "pattern": "^frm_" }, "required": true } @@ -6337,11 +7488,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^frm_" - } - ] + "pattern": "^frm_" }, "required": true } @@ -6441,11 +7588,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^frm_" - } - ] + "pattern": "^frm_" }, "required": true } @@ -6519,7 +7662,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -6698,11 +7871,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -6721,11 +7890,7 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^per" - } - ] + "pattern": "^per" }, "effect": { "$ref": "#/components/schemas/Permission.Effect" @@ -6791,11 +7956,7 @@ "anyOf": [ { "type": "string", - "allOf": [ - { - "pattern": "^per" - } - ] + "pattern": "^per" }, { "type": "null" @@ -6806,19 +7967,32 @@ "type": "string" }, "resources": { - "$ref": "#/components/schemas/Arrays_681004346c78" + "type": "array", + "items": { + "type": "string" + } }, "save": { - "$ref": "#/components/schemas/Arrays_681004346c78" + "type": "array", + "items": { + "type": "string" + } }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "source": { "$ref": "#/components/schemas/Permission.Source" }, "agent": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": ["action", "resources"], @@ -6838,11 +8012,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true } @@ -6921,11 +8091,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -6934,11 +8100,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^per" - } - ] + "pattern": "^per" }, "required": true } @@ -7017,11 +8179,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "required": true }, @@ -7030,11 +8188,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^per" - } - ] + "pattern": "^per" }, "required": true } @@ -7097,7 +8251,14 @@ "$ref": "#/components/schemas/Permission.Reply" }, "message": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": ["reply"], @@ -7118,7 +8279,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -7172,7 +8363,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -7253,7 +8474,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -7351,7 +8602,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -7417,7 +8698,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -7606,7 +8917,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -7670,7 +9011,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -7768,11 +9139,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^pty" - } - ] + "pattern": "^pty" }, "required": true }, @@ -7780,7 +9147,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -7852,11 +9249,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^pty" - } - ] + "pattern": "^pty" }, "required": true }, @@ -7864,7 +9257,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -7940,19 +9363,11 @@ "properties": { "rows": { "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] + "exclusiveMinimum": 0 }, "cols": { "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] + "exclusiveMinimum": 0 } }, "required": ["rows", "cols"], @@ -7975,11 +9390,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^pty" - } - ] + "pattern": "^pty" }, "required": true }, @@ -7987,7 +9398,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -8044,11 +9485,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^pty" - } - ] + "pattern": "^pty" }, "required": true }, @@ -8056,7 +9493,14 @@ "name": "x-opencode-ticket", "in": "header", "schema": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "required": false }, @@ -8064,7 +9508,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -8148,11 +9622,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^pty" - } - ] + "pattern": "^pty" }, "required": true }, @@ -8252,7 +9722,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -8316,7 +9816,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -8382,11 +9912,7 @@ }, "timeout": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "metadata": { "type": "object" @@ -8411,11 +9937,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^sh_" - } - ] + "pattern": "^sh_" }, "required": true }, @@ -8423,7 +9945,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -8495,11 +10047,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^sh_" - } - ] + "pattern": "^sh_" }, "required": true }, @@ -8507,7 +10055,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -8564,11 +10142,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^sh_" - } - ] + "pattern": "^sh_" }, "required": true }, @@ -8576,7 +10150,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -8646,11 +10250,7 @@ "properties": { "timeout": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 } }, "required": ["timeout"], @@ -8672,11 +10272,7 @@ "in": "path", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^sh_" - } - ] + "pattern": "^sh_" }, "required": true }, @@ -8684,7 +10280,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -8695,11 +10321,7 @@ "in": "query", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?$" - } - ] + "pattern": "^[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?$" }, "required": false }, @@ -8708,11 +10330,7 @@ "in": "query", "schema": { "type": "string", - "allOf": [ - { - "pattern": "^[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?$" - } - ] + "pattern": "^[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?$" }, "required": false } @@ -8730,7 +10348,25 @@ "$ref": "#/components/schemas/Location.InfoEncoded" }, "data": { - "$ref": "#/components/schemas/Objects_9d53a00b1efb" + "type": "object", + "properties": { + "output": { + "type": "string" + }, + "cursor": { + "type": "integer", + "minimum": 0 + }, + "size": { + "type": "integer", + "minimum": 0 + }, + "truncated": { + "type": "boolean" + } + }, + "required": ["output", "cursor", "size", "truncated"], + "additionalProperties": false } }, "required": ["location", "data"], @@ -8783,7 +10419,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -9102,7 +10768,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -9165,7 +10861,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -9231,7 +10957,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -9363,7 +11119,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -9441,11 +11227,7 @@ "anyOf": [ { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, { "type": "null" @@ -9456,11 +11238,7 @@ "anyOf": [ { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, { "type": "null" @@ -9528,7 +11306,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -9604,7 +11412,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -9704,7 +11542,37 @@ "name": "location", "in": "query", "schema": { - "$ref": "#/components/schemas/Union_ffefb7e3c81d" + "anyOf": [ + { + "type": "object", + "properties": { + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "workspace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] }, "required": false, "style": "deepObject", @@ -9790,11 +11658,7 @@ }, "steps": { "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] + "exclusiveMinimum": 0 }, "permissions": { "$ref": "#/components/schemas/Permission.Ruleset" @@ -9820,54 +11684,6 @@ "required": ["_tag", "agentID", "message"], "additionalProperties": false }, - "Arrays_042d796a7901": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Prompt.FileAttachment" - } - }, - "Arrays_3ff7cb2a474f": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PromptInput.FileAttachment" - } - }, - "Arrays_4df8e9fdc8e1": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Form.When" - } - }, - "Arrays_681004346c78": { - "type": "array", - "items": { - "type": "string" - } - }, - "Arrays_92aa8803e81f": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Prompt.SkillAttachment" - } - }, - "Arrays_c17502465996": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PromptInput.SkillAttachment" - } - }, - "Arrays_e1027de4b984": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Prompt.AgentAttachment" - } - }, - "Arrays_fa246a9267ec": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Session.Message.Info" - } - }, "Command.Info": { "type": "object", "properties": { @@ -9931,16 +11747,43 @@ "type": "object", "properties": { "model": { - "$ref": "#/components/schemas/Union_85ca62cf1a33" + "anyOf": [ + { + "type": "string", + "pattern": "^[^/#]+\\/[^#]+(?:#[^#]+)?$" + }, + { + "type": "object", + "properties": { + "providerID": { + "type": "string", + "pattern": "^[^/#]+$" + }, + "model": { + "type": "string", + "pattern": "^[^#]+$" + }, + "variant": { + "type": "string", + "pattern": "^[^#]+$" + } + }, + "required": ["providerID", "model"], + "additionalProperties": false + } + ] }, "request": { "type": "object", "properties": { "headers": { - "$ref": "#/components/schemas/Objects_3f161562db4a" + "type": "object", + "additionalProperties": { + "type": "string" + } }, "body": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" } }, "additionalProperties": false @@ -9960,19 +11803,11 @@ }, "color": { "type": "string", - "allOf": [ - { - "pattern": "^#[0-9a-fA-F]{6}$" - } - ] + "pattern": "^#[0-9a-fA-F]{6}$" }, "steps": { "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] + "exclusiveMinimum": 0 }, "disabled": { "type": "boolean" @@ -10024,7 +11859,31 @@ "type": "string" }, "model": { - "$ref": "#/components/schemas/Union_85ca62cf1a33" + "anyOf": [ + { + "type": "string", + "pattern": "^[^/#]+\\/[^#]+(?:#[^#]+)?$" + }, + { + "type": "object", + "properties": { + "providerID": { + "type": "string", + "pattern": "^[^/#]+$" + }, + "model": { + "type": "string", + "pattern": "^[^#]+$" + }, + "variant": { + "type": "string", + "pattern": "^[^#]+$" + } + }, + "required": ["providerID", "model"], + "additionalProperties": false + } + ] }, "subtask": { "type": "boolean" @@ -10117,7 +11976,31 @@ "type": "string" }, "model": { - "$ref": "#/components/schemas/Union_85ca62cf1a33" + "anyOf": [ + { + "type": "string", + "pattern": "^[^/#]+\\/[^#]+(?:#[^#]+)?$" + }, + { + "type": "object", + "properties": { + "providerID": { + "type": "string", + "pattern": "^[^/#]+$" + }, + "model": { + "type": "string", + "pattern": "^[^#]+$" + }, + "variant": { + "type": "string", + "pattern": "^[^#]+$" + } + }, + "required": ["providerID", "model"], + "additionalProperties": false + } + ] }, "default_agent": { "type": "string" @@ -10225,27 +12108,15 @@ }, "max_width": { "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] + "exclusiveMinimum": 0 }, "max_height": { "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] + "exclusiveMinimum": 0 }, "max_base64_bytes": { "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] + "exclusiveMinimum": 0 } }, "additionalProperties": false @@ -10258,19 +12129,11 @@ "properties": { "max_lines": { "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] + "exclusiveMinimum": 0 }, "max_bytes": { "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] + "exclusiveMinimum": 0 } }, "additionalProperties": false @@ -10279,7 +12142,22 @@ "type": "object", "properties": { "timeout": { - "$ref": "#/components/schemas/Objects_7b507c2fd81f" + "type": "object", + "properties": { + "startup": { + "type": "integer", + "exclusiveMinimum": 0 + }, + "catalog": { + "type": "integer", + "exclusiveMinimum": 0 + }, + "execution": { + "type": "integer", + "exclusiveMinimum": 0 + } + }, + "additionalProperties": false }, "servers": { "type": "object", @@ -10308,22 +12186,14 @@ "properties": { "tokens": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 } }, "additionalProperties": false }, "buffer": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 } }, "additionalProperties": false @@ -10410,11 +12280,7 @@ }, "subagent_depth": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "policies": { "type": "array", @@ -10532,13 +12398,16 @@ "type": "string" }, "settings": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "headers": { - "$ref": "#/components/schemas/Objects_3f161562db4a" + "type": "object", + "additionalProperties": { + "type": "string" + } }, "body": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "capabilities": { "$ref": "#/components/schemas/Model.Capabilities" @@ -10552,13 +12421,16 @@ "type": "string" }, "settings": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "headers": { - "$ref": "#/components/schemas/Objects_3f161562db4a" + "type": "object", + "additionalProperties": { + "type": "string" + } }, "body": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" } }, "required": ["id"], @@ -10628,13 +12500,16 @@ "type": "string" }, "settings": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "headers": { - "$ref": "#/components/schemas/Objects_3f161562db4a" + "type": "object", + "additionalProperties": { + "type": "string" + } }, "body": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "models": { "type": "object", @@ -10724,7 +12599,14 @@ "type": "string" }, "resource": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": ["_tag", "message"], @@ -10782,19 +12664,11 @@ }, "additions": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "deletions": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "status": { "type": "string", @@ -10854,7 +12728,10 @@ "type": "boolean" }, "when": { - "$ref": "#/components/schemas/Arrays_4df8e9fdc8e1" + "type": "array", + "items": { + "$ref": "#/components/schemas/Form.When" + } }, "type": { "type": "string", @@ -10874,11 +12751,7 @@ "anyOf": [ { "type": "string", - "allOf": [ - { - "pattern": "^frm_" - } - ] + "pattern": "^frm_" }, { "type": "null" @@ -10984,11 +12857,7 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^frm_" - } - ] + "pattern": "^frm_" }, "sessionID": { "type": "string" @@ -11022,7 +12891,10 @@ "type": "boolean" }, "when": { - "$ref": "#/components/schemas/Arrays_4df8e9fdc8e1" + "type": "array", + "items": { + "$ref": "#/components/schemas/Form.When" + } }, "type": { "type": "string", @@ -11034,7 +12906,8 @@ "type": "number" }, { - "$ref": "#/components/schemas/Union_97d8d2942510" + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] } ] }, @@ -11044,7 +12917,8 @@ "type": "number" }, { - "$ref": "#/components/schemas/Union_97d8d2942510" + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] } ] }, @@ -11054,7 +12928,8 @@ "type": "number" }, { - "$ref": "#/components/schemas/Union_97d8d2942510" + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] } ] } @@ -11081,7 +12956,10 @@ "type": "boolean" }, "when": { - "$ref": "#/components/schemas/Arrays_4df8e9fdc8e1" + "type": "array", + "items": { + "$ref": "#/components/schemas/Form.When" + } }, "type": { "type": "string", @@ -11095,19 +12973,11 @@ }, "minItems": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "maxItems": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "custom": { "type": "boolean" @@ -11138,7 +13008,10 @@ "type": "boolean" }, "when": { - "$ref": "#/components/schemas/Arrays_4df8e9fdc8e1" + "type": "array", + "items": { + "$ref": "#/components/schemas/Form.When" + } }, "type": { "type": "string", @@ -11150,7 +13023,8 @@ "type": "number" }, { - "$ref": "#/components/schemas/Union_97d8d2942510" + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] } ] }, @@ -11160,7 +13034,8 @@ "type": "number" }, { - "$ref": "#/components/schemas/Union_97d8d2942510" + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] } ] }, @@ -11170,7 +13045,8 @@ "type": "number" }, { - "$ref": "#/components/schemas/Union_97d8d2942510" + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] } ] } @@ -11260,7 +13136,10 @@ "type": "boolean" }, "when": { - "$ref": "#/components/schemas/Arrays_4df8e9fdc8e1" + "type": "array", + "items": { + "$ref": "#/components/schemas/Form.When" + } }, "type": { "type": "string", @@ -11272,19 +13151,11 @@ }, "minLength": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "maxLength": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "pattern": { "type": "string" @@ -11314,7 +13185,15 @@ "type": "string" }, { - "$ref": "#/components/schemas/Union_00be4ed53f19" + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] }, { "type": "boolean" @@ -11343,7 +13222,15 @@ "type": "string" }, { - "$ref": "#/components/schemas/Union_00be4ed53f19" + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] }, { "type": "boolean" @@ -11437,12 +13324,8 @@ }, "InstructionEntry.Key": { "type": "string", - "allOf": [ - { - "pattern": "^[a-z0-9][a-z0-9._-]*$", - "description": "Instruction entry key (lowercase alphanumerics plus . _ -)" - } - ] + "pattern": "^[a-z0-9][a-z0-9._-]*$", + "description": "Instruction entry key (lowercase alphanumerics plus . _ -)" }, "InstructionEntryValueTooLargeErrorEncoded": { "type": "object", @@ -11481,7 +13364,33 @@ "enum": ["auto", "code"] }, "time": { - "$ref": "#/components/schemas/Objects_03af97aacac9" + "type": "object", + "properties": { + "created": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + }, + "expires": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + } + }, + "required": ["created", "expires"], + "additionalProperties": false } }, "required": ["attemptID", "url", "instructions", "mode", "time"], @@ -11497,7 +13406,33 @@ "enum": ["pending"] }, "time": { - "$ref": "#/components/schemas/Objects_03af97aacac9" + "type": "object", + "properties": { + "created": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + }, + "expires": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + } + }, + "required": ["created", "expires"], + "additionalProperties": false } }, "required": ["status", "time"], @@ -11511,7 +13446,33 @@ "enum": ["complete"] }, "time": { - "$ref": "#/components/schemas/Objects_03af97aacac9" + "type": "object", + "properties": { + "created": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + }, + "expires": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + } + }, + "required": ["created", "expires"], + "additionalProperties": false } }, "required": ["status", "time"], @@ -11528,7 +13489,33 @@ "type": "string" }, "time": { - "$ref": "#/components/schemas/Objects_03af97aacac9" + "type": "object", + "properties": { + "created": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + }, + "expires": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + } + }, + "required": ["created", "expires"], + "additionalProperties": false } }, "required": ["status", "message", "time"], @@ -11542,7 +13529,33 @@ "enum": ["expired"] }, "time": { - "$ref": "#/components/schemas/Objects_03af97aacac9" + "type": "object", + "properties": { + "created": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + }, + "expires": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + } + }, + "required": ["created", "expires"], + "additionalProperties": false } }, "required": ["status", "time"], @@ -11557,7 +13570,33 @@ "type": "string" }, "time": { - "$ref": "#/components/schemas/Objects_03af97aacac9" + "type": "object", + "properties": { + "created": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + }, + "expires": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + } + }, + "required": ["created", "expires"], + "additionalProperties": false } }, "required": ["attemptID", "time"], @@ -11576,7 +13615,33 @@ "type": "string" }, "time": { - "$ref": "#/components/schemas/Objects_03af97aacac9" + "type": "object", + "properties": { + "created": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + }, + "expires": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + } + }, + "required": ["created", "expires"], + "additionalProperties": false } }, "required": ["status", "time"], @@ -11590,7 +13655,33 @@ "enum": ["complete"] }, "time": { - "$ref": "#/components/schemas/Objects_03af97aacac9" + "type": "object", + "properties": { + "created": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + }, + "expires": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + } + }, + "required": ["created", "expires"], + "additionalProperties": false } }, "required": ["status", "time"], @@ -11607,7 +13698,33 @@ "type": "string" }, "time": { - "$ref": "#/components/schemas/Objects_03af97aacac9" + "type": "object", + "properties": { + "created": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + }, + "expires": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + } + }, + "required": ["created", "expires"], + "additionalProperties": false } }, "required": ["status", "message", "time"], @@ -11621,7 +13738,33 @@ "enum": ["expired"] }, "time": { - "$ref": "#/components/schemas/Objects_03af97aacac9" + "type": "object", + "properties": { + "created": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + }, + "expires": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + } + }, + "required": ["created", "expires"], + "additionalProperties": false } }, "required": ["status", "time"], @@ -11772,10 +13915,24 @@ "type": "string" }, "kind": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "field": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": ["_tag", "message"], @@ -11789,11 +13946,7 @@ }, "workspaceID": { "type": "string", - "allOf": [ - { - "pattern": "^wrk" - } - ] + "pattern": "^wrk" }, "project": { "type": "object", @@ -11823,11 +13976,7 @@ }, "workspaceID": { "type": "string", - "allOf": [ - { - "pattern": "^wrk" - } - ] + "pattern": "^wrk" } }, "required": ["directory"], @@ -11862,7 +14011,22 @@ "type": "boolean" }, "timeout": { - "$ref": "#/components/schemas/Objects_7b507c2fd81f" + "type": "object", + "properties": { + "startup": { + "type": "integer", + "exclusiveMinimum": 0 + }, + "catalog": { + "type": "integer", + "exclusiveMinimum": 0 + }, + "execution": { + "type": "integer", + "exclusiveMinimum": 0 + } + }, + "additionalProperties": false } }, "required": ["type", "command"], @@ -11882,12 +14046,8 @@ }, "callback_port": { "type": "integer", - "allOf": [ - { - "minimum": 1, - "maximum": 65535 - } - ] + "minimum": 1, + "maximum": 65535 }, "redirect_uri": { "type": "string" @@ -11929,7 +14089,22 @@ "type": "boolean" }, "timeout": { - "$ref": "#/components/schemas/Objects_7b507c2fd81f" + "type": "object", + "properties": { + "startup": { + "type": "integer", + "exclusiveMinimum": 0 + }, + "catalog": { + "type": "integer", + "exclusiveMinimum": 0 + }, + "execution": { + "type": "integer", + "exclusiveMinimum": 0 + } + }, + "additionalProperties": false } }, "required": ["type", "url"], @@ -12230,13 +14405,16 @@ "type": "string" }, "settings": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "headers": { - "$ref": "#/components/schemas/Objects_3f161562db4a" + "type": "object", + "additionalProperties": { + "type": "string" + } }, "body": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "capabilities": { "$ref": "#/components/schemas/Model.Capabilities" @@ -12340,13 +14518,16 @@ "type": "string" }, "settings": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "headers": { - "$ref": "#/components/schemas/Objects_3f161562db4a" + "type": "object", + "additionalProperties": { + "type": "string" + } }, "body": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" } }, "required": ["id"], @@ -12358,97 +14539,6 @@ "Money.USDPerMillionTokens": { "type": "number" }, - "Objects_03af97aacac9": { - "type": "object", - "properties": { - "created": { - "$ref": "#/components/schemas/Union_00be4ed53f19" - }, - "expires": { - "$ref": "#/components/schemas/Union_00be4ed53f19" - } - }, - "required": ["created", "expires"], - "additionalProperties": false - }, - "Objects_3f161562db4a": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "Objects_7b507c2fd81f": { - "type": "object", - "properties": { - "startup": { - "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] - }, - "catalog": { - "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] - }, - "execution": { - "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] - } - }, - "additionalProperties": false - }, - "Objects_9d53a00b1efb": { - "type": "object", - "properties": { - "output": { - "type": "string" - }, - "cursor": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "size": { - "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] - }, - "truncated": { - "type": "boolean" - } - }, - "required": ["output", "cursor", "size", "truncated"], - "additionalProperties": false - }, - "Objects_a2c799262a3c": { - "type": "object" - }, - "Objects_d7bbfd8ec2f6": { - "type": "object", - "properties": { - "created": { - "type": "number" - } - }, - "required": ["created"], - "additionalProperties": false - }, "Permission.Effect": { "type": "string", "enum": ["allow", "deny", "ask"] @@ -12462,31 +14552,29 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^per" - } - ] + "pattern": "^per" }, "sessionID": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "action": { "type": "string" }, "resources": { - "$ref": "#/components/schemas/Arrays_681004346c78" + "type": "array", + "items": { + "type": "string" + } }, "save": { - "$ref": "#/components/schemas/Arrays_681004346c78" + "type": "array", + "items": { + "type": "string" + } }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "source": { "$ref": "#/components/schemas/Permission.Source" @@ -12755,27 +14843,15 @@ "properties": { "created": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "updated": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "initialized": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 } }, "required": ["created", "updated"], @@ -12800,11 +14876,7 @@ }, "Prompt.Base64": { "type": "string", - "allOf": [ - { - "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" - } - ] + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" }, "Prompt.FileAttachment": { "type": "object", @@ -12944,13 +15016,16 @@ "type": "string" }, "settings": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "headers": { - "$ref": "#/components/schemas/Objects_3f161562db4a" + "type": "object", + "additionalProperties": { + "type": "string" + } }, "body": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" } }, "required": ["id", "name", "activation", "package"], @@ -13000,11 +15075,7 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^pty" - } - ] + "pattern": "^pty" }, "title": { "type": "string" @@ -13027,19 +15098,11 @@ }, "pid": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "exitCode": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 } }, "required": ["id", "title", "command", "args", "cwd", "status", "pid"], @@ -13070,11 +15133,7 @@ }, "expires_in": { "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] + "exclusiveMinimum": 0 } }, "required": ["ticket", "expires_in"], @@ -13167,11 +15226,7 @@ }, "pid": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 } }, "required": ["healthy", "version", "pid"], @@ -13188,7 +15243,14 @@ "type": "string" }, "service": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": ["_tag", "message"], @@ -13205,11 +15267,7 @@ }, "messageID": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" } }, "required": ["type", "messageID"], @@ -13224,11 +15282,7 @@ }, "messageID": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" } }, "required": ["type", "messageID"], @@ -13247,11 +15301,7 @@ }, "messageID": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" } }, "required": ["type", "messageID"], @@ -13275,19 +15325,11 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "sessionID": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "timeCreated": { "type": "number" @@ -13341,19 +15383,11 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "sessionID": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "timeCreated": { "type": "number" @@ -13393,19 +15427,11 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "sessionID": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "timeCreated": { "type": "number" @@ -13445,19 +15471,11 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "sessionID": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "timeCreated": { "type": "number" @@ -13483,16 +15501,25 @@ "type": "string" }, "files": { - "$ref": "#/components/schemas/Arrays_042d796a7901" + "type": "array", + "items": { + "$ref": "#/components/schemas/Prompt.FileAttachment" + } }, "agents": { - "$ref": "#/components/schemas/Arrays_e1027de4b984" + "type": "array", + "items": { + "$ref": "#/components/schemas/Prompt.AgentAttachment" + } }, "skills": { - "$ref": "#/components/schemas/Arrays_92aa8803e81f" + "type": "array", + "items": { + "$ref": "#/components/schemas/Prompt.SkillAttachment" + } }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" } }, "required": ["text"], @@ -13503,30 +15530,18 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "parentID": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "fork": { "type": "object", "properties": { "sessionID": { "type": "string", - "allOf": [ - { - "pattern": "^ses" - } - ] + "pattern": "^ses" }, "boundary": { "$ref": "#/components/schemas/Session.ForkBoundary" @@ -13597,17 +15612,20 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { - "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + "type": "object", + "properties": { + "created": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false }, "type": { "type": "string", @@ -13628,14 +15646,10 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { "type": "object", @@ -13755,11 +15769,7 @@ "properties": { "attempt": { "type": "integer", - "allOf": [ - { - "exclusiveMinimum": 0 - } - ] + "exclusiveMinimum": 0 }, "at": { "type": "number" @@ -13868,17 +15878,20 @@ }, "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { - "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + "type": "object", + "properties": { + "created": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false }, "status": { "type": "string", @@ -13907,17 +15920,20 @@ }, "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { - "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + "type": "object", + "properties": { + "created": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false }, "status": { "type": "string", @@ -13943,17 +15959,20 @@ }, "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { - "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + "type": "object", + "properties": { + "created": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false }, "status": { "type": "string", @@ -14012,17 +16031,20 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { - "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + "type": "object", + "properties": { + "created": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false }, "type": { "type": "string", @@ -14062,17 +16084,20 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { - "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + "type": "object", + "properties": { + "created": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false }, "type": { "type": "string", @@ -14108,14 +16133,10 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { "type": "object", @@ -14136,17 +16157,14 @@ }, "shellID": { "type": "string", - "allOf": [ - { - "pattern": "^sh_" - } - ] + "pattern": "^sh_" }, "command": { "type": "string" }, "status": { - "$ref": "#/components/schemas/Union_b6d68a8b3572" + "type": "string", + "enum": ["running", "exited", "timeout", "killed"] }, "exit": { "anyOf": [ @@ -14154,12 +16172,31 @@ "type": "number" }, { - "$ref": "#/components/schemas/Union_97d8d2942510" + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] } ] }, "output": { - "$ref": "#/components/schemas/Objects_9d53a00b1efb" + "type": "object", + "properties": { + "output": { + "type": "string" + }, + "cursor": { + "type": "integer", + "minimum": 0 + }, + "size": { + "type": "integer", + "minimum": 0 + }, + "truncated": { + "type": "boolean" + } + }, + "required": ["output", "cursor", "size", "truncated"], + "additionalProperties": false } }, "required": ["id", "time", "type", "shellID", "command", "status"], @@ -14170,17 +16207,20 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { - "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + "type": "object", + "properties": { + "created": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false }, "type": { "type": "string", @@ -14204,17 +16244,20 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { - "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + "type": "object", + "properties": { + "created": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false }, "text": { "type": "string" @@ -14235,17 +16278,20 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { - "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + "type": "object", + "properties": { + "created": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false }, "type": { "type": "string", @@ -14358,29 +16404,41 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "metadata": { - "$ref": "#/components/schemas/Objects_a2c799262a3c" + "type": "object" }, "time": { - "$ref": "#/components/schemas/Objects_d7bbfd8ec2f6" + "type": "object", + "properties": { + "created": { + "type": "number" + } + }, + "required": ["created"], + "additionalProperties": false }, "text": { "type": "string" }, "files": { - "$ref": "#/components/schemas/Arrays_042d796a7901" + "type": "array", + "items": { + "$ref": "#/components/schemas/Prompt.FileAttachment" + } }, "agents": { - "$ref": "#/components/schemas/Arrays_e1027de4b984" + "type": "array", + "items": { + "$ref": "#/components/schemas/Prompt.AgentAttachment" + } }, "skills": { - "$ref": "#/components/schemas/Arrays_92aa8803e81f" + "type": "array", + "items": { + "$ref": "#/components/schemas/Prompt.SkillAttachment" + } }, "type": { "type": "string", @@ -14395,11 +16453,7 @@ "properties": { "messageID": { "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] + "pattern": "^msg_" }, "partID": { "type": "string" @@ -14428,12 +16482,8 @@ }, "status": { "type": "integer", - "allOf": [ - { - "minimum": 100, - "maximum": 599 - } - ] + "minimum": 100, + "maximum": 599 } }, "required": ["type", "message"], @@ -14501,10 +16551,24 @@ "type": "object", "properties": { "previous": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "next": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -14530,6 +16594,174 @@ "required": ["_tag", "sessionID", "message"], "additionalProperties": false }, + "SessionStats.Activity": { + "type": "object", + "properties": { + "date": { + "type": "string" + }, + "steps": { + "type": "integer", + "minimum": 0 + } + }, + "required": ["date", "steps"], + "additionalProperties": false + }, + "SessionStats.Info": { + "type": "object", + "properties": { + "range": { + "type": "object", + "properties": { + "from": { + "type": "number" + }, + "to": { + "type": "number" + } + }, + "required": ["from", "to"], + "additionalProperties": false + }, + "sessions": { + "type": "integer", + "minimum": 0 + }, + "subagents": { + "type": "integer", + "minimum": 0 + }, + "prompts": { + "type": "integer", + "minimum": 0 + }, + "steps": { + "type": "integer", + "minimum": 0 + }, + "tokens": { + "$ref": "#/components/schemas/TokenUsage.Info" + }, + "cost": { + "$ref": "#/components/schemas/Money.USD" + }, + "tools": { + "type": "object", + "properties": { + "calls": { + "type": "integer", + "minimum": 0 + }, + "succeeded": { + "type": "integer", + "minimum": 0 + }, + "failed": { + "type": "integer", + "minimum": 0 + }, + "unfinished": { + "type": "integer", + "minimum": 0 + } + }, + "required": ["calls", "succeeded", "failed", "unfinished"], + "additionalProperties": false + }, + "activeDays": { + "type": "integer", + "minimum": 0 + }, + "streak": { + "type": "integer", + "minimum": 0 + }, + "activity": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SessionStats.Activity" + } + }, + "models": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SessionStats.ModelUsage" + } + }, + "toolUsage": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SessionStats.ToolUsage" + } + } + }, + "required": [ + "range", + "sessions", + "subagents", + "prompts", + "steps", + "tokens", + "cost", + "tools", + "activeDays", + "streak", + "activity", + "models", + "toolUsage" + ], + "additionalProperties": false + }, + "SessionStats.ModelUsage": { + "type": "object", + "properties": { + "model": { + "$ref": "#/components/schemas/Model.Ref" + }, + "steps": { + "type": "integer", + "minimum": 0 + }, + "tokens": { + "$ref": "#/components/schemas/TokenUsage.Info" + }, + "cost": { + "$ref": "#/components/schemas/Money.USD" + } + }, + "required": ["model", "steps", "tokens", "cost"], + "additionalProperties": false + }, + "SessionStats.ToolUsage": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "calls": { + "type": "integer", + "minimum": 0 + }, + "succeeded": { + "type": "integer", + "minimum": 0 + }, + "failed": { + "type": "integer", + "minimum": 0 + }, + "unfinished": { + "type": "integer", + "minimum": 0 + }, + "durationP50": { + "type": "number" + } + }, + "required": ["name", "calls", "succeeded", "failed", "unfinished"], + "additionalProperties": false + }, "SessionTransfer.Data": { "type": "object", "properties": { @@ -14537,7 +16769,10 @@ "$ref": "#/components/schemas/Session.Info" }, "messages": { - "$ref": "#/components/schemas/Arrays_fa246a9267ec" + "type": "array", + "items": { + "$ref": "#/components/schemas/Session.Message.Info" + } } }, "required": ["info", "messages"], @@ -14587,14 +16822,11 @@ "properties": { "id": { "type": "string", - "allOf": [ - { - "pattern": "^sh_" - } - ] + "pattern": "^sh_" }, "status": { - "$ref": "#/components/schemas/Union_b6d68a8b3572" + "type": "string", + "enum": ["running", "exited", "timeout", "killed"] }, "command": { "type": "string" @@ -14610,11 +16842,7 @@ }, "pid": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "exit": { "type": "number" @@ -14754,7 +16982,14 @@ "type": "string" }, "name": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": ["type", "uri", "mime"], @@ -14788,172 +17023,6 @@ "required": ["_tag", "message"], "additionalProperties": false }, - "Union_00be4ed53f19": { - "anyOf": [ - { - "type": "number" - }, - { - "$ref": "#/components/schemas/Union_97d8d2942510" - } - ] - }, - "Union_1f50b1b03235": { - "anyOf": [ - { - "$ref": "#/components/schemas/Session.Inbox.Delivery" - }, - { - "type": "null" - } - ] - }, - "Union_5ee94d3ca88d": { - "anyOf": [ - { - "$ref": "#/components/schemas/Location.Ref" - }, - { - "type": "null" - } - ] - }, - "Union_636af7bc29f5": { - "anyOf": [ - { - "$ref": "#/components/schemas/Form.Answer" - }, - { - "type": "null" - } - ] - }, - "Union_6a162d0a021d": { - "anyOf": [ - { - "$ref": "#/components/schemas/Model.Ref" - }, - { - "type": "null" - } - ] - }, - "Union_6a1762611a44": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "Union_85ca62cf1a33": { - "anyOf": [ - { - "type": "string", - "allOf": [ - { - "pattern": "^[^/#]+\\/[^#]+(?:#[^#]+)?$" - } - ] - }, - { - "type": "object", - "properties": { - "providerID": { - "type": "string", - "allOf": [ - { - "pattern": "^[^/#]+$" - } - ] - }, - "model": { - "type": "string", - "allOf": [ - { - "pattern": "^[^#]+$" - } - ] - }, - "variant": { - "type": "string", - "allOf": [ - { - "pattern": "^[^#]+$" - } - ] - } - }, - "required": ["providerID", "model"], - "additionalProperties": false - } - ] - }, - "Union_97d8d2942510": { - "type": "string", - "enum": ["Infinity", "-Infinity", "NaN"] - }, - "Union_b6d68a8b3572": { - "type": "string", - "enum": ["running", "exited", "timeout", "killed"] - }, - "Union_e13209ef6bf4": { - "anyOf": [ - { - "type": "string", - "enum": ["true", "false"] - }, - { - "type": "null" - } - ] - }, - "Union_f090cb615c84": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "Union_f8b4c9e24aa0": { - "anyOf": [ - { - "type": "string", - "allOf": [ - { - "pattern": "^msg_" - } - ] - }, - { - "type": "null" - } - ] - }, - "Union_ffefb7e3c81d": { - "anyOf": [ - { - "type": "object", - "properties": { - "directory": { - "$ref": "#/components/schemas/Union_f090cb615c84" - }, - "workspace": { - "$ref": "#/components/schemas/Union_f090cb615c84" - } - }, - "additionalProperties": false - }, - { - "type": "null" - } - ] - }, "UnknownErrorEncoded": { "type": "object", "properties": { @@ -14965,7 +17034,14 @@ "type": "string" }, "ref": { - "$ref": "#/components/schemas/Union_f090cb615c84" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": ["_tag", "message"], @@ -14995,19 +17071,11 @@ }, "additions": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "deletions": { "type": "integer", - "allOf": [ - { - "minimum": 0 - } - ] + "minimum": 0 }, "status": { "type": "string", @@ -15128,7 +17196,14 @@ "type": "string" }, "forceRequired": { - "$ref": "#/components/schemas/Union_6a1762611a44" + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": ["message"],