Skip to content

The agent that grows with you

Merge origin/main: wire-contract registry + server→client requests + screenshot dedup

teknium1e4f591d1b0ff
diff --cc apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/input-requests.test.ts
index 6a00783a123,00000000000..ef719a49b0c
mode 100644,000000..100644
--- a/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/input-requests.test.ts
+++ b/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/input-requests.test.ts
@@@ -1,46 -1,0 +1,58 @@@
+import { afterEach, describe, expect, it, vi } from 'vitest'
+
+import { $sudoRequest, clearSudoRequest } from '@/store/prompts'
++import { resetServerRequestsForTests } from '@/store/server-requests'
+import { $activeSessionId } from '@/store/session'
+
+import { handleInputRequestEvent } from './input-requests'
++import { handleServerRequest } from './server-requests'
++import type { ServerRequestContext } from './server-requests'
+import type { GatewayEventContext } from './types'
+
+vi.mock('@/store/native-notifications', () => ({ dispatchNativeNotification: vi.fn() }))
+
- function context(type: GatewayEventContext['event']['type'], requestId: string, routedSession: string | null): GatewayEventContext {
- const payload = { request_id: requestId, profile_key: '/home/h/.hermes' }
++const deps = { updateSessionState: vi.fn(), upsertToolCall: vi.fn() } as unknown as ServerRequestContext['deps']
++
++function cancel(requestId: string, routedSession: string | null): GatewayEventContext {
++ const payload = { id: requestId, method: 'display.install.sudo', reason: 'timeout' }
+ return {
- deps: { updateSessionState: vi.fn() } as unknown as GatewayEventContext['deps'],
- event: { payload, type },
++ deps: deps as unknown as GatewayEventContext['deps'],
++ event: { payload, type: 'request.cancel' },
+ explicitSid: '',
+ fromActiveSource: () => true,
+ isActiveEvent: true,
+ occurredAt: 1,
+ payload: payload as GatewayEventContext['payload'],
+ scheduleConfigRefresh: vi.fn(),
+ sessionId: routedSession
+ }
+}
+
+describe('Bot Screen install password card', () => {
+ afterEach(() => {
+ clearSudoRequest()
++ resetServerRequestsForTests()
+ $activeSessionId.set(null)
+ })
+
- it('belongs to the app, not to the chat that happened to be open: it survives a chat switch and its expiry finds it', () => {
- // The gateway emits the card sessionless; the stream resolver attributes an unscoped event to the
- // ambient chat. Stored under that chat, the card vanished the moment the user switched chats and
- // the expiry (routed to the NEW ambient chat) never reached it.
++ it('belongs to the app, not to the chat that happened to be open: it survives a chat switch and its cancel finds it', () => {
++ // The gateway sends the request sessionless. Stored under the ambient chat, the card vanished the
++ // moment the user switched chats and the cancel (routed to the NEW ambient chat) never reached it.
+ $activeSessionId.set('chat-a')
- expect(handleInputRequestEvent(context('display.install.sudo.request', 'req-1', 'chat-a'))).toBe(true)
- expect($sudoRequest.get()?.requestId).toBe('req-1')
++ const respond = vi.fn()
++ expect(
++ handleServerRequest(
++ { fail: vi.fn(), id: 'srq-1', method: 'display.install.sudo', params: { profile_key: '/home/h/.hermes', session_id: '' }, profile: 'default', respond },
++ deps,
++ 'chat-a'
++ )
++ ).toBe(true)
++ expect($sudoRequest.get()?.requestId).toBe('srq-1')
+
+ $activeSessionId.set('chat-b')
- expect($sudoRequest.get()?.requestId).toBe('req-1')
++ expect($sudoRequest.get()?.requestId).toBe('srq-1')
+
- expect(handleInputRequestEvent(context('display.install.sudo.expire', 'req-1', 'chat-b'))).toBe(true)
++ expect(handleInputRequestEvent(cancel('srq-1', 'chat-b'))).toBe(true)
+ expect($sudoRequest.get()).toBeNull()
+ })
+})
diff --cc apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/input-requests.ts
index ab9988f9507,56aab46b870..5e4713b3022
--- a/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/input-requests.ts
+++ b/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/input-requests.ts
@@@ -441,31 -116,19 +116,21 @@@ export function handleInputRequestEvent
return true
}
- if (event.type === 'vault.unlock.request') {
- // External password-manager unlock (agent/vault_backends). Blocked on
- // vault.unlock.respond {request_id, password}; "" keeps it locked.
- const requestId = typeof payload?.request_id === 'string' ? payload.request_id : ''
-
- if (requestId) {
- const backend = typeof payload?.backend === 'string' ? payload.backend : ''
- const displayName = typeof payload?.display_name === 'string' ? payload.display_name : backend
-
- setVaultUnlockRequest({ backend, displayName, requestId, sessionId: sessionId ?? null })
-
- if (sessionId) {
- updateSessionState(sessionId, state => ({ ...state, needsInput: true }))
- }
-
- dispatchNativeNotification({
- body: translateNow('prompts.vaultUnlockTitle', displayName),
- kind: 'input',
- sessionId,
- title: translateNow('notifications.native.inputTitle')
- })
- }
-
- return true
+ if ($approvalRequests.get()[key]?.serverRequestId === id) {
+ clearApprovalRequest(sessionId, $approvalRequests.get()[key]?.requestId)
+ } else if ($sudoRequests.get()[key]?.requestId === id) {
+ clearSudoRequest(sessionId, id)
++ } else if ($sudoRequests.get()['']?.requestId === id) {
++ clearSudoRequest(null, id) // the app-level Bot Screen install card: not owned by any chat
+ } else if ($secretRequests.get()[key]?.requestId === id) {
+ clearSecretRequest(sessionId, id)
+ } else if ($vaultCodeRequests.get()[key]?.requestId === id) {
+ clearVaultCodeRequest(sessionId, id)
+ } else if ($vaultSaveLoginRequests.get()[key]?.requestId === id) {
+ clearVaultSaveLoginRequest(sessionId, id)
+ } else if ($vaultUnlockRequests.get()[key]?.requestId === id) {
+ clearVaultUnlockRequest(sessionId, id)
}
- return false
+ return true
}
diff --cc apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/server-requests.ts
index 00000000000,e13b58edb88..14ef4ae3a39
mode 000000,100644..100644
--- a/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/server-requests.ts
+++ b/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/server-requests.ts
@@@ -1,0 -1,403 +1,417 @@@
+ import { readActivePreview } from '@/app/chat/right-rail/preview-reader'
+ import { readActiveTerminal } from '@/app/right-sidebar/terminal/buffer'
+ import { pendingClarifyToolPayload } from '@/app/session/hooks/use-session-actions/restore-pending-clarify'
+ import { translateNow } from '@/i18n'
+ import { restorePendingClarifyToolCall } from '@/lib/chat-messages'
+ import type { PreviewActAction } from '@/lib/preview-act/act-in-page'
+ import type { TourAction, TourStep } from '@/lib/tour'
+ import { normalizeChoices, normalizeQuestions, setClarifyRequest, warnDroppedChoices } from '@/store/clarify'
+ import type { ScopedServerRequest } from '@/store/gateway'
+ import { dispatchNativeNotification } from '@/store/native-notifications'
+ import {
+ receiveApprovalRequest,
+ setSecretRequest,
+ setSudoRequest,
+ setVaultCodeRequest,
+ setVaultSaveLoginRequest,
+ setVaultUnlockRequest
+ } from '@/store/prompts'
+ import { rememberServerRequest } from '@/store/server-requests'
+ import { requestScrollToBottom } from '@/store/thread-scroll'
+ import { $toursEnabled } from '@/store/tours'
+
+ import type { GatewayEventDeps } from './types'
+
+ /** The preview engine, loaded on demand so ~25KB of page-injectable source stays
+ * off the boot path (dev: a fresh copy per action so edits reach the guest — see
+ * the previous home of this loader in desktop-bridge.ts for the full story). */
+ const loadPreviewEngine = () => {
+ const stable = () => import('@/app/chat/right-rail/preview-act')
+
+ if (!import.meta.hot) {
+ return stable().then(mod => mod.actOnActivePreview)
+ }
+
+ return import(/* @vite-ignore */ '/src/app/chat/right-rail/preview-act.ts?hot=' + Date.now())
+ .catch(stable)
+ .then(mod => mod.actOnActivePreview as Awaited<ReturnType<typeof stable>>['actOnActivePreview'])
+ }
+
+ const str = (v: unknown): string => (typeof v === 'string' ? v : '')
+ const num = (v: unknown): number | undefined => (typeof v === 'number' ? v : undefined)
+
+ /** Answer a string-valued request with a JSON-encoded result ('' = nothing / unavailable). */
+ const answerValue = (request: ScopedServerRequest, result: unknown) =>
+ request.respond({ value: result ? JSON.stringify(result) : '' })
+
+ export interface ServerRequestContext {
+ deps: Pick<GatewayEventDeps, 'activeSessionIdRef' | 'sessionInterrupted' | 'updateSessionState' | 'upsertToolCall'>
+ request: ScopedServerRequest
+ /** The session the request names ('' when unscoped). */
+ sessionId: string
+ /** The named session is the one on screen. */
+ isActiveSession: boolean
+ }
+
+ type Handler = (ctx: ServerRequestContext) => void
+
+ const markNeedsInput = (ctx: ServerRequestContext) => {
+ if (ctx.sessionId) {
+ ctx.deps.updateSessionState(ctx.sessionId, state => ({ ...state, needsInput: true }))
+ }
+ }
+
+ const notifyInput = (ctx: ServerRequestContext, body: string) => {
+ if (!ctx.request.replayed) {
+ dispatchNativeNotification({
+ body,
+ kind: 'input',
+ sessionId: ctx.sessionId || null,
+ title: translateNow('notifications.native.inputTitle')
+ })
+ }
+ }
+
+ // ── Blocking-input family (clarify / approval / sudo / secret / vault / MCP setup) ──
+ // Every one is parked per-session (like clarify) so a BACKGROUND session's turn can
+ // raise it and wait — the sidebar flags "needs input" and the card surfaces once the
+ // user focuses that chat. The Python side blocks on the response frame; without a
+ // handler the channel answers -32601 and the tool fails fast instead of stalling.
+
+ const clarify: Handler = ctx => {
+ const { deps, request, sessionId } = ctx
+ const p = request.params
+
+ if (sessionId && deps.sessionInterrupted(sessionId)) {
+ request.respond({ answer: '' })
+
+ return
+ }
+
+ const question = str(p.question)
+ const rawChoices = p.choices
+ const choices = normalizeChoices(rawChoices)
+ const multiSelect = p.multi_select === true
+ // Batch (multi-question) clarify: `questions` replaces question/choices on the
+ // wire. `answers` rides along only on a reconnect replay (locks the server
+ // already accepted).
+ const questions = normalizeQuestions(p.questions)
+
+ const lockedAnswers =
+ typeof p.answers === 'object' && p.answers !== null
+ ? Object.fromEntries(
+ Object.entries(p.answers as Record<string, unknown>).filter(
+ (entry): entry is [string, string] => typeof entry[1] === 'string'
+ )
+ )
+ : undefined
+
+ if (questions.length === 0 && !question) {
+ request.respond({ answer: '' })
+
+ return
+ }
+
+ if (questions.length === 0 && rawChoices != null && choices.length === 0) {
+ warnDroppedChoices('gateway', question, rawChoices)
+ }
+
+ const clarifyRequest =
+ questions.length > 0
+ ? {
+ choices: null,
+ lockedAnswers,
+ multiSelect: false,
+ question: '',
+ questions,
+ receivedAt: Date.now() / 1000,
+ requestId: request.id,
+ sessionId: sessionId || null
+ }
+ : {
+ choices: choices.length > 0 ? choices : null,
+ multiSelect,
+ question,
+ receivedAt: Date.now() / 1000,
+ requestId: request.id,
+ sessionId: sessionId || null
+ }
+
+ rememberServerRequest(request)
+ setClarifyRequest(clarifyRequest)
+
+ if (sessionId) {
+ // A resumed/hydrated transcript may already contain this provider's clarify
+ // call while carrying no live streamId. Re-arm that exact row instead of
+ // letting the generic stream mutator append a second card.
+ const occurredAt = Date.now() / 1000
+
+ deps.updateSessionState(sessionId, state => {
+ const projection = restorePendingClarifyToolCall(
+ state.messages,
+ pendingClarifyToolPayload(clarifyRequest),
+ occurredAt
+ )
+
+ return {
+ ...state,
+ messages: projection.messages,
+ streamId: projection.streamId,
+ sawAssistantPayload: true,
+ awaitingResponse: false,
+ needsInput: true
+ }
+ })
+
+ if (sessionId === deps.activeSessionIdRef.current) {
+ requestScrollToBottom(sessionId)
+ }
+ }
+
+ notifyInput(ctx, questions.length > 0 ? questions.map(q => q.question).join(' · ') : question)
+ }
+
+ const approval: Handler = ctx => {
+ const { request, sessionId } = ctx
+ const p = request.params
+ const command = str(p.command)
+ const description = str(p.description) || 'dangerous command'
+
+ rememberServerRequest(request)
+ void receiveApprovalRequest(null, {
+ // false only when a tirith warning forbids it; backend omits the field otherwise.
+ allowPermanent: p.allow_permanent !== false,
+ choices: Array.isArray(p.choices) ? p.choices.filter((choice): choice is string => typeof choice === 'string') : undefined,
+ command,
+ description,
+ // The approval queue's own id — `approval.pending` / `approval.received` / `approval.respond` key on it.
+ requestId: str(p.request_id) || undefined,
+ serverRequestId: request.id,
+ sessionId: sessionId || null,
+ smartDenied: p.smart_denied === true
+ }).catch(() => undefined)
+ markNeedsInput(ctx)
+
+ if (!request.replayed) {
+ dispatchNativeNotification({
+ actions: [
+ { id: 'approve', text: translateNow('notifications.native.approveAction') },
+ { id: 'reject', text: translateNow('notifications.native.rejectAction') }
+ ],
+ body: command || description,
+ kind: 'approval',
+ sessionId: sessionId || null,
+ title: translateNow('notifications.native.approvalTitle')
+ })
+ }
+ }
+
+ const sudo: Handler = ctx => {
+ rememberServerRequest(ctx.request)
+ setSudoRequest({ requestId: ctx.request.id, sessionId: ctx.sessionId || null })
+ markNeedsInput(ctx)
+ notifyInput(ctx, translateNow('notifications.native.inputBody'))
+ }
+
++/** Bot Screen package install (`tui_gateway/methods_display.py`): the same masked card as `sudo`,
++ * but app-level. The gateway sends it sessionless — it belongs to the connection that clicked
++ * Install, not to a chat — so it is stored under the null session and survives a chat switch. */
++const displayInstallSudo: Handler = ctx => {
++ rememberServerRequest(ctx.request)
++ setSudoRequest({
++ description: translateNow('prompts.sudoInstallDesc'),
++ requestId: ctx.request.id,
++ sessionId: null
++ })
++ notifyInput(ctx, translateNow('prompts.sudoInstallDesc'))
++}
++
+ const secret: Handler = ctx => {
+ const p = ctx.request.params
+ const envVar = str(p.env_var)
+ const promptText = str(p.prompt)
+
+ rememberServerRequest(ctx.request)
+ setSecretRequest({ envVar, prompt: promptText, requestId: ctx.request.id, sessionId: ctx.sessionId || null })
+ markNeedsInput(ctx)
+ notifyInput(ctx, promptText || envVar || translateNow('notifications.native.inputBody'))
+ }
+
+ const vaultCode: Handler = ctx => {
+ const p = ctx.request.params
+ const site = str(p.site)
+
+ rememberServerRequest(ctx.request)
+ setVaultCodeRequest({ hint: str(p.hint), requestId: ctx.request.id, sessionId: ctx.sessionId || null, site })
+ markNeedsInput(ctx)
+ notifyInput(ctx, translateNow('prompts.vaultCodeTitle', site))
+ }
+
+ const vaultSaveLogin: Handler = ctx => {
+ const p = ctx.request.params
+ const origin = str(p.origin)
+ const site = str(p.site) || origin
+
+ rememberServerRequest(ctx.request)
+ setVaultSaveLoginRequest({ origin, requestId: ctx.request.id, sessionId: ctx.sessionId || null, site })
+ markNeedsInput(ctx)
+ notifyInput(ctx, translateNow('prompts.vaultSaveTitle', site))
+ }
+
+ const vaultUnlockPrompt: Handler = ctx => {
+ const p = ctx.request.params
+ const backend = str(p.backend)
+ const displayName = str(p.display_name) || backend
+
+ rememberServerRequest(ctx.request)
+ setVaultUnlockRequest({ backend, displayName, requestId: ctx.request.id, sessionId: ctx.sessionId || null })
+ markNeedsInput(ctx)
+ notifyInput(ctx, translateNow('prompts.vaultUnlockTitle', displayName))
+ }
+
+ // ── Desktop-surface bridges (answered immediately, no card) ─────────────────
+
+ const terminalRead: Handler = ({ request }) => {
+ // read_terminal tool: serialize the renderer's xterm buffer. Empty = no live pane.
+ answerValue(request, readActiveTerminal({ count: num(request.params.count), start: num(request.params.start) }))
+ }
+
+ const previewRead: Handler = ({ request }) => {
+ // read_preview tool: the active preview tab's page text is async. Empty = nothing open.
+ void readActivePreview({ count: num(request.params.count), start: num(request.params.start) }).then(result =>
+ answerValue(request, result)
+ )
+ }
+
+ const previewAct: Handler = ({ isActiveSession, request, sessionId }) => {
+ // drive_preview tool: click/type/scroll/press inside the guest page. Active
+ // session only: a background turn must never reach into the page the user is
+ // working in (desktop AGENTS.md: offer, don't hijack). Every mounted window can
+ // observe the same request; a scoped mismatch belongs to another window, so
+ // answering here would race the owner — stay silent.
+ if (sessionId && !isActiveSession) {
+ return
+ }
+
+ const p = request.params
+
+ if (!isActiveSession) {
+ answerValue(request, {
+ error: 'The in-app browser only takes actions in the session the user is looking at.',
+ success: false
+ })
+
+ return
+ }
+
+ void loadPreviewEngine()
+ .then(run =>
+ run({
+ amount: p.amount as never,
+ key: p.key as never,
+ kind: (str(p.action) || '') as never,
+ max: p.max as never,
+ ref: p.ref as never,
+ selector: p.selector as never,
+ submit: p.submit as never,
+ text: p.text as never,
+ to: p.to as PreviewActAction['to']
+ })
+ )
+ .then(
+ result => answerValue(request, result),
+ error => answerValue(request, { error: error instanceof Error ? error.message : String(error), success: false })
+ )
+ }
+
+ const windowRead: Handler = ({ request }) => {
+ // read_window_below tool: main owns native window enumeration. Empty =
+ // unavailable (older shell without the handler, Wayland, …) — without an
+ // answer the tool would stall its full 30s deadline.
+ const read = window.hermesDesktop?.readWindowBelow
+
+ void Promise.resolve(read ? read() : null).then(
+ result => answerValue(request, result),
+ () => answerValue(request, null)
+ )
+ }
+
+ const tour: Handler = ({ isActiveSession, request, sessionId }) => {
+ // tour tool: one guided-tour action via driver.js, app DOM or preview guest
+ // page. Active session only, same window-ownership rule as preview.act.
+ if (sessionId && !isActiveSession) {
+ return
+ }
+
+ const p = request.params
+
+ if (!$toursEnabled.get()) {
+ // Refused in words, not silently dropped: a no-op would leave the agent
+ // narrating a spotlight the user can't see.
+ answerValue(request, { error: 'The user has turned guided tours off.', success: false })
+
+ return
+ }
+
+ if (!isActiveSession) {
+ answerValue(request, { error: 'Tours only run in the session the user is looking at.', success: false })
+
+ return
+ }
+
+ void import('@/lib/tour')
+ .then(({ runTour }) =>
+ runTour(
+ {
+ kind: (str(p.action) || 'stop') as TourAction['kind'],
+ selector: p.selector as never,
+ side: p.side as TourStep['side'],
+ startAt: p.step_index as never,
+ steps: p.steps as TourStep[] | undefined,
+ text: p.text as never,
+ title: p.title as never
+ },
+ p.surface === 'preview' ? 'preview' : 'app'
+ )
+ )
+ .then(
+ result => answerValue(request, result),
+ error => answerValue(request, { error: error instanceof Error ? error.message : String(error), success: false })
+ )
+ }
+
+ /** Method → handler. Every `ServerRequestMap` key the desktop answers. */
+ export const SERVER_REQUEST_HANDLERS: Record<string, Handler> = {
+ approval,
+ clarify,
++ 'display.install.sudo': displayInstallSudo,
+ 'preview.act': previewAct,
+ 'preview.read': previewRead,
+ secret,
+ sudo,
+ 'terminal.read': terminalRead,
+ tour,
+ 'vault.code': vaultCode,
+ 'vault.save_login': vaultSaveLogin,
+ 'vault.unlock_prompt': vaultUnlockPrompt,
+ 'window.read': windowRead
+ }
+
+ /** Dispatch one server→client request; false when the desktop has no handler for its method. */
+ export function handleServerRequest(
+ request: ScopedServerRequest,
+ deps: ServerRequestContext['deps'],
+ activeSessionId: null | string
+ ): boolean {
+ const handler = SERVER_REQUEST_HANDLERS[request.method]
+
+ if (!handler) {
+ return false
+ }
+
+ const sessionId = str(request.params.session_id)
+
+ handler({ deps, request, sessionId, isActiveSession: Boolean(sessionId) && sessionId === activeSessionId })
+
+ return true
+ }
diff --cc apps/desktop/src/plugins/hermes-bots/screen-connection.ts
index 90d29fc45bf,00000000000..e72d0b97e37
mode 100644,000000..100644
--- a/apps/desktop/src/plugins/hermes-bots/screen-connection.ts
+++ b/apps/desktop/src/plugins/hermes-bots/screen-connection.ts
@@@ -1,169 -1,0 +1,132 @@@
+/**
+ * Bot Screen — connection plumbing for a bot's Bot Desktop (the headless Xfce
+ * screen its computer_use drives on the gateway host).
+ *
+ * Two legs share one authenticated origin: JSON-RPC (`display.*`) rides the
+ * bot's pooled gateway socket through `host.requestProfile`; the RFB stream
+ * rides a SIBLING WebSocket to `/api/display/ws`, minted per attach by
+ * `display.observe` (single-use, 30 s). noVNC's Websock takes ownership of the
+ * socket it is handed, so it can never share the JSON-RPC one — same reason
+ * voice playback opens `/api/audio/speak-stream` beside `/api/ws`.
+ */
+
+import { host, resolveSiblingWsUrl } from '@hermes/plugin-sdk'
- import type { PluginProfileRoute, RpcEvent } from '@hermes/plugin-sdk'
++import type { DisplayLease, PluginProfileRoute, RpcEvent } from '@hermes/plugin-sdk'
+
+import { botConnectionRoute } from './routing'
+import type { RosterRow } from './types'
+
- export interface DisplayLease {
- holder: 'agent' | 'human'
- /** Raw holder id — only older backends still broadcast it; newer ones send `viewer_hash`. */
- viewer_id: null | string
- /** First 12 hex of sha256(viewer_id): names the holder without leaking a usable id. */
- viewer_hash?: null | string
- since: number
- reason: string
- /** Monotonic per transition; a lower epoch is an older snapshot, never newer truth. */
- epoch?: number
- }
-
- export interface DisplayStatus {
- profile: string
- profile_key: string
- supported: boolean
- installed: boolean
- missing: string[]
- running: boolean
- pid: null | number
- display: null | string
- socket: null | string
- geometry: string
- install_command: null | string
- lease: DisplayLease
- }
-
- export interface DisplayThumbnail {
- data_url: string | null
- /** Set while a human holds the screen: the frame is withheld, not missing. */
- suppressed?: 'human_has_control' | null
- }
-
- export interface DisplayObserveResult extends DisplayStatus {
- ticket: string
- path: string
- /** Server-minted per attach: the only id the lease will ever be compared against. */
- viewer_id: string
- }
++// Wire shapes come from the generated contract (Python is the source: `tui_gateway/contracts/display.py`).
++export type { DisplayLease, DisplayObserveResult, DisplayStatus, DisplayThumbnailResult as DisplayThumbnail } from '@hermes/plugin-sdk'
+
+/** This window's identity for one attach: the minted id plus its lease-payload hash. */
+export interface ScreenViewer {
+ id: string
+ hash: string
+}
+
+const VIEWER_HASH_HEX = 12
+
+/** `viewer_hash` as the lease broadcasts it: first 12 hex of sha256(viewer_id). */
+export async function viewerHash(viewerId: string): Promise<string> {
+ const digest = await crypto.subtle.digest('SHA-256', new TextEncoder().encode(viewerId))
+
+ return Array.from(new Uint8Array(digest), byte => byte.toString(16).padStart(2, '0'))
+ .join('')
+ .slice(0, VIEWER_HASH_HEX)
+}
+
- /** Does `viewer` (this window's attach) hold `lease`? Newer backends name the
- * holder by hash only; a payload still carrying the raw id is compared raw. */
++/** Does `viewer` (this window's attach) hold `lease`? The gateway names the holder by hash only
++ * (the raw id is a capability and never travels). */
+export function leaseHeldBy(lease: DisplayLease | null | undefined, viewer: ScreenViewer | null | undefined): boolean {
+ if (!lease || !viewer || lease.holder !== 'human') {
+ return false
+ }
+
- return lease.viewer_id != null ? lease.viewer_id === viewer.id : lease.viewer_hash === viewer.hash
++ return lease.viewer_hash === viewer.hash
+}
+
+/** JSON-RPC method-not-found: the bot's Hermes predates the `display.*` surface. */
+export function isDisplayUnavailable(error: unknown): boolean {
+ const record = typeof error === 'object' && error !== null ? (error as { code?: unknown; message?: unknown }) : null
+
+ if (record?.code === -32601) {
+ return true
+ }
+
+ const message = typeof record?.message === 'string' ? record.message.toLowerCase() : ''
+
+ return message.includes('method not found') || message.includes('method-not-found')
+}
+
+/** Bare-profile fallback so a v1 local bot (no registry route) still resolves. */
+export function botScreenRoute(bot: RosterRow): PluginProfileRoute | string {
+ return botConnectionRoute(bot) ?? bot.name
+}
+
+/**
+ * Does a `display.*` event belong to `bot`'s screen? Two hosts can share the same
+ * `~/.hermes` path, so the profile key alone is ambiguous: the event must also have
+ * arrived on the bot's registry connection (local/legacy events carry no tag).
+ */
+export function isEventForBotScreen(bot: RosterRow, event: RpcEvent, profileKey: null | string | undefined): boolean {
+ const payload = event.payload as { profile_key?: string } | undefined
+
+ if (!profileKey || payload?.profile_key !== profileKey) {
+ return false
+ }
+
+ const expected = botConnectionRoute(bot)?.connectionId ?? null
+ const actual = event.connectionId ?? null
+
+ return expected === actual || (expected === 'local' && actual === null)
+}
+
+export function displayRequest<T>(bot: RosterRow, method: string, params: Record<string, unknown> = {}): Promise<T> {
+ return host.requestProfile<T>(botScreenRoute(bot), method, params)
+}
+
+/**
+ * Hold the bot's pooled gateway socket open across a `display.*` sequence. The
+ * SDK disposes an inactive registry-routed socket once its request count hits
+ * zero, so without this the `display.install.*` / `display.lease` events that
+ * follow the request never arrive. Feature-detected: older hosts (and local
+ * routes, which never close) get a no-op release.
+ */
+export async function retainBotScreen(bot: RosterRow): Promise<() => void> {
+ const noop = () => undefined
+
+ if (typeof host.retainProfile !== 'function') {
+ return noop
+ }
+
+ try {
+ const release = await host.retainProfile(botScreenRoute(bot))
+
+ return typeof release === 'function' ? release : noop
+ } catch {
+ return noop
+ }
+}
+
+/**
+ * Resolve the RFB WebSocket URL for `bot`: the bot's gateway `/api/ws` origin
+ * (fresh credential for OAuth remotes) with the path swapped for the display
+ * bridge and the single-use display ticket attached.
+ */
+export async function resolveScreenWsUrl(bot: RosterRow, ticket: string): Promise<string> {
+ const route = botConnectionRoute(bot)
+
+ // The /api/ws credential authenticated the RPC that minted the display ticket;
+ // the bridge authenticates on the ticket alone, so the gateway credential is
+ // dropped rather than spending a second one-shot ticket.
+ const url = new URL(
+ await resolveSiblingWsUrl({ connectionId: route?.connectionId ?? null, profile: route?.profile ?? bot.name }, '/api/display/ws', {
+ stripGatewayCredential: true
+ })
+ )
+
+ url.searchParams.set('display_ticket', ticket)
+
+ return url.toString()
+}
diff --cc apps/desktop/src/plugins/hermes-bots/screen-hero.tsx
index 647b866d4e5,00000000000..c9029aebda3
mode 100644,000000..100644
--- a/apps/desktop/src/plugins/hermes-bots/screen-hero.tsx
+++ b/apps/desktop/src/plugins/hermes-bots/screen-hero.tsx
@@@ -1,167 -1,0 +1,167 @@@
+/**
+ * Screen hero — the big preview of a bot's computer at the top of its pane.
+ *
+ * Shows a live thumbnail (one `display.thumbnail` JPEG every few seconds while
+ * the screen runs and the hero is on screen), or an honest placeholder for
+ * stopped / not installed / unsupported. Clicking it opens the full Screen pane
+ * where the user can take over.
+ */
+
+import { Codicon } from '@hermes/plugin-sdk'
+import { useEffect, useRef, useState } from 'react'
+
+import { botSelectionKey } from './data'
+import { useBots } from './i18n'
+import { displayRequest, type DisplayThumbnail } from './screen-connection'
+import { openBotScreen } from './screen-open'
+import { type PortalTone, useScreenPortalState } from './screen-portal'
+import type { BotMeta, RosterRow } from './types'
+
+const REFRESH_MS = 4000
+const STALE_AFTER = 3
+
+function useLiveThumbnail(bot: RosterRow, running: boolean) {
+ const [dataUrl, setDataUrl] = useState<string | null>(null)
+ // Consecutive failed refreshes; past STALE_AFTER the frame is shown dimmed as "last seen" so a
+ // dead gateway never keeps looking live. Success resets it.
+ const [misses, setMisses] = useState(0)
+ // The backend withholds frames while a human holds the screen; that is a
+ // deliberate answer, not a failed refresh, so it never ages into "stale".
+ const [suppressed, setSuppressed] = useState(false)
+ const boxRef = useRef<HTMLButtonElement | null>(null)
+
+ useEffect(() => {
+ if (!running) {
+ setDataUrl(null)
+ setMisses(0)
+ setSuppressed(false)
+
+ return
+ }
+
+ let cancelled = false
+ let timer: number | null = null
+ let visible = true
+
+ const observer =
+ typeof IntersectionObserver === 'undefined'
+ ? null
+ : new IntersectionObserver(entries => {
+ visible = entries.some(entry => entry.isIntersecting)
+ })
+
+ if (observer && boxRef.current) {
+ observer.observe(boxRef.current)
+ }
+
+ const tick = () => {
+ if (cancelled) {
+ return
+ }
+
+ if (!visible || document.hidden) {
+ timer = window.setTimeout(tick, REFRESH_MS)
+
+ return
+ }
+
+ void displayRequest<DisplayThumbnail>(bot, 'display.thumbnail')
+ .then(result => {
+ if (!cancelled) {
- setDataUrl(result.data_url)
++ setDataUrl(result.data_url ?? null)
+ setSuppressed(result.suppressed === 'human_has_control')
+ setMisses(0)
+ }
+ })
+ .catch(() => {
+ if (!cancelled) {
+ setMisses(prev => prev + 1) // the last good frame stays up, marked stale past STALE_AFTER
+ }
+ })
+ .finally(() => {
+ if (!cancelled) {
+ timer = window.setTimeout(tick, REFRESH_MS)
+ }
+ })
+ }
+
+ tick()
+
+ return () => {
+ cancelled = true
+ observer?.disconnect()
+
+ if (timer !== null) {
+ window.clearTimeout(timer)
+ }
+ }
+ }, [bot, running])
+
+ return { dataUrl, boxRef, stale: misses >= STALE_AFTER, suppressed }
+}
+
+const TONE_RING: Partial<Record<PortalTone, string>> = {
+ human: 'ring-2 ring-red-500/80',
+ other: 'ring-2 ring-amber-500/70'
+}
+
+export function ScreenHero({ bot, meta }: { bot: RosterRow; meta?: BotMeta | null }) {
+ // A profile switch must discard the previous owner's pixels before painting.
+ return <ScreenHeroContent bot={bot} key={botSelectionKey(bot)} meta={meta} />
+}
+
+function ScreenHeroContent({ bot, meta }: { bot: RosterRow; meta?: BotMeta | null }) {
+ const t = useBots()
+ const { tone } = useScreenPortalState(bot)
+ const running = tone === 'live' || tone === 'human' || tone === 'other'
+ const { dataUrl, boxRef, stale, suppressed } = useLiveThumbnail(bot, running)
+
+ if (tone === 'unsupported' || tone === 'unavailable') {
+ return null
+ }
+
+ const caption = suppressed ? t.screen.heroSuppressed : stale ? t.screen.heroStale : {
+ live: t.screen.portalWatching,
+ human: t.screen.portalYouControl,
+ other: t.screen.portalOtherControls,
+ off: t.screen.heroStopped,
+ missing: t.screen.heroNotInstalled,
+ unsupported: t.screen.portalUnsupported,
+ unavailable: t.screen.portalUnavailable,
+ unknown: t.screen.heroConnecting
+ }[tone]
+
+ const cta = running ? t.screen.heroOpenLive : tone === 'missing' ? t.screen.heroInstall : tone === 'off' ? t.screen.heroStart : ''
+
+ return (
+ <button
+ aria-label={`${t.screen.portalTitle}: ${caption}`}
+ className={`group relative block w-full overflow-hidden rounded-lg border border-(--ui-stroke-secondary) bg-black text-left ${TONE_RING[tone] ?? ''}`}
+ onClick={() => openBotScreen(bot, meta ?? null)}
+ ref={boxRef}
+ style={{ aspectRatio: '16 / 10' }}
+ type="button"
+ >
+ {dataUrl ? (
+ <img alt="" className={stale ? 'absolute inset-0 size-full object-cover opacity-40 grayscale' : 'absolute inset-0 size-full object-cover'} draggable={false} src={dataUrl} />
+ ) : (
+ <span className="absolute inset-0 grid place-items-center bg-[radial-gradient(ellipse_at_center,rgba(255,255,255,0.08),transparent_70%)]">
+ <Codicon className="text-[2.25rem] text-white/30" name={running ? 'loading' : tone === 'missing' ? 'cloud-download' : 'vm'} />
+ </span>
+ )}
+
+ <span className="absolute inset-x-0 bottom-0 flex items-center gap-2 bg-gradient-to-t from-black/85 to-black/0 px-2.5 pb-2 pt-6 text-white">
+ <span className={`size-2 shrink-0 rounded-full ${running && !stale ? (tone === 'live' ? 'bg-emerald-400' : tone === 'human' ? 'bg-red-400' : 'bg-amber-400') : 'bg-white/40'}`} />
+ <span className="min-w-0 flex-1">
+ <span className="block truncate text-xs font-medium">{t.screen.portalTitle}</span>
+ <span className="block truncate text-[0.65rem] text-white/70">{caption}</span>
+ </span>
+ {cta ? (
+ <span className="flex shrink-0 items-center gap-1 rounded-md bg-white/15 px-2 py-1 text-[0.65rem] font-medium backdrop-blur-sm transition-colors group-hover:bg-white/25">
+ {cta} <Codicon name="arrow-right" />
+ </span>
+ ) : null}
+ </span>
+ </button>
+ )
+}
diff --cc apps/desktop/src/plugins/hermes-bots/screen-install-retention.test.tsx
index 7c8e1a32cda,00000000000..aabb93e6afb
mode 100644,000000..100644
--- a/apps/desktop/src/plugins/hermes-bots/screen-install-retention.test.tsx
+++ b/apps/desktop/src/plugins/hermes-bots/screen-install-retention.test.tsx
@@@ -1,133 -1,0 +1,133 @@@
+/**
+ * An INACTIVE registry-routed bot's pooled socket is disposed by the SDK as soon
+ * as its request count hits zero — so `display.install.log/done` (and the
+ * pane's `display.lease` events) would never arrive. The install card must hold
+ * a retention from before `display.install` until the done event lands.
+ */
+
+import { act, fireEvent, render } from '@testing-library/react'
+import { beforeEach, expect, it, vi } from 'vitest'
+
+import type { DisplayStatus } from './screen-connection'
+import type { RosterRow } from './types'
+
+const calls = vi.hoisted(() => [] as string[])
+
+vi.mock('@hermes/plugin-sdk', async () => {
+ const { onGatewayEvent } = await import('../../contrib/events')
+
+ return {
+ Button: ({ children, ...props }: React.ButtonHTMLAttributes<HTMLButtonElement>) => <button {...props}>{children}</button>,
+ Codicon: () => null,
+ GlyphSpinner: () => null,
+ resolveSiblingWsUrl: vi.fn(),
+ host: {
+ onEvent: onGatewayEvent,
+ requestProfile: vi.fn(async (_route: unknown, method: string) => {
+ calls.push(`request:${method}`)
+
+ return {}
+ }),
+ retainProfile: vi.fn(async () => {
+ calls.push('retain')
+
+ return () => {
+ calls.push('release')
+ }
+ })
+ }
+ }
+})
+vi.mock('./routing', () => ({
+ botConnectionRoute: () => ({ connectionId: 'host-a', profile: 'ops', targetProfile: 'ops' })
+}))
+vi.mock('./i18n', () => ({
+ useBots: () => ({
+ screen: {
+ notInstalledTitle: 'Missing',
+ notInstalledBody: 'Body',
+ installHint: 'Hint',
+ install: 'Install on host',
+ installing: 'Installing',
+ installCancelled: 'Cancelled',
+ installFailed: 'Failed',
+ noPackageManager: 'None'
+ }
+ })
+}))
+
+import { host } from '@hermes/plugin-sdk'
+
+// eslint-disable-next-line no-restricted-imports
+import { emitGatewayEvent } from '../../contrib/events'
+
+import { ScreenInstallCard } from './screen-install'
+
+const bot: RosterRow = { name: 'ops', sourceScoped: true, connectionId: 'host-a', connectionKind: 'remote' }
+
+const status: DisplayStatus = {
+ profile: 'ops',
+ profile_key: '/home/hermes/.hermes',
+ supported: true,
+ installed: false,
+ missing: ['tigervnc'],
+ running: false,
+ pid: null,
+ display: null,
+ socket: null,
+ geometry: '1440x900',
+ install_command: 'sudo apt-get install -y tigervnc-standalone-server',
- lease: { holder: 'agent', viewer_id: null, since: 1, reason: '' }
++ lease: { holder: 'agent', viewer_id: null, viewer_hash: null, since: 1, reason: '', epoch: 0 }
+}
+
+beforeEach(() => {
+ calls.length = 0
+})
+
+it('retains the bot socket before display.install and releases it when the done event lands', async () => {
+ const onInstalled = vi.fn()
+ const view = render(<ScreenInstallCard bot={bot} onInstalled={onInstalled} status={status} />)
+
+ await act(async () => {
+ fireEvent.click(view.getByText('Install on host'))
+ })
+ expect(calls).toEqual(['retain', 'request:display.install'])
+
+ act(() =>
+ emitGatewayEvent({
+ type: 'display.install.done',
+ connectionId: 'host-a',
+ profile: 'ops',
+ payload: { profile_key: status.profile_key, code: 0, status: { ...status, installed: true } }
+ })
+ )
+ expect(calls).toEqual(['retain', 'request:display.install', 'release'])
+ expect(onInstalled).toHaveBeenCalledTimes(1)
+ view.unmount()
+ // Unmount after done must not double-release.
+ expect(calls.filter(call => call === 'release')).toHaveLength(1)
+})
+
+it('an unmount while the retention is still pending releases it once and never sends display.install', async () => {
+ let grant: (() => void) | null = null
+ vi.mocked(host.retainProfile).mockImplementationOnce(
+ () =>
+ new Promise(resolve => {
+ grant = () => {
+ calls.push('retain')
+ resolve(() => {
+ calls.push('release')
+ })
+ }
+ })
+ )
+ const view = render(<ScreenInstallCard bot={bot} onInstalled={vi.fn()} status={status} />)
+
+ await act(async () => {
+ fireEvent.click(view.getByText('Install on host'))
+ })
+ view.unmount()
+ await act(async () => grant?.())
+ await act(async () => {})
+ expect(calls).toEqual(['retain', 'release'])
+})
diff --cc apps/desktop/src/plugins/hermes-bots/screen-install.tsx
index 72d2cbcf621,00000000000..38fddd44e26
mode 100644,000000..100644
--- a/apps/desktop/src/plugins/hermes-bots/screen-install.tsx
+++ b/apps/desktop/src/plugins/hermes-bots/screen-install.tsx
@@@ -1,142 -1,0 +1,142 @@@
+/**
+ * Bot Screen install card — installs the TigerVNC + Xfce packages on the bot's
+ * gateway host from inside Hermes Desktop.
+ *
+ * `display.install` starts the distro package command on the host; sudo, when
+ * needed, arrives as the same masked password card the terminal tool uses
- * (`display.install.sudo.request`), so the password never touches this pane.
++ * (the `display.install.sudo` server request), so the password never touches this pane.
+ * Output streams back as `display.install.log`; `display.install.done` carries
+ * a fresh status the caller uses to flip the pane to "Start screen".
+ */
+
+import { Button, Codicon, GlyphSpinner, host } from '@hermes/plugin-sdk'
+import type { RpcEvent } from '@hermes/plugin-sdk'
+import { useCallback, useEffect, useRef, useState } from 'react'
+
+import { useBots } from './i18n'
+import { displayRequest, type DisplayStatus, isEventForBotScreen, retainBotScreen } from './screen-connection'
+import type { RosterRow } from './types'
+
+const LOG_KEEP = 200
+
+interface ScreenInstallCardProps {
+ bot: RosterRow
+ status: DisplayStatus
+ onInstalled: (status: DisplayStatus) => void
+}
+
+export function ScreenInstallCard({ bot, status, onInstalled }: ScreenInstallCardProps) {
+ const t = useBots()
+ const [phase, setPhase] = useState<'idle' | 'running' | 'failed'>('idle')
+ const [log, setLog] = useState<string[]>([])
+ const [error, setError] = useState<null | string>(null)
+ const logEnd = useRef<HTMLDivElement>(null)
+ // Keeps the bot's socket open from display.install until done/failed: the log
+ // and done events ride that socket, and the SDK closes an idle one otherwise.
+ const retention = useRef<(() => void) | null>(null)
+ // Set by unmount: a retention that resolves after cleanup ran is released on the spot and
+ // the install it was pinning the socket for is never sent.
+ const unmounted = useRef(false)
+
+ const releaseRetention = useCallback(() => {
+ retention.current?.()
+ retention.current = null
+ }, [])
+
+ useEffect(
+ () => () => {
+ unmounted.current = true
+ releaseRetention()
+ },
+ [releaseRetention]
+ )
+
+ useEffect(() => {
+ logEnd.current?.scrollIntoView({ block: 'end' })
+ }, [log])
+
+ useEffect(() => {
+ const offLog = host.onEvent('display.install.log', (event: RpcEvent) => {
+ const payload = event.payload as { line?: string } | undefined
+
+ if (isEventForBotScreen(bot, event, status.profile_key) && typeof payload?.line === 'string') {
+ const line = payload.line
+ setLog(prev => (prev.length >= LOG_KEEP ? [...prev.slice(1), line] : [...prev, line]))
+ }
+ })
+
+ const offDone = host.onEvent('display.install.done', (event: RpcEvent) => {
+ const payload = event.payload as { code?: number; status?: DisplayStatus } | undefined
+
+ if (!payload || !isEventForBotScreen(bot, event, status.profile_key)) {
+ return
+ }
+
+ releaseRetention()
+
+ if (payload.code === 0 && payload.status?.installed) {
+ setPhase('idle')
+ onInstalled(payload.status)
+ } else {
+ setPhase('failed')
+ setError(payload.code === -1 ? t.screen.installCancelled : t.screen.installFailed)
+ }
+ })
+
+ return () => {
+ offLog()
+ offDone()
+ }
+ }, [bot, onInstalled, releaseRetention, status.profile_key, t.screen.installCancelled, t.screen.installFailed])
+
+ const install = useCallback(async () => {
+ setPhase('running')
+ setLog([])
+ setError(null)
+
+ try {
+ const retain = await retainBotScreen(bot)
+
+ if (unmounted.current) {
+ retain()
+
+ return
+ }
+
+ retention.current = retain
+ await displayRequest(bot, 'display.install')
+ } catch (err) {
+ releaseRetention()
+ setPhase('failed')
+ setError(err instanceof Error ? err.message : String(err))
+ }
+ }, [bot, releaseRetention])
+
+ return (
+ <div className="grid min-h-48 place-items-center p-6 text-center">
+ <div className="flex w-full max-w-lg flex-col gap-2">
+ <div className="text-sm font-medium">{t.screen.notInstalledTitle}</div>
+ <div className="text-xs text-muted-foreground">{t.screen.notInstalledBody}</div>
+ {status.install_command ? (
+ <code className="select-text break-all rounded bg-muted px-2 py-1 text-left text-xs">{status.install_command}</code>
+ ) : (
+ <div className="text-xs text-muted-foreground">{t.screen.noPackageManager}</div>
+ )}
+ {status.install_command ? (
+ <Button disabled={phase === 'running'} onClick={() => void install()} size="sm">
+ {phase === 'running' ? <GlyphSpinner /> : <Codicon name="cloud-download" />}
+ {phase === 'running' ? t.screen.installing : t.screen.install}
+ </Button>
+ ) : null}
+ {log.length > 0 ? (
+ <pre className="max-h-48 overflow-auto rounded bg-black/80 p-2 text-left font-mono text-[0.65rem] leading-tight text-white/85">
+ {log.join('\n')}
+ <div ref={logEnd} />
+ </pre>
+ ) : null}
+ {error ? <div className="text-xs text-red-500">{error}</div> : null}
+ <div className="text-xs text-muted-foreground">{t.screen.installHint}</div>
+ </div>
+ </div>
+ )
+}
diff --cc apps/desktop/src/plugins/hermes-bots/screen-isolation.test.tsx
index 7a43654c1ed,00000000000..e661d116a0c
mode 100644,000000..100644
--- a/apps/desktop/src/plugins/hermes-bots/screen-isolation.test.tsx
+++ b/apps/desktop/src/plugins/hermes-bots/screen-isolation.test.tsx
@@@ -1,214 -1,0 +1,214 @@@
+import { act, fireEvent, render, renderHook } from '@testing-library/react'
+import { afterEach, beforeEach, expect, it, vi } from 'vitest'
+
+import type { RosterRow } from './types'
+
+vi.mock('@hermes/plugin-sdk', async () => {
+ const { useStore } = await import('@nanostores/react')
+ const { onGatewayEvent } = await import('../../contrib/events')
+
+ return {
+ Codicon: () => null,
+ useValue: useStore,
+ resolveSiblingWsUrl: vi.fn(),
+ host: { onEvent: vi.fn(onGatewayEvent), requestProfile: vi.fn() }
+ }
+})
+vi.mock('./data', async () => {
+ const { atom } = await import('nanostores')
+
+ return {
+ $lastRoster: atom<RosterRow[]>([]),
+ botSelectionKey: (bot: RosterRow) =>
+ bot.sourceScoped || bot.remoteSource ? `${bot.connectionId}::${bot.name}` : bot.name
+ }
+})
+vi.mock('./i18n', () => ({
+ useBots: () => ({
+ screen: {
+ portalTitle: 'Screen',
+ portalWatching: 'Live',
+ portalYouControl: 'You control',
+ portalOtherControls: 'Other viewer',
+ heroOpenLive: 'Open live',
+ heroStale: 'Last seen',
+ heroSuppressed: 'Hidden while someone has control',
+ portalUnavailable: 'Update the bot',
+ heroConnecting: 'Connecting'
+ }
+ })
+}))
+vi.mock('./screen-open', () => ({ openBotScreen: vi.fn() }))
+
+import { host } from '@hermes/plugin-sdk'
+
+// Exercise the real event bus in this integration test, not a copied dispatcher.
+// eslint-disable-next-line no-restricted-imports
+import { emitGatewayEvent } from '../../contrib/events'
+
+import { $lastRoster } from './data'
+import type { DisplayStatus } from './screen-connection'
+import { ScreenHero } from './screen-hero'
+import { openBotScreen } from './screen-open'
+import { ProfileGroupScreenPortal, useScreenPortalState } from './screen-portal'
+import { $screenState, setScreenStatus } from './screen-state'
+
+const botA: RosterRow = { name: 'default', sourceScoped: true, connectionId: 'host-a', connectionKind: 'remote' }
+const botB: RosterRow = { ...botA, connectionId: 'host-b' }
+
+const status: DisplayStatus = {
+ profile: 'default',
+ profile_key: '/home/hermes/.hermes',
+ supported: true,
+ installed: true,
+ missing: [],
+ running: true,
+ pid: 42,
+ display: ':20',
+ socket: '/tmp/rfb.sock',
+ geometry: '1440x900',
+ install_command: null,
- lease: { holder: 'agent', viewer_id: null, since: 1, reason: '' }
++ lease: { holder: 'agent', viewer_id: null, viewer_hash: null, since: 1, reason: '', epoch: 0 }
+}
+
+beforeEach(() => {
+ $screenState.set({})
+ $lastRoster.set([])
+ vi.mocked(host.requestProfile).mockReset()
+ vi.mocked(openBotScreen).mockClear()
+ vi.spyOn(globalThis.document, 'hidden', 'get').mockReturnValue(false)
+})
+
+afterEach(() => {
+ vi.restoreAllMocks()
+ vi.useRealTimers()
+})
+
+it('applies lease events only from the owning host even when profile paths match', () => {
+ setScreenStatus(botA, status)
+ const view = renderHook(() => useScreenPortalState(botA))
- const human = { ...status.lease, holder: 'human' as const, viewer_id: 'this-viewer' }
++ const human = { ...status.lease, holder: 'human' as const, viewer_hash: 'e0f9a555d558', epoch: status.lease.epoch + 1 }
+
+ const emit = (connectionId: string, profileKey = status.profile_key) =>
+ act(() =>
+ emitGatewayEvent({
+ type: 'display.lease',
+ connectionId,
+ profile: 'default',
+ payload: { profile_key: profileKey, lease: human }
+ })
+ )
+
+ emit('host-b')
+ expect(view.result.current.lease?.holder).toBe('agent')
+ emit('host-a', '/another/profile')
+ expect(view.result.current.lease?.holder).toBe('agent')
+ emit('host-a')
+ expect(view.result.current.lease).toEqual(human)
+ view.unmount()
+})
+
+it('does not match a legacy profile group to a same-named remote bot', () => {
+ const legacy: RosterRow = { name: 'default' }
+ $lastRoster.set([botB, legacy])
+ setScreenStatus(botB, status)
+ setScreenStatus(legacy, status)
+ const view = render(<ProfileGroupScreenPortal route={{ connectionId: null, profile: 'default' }} />)
+
+ fireEvent.click(view.getByRole('button'))
+ expect(openBotScreen).toHaveBeenCalledWith(legacy, null)
+ view.rerender(<ProfileGroupScreenPortal route={{ connectionId: 'host-b', profile: 'default' }} />)
+ fireEvent.click(view.getByRole('button'))
+ expect(openBotScreen).toHaveBeenLastCalledWith(botB, null)
+ view.unmount()
+})
+
+it.each(['pending', 'rejected'])('never displays host A pixels under host B while B is %s', async state => {
+ setScreenStatus(botA, status)
+ setScreenStatus(botB, status)
+ vi.mocked(host.requestProfile)
+ .mockResolvedValueOnce({ data_url: 'data:image/jpeg;base64,HOST_A' })
+ .mockImplementationOnce(() => (state === 'pending' ? new Promise(() => {}) : Promise.reject(new Error('offline'))))
+ const view = render(<ScreenHero bot={botA} />)
+ await act(async () => {})
+ expect(view.container.querySelector('img')?.getAttribute('src')).toContain('HOST_A')
+
+ view.rerender(<ScreenHero bot={botB} />)
+ await act(async () => {})
+ expect(view.container.querySelector('img')).toBeNull()
+ view.unmount()
+})
+
+it('discards a late thumbnail from the previous owner and retains a same-owner frame on refresh failure', async () => {
+ vi.useFakeTimers()
+ setScreenStatus(botA, status)
+ setScreenStatus(botB, status)
+ let finishA!: (value: unknown) => void
+ vi.mocked(host.requestProfile)
+ .mockImplementationOnce(
+ () =>
+ new Promise(resolve => {
+ finishA = resolve
+ })
+ )
+ .mockResolvedValueOnce({ data_url: 'data:image/jpeg;base64,HOST_B' })
+ .mockRejectedValue(new Error('offline'))
+ const view = render(<ScreenHero bot={botA} />)
+ view.rerender(<ScreenHero bot={botB} />)
+ await act(async () => {})
+ await act(async () => {
+ finishA({ data_url: 'data:image/jpeg;base64,HOST_A' })
+ })
+ expect(view.container.querySelector('img')?.getAttribute('src')).toContain('HOST_B')
+ await act(async () => {
+ await vi.advanceTimersByTimeAsync(12_000)
+ })
+ expect(view.container.querySelector('img')?.getAttribute('src')).toContain('HOST_B')
+ expect(view.getByRole('button').getAttribute('aria-label')).toContain('Last seen')
+ view.unmount()
+})
+
+it('captions a suppressed thumbnail as hidden-while-controlled and never ages it into stale', async () => {
+ vi.useFakeTimers()
+ setScreenStatus(botA, status)
+ vi.mocked(host.requestProfile).mockResolvedValue({ data_url: null, suppressed: 'human_has_control' })
+ const view = render(<ScreenHero bot={botA} />)
+ await act(async () => {})
+ expect(view.getByRole('button').getAttribute('aria-label')).toContain('Hidden while someone has control')
+
+ await act(async () => {
+ await vi.advanceTimersByTimeAsync(20_000)
+ })
+ expect(view.getByRole('button').getAttribute('aria-label')).toContain('Hidden while someone has control')
+ expect(view.getByRole('button').getAttribute('aria-label')).not.toContain('Last seen')
+ view.unmount()
+})
+
+it('settles on an older backend without display.*: portal tone is unavailable and the hero renders nothing', async () => {
+ vi.mocked(host.requestProfile).mockRejectedValue(Object.assign(new Error('Method not found: display.status'), { code: -32601 }))
+ const hook = renderHook(() => useScreenPortalState(botA))
+ await act(async () => {})
+ expect(hook.result.current.tone).toBe('unavailable')
+ hook.rerender()
+ await act(async () => {})
+ expect(vi.mocked(host.requestProfile)).toHaveBeenCalledTimes(1)
+ hook.unmount()
+
+ const view = render(<ScreenHero bot={botA} />)
+ await act(async () => {})
+ expect(view.container.firstChild).toBeNull()
+ view.unmount()
+})
+
+it('a sidebar group portal keeps its lease subscription across parent re-renders (no per-paint row rebuild)', async () => {
+ vi.mocked(host.requestProfile).mockResolvedValue(status)
+ const view = render(<ProfileGroupScreenPortal route={{ connectionId: 'host-b', profile: 'default' }} />)
+ await act(async () => {})
+ const subscriptions = vi.mocked(host.onEvent).mock.calls.length
+
+ view.rerender(<ProfileGroupScreenPortal route={{ connectionId: 'host-b', profile: 'default' }} />)
+ view.rerender(<ProfileGroupScreenPortal route={{ connectionId: 'host-b', profile: 'default' }} />)
+ await act(async () => {})
+ expect(vi.mocked(host.onEvent).mock.calls.length).toBe(subscriptions)
+ view.unmount()
+})
diff --cc apps/desktop/src/plugins/hermes-bots/screen-pane-lifecycle.test.tsx
index aa57364cdd5,00000000000..b6a58345eeb
mode 100644,000000..100644
--- a/apps/desktop/src/plugins/hermes-bots/screen-pane-lifecycle.test.tsx
+++ b/apps/desktop/src/plugins/hermes-bots/screen-pane-lifecycle.test.tsx
@@@ -1,244 -1,0 +1,246 @@@
+import { act, fireEvent, render, waitFor } from '@testing-library/react'
+import { afterEach, beforeEach, expect, it, vi } from 'vitest'
+
+import type { DisplayStatus } from './screen-connection'
+import type * as ScreenConnection from './screen-connection'
+import type { RosterRow } from './types'
+
+const sockets = vi.hoisted(
+ () => [] as Array<{ closeCodes: number[]; closed: boolean; close: (code?: number) => void; serverClose: (code: number) => void }>
+)
+
+const rfbs = vi.hoisted(() => [] as Array<{ emit: (type: string, detail?: unknown) => void; viewOnly?: boolean }>)
+const retention = vi.hoisted(() => ({ held: 0 }))
+
+vi.mock('@hermes/plugin-sdk', async () => {
+ const { useStore } = await import('@nanostores/react')
+ const { onGatewayEvent } = await import('../../contrib/events')
+
+ return {
+ Button: ({ children, ...props }: React.ButtonHTMLAttributes<HTMLButtonElement>) => (
+ <button {...props}>{children}</button>
+ ),
+ Codicon: () => null,
+ GlyphSpinner: () => null,
+ EmptyState: () => null,
+ useValue: useStore,
+ host: {
+ onEvent: onGatewayEvent,
+ retainProfile: async () => {
+ retention.held += 1
+
+ return () => {
+ retention.held -= 1
+ }
+ }
+ }
+ }
+})
+vi.mock('./routing', () => ({
+ botConnectionRoute: () => ({ connectionId: 'host-a', profile: 'default', targetProfile: 'default' })
+}))
+vi.mock('./data', () => ({ botSelectionKey: (bot: RosterRow) => bot.name }))
+vi.mock('./i18n', () => ({
+ useBots: () => ({
+ screen: {
+ title: 'Screen',
+ controlTaken: 'Another viewer took control',
+ youControl: 'You control',
+ handBack: 'Hand back',
+ takeOver: 'Take over',
+ reconnect: 'Reconnect',
+ streamLost: 'Stream lost'
+ }
+ })
+}))
+vi.mock('./screen-connection', async importActual => ({
+ // Real pure helpers (viewerHash / leaseHeldBy); only the gateway legs are faked.
+ ...(await importActual<typeof ScreenConnection>()),
+ displayRequest: vi.fn(),
+ resolveScreenWsUrl: vi.fn(async () => 'ws://localhost/api/display/ws'),
+ isEventForBotScreen: () => false
+}))
+vi.mock('@novnc/novnc', () => ({
+ default: class {
+ private listeners = new Map<string, Array<(event: { detail?: unknown }) => void>>()
+ viewOnly = true
+ constructor(
+ _target: HTMLElement,
+ private socket: { close: () => void }
+ ) {
+ rfbs.push(this)
+ }
+ emit(type: string, detail?: unknown) {
+ for (const listener of this.listeners.get(type) ?? []) {
+ listener({ detail })
+ }
+ }
+ addEventListener(type: string, callback: (event: { detail?: unknown }) => void) {
+ this.listeners.set(type, [...(this.listeners.get(type) ?? []), callback])
+
+ if (type === 'connect') {
+ queueMicrotask(() => callback({}))
+ }
+ }
+ // noVNC 1.7 disconnects its WebSocket without a close code.
+ disconnect() {
+ this.socket.close()
+ }
+ focus() {}
+ }
+}))
+
+import { displayRequest } from './screen-connection'
+import { BotScreenPane } from './screen-pane'
+import { $screenState } from './screen-state'
+
+const bot: RosterRow = { name: 'default' }
+
+const status: DisplayStatus = {
+ profile: 'default',
+ profile_key: '/home/hermes/.hermes',
+ supported: true,
+ installed: true,
+ missing: [],
+ running: true,
+ pid: 42,
+ display: ':20',
+ socket: '/tmp/rfb.sock',
+ geometry: '1440x900',
+ install_command: null,
- lease: { holder: 'human', viewer_id: 'this-viewer', since: 1, reason: '' }
++ lease: { holder: 'human', viewer_id: null, viewer_hash: 'e0f9a555d558', since: 1, reason: '', epoch: 1 }
+}
+
+beforeEach(() => {
+ $screenState.set({})
+ sockets.length = 0
+ rfbs.length = 0
+ retention.held = 0
+ vi.mocked(displayRequest)
+ .mockReset()
+ .mockResolvedValue({ ...status, ticket: 'test-ticket', viewer_id: 'this-viewer' })
+ vi.stubGlobal(
+ 'WebSocket',
+ class {
+ closeCodes: number[] = []
+ closed = false
+ private onClose: Array<(event: { code: number }) => void> = []
+ constructor() {
+ sockets.push(this)
+ }
+ addEventListener(type: string, listener: (event: { code: number }) => void) {
+ if (type === 'close') {
+ this.onClose.push(listener)
+ }
+ }
+ // The bridge closing us: the raw close frame reaches our listener, then noVNC
+ // reports a statusless `disconnect` — the code is only on the socket event.
+ serverClose(code: number) {
+ this.closed = true
+
+ for (const listener of this.onClose) {
+ listener({ code })
+ }
+ }
+ close(code?: number) {
+ // Subsequent close calls cannot replace the frame already sent to the server.
+ if (this.closed) {
+ return
+ }
+
+ this.closed = true
+ this.closeCodes.push(code ?? 1005)
+ }
+ }
+ )
+})
+
+afterEach(() => vi.unstubAllGlobals())
+
+it('sends an intentional close before noVNC can send its statusless close on pane unmount', async () => {
+ const view = render(<BotScreenPane bot={bot} />)
+ await waitFor(() => expect(sockets).toHaveLength(1))
+ await act(async () => {})
+ view.unmount()
+ expect(sockets[0].closeCodes).toEqual([1000])
+})
+
+it('pins the bot socket for the attach lifetime and lets go on unmount', async () => {
+ const view = render(<BotScreenPane bot={bot} />)
+ await waitFor(() => expect(sockets).toHaveLength(1))
+ await act(async () => {})
+ expect(retention.held).toBe(1)
+ fireEvent.click(view.getByTitle('Reconnect'))
+ await waitFor(() => expect(sockets).toHaveLength(2))
+ expect(retention.held).toBe(1)
+ view.unmount()
+ expect(retention.held).toBe(0)
+})
+
+it('does not hand back while replacing a stream to reconnect the same viewer', async () => {
+ // The server mints a fresh id for a bare observe; only an observe that re-presents the minted id
+ // keeps it. Model that, so a pane that forgets its id visibly loses the lease it holds.
+ let minted = 0
+ vi.mocked(displayRequest).mockImplementation(async (_bot, method, params) => {
+ if (method !== 'display.observe') {
+ return { ...status, ticket: 'test-ticket', viewer_id: 'this-viewer' }
+ }
++
+ const presented = (params as { viewer_id?: string } | undefined)?.viewer_id
+ const viewer_id = presented === 'this-viewer' ? 'this-viewer' : minted++ === 0 ? 'this-viewer' : 'replacement-viewer'
++
+ return { ...status, ticket: 'test-ticket', viewer_id }
+ })
+ const view = render(<BotScreenPane bot={bot} />)
+ await waitFor(() => expect(sockets).toHaveLength(1))
+ await act(async () => {})
+ fireEvent.click(view.getByTitle('Reconnect'))
+ await waitFor(() => expect(sockets).toHaveLength(2))
+ expect(sockets[0].closeCodes).toEqual([1005])
+ expect(sockets[1].closed).toBe(false)
+ // Same viewer after the reconnect: the human's lease still belongs to this pane and it can hand back.
+ expect(rfbs[1].viewOnly).toBe(false)
+ view.unmount()
+})
+
+it('re-attaches in watch mode after the bridge evicts us with 4000, with a bounded retry budget', async () => {
+ const view = render(<BotScreenPane bot={bot} />)
+ await waitFor(() => expect(sockets).toHaveLength(1))
+ await act(async () => {})
+ const observes = () => vi.mocked(displayRequest).mock.calls.filter(([, method]) => method === 'display.observe').length
+ expect(observes()).toBe(1)
+
+ act(() => {
+ sockets[0].serverClose(4000)
+ rfbs[0].emit('disconnect', { clean: true })
+ })
+ // The caption is informational; the stream itself must come back on a fresh ticket,
+ // not sit frozen on a dead socket until the user finds Reconnect.
+ expect(view.getByText('Another viewer took control')).toBeTruthy()
+ await waitFor(() => expect(sockets).toHaveLength(2))
+ expect(observes()).toBe(2)
+ await act(async () => {})
+ expect(view.queryByText('Another viewer took control')).toBeNull()
+
+ // A bridge that evicts every fresh attach must not become a tight observe loop: after a
+ // bounded run of rapid evictions the pane lands in the error state with Reconnect.
+ const evictLatest = async () => {
+ await waitFor(() => expect(sockets.at(-1)?.closed).toBe(false))
+ const index = sockets.length - 1
+ act(() => {
+ sockets[index].serverClose(4000)
+ rfbs[index].emit('disconnect', { clean: true })
+ })
+ await act(async () => {})
+ }
+
+ for (let round = 0; round < 3; round += 1) {
+ await evictLatest()
+ }
+
+ await act(async () => new Promise(resolve => setTimeout(resolve, 20)))
+ expect(observes()).toBe(4)
+ expect(sockets.at(-1)?.closed).toBe(true)
+ expect(view.getByTitle('Reconnect').closest('button')?.disabled).toBe(false)
+ view.unmount()
+})
diff --cc apps/desktop/src/plugins/hermes-bots/screen-pane-status-events.test.tsx
index 9ff71c7f30e,00000000000..98bea525ca0
mode 100644,000000..100644
--- a/apps/desktop/src/plugins/hermes-bots/screen-pane-status-events.test.tsx
+++ b/apps/desktop/src/plugins/hermes-bots/screen-pane-status-events.test.tsx
@@@ -1,115 -1,0 +1,115 @@@
+/**
+ * The pane paints a cache of backend truth. A start or stop made outside this
+ * window (CLI, gateway auto-start, another Desktop) reaches the renderer only
+ * as a pushed `display.status` event — a stopped pane with no sibling portal
+ * or hero mounted must pick it up itself or it stays "Stopped" forever.
+ */
+
+import { act, render, waitFor } from '@testing-library/react'
+import { afterEach, beforeEach, expect, it, vi } from 'vitest'
+
+import type { DisplayStatus } from './screen-connection'
+import type * as ScreenConnection from './screen-connection'
+import type { RosterRow } from './types'
+
+vi.mock('@hermes/plugin-sdk', async () => {
+ const { useStore } = await import('@nanostores/react')
+ const { onGatewayEvent } = await import('../../contrib/events')
+
+ return {
+ Button: ({ children, ...props }: React.ButtonHTMLAttributes<HTMLButtonElement>) => <button {...props}>{children}</button>,
+ Codicon: () => null,
+ GlyphSpinner: () => null,
+ EmptyState: () => null,
+ useValue: useStore,
+ host: { onEvent: onGatewayEvent }
+ }
+})
+vi.mock('./routing', () => ({
+ botConnectionRoute: () => ({ connectionId: 'host-a', profile: 'ops', targetProfile: 'ops' })
+}))
+vi.mock('./data', () => ({ botSelectionKey: (bot: RosterRow) => bot.name }))
+vi.mock('./i18n', () => ({
+ useBots: () => ({
+ screen: {
+ title: 'Screen',
+ stoppedTitle: 'Stopped',
+ stoppedBody: 'Body',
+ start: 'Start',
+ agentControls: 'Bot controls',
+ takeOver: 'Take over',
+ reconnect: 'Reconnect',
+ streamLost: 'Stream lost'
+ }
+ })
+}))
+vi.mock('./screen-connection', async importActual => ({
+ // Real predicate (`isEventForBotScreen`): the event must come from the bot's host.
+ ...(await importActual<typeof ScreenConnection>()),
+ displayRequest: vi.fn(),
+ resolveScreenWsUrl: vi.fn(async () => 'ws://localhost/api/display/ws')
+}))
+vi.mock('@novnc/novnc', () => ({
+ default: class {
+ addEventListener() {}
+ disconnect() {}
+ focus() {}
+ }
+}))
+
+// eslint-disable-next-line no-restricted-imports
+import { emitGatewayEvent } from '../../contrib/events'
+
+import { displayRequest } from './screen-connection'
+import { BotScreenPane } from './screen-pane'
+import { $screenState } from './screen-state'
+
+const bot: RosterRow = { name: 'ops', sourceScoped: true, connectionId: 'host-a', connectionKind: 'remote' }
+
+const stopped: DisplayStatus = {
+ profile: 'ops',
+ profile_key: '/home/hermes/.hermes',
+ supported: true,
+ installed: true,
+ missing: [],
+ running: false,
+ pid: null,
+ display: null,
+ socket: null,
+ geometry: '1440x900',
+ install_command: null,
- lease: { holder: 'agent', viewer_id: null, viewer_hash: null, since: 1, reason: '' }
++ lease: { holder: 'agent', viewer_id: null, viewer_hash: null, since: 1, reason: '', epoch: 0 }
+}
+
+const running: DisplayStatus = { ...stopped, running: true, pid: 42, display: ':20' }
+
+beforeEach(() => {
+ $screenState.set({})
+ vi.mocked(displayRequest)
+ .mockReset()
+ .mockImplementation(async (_bot, method) => (method === 'display.observe' ? { ...running, ticket: 't', viewer_id: 'v1' } : stopped))
+ vi.stubGlobal(
+ 'WebSocket',
+ class {
+ binaryType = ''
+ addEventListener() {}
+ close() {}
+ }
+ )
+})
+
+afterEach(() => vi.unstubAllGlobals())
+
+it('a stopped pane learns of an external start from the pushed display.status event and attaches', async () => {
+ const view = render(<BotScreenPane bot={bot} />)
+ await waitFor(() => expect(view.getByText('Stopped')).toBeTruthy())
+
+ // Another host's event about the same profile path is not ours.
+ act(() => emitGatewayEvent({ type: 'display.status', connectionId: 'host-b', profile: 'ops', payload: running }))
+ expect(view.getByText('Stopped')).toBeTruthy()
+
+ act(() => emitGatewayEvent({ type: 'display.status', connectionId: 'host-a', profile: 'ops', payload: running }))
+ await waitFor(() => expect(vi.mocked(displayRequest)).toHaveBeenCalledWith(bot, 'display.observe', expect.anything()))
+ expect(view.queryByText('Stopped')).toBeNull()
+ view.unmount()
+})
diff --cc apps/desktop/src/plugins/hermes-bots/screen-state.test.ts
index f0681c22654,00000000000..4759bf2ec3e
mode 100644,000000..100644
--- a/apps/desktop/src/plugins/hermes-bots/screen-state.test.ts
+++ b/apps/desktop/src/plugins/hermes-bots/screen-state.test.ts
@@@ -1,89 -1,0 +1,85 @@@
+/**
+ * Lease ordering: `display.lease` events and `display.status` replies race on
+ * the wire. A slower status reply describing an OLDER lease must never roll
+ * back the newer event — the backend's monotonic `epoch` is the tiebreak.
+ */
+
+import { beforeEach, describe, expect, it, vi } from 'vitest'
+
+import type { DisplayLease, DisplayStatus } from './screen-connection'
+import type { RosterRow } from './types'
+
+vi.mock('./data', () => ({ botSelectionKey: (bot: RosterRow) => bot.name }))
+
+import { $screenState, beginScreenStatusRequest, screenStateFor, setScreenLease, setScreenStatus } from './screen-state'
+
+const bot: RosterRow = { name: 'ops' }
+
+const agent: DisplayLease = { holder: 'agent', viewer_id: null, viewer_hash: null, since: 1, reason: '', epoch: 3 }
+const human: DisplayLease = { ...agent, holder: 'human', viewer_hash: 'abc123abc123', epoch: 4 }
+
+const statusWith = (lease: DisplayLease): DisplayStatus => ({
+ profile: 'ops',
+ profile_key: '/home/hermes/.hermes',
+ supported: true,
+ installed: true,
+ missing: [],
+ running: true,
+ pid: 1,
+ display: ':20',
+ socket: null,
+ geometry: '1440x900',
+ install_command: null,
+ lease
+})
+
+beforeEach(() => $screenState.set({}))
+
+describe('lease epoch ordering', () => {
+ it('a status reply carrying an older epoch does not roll back a newer lease event', () => {
+ setScreenLease(bot, human)
+ setScreenStatus(bot, statusWith(agent))
+
+ expect(screenStateFor($screenState.get(), bot)?.lease).toEqual(human)
+ // The status itself still lands — only its stale lease is ignored.
+ expect(screenStateFor($screenState.get(), bot)?.status?.running).toBe(true)
+ })
+
- it('a lease event with an older epoch is ignored; a newer or epoch-less one applies', () => {
++ it('a lease event with an older epoch is ignored; a newer one applies', () => {
+ setScreenLease(bot, human)
+ setScreenLease(bot, agent)
+ expect(screenStateFor($screenState.get(), bot)?.lease).toEqual(human)
+
+ const released = { ...agent, epoch: 5 }
+ setScreenLease(bot, released)
+ expect(screenStateFor($screenState.get(), bot)?.lease).toEqual(released)
-
- const legacy = { ...human, epoch: undefined }
- setScreenLease(bot, legacy)
- expect(screenStateFor($screenState.get(), bot)?.lease).toEqual(legacy)
+ })
+
+ it('an unchanged-looking lease still advances the cached epoch, so a delayed older takeover is rejected', () => {
+ // agent@0 → agent@2 (a take-over and hand-back that both happened before we looked) must leave epoch 2
+ // recorded even though nothing visible changed; otherwise the late human@1 event wins and the pane shows
+ // a human holding a screen the agent already has back.
+ setScreenLease(bot, { ...agent, epoch: 0 })
+ setScreenLease(bot, { ...agent, epoch: 2 })
+ setScreenLease(bot, { ...human, epoch: 1 })
+ expect(screenStateFor($screenState.get(), bot)?.lease?.holder).toBe('agent')
+ expect(screenStateFor($screenState.get(), bot)?.lease?.epoch).toBe(2)
+ })
+})
+
+describe('status request ordering', () => {
+ it('a slower reply from a superseded status request never overwrites newer truth', () => {
+ const stale = beginScreenStatusRequest(bot)
+ const fresh = beginScreenStatusRequest(bot)
+
+ setScreenStatus(bot, { ...statusWith(agent), running: false }, fresh)
+ setScreenStatus(bot, statusWith(agent), stale)
+ expect(screenStateFor($screenState.get(), bot)?.status?.running).toBe(false)
+
+ // A pushed event is newer than anything still in flight.
+ const inFlight = beginScreenStatusRequest(bot)
+ setScreenStatus(bot, statusWith(agent))
+ setScreenStatus(bot, { ...statusWith(agent), running: false }, inFlight)
+ expect(screenStateFor($screenState.get(), bot)?.status?.running).toBe(true)
+ })
+})
diff --cc apps/desktop/src/plugins/hermes-bots/screen-state.ts
index fb0a6dddd76,00000000000..2ceff78de4b
mode 100644,000000..100644
--- a/apps/desktop/src/plugins/hermes-bots/screen-state.ts
+++ b/apps/desktop/src/plugins/hermes-bots/screen-state.ts
@@@ -1,116 -1,0 +1,114 @@@
+/**
+ * Per-bot Bot Screen cache: backend truth (`display.status`) plus the last
+ * `display.lease` event, keyed by the bot's roster identity. Renderer-owned
+ * cache of backend state — never the authority.
+ */
+
+import { atom } from 'nanostores'
+
+import { botSelectionKey } from './data'
+import type { DisplayLease, DisplayStatus, ScreenViewer } from './screen-connection'
+import type { RosterRow } from './types'
+
+export interface BotScreenState {
+ status: DisplayStatus | null
+ lease: DisplayLease | null
+ /** This window's server-minted identity for the bot's current attach; null until the pane observes. */
+ viewer: ScreenViewer | null
+ /** The bot's Hermes has no `display.*` methods (older backend): nothing to check, ever. */
+ unavailable?: boolean
+}
+
+export const $screenState = atom<Record<string, BotScreenState>>({})
+
+export function screenStateFor(all: Record<string, BotScreenState>, bot: RosterRow): BotScreenState | null {
+ return all[botSelectionKey(bot)] ?? null
+}
+
+/** A lease whose epoch is below the one we hold is a slower response about the
- * past (a `display.status` reply overtaken by a `display.lease` event). Payloads
- * without an epoch — older backends — are always applied. */
++ * past (a `display.status` reply overtaken by a `display.lease` event). */
+function isOlderLease(prev: DisplayLease | null | undefined, next: DisplayLease): boolean {
- return typeof next.epoch === 'number' && typeof prev?.epoch === 'number' && next.epoch < prev.epoch
++ return prev != null && next.epoch < prev.epoch
+}
+
+/**
+ * Per-bot generation of the latest `display.status`-shaped write. A request
+ * takes a token from `beginScreenStatusRequest` and hands it back with its
+ * reply; a reply whose token was superseded (a newer request, a pushed event,
+ * a start/observe result) is a slower answer about the past and is dropped.
+ */
+const statusGeneration = new Map<string, number>()
+
+export function beginScreenStatusRequest(bot: RosterRow): number {
+ const key = botSelectionKey(bot)
+ const next = (statusGeneration.get(key) ?? 0) + 1
+ statusGeneration.set(key, next)
+
+ return next
+}
+
+/** Apply a status snapshot. Without `request` the write is authoritative (an event or a fresh
+ * mutation result) and invalidates every status request still in flight. */
+export function setScreenStatus(bot: RosterRow, status: DisplayStatus, request?: number): void {
+ const key = botSelectionKey(bot)
+
+ if (request === undefined) {
+ statusGeneration.set(key, (statusGeneration.get(key) ?? 0) + 1)
+ } else if (request !== statusGeneration.get(key)) {
+ return
+ }
+
+ const current = $screenState.get()
+ const prev = current[key]
+ const lease = status.lease && !isOlderLease(prev?.lease, status.lease) ? status.lease : (prev?.lease ?? null)
+ $screenState.set({ ...current, [key]: { status, lease, viewer: prev?.viewer ?? null } })
+}
+
+/** `display.status` answered method-not-found: remember it so no surface keeps "checking". */
+export function setScreenUnavailable(bot: RosterRow): void {
+ const key = botSelectionKey(bot)
+ const current = $screenState.get()
+ const prev = current[key]
+
+ if (prev?.unavailable) {
+ return
+ }
+
+ $screenState.set({ ...current, [key]: { status: null, lease: null, viewer: null, unavailable: true } })
+}
+
+export function setScreenLease(bot: RosterRow, lease: DisplayLease): void {
+ const key = botSelectionKey(bot)
+ const current = $screenState.get()
+ const prev = current[key]
+
+ if (isOlderLease(prev?.lease, lease)) {
+ return
+ }
+
+ if (
+ prev?.lease &&
+ prev.lease.holder === lease.holder &&
- prev.lease.viewer_id === lease.viewer_id &&
+ prev.lease.viewer_hash === lease.viewer_hash &&
+ prev.lease.epoch === lease.epoch
+ ) {
+ return
+ }
+
+ // Same presentation, newer epoch still has to be recorded: otherwise a delayed older event (human@1
+ // after agent@0 → agent@2) compares against the stale epoch and rolls the pane back.
+ $screenState.set({ ...current, [key]: { status: prev?.status ?? null, lease, viewer: prev?.viewer ?? null } })
+}
+
+/** Record the identity `display.observe` minted for this window's attach to `bot`. */
+export function setScreenViewer(bot: RosterRow, viewer: ScreenViewer | null): void {
+ const key = botSelectionKey(bot)
+ const current = $screenState.get()
+ const prev = current[key]
+
+ if ((prev?.viewer ?? null) === viewer) {
+ return
+ }
+
+ $screenState.set({ ...current, [key]: { status: prev?.status ?? null, lease: prev?.lease ?? null, viewer } })
+}
diff --cc apps/desktop/src/plugins/hermes-bots/screen-viewer-identity.test.tsx
index fa660132bcc,00000000000..cf132dbb4e8
mode 100644,000000..100644
--- a/apps/desktop/src/plugins/hermes-bots/screen-viewer-identity.test.tsx
+++ b/apps/desktop/src/plugins/hermes-bots/screen-viewer-identity.test.tsx
@@@ -1,173 -1,0 +1,173 @@@
+/**
+ * Viewer identity is SERVER-MINTED: `display.observe` returns the id this attach
+ * is known by, and lease payloads name the holder by `viewer_hash`
+ * (sha256(viewer_id)[:12]) rather than the raw id. "I hold" must be derived
+ * from the minted id, never from a client-generated constant — otherwise a
+ * Desktop reload could claim (or lose) control it does not have.
+ */
+
+import { act, render, waitFor } from '@testing-library/react'
+import { afterEach, beforeEach, expect, it, vi } from 'vitest'
+
+import type { DisplayStatus } from './screen-connection'
+import type * as ScreenConnection from './screen-connection'
+import type { RosterRow } from './types'
+
+vi.mock('@hermes/plugin-sdk', async () => {
+ const { useStore } = await import('@nanostores/react')
+ const { onGatewayEvent } = await import('../../contrib/events')
+
+ return {
+ Button: ({ children, ...props }: React.ButtonHTMLAttributes<HTMLButtonElement>) => <button {...props}>{children}</button>,
+ Codicon: () => null,
+ GlyphSpinner: () => null,
+ EmptyState: () => null,
+ useValue: useStore,
+ host: { onEvent: onGatewayEvent }
+ }
+})
+vi.mock('./data', () => ({ botSelectionKey: (bot: RosterRow) => bot.name }))
+vi.mock('./i18n', () => ({
+ useBots: () => ({
+ screen: {
+ title: 'Screen',
+ youControl: 'You control',
+ otherControls: 'Other controls',
+ agentControls: 'Bot controls',
+ handBack: 'Hand back',
+ handBackForce: 'Hand back (force)',
+ handBackForceHint: 'Force',
+ takeOver: 'Take over',
+ reconnect: 'Reconnect',
+ streamLost: 'Stream lost'
+ }
+ })
+}))
+vi.mock('./screen-connection', async importActual => ({
+ ...(await importActual<typeof ScreenConnection>()),
+ displayRequest: vi.fn(),
+ resolveScreenWsUrl: vi.fn(async () => 'ws://localhost/api/display/ws'),
+ isEventForBotScreen: () => true
+}))
+vi.mock('@novnc/novnc', () => ({
+ default: class {
+ addEventListener() {}
+ disconnect() {}
+ focus() {}
+ }
+}))
+
+// Real event bus, so the pane's listener path is the one under test.
+// eslint-disable-next-line no-restricted-imports
+import { emitGatewayEvent } from '../../contrib/events'
+
+import { displayRequest, viewerHash } from './screen-connection'
+import { BotScreenPane } from './screen-pane'
+import { $screenState } from './screen-state'
+
+const bot: RosterRow = { name: 'default' }
+const MINTED = 'srv-viewer-0001'
+
+const status: DisplayStatus = {
+ profile: 'default',
+ profile_key: '/home/hermes/.hermes',
+ supported: true,
+ installed: true,
+ missing: [],
+ running: true,
+ pid: 42,
+ display: ':20',
+ socket: '/tmp/rfb.sock',
+ geometry: '1440x900',
+ install_command: null,
- lease: { holder: 'agent', viewer_id: null, viewer_hash: null, since: 1, reason: '' }
++ lease: { holder: 'agent', viewer_id: null, viewer_hash: null, since: 1, reason: '', epoch: 0 }
+}
+
+beforeEach(() => {
+ $screenState.set({})
+ vi.mocked(displayRequest)
+ .mockReset()
+ .mockImplementation(async (_bot, method) =>
+ method === 'display.observe' ? { ...status, ticket: 'test-ticket', viewer_id: MINTED } : status
+ )
+ vi.stubGlobal(
+ 'WebSocket',
+ class {
+ binaryType = ''
+ close() {}
+ }
+ )
+})
+
+afterEach(() => vi.unstubAllGlobals())
+
+const emitLease = (viewer_hash: string) =>
+ act(() =>
+ emitGatewayEvent({
+ type: 'display.lease',
+ payload: { profile_key: status.profile_key, lease: { ...status.lease, holder: 'human', viewer_hash } }
+ })
+ )
+
+it('holds control when the lease names the hash of the server-minted viewer id, not when it names another', async () => {
+ const view = render(<BotScreenPane bot={bot} />)
+ await waitFor(() => expect(vi.mocked(displayRequest)).toHaveBeenCalledWith(bot, 'display.observe', expect.anything()))
+ await act(async () => {})
+
+ emitLease(await viewerHash('someone-else'))
+ expect(view.queryByText('You control')).toBeNull()
+ expect(view.getByText('Other controls')).toBeTruthy()
+
+ emitLease(await viewerHash(MINTED))
+ expect(view.getByText('You control')).toBeTruthy()
+ view.unmount()
+})
+
+it('hands back with the minted id, never a client-generated one', async () => {
+ const view = render(<BotScreenPane bot={bot} />)
+ await waitFor(() => expect(vi.mocked(displayRequest)).toHaveBeenCalledWith(bot, 'display.observe', expect.anything()))
+ await act(async () => {})
+ emitLease(await viewerHash(MINTED))
+
+ await act(async () => {
+ view.getByText('Hand back').click()
+ })
+ expect(vi.mocked(displayRequest)).toHaveBeenCalledWith(bot, 'display.lease.release', { viewer_id: MINTED })
+ view.unmount()
+})
+
+it('offers a forced hand-back for a human lease this window does not hold, sending {force: true} and no viewer id', async () => {
+ const view = render(<BotScreenPane bot={bot} />)
+ await waitFor(() => expect(vi.mocked(displayRequest)).toHaveBeenCalledWith(bot, 'display.observe', expect.anything()))
+ await act(async () => {})
+
+ emitLease(await viewerHash(MINTED))
+ expect(view.queryByText('Hand back (force)')).toBeNull()
+
+ emitLease(await viewerHash('viewer-from-before-the-reload'))
+ await act(async () => {
+ view.getByText('Hand back (force)').click()
+ })
+ expect(vi.mocked(displayRequest)).toHaveBeenCalledWith(bot, 'display.lease.release', { force: true })
+ view.unmount()
+})
+
+it('does not offer Take over while no server-minted viewer id exists, even once the attach has settled', async () => {
+ vi.mocked(displayRequest).mockImplementation((_bot, method) =>
+ method === 'display.observe' ? Promise.reject(new Error('ticket refused')) : Promise.resolve(status)
+ )
+ const view = render(<BotScreenPane bot={bot} />)
+ await waitFor(() => expect(view.getByText('ticket refused')).toBeTruthy())
+ // The attach failed before observe minted an id: a Take over now would send an empty
+ // viewer_id and the server would answer "viewer_id required" — a dead end.
+ expect(view.getByText('Take over').closest('button')?.disabled).toBe(true)
+
+ vi.mocked(displayRequest).mockImplementation(async (_bot, method) =>
+ method === 'display.observe' ? { ...status, ticket: 'test-ticket', viewer_id: MINTED } : status
+ )
+ await act(async () => {
+ view.getByTitle('Reconnect').click()
+ })
+ await waitFor(() => expect(view.getByText('Take over').closest('button')?.disabled).toBe(false))
+ view.unmount()
+})
diff --cc apps/desktop/src/sdk/index.ts
index 1d1ee055e47,69a8c2b04cf..be48d92776b
--- a/apps/desktop/src/sdk/index.ts
+++ b/apps/desktop/src/sdk/index.ts
@@@ -1794,6 -1778,20 +1789,22 @@@ export { THEMES_AREA } from '@/themes/u
export type { StatusResponse } from '@/types/hermes'
/** Public SDK name for the shared gateway wire event; kept stable for plugins. */
export type { GatewayEvent as RpcEvent } from '@hermes/shared'
++/** Bot Screen wire shapes, generated from `tui_gateway/contracts/display.py`. */
++export type { DisplayLease, DisplayObserveResult, DisplayStatus, DisplayThumbnailResult } from '@hermes/shared'
+ /** THE compact-number formatter — every user-facing count/token figure goes
+ * through here (1230 → "1.2k", 1_500_000 → "1.5M"). Don't hand-roll `/1000`. */
+ export { compactNumber } from '@hermes/shared'
+ /** Hermes' reasoning levels, so a plugin surfacing a thinking depth uses the
+ * same scale as the rest of the app (labels: `reasoningEffortLabel`). */
+ export {
+ DEFAULT_REASONING_EFFORT,
+ REASONING_EFFORT_VALUES,
+ REASONING_EFFORTS,
+ type ReasoningEffort
+ } from '@hermes/shared'
+ /** WCAG contrast, from the sRGB primitives shared with the TUI (`null` for
+ * an unparseable colour, never a fake 0). */
+ export { contrastRatio } from '@hermes/shared/color'
/** Subscribe a component to a `host.state` atom. */
export { useStore as useValue } from '@nanostores/react'
/** The app's data-fetching layer. Plugins share the ONE QueryClient mounted at
diff --cc apps/desktop/src/store/prompts.ts
index 9de2c842dda,489b45d55db..99c48448020
--- a/apps/desktop/src/store/prompts.ts
+++ b/apps/desktop/src/store/prompts.ts
@@@ -101,15 -104,6 +107,10 @@@ interface PendingApprovalPayload
export interface SudoRequest extends KeyedPrompt {
requestId: string
- /** JSON-RPC method that resolves this request; the terminal tool's `sudo.respond` by default,
- * `display.install.sudo.respond` for a Bot Screen package install. */
- respondMethod?: string
- /** Description override so the card can say WHAT the password is for. */
++ /** Description override so the card can say WHAT the password is for (the Bot Screen install).
++ * The reply travels as a JSON-RPC response on the socket the request arrived on, so a password
++ * typed for host A can never reach host B without any origin bookkeeping here. */
+ description?: string
- /** Immutable origin of the request. The reply is sent to THIS socket, never to whichever
- * connection happens to be in the foreground when the user presses Send — a password typed for
- * host A must not travel to host B. */
- origin?: { connectionId: null | string; profile: string }
}
export interface SecretRequest extends KeyedPrompt {
diff --cc apps/shared/src/gateway-contract.generated.ts
index 00000000000,5437a403c38..cbe652da9df
mode 000000,100644..100644
--- a/apps/shared/src/gateway-contract.generated.ts
+++ b/apps/shared/src/gateway-contract.generated.ts
@@@ -1,0 -1,5068 +1,5230 @@@
+ // GENERATED by scripts/gen_gateway_contracts.py from tui_gateway/contracts — DO NOT EDIT.
+ // Regenerate: .venv/bin/python scripts/gen_gateway_contracts.py
+ // tests/tui_gateway/contracts/test_generated.py fails when this file is stale.
+ /* eslint-disable */
+ // ── Types ──
+ /** Any method the desktop may route to a named profile (``requestGatewayForProfile`` adds ``profile``). */
+ export interface ProfileParams {
+ profile?: string | null
+ }
+ /** ``_serialize_usage_model`` — also embedded as ``usage`` in the billing / subscription states, where the fail-open form is a bare ``{available: false}`` (no ``ok``). */
+ export interface UsageModel {
+ ok?: boolean | null
+ available: boolean
+ status?: string | null
+ plan_name?: string | null
+ renews_at?: string | null
+ renews_display?: string | null
+ subscription_remaining_display?: string | null
+ topup_remaining_display?: string | null
+ total_spendable_display?: string | null
+ has_topup?: boolean | null
+ plan_bar?: UsageBar | null
+ topup_bar?: UsageBar | null
+ }
+ /** ``_serialize_usage_bar``: one bar, magnitudes pre-formatted; ``pct_used`` only for ``plan``. */
+ export interface UsageBar {
+ kind: UsageBarKind
+ remaining_display: string
+ total_display: string
+ spent_display: string
+ pct_used?: number | null
+ fill_fraction: number
+ }
+ export type UsageBarKind = 'plan' | 'topup'
+ /** ``_serialize_billing_state`` (money as strings); the ``except`` fallback emits only ``ok / logged_in / free_tier / error``, so everything else is optional. */
+ export interface BillingStateResult {
+ ok: boolean
+ logged_in: boolean
+ free_tier?: boolean
+ free_tier_model?: string | null
+ org_name?: string | null
+ org_slug?: string | null
+ role?: string | null
+ is_admin?: boolean | null
+ can_change_plan?: boolean | null
+ can_charge?: boolean | null
+ balance_usd?: string | null
+ balance_display?: string | null
+ cli_billing_enabled?: boolean | null
+ charge_presets?: string[] | null
+ charge_presets_display?: string[] | null
+ min_usd?: string | null
+ max_usd?: string | null
+ card?: BillingCardInfo | null
+ payment_method?: BillingPaymentMethod | null
+ monthly_cap?: BillingMonthlyCap | null
+ auto_reload?: BillingAutoReload | null
+ portal_url?: string | null
+ error?: string | null
+ usage?: UsageModel | null
+ }
+ export interface BillingCardInfo {
+ brand: string
+ last4: string
+ masked: string
+ display?: string | null
+ resolved_via?: string | null
+ }
+ /** ``_serialize_payment_method``: each kind emits only its own fields (a ``card`` never carries ``email``; ``unknown`` carries what the server called it in ``raw_kind``). */
+ export interface BillingPaymentMethod {
+ kind: PaymentMethodKind
+ brand?: string | null
+ last4?: string | null
+ wallet?: string | null
+ email?: string | null
+ raw_kind?: string | null
+ resolved_via?: string | null
+ }
+ export type PaymentMethodKind = 'card' | 'link' | 'unknown'
+ export interface BillingMonthlyCap {
+ limit_usd?: string | null
+ limit_display: string
+ spent_this_month_usd?: string | null
+ spent_display: string
+ is_default_ceiling: boolean
+ }
+ export interface BillingAutoReload {
+ enabled: boolean
+ threshold_usd?: string | null
+ threshold_display: string
+ reload_to_usd?: string | null
+ reload_to_display: string
+ card?: BillingAutoReloadCard | null
+ }
+ /** Only ``distinct`` carries the payment-method identity. */
+ export interface BillingAutoReloadCard {
+ kind: AutoReloadCardKind
+ payment_method_id?: string | null
+ brand?: string | null
+ last4?: string | null
+ }
+ export type AutoReloadCardKind = 'canonical' | 'distinct' | 'none'
+ /** ``_serialize_subscription_state``; the view's fallback emits only ``ok / logged_in / error``. */
+ export interface SubscriptionStateResult {
+ ok: boolean
+ logged_in: boolean
+ is_admin?: boolean | null
+ can_change_plan?: boolean | null
+ org_name?: string | null
+ org_id?: string | null
+ role?: string | null
+ context?: SubscriptionContext | null
+ current?: CurrentSubscription | null
+ tiers?: SubscriptionTierOption[] | null
+ portal_url?: string | null
+ error?: string | null
+ usage?: UsageModel | null
+ }
+ export type SubscriptionContext = 'personal' | 'team'
+ export interface CurrentSubscription {
+ tier_id?: string | null
+ tier_name?: string | null
+ monthly_credits?: string | null
+ credits_remaining?: string | null
+ cycle_ends_at?: string | null
+ pending_downgrade_tier_name?: string | null
+ pending_downgrade_at?: string | null
+ pending_downgrade_display?: string | null
+ cancel_at_period_end: boolean
+ cancellation_effective_at?: string | null
+ cancellation_effective_display?: string | null
+ }
+ export interface SubscriptionTierOption {
+ tier_id: string
+ name: string
+ tier_order: number
+ dollars_per_month_display: string
+ monthly_credits?: string | null
+ is_current: boolean
+ is_enabled: boolean
+ }
+ export interface SubscriptionPreviewParams {
+ profile?: string | null
+ subscription_type_id?: string | null
+ }
+ /** ``_serialize_subscription_preview`` on success; ``effect`` drives the confirm copy. */
+ export interface SubscriptionPreviewResult {
+ ok: boolean
+ error?: string | null
+ message?: string | null
+ portal_url?: string | null
+ retry_after?: number | null
+ payload?: Record<string, unknown> | null
+ actor?: string | null
+ code?: string | null
+ recovery?: string | null
+ effect?: SubscriptionChangeEffect | null
+ reason?: string | null
+ current_tier_id?: string | null
+ current_tier_name?: string | null
+ target_tier_id?: string | null
+ target_tier_name?: string | null
+ monthly_credits_delta?: string | null
+ amount_due_now_cents?: number | null
+ effective_at?: string | null
+ }
+ export type SubscriptionChangeEffect = 'charge_now' | 'scheduled' | 'no_op' | 'blocked'
+ /** Either a target tier (downgrade / same-price change) or ``cancel`` (period-end cancellation). */
+ export interface SubscriptionChangeParams {
+ profile?: string | null
+ subscription_type_id?: string | null
+ cancel?: boolean
+ }
+ /** ``_billing_pending_change``: ``message`` + the raw NAS body in ``payload`` on success. */
+ export interface BillingPendingChangeResult {
+ ok: boolean
+ error?: string | null
+ message?: string | null
+ portal_url?: string | null
+ retry_after?: number | null
+ payload?: Record<string, unknown> | null
+ actor?: string | null
+ code?: string | null
+ recovery?: string | null
+ }
+ export interface SubscriptionUpgradeParams {
+ profile?: string | null
+ subscription_type_id?: string | null
+ idempotency_key?: string | null
+ }
+ /** The money route: ``status`` separates a completed upgrade from an SCA / decline that must finish in the portal at ``recovery_url``; ``idempotency_key`` is echoed (also on error) so a retry reuses it. */
+ export interface SubscriptionUpgradeResult {
+ ok: boolean
+ error?: string | null
+ message?: string | null
+ portal_url?: string | null
+ retry_after?: number | null
+ payload?: Record<string, unknown> | null
+ actor?: string | null
+ code?: string | null
+ recovery?: string | null
+ status?: string | null
+ target_tier_name?: string | null
+ recovery_url?: string | null
+ reason?: string | null
+ idempotency_key?: string | null
+ }
+ export interface BillingChargeParams {
+ profile?: string | null
+ amount_usd?: number | string | null
+ idempotency_key?: string | null
+ }
+ /** ``202 {chargeId}`` — money is not confirmed yet; poll ``billing.charge_status``. */
+ export interface BillingChargeResult {
+ ok: boolean
+ error?: string | null
+ message?: string | null
+ portal_url?: string | null
+ retry_after?: number | null
+ payload?: Record<string, unknown> | null
+ actor?: string | null
+ code?: string | null
+ recovery?: string | null
+ charge_id?: string | null
+ idempotency_key?: string | null
+ }
+ export interface BillingChargeStatusParams {
+ profile?: string | null
+ charge_id?: string | null
+ }
+ /** Single status read (pending | settled | failed); the caller drives the poll cadence. */
+ export interface BillingChargeStatusResult {
+ ok: boolean
+ error?: string | null
+ message?: string | null
+ portal_url?: string | null
+ retry_after?: number | null
+ payload?: Record<string, unknown> | null
+ actor?: string | null
+ code?: string | null
+ recovery?: string | null
+ status?: string | null
+ amount_usd?: string | number | null
+ settled_at?: string | null
+ reason?: string | null
+ }
+ export interface BillingAutoReloadParams {
+ profile?: string | null
+ enabled?: boolean
+ threshold?: number | string | null
+ top_up_amount?: number | string | null
+ }
+ /** A write with no success payload beyond ``ok``. */
+ export interface BillingMutationResult {
+ ok: boolean
+ error?: string | null
+ message?: string | null
+ portal_url?: string | null
+ retry_after?: number | null
+ payload?: Record<string, unknown> | null
+ actor?: string | null
+ code?: string | null
+ recovery?: string | null
+ }
+ export interface BillingStepUpParams {
+ profile?: string | null
+ session_id?: string | null
+ }
+ /** ``granted`` false when the server downscopes (also on every error envelope). */
+ export interface BillingStepUpResult {
+ ok: boolean
+ error?: string | null
+ message?: string | null
+ portal_url?: string | null
+ retry_after?: number | null
+ payload?: Record<string, unknown> | null
+ actor?: string | null
+ code?: string | null
+ recovery?: string | null
+ granted?: boolean | null
+ }
+ export interface DelegationStatusResult {
+ active: ActiveSubagent[]
+ paused: boolean
+ max_spawn_depth: number
+ max_concurrent_children: number
+ }
+ /** One live child from ``tools/delegate_tool_registry.py::list_active_subagents`` (the record is extended by the child runner — ``missed_steer`` etc. — so it stays open). */
+ export interface ActiveSubagent {
+ subagent_id: string
+ parent_id?: string | null
+ depth?: number | null
+ goal?: string | null
+ delegation_id?: string | null
+ model?: string | null
+ started_at?: number | null
+ status?: string | null
+ tool_count?: number | null
+ owner_agent_session_id?: string | null
+ [key: string]: unknown
+ }
+ export interface DelegationPauseParams {
+ profile?: string | null
+ paused?: boolean
+ }
+ export interface DelegationPauseResult {
+ paused: boolean
+ }
+ export interface SubagentSteerParams {
+ session_id: string
+ profile?: string | null
+ subagent_id: string
+ text: string
+ }
+ /** ``queued`` is not ``delivered``: a child past its final tool batch surfaces ``missed_steer``. */
+ export interface SubagentSteerResult {
+ status: SteerStatus
+ subagent_id: string
+ text: string
+ }
+ export type SteerStatus = 'queued' | 'rejected'
+ export interface HandoffRequestParams {
+ session_id: string
+ profile?: string | null
+ platform: string
+ }
+ export interface HandoffRequestResult {
+ queued: boolean
+ session_key: string
+ platform: string
+ home_name: string
+ }
+ /** Any method addressed at one live session. */
+ export interface SessionParams {
+ session_id: string
+ profile?: string | null
+ }
+ /** ``state`` is pending | running | completed | failed, or '' when nothing was requested. */
+ export interface HandoffStateResult {
+ state: string
+ platform: string
+ error: string
+ }
+ export interface HandoffFailParams {
+ session_id: string
+ profile?: string | null
+ error?: string | null
+ }
+ /** ``failed`` false when the watcher already claimed the row; ``state`` is what it is now. */
+ export interface HandoffFailResult {
+ failed: boolean
+ state: string
+ }
+ /** ``row_id`` is ``messages.id``; a not-yet-persisted live message names ``newest_role`` instead. ``emoji`` null clears; the same emoji again retracts. */
+ export interface MessageReactParams {
+ session_id: string
+ profile?: string | null
+ row_id?: number | null
+ newest_role?: string | null
+ emoji?: string | null
+ author?: ReactionAuthor | null
+ }
+ export type ReactionAuthor = 'user' | 'agent'
+ export interface MessageReactResult {
+ row_id: number
+ reactions: MessageReaction[]
+ }
+ /** One persisted reaction row (``hermes_state_messages.set_message_reaction``); ``seen`` is stamped once announced. */
+ export interface MessageReaction {
+ emoji: string
+ author: string
+ at?: number | null
+ seen?: boolean | null
+ [key: string]: unknown
+ }
+ export interface PetCancelParams {
+ profile?: string | null
+ token?: string | null
+ }
+ export interface PetCancelResult {
+ ok: boolean
+ }
+ export interface PetGenerateStatusResult {
+ available: boolean
+ providers: PetGenProvider[]
+ }
+ /** ``agent/pet/generate/imagegen.py::list_sprite_providers`` row. */
+ export interface PetGenProvider {
+ name: string
+ label: string
+ default: boolean
+ }
+ /** ``prompt`` or a ``referenceImage`` data URL is required (the handler answers 4004 without one). */
+ export interface PetGenerateParams {
+ profile?: string | null
+ prompt?: string | null
+ referenceImage?: string | null
+ count?: number | null
+ style?: string | null
+ provider?: string | null
+ }
+ export interface PetGenerateResult {
+ ok: boolean
+ token: string
+ drafts: PetDraft[]
+ }
+ export interface PetDraft {
+ index: number
+ dataUri: string
+ }
+ export interface PetHatchParams {
+ profile?: string | null
+ token: string
+ name: string
+ cancelToken?: string | null
+ index?: number | null
+ description?: string | null
+ prompt?: string | null
+ style?: string | null
+ provider?: string | null
+ }
+ /** The hatched pet is installed but NOT active (``pet.select`` adopts, ``pet.remove`` discards). */
+ export interface PetHatchResult {
+ ok: boolean
+ slug: string
+ displayName: string
+ warnings?: unknown[]
+ pet: PetSpritePayload
+ }
+ export interface PetSpritePayload {
+ slug?: string | null
+ displayName?: string | null
+ mime?: string | null
+ spritesheetBase64?: string | null
+ spritesheetRevision?: string | null
+ frameW?: number | null
+ frameH?: number | null
+ framesPerState?: number | null
+ framesByState?: Record<string, number> | null
+ framesByRow?: Record<string, number> | null
+ loopMs?: number | null
+ scale?: number | null
+ stateRows?: string[] | null
+ }
+ export interface ProjectFactsParams {
+ profile?: string | null
+ cwd?: string | null
+ }
+ /** ``facts`` null outside a workspace (or when detection failed). */
+ export interface ProjectFactsResult {
+ facts?: ProjectFacts | null
+ }
+ /** ``agent/coding_context.py::project_facts_for`` — the system prompt's coding-context detection. */
+ export interface ProjectFacts {
+ root: string
+ manifests: string[]
+ packageManagers: string[]
+ verifyCommands: string[]
+ contextFiles: string[]
+ }
+ export interface ConnectionOperationParams {
+ profile?: string | null
+ session_id: string
+ op_id: string
+ }
+ /** ``methods_connectors._operation_view``: the operation's full snapshot. */
+ export interface ConnectionOperationStatus {
+ op_id: string
+ deadline_at: number
+ settled: boolean
+ settled_at?: number | null
+ settled_by?: ConnectionSettleReason | null
+ targets: ConnectionOperationTarget[]
+ }
+ /** ``tools/connectors/contract.py::SettleReason``. */
+ export type ConnectionSettleReason = 'all_resolved' | 'continue' | 'deadline' | 'interrupt' | 'unavailable'
+ /** ``Target.snapshot``: the link minted up front rides here, never in the model result. ``extra`` keys a leg records (``tools``, ``hint``) are typed here as they appear. */
+ export interface ConnectionOperationTarget {
+ name: string
+ kind: ConnectionTargetKind
+ action: ConnectionTargetAction
+ state: ConnectionTargetState
+ detail?: string | null
+ connect_url?: string | null
+ attempt?: string | null
+ tools?: string[] | null
+ hint?: string | null
+ }
+ export type ConnectionTargetKind = 'connector' | 'mcp'
+ export type ConnectionTargetAction = 'authorize' | 'connect' | 'enable' | 'install' | 'reconnect'
+ /** ``tools/connectors/contract.py::TargetState``. */
+ export type ConnectionTargetState = 'pending' | 'initiated' | 'connected' | 'skipped' | 'failed' | 'expired' | 'unavailable' | 'not_connected'
+ export interface ConnectionRespondParams {
+ profile?: string | null
+ session_id: string
+ op_id: string
+ result: ConnectionAnswer
+ }
+ /** The card's answer: per-target outcomes and an optional Continue (``settled_by: "continue"``). Settlement is derived from target states afterwards. */
+ export interface ConnectionAnswer {
+ targets?: ConnectionAnswerTarget[]
+ settled_by?: ConnectionSettleReason | null
+ }
+ /** One row's answer from the card. ``status`` is what the card observed for that row (``tools/connectors/mcp.py::_OUTCOME_STATES`` maps it onto a target state); ``state`` is the older spelling of the same field and one of the two is present. */
+ export interface ConnectionAnswerTarget {
+ name: string
+ status?: string | null
+ state?: string | null
+ detail?: string | null
+ tools?: string[] | null
+ [key: string]: unknown
+ }
+ export interface ConnectionRespondResult {
+ status: string
+ settled: boolean
+ }
+ /** ``key`` selects one getter from ``_CONFIG_GETTERS``; ``cwd`` feeds the ``project`` getter, ``session_id`` lets ``reasoning`` / ``fast`` answer with the session's live pin. */
+ export interface ConfigGetParams {
+ profile?: string | null
+ key: string
+ cwd?: string | null
+ session_id?: string | null
+ }
+ /** Union of every getter's payload: ``value`` for the simple words, ``config`` for ``full``, ``mtime`` / ``mcp_rev`` for the poller, ``model`` / ``provider`` / ``providers`` for ``provider``, ``home`` / ``display`` for ``profile``, ``cwd`` / ``branch`` for ``project``, ``prompt``. */
+ export interface ConfigGetResult {
+ value?: string | null
+ display?: string | null
+ tool_progress?: string | null
+ model?: string | null
+ provider?: string | null
+ providers?: ConfigProviderRef[] | null
+ home?: string | null
+ cwd?: string | null
+ branch?: string | null
+ config?: Record<string, unknown> | null
+ prompt?: string | null
+ mtime?: number | null
+ mcp_rev?: string | null
+ }
+ /** ``hermes_cli/models.py::list_available_providers`` row. */
+ export interface ConfigProviderRef {
+ id: string
+ label: string
+ aliases?: string[]
+ authenticated?: boolean
+ [key: string]: unknown
+ }
+ /** ``key`` picks the setter (``_CONFIG_SETTERS``, ``details_mode.<section>``, display toggles); ``value`` is the raw word/string the setter normalises (falsy non-strings are reported back in the error). ``scope`` applies to ``yolo`` / ``reasoning``; ``confirm_expensive_model`` to ``model``. */
+ export interface ConfigSetParams {
+ profile?: string | null
+ key: string
+ value?: unknown
+ session_id?: string | null
+ scope?: string | null
+ confirm_expensive_model?: boolean
+ }
+ /** ``{key, value}`` plus the setter's extras: model switches add ``warning`` / ``confirm_required`` / ``confirm_message`` / ``scope`` / ``deferred``; ``focus`` adds ``tool_progress``; ``cwd`` adds ``cwd`` / ``branch``; ``personality`` adds ``history_reset`` / ``info``; ``yolo`` reports its ``scope``. ``value`` is a bool only for the display toggles. */
+ export interface ConfigSetResult {
+ key: string
+ value?: string | boolean | null
+ warning?: string | null
+ confirm_required?: boolean | null
+ confirm_message?: string | null
+ scope?: string | null
+ deferred?: boolean | null
+ tool_progress?: string | null
+ cwd?: string | null
+ branch?: string | null
+ history_reset?: boolean | null
+ info?: SessionLiveInfo | null
+ }
+ /** ``tui_gateway/server.py::_session_info`` — the ``session.info`` event and the ``info`` field of ``session.create`` / ``session.resume`` / ``session.activate`` results. */
+ export interface SessionLiveInfo {
+ model?: string
+ provider?: string
+ reasoning_effort?: string
+ service_tier?: string
+ fast?: boolean
+ yolo?: boolean
+ approval_mode?: string
+ tools?: Record<string, string[]>
+ skills?: Record<string, string[]>
+ cwd?: string
+ branch?: string | null
+ project?: ProjectRef | null
+ terminal_backend?: string
+ personality?: string
+ running?: boolean
+ turn_started_at?: number | null
+ title?: string
+ stored_session_id?: string
+ desktop_contract?: number | string | null
+ version?: string
+ release_date?: string
+ update_behind?: unknown | null
+ update_command?: string
+ usage?: Usage | null
+ profile_name?: string | null
+ mcp_servers?: McpServerStatus[]
+ system_prompt?: string | null
+ credential_warning?: string | null
+ lazy?: boolean | null
+ [key: string]: unknown
+ }
+ /** ``tui_gateway/server.py::_project_info_for_cwd``. */
+ export interface ProjectRef {
+ id: string
+ slug: string
+ name: string
+ primary_path?: string | null
+ }
+ /** ``tui_gateway/server.py::_get_usage`` + ``agent/context_breakdown.py::context_usage_fields``. */
+ export interface Usage {
+ model?: string
+ input?: number
+ output?: number
+ reasoning?: number
+ prompt?: number
+ completion?: number
+ total?: number
+ calls?: number
+ compressions?: number | null
+ context_used?: number | null
+ context_max?: number | null
+ context_percent?: number | null
+ context_source?: string | null
+ context_estimated?: boolean | null
+ cache_hit_pct?: number | null
+ cache_read?: number | null
+ cache_write?: number | null
+ avg_latency_s?: number | null
+ avg_tps?: number | null
+ active_subagents?: number | null
+ dev_credits_spent_micros?: number | null
+ cost_usd?: number | null
+ cost_status?: string | null
+ [key: string]: unknown
+ }
+ export interface McpServerStatus {
+ name?: string
+ status?: string | null
+ tool_count?: number | null
+ error?: string | null
+ [key: string]: unknown
+ }
+ /** ``provider_configured`` is the loose answer; the boot record's fields (``ready``, ``free_tier``, ``other_providers``, ``inference_provider``) ride along on the launch profile. An unknown ``profile`` answers ``ok=False`` + ``error``. */
+ export interface SetupStatusResult {
+ provider_configured?: boolean | null
+ ready?: boolean | null
+ free_tier?: boolean | null
+ other_providers?: boolean | null
+ inference_provider?: string | null
+ profile?: string | null
+ ok?: boolean | null
+ error?: string | null
+ }
+ export interface SetupRuntimeCheckParams {
+ profile?: string | null
+ provider?: string | null
+ }
+ /** ``ok=False`` + ``error`` when the resolved model can't be served; ``free_tier`` says the selected route is the welcome host. */
+ export interface SetupRuntimeCheckResult {
+ ok: boolean
+ provider?: string | null
+ model?: string | null
+ source?: string | null
+ error?: string | null
+ free_tier?: boolean | null
+ profile?: string | null
+ }
+ export interface DiagnosticsShareNousParams {
+ error_context?: string | null
+ extra_files?: Record<string, string> | null
+ log_lines?: number | null
+ }
+ /** Structured envelope: ``ok=False`` + ``error`` renders inline instead of failing the RPC. */
+ export interface DiagnosticsShareNousResult {
+ ok: boolean
+ view_url?: string | null
+ upload_id?: string | null
+ expires_at?: string | null
+ error?: string | null
+ }
+ /** ``available`` = an identity exists AND the tier is on; whether inference runs on it is ``setup.runtime_check.free_tier``'s question. */
+ export interface FreeTierStatusResult {
+ has_guest: boolean
+ enabled: boolean
+ available: boolean
+ notice_pending: boolean
+ model: string
+ label: string
+ }
+ export interface FreeTierProvisionResult {
+ has_guest: boolean
+ enabled: boolean
+ error?: string | null
+ }
+ export interface FreeTierAckNoticeResult {
+ acked: boolean
+ }
+ export interface ModelOptionsParams {
+ profile?: string | null
+ session_id?: string | null
+ explicit_only?: boolean
+ include_unconfigured?: boolean
+ refresh?: boolean
+ }
+ export interface ModelOptionsResult {
+ providers: ModelOptionProvider[]
+ model?: string
+ provider?: string
+ }
+ /** One ``hermes_cli/inventory.py::build_models_payload`` provider row (the union of every field the builder sets; ``pricing_pending`` / ``free_tier_pending`` mark the cached-only path). */
+ export interface ModelOptionProvider {
+ slug: string
+ name: string
+ models?: string[]
+ total_models?: number | null
+ is_current?: boolean | null
+ is_user_defined?: boolean | null
+ source?: string | null
+ aliases?: string[] | null
+ api_url?: string | null
+ auth_type?: string | null
+ authenticated?: boolean | null
+ key_env?: string | null
+ warning?: string | null
+ featured_models?: string[] | null
+ capabilities?: Record<string, ModelCapabilities> | null
+ pricing?: Record<string, ModelPricing> | null
+ pricing_pending?: boolean | null
+ free_tier?: boolean | null
+ free_tier_pending?: boolean | null
+ free_tier_row?: boolean | null
+ unavailable_models?: string[] | null
+ [key: string]: unknown
+ }
+ /** ``hermes_cli/inventory.py::_apply_capabilities``. */
+ export interface ModelCapabilities {
+ fast: boolean
+ reasoning: boolean
+ can_disable_reasoning?: boolean | null
+ }
+ /** ``hermes_cli/inventory.py::_apply_pricing`` — formatted $/Mtok strings (``""`` unknown, ``"free"``); the sale fields are Nous Portal-only. */
+ export interface ModelPricing {
+ input: string
+ output: string
+ cache?: string | null
+ free: boolean
+ discount_percent?: number | null
+ was_input?: string | null
+ was_output?: string | null
+ }
+ export interface ConnectorsListParams {
+ profile?: string | null
+ session_id: string
+ }
+ export interface ConnectorsListResult {
+ available: boolean
+ connectors: ConnectorRow[]
+ }
+ /** One ``manage_connections`` status entry after ``connector_ui_payload`` redaction; the connector service owns the closed key set, so unknown metadata passes through. */
+ export interface ConnectorRow {
+ connector?: string
+ connected?: boolean | null
+ enabled?: boolean | null
+ connectionStatus?: string | null
+ name?: string | null
+ description?: string | null
+ [key: string]: unknown
+ }
+ export interface ConnectorsConnectParams {
+ profile?: string | null
+ session_id: string
+ connectors: string[]
+ reconnect?: boolean
+ }
+ /** The operation the connect opened (or re-minted on): ``tools/connectors/managed.py`` ``_off_desktop_result`` / ``methods_connectors._reissue``. ``status``/``note`` ride along from the tool result when the call ran through ``manage_connections``. */
+ export interface ConnectorsConnectResult {
+ op_id: string
+ deadline_at: number
+ settled: boolean
+ settled_at?: number | null
+ settled_by?: ConnectionSettleReason | null
+ targets: ConnectionOperationTarget[]
+ status?: string | null
+ note?: string | null
+ }
+ export interface ImageGenerateParams {
+ prompt?: string | null
+ aspect_ratio?: string | null
+ probe?: unknown | null
+ max_bytes?: number | null
+ }
+ /** ``probe`` answers ``{available}`` alone; ``image_data`` (data URL) is omitted when the download failed or exceeded ``max_bytes`` so callers fall back to ``image``. */
+ export interface ImageGenerateResult {
+ available: boolean
+ success?: boolean | null
+ image?: string | null
+ image_data?: string | null
+ error?: string | null
+ }
+ export interface SessionControlReadParams {
+ profile?: string | null
+ session_id: string
+ }
+ export interface SessionControlReadResult {
+ control: SessionControlSnapshot
+ }
+ /** ``_snapshot_control`` — ``revision`` is a hash of the visible state (``""`` when empty); ``updated_at`` is the newest persisted timestamp (``0`` when none). */
+ export interface SessionControlSnapshot {
+ goal: GoalSnapshot | null
+ loop: LoopSnapshot | null
+ heartbeat: HeartbeatSnapshot | null
+ revision: string
+ updated_at: number
+ }
+ /** ``methods_session_control.py::_safe_goal_snapshot`` — the frontend-safe GoalState subset. */
+ export interface GoalSnapshot {
+ title: string
+ status: string
+ turns_used: number
+ max_turns: number
+ contract: GoalContractSnapshot
+ subgoals: string[]
+ gates: GoalGateSnapshot[]
+ created_at?: number | null
+ updated_at?: number | null
+ paused_reason?: string | null
+ last_verdict?: string | null
+ last_reason?: string | null
+ wait_barrier?: WaitBarrierUntil | WaitBarrierTarget | null
+ }
+ /** ``hermes_cli/goals.py::GoalContract.to_dict``. */
+ export interface GoalContractSnapshot {
+ outcome?: string
+ verification?: string
+ constraints?: string
+ boundaries?: string
+ stop_when?: string
+ }
+ export interface GoalGateSnapshot {
+ command: string
+ timeout_seconds: number
+ max_retries: number
+ attempts: number
+ last_exit_code?: number | null
+ }
+ export interface WaitBarrierUntil {
+ type: 'until'
+ until_at: number
+ reason?: string
+ }
+ export interface WaitBarrierTarget {
+ type: 'session' | 'pid'
+ target: string | number
+ reason?: string
+ }
+ /** ``_safe_loop_snapshot`` — persisted LoopState fields, never its route. */
+ export interface LoopSnapshot {
+ prompt: string
+ status: string
+ mode: string
+ interval_seconds: number
+ current_delay: number
+ times: number
+ until: string
+ max_ticks: number
+ ticks_fired: number
+ created_at: number
+ last_fired_at: number
+ next_due_at: number
+ awaiting_response: boolean
+ deferred_by_goal: boolean
+ paused_reason?: string | null
+ last_stop_reason?: string | null
+ }
+ export interface HeartbeatSnapshot {
+ prompt: string
+ status: string
+ interval_seconds: number
+ created_at: number
+ last_fired_at: number
+ fire_count: number
+ }
+ /** ``action`` is validated by the handler (unknown / gate actions answer ``4004``), so it stays a string on the wire; ``SessionControlAction`` lists the accepted set. */
+ export interface SessionControlParams {
+ profile?: string | null
+ session_id: string
+ action: string
+ args?: SessionControlArgs | null
+ }
+ /** ``subgoal.add`` reads ``text``; ``subgoal.remove`` reads the 1-based ``index``. */
+ export interface SessionControlArgs {
+ text?: string | null
+ index?: number | null
+ }
+ export interface SessionControlResult {
+ control: SessionControlSnapshot
+ dispatch: SessionControlDispatch
+ }
+ /** ``_dispatch_envelope`` — the command result's user-visible envelope, every key always present. */
+ export interface SessionControlDispatch {
+ type: string | null
+ output: string | null
+ notice: string | null
+ message: string | null
+ display: string | null
+ }
+ export interface VerificationStatusParams {
+ profile?: string | null
+ session_id?: string | null
+ session_key?: string | null
+ cwd?: string | null
+ }
+ export interface VerificationStatusResult {
+ verification: VerificationStatusInfo
+ }
+ /** ``verification_status()``: ``disabled`` / ``not_applicable`` / ``unverified`` / ``stale`` or the latest event's own status; ``root`` and friends only once a workspace was identified. */
+ export interface VerificationStatusInfo {
+ status: string
+ evidence?: VerificationEvidenceRow | null
+ root?: string | null
+ session_id?: string | null
+ changed_paths?: string[] | null
+ }
+ /** One ``verification_events`` row (``agent/verification_evidence.py``). */
+ export interface VerificationEvidenceRow {
+ id?: number | null
+ created_at?: string | null
+ session_id?: string | null
+ cwd?: string | null
+ root?: string | null
+ command?: string | null
+ canonical_command?: string | null
+ kind?: string | null
+ scope?: string | null
+ status?: string | null
+ exit_code?: number | null
+ output_summary?: string | null
+ [key: string]: unknown
+ }
++/** ``tools/bot_desktop/runtime.py::DesktopStatus`` plus the lease and the profile it speaks for. */
++export interface DisplayStatus {
++ profile: string
++ supported: boolean
++ installed: boolean
++ missing: string[]
++ running: boolean
++ pid?: number | null
++ display?: string | null
++ socket?: string | null
++ geometry: string
++ install_command?: string | null
++ browser?: string | null
++ lease: DisplayLease
++ profile_key: string
++}
++/** ``tools/bot_desktop/lease.py::Lease`` as clients may see it: the holder's viewer id is a capability and never leaves the gateway; ``viewer_hash`` lets the holder recognise itself. */
++export interface DisplayLease {
++ holder: LeaseHolder
++ viewer_id?: null
++ viewer_hash?: string | null
++ since: number
++ epoch: number
++ reason?: string
++}
++export type LeaseHolder = 'agent' | 'human'
++/** ``data_url`` is null while the screen is stopped or while a human holds the lease (``suppressed``): the frame may show what they are typing. */
++export interface DisplayThumbnailResult {
++ data_url?: string | null
++ suppressed?: string | null
++}
++export interface DisplayStopParams {
++ profile?: string | null
++ force?: boolean | null
++}
++export interface DisplayStopResult {
++ profile: string
++ supported: boolean
++ installed: boolean
++ missing: string[]
++ running: boolean
++ pid?: number | null
++ display?: string | null
++ socket?: string | null
++ geometry: string
++ install_command?: string | null
++ browser?: string | null
++ lease: DisplayLease
++ profile_key: string
++ stopped: boolean
++}
++export interface DisplayObserveParams {
++ profile?: string | null
++ viewer_id?: string | null
++}
++export interface DisplayObserveResult {
++ profile: string
++ supported: boolean
++ installed: boolean
++ missing: string[]
++ running: boolean
++ pid?: number | null
++ display?: string | null
++ socket?: string | null
++ geometry: string
++ install_command?: string | null
++ browser?: string | null
++ lease: DisplayLease
++ profile_key: string
++ ticket: string
++ path: string
++ viewer_id: string
++}
++export interface DisplayInstallResult {
++ started: boolean
++ command?: string | null
++ profile_key: string
++}
++export interface DisplayLeaseAcquireParams {
++ profile?: string | null
++ viewer_id: string
++ reason?: string | null
++}
++export interface DisplayLeaseResult {
++ lease: DisplayLease
++}
++export interface DisplayLeaseReleaseParams {
++ profile?: string | null
++ viewer_id?: string | null
++ force?: boolean | null
++}
+ export interface GroupsCapabilitiesParams {
+ profile?: string | null
+ }
+ export interface GroupsCapabilitiesResult {
+ protocol_version: number
+ driver: boolean
+ persistent_process: boolean
+ authority_gateway_id: string
+ room_link: RoomLinkStatus
+ features: string[]
+ methods: string[]
+ max_log_limit: number
+ }
+ /** ``enabled`` with ``profile``/``catalog``/``endpoint``, or disabled with a ``reason``. */
+ export interface RoomLinkStatus {
+ enabled: boolean
+ profile?: string | null
+ catalog?: RoomLinkCatalog | null
+ endpoint?: RoomLinkEndpoint | null
+ reason?: string | null
+ }
+ /** ``gateway/hosted_room_peer.py::GatewayRoomCatalog.as_mapping``. */
+ export interface RoomLinkCatalog {
+ installation_id: string
+ protocol_versions: number[]
+ link_modes: string[]
+ persistent_process: boolean
+ text: boolean
+ attachments: boolean
+ execution_policy: RoomExecutionPolicy
+ catalog_digest: string
+ endpoint?: RoomLinkEndpoint | null
+ }
+ /** ``gateway/hosted_room_execution_policy.py::execution_policy_mapping``. */
+ export interface RoomExecutionPolicy {
+ version: number
+ target_profile: string
+ enabled_toolsets: string[]
+ approval_mode: string
+ max_iterations: number
+ policy_digest: string
+ }
+ /** ``GatewayRoomCatalog.endpoint_mapping``: ``url``/``transport_security`` when available, ``reason`` when not. */
+ export interface RoomLinkEndpoint {
+ available: boolean
+ url?: string | null
+ transport_security?: string | null
+ reason?: string | null
+ }
+ export interface GroupsListParams {
+ profile?: string | null
+ include_disbanded?: boolean | null
+ limit?: number | null
+ offset?: number | null
+ }
+ export interface GroupsListResult {
+ rooms: Room[]
+ next_offset?: number | null
+ }
+ /** ``gateway/hosted_rooms.py::_room_from_row`` plus the branch-only keys ``create`` (legacy adoption), ``state`` (``authority_claim``) and ``rename`` (``event``) add. */
+ export interface Room {
+ room_id: string
+ name: string
+ members: RoomMember[]
+ authority_gateway_id: string
+ authority_epoch: number
+ revision: number
+ created_at: number
+ updated_at: number
+ idempotent?: boolean
+ disbanded_at?: number | null
+ latest_seq?: number | null
+ adopted?: boolean | null
+ claim_event?: RoomEvent | null
+ authority_claim?: RoomEvent | null
+ event?: RoomEvent | null
+ }
+ /** One roster row (``hosted_room_discussion.validate_roster``); legacy rooms may carry pre-normalisation rows, so the set stays open. */
+ export interface RoomMember {
+ member_id?: string | null
+ profile?: string | null
+ handle?: string | null
+ display_name?: string | null
+ target?: Record<string, unknown> | null
+ [key: string]: unknown
+ }
+ /** ``gateway/hosted_rooms.py::_event_from_row``. */
+ export interface RoomEvent {
+ room_id: string
+ seq: number
+ event_id: string
+ kind: string
+ actor: RoomActor
+ authority_epoch?: number | null
+ payload: Record<string, unknown>
+ created_at: number
+ idempotent?: boolean
+ }
+ export interface RoomActor {
+ kind: string
+ id: string
+ }
+ export interface GroupsCreateParams {
+ profile?: string | null
+ room_id: string
+ name: string
+ members: RoomMemberInput[]
+ authority_gateway_id?: string | null
+ }
+ /** A roster row as the client proposes it; ``validate_roster`` owns the exact rules. */
+ export interface RoomMemberInput {
+ member_id?: string | null
+ profile?: string | null
+ handle?: string | null
+ display_name?: string | null
+ target?: Record<string, unknown> | null
+ [key: string]: unknown
+ }
+ export interface GroupsCreateResult {
+ room: Room
+ }
+ export interface GroupsStateParams {
+ profile?: string | null
+ room_id: string
+ include_disbanded?: boolean | null
+ }
+ export interface GroupsStateResult {
+ room: Room
+ driver_status?: RoomDriverStatus | null
+ }
+ /** ``HostedRoomService.status(room_id)``; ``pending_actions`` rows are ``{kind: retry, task_id}`` or the driver's approval action (``kind: approval`` + run/session/approval context). */
+ export interface RoomDriverStatus {
+ running: boolean
+ working: boolean
+ blocked: boolean
+ counts: Record<string, number>
+ pending_actions: Record<string, unknown>[]
+ peer_routes: PeerRouteStatus[]
+ }
+ export interface PeerRouteStatus {
+ room_id: string
+ member_id: string
+ status: string
+ }
+ export interface GroupsSendParams {
+ profile?: string | null
+ room_id: string
+ event_id?: string | null
+ payload: Record<string, unknown>
+ }
+ export interface GroupsSendResult {
+ event: RoomEvent
+ client_event_id?: string | null
+ accepted?: boolean
+ driver_started?: boolean
+ }
+ export interface GroupsRenameParams {
+ profile?: string | null
+ room_id: string
+ event_id: string
+ name: string
+ }
+ export interface GroupsRenameResult {
+ room: Room
+ }
+ export interface GroupsLogParams {
+ profile?: string | null
+ room_id: string
+ since_seq?: number | null
+ limit?: number | null
+ include_disbanded?: boolean | null
+ }
+ /** ``gateway/hosted_rooms.py::read_events`` page — also the ``page`` ``groups.replicate`` ingests. */
+ export interface GroupsLogResult {
+ events: RoomEvent[]
+ cursor: number
+ latest_seq: number
+ has_more: boolean
+ authority: RoomAuthority
+ }
+ export interface RoomAuthority {
+ gateway_id: string
+ epoch: number
+ }
+ export interface GroupsDisbandParams {
+ profile?: string | null
+ room_id: string
+ cancel_id?: string | null
+ }
+ export interface GroupsDisbandResult {
+ tombstone: RoomTombstone
+ }
+ export interface RoomTombstone {
+ room_id: string
+ disbanded_at: number
+ idempotent: boolean
+ history_expired?: boolean | null
+ event?: RoomEvent | null
+ }
+ export interface GroupsStopParams {
+ profile?: string | null
+ room_id: string
+ cancel_id?: string | null
+ }
+ export interface GroupsStopResult {
+ cancelled: number
+ }
+ export interface GroupsApproveParams {
+ profile?: string | null
+ room_id: string
+ member_id: string
+ task_id: string
+ execution_generation: number
+ choice: ApprovalChoice
+ request_id: string
+ }
+ export type ApprovalChoice = 'once' | 'session' | 'always' | 'deny'
+ /** ``result`` is the local ``approval.respond`` answer or the peer's run-action receipt. */
+ export interface GroupsApproveResult {
+ approved?: boolean
+ result: Record<string, unknown>
+ }
+ export interface GroupsRetryParams {
+ profile?: string | null
+ room_id: string
+ task_id: string
+ }
+ export interface GroupsRetryResult {
+ retried?: boolean
+ task: RoomTaskReceipt
+ }
+ export interface RoomTaskReceipt {
+ room_id: string
+ task_id: string
+ thread_id: string
+ turn_id: string
+ status: string
+ execution_generation: number
+ cancel_generation: number
+ }
+ export interface GroupsReplicateParams {
+ profile?: string | null
+ room_id: string
+ room_name: string
+ members: RoomMemberInput[]
+ page: Record<string, unknown>
+ }
+ export interface GroupsReplicateResult {
+ room_id: string
+ stored_seq: number
+ ingested: number
+ authority: RoomAuthority
+ caught_up: boolean
+ }
+ export interface GroupsReplicaStateParams {
+ profile?: string | null
+ room_id: string
+ }
+ export interface GroupsReplicaStateResult {
+ room_id: string
+ name: string
+ members: RoomMember[]
+ authority: RoomAuthority
+ last_seq: number
+ latest_seq: number
+ event_bytes: number
+ created_at: number
+ updated_at: number
+ }
+ export interface GroupsPromoteParams {
+ profile?: string | null
+ room_id: string
+ confirm?: boolean | null
+ reason?: string | null
+ }
+ export interface GroupsPromoteResult {
+ room_id: string
+ authority_gateway_id: string
+ authority_epoch: number
+ previous_gateway_id: string
+ previous_epoch: number
+ claim_seq: number
+ latest_seq: number
+ }
+ export interface GroupsDemoteParams {
+ profile?: string | null
+ room_id: string
+ observed_gateway_id: string
+ observed_epoch: number
+ }
+ export interface GroupsDemoteResult {
+ room_id: string
+ authority_gateway_id: string
+ authority_epoch: number
+ idempotent: boolean
+ }
+ export interface GroupsPeerInviteParams {
+ profile?: string | null
+ room_id?: string | null
+ home_install_id?: string | null
+ authority_gateway_id?: string | null
+ authority_epoch?: number | null
+ member_id?: string | null
+ grant_id?: string | null
+ ttl_seconds?: number | null
+ }
+ export interface GroupsPeerInviteResult {
+ grant: string
+ target_profile: string
+ catalog: RoomLinkCatalog
+ endpoint: RoomLinkEndpoint
+ }
+ export interface GroupsPeerRevokeParams {
+ profile?: string | null
+ grant: string
+ }
+ export interface GroupsPeerRevokeResult {
+ revoked?: boolean
+ }
+ export interface GroupsPeerRegisterParams {
+ profile?: string | null
+ room_id: string
+ member_id: string
+ target_url: string
+ target_profile: string
+ grant: string
+ catalog: Record<string, unknown>
+ cancellation_scope_id?: string | null
+ trace_id?: string | null
+ }
+ export interface GroupsPeerRegisterResult {
+ registered?: boolean
+ mode: string
+ transport_security: string
+ target_install_id: string
+ target_profile: string
+ }
+ export interface BotRelayRosterSyncParams {
+ profile?: string | null
+ agents?: RelayAgentRow[] | null
+ }
+ /** A roster row the Desktop pushes (``tools/bot_relay.py::_normalize_roster_row``); invalid rows are dropped server-side, so the shape stays open. */
+ export interface RelayAgentRow {
+ profile?: string | null
+ handle?: string | null
+ connection_id?: string | null
+ connection_label?: string | null
+ title?: string | null
+ description?: string | null
+ online?: boolean | null
+ [key: string]: unknown
+ }
+ export interface BotRelayRosterSyncResult {
+ count: number
+ }
+ export interface BotRelayOutboxDrainParams {
+ profile?: string | null
+ }
+ export interface BotRelayOutboxDrainResult {
+ envelopes: RelayEnvelope[]
+ }
+ /** ``tools/bot_relay.py::enqueue_envelope``. */
+ export interface RelayEnvelope {
+ id: string
+ created_at: number
+ from_profile: string
+ from_handle: string
+ target_connection: string
+ target_profile: string
+ target_handle: string
+ message: string
+ [key: string]: unknown
+ }
+ /** ``profile`` here is the TARGET profile on this gateway (also what the desktop route wrapper adds). */
+ export interface BotRelayDeliverParams {
+ profile: string
+ message: string
+ from_profile?: string | null
+ from_handle?: string | null
+ from_connection?: string | null
+ }
+ export interface BotRelayDeliverResult {
+ reply: string
+ }
+ export interface BotRelayReplyParams {
+ profile?: string | null
+ id: string
+ reply?: string | null
+ error?: string | null
+ reason?: string | null
+ }
+ export interface OkResult {
+ ok?: boolean
+ }
+ export interface BrowserControllerRegisterParams {
+ session_id: string
+ controller_id: string
+ browser_profile_id: string
+ capabilities?: string[] | null
+ protocol_version?: unknown | null
+ principal_id?: string | null
+ }
+ export interface BrowserControllerRegisterResult {
+ scope: ControllerScope
+ }
+ export interface ControllerScope {
+ principal_id: string
+ profile_id: string
+ session_id: string
+ controller_id: string
+ browser_profile_id: string
+ transport_family: string
+ capabilities: string[]
+ }
+ export interface BrowserControllerResultParams {
+ session_id: string
+ command_id: string
+ ok?: unknown | null
+ result?: unknown | null
+ error?: unknown | null
+ }
+ export interface BrowserControllerResultResult {
+ accepted: boolean
+ }
+ /** Every controller call names the session the controller is attached to. */
+ export interface BrowserControllerParams {
+ session_id: string
+ }
+ export interface BrowserControllerDetachResult {
+ detached?: boolean
+ }
+ export type PingParams = Record<string, never>
+ export interface PingResult {
+ pong: boolean
+ }
+ export interface GatewayCapabilitiesResult {
+ per_session_exclusive_submit: boolean
+ }
+ /** ``word`` is the token under the cursor (``@`` prefix = context reference); ``cwd`` / ``session_id`` pick the directory the listing resolves against. */
+ export interface CompletePathParams {
+ profile?: string | null
+ word?: string | null
+ cwd?: string | null
+ session_id?: string | null
+ }
+ export interface CompletionItemsResult {
+ items?: CompletionItem[]
+ }
+ /** One popover row; ``kind`` rides only on slash completions (command vs skill). */
+ export interface CompletionItem {
+ text: string
+ display?: string
+ meta?: string
+ kind?: string | null
+ }
+ export interface CompleteSlashParams {
+ text?: string | null
+ }
+ /** ``replace_from`` is the column the accepted item replaces from. */
+ export interface CompleteSlashResult {
+ items?: CompletionItem[]
+ replace_from?: number | null
+ }
+ export interface PasteCollapseParams {
+ text?: string | null
+ }
+ export interface PasteCollapseResult {
+ placeholder: string
+ path: string
+ lines: number
+ }
+ export interface ModelSaveKeyParams {
+ slug: string
+ api_key: string
+ session_id?: string | null
+ }
+ export interface ModelSaveKeyResult {
+ provider: ModelOptionProvider
+ }
+ export interface ModelDisconnectParams {
+ slug: string
+ session_id?: string | null
+ }
+ export interface ModelDisconnectResult {
+ slug: string
+ name: string
+ disconnected: boolean
+ }
+ export interface ProfilesListParams {
+ profile?: string | null
+ include_sessions?: boolean | string | null
+ }
+ /** ``bot_mode_protocol`` tells clients this backend injects the teammate protocol itself. */
+ export interface ProfilesListResult {
+ profiles?: ProfileRow[]
+ bot_mode_protocol?: boolean
+ }
+ /** One roster row; the session fields are present only with ``include_sessions``. */
+ export interface ProfileRow {
+ name: string
+ path: string
+ is_default?: boolean
+ model?: string | null
+ provider?: string | null
+ description?: string
+ display_name?: string
+ skill_count?: number
+ last_session?: ProfileSessionPreview | null
+ worker_session?: ProfileWorkerSession | null
+ canonical_session?: ProfileCanonicalSession | null
+ ui_meta_revisions?: Record<string, number>
+ ui_meta?: Record<string, unknown> | null
+ has_avatar?: boolean
+ }
+ /** Newest human-facing session of a profile (``_latest_profile_session_rows``). */
+ export interface ProfileSessionPreview {
+ id: string
+ title?: string
+ preview?: string
+ started_at?: number
+ last_active?: number
+ message_count?: number
+ }
+ /** Newest kanban/tool worker row, so rosters can show a profile as working. */
+ export interface ProfileWorkerSession {
+ id: string
+ source?: string
+ title?: string
+ last_active?: number
+ }
+ /** The profile's "Bot Chat" registry row; ``resolved_id`` is the live compression tip. */
+ export interface ProfileCanonicalSession {
+ id: string
+ resolved_id: string
+ root_title?: string
+ title?: string
+ preview?: string
+ started_at?: number
+ last_active?: number
+ message_count?: number
+ }
+ /** ``clone_from`` omitted = fresh profile + bundled skills; ``mirror_credentials`` defaults on so a headless bot has a provider. */
+ export interface ProfilesCreateParams {
+ profile?: string | null
+ name: string
+ description?: string | null
+ clone_from?: string | null
+ clone_all?: boolean | string | null
+ clone_channels?: boolean | string | null
+ no_skills?: boolean | string | null
+ no_alias?: boolean | string | null
+ soul?: string | null
+ model?: string | null
+ provider?: string | null
+ share_auth?: boolean | string | null
+ mirror_credentials?: boolean | string | null
+ }
+ export interface ProfilesCreateResult {
+ ok?: boolean
+ name: string
+ path: string
+ soul_written?: boolean
+ model_set?: boolean
+ mirrored: ProfileMirrored
+ }
+ /** What was copied from the launch profile; ``auth`` is ``"shared"`` under ``share_auth``. */
+ export interface ProfileMirrored {
+ env?: boolean
+ auth?: boolean | 'shared'
+ model_inherited?: boolean
+ voice?: boolean
+ }
+ export interface ProfileNameParams {
+ profile?: string | null
+ name?: string | null
+ }
+ /** Editor snapshot; ``toolsets_pinned`` says whether ``tools.enabled_toolsets`` is explicit. */
+ export interface ProfilesDescribeResult {
+ name: string
+ description?: string
+ soul?: string
+ model: ProfileModelPin
+ skills?: CapabilityEntry[]
+ toolsets?: ToolsetEntry[]
+ toolsets_pinned?: boolean
+ mcp_servers?: McpServerEntry[]
+ }
+ export interface ProfileModelPin {
+ provider?: string
+ default?: string
+ }
+ export interface CapabilityEntry {
+ name: string
+ enabled?: boolean
+ }
+ export interface ToolsetEntry {
+ name: string
+ enabled?: boolean
+ label?: string
+ description?: string
+ tool_count?: number
+ }
+ export interface McpServerEntry {
+ name: string
+ enabled?: boolean
+ transport?: string
+ }
+ /** Sections are independent; ``ui_meta_expected_revisions`` is a per-key compare-and-swap. */
+ export interface ProfilesConfigureParams {
+ profile?: string | null
+ name?: string | null
+ ui_meta?: Record<string, unknown> | null
+ ui_meta_expected_revisions?: Record<string, number> | null
+ soul?: string | null
+ description?: string | null
+ model?: string | null
+ provider?: string | null
+ confirm_expensive_model?: boolean | string | null
+ disabled_skills?: string[] | null
+ enabled_toolsets?: string[] | null
+ enabled_mcp_servers?: string[] | null
+ }
+ /** ``confirm_required`` mirrors ``config.set``: a guarded model pick wrote nothing yet. */
+ export interface ProfilesConfigureResult {
+ ok: boolean
+ applied: ProfilesConfigureApplied
+ confirm_required?: boolean | null
+ confirm_message?: string | null
+ }
+ /** Per-section outcome; only the sections the request carried are present. */
+ export interface ProfilesConfigureApplied {
+ ui_meta?: boolean | null
+ ui_meta_revisions?: Record<string, number> | null
+ ui_meta_conflicts?: Record<string, UiMetaConflict> | null
+ soul?: boolean | null
+ description?: boolean | null
+ model?: boolean | null
+ skills?: boolean | null
+ toolsets?: boolean | null
+ mcp_servers?: boolean | null
+ }
+ export interface UiMetaConflict {
+ expected?: unknown
+ actual?: number
+ }
+ /** ``data`` is a data URL or bare base64 (PNG/JPEG/WebP, sniffed); ``clear`` deletes instead. */
+ export interface ProfilesSetAssetParams {
+ profile?: string | null
+ name?: string | null
+ asset?: string | null
+ data?: string | null
+ clear?: boolean | string | null
+ }
+ export interface ProfilesSetAssetResult {
+ ok?: boolean
+ asset: string
+ size?: number
+ removed?: number | null
+ }
+ export interface ProfilesGetAssetParams {
+ profile?: string | null
+ name?: string | null
+ asset?: string | null
+ }
+ /** Absent is ``found: false``, not an error. */
+ export interface ProfilesGetAssetResult {
+ found: boolean
+ mime?: string | null
+ size?: number | null
+ data?: string | null
+ }
+ export interface ProfilesRememberOnboardingParams {
+ profile?: string | null
+ answers?: OnboardingAnswers | null
+ }
+ /** ``tui_gateway/onboarding_personalization.py`` — the facts agreed during onboarding. */
+ export interface OnboardingAnswers {
+ name?: string | null
+ context?: string | null
+ theme?: string | null
+ accent?: string | null
+ layout?: string | null
+ focus?: string[] | null
+ connectors?: string[] | null
+ [key: string]: unknown
+ }
+ export interface ProfilesRememberOnboardingResult {
+ saved?: boolean
+ profile?: string
+ target?: string
+ }
+ export interface VaultListResult {
+ items?: VaultItem[]
+ }
+ /** Metadata-only view (``VaultItemMeta.to_dict`` + ``backend``); never a secret. */
+ export interface VaultItem {
+ id: string
+ kind: string
+ label: string
+ origin?: string | null
+ created_at?: string
+ identifier?: string | null
+ identifier_type?: string | null
+ has_otp?: boolean | null
+ backend: string
+ }
+ export interface VaultSourcesResult {
+ sources?: VaultSource[]
+ }
+ export interface VaultSource {
+ name: string
+ display_name: string
+ enabled: boolean
+ needs_unlock: boolean
+ unlocked: boolean
+ installed: boolean
+ }
+ export interface VaultSourceSetParams {
+ profile?: string | null
+ name?: string | null
+ enabled?: boolean | null
+ }
+ export interface VaultSourceSetResult {
+ name: string
+ enabled: boolean
+ }
+ /** The master password is consumed by the manager CLI and never stored or logged. */
+ export interface VaultUnlockParams {
+ profile?: string | null
+ name?: string | null
+ password?: string | null
+ }
+ export interface VaultUnlockResult {
+ name: string
+ unlocked?: boolean
+ }
+ export interface VaultLockParams {
+ profile?: string | null
+ name?: string | null
+ }
+ export interface VaultLockResult {
+ locked?: boolean
+ }
+ /** ``secret`` goes straight into the encrypted store; the result carries only the new id. */
+ export interface VaultAddParams {
+ profile?: string | null
+ kind?: VaultKind | null
+ label?: string | null
+ origin?: string | null
+ secret?: Record<string, unknown> | null
+ }
+ export type VaultKind = 'login' | 'payment' | 'address'
+ export interface VaultAddResult {
+ id: string
+ }
+ export interface VaultRemoveParams {
+ profile?: string | null
+ id?: string | null
+ }
+ export interface VaultRemoveResult {
+ removed: boolean
+ }
+ export interface SessionForeignListParams {
+ profile?: string | null
+ source?: ForeignSource | null
+ offset?: number | null
+ limit?: number | null
+ }
+ export type ForeignSource = 'claude' | 'codex'
+ /** ``unreadable`` counts logs on this page that failed to parse. */
+ export interface SessionForeignListResult {
+ sessions?: ForeignSessionRow[]
+ next_offset?: number | null
+ host: string
+ unreadable?: number
+ }
+ /** ``hermes_cli/foreign_sessions_browser.py::list_foreign_sessions`` — ``id`` is an opaque handle, never a path. */
+ export interface ForeignSessionRow {
+ id: string
+ source: ForeignSource
+ label: string
+ title?: string
+ cwd?: string | null
+ mtime: number
+ turn_count?: number
+ excerpt?: string
+ }
+ export interface SessionForeignIdParams {
+ profile?: string | null
+ id?: string | null
+ }
+ /** Bounded to the last 40 turns / 8000 chars each; ``already_imported`` is the local id. */
+ export interface SessionForeignPreviewResult {
+ messages?: ForeignTurn[]
+ total?: number
+ truncated?: boolean
+ already_imported?: string | null
+ cwd?: string | null
+ }
+ export interface ForeignTurn {
+ role: string
+ content: string
+ }
+ export interface SessionForeignImportResult {
+ session_id: string
+ already_imported?: boolean
+ }
+ /** ``delegations`` is reserved for async delegation records and is currently always empty. */
+ export interface SubagentListResult {
+ subagents?: SubagentSnapshot[]
+ delegations?: Record<string, unknown>[]
+ }
+ /** ``methods_subagents._SUBAGENT_SNAPSHOT_FIELDS`` projection of one live child record. */
+ export interface SubagentSnapshot {
+ subagent_id: string
+ parent_id?: string | null
+ depth?: number | null
+ goal?: string | null
+ delegation_id?: string | null
+ model?: string | null
+ started_at?: number | null
+ status?: SubagentStatus | null
+ tool_count?: number | null
+ last_tool?: string | null
+ accepting_steer?: boolean | null
+ }
+ /** Lifecycle of one delegated child (``tools/delegate_tool_child_run.py``); ``failed`` / ``error`` / ``timeout`` / ``interrupted`` / ``completed`` are terminal. */
+ export type SubagentStatus = 'queued' | 'running' | 'completed' | 'failed' | 'error' | 'timeout' | 'interrupted'
+ export interface SubagentIdParams {
+ session_id: string
+ profile?: string | null
+ subagent_id: string
+ }
+ export interface SubagentInterruptResult {
+ found: boolean
+ subagent_id: string
+ }
+ /** ``available`` is false while the child has no live transcript yet (or it was cleaned up). */
+ export interface SubagentTailResult {
+ subagent_id: string
+ available?: boolean
+ text?: string
+ truncated?: boolean
+ }
+ /** ``methods_projects._projects_payload``: every project (archived included) + the active id. */
+ export interface ProjectsPayload {
+ projects: ProjectInfo[]
+ active_id?: string | null
+ }
+ /** ``hermes_cli/projects_db.py::Project.to_dict`` — one stored project with its folders. */
+ export interface ProjectInfo {
+ id: string
+ slug: string
+ name: string
+ description?: string | null
+ icon?: string | null
+ color?: string | null
+ board_slug?: string | null
+ primary_path?: string | null
+ archived?: boolean
+ created_at: number
+ folders?: ProjectFolder[]
+ }
+ /** ``hermes_cli/projects_db.py::ProjectFolder.to_dict``. */
+ export interface ProjectFolder {
+ path: string
+ label?: string | null
+ is_primary?: boolean
+ added_at?: number | null
+ }
+ /** Any method addressed at one stored project (``5062`` when the id resolves to nothing). */
+ export interface ProjectIdParams {
+ profile?: string | null
+ id: string
+ }
+ export interface ProjectResult {
+ project: ProjectInfo
+ }
+ /** ``use`` also activates the new project. */
+ export interface ProjectsCreateParams {
+ profile?: string | null
+ name: string
+ folders?: string[] | null
+ slug?: string | null
+ primary_path?: string | null
+ description?: string | null
+ icon?: string | null
+ color?: string | null
+ board_slug?: string | null
+ use?: boolean
+ }
+ export interface OptionalProjectResult {
+ project?: ProjectInfo | null
+ }
+ /** Absent keys are left untouched; ``''`` clears ``color`` / ``icon``. */
+ export interface ProjectsUpdateParams {
+ profile?: string | null
+ id: string
+ name?: string | null
+ description?: string | null
+ icon?: string | null
+ color?: string | null
+ board_slug?: string | null
+ }
+ export interface ProjectsAddFolderParams {
+ profile?: string | null
+ id: string
+ path: string
+ label?: string | null
+ is_primary?: boolean
+ }
+ export interface ProjectFolderParams {
+ profile?: string | null
+ id: string
+ path: string
+ }
+ export interface ProjectsArchiveParams {
+ profile?: string | null
+ id: string
+ restore?: boolean
+ }
+ /** No ``id`` (or null) clears the active project. */
+ export interface ProjectsSetActiveParams {
+ profile?: string | null
+ id?: string | null
+ }
+ export interface ActiveIdResult {
+ active_id?: string | null
+ }
+ /** Absent ``cwd`` resolves the gateway's default completion cwd. */
+ export interface ProjectsForCwdParams {
+ profile?: string | null
+ cwd?: string | null
+ }
+ export interface ProjectsForCwdResult {
+ project?: ProjectInfo | null
+ cwd: string
+ branch?: string
+ }
+ /** ``scan`` asks the host to walk the policy roots itself (remote-gateway desktop). */
+ export interface ProjectsDiscoverReposParams {
+ profile?: string | null
+ scan?: boolean
+ }
+ export interface ProjectsDiscoverReposResult {
+ repos: DiscoveredRepo[]
+ discovery_policy?: RepoDiscoveryPolicy | null
+ }
+ /** ``methods_projects._discover_repos_payload`` row: a git root with session totals. */
+ export interface DiscoveredRepo {
+ root: string
+ label?: string
+ sessions?: number
+ last_active?: number
+ }
+ /** ``methods_projects._repo_discovery_policy`` — the effective ``desktop.repo_scan_*`` config. */
+ export interface RepoDiscoveryPolicy {
+ enabled: boolean
+ roots: string[]
+ exclude_paths: string[]
+ }
+ /** Repos as ``{root, label}`` objects or bare root strings; entries without a root are skipped. */
+ export interface ProjectsRecordReposParams {
+ profile?: string | null
+ repos?: (RecordRepoItem | string)[] | null
+ discovery_policy?: RepoDiscoveryPolicyParams | null
+ }
+ export interface RecordRepoItem {
+ root: string
+ label?: string | null
+ }
+ /** The policy the desktop scanned under (short or ``repo_scan_*`` long keys both accepted). */
+ export interface RepoDiscoveryPolicyParams {
+ enabled?: boolean | null
+ roots?: string[] | null
+ exclude_paths?: string[] | null
+ repo_scan_enabled?: boolean | null
+ repo_scan_roots?: string[] | null
+ repo_scan_exclude_paths?: string[] | null
+ }
+ export interface ProjectsRecordReposResult {
+ repos: DiscoveredRepo[]
+ discovery_policy?: RepoDiscoveryPolicy | null
+ accepted: boolean
+ }
+ export interface ProjectsTreeParams {
+ profile?: string | null
+ preview_limit?: number | null
+ session_limit?: number | null
+ }
+ export interface ProjectsTreeResult {
+ projects: ProjectTreeNode[]
+ active_id?: string | null
+ scoped_session_ids?: string[]
+ }
+ /** ``project_tree._project_node`` — explicit, auto (git root) or the synthetic Home bucket. */
+ export interface ProjectTreeNode {
+ id: string
+ label: string
+ path?: string | null
+ color?: string | null
+ icon?: string | null
+ isAuto?: boolean
+ isNoProject?: boolean
+ sessionCount?: number
+ lastActive?: number
+ totalTokens?: number
+ totalCostUsd?: number
+ repos?: ProjectTreeRepo[]
+ previewSessions?: ProjectTreeSession[]
+ }
+ export interface ProjectTreeRepo {
+ id: string
+ label: string
+ path?: string | null
+ groups?: ProjectTreeLane[]
+ sessionCount?: number
+ }
+ /** One branch / worktree / kanban lane inside a repo; ``sessions`` is empty unless hydrated. */
+ export interface ProjectTreeLane {
+ id: string
+ label: string
+ path?: string | null
+ isMain?: boolean
+ isKanban?: boolean
+ sessions?: ProjectTreeSession[]
+ }
+ /** ``methods_projects._project_tree_row`` + ``project_tree.stamp_profile``: the minimal row the sidebar renders, stamped with the profile it belongs to. */
+ export interface ProjectTreeSession {
+ id: string
+ title?: string | null
+ preview?: string | null
+ source?: string | null
+ model?: string | null
+ started_at?: number | null
+ ended_at?: number | null
+ last_active?: number | null
+ message_count?: number
+ tool_call_count?: number
+ input_tokens?: number
+ output_tokens?: number
+ is_active?: boolean
+ cwd?: string | null
+ git_branch?: string | null
+ git_repo_root?: string | null
+ parent_session_id?: string | null
+ pinned?: boolean | null
+ unread?: boolean | null
+ archived?: boolean | null
+ actual_cost_usd?: number | null
+ estimated_cost_usd?: number | null
+ handoff_platform?: string | null
+ handoff_state?: string | null
+ _lineage_root_id?: string | null
+ _lineage_ids?: string[] | null
+ profile?: string | null
+ [key: string]: unknown
+ }
+ export interface ProjectsProjectSessionsParams {
+ profile?: string | null
+ project_id: string
+ session_limit?: number | null
+ }
+ export interface ProjectsProjectSessionsResult {
+ project?: ProjectTreeNode | null
+ }
+ /** ``knownRevision``: the spritesheet revision the caller already holds (send-once bytes). */
+ export interface PetInfoParams {
+ profile?: string | null
+ knownRevision?: string | null
+ }
+ /** ``server._pet_sprite_payload`` behind ``enabled``; every sprite field is absent when the pet display is off, ``spritesheetBase64`` is elided when ``spritesheetUnchanged``. */
+ export interface PetInfoResult {
+ enabled: boolean
+ slug?: string | null
+ displayName?: string | null
+ mime?: string | null
+ spritesheetBase64?: string | null
+ spritesheetRevision?: string | null
+ spritesheetUnchanged?: boolean | null
+ frameW?: number | null
+ frameH?: number | null
+ framesPerState?: number | null
+ framesByState?: Record<string, number> | null
+ framesByRow?: Record<string, number> | null
+ loopMs?: number | null
+ scale?: number | null
+ stateRows?: string[] | null
+ [key: string]: unknown
+ }
+ export interface PetInfoMetaResult {
+ enabled: boolean
+ slug?: string | null
+ displayName?: string | null
+ scale?: number | null
+ spritesheetRevision?: string | null
+ }
+ /** ``graphics`` opts into the kitty payload when the TTY speaks it; ``cols`` overrides the width. */
+ export interface PetCellsParams {
+ profile?: string | null
+ state?: string | null
+ cols?: number | null
+ graphics?: boolean
+ }
+ /** Unicode: ``frames`` is frame → row → cell ``[tr,tg,tb,ta, br,bg,bb,ba]``; kitty (``graphics`` set): ``frames`` are transmit escapes and ``placeholder`` the text grid. */
+ export interface PetCellsResult {
+ enabled: boolean
+ slug?: string | null
+ displayName?: string | null
+ state?: string | null
+ cols?: number | null
+ frameMs?: number | null
+ frames?: number[][][][] | string[] | null
+ scale?: number | null
+ graphics?: string | null
+ imageId?: number | null
+ color?: string | null
+ rows?: number | null
+ placeholder?: string[] | null
+ }
+ export interface PetGalleryParams {
+ profile?: string | null
+ localOnly?: boolean
+ }
+ export interface PetGalleryResult {
+ enabled: boolean
+ active?: string
+ pets?: PetGalleryEntry[]
+ }
+ export interface PetGalleryEntry {
+ slug: string
+ displayName: string
+ installed: boolean
+ spritesheetUrl?: string
+ curated?: boolean | null
+ generated?: boolean
+ }
+ export interface PetSlugParams {
+ profile?: string | null
+ slug: string
+ }
+ export interface PetSlugResult {
+ ok: boolean
+ slug: string
+ displayName?: string | null
+ }
+ export interface PetRenameParams {
+ profile?: string | null
+ slug: string
+ name: string
+ }
+ export interface PetExportResult {
+ ok: boolean
+ filename: string
+ zipBase64: string
+ }
+ /** ``url``: spritesheet source for a not-yet-installed pet. */
+ export interface PetThumbParams {
+ profile?: string | null
+ slug: string
+ url?: string | null
+ }
+ export interface PetThumbResult {
+ ok: boolean
+ slug: string
+ dataUri?: string | null
+ }
+ export interface PetScaleParams {
+ profile?: string | null
+ scale?: unknown
+ }
+ export interface PetScaleResult {
+ ok: boolean
+ scale: number
+ }
+ /** ``text`` is normally a string; the relay / hosted paths may hand a structured (parts list) payload, and the busy path renders it. Truncation (rewind / edit / regenerate) needs explicit consent: ``confirm_truncate`` plus one durable target (``truncate_before_row_id`` preferred, ``truncate_before_message_id``, or the legacy ``truncate_before_user_ordinal``). */
+ export interface PromptSubmitParams {
+ session_id: string
+ profile?: string | null
+ text?: unknown
+ display_kind?: string | null
+ interrupted?: boolean | null
+ queued?: boolean | null
+ surface?: string | null
+ voice_context?: string | null
+ truncate_before_user_ordinal?: number | null
+ truncate_before_row_id?: number | null
+ truncate_before_message_id?: string | null
+ confirm_truncate?: boolean | null
+ confirm_empty_truncate?: boolean | null
+ rebind_survivor_row_ids?: number[] | null
+ }
+ /** ``status`` is absent only on the typed-stop-phrase reply (``voice_stopped``). After a truncation the survivor row ids let the client rebind its cached ``rowId``s (``None`` map entries: drop the cached id). ``turn_isolation`` marks a compute-host dispatch. */
+ export interface PromptSubmitResult {
+ status?: PromptSubmitStatus | null
+ voice_stopped?: boolean | null
+ survivor_user_row_ids?: (number | null)[] | null
+ survivor_row_id_map?: Record<string, number | null> | null
+ turn_isolation?: boolean | null
+ }
+ export type PromptSubmitStatus = 'streaming' | 'queued' | 'steered' | 'redirected'
+ export interface ClipboardPasteParams {
+ session_id: string
+ profile?: string | null
+ }
+ /** ``methods_prompt.py::_attached_image_result``: the image is queued for the next turn. */
+ export interface AttachedImageResult {
+ name?: string | null
+ width?: number | null
+ height?: number | null
+ token_estimate?: number | null
+ attached: boolean
+ path?: string | null
+ count?: number | null
+ remainder?: string | null
+ text?: string | null
+ bytes?: number | null
+ message?: string | null
+ }
+ export interface ImageAttachParams {
+ session_id: string
+ profile?: string | null
+ path: string
+ }
+ /** ``content_base64`` (or the ``data`` alias) carries the bytes; ``filename`` / ``ext`` only hint the extension — magic bytes decide. */
+ export interface ImageAttachBytesParams {
+ session_id: string
+ profile?: string | null
+ content_base64?: string | null
+ data?: string | null
+ filename?: string | null
+ ext?: string | null
+ }
+ /** Host ``path`` or base64 ``content_base64`` / ``data``; ``first_page`` / ``last_page`` bound the render (per-call page cap enforced server-side). */
+ export interface PdfAttachParams {
+ session_id: string
+ profile?: string | null
+ path?: string | null
+ content_base64?: string | null
+ data?: string | null
+ filename?: string | null
+ first_page?: number | null
+ last_page?: number | null
+ }
+ export interface PdfAttachResult {
+ attached: boolean
+ filename: string
+ pages_attached: number
+ pages: PdfPage[]
+ count: number
+ text: string
+ }
+ export interface PdfPage {
+ name?: string | null
+ width?: number | null
+ height?: number | null
+ token_estimate?: number | null
+ path: string
+ page: number
+ }
+ /** ``path`` when the file is gateway-visible, else ``data_url`` carries the bytes; ``name`` labels an uploaded file. */
+ export interface FileAttachParams {
+ session_id: string
+ profile?: string | null
+ path?: string | null
+ data_url?: string | null
+ name?: string | null
+ }
+ export interface FileAttachResult {
+ attached: boolean
+ name: string
+ path: string
+ ref_path: string
+ ref_text: string
+ uploaded: boolean
+ }
+ export interface ImageDetachParams {
+ session_id: string
+ profile?: string | null
+ path: string
+ }
+ export interface ImageDetachResult {
+ detached: boolean
+ count: number
+ }
+ export interface InputDetectDropParams {
+ session_id: string
+ profile?: string | null
+ text?: string | null
+ }
+ /** ``matched: false`` alone when the text is not a drop; an image drop is queued immediately (``is_image`` + ``count``), a file drop only yields the ``text`` to insert. */
+ export interface InputDetectDropResult {
+ name?: string | null
+ width?: number | null
+ height?: number | null
+ token_estimate?: number | null
+ matched: boolean
+ is_image?: boolean | null
+ path?: string | null
+ count?: number | null
+ text?: string | null
+ }
+ export interface SideAgentParams {
+ session_id: string
+ profile?: string | null
+ text: string
+ }
+ /** The side agent runs detached; its answer lands on the parent session as an event carrying this ``task_id``. */
+ export interface TaskIdResult {
+ task_id: string
+ }
+ export interface PreviewRestartParams {
+ session_id: string
+ profile?: string | null
+ url: string
+ cwd?: string | null
+ context?: string | null
+ }
+ export interface ClarifyLockParams {
+ request_id: string
+ question_id: string
+ answer?: unknown
+ profile?: string | null
+ }
+ /** ``remaining`` lists the qids still unanswered; the lock that empties it resolves the request. ``expired``: the wait already ended (timeout / cancel) — not an error. */
+ export interface ClarifyLockResult {
+ status: ClarifyLockStatus
+ remaining?: string[] | null
+ }
+ export type ClarifyLockStatus = 'ok' | 'expired'
+ export interface RequestAnswerParams {
+ id: string
+ result: Record<string, unknown>
+ profile?: string | null
+ }
+ export interface RequestAnswerResult {
+ status: ClarifyLockStatus
+ }
+ export interface ApprovalPendingParams {
+ session_id: string
+ profile?: string | null
+ }
+ export interface ApprovalPendingResult {
+ approvals: PendingApproval[]
+ }
+ /** One unresolved ``tools/approval.py`` gateway queue entry as ``server._approval_request_payload`` renders it (command redacted; ``choices`` precomputed). The key set is owned by the approval tool. */
+ export interface PendingApproval {
+ request_id?: string | null
+ command?: string | null
+ description?: string | null
+ pattern_key?: string | null
+ pattern_keys?: string[] | null
+ allow_permanent?: boolean | null
+ allow_session?: boolean | null
+ smart_denied?: boolean | null
+ choices?: string[] | null
+ tool_name?: string | null
+ [key: string]: unknown
+ }
+ export interface ApprovalReceivedParams {
+ session_id: string
+ profile?: string | null
+ request_id: string
+ }
+ export interface ApprovalReceivedResult {
+ acknowledged: boolean
+ }
+ /** ``choice`` is one of the offered ``approval`` choices (once / session / always / deny); ``all`` resolves every pending approval, ``request_id`` a specific one, neither the oldest. */
+ export interface ApprovalRespondParams {
+ session_id: string
+ profile?: string | null
+ choice?: string | null
+ all?: boolean | null
+ request_id?: string | null
+ }
+ export interface ApprovalRespondResult {
+ resolved: number
+ }
+ export interface VoiceToggleParams {
+ action?: VoiceToggleAction
+ profile?: string | null
+ }
+ export type VoiceToggleAction = 'status' | 'on' | 'off' | 'tts'
+ /** ``methods_voice.py::_voice_status_payload`` (+ the requirements probe on ``status``, the spoken stop hint on ``on``). */
+ export interface VoiceToggleResult {
+ enabled: boolean
+ record_key: string
+ tts: boolean
+ stop_hint?: string | null
+ available?: boolean | null
+ audio_available?: boolean | null
+ stt_available?: boolean | null
+ details?: string | null
+ }
+ export interface VoiceRecordParams {
+ action?: VoiceRecordAction
+ session_id?: string | null
+ profile?: string | null
+ }
+ export type VoiceRecordAction = 'start' | 'stop'
+ export interface VoiceRecordResult {
+ status: VoiceRecordStatus
+ reason?: string | null
+ }
+ export type VoiceRecordStatus = 'recording' | 'stopped' | 'busy'
+ export interface VoiceTtsParams {
+ text: string
+ profile?: string | null
+ }
+ export interface VoiceTtsResult {
+ status: string
+ }
+ /** ``surface`` names the caller ("tui" | "gui"); ``persist`` is the explicit gesture that also flips ``wake_word.enabled`` on; ``client_capture`` asks for PCM streamed via wake.feed. */
+ export interface WakeStartParams {
+ surface?: string | null
+ persist?: boolean | null
+ client_capture?: boolean | null
+ session_id?: string | null
+ profile?: string | null
+ }
+ /** ``started: false`` carries ``reason`` (unavailable / disabled / disabled_for_surface / owned); ``sample_rate`` / ``frame_length`` describe the PCM frames the armed detector expects. */
+ export interface WakeStartResult {
+ started: boolean
+ reason?: string | null
+ hint?: string | null
+ phrase?: string | null
+ provider?: string | null
+ owner_surface?: string | null
+ enabled_persisted?: boolean | null
+ capture?: string | null
+ sample_rate?: number | null
+ frame_length?: number | null
+ }
+ export interface WakeStopParams {
+ persist?: boolean | null
+ profile?: string | null
+ }
+ export interface WakeStopResult {
+ reason?: string | null
+ stopped: boolean
+ disabled_persisted: boolean
+ }
+ export interface WakeControlParams {
+ profile?: string | null
+ }
+ export interface WakePauseResult {
+ reason?: string | null
+ paused: boolean
+ }
+ export interface WakeResumeResult {
+ reason?: string | null
+ resumed: boolean
+ }
+ export interface WakeStatusParams {
+ surface?: string | null
+ client_capture?: boolean | null
+ profile?: string | null
+ }
+ /** ``enabled`` is config truth; ``listening`` is this caller's armed detector; ``audio_silent`` means armed but deaf (see ``hint``). */
+ export interface WakeStatusResult {
+ listening: boolean
+ owned_by_caller: boolean
+ owner_surface?: string | null
+ phrase: string
+ provider: string
+ configured_surface: string
+ input_device: WakeInputDevice
+ available: boolean
+ hint: string
+ enabled: boolean
+ audio_silent: boolean
+ capture: string
+ local_input_available: boolean
+ sample_rate: number
+ frame_length: number
+ }
+ /** ``tools/wake_word.py::_describe_input_device`` — PortAudio diagnostics for the configured mic. */
+ export interface WakeInputDevice {
+ selector?: number | string | null
+ name?: string | null
+ error?: string | null
+ max_input_channels?: number | null
+ default_samplerate?: number | null
+ hostapi_index?: number | null
+ hostapi?: string | null
+ [key: string]: unknown
+ }
+ /** ``pcm`` (or the ``pcm_b64`` alias): base64 int16 mono little-endian, 16 kHz only. */
+ export interface WakeFeedParams {
+ pcm?: string | null
+ pcm_b64?: string | null
+ sample_rate?: number | null
+ profile?: string | null
+ }
+ export interface WakeFeedResult {
+ reason?: string | null
+ fed: boolean
+ }
+ export interface SessionCreateParams {
+ profile?: string | null
+ cols?: number | null
+ source?: string | null
+ cwd?: string | null
+ messages?: SeedMessage[] | null
+ parent_session_id?: string | null
+ title?: string | null
+ model?: string | null
+ provider?: string | null
+ reasoning_effort?: string | null
+ fast?: boolean | null
+ close_on_disconnect?: boolean
+ hidden?: boolean
+ room_plumbing?: boolean
+ follow_profile_config?: boolean
+ }
+ /** One create-time transcript row (``session_history._coerce_seed_history``); ``text`` is the legacy alias of ``content``; only ``display_kind: "hidden"`` is accepted from the wire. Clients forward stored rows verbatim (``_row_id``, ``timestamp``, …) and the coercer drops what it does not use, so the row stays open. */
+ export interface SeedMessage {
+ role: string
+ content?: string | null
+ text?: string | null
+ display_kind?: string | null
+ [key: string]: unknown
+ }
+ export interface SessionCreateResult {
+ session_id: string
+ stored_session_id: string
+ message_count: number
+ messages: TranscriptMessage[]
+ info: SessionLiveInfo
+ }
+ /** One transcript row as the gateway PROJECTS it for renderers (``session_history._project_history``): ``text`` (never ``content``), display-only ``timestamp`` / ``display_kind`` / ``display_metadata``, the durable ``row_id`` rewind targets, and for tool rows ``name`` + ``context`` preview + full ``args``. Assistant detail sidecars (``reasoning``, …) ride as extra keys. */
+ export interface TranscriptMessage {
+ role: string
+ text?: string | null
+ timestamp?: number | null
+ row_id?: number | null
+ display_kind?: string | null
+ display_metadata?: unknown | null
+ name?: string | null
+ context?: string | null
+ args?: Record<string, unknown> | null
+ reasoning?: string | null
+ [key: string]: unknown
+ }
+ /** ``session_id`` is the STORED id (or an exact title); the reply's ``session_id`` is the runtime id. */
+ export interface SessionResumeParams {
+ session_id: string
+ profile?: string | null
+ cols?: number | null
+ source?: string | null
+ lazy?: boolean
+ defer_history?: boolean
+ omit_messages?: boolean
+ eager_build?: boolean
+ close_on_disconnect?: boolean
+ }
+ export interface SessionResumeResult {
+ session_id: string
+ message_count: number
+ messages: TranscriptMessage[]
+ info: SessionLiveInfo
+ stored_session_id?: string | null
+ resumed?: string | null
+ session_key?: string | null
+ messages_omitted?: boolean | null
+ hydrating?: boolean | null
+ running?: boolean | null
+ turn_started_at?: number | null
+ started_at?: number | null
+ status?: string | null
+ inflight?: InflightTurn | null
+ queued?: QueuedPrompt | null
+ pending_approval?: PendingApproval | null
+ open_requests?: OpenRequestEntry[] | null
+ pending_connection?: ConnectionRequestPayload | null
+ todo_state?: TodoState | null
+ auto_continue?: AutoContinue | null
+ }
+ /** ``session_auto_continue._inflight_snapshot``: the live (or retained failed) turn a reconnecting client rebuilds its bubbles from. */
+ export interface InflightTurn {
+ assistant?: string
+ streaming?: boolean
+ user?: string
+ corrections?: string[] | null
+ correction_offsets?: number[] | null
+ error?: string | null
+ status?: string | null
+ recoverable?: boolean | null
+ error_surface?: Record<string, unknown> | null
+ }
+ export interface QueuedPrompt {
+ user: string
+ }
+ /** One unanswered server→client request (``server_requests.Request.snapshot``); the reconnecting client re-delivers it to its request handlers. */
+ export interface OpenRequestEntry {
+ id: string
+ method: string
+ params: Record<string, unknown>
+ }
+ /** ``ConnectionOperation.request_payload``: opens the card; also the ``pending_connection`` resume snapshot so a client that missed the event restores the card with the server's deadline. */
+ export interface ConnectionRequestPayload {
+ op_id: string
+ deadline_at: number
+ timeout_seconds: number
+ targets: ConnectionOperationTarget[]
+ tool_call_id?: string | null
+ }
+ /** ``tool_progress._normalize_todo_state``: the authoritative todo snapshot. */
+ export interface TodoState {
+ todos: Record<string, unknown>[]
+ revision: number
+ }
+ /** A crash-interrupted turn was scheduled to continue right after this resume. */
+ export interface AutoContinue {
+ attempt: number
+ interrupted_at: number
+ }
+ export interface SessionActivateParams {
+ session_id: string
+ profile?: string | null
+ cols?: number | null
+ omit_messages?: boolean
+ }
+ export interface SessionActivateResult {
+ session_id: string
+ message_count: number
+ messages: TranscriptMessage[]
+ info: SessionLiveInfo
+ stored_session_id?: string | null
+ resumed?: string | null
+ session_key?: string | null
+ messages_omitted?: boolean | null
+ hydrating?: boolean | null
+ running?: boolean | null
+ turn_started_at?: number | null
+ started_at?: number | null
+ status?: string | null
+ inflight?: InflightTurn | null
+ queued?: QueuedPrompt | null
+ pending_approval?: PendingApproval | null
+ open_requests?: OpenRequestEntry[] | null
+ pending_connection?: ConnectionRequestPayload | null
+ todo_state?: TodoState | null
+ auto_continue?: AutoContinue | null
+ }
+ export interface SessionListParams {
+ profile?: string | null
+ title?: string | null
+ limit?: number | null
+ include_hidden?: boolean
+ }
+ export interface SessionListResult {
+ sessions: SessionListRow[]
+ }
+ /** ``methods_session._session_row_summary``; ``resolved_id`` only on a title lookup that followed a compression lineage to its tip. */
+ export interface SessionListRow {
+ id: string
+ resolved_id?: string | null
+ title?: string
+ preview?: string
+ started_at?: number
+ message_count?: number
+ source?: string
+ }
+ export interface SessionMostRecentParams {
+ profile?: string | null
+ }
+ export interface SessionMostRecentResult {
+ session_id: string | null
+ title?: string | null
+ started_at?: number | null
+ source?: string | null
+ }
+ export interface SessionActiveListParams {
+ profile?: string | null
+ current_session_id?: string | null
+ }
+ export interface SessionActiveListResult {
+ sessions: SessionActiveItem[]
+ }
+ /** ``server._session_live_item``. */
+ export interface SessionActiveItem {
+ current: boolean
+ id: string
+ last_active: number
+ message_count: number
+ model: string
+ preview: string
+ session_key: string
+ started_at: number
+ status: LiveSessionStatus
+ title: string
+ }
+ export type LiveSessionStatus = 'idle' | 'starting' | 'waiting' | 'working' | 'streaming' | 'resuming'
+ /** ``session_id`` is the STORED id. */
+ export interface SessionDeleteParams {
+ session_id: string
+ profile?: string | null
+ }
+ export interface SessionDeleteResult {
+ deleted: string
+ }
+ export interface SessionTitleParams {
+ session_id: string
+ profile?: string | null
+ title?: string | null
+ }
+ export interface SessionTitleResult {
+ title: string
+ session_key?: string | null
+ pending?: boolean | null
+ }
+ /** ``session_id`` is a live runtime id first, else a stored id / key / title. */
+ export interface SessionSetHiddenParams {
+ session_id: string
+ hidden?: boolean
+ profile?: string | null
+ }
+ export interface SessionSetHiddenResult {
+ hidden: boolean
+ session_key: string
+ }
+ export interface SessionWorkspaceMoveParams {
+ profile?: string | null
+ session_key: string
+ cwd: string
+ }
+ export interface SessionWorkspaceMoveResult {
+ cwd: string
+ branch?: string | null
+ git_repo_root?: string | null
+ }
+ export interface SessionCwdSetParams {
+ session_id: string
+ profile?: string | null
+ cwd: string
+ }
+ /** The refreshed ``session.info`` view (full agent view, or the lazy shape). */
+ export interface SessionCwdSetResult {
+ model?: string
+ provider?: string
+ reasoning_effort?: string
+ service_tier?: string
+ fast?: boolean
+ yolo?: boolean
+ approval_mode?: string
+ tools?: Record<string, string[]>
+ skills?: Record<string, string[]>
+ cwd?: string
+ branch?: string | null
+ project?: ProjectRef | null
+ terminal_backend?: string
+ personality?: string
+ running?: boolean
+ turn_started_at?: number | null
+ title?: string
+ stored_session_id?: string
+ desktop_contract?: number | string | null
+ version?: string
+ release_date?: string
+ update_behind?: unknown | null
+ update_command?: string
+ usage?: Usage | null
+ profile_name?: string | null
+ mcp_servers?: McpServerStatus[]
+ system_prompt?: string | null
+ credential_warning?: string | null
+ lazy?: boolean | null
+ [key: string]: unknown
+ }
+ export interface SessionCloseParams {
+ session_id: string
+ profile?: string | null
+ }
+ export interface SessionCloseResult {
+ closed: boolean
+ }
+ export interface SessionBranchParams {
+ session_id: string
+ profile?: string | null
+ name?: string | null
+ count?: number | null
+ }
+ export interface SessionBranchResult {
+ session_id: string
+ stored_session_id: string
+ title: string
+ parent: string
+ message_count: number
+ messages: TranscriptMessage[]
+ info: SessionLiveInfo
+ }
+ export interface SessionUndoParams {
+ session_id: string
+ profile?: string | null
+ }
+ export interface SessionUndoResult {
+ removed: number
+ }
+ export interface SessionSaveParams {
+ session_id: string
+ profile?: string | null
+ }
+ /** Under turn isolation the compute host's result passes through verbatim. */
+ export interface SessionSaveResult {
+ file?: string | null
+ [key: string]: unknown
+ }
+ export interface SessionStatusParams {
+ session_id: string
+ profile?: string | null
+ }
+ export interface SessionStatusResult {
+ output: string
+ }
+ export interface SessionHistoryParams {
+ session_id: string
+ profile?: string | null
+ }
+ export interface SessionHistoryResult {
+ count: number
+ messages: TranscriptMessage[]
+ }
+ export interface SessionUsageParams {
+ session_id: string
+ profile?: string | null
+ }
+ export interface SessionUsageResult {
+ model?: string
+ input?: number
+ output?: number
+ reasoning?: number
+ prompt?: number
+ completion?: number
+ total?: number
+ calls?: number
+ compressions?: number | null
+ context_used?: number | null
+ context_max?: number | null
+ context_percent?: number | null
+ context_source?: string | null
+ context_estimated?: boolean | null
+ cache_hit_pct?: number | null
+ cache_read?: number | null
+ cache_write?: number | null
+ avg_latency_s?: number | null
+ avg_tps?: number | null
+ active_subagents?: number | null
+ dev_credits_spent_micros?: number | null
+ cost_usd?: number | null
+ cost_status?: string | null
+ credits_lines?: string[] | null
+ [key: string]: unknown
+ }
+ export interface SessionContextBreakdownParams {
+ session_id: string
+ profile?: string | null
+ }
+ /** ``agent.context_breakdown.compute_session_context_breakdown`` (empty categories before the agent builds). */
+ export interface SessionContextBreakdownResult {
+ categories: ContextCategory[]
+ context_max: number
+ context_percent: number
+ context_used: number
+ estimated_total: number
+ context_estimated: boolean
+ context_source: string
+ model: string
+ }
+ export interface ContextCategory {
+ color: string
+ id: string
+ label: string
+ tokens: number
+ }
+ export interface SessionCompressParams {
+ session_id: string
+ profile?: string | null
+ focus_topic?: string | null
+ }
+ /** In-process: the before/after summary + replacement transcript. Compute host: its result passes through (hence open) with ``turn_isolation``; a lock held elsewhere answers ``compressed: false``. */
+ export interface SessionCompressResult {
+ status?: string | null
+ removed?: number | null
+ before_messages?: number | null
+ after_messages?: number | null
+ before_tokens?: number | null
+ after_tokens?: number | null
+ summary?: CompressionSummary | null
+ usage?: Usage | null
+ info?: SessionLiveInfo | null
+ messages?: TranscriptMessage[] | null
+ compressed?: boolean | null
+ lock_held?: boolean | null
+ message?: string | null
+ turn_isolation?: boolean | null
+ host_ack?: Record<string, unknown> | null
+ [key: string]: unknown
+ }
+ /** ``agent.manual_compression_feedback.summarize_manual_compression``. */
+ export interface CompressionSummary {
+ noop?: boolean
+ aborted?: boolean
+ refused_would_grow?: boolean | null
+ fallback_used?: boolean | null
+ headline?: string
+ token_line?: string
+ note?: string | null
+ [key: string]: unknown
+ }
+ export interface SessionInterruptParams {
+ session_id: string
+ profile?: string | null
+ expected_hosted_task_id?: string | null
+ }
+ export interface SessionInterruptResult {
+ status: InterruptStatus
+ interrupted?: boolean | null
+ turn_isolation?: boolean | null
+ }
+ export type InterruptStatus = 'interrupted' | 'not_interrupted'
+ export interface SessionCorrectionParams {
+ session_id: string
+ profile?: string | null
+ text: string
+ }
+ export interface SessionCorrectionResult {
+ status: CorrectionStatus
+ text: string
+ }
+ export type CorrectionStatus = 'queued' | 'redirected' | 'rejected'
+ export interface SpawnTreeSaveParams {
+ profile?: string | null
+ subagents: Record<string, unknown>[]
+ session_id?: string | null
+ started_at?: number | null
+ finished_at?: number | null
+ label?: string | null
+ }
+ export interface SpawnTreeSaveResult {
+ path: string
+ session_id: string
+ }
+ export interface SpawnTreeListParams {
+ profile?: string | null
+ session_id?: string | null
+ cross_session?: boolean
+ limit?: number | null
+ }
+ export interface SpawnTreeListResult {
+ entries: SpawnTreeEntry[]
+ }
+ /** Index row (``server._append_spawn_tree_index``) or a legacy file scan. */
+ export interface SpawnTreeEntry {
+ path: string
+ session_id?: string | null
+ started_at?: number | null
+ finished_at?: number | null
+ label?: string
+ count?: number
+ [key: string]: unknown
+ }
+ export interface SpawnTreeLoadParams {
+ profile?: string | null
+ path: string
+ }
+ /** The snapshot file as written by ``spawn_tree.save`` (open: the file is the contract). */
+ export interface SpawnTreeLoadResult {
+ session_id?: string | null
+ started_at?: number | null
+ finished_at?: number | null
+ label?: string | null
+ subagents?: Record<string, unknown>[]
+ [key: string]: unknown
+ }
+ export interface TerminalResizeParams {
+ session_id: string
+ profile?: string | null
+ cols?: number | null
+ }
+ export interface TerminalResizeResult {
+ cols: number
+ }
+ export interface SessionEventsSinceParams {
+ session_id: string
+ profile?: string | null
+ last_seen?: number | null
+ }
+ export interface SessionEventsSinceResult {
+ events: Record<string, unknown>[]
+ latest_seq: number
+ truncated: boolean
+ count: number
+ epoch: string
+ open_requests: OpenRequestEntry[]
+ }
+ export interface SessionEventsStatsParams {
+ profile?: string | null
+ }
+ /** ``event_replay.replay_stats``. */
+ export interface SessionEventsStatsResult {
+ sessions: number
+ events: number
+ bytes: number
+ max_per_session: number
+ max_bytes_per_session: number
+ max_bytes_process: number
+ }
+ /** Needs a ``template`` or ``instructions`` / ``input``; a live ``session_id`` lends its model. */
+ export interface LlmOneshotParams {
+ profile?: string | null
+ template?: string | null
+ instructions?: string | null
+ input?: string | null
+ variables?: Record<string, unknown> | null
+ task?: string | null
+ temperature?: number | null
+ max_tokens?: number | null
+ session_id?: string | null
+ }
+ export interface LlmOneshotResult {
+ text: string
+ }
+ export interface SystemBatteryParams {
+ profile?: string | null
+ }
+ export interface SystemBatteryResult {
+ available: boolean
+ percent?: number | null
+ plugged?: boolean | null
+ category?: BatteryCategory
+ }
+ /** ``agent/battery.py::battery_category`` colour bucket. */
+ export type BatteryCategory = 'good' | 'warn' | 'bad' | 'critical' | 'dim'
+ export interface ProcessStopParams {
+ session_id?: string | null
+ profile?: string | null
+ }
+ export interface ProcessStopResult {
+ killed: number
+ }
+ export interface AgentsListParams {
+ profile?: string | null
+ }
+ export interface AgentsListResult {
+ processes?: AgentProcessRow[]
+ }
+ export interface AgentProcessRow {
+ session_id: string
+ command: string
+ status: string
+ uptime: number
+ }
+ export interface ProcessListParams {
+ session_id: string
+ profile?: string | null
+ }
+ export interface ProcessListResult {
+ processes?: ProcessEntry[]
+ }
+ /** ``tools/process_registry.py::list_sessions`` row plus the gateway's ``output_tail``. */
+ export interface ProcessEntry {
+ session_id: string
+ command?: string
+ cwd?: string | null
+ pid?: number | null
+ owner_task_id?: string | null
+ started_at?: string | null
+ uptime_seconds?: number | null
+ status?: string
+ output_preview?: string
+ output_tail?: string | null
+ session_scoped?: boolean | null
+ watch_patterns?: string[] | null
+ watch_hit?: boolean | null
+ notify_on_complete?: boolean | null
+ exit_code?: number | null
+ detached?: boolean | null
+ [key: string]: unknown
+ }
+ export interface ProcessKillParams {
+ session_id: string
+ process_id: string
+ profile?: string | null
+ }
+ /** ``tools/process_registry.py::kill_process`` snapshot; ``error`` rides on the failure statuses. */
+ export interface ProcessKillResult {
+ status: ProcessKillStatus
+ session_id?: string | null
+ command?: string | null
+ exit_code?: number | null
+ completion_reason?: string | null
+ termination_source?: string | null
+ output?: string | null
+ error?: string | null
+ [key: string]: unknown
+ }
+ export type ProcessKillStatus = 'killed' | 'already_exited' | 'not_found' | 'error'
+ export interface ShellExecParams {
+ command: string
+ profile?: string | null
+ }
+ export interface ShellExecResult {
+ stdout: string
+ stderr: string
+ code: number
+ }
+ export interface CliExecParams {
+ argv: string[]
+ timeout?: number | null
+ profile?: string | null
+ }
+ export interface CliExecResult {
+ blocked: boolean
+ code: number
+ output: string
+ hint?: string | null
+ }
+ export interface CommandsCatalogParams {
+ session_id?: string | null
+ profile?: string | null
+ }
+ export interface CommandsCatalogResult {
+ pairs?: string[][]
+ sub?: Record<string, string[]>
+ canon?: Record<string, string>
+ commands?: Record<string, CommandCatalogMeta>
+ categories?: CommandCategory[]
+ skills?: Record<string, SkillCatalogEntry>
+ skill_count?: number
+ warning?: string
+ }
+ export interface CommandCatalogMeta {
+ argument_mode?: ArgumentMode | null
+ desktop?: string | null
+ }
+ export type ArgumentMode = 'options' | 'text' | 'mixed'
+ export interface CommandCategory {
+ name: string
+ pairs?: string[][]
+ }
+ export interface SkillCatalogEntry {
+ usage?: number
+ origin?: string
+ }
+ export interface CommandResolveParams {
+ name?: string | null
+ profile?: string | null
+ }
+ export interface CommandResolveResult {
+ canonical: string
+ description: string
+ category: string
+ }
+ export interface CommandDispatchParams {
+ name: string
+ arg?: string | null
+ session_id?: string | null
+ profile?: string | null
+ }
+ /** One structured directive: ``exec``/``plugin`` carry ``output``; ``alias`` a ``target``; ``send``/``prefill``/``skill`` a ``message`` (UIs render ``display``, never ``message``). */
+ export interface CommandDispatchResult {
+ type: DispatchType
+ output?: string | null
+ target?: string | null
+ message?: string | null
+ notice?: string | null
+ display?: string | null
+ name?: string | null
+ status?: string | null
+ }
+ /** ``apps/shared/src/slash.ts::parseCommandDispatch`` branches on this. */
+ export type DispatchType = 'exec' | 'alias' | 'plugin' | 'send' | 'skill' | 'prefill'
+ export interface SlashExecParams {
+ session_id: string
+ command: string
+ profile?: string | null
+ }
+ /** Plain worker/plugin text in ``output`` (+ ``warning``), or — when the command was rerouted to ``command.dispatch`` — that method's directive fields with ``type`` set. */
+ export interface SlashExecResult {
+ output?: string | null
+ warning?: string | null
+ type?: DispatchType | null
+ target?: string | null
+ message?: string | null
+ notice?: string | null
+ display?: string | null
+ name?: string | null
+ status?: string | null
+ }
+ export interface InsightsGetParams {
+ days?: number | null
+ profile?: string | null
+ }
+ export interface InsightsGetResult {
+ days: number
+ sessions: number
+ messages: number
+ }
+ export interface ConfigShowParams {
+ profile?: string | null
+ }
+ export interface ConfigShowResult {
+ sections?: ConfigSection[]
+ [key: string]: unknown
+ }
+ export interface ConfigSection {
+ title: string
+ rows?: string[][]
+ }
+ export interface RollbackListParams {
+ session_id: string
+ profile?: string | null
+ }
+ export interface RollbackListResult {
+ enabled: boolean
+ checkpoints?: RollbackCheckpoint[]
+ }
+ export interface RollbackCheckpoint {
+ hash?: string
+ timestamp?: string
+ message?: string
+ }
+ export interface RollbackRestoreParams {
+ session_id: string
+ hash: string
+ file_path?: string | null
+ profile?: string | null
+ }
+ /** ``tools/checkpoint_manager.py::restore`` outcome; ``history_removed`` is added for a full (non-file) restore that also rewound the live transcript. */
+ export interface RollbackRestoreResult {
+ success: boolean
+ restored_to?: string | null
+ reason?: string | null
+ directory?: string | null
+ file?: string | null
+ restored_files?: string[] | null
+ skipped_user_edits?: string[] | null
+ skipped_oversize?: string[] | null
+ failed_deletes?: string[] | null
+ history_removed?: number | null
+ error?: string | null
+ debug?: unknown | null
+ [key: string]: unknown
+ }
+ export interface RollbackDiffParams {
+ session_id: string
+ hash: string
+ profile?: string | null
+ }
+ export interface RollbackDiffResult {
+ stat?: string
+ diff?: string
+ rendered?: string | null
+ }
+ export interface CronManageParams {
+ action?: CronAction
+ name?: string | null
+ include_disabled?: boolean | string | null
+ schedule?: string | null
+ prompt?: string | null
+ repeat?: number | string | null
+ continuity?: boolean | string | null
+ deliver?: string | null
+ profile?: string | null
+ }
+ export type CronAction = 'list' | 'add' | 'remove' | 'pause' | 'resume'
+ /** Pass-through of ``tools/cronjob_tools.py::cronjob`` JSON: ``list`` → ``jobs``/``count`` (+ ``scoped`` when profile-scoped); ``add`` → the created job's summary + ``job``; ``remove`` → ``removed_job``; ``pause``/``resume`` → ``job``. A tool-level failure lands in ``error``. */
+ export interface CronManageResult {
+ success?: boolean | null
+ error?: string | null
+ count?: number | null
+ jobs?: CronJobRow[] | null
+ scoped?: string | null
+ gateway_running?: boolean | null
+ warning?: string | null
+ job_id?: string | null
+ name?: string | null
+ skill?: string | null
+ skills?: string[] | null
+ schedule?: string | null
+ repeat?: number | string | null
+ deliver?: string | null
+ next_run_at?: string | null
+ job?: CronJobRow | null
+ message?: string | null
+ guidance?: unknown | null
+ removed_job?: CronRemovedJob | null
+ [key: string]: unknown
+ }
+ /** ``tools/cronjob_job_args.py::_format_job``. */
+ export interface CronJobRow {
+ job_id: string
+ name?: string
+ skill?: string | null
+ skills?: string[]
+ prompt_preview?: string
+ model?: string | null
+ provider?: string | null
+ base_url?: string | null
+ schedule?: string
+ repeat?: number | string | null
+ deliver?: string | null
+ next_run_at?: string | null
+ last_run_at?: string | null
+ last_status?: string | null
+ last_delivery_error?: string | null
+ last_delivery_unverified?: boolean | null
+ last_fire_error?: string | null
+ last_error?: string | null
+ enabled?: boolean
+ state?: string | null
+ paused_at?: string | null
+ paused_reason?: string | null
+ workdir?: string | null
+ script?: string | null
+ reasoning_effort?: string | null
+ monitor_script?: string | null
+ monitor_url?: string | null
+ monitor_state?: unknown | null
+ no_agent?: boolean | null
+ enabled_toolsets?: string[] | null
+ continuity?: boolean | null
+ context_from?: string[] | null
+ attach_to_session?: boolean | null
+ [key: string]: unknown
+ }
+ export interface CronRemovedJob {
+ id: string
+ name?: string
+ schedule?: string | null
+ }
+ export interface BrowserManageParams {
+ action?: BrowserAction
+ url?: string | null
+ session_id?: string | null
+ profile?: string | null
+ }
+ export type BrowserAction = 'status' | 'connect' | 'disconnect'
+ export interface BrowserManageResult {
+ connected: boolean
+ url?: string | null
+ messages?: string[] | null
+ }
+ /** Handlers that look a live session up with ``_sessions.get(params.get("session_id"))``: an absent / unknown id falls back to the launch profile's config, so it is never required. */
+ export interface _SessionScoped {
+ session_id?: string | null
+ }
+ export interface ToolsetsListResult {
+ toolsets: ToolsetRow[]
+ }
+ /** One row of ``methods_tools._toolset_rows``; ``tools`` only when the caller asked for them (``tools.list``). */
+ export interface ToolsetRow {
+ name: string
+ description: string
+ tool_count: number
+ enabled: boolean
+ tools?: string[] | null
+ }
+ export interface ToolsShowResult {
+ sections: ToolShowSection[]
+ total: number
+ }
+ export interface ToolShowSection {
+ name: string
+ tools: ToolShowRow[]
+ }
+ export interface ToolShowRow {
+ name: string
+ description: string
+ }
+ /** ``names`` are toolset keys or ``server:tool`` MCP targets; with ``session_id`` the live session's profile is authoritative and its agent is rebuilt. */
+ export interface ToolsConfigureParams {
+ action: ToolsAction
+ names: string[]
+ session_id?: string | null
+ profile?: string | null
+ }
+ export type ToolsAction = 'enable' | 'disable'
+ export interface ToolsConfigureResult {
+ changed: string[]
+ enabled_toolsets: string[]
+ info?: SessionLiveInfo | null
+ missing_servers: string[]
+ reset: boolean
+ unknown: string[]
+ }
+ export type ReloadEnvParams = Record<string, never>
+ export interface ReloadEnvResult {
+ updated: number
+ }
+ /** Without ``confirm`` the handler may answer ``confirm_required`` (per ``approvals.mcp_reload_confirm``); ``always`` persists the opt-out; ``rev`` is the config revision the caller wants loaded (coalescing). */
+ export interface ReloadMcpParams {
+ session_id?: string | null
+ confirm?: boolean
+ always?: boolean
+ rev?: string | null
+ }
+ export interface ReloadMcpResult {
+ status: ReloadMcpStatus
+ message?: string | null
+ loaded_rev?: string | null
+ coalesced?: boolean | null
+ turn_isolation?: boolean | null
+ host_ack?: unknown | null
+ }
+ export type ReloadMcpStatus = 'confirm_required' | 'reloaded'
+ /** ``query`` is the search text / hub identifier / browse page (digits); ``page`` / ``page_size`` apply to ``browse``. */
+ export interface SkillsManageParams {
+ profile?: string | null
+ action?: SkillsAction
+ query?: string | null
+ page?: number | null
+ page_size?: number | null
+ }
+ export type SkillsAction = 'list' | 'search' | 'install' | 'browse' | 'inspect'
+ /** Shape follows the action: ``list`` → ``skills`` (category → names); ``search`` → ``results``; ``install`` → ``installed`` + ``name``; ``browse`` → ``items`` + paging; ``inspect`` → ``info``. */
+ export interface SkillsManageResult {
+ skills?: Record<string, string[]> | null
+ results?: SkillHubHit[] | null
+ installed?: boolean | null
+ name?: string | null
+ items?: SkillBrowseItem[] | null
+ page?: number | null
+ total_pages?: number | null
+ total?: number | null
+ info?: SkillInspectInfo | null
+ }
+ export interface SkillHubHit {
+ name: string
+ description: string
+ }
+ /** ``hermes_cli.skills_hub.browse_skills`` row. */
+ export interface SkillBrowseItem {
+ name?: string
+ description?: string
+ source?: string
+ trust?: string | null
+ identifier?: string | null
+ [key: string]: unknown
+ }
+ /** ``hermes_cli.skills_hub.inspect_skill``; ``{}`` when the identifier resolves nowhere. */
+ export interface SkillInspectInfo {
+ name?: string | null
+ description?: string | null
+ source?: string | null
+ identifier?: string | null
+ tags?: string[] | null
+ skill_md_preview?: string | null
+ [key: string]: unknown
+ }
+ export type SkillsReloadParams = Record<string, never>
+ export interface SkillsReloadResult {
+ output: string
+ result: SkillsReloadDiff
+ }
+ /** ``agent.skill_commands.reload_skills``. */
+ export interface SkillsReloadDiff {
+ added?: SkillCommandRef[]
+ removed?: SkillCommandRef[]
+ unchanged?: string[]
+ total?: number
+ commands?: number
+ [key: string]: unknown
+ }
+ export interface SkillCommandRef {
+ name: string
+ description?: string
+ }
+ export interface LearningFramesParams {
+ cols?: number | null
+ rows?: number | null
+ frames?: number | null
+ }
+ export interface LearningFramesResult {
+ frames: LearningFrame[]
+ legend: LearningLegendItem[]
+ categories: LearningLegendItem[]
+ buckets: LearningBucketRow[]
+ summary: string[]
+ axis: LearningAxis
+ count: number
+ cols: number
+ rows: number
+ }
+ /** ``agent.learning_graph_render.render_graph`` projection; ``grid`` rows are lists of ``[text, styleKey, alpha?, hexOverride?]`` runs. */
+ export interface LearningFrame {
+ reveal: number
+ date: string
+ visible: number
+ grid: unknown[][]
+ labels?: Record<string, unknown>[]
+ }
+ export interface LearningLegendItem {
+ glyph: string
+ label: string
+ style?: string | null
+ color?: string | null
+ }
+ export interface LearningBucketRow {
+ index: number
+ label: string
+ date: string
+ skills: number
+ memories: number
+ total: number
+ category?: string | null
+ color?: string | null
+ nodes: LearningNodeRow[]
+ }
+ export interface LearningNodeRow {
+ id: string
+ glyph: string
+ label: string
+ fullLabel: string
+ meta: string
+ body: string
+ style: string
+ }
+ export interface LearningAxis {
+ start: string
+ end: string
+ }
+ export interface LearningNodeParams {
+ id?: string | null
+ }
+ export interface LearningDetailResult {
+ ok: boolean
+ message?: string | null
+ kind?: string | null
+ id?: string | null
+ label?: string | null
+ content?: string | null
+ }
+ /** ``agent.learning_mutations`` — ``ok: false`` carries the reason in ``message``. */
+ export interface LearningMutationResult {
+ ok: boolean
+ message?: string | null
+ }
+ export interface LearningEditParams {
+ id?: string | null
+ content?: string | null
+ }
+ export interface McpCatalogResult {
+ servers: McpCatalogEntry[]
+ }
+ export interface McpCatalogEntry {
+ name: string
+ description: string
+ installed: boolean
+ enabled: boolean
+ requires: string[]
+ transport: string
+ }
+ export interface McpServersListResult {
+ servers: McpServerSummary[]
+ }
+ /** ``tui_gateway/mcp_rpc_helpers.summarize_server`` — a server's config without secret values. */
+ export interface McpServerSummary {
+ name: string
+ transport: string
+ url?: string | null
+ command?: string | null
+ args: string[]
+ env: string[]
+ auth?: string | null
+ oauth_tokens_present?: boolean | null
+ enabled: boolean
+ tools?: unknown | null
+ }
+ export interface McpServersStatusResult {
+ servers: McpServerRuntimeRow[]
+ checked_at: number
+ }
+ /** Safe projection of ``tools.mcp_tool_discovery.get_mcp_status`` rows. */
+ export interface McpServerRuntimeRow {
+ name: string
+ transport: string
+ tools: number
+ connected: boolean
+ disabled: boolean
+ status: McpRuntimeStatus
+ }
+ export type McpRuntimeStatus = 'connected' | 'disabled' | 'connecting' | 'failed' | 'configured'
+ /** ``preset`` (catalog id) and/or ``config`` (url/command/args/env/headers/auth/tools); a ``bearer_token`` is written to the profile's .env, only the header template persists. */
+ export interface McpServersAddParams {
+ profile?: string | null
+ name: string
+ preset?: string | null
+ config?: Record<string, unknown> | null
+ bearer_token?: string | null
+ }
+ export interface McpServersAddResult {
+ ok: boolean
+ name: string
+ server: McpServerSummary
+ }
+ export interface McpServersSetApiKeyParams {
+ profile?: string | null
+ name: string
+ value: string
+ env_var?: string | null
+ }
+ export interface McpServersSetApiKeyResult {
+ ok: boolean
+ name: string
+ env_var: string
+ server: McpServerSummary
+ }
+ export interface McpServerNameParams {
+ profile?: string | null
+ name: string
+ }
+ /** ``ok: false`` carries ``error``; ``prompts`` / ``resources`` are only counted on success. */
+ export interface McpServersTestResult {
+ ok: boolean
+ tools: McpProbeTool[]
+ error?: string | null
+ prompts?: number | null
+ resources?: number | null
+ oauth_needed: boolean
+ oauth_tokens_present?: boolean | null
+ }
+ export interface McpProbeTool {
+ name: string
+ description: string
+ }
+ export interface McpServersRemoveResult {
+ ok: boolean
+ removed: boolean
+ }
+ /** With ``client_redirect_uri`` the CLIENT hosts the loopback and relays the code via ``mcp.servers.oauth.callback``. */
+ export interface McpOauthStartParams {
+ profile?: string | null
+ name: string
+ client_redirect_uri?: string | null
+ }
+ export interface McpOauthStartResult {
+ ok: boolean
+ session_id: string
+ auth_url: string
+ flow: string
+ }
+ /** ``session_id`` is the OAuth flow id returned by ``oauth.start`` (not a gateway session). */
+ export interface McpOauthFlowParams {
+ profile?: string | null
+ name: string
+ session_id: string
+ }
+ export interface McpOauthPollResult {
+ ok: boolean
+ status: McpOauthPollStatus
+ session_id?: string | null
+ error_message?: string | null
+ auth_url?: string | null
+ tools?: McpProbeTool[] | null
+ }
+ export type McpOauthPollStatus = 'pending' | 'approved' | 'error'
+ export interface McpOauthCancelResult {
+ ok: boolean
+ status?: string | null
+ error_message?: string | null
+ }
+ export interface McpOauthCallbackParams {
+ profile?: string | null
+ name: string
+ session_id: string
+ code?: string | null
+ state?: string | null
+ error?: string | null
+ }
+ export interface McpOauthCallbackResult {
+ ok: boolean
+ session_id?: string | null
+ error_message?: string | null
+ }
+ export type PluginsListParams = Record<string, never>
+ export interface PluginsListResult {
+ plugins: LegacyPluginRow[]
+ }
+ export interface LegacyPluginRow {
+ name: string
+ version: string
+ enabled: boolean
+ }
+ /** ``toggle``: ``key``/``name`` + ``enable``; ``install``: ``identifier``/``repo`` or ``catalog_name`` (+ ``force``, ``enable``, ``ref``); ``update``: ``name``. */
+ export interface PluginsManageParams {
+ profile?: string | null
+ action?: PluginsAction
+ key?: string | null
+ name?: string | null
+ enable?: boolean | null
+ identifier?: string | null
+ repo?: string | null
+ catalog_name?: string | null
+ force?: boolean | null
+ ref?: string | null
+ }
+ export type PluginsAction = 'list' | 'toggle' | 'install' | 'update'
+ /** ``list`` → ``plugins`` + counts; ``toggle`` → ``ok``/``unchanged``/``name``/``plugin``; ``install`` → ``hermes_cli.plugins_cmd.dashboard_install_plugin``'s ok payload; ``update`` → ``ok``/``unchanged``/``sha``. */
+ export interface PluginsManageResult {
+ plugins?: AgentPluginRow[] | null
+ user_count?: number | null
+ bundled_count?: number | null
+ ok?: boolean | null
+ unchanged?: boolean | null
+ name?: string | null
+ plugin?: AgentPluginRow | null
+ plugin_name?: string | null
+ warnings?: string[] | null
+ missing_env?: string[] | null
+ after_install_path?: string | null
+ enabled?: boolean | null
+ sha?: string | null
+ }
+ /** ``methods_tools._plugin_rows`` + ``plugins_cmd_catalog.catalog_row_fields`` provenance. */
+ export interface AgentPluginRow {
+ name: string
+ key: string
+ version: string
+ description: string
+ source: string
+ status: string
+ portable: boolean
+ install_dir: string
+ has_desktop_half: boolean
+ catalog_name?: string | null
+ catalog_tier?: string | null
+ installed_sha?: string | null
+ catalog_sha?: string | null
+ update_available?: boolean | null
+ pinned_sha?: string | null
+ }
+ /** Single question: ``question`` / ``choices`` (/ ``multi_select``); batch: ``questions``. ``answers`` rides only on a reconnect replay (locks the server already accepted). */
+ export interface ClarifyRequestParams {
+ session_id: string
+ question?: string | null
+ choices?: string[] | null
+ multi_select?: boolean | null
+ questions?: ClarifyQuestion[] | null
+ answers?: Record<string, string> | null
+ }
+ export interface ClarifyQuestion {
+ qid: string
+ question: string
+ choices?: string[] | null
+ multi_select?: boolean
+ }
+ /** Single: ``{answer}`` ('' = skip). Batch: ``{answers}`` for the whole set (early locks go through the ``clarify.lock`` RPC); a response with neither is cancel-all. */
+ export interface ClarifyResult {
+ answer?: string | null
+ answers?: Record<string, string> | null
+ }
+ /** ``tui_gateway/server.py::_approval_request_payload`` — the command is redacted server-side. */
+ export interface ApprovalRequestParams {
+ session_id: string
+ request_id: string
+ command?: string
+ description?: string
+ choices?: ApprovalChoice[]
+ allow_permanent?: boolean | null
+ allow_session?: boolean | null
+ smart_denied?: boolean | null
+ tool_name?: string | null
+ gateway_session_id?: string | null
+ [key: string]: unknown
+ }
+ export interface ApprovalResult {
+ choice: ApprovalChoice
+ all?: boolean | null
+ }
+ export interface EmptyRequestParams {
+ session_id: string
+ }
+ /** The answer to any one-string prompt (sudo, secret, vault prompts, desktop bridges): ``''`` means skipped / declined. */
+ export interface ValueResult {
+ value: string
+ }
+ export interface SecretRequestParams {
+ session_id: string
+ env_var: string
+ prompt: string
+ metadata?: Record<string, unknown> | null
+ }
+ export interface VaultUnlockRequestParams {
+ session_id: string
+ backend: string
+ display_name: string
+ }
+ export interface VaultSaveLoginRequestParams {
+ session_id: string
+ origin: string
+ site: string
+ }
+ export interface VaultCodeRequestParams {
+ session_id: string
+ site?: string | null
+ hint?: string | null
+ }
+ export interface ReadRangeRequestParams {
+ session_id: string
+ start?: number | null
+ count?: number | null
+ }
+ /** ``tools/drive_preview_tool.py`` and ``tools/annotate_preview_tool.py`` field sets. */
+ export interface PreviewActRequestParams {
+ session_id: string
+ action: string
+ ref?: string | null
+ selector?: string | null
+ text?: string | null
+ key?: string | null
+ submit?: boolean | null
+ full?: boolean | null
+ to?: string | null
+ amount?: number | null
+ max?: number | null
+ }
+ /** ``tools/tour_tool.py`` field set. */
+ export interface TourRequestParams {
+ session_id: string
+ action: string
+ surface?: string | null
+ selector?: string | null
+ title?: string | null
+ text?: string | null
+ side?: string | null
+ steps?: TourStep[] | null
+ step_index?: number | null
+ }
+ export interface TourStep {
+ selector?: string | null
+ title?: string | null
+ text?: string | null
+ side?: string | null
+ [key: string]: unknown
+ }
++export interface DisplayInstallSudoParams {
++ session_id: string
++ profile_key: string
++}
+ /** ``methods_connectors._connection_update``: one target transition (``target``/``from``/``to``/ ``actor``) or the settlement (none of those), with the full snapshot. */
+ export interface ConnectionUpdatePayload {
+ op_id: string
+ deadline_at: number
+ settled: boolean
+ settled_at?: number | null
+ settled_by?: ConnectionSettleReason | null
+ targets: ConnectionOperationTarget[]
+ target?: string | null
+ from?: ConnectionTargetState | null
+ to?: ConnectionTargetState | null
+ actor?: ConnectionActor | null
+ detail?: string | null
+ }
+ /** ``tools/connectors/contract.py::Actor``. */
+ export type ConnectionActor = 'user' | 'renderer_flow' | 'backend_watcher' | 'clock'
++export interface RequestCancelPayload {
++ id: string
++ method: string
++ reason: string
++}
++export interface DisplayStatusPayload {
++ profile: string
++ supported: boolean
++ installed: boolean
++ missing: string[]
++ running: boolean
++ pid?: number | null
++ display?: string | null
++ socket?: string | null
++ geometry: string
++ install_command?: string | null
++ browser?: string | null
++ lease: DisplayLease
++ profile_key: string
++}
++export interface DisplayLeasePayload {
++ profile_key: string
++ lease: DisplayLease
++}
++export interface DisplayInstallLogPayload {
++ profile_key: string
++ line: string
++}
++export interface DisplayInstallDonePayload {
++ profile_key: string
++ code: number
++ status: DisplayStatus
++}
+ /** ``tui_gateway/entry.py`` (stdio) / ``tui_gateway/ws.py`` (WebSocket) first frame. */
+ export interface GatewayReadyPayload {
+ skin: SkinPayload
+ change_events: boolean
+ replay_epoch: string
+ heartbeat?: boolean | null
+ }
+ /** ``tui_gateway/change_watcher.py::resolve_skin`` — the resolved active skin (``HermesSkin``). ``{}`` when the skin engine failed to load. Colour maps are token → colour string. */
+ export interface SkinPayload {
+ name?: string
+ description?: string
+ colors?: Record<string, string>
+ light_colors?: Record<string, string>
+ dark_colors?: Record<string, string>
+ branding?: Record<string, string>
+ banner_logo?: string
+ banner_hero?: string
+ tool_prefix?: string
+ help_header?: string
+ [key: string]: unknown
+ }
+ /** ``hermes_cli/free_tier_bootstrap.py::SetupRecord.as_payload``. */
+ export interface SetupReadyPayload {
+ provider_configured: boolean
+ inference_provider: string
+ free_tier: boolean
+ has_identity: boolean
+ other_providers: boolean
+ error?: string
+ finished_at: number
+ [key: string]: unknown
+ }
+ /** Every ``_emit("error", …)`` site sets exactly ``message``. */
+ export interface ErrorPayload {
+ message: string
+ }
+ /** ``tui_gateway/model_switch.py`` capability-refresh notice. */
+ export interface NoticePayload {
+ message: string
+ }
+ /** ``prompt_turn._invoke_agent._stream`` (message.delta: ``text`` + optional ``rendered``), ``agent_callbacks._agent_cbs`` (reasoning.delta / thinking.delta), ``tool_progress._progress_reasoning`` (reasoning.available). ``verbose`` rides only when the session's verbose reasoning mode is on. */
+ export interface StreamDeltaPayload {
+ text: string
+ rendered?: string | null
+ verbose?: boolean | null
+ }
+ /** ``prompt_turn._interim_assistant_cb`` / ``agent_callbacks`` interim_assistant_callback. */
+ export interface MessageInterimPayload {
+ text: string
+ already_streamed: boolean
+ }
+ /** ``prompt_turn._complete_turn_payload`` / ``session_auto_continue._emit_terminal_turn_error`` / ``agent_callbacks._mirror_subagent_to_child`` (child watch mirror: ``text`` only) / ``compute_host_bridge`` (``text`` + ``status``). */
+ export interface MessageCompletePayload {
+ text?: string | unknown
+ usage?: Usage | null
+ status?: TurnStatus | null
+ reasoning?: string | null
+ warning?: string | null
+ response_previewed?: boolean | null
+ billing?: BillingBlock | null
+ failure_reason?: string | null
+ rendered?: string | null
+ error?: string | null
+ recoverable?: boolean | null
+ error_surface?: ErrorSurface | null
+ partial?: boolean | null
+ }
+ /** ``prompt_turn._result_status``. */
+ export type TurnStatus = 'complete' | 'error' | 'interrupted'
+ /** ``agent/billing_links.py::BillingBlock.to_dict`` (+ ``unverified`` from conversation_loop). */
+ export interface BillingBlock {
+ provider: string
+ provider_label: string
+ model: string
+ billing_url: string | null
+ is_nous: boolean
+ message: string
+ unverified?: boolean | null
+ }
+ /** ``agent/error_surface.py::_surface`` — advisory {layer, code, retryable} (+ identity, + auth hint). */
+ export interface ErrorSurface {
+ layer: string
+ code: string
+ retryable: boolean
+ provider?: string | null
+ model?: string | null
+ [key: string]: unknown
+ }
+ /** ``server._status_update`` and the direct emitters (goal / loop / heartbeat / process). */
+ export interface StatusUpdatePayload {
+ kind: string
+ text: string
+ }
+ /** ``server._start_usage_ticker``. */
+ export interface SessionUsagePayload {
+ usage: Usage
+ }
+ /** ``prompt_turn._invoke_agent`` ``_on_session_title`` hook. */
+ export interface SessionTitlePayload {
+ session_id: string
+ title: string
+ }
+ /** ``agent_callbacks`` reaction_callback. */
+ export interface ReactionPayload {
+ kind: string
+ }
+ /** ``server`` background_review_callback. */
+ export interface ReviewSummaryPayload {
+ text: string
+ }
+ /** ``tool_progress._on_tool_start`` (+ ``agent_callbacks._mirror_subagent_to_child`` rows with ``preview`` and empty ``args``). ``todos``/``revision`` are NOT set by the emitter; kept optional because tool.start rows may pass through connector redaction unchanged. */
+ export interface ToolStartPayload {
+ tool_id: string
+ name: string
+ context?: string | null
+ args?: Record<string, unknown> | null
+ args_text?: string | null
+ preview?: string | null
+ }
+ /** ``tool_progress._on_tool_complete``; ``todos``/``revision`` merged in for the todo tools. */
+ export interface ToolCompletePayload {
+ tool_id: string
+ name: string
+ args?: Record<string, unknown> | null
+ duration_s?: number | null
+ result?: unknown
+ summary?: string | null
+ result_text?: string | null
+ inline_diff?: string | null
+ todos?: unknown[] | null
+ revision?: number | null
+ }
+ /** ``agent_callbacks`` tool_gen_callback. */
+ export interface ToolGeneratingPayload {
+ name: string
+ }
+ /** ``tool_progress._progress_output_risk``. */
+ export interface ToolOutputRiskPayload {
+ tool_id: string
+ name: string
+ risk: string
+ findings: string[]
+ redacted: boolean
+ }
+ /** ``tool_progress._normalize_todo_state`` — full task snapshot. */
+ export interface TodoUpdatedPayload {
+ todos: unknown[]
+ revision: number
+ }
+ /** ``agent/credits_tracker.py::AgentNotice`` via notice_callback, and ``server._await_agent_ready``'s slow-build notice. ``level``: info | warn | error | success; ``kind``: sticky | ttl | agent. */
+ export interface NotificationShowPayload {
+ text: string
+ level: string
+ kind: string
+ ttl_ms?: number | null
+ key?: string | null
+ id?: string | null
+ }
+ export interface NotificationClearPayload {
+ key: string
+ }
+ /** ``tools/tip_tool.py``. */
+ export interface TipShowPayload {
+ selector: string
+ text: string
+ title?: string | null
+ side?: string | null
+ }
+ /** ``server._hydrate_resume_history``. */
+ export interface SessionResumeProgressPayload {
+ phase: string
+ status: ResumePhaseStatus
+ message_count?: number | null
+ message?: string | null
+ }
+ export type ResumePhaseStatus = 'loading' | 'complete' | 'failed'
+ /** ``session_lifecycle._announce_session_reclaimed`` (broadcast). */
+ export interface SessionReclaimedPayload {
+ session_id: string
+ stored_session_id: string
+ reason: string
+ }
+ export interface SessionControlUpdatePayload {
+ control: SessionControlSnapshot
+ }
+ /** ``methods_session`` billing.step_up on_verification. */
+ export interface BillingStepUpVerificationPayload {
+ verification_url: string
+ user_code: string
+ }
+ /** ``methods_prompt._spawn_side_agent``: ``{task_id, **extra, text}``; btw adds ``question``. */
+ export interface SideAgentCompletePayload {
+ task_id: string
+ text: string
+ question?: string | null
+ }
+ /** ``methods_prompt`` restart body + ``agent_callbacks._preview_restart_callbacks``. */
+ export interface PreviewRestartProgressPayload {
+ task_id: string
+ text: string
+ level?: string | null
+ }
+ /** ``tool_progress._progress_subagent`` — every ``subagent.*`` frame; identity fields are optional because older emitters omit them and the TUI spawn tree falls back to flat rendering. */
+ export interface SubagentEventPayload {
+ goal: string
+ task_count: number
+ task_index: number
+ subagent_id?: string | null
+ parent_id?: string | null
+ child_session_id?: string | null
+ delegation_id?: string | null
+ depth?: number | null
+ model?: string | null
+ tool_count?: number | null
+ toolsets?: string[] | null
+ input_tokens?: number | null
+ output_tokens?: number | null
+ reasoning_tokens?: number | null
+ api_calls?: number | null
+ files_read?: string[] | null
+ files_written?: string[] | null
+ output_tail?: SubagentOutputTailEntry[] | null
+ tool_name?: string | null
+ text?: string | null
+ status?: SubagentStatus | null
+ summary?: string | null
+ duration_seconds?: number | null
+ tool_preview?: string | null
+ }
+ /** ``tools/delegate_tool_results.py::_extract_output_tail`` row. */
+ export interface SubagentOutputTailEntry {
+ tool: string
+ preview: string
+ is_error: boolean
+ }
+ /** ``tool_progress._progress_moa_reference``. */
+ export interface MoaReferencePayload {
+ label: string
+ text: string
+ index?: number | null
+ count?: number | null
+ }
+ export interface MoaAggregatingPayload {
+ aggregator: string
+ }
+ export interface MoaProgressPayload {
+ label: string
+ refs_done: number
+ refs_total: number
+ }
+ export interface MoaPhasePayload {
+ phase: string
+ refs_done?: number | null
+ refs_total?: number | null
+ aggregator?: string | null
+ }
+ /** ``tools/open_preview_tool.py``. */
+ export interface PreviewOpenPayload {
+ url: string
+ label?: string
+ }
+ /** ``tools/preview_tool.py`` / ``tools/close_preview_tool.py``; ``url`` '' closes every tab. */
+ export interface PreviewClosePayload {
+ url?: string
+ }
+ /** ``tools/apply_layout_tool.py``. */
+ export interface LayoutApplyPayload {
+ preset: string
+ [key: string]: unknown
+ }
+ /** ``tools/focus_pane_tool.py``. */
+ export interface PaneRevealPayload {
+ pane: string
+ [key: string]: unknown
+ }
+ /** ``tools/react_to_message_tool.py``. */
+ export interface MessageReactionPayload {
+ row_id: number
+ reactions: MessageReaction[]
+ role: string
+ }
+ /** ``session_notifications`` process_registry.on_output. */
+ export interface TerminalOutputPayload {
+ process_id: string
+ chunk: string
+ }
+ export interface TerminalClosePayload {
+ process_id: string
+ }
+ /** ``methods_browser`` announce(); ``level``: info | warn | error. */
+ export interface BrowserProgressPayload {
+ message: string
+ level: string
+ }
+ /** ``gateway/browser_control_broker.py`` FRAME_COMMAND params. */
+ export interface BrowserControllerCommandPayload {
+ command_id: string
+ action: string
+ arguments: Record<string, unknown>
+ controller_id?: string | null
+ browser_profile_id?: string | null
+ tool_call_id?: string | null
+ }
+ /** ``gateway/browser_control_broker.py::_cancel_frame``. */
+ export interface BrowserControllerCancelPayload {
+ command_id: string
+ tool_call_id?: string | null
+ }
+ /** ``methods_voice._vr_on_status``; states come from the recorder (idle / listening / transcribing …). */
+ export interface VoiceStatusPayload {
+ state: string
+ }
+ /** ``methods_voice._vr_transcript`` / ``_deliver_fd_transcript`` / typed stop phrase in methods_prompt. */
+ export interface VoiceTranscriptPayload {
+ text?: string | null
+ stop_phrase?: boolean | null
+ typed?: boolean | null
+ no_speech_limit?: boolean | null
+ }
+ /** ``methods_voice`` wake detector ``_on_detect``. */
+ export interface WakeDetectedPayload {
+ phrase: string
+ profile?: string | null
+ start_new_session: boolean
+ }
+ /** ``change_watcher._pet_changed_payload`` — ``pet.info.meta``-shaped; ``{enabled: false}`` when off. */
+ export interface PetChangedPayload {
+ enabled: boolean
+ slug?: string | null
+ displayName?: string | null
+ scale?: number | null
+ spritesheetRevision?: string | null
+ [key: string]: unknown
+ }
+ /** ``methods_session`` pet.generate: token-only init frame, then one per draft. */
+ export interface PetGenerateProgressPayload {
+ token: string
+ count: number
+ index?: number | null
+ dataUri?: string | null
+ [key: string]: unknown
+ }
+ /** ``methods_session`` pet.hatch ``_on_progress``: ``{event, detail}`` or the parsed row form. */
+ export interface PetHatchProgressPayload {
+ event: string
+ detail?: string | null
+ state?: string | null
+ done?: string | null
+ total?: string | null
+ [key: string]: unknown
+ }
+ /** ``change_watcher._CHANGE_WATCHES`` payload fn — ``{}`` for every watch except pet.changed. */
+ export type ChangeSignalPayload = Record<string, unknown>
-export interface RequestCancelPayload {
- id: string
- method: string
- reason: string
-}
+
+ // ── Client→server methods ──
+ export interface RpcMethods {
+ /** Registry-wide background process summary for ``/agents``. */
+ 'agents.list': { params: AgentsListParams; result: AgentsListResult }
+ /** Replay the approvals still waiting on this session (reconnect / polling). */
+ 'approval.pending': { params: ApprovalPendingParams; result: ApprovalPendingResult }
+ /** Tell the backend the card is on screen, so its timeout clock starts. */
+ 'approval.received': { params: ApprovalReceivedParams; result: ApprovalReceivedResult }
+ /** Deliver the user's decision on a dangerous command (falls back to durable identity on a stale sid). */
+ 'approval.respond': { params: ApprovalRespondParams; result: ApprovalRespondResult }
+ /** Enable/disable auto top-up with its threshold and reload amount (billing:manage). */
+ 'billing.auto_reload': { params: BillingAutoReloadParams; result: BillingMutationResult }
+ /** Start a one-off top-up charge (billing:manage, idempotent). */
+ 'billing.charge': { params: BillingChargeParams; result: BillingChargeResult }
+ /** Poll one charge by id. */
+ 'billing.charge_status': { params: BillingChargeStatusParams; result: BillingChargeStatusResult }
+ /** Read-only billing view (no scope); the Nous free tier is answered locally without a portal call. */
+ 'billing.state': { params: ProfileParams; result: BillingStateResult }
+ /** Run the billing:manage device flow; the URL/code arrive via billing.step_up.verification. */
+ 'billing.step_up': { params: BillingStepUpParams; result: BillingStepUpResult }
+ /** Deliver a relayed DM into a Bot Chat on this gateway and return the one-turn reply (blocking). */
+ 'bot_relay.deliver': { params: BotRelayDeliverParams; result: BotRelayDeliverResult }
+ /** Atomically claim every pending cross-connection envelope queued on this gateway. */
+ 'bot_relay.outbox.drain': { params: BotRelayOutboxDrainParams; result: BotRelayOutboxDrainResult }
+ /** Write a relayed reply and/or typed error for an envelope so the sender-side waiter resolves. */
+ 'bot_relay.reply': { params: BotRelayReplyParams; result: OkResult }
+ /** Replace this gateway's view of agents on other connections; answers the accepted row count. */
+ 'bot_relay.roster.sync': { params: BotRelayRosterSyncParams; result: BotRelayRosterSyncResult }
+ /** Hard-detach only the controller owned by this authenticated transport. */
+ 'browser.controller.detach': { params: BrowserControllerParams; result: BrowserControllerDetachResult }
+ /** Acknowledge a heartbeat only for this transport's own attached controller. */
+ 'browser.controller.heartbeat': { params: BrowserControllerParams; result: OkResult }
+ /** Attach this connection as the browser controller for one session; fails closed (4403). */
+ 'browser.controller.register': { params: BrowserControllerRegisterParams; result: BrowserControllerRegisterResult }
+ /** Deliver one command result to the broker; accepted is false for unknown or settled command ids. */
+ 'browser.controller.result': { params: BrowserControllerResultParams; result: BrowserControllerResultResult }
+ /** Inspect, attach to, or drop the CDP browser the tools use; ``messages`` narrate a connect. */
+ 'browser.manage': { params: BrowserManageParams; result: BrowserManageResult }
+ /** Lock one answer of a batch clarify request (editable until every question is locked). */
+ 'clarify.lock': { params: ClarifyLockParams; result: ClarifyLockResult }
+ /** Run ``hermes <argv>`` non-interactively and capture its output; ``blocked`` explains a refusal. */
+ 'cli.exec': { params: CliExecParams; result: CliExecResult }
+ /** Save the host clipboard image into the session and queue it for the next turn. */
+ 'clipboard.paste': { params: ClipboardPasteParams; result: AttachedImageResult }
+ /** Run a quick/plugin/bundle/skill/built-in slash command and answer a structured directive. */
+ 'command.dispatch': { params: CommandDispatchParams; result: CommandDispatchResult }
+ /** Canonical registry command for a name or alias. */
+ 'command.resolve': { params: CommandResolveParams; result: CommandResolveResult }
+ /** Categorized slash metadata (registry, quick, plugin, skill) for completion menus. */
+ 'commands.catalog': { params: CommandsCatalogParams; result: CommandsCatalogResult }
+ /** Path / @-reference completions for the composer (files, folders, profiles, plugin providers). */
+ 'complete.path': { params: CompletePathParams; result: CompletionItemsResult }
+ /** Ranked slash-command / skill completions for a ``/`` token. */
+ 'complete.slash': { params: CompleteSlashParams; result: CompleteSlashResult }
+ /** Read one normalised config value (or the whole effective config) the way the UIs render it. */
+ 'config.get': { params: ConfigGetParams; result: ConfigGetResult }
+ /** Change one config key (persisted or session-scoped) and read back the normalised value. */
+ 'config.set': { params: ConfigSetParams; result: ConfigSetResult }
+ /** Masked, display-ready config summary (model / agent / environment rows). */
+ 'config.show': { params: ConfigShowParams; result: ConfigShowResult }
+ /** Per-target outcomes from the card, and an optional Continue. */
+ 'connection.respond': { params: ConnectionRespondParams; result: ConnectionRespondResult }
+ /** Start (or re-initiate) authorization for named connectors on the session's connection operation. */
+ 'connectors.connect': { params: ConnectorsConnectParams; result: ConnectorsConnectResult }
+ /** Connector catalog + connection state for one owned session (``available=False`` when the toolset is off). */
+ 'connectors.list': { params: ConnectorsListParams; result: ConnectorsListResult }
+ /** The current snapshot of one open operation on an owned session. */
+ 'connectors.operation.status': { params: ConnectionOperationParams; result: ConnectionOperationStatus }
+ /** List/add/remove/pause/resume cron jobs in the (optionally profile-scoped) cron store. */
+ 'cron.manage': { params: CronManageParams; result: CronManageResult }
+ /** Block/unblock NEW spawns globally (active children keep running); returns the new state. */
+ 'delegation.pause': { params: DelegationPauseParams; result: DelegationPauseResult }
+ /** Running subagent tree plus the spawn pause flag and limits. */
+ 'delegation.status': { params: ProfileParams; result: DelegationStatusResult }
+ /** Upload a force-redacted debug bundle to Nous-internal diagnostics storage. */
+ 'diagnostics.share_nous': { params: DiagnosticsShareNousParams; result: DiagnosticsShareNousResult }
++ /** Run the distro package install on the gateway host; progress streams as display.install.log/.done. */
++ 'display.install': { params: ProfileParams; result: DisplayInstallResult }
++ /** Take over: the human named by a viewer id this connection minted controls the screen. */
++ 'display.lease.acquire': { params: DisplayLeaseAcquireParams; result: DisplayLeaseResult }
++ /** Hand back. Without a viewer id the release is refused while a human holds unless force. */
++ 'display.lease.release': { params: DisplayLeaseReleaseParams; result: DisplayLeaseResult }
++ /** Mint a single-use ticket for /api/display/ws and the server-minted viewer id for this connection. */
++ 'display.observe': { params: DisplayObserveParams; result: DisplayObserveResult }
++ /** Start this profile's Xvnc + Xfce (idempotent); blocks until the display is published. */
++ 'display.start': { params: ProfileParams; result: DisplayStatus }
++ /** Runtime + lease snapshot for this profile's screen. */
++ 'display.status': { params: ProfileParams; result: DisplayStatus }
++ /** Stop the screen. Refused (5300, code viewer_mismatch) while a human holds unless force. */
++ 'display.stop': { params: DisplayStopParams; result: DisplayStopResult }
++ /** One JPEG grab of the bot's screen; read-only, never changes the lease. */
++ 'display.thumbnail': { params: ProfileParams; result: DisplayThumbnailResult }
+ /** Stage a non-image file into the session workspace and hand back its @file: ref. */
+ 'file.attach': { params: FileAttachParams; result: FileAttachResult }
+ /** Mark the one-time availability notice as shown on the free-tier identity. */
+ 'free_tier.ack_notice': { params: ProfileParams; result: FreeTierAckNoticeResult }
+ /** Explicit retry of the free-tier identity mint when the boot bootstrap could not create it. */
+ 'free_tier.provision': { params: ProfileParams; result: FreeTierProvisionResult }
+ /** Pure read of the focused profile's free-tier identity state (no network, no side effects). */
+ 'free_tier.status': { params: ProfileParams; result: FreeTierStatusResult }
+ /** What THIS build enforces (a client withholds a feature unless advertised). */
+ 'gateway.capabilities': { params: PingParams; result: GatewayCapabilitiesResult }
+ /** Resolve one exact pending approval raised by a local or peer room member. */
+ 'groups.approve': { params: GroupsApproveParams; result: GroupsApproveResult }
+ /** Describe the hosted-room protocol implemented by this gateway. */
+ 'groups.capabilities': { params: GroupsCapabilitiesParams; result: GroupsCapabilitiesResult }
+ /** Create a hosted room idempotently; authority is this gateway's stable install identity. */
+ 'groups.create': { params: GroupsCreateParams; result: GroupsCreateResult }
+ /** Fence this gateway's stale room authority against a proven newer epoch. */
+ 'groups.demote': { params: GroupsDemoteParams; result: GroupsDemoteResult }
+ /** Permanently tombstone a hosted room id after stopping its work and revoking peer routes. */
+ 'groups.disband': { params: GroupsDisbandParams; result: GroupsDisbandResult }
+ /** List rooms hosted by this gateway, most recently changed first. */
+ 'groups.list': { params: GroupsListParams; result: GroupsListResult }
+ /** A monotonic room-log delta after since_seq, bounded by count and page bytes. */
+ 'groups.log': { params: GroupsLogParams; result: GroupsLogResult }
+ /** Mint one target-issued room/profile grant for a prospective room home. */
+ 'groups.peer.invite': { params: GroupsPeerInviteParams; result: GroupsPeerInviteResult }
+ /** Register and probe one scoped peer route on the room home. */
+ 'groups.peer.register': { params: GroupsPeerRegisterParams; result: GroupsPeerRegisterResult }
+ /** Revoke one target-issued grant using its exact profile scope. */
+ 'groups.peer.revoke': { params: GroupsPeerRevokeParams; result: GroupsPeerRevokeResult }
+ /** Continue a replicated room on this gateway at epoch + 1; requires confirm=true. */
+ 'groups.promote': { params: GroupsPromoteParams; result: GroupsPromoteResult }
+ /** Rename one hosted room atomically with its replay event. */
+ 'groups.rename': { params: GroupsRenameParams; result: GroupsRenameResult }
+ /** The local replica's coverage and authority lineage for one room. */
+ 'groups.replica_state': { params: GroupsReplicaStateParams; result: GroupsReplicaStateResult }
+ /** Persist one authority-stamped replay page into the local replica store; idempotent. */
+ 'groups.replicate': { params: GroupsReplicateParams; result: GroupsReplicateResult }
+ /** Retry one indeterminate room task after explicit user confirmation. */
+ 'groups.retry': { params: GroupsRetryParams; result: GroupsRetryResult }
+ /** Append one inert message.user event idempotently; the actor is server-owned. */
+ 'groups.send': { params: GroupsSendParams; result: GroupsSendResult }
+ /** One hosted room's replay cursor and fenced authority state, plus live driver status. */
+ 'groups.state': { params: GroupsStateParams; result: GroupsStateResult }
+ /** Durably cancel queued or running work for one hosted room. */
+ 'groups.stop': { params: GroupsStopParams; result: GroupsStopResult }
+ /** Fail a not-yet-claimed handoff (client poll timeout); CAS against the watcher. */
+ 'handoff.fail': { params: HandoffFailParams; result: HandoffFailResult }
+ /** Queue a handoff to a messaging platform's home channel; the gateway watcher claims it. */
+ 'handoff.request': { params: HandoffRequestParams; result: HandoffRequestResult }
+ /** Poll the handoff row for this session. */
+ 'handoff.state': { params: SessionParams; result: HandoffStateResult }
+ /** Queue a gateway-visible image file for the next turn. */
+ 'image.attach': { params: ImageAttachParams; result: AttachedImageResult }
+ /** Queue an image uploaded as base64 (remote client); reply mirrors image.attach. */
+ 'image.attach_bytes': { params: ImageAttachBytesParams; result: AttachedImageResult }
+ /** Drop a queued image before the turn is sent. */
+ 'image.detach': { params: ImageDetachParams; result: ImageDetachResult }
+ /** Generate an image through the tool's provider dispatcher and hand the renderer a data URL. */
+ 'image.generate': { params: ImageGenerateParams; result: ImageGenerateResult }
+ /** Recognise a terminal file drop pasted into the composer and turn it into an attachment. */
+ 'input.detect_drop': { params: InputDetectDropParams; result: InputDetectDropResult }
+ /** Session/message counts over the last ``days`` for the (optionally scoped) profile store. */
+ 'insights.get': { params: InsightsGetParams; result: InsightsGetResult }
+ /** Archive a skill (restorable via curator) or remove a memory chunk. */
+ 'learning.delete': { params: LearningNodeParams; result: LearningMutationResult }
+ /** Node content (SKILL.md or memory chunk) for an edit prefill. */
+ 'learning.detail': { params: LearningNodeParams; result: LearningDetailResult }
+ /** Rewrite a node's content (SKILL.md or memory chunk). */
+ 'learning.edit': { params: LearningEditParams; result: LearningMutationResult }
+ /** Pre-render the /journey timeline (frames + legend/summary) so the TUI walks it locally. */
+ 'learning.frames': { params: LearningFramesParams; result: LearningFramesResult }
+ /** Stateless one-shot LLM completion (titles, ideas) on the session's or the task backend. */
+ 'llm.oneshot': { params: LlmOneshotParams; result: LlmOneshotResult }
+ /** Curated MCP presets with per-profile installed/enabled state and the env keys each needs. */
+ 'mcp.catalog': { params: ProfileParams; result: McpCatalogResult }
+ /** Add a server to the profile's config from a catalog preset and/or an explicit config. */
+ 'mcp.servers.add': { params: McpServersAddParams; result: McpServersAddResult }
+ /** Configured MCP servers for the (scoped) profile, secrets redacted to env-key names. */
+ 'mcp.servers.list': { params: ProfileParams; result: McpServersListResult }
+ /** Relay a client-captured redirect into a client_redirect_uri flow. */
+ 'mcp.servers.oauth.callback': { params: McpOauthCallbackParams; result: McpOauthCallbackResult }
+ /** Cancel a flow owned by the resolved profile, waking its callback worker. */
+ 'mcp.servers.oauth.cancel': { params: McpOauthFlowParams; result: McpOauthCancelResult }
+ /** Poll a flow; approved persists tokens for the profile and returns the probed tools. */
+ 'mcp.servers.oauth.poll': { params: McpOauthFlowParams; result: McpOauthPollResult }
+ /** Begin a PKCE OAuth flow; the client opens auth_url and polls mcp.servers.oauth.poll. */
+ 'mcp.servers.oauth.start': { params: McpOauthStartParams; result: McpOauthStartResult }
+ /** Drop a server from the profile's config.yaml. */
+ 'mcp.servers.remove': { params: McpServerNameParams; result: McpServersRemoveResult }
+ /** Store a credential in the profile's .env and reference it from the server config (header or env). */
+ 'mcp.servers.set_api_key': { params: McpServersSetApiKeyParams; result: McpServersSetApiKeyResult }
+ /** Cached runtime state per configured server; never connects, probes, or starts auth. */
+ 'mcp.servers.status': { params: ProfileParams; result: McpServersStatusResult }
+ /** Connect, list tools, disconnect — an OAuth server with no token on disk is reported as not ok. */
+ 'mcp.servers.test': { params: McpServerNameParams; result: McpServersTestResult }
+ /** Set/clear one author's emoji reaction on a message; returns the row's full reaction list. */
+ 'message.react': { params: MessageReactParams; result: MessageReactResult }
+ /** Remove every credential (env keys and OAuth state) for a provider. */
+ 'model.disconnect': { params: ModelDisconnectParams; result: ModelDisconnectResult }
+ /** Provider/model inventory for the picker, layered over the session's live provider when given. */
+ 'model.options': { params: ModelOptionsParams; result: ModelOptionsResult }
+ /** Save an API key for a provider and return its refreshed inventory row. */
+ 'model.save_key': { params: ModelSaveKeyParams; result: ModelSaveKeyResult }
+ /** Spill a large paste to a file and hand back the inline placeholder. */
+ 'paste.collapse': { params: PasteCollapseParams; result: PasteCollapseResult }
+ /** Render a PDF's pages to PNG and queue them as images for the next turn. */
+ 'pdf.attach': { params: PdfAttachParams; result: PdfAttachResult }
+ /** Stop an in-flight pet generate/hatch by token (idempotent). */
+ 'pet.cancel': { params: PetCancelParams; result: PetCancelResult }
+ /** Half-block cell frames (or a kitty placement) for one pet state. */
+ 'pet.cells': { params: PetCellsParams; result: PetCellsResult }
+ /** Turn the pet display off from the desktop picker. */
+ 'pet.disable': { params: ProfileParams; result: OkResult }
+ /** Export an installed pet as a re-importable .zip. */
+ 'pet.export': { params: PetSlugParams; result: PetExportResult }
+ /** Petdex gallery + local install state (installed-only offline); localOnly skips the remote manifest. */
+ 'pet.gallery': { params: PetGalleryParams; result: PetGalleryResult }
+ /** Candidate base looks for a new pet (draft step); drafts also stream via pet.generate.progress. */
+ 'pet.generate': { params: PetGenerateParams; result: PetGenerateResult }
+ /** Whether pet generation is possible (a reference-capable image backend) and which providers. */
+ 'pet.generate.status': { params: ProfileParams; result: PetGenerateStatusResult }
+ /** Turn a base draft into a full spritesheet pet; progress streams via pet.hatch.progress. */
+ 'pet.hatch': { params: PetHatchParams; result: PetHatchResult }
+ /** Active pet for sprite renderers: spritesheet (base64) + frame geometry + state-row taxonomy. */
+ 'pet.info': { params: PetInfoParams; result: PetInfoResult }
+ /** Cheap active-pet metadata used to avoid full payload refreshes. */
+ 'pet.info.meta': { params: ProfileParams; result: PetInfoMetaResult }
+ /** Uninstall a pet (delete its directory); if it was active, turn the display off. */
+ 'pet.remove': { params: PetSlugParams; result: PetSlugResult }
+ /** Rename a pet's display name + realign its slug/dir; follows the active slug in config. */
+ 'pet.rename': { params: PetRenameParams; result: PetSlugResult }
+ /** Persist display.pet.scale (clamped to engine bounds) from the desktop slider. */
+ 'pet.scale': { params: PetScaleParams; result: PetScaleResult }
+ /** Adopt a pet: install (if needed) + activate; writes display.pet.* to config. */
+ 'pet.select': { params: PetSlugParams; result: PetSlugResult }
+ /** Idle-frame PNG data URI for the picker (desktop CSP breaks CDN <img>). */
+ 'pet.thumb': { params: PetThumbParams; result: PetThumbResult }
+ /** Cheapest liveness probe; answered on the WS reader thread even while every agent is mid-turn. */
+ ping: { params: PingParams; result: PingResult }
+ /** Loaded plugin manager entries (legacy flat view); the Plugins Hub uses plugins.manage list. */
+ 'plugins.list': { params: PluginsListParams; result: PluginsListResult }
+ /** Plugins Hub backend: list installed plugins, toggle, git-install or re-pin a catalog install. */
+ 'plugins.manage': { params: PluginsManageParams; result: PluginsManageResult }
+ /** Spawn a hidden agent that brings the desktop preview's dev server back up. */
+ 'preview.restart': { params: PreviewRestartParams; result: TaskIdResult }
+ /** Kill one background process the caller's session owns and return its output snapshot. */
+ 'process.kill': { params: ProcessKillParams; result: ProcessKillResult }
+ /** Background processes owned by the caller's session (desktop status stack poll). */
+ 'process.list': { params: ProcessListParams; result: ProcessListResult }
+ /** Kill every background process in the registry (``/stop``), answering the count killed. */
+ 'process.stop': { params: ProcessStopParams; result: ProcessStopResult }
+ /** Editor Save: apply any subset of a profile's sections and report each one. */
+ 'profiles.configure': { params: ProfilesConfigureParams; result: ProfilesConfigureResult }
+ /** Create a profile (ws twin of POST /api/profiles), mirroring launch credentials by default. */
+ 'profiles.create': { params: ProfilesCreateParams; result: ProfilesCreateResult }
+ /** Everything the profile editor shows: soul, model pin, skills, toolsets, MCP servers. */
+ 'profiles.describe': { params: ProfileNameParams; result: ProfilesDescribeResult }
+ /** A profile asset as a data URL. */
+ 'profiles.get_asset': { params: ProfilesGetAssetParams; result: ProfilesGetAssetResult }
+ /** Roster of profiles with previews so a client paints without N follow-up calls. */
+ 'profiles.list': { params: ProfilesListParams; result: ProfilesListResult }
+ /** Write the onboarding facts into the default profile's user memory and confirm they landed. */
+ 'profiles.remember_onboarding': { params: ProfilesRememberOnboardingParams; result: ProfilesRememberOnboardingResult }
+ /** Store or clear a profile asset (avatar) atomically. */
+ 'profiles.set_asset': { params: ProfilesSetAssetParams; result: ProfilesSetAssetResult }
+ /** Structured project facts for a cwd so UIs don't re-sniff the workspace. */
+ 'project.facts': { params: ProjectFactsParams; result: ProjectFactsResult }
+ /** Attach a folder to a project (optionally as its primary path). */
+ 'projects.add_folder': { params: ProjectsAddFolderParams; result: ProjectResult }
+ /** Archive (or with ``restore`` un-archive) a project; answers the full listing. */
+ 'projects.archive': { params: ProjectsArchiveParams; result: ProjectsPayload }
+ /** Create a project from a name + folders; duplicate primary paths are refused (5063). */
+ 'projects.create': { params: ProjectsCreateParams; result: OptionalProjectResult }
+ /** Delete a project and its folders; answers the full listing. */
+ 'projects.delete': { params: ProjectIdParams; result: ProjectsPayload }
+ /** Repos for the desktop overview: scanned-from-disk (cached) ∪ session-derived. */
+ 'projects.discover_repos': { params: ProjectsDiscoverReposParams; result: ProjectsDiscoverReposResult }
+ /** Which project (if any) owns a directory, plus the resolved cwd and its git branch. */
+ 'projects.for_cwd': { params: ProjectsForCwdParams; result: ProjectsForCwdResult }
+ /** One stored project with its folders. */
+ 'projects.get': { params: ProjectIdParams; result: ProjectResult }
+ /** Every project of the profile (archived included) plus which one is active. */
+ 'projects.list': { params: ProfileParams; result: ProjectsPayload }
+ /** Fully hydrated lanes for one project, from the same grouping as projects.tree. */
+ 'projects.project_sessions': { params: ProjectsProjectSessionsParams; result: ProjectsProjectSessionsResult }
+ /** Persist repo roots found by the client's (desktop-side) scan; return the merged list. */
+ 'projects.record_repos': { params: ProjectsRecordReposParams; result: ProjectsRecordReposResult }
+ /** Detach a folder from a project. */
+ 'projects.remove_folder': { params: ProjectFolderParams; result: ProjectResult }
+ /** Switch (or clear) the active project for the profile. */
+ 'projects.set_active': { params: ProjectsSetActiveParams; result: ActiveIdResult }
+ /** Make one attached folder the project's primary path. */
+ 'projects.set_primary': { params: ProjectFolderParams; result: ProjectResult }
+ /** Project → repo → lane overview with counts and a few preview sessions per project. */
+ 'projects.tree': { params: ProjectsTreeParams; result: ProjectsTreeResult }
+ /** Patch a project's display fields; answers the refreshed project. */
+ 'projects.update': { params: ProjectsUpdateParams; result: ProjectResult }
+ /** Run a task on a fresh agent in the background; the answer arrives as background.complete. */
+ 'prompt.background': { params: SideAgentParams; result: TaskIdResult }
+ /** Side question over a snapshot of the live conversation; the answer arrives as btw.complete. */
+ 'prompt.btw': { params: SideAgentParams; result: TaskIdResult }
+ /** Send a user turn to a live session; busy sessions queue / steer / redirect instead of refusing. */
+ 'prompt.submit': { params: PromptSubmitParams; result: PromptSubmitResult }
+ /** Re-read ~/.hermes/.env (CLI /reload parity); built agents keep their pool until /new. */
+ 'reload.env': { params: ReloadEnvParams; result: ReloadEnvResult }
+ /** Tear down and rediscover MCP servers for every live session (prompt cache is invalidated). */
+ 'reload.mcp': { params: ReloadMcpParams; result: ReloadMcpResult }
+ /** Answer an open server→client request from a client that never received the frame. */
+ 'request.answer': { params: RequestAnswerParams; result: RequestAnswerResult }
+ /** Diff between a checkpoint and the working tree, with an ANSI rendering sized to the TUI. */
+ 'rollback.diff': { params: RollbackDiffParams; result: RollbackDiffResult }
+ /** Checkpoints for the session's cwd; ``enabled: false`` when checkpointing is off. */
+ 'rollback.list': { params: RollbackListParams; result: RollbackListResult }
+ /** Restore the working tree (or one file) to a checkpoint by hash or 1-based index. */
+ 'rollback.restore': { params: RollbackRestoreParams; result: RollbackRestoreResult }
+ /** Attach the frontend to a live session without closing the previously focused one. */
+ 'session.activate': { params: SessionActivateParams; result: SessionActivateResult }
+ /** Live sessions in this process, insertion order (not a DB browser). */
+ 'session.active_list': { params: SessionActiveListParams; result: SessionActiveListResult }
+ /** Fork a live session into a new stored child that shares the parent's history so far. */
+ 'session.branch': { params: SessionBranchParams; result: SessionBranchResult }
+ /** Tear down a live session (its stored row stays resumable). */
+ 'session.close': { params: SessionCloseParams; result: SessionCloseResult }
+ /** Manual /compress of an idle session, optionally focused on a topic. */
+ 'session.compress': { params: SessionCompressParams; result: SessionCompressResult }
+ /** Cursor-style split of the context window by category. */
+ 'session.context_breakdown': { params: SessionContextBreakdownParams; result: SessionContextBreakdownResult }
+ /** Run one allowlisted goal / loop / subgoal / heartbeat action and return the exact resulting snapshot. */
+ 'session.control': { params: SessionControlParams; result: SessionControlResult }
+ /** Stable, allowlisted snapshot of one live session's goal / loop / heartbeat state. */
+ 'session.control.read': { params: SessionControlReadParams; result: SessionControlReadResult }
+ /** Mint a live session (agent builds after the reply); a DB row appears on the first prompt unless seeded. */
+ 'session.create': { params: SessionCreateParams; result: SessionCreateResult }
+ /** Change a live, idle session's working directory. */
+ 'session.cwd.set': { params: SessionCwdSetParams; result: SessionCwdSetResult }
+ /** Delete a stored session + transcripts; refused while it is live here. */
+ 'session.delete': { params: SessionDeleteParams; result: SessionDeleteResult }
+ /** Replay events after a seq watermark on WS reconnect; truncated means refetch state. */
+ 'session.events.since': { params: SessionEventsSinceParams; result: SessionEventsSinceResult }
+ /** Replay-buffer occupancy telemetry (ops/debug). */
+ 'session.events.stats': { params: SessionEventsStatsParams; result: SessionEventsStatsResult }
+ /** Import a foreign session into this profile's history (idempotent per origin). */
+ 'session.foreign.import': { params: SessionForeignIdParams; result: SessionForeignImportResult }
+ /** One page of Claude Code / Codex sessions found on the serving backend. */
+ 'session.foreign.list': { params: SessionForeignListParams; result: SessionForeignListResult }
+ /** Preview a foreign session's tail before importing it. */
+ 'session.foreign.preview': { params: SessionForeignIdParams; result: SessionForeignPreviewResult }
+ /** The durable display transcript (ancestors included, row ids attached). */
+ 'session.history': { params: SessionHistoryParams; result: SessionHistoryResult }
+ /** Stop the running turn (and streaming TTS); retires the crash-recovery marker. */
+ 'session.interrupt': { params: SessionInterruptParams; result: SessionInterruptResult }
+ /** Human-facing stored sessions, most recent first (sub-agent / kanban sources denied). */
+ 'session.list': { params: SessionListParams; result: SessionListResult }
+ /** Most recent human-facing session; errors fold into a null session_id. */
+ 'session.most_recent': { params: SessionMostRecentParams; result: SessionMostRecentResult }
+ /** Redirect the active turn (queued for the next turn while the agent is still building). */
+ 'session.redirect': { params: SessionCorrectionParams; result: SessionCorrectionResult }
+ /** Attach to a stored session: reuse it if live here, else lazy / deferred / cold / eager rebuild. */
+ 'session.resume': { params: SessionResumeParams; result: SessionResumeResult }
+ /** Export the transcript to ~/.hermes/sessions/saved (classic /save). */
+ 'session.save': { params: SessionSaveParams; result: SessionSaveResult }
+ /** Set/clear hidden (out of the default list, still resumable by its owner) on a session + lineage. */
+ 'session.set_hidden': { params: SessionSetHiddenParams; result: SessionSetHiddenResult }
+ /** Rendered /status text for the session. */
+ 'session.status': { params: SessionStatusParams; result: SessionStatusResult }
+ /** Inject text into the next tool result without interrupting the turn. */
+ 'session.steer': { params: SessionCorrectionParams; result: SessionCorrectionResult }
+ /** Read or set a live session's title; a title set before the row exists is queued. */
+ 'session.title': { params: SessionTitleParams; result: SessionTitleResult }
+ /** Drop the last user turn (and everything after it) from an idle session. */
+ 'session.undo': { params: SessionUndoParams; result: SessionUndoResult }
+ /** Token / context / cost counters for the session (+ Nous credit lines when available). */
+ 'session.usage': { params: SessionUsageParams; result: SessionUsageResult }
+ /** Re-home a stored session's workspace; git identity is replaced and a live agent follows. */
+ 'session.workspace.move': { params: SessionWorkspaceMoveParams; result: SessionWorkspaceMoveResult }
+ /** Strict provider check through the same runtime resolution the agent uses on session creation. */
+ 'setup.runtime_check': { params: SetupRuntimeCheckParams; result: SetupRuntimeCheckResult }
+ /** Loose provider check: is ANY provider auth state discoverable for the (launch or named) profile. */
+ 'setup.status': { params: ProfileParams; result: SetupStatusResult }
+ /** Run a safe (non-dangerous) shell command captured for ``!cmd`` / inline substitution. */
+ 'shell.exec': { params: ShellExecParams; result: ShellExecResult }
+ /** Skills hub backend: list the profile's skills or search / browse / inspect / install from the hub. */
+ 'skills.manage': { params: SkillsManageParams; result: SkillsManageResult }
+ /** Re-scan skill dirs; the pre-rendered ``output`` is what /reload-skills prints. */
+ 'skills.reload': { params: SkillsReloadParams; result: SkillsReloadResult }
+ /** Execute a slash command against the session's slash worker (or a live/plugin shortcut). */
+ 'slash.exec': { params: SlashExecParams; result: SlashExecResult }
+ /** Saved spawn-tree snapshots, newest first. */
+ 'spawn_tree.list': { params: SpawnTreeListParams; result: SpawnTreeListResult }
+ /** Read one saved spawn-tree snapshot (path must be under the spawn-trees root). */
+ 'spawn_tree.load': { params: SpawnTreeLoadParams; result: SpawnTreeLoadResult }
+ /** Persist a finished delegation tree snapshot under the session's spawn-trees dir. */
+ 'spawn_tree.save': { params: SpawnTreeSaveParams; result: SpawnTreeSaveResult }
+ /** Hard-interrupt one owned child; ``found`` is false when it already finished. */
+ 'subagent.interrupt': { params: SubagentIdParams; result: SubagentInterruptResult }
+ /** Live children owned by this session (other sessions' children never leak). */
+ 'subagent.list': { params: SessionParams; result: SubagentListResult }
+ /** Queue steering text into a live delegated child owned by this session. */
+ 'subagent.steer': { params: SubagentSteerParams; result: SubagentSteerResult }
+ /** Last 16KB of an owned child's live transcript. */
+ 'subagent.tail': { params: SubagentIdParams; result: SubagentTailResult }
+ /** Schedule a downgrade / same-price change or a period-end cancellation. */
+ 'subscription.change': { params: SubscriptionChangeParams; result: BillingPendingChangeResult }
+ /** Chargeless quote of what a plan change would do (billing:manage). */
+ 'subscription.preview': { params: SubscriptionPreviewParams; result: SubscriptionPreviewResult }
+ /** Clear a scheduled downgrade / cancellation (re-enables recurring spend). */
+ 'subscription.resume': { params: ProfileParams; result: BillingPendingChangeResult }
+ /** Current plan, tier catalog and usage for the picker; fail-open when logged out. */
+ 'subscription.state': { params: ProfileParams; result: SubscriptionStateResult }
+ /** Prorate, charge and flip the plan (billing:manage, idempotent). */
+ 'subscription.upgrade': { params: SubscriptionUpgradeParams; result: SubscriptionUpgradeResult }
+ /** Host battery for the status bar; always resolves, ``available: false`` when unreadable. */
+ 'system.battery': { params: SystemBatteryParams; result: SystemBatteryResult }
+ /** Record the client's column width for server-side rendering. */
+ 'terminal.resize': { params: TerminalResizeParams; result: TerminalResizeResult }
+ /** Persist a toolset / MCP enable-disable change and rebuild the session agent so it takes effect now. */
+ 'tools.configure': { params: ToolsConfigureParams; result: ToolsConfigureResult }
+ /** Every toolset with its resolved tool names, flagged against the session's (or config's) enabled set. */
+ 'tools.list': { params: _SessionScoped; result: ToolsetsListResult }
+ /** The /tools listing grouped by toolset, including tools deferred behind the tool_search bridge. */
+ 'tools.show': { params: _SessionScoped; result: ToolsShowResult }
+ /** Toolset summaries (no tool names) for the desktop Toolsets tab. */
+ 'toolsets.list': { params: _SessionScoped; result: ToolsetsListResult }
+ /** Two-bar dollar usage view shared by /usage, /topup and /subscription; fail-open to unavailable. */
+ 'usage.bars': { params: ProfileParams; result: UsageModel }
+ /** Add a login / payment / address item to the local vault. */
+ 'vault.add': { params: VaultAddParams; result: VaultAddResult }
+ /** Metadata-only listing across the local vault and every unlocked password manager. */
+ 'vault.list': { params: ProfileParams; result: VaultListResult }
+ /** Forget a manager's session token (every manager when no name is given). */
+ 'vault.lock': { params: VaultLockParams; result: VaultLockResult }
+ /** Remove a local vault item by id. */
+ 'vault.remove': { params: VaultRemoveParams; result: VaultRemoveResult }
+ /** Enable or disable an external password manager (disabling also locks it). */
+ 'vault.source.set': { params: VaultSourceSetParams; result: VaultSourceSetResult }
+ /** Status of every login source (local vault + detected password managers). */
+ 'vault.sources': { params: ProfileParams; result: VaultSourcesResult }
+ /** Unlock a password manager for this session with its master password. */
+ 'vault.unlock': { params: VaultUnlockParams; result: VaultUnlockResult }
+ /** Best known verification evidence for a cwd/session; read-only, never runs checks. */
+ 'verification.status': { params: VerificationStatusParams; result: VerificationStatusResult }
+ /** VAD-bounded push-to-talk; the transcript arrives as a voice.transcript event. */
+ 'voice.record': { params: VoiceRecordParams; result: VoiceRecordResult }
+ /** /voice parity: report, flip voice mode on/off, or toggle speech output. */
+ 'voice.toggle': { params: VoiceToggleParams; result: VoiceToggleResult }
+ /** Speak text through the backend TTS engine (barge-in aware). */
+ 'voice.tts': { params: VoiceTtsParams; result: VoiceTtsResult }
+ /** Push client-captured PCM into the armed detector (mic-less remote backends). */
+ 'wake.feed': { params: WakeFeedParams; result: WakeFeedResult }
+ /** Release the mic (e.g. while the desktop's browser captures audio). */
+ 'wake.pause': { params: WakeControlParams; result: WakePauseResult }
+ /** Reclaim the mic after a pause; no-op if the listener isn't armed. */
+ 'wake.resume': { params: WakeControlParams; result: WakeResumeResult }
+ /** Arm the wake-word listener for the calling surface; refusals explain why. */
+ 'wake.start': { params: WakeStartParams; result: WakeStartResult }
+ /** Everything a client needs to draw the wake-word state and decide whether to (re)arm. */
+ 'wake.status': { params: WakeStatusParams; result: WakeStatusResult }
+ /** Stop this surface's listener; persist also writes wake_word.enabled: false. */
+ 'wake.stop': { params: WakeStopParams; result: WakeStopResult }
+ }
+ export type RpcMethod = keyof RpcMethods
+ export const RPC_METHODS = [
+ 'agents.list',
+ 'approval.pending',
+ 'approval.received',
+ 'approval.respond',
+ 'billing.auto_reload',
+ 'billing.charge',
+ 'billing.charge_status',
+ 'billing.state',
+ 'billing.step_up',
+ 'bot_relay.deliver',
+ 'bot_relay.outbox.drain',
+ 'bot_relay.reply',
+ 'bot_relay.roster.sync',
+ 'browser.controller.detach',
+ 'browser.controller.heartbeat',
+ 'browser.controller.register',
+ 'browser.controller.result',
+ 'browser.manage',
+ 'clarify.lock',
+ 'cli.exec',
+ 'clipboard.paste',
+ 'command.dispatch',
+ 'command.resolve',
+ 'commands.catalog',
+ 'complete.path',
+ 'complete.slash',
+ 'config.get',
+ 'config.set',
+ 'config.show',
+ 'connection.respond',
+ 'connectors.connect',
+ 'connectors.list',
+ 'connectors.operation.status',
+ 'cron.manage',
+ 'delegation.pause',
+ 'delegation.status',
+ 'diagnostics.share_nous',
++ 'display.install',
++ 'display.lease.acquire',
++ 'display.lease.release',
++ 'display.observe',
++ 'display.start',
++ 'display.status',
++ 'display.stop',
++ 'display.thumbnail',
+ 'file.attach',
+ 'free_tier.ack_notice',
+ 'free_tier.provision',
+ 'free_tier.status',
+ 'gateway.capabilities',
+ 'groups.approve',
+ 'groups.capabilities',
+ 'groups.create',
+ 'groups.demote',
+ 'groups.disband',
+ 'groups.list',
+ 'groups.log',
+ 'groups.peer.invite',
+ 'groups.peer.register',
+ 'groups.peer.revoke',
+ 'groups.promote',
+ 'groups.rename',
+ 'groups.replica_state',
+ 'groups.replicate',
+ 'groups.retry',
+ 'groups.send',
+ 'groups.state',
+ 'groups.stop',
+ 'handoff.fail',
+ 'handoff.request',
+ 'handoff.state',
+ 'image.attach',
+ 'image.attach_bytes',
+ 'image.detach',
+ 'image.generate',
+ 'input.detect_drop',
+ 'insights.get',
+ 'learning.delete',
+ 'learning.detail',
+ 'learning.edit',
+ 'learning.frames',
+ 'llm.oneshot',
+ 'mcp.catalog',
+ 'mcp.servers.add',
+ 'mcp.servers.list',
+ 'mcp.servers.oauth.callback',
+ 'mcp.servers.oauth.cancel',
+ 'mcp.servers.oauth.poll',
+ 'mcp.servers.oauth.start',
+ 'mcp.servers.remove',
+ 'mcp.servers.set_api_key',
+ 'mcp.servers.status',
+ 'mcp.servers.test',
+ 'message.react',
+ 'model.disconnect',
+ 'model.options',
+ 'model.save_key',
+ 'paste.collapse',
+ 'pdf.attach',
+ 'pet.cancel',
+ 'pet.cells',
+ 'pet.disable',
+ 'pet.export',
+ 'pet.gallery',
+ 'pet.generate',
+ 'pet.generate.status',
+ 'pet.hatch',
+ 'pet.info',
+ 'pet.info.meta',
+ 'pet.remove',
+ 'pet.rename',
+ 'pet.scale',
+ 'pet.select',
+ 'pet.thumb',
+ 'ping',
+ 'plugins.list',
+ 'plugins.manage',
+ 'preview.restart',
+ 'process.kill',
+ 'process.list',
+ 'process.stop',
+ 'profiles.configure',
+ 'profiles.create',
+ 'profiles.describe',
+ 'profiles.get_asset',
+ 'profiles.list',
+ 'profiles.remember_onboarding',
+ 'profiles.set_asset',
+ 'project.facts',
+ 'projects.add_folder',
+ 'projects.archive',
+ 'projects.create',
+ 'projects.delete',
+ 'projects.discover_repos',
+ 'projects.for_cwd',
+ 'projects.get',
+ 'projects.list',
+ 'projects.project_sessions',
+ 'projects.record_repos',
+ 'projects.remove_folder',
+ 'projects.set_active',
+ 'projects.set_primary',
+ 'projects.tree',
+ 'projects.update',
+ 'prompt.background',
+ 'prompt.btw',
+ 'prompt.submit',
+ 'reload.env',
+ 'reload.mcp',
+ 'request.answer',
+ 'rollback.diff',
+ 'rollback.list',
+ 'rollback.restore',
+ 'session.activate',
+ 'session.active_list',
+ 'session.branch',
+ 'session.close',
+ 'session.compress',
+ 'session.context_breakdown',
+ 'session.control',
+ 'session.control.read',
+ 'session.create',
+ 'session.cwd.set',
+ 'session.delete',
+ 'session.events.since',
+ 'session.events.stats',
+ 'session.foreign.import',
+ 'session.foreign.list',
+ 'session.foreign.preview',
+ 'session.history',
+ 'session.interrupt',
+ 'session.list',
+ 'session.most_recent',
+ 'session.redirect',
+ 'session.resume',
+ 'session.save',
+ 'session.set_hidden',
+ 'session.status',
+ 'session.steer',
+ 'session.title',
+ 'session.undo',
+ 'session.usage',
+ 'session.workspace.move',
+ 'setup.runtime_check',
+ 'setup.status',
+ 'shell.exec',
+ 'skills.manage',
+ 'skills.reload',
+ 'slash.exec',
+ 'spawn_tree.list',
+ 'spawn_tree.load',
+ 'spawn_tree.save',
+ 'subagent.interrupt',
+ 'subagent.list',
+ 'subagent.steer',
+ 'subagent.tail',
+ 'subscription.change',
+ 'subscription.preview',
+ 'subscription.resume',
+ 'subscription.state',
+ 'subscription.upgrade',
+ 'system.battery',
+ 'terminal.resize',
+ 'tools.configure',
+ 'tools.list',
+ 'tools.show',
+ 'toolsets.list',
+ 'usage.bars',
+ 'vault.add',
+ 'vault.list',
+ 'vault.lock',
+ 'vault.remove',
+ 'vault.source.set',
+ 'vault.sources',
+ 'vault.unlock',
+ 'verification.status',
+ 'voice.record',
+ 'voice.toggle',
+ 'voice.tts',
+ 'wake.feed',
+ 'wake.pause',
+ 'wake.resume',
+ 'wake.start',
+ 'wake.status',
+ 'wake.stop'
+ ] as const satisfies readonly RpcMethod[]
+
+ // ── Server→client requests ──
+ export interface ServerRequestMap {
+ /** A dangerous command awaits the user's decision. */
+ approval: { params: ApprovalRequestParams; result: ApprovalResult }
+ /** The clarify tool: ask the user one question or a batch. */
+ clarify: { params: ClarifyRequestParams; result: ClarifyResult }
++ /** Masked sudo password for the Bot Screen package install; app-level (empty session). */
++ 'display.install.sudo': { params: DisplayInstallSudoParams; result: ValueResult }
+ /** Click / type / scroll / annotate inside the in-app browser preview. */
+ 'preview.act': { params: PreviewActRequestParams; result: ValueResult }
+ /** Read the in-app browser preview's text (JSON text answer). */
+ 'preview.read': { params: ReadRangeRequestParams; result: ValueResult }
+ /** Masked value for a named env var (skills / setup flows). */
+ secret: { params: SecretRequestParams; result: ValueResult }
+ /** Masked sudo password for the terminal tool. */
+ sudo: { params: EmptyRequestParams; result: ValueResult }
+ /** Read the visible in-app terminal buffer (JSON text answer). */
+ 'terminal.read': { params: ReadRangeRequestParams; result: ValueResult }
+ /** Drive a guided tour highlight in the desktop renderer. */
+ tour: { params: TourRequestParams; result: ValueResult }
+ /** A one-time / 2FA code the user reads from their device. */
+ 'vault.code': { params: VaultCodeRequestParams; result: ValueResult }
+ /** Save a login for a site the agent is about to fill; the answer is JSON {identifier, password}. */
+ 'vault.save_login': { params: VaultSaveLoginRequestParams; result: ValueResult }
+ /** Master password to unlock an external password manager for this session. */
+ 'vault.unlock_prompt': { params: VaultUnlockRequestParams; result: ValueResult }
+ /** Enumerate the native window below the app (JSON text answer). */
+ 'window.read': { params: EmptyRequestParams; result: ValueResult }
+ }
+ export type ServerRequestMethod = keyof ServerRequestMap
+ export const SERVER_REQUEST_METHODS = [
+ 'approval',
+ 'clarify',
++ 'display.install.sudo',
+ 'preview.act',
+ 'preview.read',
+ 'secret',
+ 'sudo',
+ 'terminal.read',
+ 'tour',
+ 'vault.code',
+ 'vault.save_login',
+ 'vault.unlock_prompt',
+ 'window.read'
+ ] as const satisfies readonly ServerRequestMethod[]
+
+ // ── Notifications (`event` frames) ──
+ export interface BackendGatewayEventMap {
+ /** Output chunk from an agent-owned background process. */
+ 'agent.terminal.output': TerminalOutputPayload
+ /** A /background side agent finished. */
+ 'background.complete': SideAgentCompletePayload
+ /** Device-flow URL + code for the billing scope step-up; the client opens the browser. */
+ 'billing.step_up.verification': BillingStepUpVerificationPayload
+ /** A bot-relay outbox envelope is queued; drain it. */
+ 'bot_relay.outbox.pending': ChangeSignalPayload
+ /** Withdraw a pending controller command. */
+ 'browser.controller.cancel': BrowserControllerCancelPayload
+ /** Dispatch one browser action to the attached controller. */
+ 'browser.controller.command': BrowserControllerCommandPayload
+ /** Browser (CDP) connect / install progress line. */
+ 'browser.progress': BrowserProgressPayload
+ /** A /btw side question was answered. */
+ 'btw.complete': SideAgentCompletePayload
+ /** A connection operation opened on this session; the desktop renders its card. */
+ 'connection.request': ConnectionRequestPayload
+ /** One transition or the settlement of an open connection operation. */
+ 'connection.update': ConnectionUpdatePayload
+ /** cron/jobs.json moved; refetch the cron list. */
+ 'cron.changed': ChangeSignalPayload
++ /** The install ended (0 ok, -1 cancelled, -2 no sudo: the command to run by hand was streamed). */
++ 'display.install.done': DisplayInstallDonePayload
++ /** One line of package-manager output. */
++ 'display.install.log': DisplayInstallLogPayload
++ /** The takeover lease changed hands; every client repaints. */
++ 'display.lease': DisplayLeasePayload
++ /** This profile's screen started or stopped (also for transitions made outside hermes serve). */
++ 'display.status': DisplayStatusPayload
+ /** A session-level failure outside a turn (agent init, model switch, compression, resume). */
+ error: ErrorPayload
+ /** First frame of a connection: the resolved skin, the change-event capability and the replay epoch. */
+ 'gateway.ready': GatewayReadyPayload
+ /** Apply a named desktop layout preset. */
+ 'layout.apply': LayoutApplyPayload
+ /** The turn ended: final text, usage and outcome. */
+ 'message.complete': MessageCompletePayload
+ /** One streamed chunk of the assistant reply. */
+ 'message.delta': StreamDeltaPayload
+ /** Interim assistant commentary (text beside tool calls) sealed as its own segment. */
+ 'message.interim': MessageInterimPayload
+ /** The agent reacted to a message; paint it live. */
+ 'message.reaction': MessageReactionPayload
+ /** A turn began streaming; no payload. */
+ 'message.start': Record<string, never>
+ /** The MoA aggregator started. */
+ 'moa.aggregating': MoaAggregatingPayload
+ /** MoA phase transition (currently only ``aggregator``). */
+ 'moa.phase': MoaPhasePayload
+ /** MoA reference fan-out progress (n/total). */
+ 'moa.progress': MoaProgressPayload
+ /** One MoA reference model's output. */
+ 'moa.reference': MoaReferencePayload
+ /** Informational one-liner for the session (capabilities refreshed). */
+ notice: NoticePayload
+ /** Withdraw the notice with this key. */
+ 'notification.clear': NotificationClearPayload
+ /** Show / replace a keyed out-of-band notice (toast or status bar). */
+ 'notification.show': NotificationShowPayload
+ /** Pairing state moved; refetch pairing. */
+ 'pairing.changed': ChangeSignalPayload
+ /** Focus / reveal a named desktop pane. */
+ 'pane.reveal': PaneRevealPayload
+ /** The active pet / its spritesheet changed (watcher). */
+ 'pet.changed': PetChangedPayload
+ /** Pet base-draft generation progress. */
+ 'pet.generate.progress': PetGenerateProgressPayload
+ /** Pet hatch (row drawing) progress. */
+ 'pet.hatch.progress': PetHatchProgressPayload
+ /** gateway_state.json moved; refetch platform status. */
+ 'platforms.changed': ChangeSignalPayload
+ /** Close the preview pane or one tab. */
+ 'preview.close': PreviewClosePayload
+ /** Open a URL / file in the desktop preview pane. */
+ 'preview.open': PreviewOpenPayload
+ /** The hidden preview-restart agent finished. */
+ 'preview.restart.complete': SideAgentCompletePayload
+ /** Progress line from the preview-restart agent. */
+ 'preview.restart.progress': PreviewRestartProgressPayload
+ /** Affection reaction detected in the user's message (hearts etc.). */
+ reaction: ReactionPayload
+ /** A completed reasoning block (non-streaming providers). */
+ 'reasoning.available': StreamDeltaPayload
+ /** One streamed chunk of the model's reasoning. */
+ 'reasoning.delta': StreamDeltaPayload
+ /** The backend withdrew an open server→client request; clear the matching card only. */
+ 'request.cancel': RequestCancelPayload
+ /** Background review of the last turn finished. */
+ 'review.summary': ReviewSummaryPayload
+ /** Persisted goal / loop / heartbeat state changed. */
+ 'session.control.update': SessionControlUpdatePayload
+ /** Live session settings snapshot (``server._session_info``); also the ``info`` of create/resume/activate. */
+ 'session.info': SessionLiveInfo
+ /** The backend reclaimed a live session out from under its clients. */
+ 'session.reclaimed': SessionReclaimedPayload
+ /** Deferred resume hydration progress. */
+ 'session.resume_progress': SessionResumeProgressPayload
+ /** Auto-titling renamed the session (``session_id`` is the stored key). */
+ 'session.title': SessionTitlePayload
+ /** Mid-turn usage tick; message.complete carries the authoritative final usage. */
+ 'session.usage': SessionUsagePayload
+ /** state.db moved; refetch the session list. */
+ 'sessions.changed': ChangeSignalPayload
+ /** The free-tier bootstrap finished (broadcast); the desktop's setup gate reads the record. */
+ 'setup.ready': SetupReadyPayload
+ /** The active skin moved (name switch or live colour edit); repaint from this palette. */
+ 'skin.changed': SkinPayload
+ /** Transient status line (kind: status, lifecycle, compacting, goal, loop, heartbeat, process, …). */
+ 'status.update': StatusUpdatePayload
+ /** A child finished (status + observability rollup). */
+ 'subagent.complete': SubagentEventPayload
+ /** Batched tool-name progress from a child. */
+ 'subagent.progress': SubagentEventPayload
+ /** delegate_task accepted a child goal (before the child starts). */
+ 'subagent.spawn_requested': SubagentEventPayload
+ /** A delegated child started running. */
+ 'subagent.start': SubagentEventPayload
+ /** A child's reasoning chunk. */
+ 'subagent.thinking': SubagentEventPayload
+ /** A child called a tool. */
+ 'subagent.tool': SubagentEventPayload
+ /** An agent-owned background process closed. */
+ 'terminal.close': TerminalClosePayload
+ /** Legacy thinking-text chunk (thinking_callback). */
+ 'thinking.delta': StreamDeltaPayload
+ /** Point at a desktop element with a one-line tip bubble. */
+ 'tip.show': TipShowPayload
+ /** Full todo snapshot after a todo tool ran. */
+ 'todo.updated': TodoUpdatedPayload
+ /** A tool call finished: parsed result, summary, optional diff / todo snapshot. */
+ 'tool.complete': ToolCompletePayload
+ /** The model is emitting a tool call's arguments. */
+ 'tool.generating': ToolGeneratingPayload
+ /** Tool output was classified as risky (prompt-injection / secret findings). */
+ 'tool.output_risk': ToolOutputRiskPayload
+ /** A tool call began (stable id + full args). */
+ 'tool.start': ToolStartPayload
+ /** Barge-in: the spoken interjection interrupted the turn; no payload. */
+ 'voice.interrupted': Record<string, never>
+ /** Voice recorder state changed. */
+ 'voice.status': VoiceStatusPayload
+ /** A voice capture produced text (or a stop phrase / silence limit). */
+ 'voice.transcript': VoiceTranscriptPayload
+ /** A wake phrase fired. */
+ 'wake.detected': WakeDetectedPayload
+ }
+ export type BackendGatewayEventName = keyof BackendGatewayEventMap
+ export const GATEWAY_EVENT_TYPES = [
+ 'agent.terminal.output',
+ 'background.complete',
+ 'billing.step_up.verification',
+ 'bot_relay.outbox.pending',
+ 'browser.controller.cancel',
+ 'browser.controller.command',
+ 'browser.progress',
+ 'btw.complete',
+ 'connection.request',
+ 'connection.update',
+ 'cron.changed',
++ 'display.install.done',
++ 'display.install.log',
++ 'display.lease',
++ 'display.status',
+ 'error',
+ 'gateway.ready',
+ 'layout.apply',
+ 'message.complete',
+ 'message.delta',
+ 'message.interim',
+ 'message.reaction',
+ 'message.start',
+ 'moa.aggregating',
+ 'moa.phase',
+ 'moa.progress',
+ 'moa.reference',
+ 'notice',
+ 'notification.clear',
+ 'notification.show',
+ 'pairing.changed',
+ 'pane.reveal',
+ 'pet.changed',
+ 'pet.generate.progress',
+ 'pet.hatch.progress',
+ 'platforms.changed',
+ 'preview.close',
+ 'preview.open',
+ 'preview.restart.complete',
+ 'preview.restart.progress',
+ 'reaction',
+ 'reasoning.available',
+ 'reasoning.delta',
+ 'request.cancel',
+ 'review.summary',
+ 'session.control.update',
+ 'session.info',
+ 'session.reclaimed',
+ 'session.resume_progress',
+ 'session.title',
+ 'session.usage',
+ 'sessions.changed',
+ 'setup.ready',
+ 'skin.changed',
+ 'status.update',
+ 'subagent.complete',
+ 'subagent.progress',
+ 'subagent.spawn_requested',
+ 'subagent.start',
+ 'subagent.thinking',
+ 'subagent.tool',
+ 'terminal.close',
+ 'thinking.delta',
+ 'tip.show',
+ 'todo.updated',
+ 'tool.complete',
+ 'tool.generating',
+ 'tool.output_risk',
+ 'tool.start',
+ 'voice.interrupted',
+ 'voice.status',
+ 'voice.transcript',
+ 'wake.detected'
+ ] as const satisfies readonly BackendGatewayEventName[]
diff --cc apps/shared/src/gateway-contract.openrpc.json
index 00000000000,1ddc336d5e1..85095e1507a
mode 000000,100644..100644
--- a/apps/shared/src/gateway-contract.openrpc.json
+++ b/apps/shared/src/gateway-contract.openrpc.json
@@@ -1,0 -1,34413 +1,35440 @@@
+ {
+ "openrpc": "1.3.2",
+ "info": {
+ "title": "Hermes TUI/Desktop gateway",
+ "version": "1",
+ "description": "Generated from tui_gateway/contracts by scripts/gen_gateway_contracts.py."
+ },
+ "methods": [
+ {
+ "name": "agents.list",
+ "summary": "Registry-wide background process summary for ``/agents``.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/AgentsListParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/AgentsListResult"
+ }
+ }
+ },
+ {
+ "name": "approval.pending",
+ "summary": "Replay the approvals still waiting on this session (reconnect / polling).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ApprovalPendingParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ApprovalPendingResult"
+ }
+ }
+ },
+ {
+ "name": "approval.received",
+ "summary": "Tell the backend the card is on screen, so its timeout clock starts.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ApprovalReceivedParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ApprovalReceivedResult"
+ }
+ }
+ },
+ {
+ "name": "approval.respond",
+ "summary": "Deliver the user's decision on a dangerous command (falls back to durable identity on a stale sid).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ApprovalRespondParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ApprovalRespondResult"
+ }
+ }
+ },
+ {
+ "name": "billing.auto_reload",
+ "summary": "Enable/disable auto top-up with its threshold and reload amount (billing:manage).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/BillingAutoReloadParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/BillingMutationResult"
+ }
+ }
+ },
+ {
+ "name": "billing.charge",
+ "summary": "Start a one-off top-up charge (billing:manage, idempotent).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/BillingChargeParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/BillingChargeResult"
+ }
+ }
+ },
+ {
+ "name": "billing.charge_status",
+ "summary": "Poll one charge by id.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/BillingChargeStatusParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/BillingChargeStatusResult"
+ }
+ }
+ },
+ {
+ "name": "billing.state",
+ "summary": "Read-only billing view (no scope); the Nous free tier is answered locally without a portal call.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProfileParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/BillingStateResult"
+ }
+ }
+ },
+ {
+ "name": "billing.step_up",
+ "summary": "Run the billing:manage device flow; the URL/code arrive via billing.step_up.verification.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/BillingStepUpParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/BillingStepUpResult"
+ }
+ }
+ },
+ {
+ "name": "bot_relay.deliver",
+ "summary": "Deliver a relayed DM into a Bot Chat on this gateway and return the one-turn reply (blocking).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/BotRelayDeliverParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/BotRelayDeliverResult"
+ }
+ }
+ },
+ {
+ "name": "bot_relay.outbox.drain",
+ "summary": "Atomically claim every pending cross-connection envelope queued on this gateway.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/BotRelayOutboxDrainParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/BotRelayOutboxDrainResult"
+ }
+ }
+ },
+ {
+ "name": "bot_relay.reply",
+ "summary": "Write a relayed reply and/or typed error for an envelope so the sender-side waiter resolves.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/BotRelayReplyParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/OkResult"
+ }
+ }
+ },
+ {
+ "name": "bot_relay.roster.sync",
+ "summary": "Replace this gateway's view of agents on other connections; answers the accepted row count.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/BotRelayRosterSyncParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/BotRelayRosterSyncResult"
+ }
+ }
+ },
+ {
+ "name": "browser.controller.detach",
+ "summary": "Hard-detach only the controller owned by this authenticated transport.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/BrowserControllerParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/BrowserControllerDetachResult"
+ }
+ }
+ },
+ {
+ "name": "browser.controller.heartbeat",
+ "summary": "Acknowledge a heartbeat only for this transport's own attached controller.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/BrowserControllerParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/OkResult"
+ }
+ }
+ },
+ {
+ "name": "browser.controller.register",
+ "summary": "Attach this connection as the browser controller for one session; fails closed (4403).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/BrowserControllerRegisterParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/BrowserControllerRegisterResult"
+ }
+ }
+ },
+ {
+ "name": "browser.controller.result",
+ "summary": "Deliver one command result to the broker; accepted is false for unknown or settled command ids.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/BrowserControllerResultParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/BrowserControllerResultResult"
+ }
+ }
+ },
+ {
+ "name": "browser.manage",
+ "summary": "Inspect, attach to, or drop the CDP browser the tools use; ``messages`` narrate a connect.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/BrowserManageParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/BrowserManageResult"
+ }
+ }
+ },
+ {
+ "name": "clarify.lock",
+ "summary": "Lock one answer of a batch clarify request (editable until every question is locked).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ClarifyLockParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ClarifyLockResult"
+ }
+ }
+ },
+ {
+ "name": "cli.exec",
+ "summary": "Run ``hermes <argv>`` non-interactively and capture its output; ``blocked`` explains a refusal.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/CliExecParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/CliExecResult"
+ }
+ }
+ },
+ {
+ "name": "clipboard.paste",
+ "summary": "Save the host clipboard image into the session and queue it for the next turn.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ClipboardPasteParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/AttachedImageResult"
+ }
+ }
+ },
+ {
+ "name": "command.dispatch",
+ "summary": "Run a quick/plugin/bundle/skill/built-in slash command and answer a structured directive.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/CommandDispatchParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/CommandDispatchResult"
+ }
+ }
+ },
+ {
+ "name": "command.resolve",
+ "summary": "Canonical registry command for a name or alias.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/CommandResolveParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/CommandResolveResult"
+ }
+ }
+ },
+ {
+ "name": "commands.catalog",
+ "summary": "Categorized slash metadata (registry, quick, plugin, skill) for completion menus.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/CommandsCatalogParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/CommandsCatalogResult"
+ }
+ }
+ },
+ {
+ "name": "complete.path",
+ "summary": "Path / @-reference completions for the composer (files, folders, profiles, plugin providers).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/CompletePathParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/CompletionItemsResult"
+ }
+ }
+ },
+ {
+ "name": "complete.slash",
+ "summary": "Ranked slash-command / skill completions for a ``/`` token.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/CompleteSlashParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/CompleteSlashResult"
+ }
+ }
+ },
+ {
+ "name": "config.get",
+ "summary": "Read one normalised config value (or the whole effective config) the way the UIs render it.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ConfigGetParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ConfigGetResult"
+ }
+ }
+ },
+ {
+ "name": "config.set",
+ "summary": "Change one config key (persisted or session-scoped) and read back the normalised value.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ConfigSetParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ConfigSetResult"
+ }
+ }
+ },
+ {
+ "name": "config.show",
+ "summary": "Masked, display-ready config summary (model / agent / environment rows).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ConfigShowParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ConfigShowResult"
+ }
+ }
+ },
+ {
+ "name": "connection.respond",
+ "summary": "Per-target outcomes from the card, and an optional Continue.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ConnectionRespondParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ConnectionRespondResult"
+ }
+ }
+ },
+ {
+ "name": "connectors.connect",
+ "summary": "Start (or re-initiate) authorization for named connectors on the session's connection operation.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ConnectorsConnectParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ConnectorsConnectResult"
+ }
+ }
+ },
+ {
+ "name": "connectors.list",
+ "summary": "Connector catalog + connection state for one owned session (``available=False`` when the toolset is off).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ConnectorsListParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ConnectorsListResult"
+ }
+ }
+ },
+ {
+ "name": "connectors.operation.status",
+ "summary": "The current snapshot of one open operation on an owned session.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ConnectionOperationParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ConnectionOperationStatus"
+ }
+ }
+ },
+ {
+ "name": "cron.manage",
+ "summary": "List/add/remove/pause/resume cron jobs in the (optionally profile-scoped) cron store.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/CronManageParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/CronManageResult"
+ }
+ }
+ },
+ {
+ "name": "delegation.pause",
+ "summary": "Block/unblock NEW spawns globally (active children keep running); returns the new state.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/DelegationPauseParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/DelegationPauseResult"
+ }
+ }
+ },
+ {
+ "name": "delegation.status",
+ "summary": "Running subagent tree plus the spawn pause flag and limits.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProfileParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/DelegationStatusResult"
+ }
+ }
+ },
+ {
+ "name": "diagnostics.share_nous",
+ "summary": "Upload a force-redacted debug bundle to Nous-internal diagnostics storage.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/DiagnosticsShareNousParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/DiagnosticsShareNousResult"
+ }
+ }
+ },
++ {
++ "name": "display.install",
++ "summary": "Run the distro package install on the gateway host; progress streams as display.install.log/.done.",
++ "params": [
++ {
++ "name": "params",
++ "schema": {
++ "$ref": "#/components/schemas/ProfileParams"
++ }
++ }
++ ],
++ "result": {
++ "name": "result",
++ "schema": {
++ "$ref": "#/components/schemas/DisplayInstallResult"
++ }
++ }
++ },
++ {
++ "name": "display.lease.acquire",
++ "summary": "Take over: the human named by a viewer id this connection minted controls the screen.",
++ "params": [
++ {
++ "name": "params",
++ "schema": {
++ "$ref": "#/components/schemas/DisplayLeaseAcquireParams"
++ }
++ }
++ ],
++ "result": {
++ "name": "result",
++ "schema": {
++ "$ref": "#/components/schemas/DisplayLeaseResult"
++ }
++ }
++ },
++ {
++ "name": "display.lease.release",
++ "summary": "Hand back. Without a viewer id the release is refused while a human holds unless force.",
++ "params": [
++ {
++ "name": "params",
++ "schema": {
++ "$ref": "#/components/schemas/DisplayLeaseReleaseParams"
++ }
++ }
++ ],
++ "result": {
++ "name": "result",
++ "schema": {
++ "$ref": "#/components/schemas/DisplayLeaseResult"
++ }
++ }
++ },
++ {
++ "name": "display.observe",
++ "summary": "Mint a single-use ticket for /api/display/ws and the server-minted viewer id for this connection.",
++ "params": [
++ {
++ "name": "params",
++ "schema": {
++ "$ref": "#/components/schemas/DisplayObserveParams"
++ }
++ }
++ ],
++ "result": {
++ "name": "result",
++ "schema": {
++ "$ref": "#/components/schemas/DisplayObserveResult"
++ }
++ }
++ },
++ {
++ "name": "display.start",
++ "summary": "Start this profile's Xvnc + Xfce (idempotent); blocks until the display is published.",
++ "params": [
++ {
++ "name": "params",
++ "schema": {
++ "$ref": "#/components/schemas/ProfileParams"
++ }
++ }
++ ],
++ "result": {
++ "name": "result",
++ "schema": {
++ "$ref": "#/components/schemas/DisplayStatus"
++ }
++ }
++ },
++ {
++ "name": "display.status",
++ "summary": "Runtime + lease snapshot for this profile's screen.",
++ "params": [
++ {
++ "name": "params",
++ "schema": {
++ "$ref": "#/components/schemas/ProfileParams"
++ }
++ }
++ ],
++ "result": {
++ "name": "result",
++ "schema": {
++ "$ref": "#/components/schemas/DisplayStatus"
++ }
++ }
++ },
++ {
++ "name": "display.stop",
++ "summary": "Stop the screen. Refused (5300, code viewer_mismatch) while a human holds unless force.",
++ "params": [
++ {
++ "name": "params",
++ "schema": {
++ "$ref": "#/components/schemas/DisplayStopParams"
++ }
++ }
++ ],
++ "result": {
++ "name": "result",
++ "schema": {
++ "$ref": "#/components/schemas/DisplayStopResult"
++ }
++ }
++ },
++ {
++ "name": "display.thumbnail",
++ "summary": "One JPEG grab of the bot's screen; read-only, never changes the lease.",
++ "params": [
++ {
++ "name": "params",
++ "schema": {
++ "$ref": "#/components/schemas/ProfileParams"
++ }
++ }
++ ],
++ "result": {
++ "name": "result",
++ "schema": {
++ "$ref": "#/components/schemas/DisplayThumbnailResult"
++ }
++ }
++ },
+ {
+ "name": "file.attach",
+ "summary": "Stage a non-image file into the session workspace and hand back its @file: ref.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/FileAttachParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/FileAttachResult"
+ }
+ }
+ },
+ {
+ "name": "free_tier.ack_notice",
+ "summary": "Mark the one-time availability notice as shown on the free-tier identity.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProfileParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/FreeTierAckNoticeResult"
+ }
+ }
+ },
+ {
+ "name": "free_tier.provision",
+ "summary": "Explicit retry of the free-tier identity mint when the boot bootstrap could not create it.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProfileParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/FreeTierProvisionResult"
+ }
+ }
+ },
+ {
+ "name": "free_tier.status",
+ "summary": "Pure read of the focused profile's free-tier identity state (no network, no side effects).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProfileParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/FreeTierStatusResult"
+ }
+ }
+ },
+ {
+ "name": "gateway.capabilities",
+ "summary": "What THIS build enforces (a client withholds a feature unless advertised).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/PingParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/GatewayCapabilitiesResult"
+ }
+ }
+ },
+ {
+ "name": "groups.approve",
+ "summary": "Resolve one exact pending approval raised by a local or peer room member.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsApproveParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsApproveResult"
+ }
+ }
+ },
+ {
+ "name": "groups.capabilities",
+ "summary": "Describe the hosted-room protocol implemented by this gateway.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsCapabilitiesParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsCapabilitiesResult"
+ }
+ }
+ },
+ {
+ "name": "groups.create",
+ "summary": "Create a hosted room idempotently; authority is this gateway's stable install identity.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsCreateParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsCreateResult"
+ }
+ }
+ },
+ {
+ "name": "groups.demote",
+ "summary": "Fence this gateway's stale room authority against a proven newer epoch.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsDemoteParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsDemoteResult"
+ }
+ }
+ },
+ {
+ "name": "groups.disband",
+ "summary": "Permanently tombstone a hosted room id after stopping its work and revoking peer routes.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsDisbandParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsDisbandResult"
+ }
+ }
+ },
+ {
+ "name": "groups.list",
+ "summary": "List rooms hosted by this gateway, most recently changed first.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsListParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsListResult"
+ }
+ }
+ },
+ {
+ "name": "groups.log",
+ "summary": "A monotonic room-log delta after since_seq, bounded by count and page bytes.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsLogParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsLogResult"
+ }
+ }
+ },
+ {
+ "name": "groups.peer.invite",
+ "summary": "Mint one target-issued room/profile grant for a prospective room home.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsPeerInviteParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsPeerInviteResult"
+ }
+ }
+ },
+ {
+ "name": "groups.peer.register",
+ "summary": "Register and probe one scoped peer route on the room home.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsPeerRegisterParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsPeerRegisterResult"
+ }
+ }
+ },
+ {
+ "name": "groups.peer.revoke",
+ "summary": "Revoke one target-issued grant using its exact profile scope.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsPeerRevokeParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsPeerRevokeResult"
+ }
+ }
+ },
+ {
+ "name": "groups.promote",
+ "summary": "Continue a replicated room on this gateway at epoch + 1; requires confirm=true.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsPromoteParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsPromoteResult"
+ }
+ }
+ },
+ {
+ "name": "groups.rename",
+ "summary": "Rename one hosted room atomically with its replay event.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsRenameParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsRenameResult"
+ }
+ }
+ },
+ {
+ "name": "groups.replica_state",
+ "summary": "The local replica's coverage and authority lineage for one room.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsReplicaStateParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsReplicaStateResult"
+ }
+ }
+ },
+ {
+ "name": "groups.replicate",
+ "summary": "Persist one authority-stamped replay page into the local replica store; idempotent.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsReplicateParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsReplicateResult"
+ }
+ }
+ },
+ {
+ "name": "groups.retry",
+ "summary": "Retry one indeterminate room task after explicit user confirmation.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsRetryParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsRetryResult"
+ }
+ }
+ },
+ {
+ "name": "groups.send",
+ "summary": "Append one inert message.user event idempotently; the actor is server-owned.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsSendParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsSendResult"
+ }
+ }
+ },
+ {
+ "name": "groups.state",
+ "summary": "One hosted room's replay cursor and fenced authority state, plus live driver status.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsStateParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsStateResult"
+ }
+ }
+ },
+ {
+ "name": "groups.stop",
+ "summary": "Durably cancel queued or running work for one hosted room.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsStopParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/GroupsStopResult"
+ }
+ }
+ },
+ {
+ "name": "handoff.fail",
+ "summary": "Fail a not-yet-claimed handoff (client poll timeout); CAS against the watcher.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/HandoffFailParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/HandoffFailResult"
+ }
+ }
+ },
+ {
+ "name": "handoff.request",
+ "summary": "Queue a handoff to a messaging platform's home channel; the gateway watcher claims it.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/HandoffRequestParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/HandoffRequestResult"
+ }
+ }
+ },
+ {
+ "name": "handoff.state",
+ "summary": "Poll the handoff row for this session.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SessionParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/HandoffStateResult"
+ }
+ }
+ },
+ {
+ "name": "image.attach",
+ "summary": "Queue a gateway-visible image file for the next turn.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ImageAttachParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/AttachedImageResult"
+ }
+ }
+ },
+ {
+ "name": "image.attach_bytes",
+ "summary": "Queue an image uploaded as base64 (remote client); reply mirrors image.attach.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ImageAttachBytesParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/AttachedImageResult"
+ }
+ }
+ },
+ {
+ "name": "image.detach",
+ "summary": "Drop a queued image before the turn is sent.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ImageDetachParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ImageDetachResult"
+ }
+ }
+ },
+ {
+ "name": "image.generate",
+ "summary": "Generate an image through the tool's provider dispatcher and hand the renderer a data URL.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ImageGenerateParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ImageGenerateResult"
+ }
+ }
+ },
+ {
+ "name": "input.detect_drop",
+ "summary": "Recognise a terminal file drop pasted into the composer and turn it into an attachment.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/InputDetectDropParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/InputDetectDropResult"
+ }
+ }
+ },
+ {
+ "name": "insights.get",
+ "summary": "Session/message counts over the last ``days`` for the (optionally scoped) profile store.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/InsightsGetParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/InsightsGetResult"
+ }
+ }
+ },
+ {
+ "name": "learning.delete",
+ "summary": "Archive a skill (restorable via curator) or remove a memory chunk.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/LearningNodeParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/LearningMutationResult"
+ }
+ }
+ },
+ {
+ "name": "learning.detail",
+ "summary": "Node content (SKILL.md or memory chunk) for an edit prefill.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/LearningNodeParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/LearningDetailResult"
+ }
+ }
+ },
+ {
+ "name": "learning.edit",
+ "summary": "Rewrite a node's content (SKILL.md or memory chunk).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/LearningEditParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/LearningMutationResult"
+ }
+ }
+ },
+ {
+ "name": "learning.frames",
+ "summary": "Pre-render the /journey timeline (frames + legend/summary) so the TUI walks it locally.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/LearningFramesParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/LearningFramesResult"
+ }
+ }
+ },
+ {
+ "name": "llm.oneshot",
+ "summary": "Stateless one-shot LLM completion (titles, ideas) on the session's or the task backend.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/LlmOneshotParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/LlmOneshotResult"
+ }
+ }
+ },
+ {
+ "name": "mcp.catalog",
+ "summary": "Curated MCP presets with per-profile installed/enabled state and the env keys each needs.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProfileParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/McpCatalogResult"
+ }
+ }
+ },
+ {
+ "name": "mcp.servers.add",
+ "summary": "Add a server to the profile's config from a catalog preset and/or an explicit config.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/McpServersAddParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/McpServersAddResult"
+ }
+ }
+ },
+ {
+ "name": "mcp.servers.list",
+ "summary": "Configured MCP servers for the (scoped) profile, secrets redacted to env-key names.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProfileParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/McpServersListResult"
+ }
+ }
+ },
+ {
+ "name": "mcp.servers.oauth.callback",
+ "summary": "Relay a client-captured redirect into a client_redirect_uri flow.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/McpOauthCallbackParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/McpOauthCallbackResult"
+ }
+ }
+ },
+ {
+ "name": "mcp.servers.oauth.cancel",
+ "summary": "Cancel a flow owned by the resolved profile, waking its callback worker.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/McpOauthFlowParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/McpOauthCancelResult"
+ }
+ }
+ },
+ {
+ "name": "mcp.servers.oauth.poll",
+ "summary": "Poll a flow; approved persists tokens for the profile and returns the probed tools.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/McpOauthFlowParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/McpOauthPollResult"
+ }
+ }
+ },
+ {
+ "name": "mcp.servers.oauth.start",
+ "summary": "Begin a PKCE OAuth flow; the client opens auth_url and polls mcp.servers.oauth.poll.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/McpOauthStartParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/McpOauthStartResult"
+ }
+ }
+ },
+ {
+ "name": "mcp.servers.remove",
+ "summary": "Drop a server from the profile's config.yaml.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/McpServerNameParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/McpServersRemoveResult"
+ }
+ }
+ },
+ {
+ "name": "mcp.servers.set_api_key",
+ "summary": "Store a credential in the profile's .env and reference it from the server config (header or env).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/McpServersSetApiKeyParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/McpServersSetApiKeyResult"
+ }
+ }
+ },
+ {
+ "name": "mcp.servers.status",
+ "summary": "Cached runtime state per configured server; never connects, probes, or starts auth.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProfileParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/McpServersStatusResult"
+ }
+ }
+ },
+ {
+ "name": "mcp.servers.test",
+ "summary": "Connect, list tools, disconnect \u2014 an OAuth server with no token on disk is reported as not ok.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/McpServerNameParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/McpServersTestResult"
+ }
+ }
+ },
+ {
+ "name": "message.react",
+ "summary": "Set/clear one author's emoji reaction on a message; returns the row's full reaction list.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/MessageReactParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/MessageReactResult"
+ }
+ }
+ },
+ {
+ "name": "model.disconnect",
+ "summary": "Remove every credential (env keys and OAuth state) for a provider.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ModelDisconnectParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ModelDisconnectResult"
+ }
+ }
+ },
+ {
+ "name": "model.options",
+ "summary": "Provider/model inventory for the picker, layered over the session's live provider when given.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ModelOptionsParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ModelOptionsResult"
+ }
+ }
+ },
+ {
+ "name": "model.save_key",
+ "summary": "Save an API key for a provider and return its refreshed inventory row.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ModelSaveKeyParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ModelSaveKeyResult"
+ }
+ }
+ },
+ {
+ "name": "paste.collapse",
+ "summary": "Spill a large paste to a file and hand back the inline placeholder.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/PasteCollapseParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/PasteCollapseResult"
+ }
+ }
+ },
+ {
+ "name": "pdf.attach",
+ "summary": "Render a PDF's pages to PNG and queue them as images for the next turn.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/PdfAttachParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/PdfAttachResult"
+ }
+ }
+ },
+ {
+ "name": "pet.cancel",
+ "summary": "Stop an in-flight pet generate/hatch by token (idempotent).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/PetCancelParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/PetCancelResult"
+ }
+ }
+ },
+ {
+ "name": "pet.cells",
+ "summary": "Half-block cell frames (or a kitty placement) for one pet state.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/PetCellsParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/PetCellsResult"
+ }
+ }
+ },
+ {
+ "name": "pet.disable",
+ "summary": "Turn the pet display off from the desktop picker.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProfileParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/OkResult"
+ }
+ }
+ },
+ {
+ "name": "pet.export",
+ "summary": "Export an installed pet as a re-importable .zip.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/PetSlugParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/PetExportResult"
+ }
+ }
+ },
+ {
+ "name": "pet.gallery",
+ "summary": "Petdex gallery + local install state (installed-only offline); localOnly skips the remote manifest.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/PetGalleryParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/PetGalleryResult"
+ }
+ }
+ },
+ {
+ "name": "pet.generate",
+ "summary": "Candidate base looks for a new pet (draft step); drafts also stream via pet.generate.progress.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/PetGenerateParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/PetGenerateResult"
+ }
+ }
+ },
+ {
+ "name": "pet.generate.status",
+ "summary": "Whether pet generation is possible (a reference-capable image backend) and which providers.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProfileParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/PetGenerateStatusResult"
+ }
+ }
+ },
+ {
+ "name": "pet.hatch",
+ "summary": "Turn a base draft into a full spritesheet pet; progress streams via pet.hatch.progress.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/PetHatchParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/PetHatchResult"
+ }
+ }
+ },
+ {
+ "name": "pet.info",
+ "summary": "Active pet for sprite renderers: spritesheet (base64) + frame geometry + state-row taxonomy.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/PetInfoParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/PetInfoResult"
+ }
+ }
+ },
+ {
+ "name": "pet.info.meta",
+ "summary": "Cheap active-pet metadata used to avoid full payload refreshes.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProfileParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/PetInfoMetaResult"
+ }
+ }
+ },
+ {
+ "name": "pet.remove",
+ "summary": "Uninstall a pet (delete its directory); if it was active, turn the display off.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/PetSlugParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/PetSlugResult"
+ }
+ }
+ },
+ {
+ "name": "pet.rename",
+ "summary": "Rename a pet's display name + realign its slug/dir; follows the active slug in config.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/PetRenameParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/PetSlugResult"
+ }
+ }
+ },
+ {
+ "name": "pet.scale",
+ "summary": "Persist display.pet.scale (clamped to engine bounds) from the desktop slider.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/PetScaleParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/PetScaleResult"
+ }
+ }
+ },
+ {
+ "name": "pet.select",
+ "summary": "Adopt a pet: install (if needed) + activate; writes display.pet.* to config.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/PetSlugParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/PetSlugResult"
+ }
+ }
+ },
+ {
+ "name": "pet.thumb",
+ "summary": "Idle-frame PNG data URI for the picker (desktop CSP breaks CDN <img>).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/PetThumbParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/PetThumbResult"
+ }
+ }
+ },
+ {
+ "name": "ping",
+ "summary": "Cheapest liveness probe; answered on the WS reader thread even while every agent is mid-turn.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/PingParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/PingResult"
+ }
+ }
+ },
+ {
+ "name": "plugins.list",
+ "summary": "Loaded plugin manager entries (legacy flat view); the Plugins Hub uses plugins.manage list.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/PluginsListParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/PluginsListResult"
+ }
+ }
+ },
+ {
+ "name": "plugins.manage",
+ "summary": "Plugins Hub backend: list installed plugins, toggle, git-install or re-pin a catalog install.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/PluginsManageParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/PluginsManageResult"
+ }
+ }
+ },
+ {
+ "name": "preview.restart",
+ "summary": "Spawn a hidden agent that brings the desktop preview's dev server back up.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/PreviewRestartParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/TaskIdResult"
+ }
+ }
+ },
+ {
+ "name": "process.kill",
+ "summary": "Kill one background process the caller's session owns and return its output snapshot.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProcessKillParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ProcessKillResult"
+ }
+ }
+ },
+ {
+ "name": "process.list",
+ "summary": "Background processes owned by the caller's session (desktop status stack poll).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProcessListParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ProcessListResult"
+ }
+ }
+ },
+ {
+ "name": "process.stop",
+ "summary": "Kill every background process in the registry (``/stop``), answering the count killed.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProcessStopParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ProcessStopResult"
+ }
+ }
+ },
+ {
+ "name": "profiles.configure",
+ "summary": "Editor Save: apply any subset of a profile's sections and report each one.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProfilesConfigureParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ProfilesConfigureResult"
+ }
+ }
+ },
+ {
+ "name": "profiles.create",
+ "summary": "Create a profile (ws twin of POST /api/profiles), mirroring launch credentials by default.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProfilesCreateParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ProfilesCreateResult"
+ }
+ }
+ },
+ {
+ "name": "profiles.describe",
+ "summary": "Everything the profile editor shows: soul, model pin, skills, toolsets, MCP servers.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProfileNameParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ProfilesDescribeResult"
+ }
+ }
+ },
+ {
+ "name": "profiles.get_asset",
+ "summary": "A profile asset as a data URL.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProfilesGetAssetParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ProfilesGetAssetResult"
+ }
+ }
+ },
+ {
+ "name": "profiles.list",
+ "summary": "Roster of profiles with previews so a client paints without N follow-up calls.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProfilesListParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ProfilesListResult"
+ }
+ }
+ },
+ {
+ "name": "profiles.remember_onboarding",
+ "summary": "Write the onboarding facts into the default profile's user memory and confirm they landed.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProfilesRememberOnboardingParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ProfilesRememberOnboardingResult"
+ }
+ }
+ },
+ {
+ "name": "profiles.set_asset",
+ "summary": "Store or clear a profile asset (avatar) atomically.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProfilesSetAssetParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ProfilesSetAssetResult"
+ }
+ }
+ },
+ {
+ "name": "project.facts",
+ "summary": "Structured project facts for a cwd so UIs don't re-sniff the workspace.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProjectFactsParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ProjectFactsResult"
+ }
+ }
+ },
+ {
+ "name": "projects.add_folder",
+ "summary": "Attach a folder to a project (optionally as its primary path).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProjectsAddFolderParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ProjectResult"
+ }
+ }
+ },
+ {
+ "name": "projects.archive",
+ "summary": "Archive (or with ``restore`` un-archive) a project; answers the full listing.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProjectsArchiveParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ProjectsPayload"
+ }
+ }
+ },
+ {
+ "name": "projects.create",
+ "summary": "Create a project from a name + folders; duplicate primary paths are refused (5063).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProjectsCreateParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/OptionalProjectResult"
+ }
+ }
+ },
+ {
+ "name": "projects.delete",
+ "summary": "Delete a project and its folders; answers the full listing.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProjectIdParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ProjectsPayload"
+ }
+ }
+ },
+ {
+ "name": "projects.discover_repos",
+ "summary": "Repos for the desktop overview: scanned-from-disk (cached) \u222a session-derived.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProjectsDiscoverReposParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ProjectsDiscoverReposResult"
+ }
+ }
+ },
+ {
+ "name": "projects.for_cwd",
+ "summary": "Which project (if any) owns a directory, plus the resolved cwd and its git branch.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProjectsForCwdParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ProjectsForCwdResult"
+ }
+ }
+ },
+ {
+ "name": "projects.get",
+ "summary": "One stored project with its folders.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProjectIdParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ProjectResult"
+ }
+ }
+ },
+ {
+ "name": "projects.list",
+ "summary": "Every project of the profile (archived included) plus which one is active.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProfileParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ProjectsPayload"
+ }
+ }
+ },
+ {
+ "name": "projects.project_sessions",
+ "summary": "Fully hydrated lanes for one project, from the same grouping as projects.tree.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProjectsProjectSessionsParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ProjectsProjectSessionsResult"
+ }
+ }
+ },
+ {
+ "name": "projects.record_repos",
+ "summary": "Persist repo roots found by the client's (desktop-side) scan; return the merged list.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProjectsRecordReposParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ProjectsRecordReposResult"
+ }
+ }
+ },
+ {
+ "name": "projects.remove_folder",
+ "summary": "Detach a folder from a project.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProjectFolderParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ProjectResult"
+ }
+ }
+ },
+ {
+ "name": "projects.set_active",
+ "summary": "Switch (or clear) the active project for the profile.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProjectsSetActiveParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ActiveIdResult"
+ }
+ }
+ },
+ {
+ "name": "projects.set_primary",
+ "summary": "Make one attached folder the project's primary path.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProjectFolderParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ProjectResult"
+ }
+ }
+ },
+ {
+ "name": "projects.tree",
+ "summary": "Project \u2192 repo \u2192 lane overview with counts and a few preview sessions per project.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProjectsTreeParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ProjectsTreeResult"
+ }
+ }
+ },
+ {
+ "name": "projects.update",
+ "summary": "Patch a project's display fields; answers the refreshed project.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProjectsUpdateParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ProjectResult"
+ }
+ }
+ },
+ {
+ "name": "prompt.background",
+ "summary": "Run a task on a fresh agent in the background; the answer arrives as background.complete.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SideAgentParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/TaskIdResult"
+ }
+ }
+ },
+ {
+ "name": "prompt.btw",
+ "summary": "Side question over a snapshot of the live conversation; the answer arrives as btw.complete.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SideAgentParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/TaskIdResult"
+ }
+ }
+ },
+ {
+ "name": "prompt.submit",
+ "summary": "Send a user turn to a live session; busy sessions queue / steer / redirect instead of refusing.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/PromptSubmitParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/PromptSubmitResult"
+ }
+ }
+ },
+ {
+ "name": "reload.env",
+ "summary": "Re-read ~/.hermes/.env (CLI /reload parity); built agents keep their pool until /new.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ReloadEnvParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ReloadEnvResult"
+ }
+ }
+ },
+ {
+ "name": "reload.mcp",
+ "summary": "Tear down and rediscover MCP servers for every live session (prompt cache is invalidated).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ReloadMcpParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ReloadMcpResult"
+ }
+ }
+ },
+ {
+ "name": "request.answer",
+ "summary": "Answer an open server\u2192client request from a client that never received the frame.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/RequestAnswerParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/RequestAnswerResult"
+ }
+ }
+ },
+ {
+ "name": "rollback.diff",
+ "summary": "Diff between a checkpoint and the working tree, with an ANSI rendering sized to the TUI.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/RollbackDiffParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/RollbackDiffResult"
+ }
+ }
+ },
+ {
+ "name": "rollback.list",
+ "summary": "Checkpoints for the session's cwd; ``enabled: false`` when checkpointing is off.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/RollbackListParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/RollbackListResult"
+ }
+ }
+ },
+ {
+ "name": "rollback.restore",
+ "summary": "Restore the working tree (or one file) to a checkpoint by hash or 1-based index.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/RollbackRestoreParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/RollbackRestoreResult"
+ }
+ }
+ },
+ {
+ "name": "session.activate",
+ "summary": "Attach the frontend to a live session without closing the previously focused one.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SessionActivateParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SessionActivateResult"
+ }
+ }
+ },
+ {
+ "name": "session.active_list",
+ "summary": "Live sessions in this process, insertion order (not a DB browser).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SessionActiveListParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SessionActiveListResult"
+ }
+ }
+ },
+ {
+ "name": "session.branch",
+ "summary": "Fork a live session into a new stored child that shares the parent's history so far.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SessionBranchParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SessionBranchResult"
+ }
+ }
+ },
+ {
+ "name": "session.close",
+ "summary": "Tear down a live session (its stored row stays resumable).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SessionCloseParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SessionCloseResult"
+ }
+ }
+ },
+ {
+ "name": "session.compress",
+ "summary": "Manual /compress of an idle session, optionally focused on a topic.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SessionCompressParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SessionCompressResult"
+ }
+ }
+ },
+ {
+ "name": "session.context_breakdown",
+ "summary": "Cursor-style split of the context window by category.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SessionContextBreakdownParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SessionContextBreakdownResult"
+ }
+ }
+ },
+ {
+ "name": "session.control",
+ "summary": "Run one allowlisted goal / loop / subgoal / heartbeat action and return the exact resulting snapshot.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SessionControlParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SessionControlResult"
+ }
+ }
+ },
+ {
+ "name": "session.control.read",
+ "summary": "Stable, allowlisted snapshot of one live session's goal / loop / heartbeat state.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SessionControlReadParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SessionControlReadResult"
+ }
+ }
+ },
+ {
+ "name": "session.create",
+ "summary": "Mint a live session (agent builds after the reply); a DB row appears on the first prompt unless seeded.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SessionCreateParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SessionCreateResult"
+ }
+ }
+ },
+ {
+ "name": "session.cwd.set",
+ "summary": "Change a live, idle session's working directory.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SessionCwdSetParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SessionCwdSetResult"
+ }
+ }
+ },
+ {
+ "name": "session.delete",
+ "summary": "Delete a stored session + transcripts; refused while it is live here.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SessionDeleteParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SessionDeleteResult"
+ }
+ }
+ },
+ {
+ "name": "session.events.since",
+ "summary": "Replay events after a seq watermark on WS reconnect; truncated means refetch state.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SessionEventsSinceParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SessionEventsSinceResult"
+ }
+ }
+ },
+ {
+ "name": "session.events.stats",
+ "summary": "Replay-buffer occupancy telemetry (ops/debug).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SessionEventsStatsParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SessionEventsStatsResult"
+ }
+ }
+ },
+ {
+ "name": "session.foreign.import",
+ "summary": "Import a foreign session into this profile's history (idempotent per origin).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SessionForeignIdParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SessionForeignImportResult"
+ }
+ }
+ },
+ {
+ "name": "session.foreign.list",
+ "summary": "One page of Claude Code / Codex sessions found on the serving backend.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SessionForeignListParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SessionForeignListResult"
+ }
+ }
+ },
+ {
+ "name": "session.foreign.preview",
+ "summary": "Preview a foreign session's tail before importing it.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SessionForeignIdParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SessionForeignPreviewResult"
+ }
+ }
+ },
+ {
+ "name": "session.history",
+ "summary": "The durable display transcript (ancestors included, row ids attached).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SessionHistoryParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SessionHistoryResult"
+ }
+ }
+ },
+ {
+ "name": "session.interrupt",
+ "summary": "Stop the running turn (and streaming TTS); retires the crash-recovery marker.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SessionInterruptParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SessionInterruptResult"
+ }
+ }
+ },
+ {
+ "name": "session.list",
+ "summary": "Human-facing stored sessions, most recent first (sub-agent / kanban sources denied).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SessionListParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SessionListResult"
+ }
+ }
+ },
+ {
+ "name": "session.most_recent",
+ "summary": "Most recent human-facing session; errors fold into a null session_id.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SessionMostRecentParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SessionMostRecentResult"
+ }
+ }
+ },
+ {
+ "name": "session.redirect",
+ "summary": "Redirect the active turn (queued for the next turn while the agent is still building).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SessionCorrectionParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SessionCorrectionResult"
+ }
+ }
+ },
+ {
+ "name": "session.resume",
+ "summary": "Attach to a stored session: reuse it if live here, else lazy / deferred / cold / eager rebuild.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SessionResumeParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SessionResumeResult"
+ }
+ }
+ },
+ {
+ "name": "session.save",
+ "summary": "Export the transcript to ~/.hermes/sessions/saved (classic /save).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SessionSaveParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SessionSaveResult"
+ }
+ }
+ },
+ {
+ "name": "session.set_hidden",
+ "summary": "Set/clear hidden (out of the default list, still resumable by its owner) on a session + lineage.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SessionSetHiddenParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SessionSetHiddenResult"
+ }
+ }
+ },
+ {
+ "name": "session.status",
+ "summary": "Rendered /status text for the session.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SessionStatusParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SessionStatusResult"
+ }
+ }
+ },
+ {
+ "name": "session.steer",
+ "summary": "Inject text into the next tool result without interrupting the turn.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SessionCorrectionParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SessionCorrectionResult"
+ }
+ }
+ },
+ {
+ "name": "session.title",
+ "summary": "Read or set a live session's title; a title set before the row exists is queued.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SessionTitleParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SessionTitleResult"
+ }
+ }
+ },
+ {
+ "name": "session.undo",
+ "summary": "Drop the last user turn (and everything after it) from an idle session.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SessionUndoParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SessionUndoResult"
+ }
+ }
+ },
+ {
+ "name": "session.usage",
+ "summary": "Token / context / cost counters for the session (+ Nous credit lines when available).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SessionUsageParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SessionUsageResult"
+ }
+ }
+ },
+ {
+ "name": "session.workspace.move",
+ "summary": "Re-home a stored session's workspace; git identity is replaced and a live agent follows.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SessionWorkspaceMoveParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SessionWorkspaceMoveResult"
+ }
+ }
+ },
+ {
+ "name": "setup.runtime_check",
+ "summary": "Strict provider check through the same runtime resolution the agent uses on session creation.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SetupRuntimeCheckParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SetupRuntimeCheckResult"
+ }
+ }
+ },
+ {
+ "name": "setup.status",
+ "summary": "Loose provider check: is ANY provider auth state discoverable for the (launch or named) profile.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProfileParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SetupStatusResult"
+ }
+ }
+ },
+ {
+ "name": "shell.exec",
+ "summary": "Run a safe (non-dangerous) shell command captured for ``!cmd`` / inline substitution.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ShellExecParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ShellExecResult"
+ }
+ }
+ },
+ {
+ "name": "skills.manage",
+ "summary": "Skills hub backend: list the profile's skills or search / browse / inspect / install from the hub.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SkillsManageParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SkillsManageResult"
+ }
+ }
+ },
+ {
+ "name": "skills.reload",
+ "summary": "Re-scan skill dirs; the pre-rendered ``output`` is what /reload-skills prints.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SkillsReloadParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SkillsReloadResult"
+ }
+ }
+ },
+ {
+ "name": "slash.exec",
+ "summary": "Execute a slash command against the session's slash worker (or a live/plugin shortcut).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SlashExecParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SlashExecResult"
+ }
+ }
+ },
+ {
+ "name": "spawn_tree.list",
+ "summary": "Saved spawn-tree snapshots, newest first.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SpawnTreeListParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SpawnTreeListResult"
+ }
+ }
+ },
+ {
+ "name": "spawn_tree.load",
+ "summary": "Read one saved spawn-tree snapshot (path must be under the spawn-trees root).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SpawnTreeLoadParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SpawnTreeLoadResult"
+ }
+ }
+ },
+ {
+ "name": "spawn_tree.save",
+ "summary": "Persist a finished delegation tree snapshot under the session's spawn-trees dir.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SpawnTreeSaveParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SpawnTreeSaveResult"
+ }
+ }
+ },
+ {
+ "name": "subagent.interrupt",
+ "summary": "Hard-interrupt one owned child; ``found`` is false when it already finished.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SubagentIdParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SubagentInterruptResult"
+ }
+ }
+ },
+ {
+ "name": "subagent.list",
+ "summary": "Live children owned by this session (other sessions' children never leak).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SessionParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SubagentListResult"
+ }
+ }
+ },
+ {
+ "name": "subagent.steer",
+ "summary": "Queue steering text into a live delegated child owned by this session.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SubagentSteerParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SubagentSteerResult"
+ }
+ }
+ },
+ {
+ "name": "subagent.tail",
+ "summary": "Last 16KB of an owned child's live transcript.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SubagentIdParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SubagentTailResult"
+ }
+ }
+ },
+ {
+ "name": "subscription.change",
+ "summary": "Schedule a downgrade / same-price change or a period-end cancellation.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SubscriptionChangeParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/BillingPendingChangeResult"
+ }
+ }
+ },
+ {
+ "name": "subscription.preview",
+ "summary": "Chargeless quote of what a plan change would do (billing:manage).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SubscriptionPreviewParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SubscriptionPreviewResult"
+ }
+ }
+ },
+ {
+ "name": "subscription.resume",
+ "summary": "Clear a scheduled downgrade / cancellation (re-enables recurring spend).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProfileParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/BillingPendingChangeResult"
+ }
+ }
+ },
+ {
+ "name": "subscription.state",
+ "summary": "Current plan, tier catalog and usage for the picker; fail-open when logged out.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProfileParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SubscriptionStateResult"
+ }
+ }
+ },
+ {
+ "name": "subscription.upgrade",
+ "summary": "Prorate, charge and flip the plan (billing:manage, idempotent).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SubscriptionUpgradeParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SubscriptionUpgradeResult"
+ }
+ }
+ },
+ {
+ "name": "system.battery",
+ "summary": "Host battery for the status bar; always resolves, ``available: false`` when unreadable.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SystemBatteryParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/SystemBatteryResult"
+ }
+ }
+ },
+ {
+ "name": "terminal.resize",
+ "summary": "Record the client's column width for server-side rendering.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/TerminalResizeParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/TerminalResizeResult"
+ }
+ }
+ },
+ {
+ "name": "tools.configure",
+ "summary": "Persist a toolset / MCP enable-disable change and rebuild the session agent so it takes effect now.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ToolsConfigureParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ToolsConfigureResult"
+ }
+ }
+ },
+ {
+ "name": "tools.list",
+ "summary": "Every toolset with its resolved tool names, flagged against the session's (or config's) enabled set.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/_SessionScoped"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ToolsetsListResult"
+ }
+ }
+ },
+ {
+ "name": "tools.show",
+ "summary": "The /tools listing grouped by toolset, including tools deferred behind the tool_search bridge.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/_SessionScoped"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ToolsShowResult"
+ }
+ }
+ },
+ {
+ "name": "toolsets.list",
+ "summary": "Toolset summaries (no tool names) for the desktop Toolsets tab.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/_SessionScoped"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ToolsetsListResult"
+ }
+ }
+ },
+ {
+ "name": "usage.bars",
+ "summary": "Two-bar dollar usage view shared by /usage, /topup and /subscription; fail-open to unavailable.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProfileParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/UsageModel"
+ }
+ }
+ },
+ {
+ "name": "vault.add",
+ "summary": "Add a login / payment / address item to the local vault.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/VaultAddParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/VaultAddResult"
+ }
+ }
+ },
+ {
+ "name": "vault.list",
+ "summary": "Metadata-only listing across the local vault and every unlocked password manager.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProfileParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/VaultListResult"
+ }
+ }
+ },
+ {
+ "name": "vault.lock",
+ "summary": "Forget a manager's session token (every manager when no name is given).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/VaultLockParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/VaultLockResult"
+ }
+ }
+ },
+ {
+ "name": "vault.remove",
+ "summary": "Remove a local vault item by id.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/VaultRemoveParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/VaultRemoveResult"
+ }
+ }
+ },
+ {
+ "name": "vault.source.set",
+ "summary": "Enable or disable an external password manager (disabling also locks it).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/VaultSourceSetParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/VaultSourceSetResult"
+ }
+ }
+ },
+ {
+ "name": "vault.sources",
+ "summary": "Status of every login source (local vault + detected password managers).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ProfileParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/VaultSourcesResult"
+ }
+ }
+ },
+ {
+ "name": "vault.unlock",
+ "summary": "Unlock a password manager for this session with its master password.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/VaultUnlockParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/VaultUnlockResult"
+ }
+ }
+ },
+ {
+ "name": "verification.status",
+ "summary": "Best known verification evidence for a cwd/session; read-only, never runs checks.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/VerificationStatusParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/VerificationStatusResult"
+ }
+ }
+ },
+ {
+ "name": "voice.record",
+ "summary": "VAD-bounded push-to-talk; the transcript arrives as a voice.transcript event.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/VoiceRecordParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/VoiceRecordResult"
+ }
+ }
+ },
+ {
+ "name": "voice.toggle",
+ "summary": "/voice parity: report, flip voice mode on/off, or toggle speech output.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/VoiceToggleParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/VoiceToggleResult"
+ }
+ }
+ },
+ {
+ "name": "voice.tts",
+ "summary": "Speak text through the backend TTS engine (barge-in aware).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/VoiceTtsParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/VoiceTtsResult"
+ }
+ }
+ },
+ {
+ "name": "wake.feed",
+ "summary": "Push client-captured PCM into the armed detector (mic-less remote backends).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/WakeFeedParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/WakeFeedResult"
+ }
+ }
+ },
+ {
+ "name": "wake.pause",
+ "summary": "Release the mic (e.g. while the desktop's browser captures audio).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/WakeControlParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/WakePauseResult"
+ }
+ }
+ },
+ {
+ "name": "wake.resume",
+ "summary": "Reclaim the mic after a pause; no-op if the listener isn't armed.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/WakeControlParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/WakeResumeResult"
+ }
+ }
+ },
+ {
+ "name": "wake.start",
+ "summary": "Arm the wake-word listener for the calling surface; refusals explain why.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/WakeStartParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/WakeStartResult"
+ }
+ }
+ },
+ {
+ "name": "wake.status",
+ "summary": "Everything a client needs to draw the wake-word state and decide whether to (re)arm.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/WakeStatusParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/WakeStatusResult"
+ }
+ }
+ },
+ {
+ "name": "wake.stop",
+ "summary": "Stop this surface's listener; persist also writes wake_word.enabled: false.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/WakeStopParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/WakeStopResult"
+ }
+ }
+ }
+ ],
+ "components": {
+ "schemas": {
+ "ActiveIdResult": {
+ "additionalProperties": false,
+ "properties": {
+ "active_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Active Id"
+ }
+ },
+ "title": "ActiveIdResult",
+ "type": "object"
+ },
+ "ActiveSubagent": {
+ "additionalProperties": true,
+ "description": "One live child from ``tools/delegate_tool_registry.py::list_active_subagents`` (the record\nis extended by the child runner \u2014 ``missed_steer`` etc. \u2014 so it stays open).",
+ "properties": {
+ "subagent_id": {
+ "title": "Subagent Id",
+ "type": "string"
+ },
+ "parent_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Parent Id"
+ },
+ "depth": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Depth"
+ },
+ "goal": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Goal"
+ },
+ "delegation_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Delegation Id"
+ },
+ "model": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Model"
+ },
+ "started_at": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Started At"
+ },
+ "status": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Status"
+ },
+ "tool_count": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Tool Count"
+ },
+ "owner_agent_session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Owner Agent Session Id"
+ }
+ },
+ "required": [
+ "subagent_id"
+ ],
+ "title": "ActiveSubagent",
+ "type": "object"
+ },
+ "AgentPluginRow": {
+ "additionalProperties": false,
+ "description": "``methods_tools._plugin_rows`` + ``plugins_cmd_catalog.catalog_row_fields`` provenance.",
+ "properties": {
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "key": {
+ "title": "Key",
+ "type": "string"
+ },
+ "version": {
+ "title": "Version",
+ "type": "string"
+ },
+ "description": {
+ "title": "Description",
+ "type": "string"
+ },
+ "source": {
+ "title": "Source",
+ "type": "string"
+ },
+ "status": {
+ "title": "Status",
+ "type": "string"
+ },
+ "portable": {
+ "title": "Portable",
+ "type": "boolean"
+ },
+ "install_dir": {
+ "title": "Install Dir",
+ "type": "string"
+ },
+ "has_desktop_half": {
+ "title": "Has Desktop Half",
+ "type": "boolean"
+ },
+ "catalog_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Catalog Name"
+ },
+ "catalog_tier": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Catalog Tier"
+ },
+ "installed_sha": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Installed Sha"
+ },
+ "catalog_sha": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Catalog Sha"
+ },
+ "update_available": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Update Available"
+ },
+ "pinned_sha": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Pinned Sha"
+ }
+ },
+ "required": [
+ "name",
+ "key",
+ "version",
+ "description",
+ "source",
+ "status",
+ "portable",
+ "install_dir",
+ "has_desktop_half"
+ ],
+ "title": "AgentPluginRow",
+ "type": "object"
+ },
+ "AgentProcessRow": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "command": {
+ "title": "Command",
+ "type": "string"
+ },
+ "status": {
+ "title": "Status",
+ "type": "string"
+ },
+ "uptime": {
+ "title": "Uptime",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "session_id",
+ "command",
+ "status",
+ "uptime"
+ ],
+ "title": "AgentProcessRow",
+ "type": "object"
+ },
+ "AgentsListParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "title": "AgentsListParams",
+ "type": "object"
+ },
+ "AgentsListResult": {
+ "additionalProperties": false,
+ "properties": {
+ "processes": {
+ "items": {
+ "$ref": "#/components/schemas/AgentProcessRow"
+ },
+ "title": "Processes",
+ "type": "array"
+ }
+ },
+ "title": "AgentsListResult",
+ "type": "object"
+ },
+ "ApprovalChoice": {
+ "enum": [
+ "once",
+ "session",
+ "always",
+ "deny"
+ ],
+ "title": "ApprovalChoice",
+ "type": "string"
+ },
+ "ApprovalPendingParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "ApprovalPendingParams",
+ "type": "object"
+ },
+ "ApprovalPendingResult": {
+ "additionalProperties": false,
+ "properties": {
+ "approvals": {
+ "items": {
+ "$ref": "#/components/schemas/PendingApproval"
+ },
+ "title": "Approvals",
+ "type": "array"
+ }
+ },
+ "required": [
+ "approvals"
+ ],
+ "title": "ApprovalPendingResult",
+ "type": "object"
+ },
+ "ApprovalReceivedParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "request_id": {
+ "title": "Request Id",
+ "type": "string"
+ }
+ },
+ "required": [
+ "session_id",
+ "request_id"
+ ],
+ "title": "ApprovalReceivedParams",
+ "type": "object"
+ },
+ "ApprovalReceivedResult": {
+ "additionalProperties": false,
+ "properties": {
+ "acknowledged": {
+ "title": "Acknowledged",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "acknowledged"
+ ],
+ "title": "ApprovalReceivedResult",
+ "type": "object"
+ },
+ "ApprovalRequestParams": {
+ "additionalProperties": true,
+ "description": "``tui_gateway/server.py::_approval_request_payload`` \u2014 the command is redacted server-side.",
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "request_id": {
+ "title": "Request Id",
+ "type": "string"
+ },
+ "command": {
+ "default": "",
+ "title": "Command",
+ "type": "string"
+ },
+ "description": {
+ "default": "",
+ "title": "Description",
+ "type": "string"
+ },
+ "choices": {
+ "items": {
+ "$ref": "#/components/schemas/ApprovalChoice"
+ },
+ "title": "Choices",
+ "type": "array"
+ },
+ "allow_permanent": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Allow Permanent"
+ },
+ "allow_session": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Allow Session"
+ },
+ "smart_denied": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Smart Denied"
+ },
+ "tool_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Tool Name"
+ },
+ "gateway_session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Gateway Session Id"
+ }
+ },
+ "required": [
+ "session_id",
+ "request_id"
+ ],
+ "title": "ApprovalRequestParams",
+ "type": "object"
+ },
+ "ApprovalRespondParams": {
+ "additionalProperties": false,
+ "description": "``choice`` is one of the offered ``approval`` choices (once / session / always / deny); ``all``\nresolves every pending approval, ``request_id`` a specific one, neither the oldest.",
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "choice": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Choice"
+ },
+ "all": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "All"
+ },
+ "request_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Request Id"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "ApprovalRespondParams",
+ "type": "object"
+ },
+ "ApprovalRespondResult": {
+ "additionalProperties": false,
+ "properties": {
+ "resolved": {
+ "title": "Resolved",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "resolved"
+ ],
+ "title": "ApprovalRespondResult",
+ "type": "object"
+ },
+ "ApprovalResult": {
+ "additionalProperties": false,
+ "properties": {
+ "choice": {
+ "$ref": "#/components/schemas/ApprovalChoice"
+ },
+ "all": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "All"
+ }
+ },
+ "required": [
+ "choice"
+ ],
+ "title": "ApprovalResult",
+ "type": "object"
+ },
+ "ArgumentMode": {
+ "enum": [
+ "options",
+ "text",
+ "mixed"
+ ],
+ "title": "ArgumentMode",
+ "type": "string"
+ },
+ "AttachedImageResult": {
+ "additionalProperties": false,
+ "description": "``methods_prompt.py::_attached_image_result``: the image is queued for the next turn.",
+ "properties": {
+ "name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Name"
+ },
+ "width": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Width"
+ },
+ "height": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Height"
+ },
+ "token_estimate": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Token Estimate"
+ },
+ "attached": {
+ "title": "Attached",
+ "type": "boolean"
+ },
+ "path": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Path"
+ },
+ "count": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Count"
+ },
+ "remainder": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Remainder"
+ },
+ "text": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Text"
+ },
+ "bytes": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Bytes"
+ },
+ "message": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Message"
+ }
+ },
+ "required": [
+ "attached"
+ ],
+ "title": "AttachedImageResult",
+ "type": "object"
+ },
+ "AutoContinue": {
+ "additionalProperties": false,
+ "description": "A crash-interrupted turn was scheduled to continue right after this resume.",
+ "properties": {
+ "attempt": {
+ "title": "Attempt",
+ "type": "integer"
+ },
+ "interrupted_at": {
+ "title": "Interrupted At",
+ "type": "number"
+ }
+ },
+ "required": [
+ "attempt",
+ "interrupted_at"
+ ],
+ "title": "AutoContinue",
+ "type": "object"
+ },
+ "AutoReloadCardKind": {
+ "enum": [
+ "canonical",
+ "distinct",
+ "none"
+ ],
+ "title": "AutoReloadCardKind",
+ "type": "string"
+ },
+ "BatteryCategory": {
+ "description": "``agent/battery.py::battery_category`` colour bucket.",
+ "enum": [
+ "good",
+ "warn",
+ "bad",
+ "critical",
+ "dim"
+ ],
+ "title": "BatteryCategory",
+ "type": "string"
+ },
+ "BillingAutoReload": {
+ "additionalProperties": false,
+ "properties": {
+ "enabled": {
+ "title": "Enabled",
+ "type": "boolean"
+ },
+ "threshold_usd": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Threshold Usd"
+ },
+ "threshold_display": {
+ "title": "Threshold Display",
+ "type": "string"
+ },
+ "reload_to_usd": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Reload To Usd"
+ },
+ "reload_to_display": {
+ "title": "Reload To Display",
+ "type": "string"
+ },
+ "card": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/BillingAutoReloadCard"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ }
+ },
+ "required": [
+ "enabled",
+ "threshold_display",
+ "reload_to_display"
+ ],
+ "title": "BillingAutoReload",
+ "type": "object"
+ },
+ "BillingAutoReloadCard": {
+ "additionalProperties": false,
+ "description": "Only ``distinct`` carries the payment-method identity.",
+ "properties": {
+ "kind": {
+ "$ref": "#/components/schemas/AutoReloadCardKind"
+ },
+ "payment_method_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Payment Method Id"
+ },
+ "brand": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Brand"
+ },
+ "last4": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Last4"
+ }
+ },
+ "required": [
+ "kind"
+ ],
+ "title": "BillingAutoReloadCard",
+ "type": "object"
+ },
+ "BillingAutoReloadParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "enabled": {
+ "default": false,
+ "title": "Enabled",
+ "type": "boolean"
+ },
+ "threshold": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Threshold"
+ },
+ "top_up_amount": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Top Up Amount"
+ }
+ },
+ "title": "BillingAutoReloadParams",
+ "type": "object"
+ },
+ "BillingBlock": {
+ "additionalProperties": false,
+ "description": "``agent/billing_links.py::BillingBlock.to_dict`` (+ ``unverified`` from conversation_loop).",
+ "properties": {
+ "provider": {
+ "title": "Provider",
+ "type": "string"
+ },
+ "provider_label": {
+ "title": "Provider Label",
+ "type": "string"
+ },
+ "model": {
+ "title": "Model",
+ "type": "string"
+ },
+ "billing_url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Billing Url"
+ },
+ "is_nous": {
+ "title": "Is Nous",
+ "type": "boolean"
+ },
+ "message": {
+ "title": "Message",
+ "type": "string"
+ },
+ "unverified": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Unverified"
+ }
+ },
+ "required": [
+ "provider",
+ "provider_label",
+ "model",
+ "billing_url",
+ "is_nous",
+ "message"
+ ],
+ "title": "BillingBlock",
+ "type": "object"
+ },
+ "BillingCardInfo": {
+ "additionalProperties": false,
+ "properties": {
+ "brand": {
+ "title": "Brand",
+ "type": "string"
+ },
+ "last4": {
+ "title": "Last4",
+ "type": "string"
+ },
+ "masked": {
+ "title": "Masked",
+ "type": "string"
+ },
+ "display": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Display"
+ },
+ "resolved_via": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Resolved Via"
+ }
+ },
+ "required": [
+ "brand",
+ "last4",
+ "masked"
+ ],
+ "title": "BillingCardInfo",
+ "type": "object"
+ },
+ "BillingChargeParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "amount_usd": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Amount Usd"
+ },
+ "idempotency_key": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Idempotency Key"
+ }
+ },
+ "title": "BillingChargeParams",
+ "type": "object"
+ },
+ "BillingChargeResult": {
+ "additionalProperties": false,
+ "description": "``202 {chargeId}`` \u2014 money is not confirmed yet; poll ``billing.charge_status``.",
+ "properties": {
+ "ok": {
+ "title": "Ok",
+ "type": "boolean"
+ },
+ "error": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Error"
+ },
+ "message": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Message"
+ },
+ "portal_url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Portal Url"
+ },
+ "retry_after": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Retry After"
+ },
+ "payload": {
+ "anyOf": [
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Payload"
+ },
+ "actor": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Actor"
+ },
+ "code": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Code"
+ },
+ "recovery": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Recovery"
+ },
+ "charge_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Charge Id"
+ },
+ "idempotency_key": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Idempotency Key"
+ }
+ },
+ "required": [
+ "ok"
+ ],
+ "title": "BillingChargeResult",
+ "type": "object"
+ },
+ "BillingChargeStatusParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "charge_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Charge Id"
+ }
+ },
+ "title": "BillingChargeStatusParams",
+ "type": "object"
+ },
+ "BillingChargeStatusResult": {
+ "additionalProperties": false,
+ "description": "Single status read (pending | settled | failed); the caller drives the poll cadence.",
+ "properties": {
+ "ok": {
+ "title": "Ok",
+ "type": "boolean"
+ },
+ "error": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Error"
+ },
+ "message": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Message"
+ },
+ "portal_url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Portal Url"
+ },
+ "retry_after": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Retry After"
+ },
+ "payload": {
+ "anyOf": [
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Payload"
+ },
+ "actor": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Actor"
+ },
+ "code": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Code"
+ },
+ "recovery": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Recovery"
+ },
+ "status": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Status"
+ },
+ "amount_usd": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Amount Usd"
+ },
+ "settled_at": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Settled At"
+ },
+ "reason": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Reason"
+ }
+ },
+ "required": [
+ "ok"
+ ],
+ "title": "BillingChargeStatusResult",
+ "type": "object"
+ },
+ "BillingMonthlyCap": {
+ "additionalProperties": false,
+ "properties": {
+ "limit_usd": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Limit Usd"
+ },
+ "limit_display": {
+ "title": "Limit Display",
+ "type": "string"
+ },
+ "spent_this_month_usd": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Spent This Month Usd"
+ },
+ "spent_display": {
+ "title": "Spent Display",
+ "type": "string"
+ },
+ "is_default_ceiling": {
+ "title": "Is Default Ceiling",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "limit_display",
+ "spent_display",
+ "is_default_ceiling"
+ ],
+ "title": "BillingMonthlyCap",
+ "type": "object"
+ },
+ "BillingMutationResult": {
+ "additionalProperties": false,
+ "description": "A write with no success payload beyond ``ok``.",
+ "properties": {
+ "ok": {
+ "title": "Ok",
+ "type": "boolean"
+ },
+ "error": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Error"
+ },
+ "message": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Message"
+ },
+ "portal_url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Portal Url"
+ },
+ "retry_after": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Retry After"
+ },
+ "payload": {
+ "anyOf": [
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Payload"
+ },
+ "actor": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Actor"
+ },
+ "code": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Code"
+ },
+ "recovery": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Recovery"
+ }
+ },
+ "required": [
+ "ok"
+ ],
+ "title": "BillingMutationResult",
+ "type": "object"
+ },
+ "BillingPaymentMethod": {
+ "additionalProperties": false,
+ "description": "``_serialize_payment_method``: each kind emits only its own fields (a ``card`` never carries\n``email``; ``unknown`` carries what the server called it in ``raw_kind``).",
+ "properties": {
+ "kind": {
+ "$ref": "#/components/schemas/PaymentMethodKind"
+ },
+ "brand": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Brand"
+ },
+ "last4": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Last4"
+ },
+ "wallet": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Wallet"
+ },
+ "email": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Email"
+ },
+ "raw_kind": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Raw Kind"
+ },
+ "resolved_via": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Resolved Via"
+ }
+ },
+ "required": [
+ "kind"
+ ],
+ "title": "BillingPaymentMethod",
+ "type": "object"
+ },
+ "BillingPendingChangeResult": {
+ "additionalProperties": false,
+ "description": "``_billing_pending_change``: ``message`` + the raw NAS body in ``payload`` on success.",
+ "properties": {
+ "ok": {
+ "title": "Ok",
+ "type": "boolean"
+ },
+ "error": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Error"
+ },
+ "message": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Message"
+ },
+ "portal_url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Portal Url"
+ },
+ "retry_after": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Retry After"
+ },
+ "payload": {
+ "anyOf": [
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Payload"
+ },
+ "actor": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Actor"
+ },
+ "code": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Code"
+ },
+ "recovery": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Recovery"
+ }
+ },
+ "required": [
+ "ok"
+ ],
+ "title": "BillingPendingChangeResult",
+ "type": "object"
+ },
+ "BillingStateResult": {
+ "additionalProperties": false,
+ "description": "``_serialize_billing_state`` (money as strings); the ``except`` fallback emits only\n``ok / logged_in / free_tier / error``, so everything else is optional.",
+ "properties": {
+ "ok": {
+ "title": "Ok",
+ "type": "boolean"
+ },
+ "logged_in": {
+ "title": "Logged In",
+ "type": "boolean"
+ },
+ "free_tier": {
+ "default": false,
+ "title": "Free Tier",
+ "type": "boolean"
+ },
+ "free_tier_model": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Free Tier Model"
+ },
+ "org_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Org Name"
+ },
+ "org_slug": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Org Slug"
+ },
+ "role": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Role"
+ },
+ "is_admin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Is Admin"
+ },
+ "can_change_plan": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Can Change Plan"
+ },
+ "can_charge": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Can Charge"
+ },
+ "balance_usd": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Balance Usd"
+ },
+ "balance_display": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Balance Display"
+ },
+ "cli_billing_enabled": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cli Billing Enabled"
+ },
+ "charge_presets": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Charge Presets"
+ },
+ "charge_presets_display": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Charge Presets Display"
+ },
+ "min_usd": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Min Usd"
+ },
+ "max_usd": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Max Usd"
+ },
+ "card": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/BillingCardInfo"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "payment_method": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/BillingPaymentMethod"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "monthly_cap": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/BillingMonthlyCap"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "auto_reload": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/BillingAutoReload"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "portal_url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Portal Url"
+ },
+ "error": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Error"
+ },
+ "usage": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/UsageModel"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ }
+ },
+ "required": [
+ "ok",
+ "logged_in"
+ ],
+ "title": "BillingStateResult",
+ "type": "object"
+ },
+ "BillingStepUpParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Session Id"
+ }
+ },
+ "title": "BillingStepUpParams",
+ "type": "object"
+ },
+ "BillingStepUpResult": {
+ "additionalProperties": false,
+ "description": "``granted`` false when the server downscopes (also on every error envelope).",
+ "properties": {
+ "ok": {
+ "title": "Ok",
+ "type": "boolean"
+ },
+ "error": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Error"
+ },
+ "message": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Message"
+ },
+ "portal_url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Portal Url"
+ },
+ "retry_after": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Retry After"
+ },
+ "payload": {
+ "anyOf": [
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Payload"
+ },
+ "actor": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Actor"
+ },
+ "code": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Code"
+ },
+ "recovery": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Recovery"
+ },
+ "granted": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Granted"
+ }
+ },
+ "required": [
+ "ok"
+ ],
+ "title": "BillingStepUpResult",
+ "type": "object"
+ },
+ "BillingStepUpVerificationPayload": {
+ "additionalProperties": false,
+ "description": "``methods_session`` billing.step_up on_verification.",
+ "properties": {
+ "verification_url": {
+ "title": "Verification Url",
+ "type": "string"
+ },
+ "user_code": {
+ "title": "User Code",
+ "type": "string"
+ }
+ },
+ "required": [
+ "verification_url",
+ "user_code"
+ ],
+ "title": "BillingStepUpVerificationPayload",
+ "type": "object"
+ },
+ "BotRelayDeliverParams": {
+ "additionalProperties": false,
+ "description": "``profile`` here is the TARGET profile on this gateway (also what the desktop route wrapper adds).",
+ "properties": {
+ "profile": {
+ "title": "Profile",
+ "type": "string"
+ },
+ "message": {
+ "title": "Message",
+ "type": "string"
+ },
+ "from_profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "From Profile"
+ },
+ "from_handle": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "From Handle"
+ },
+ "from_connection": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "From Connection"
+ }
+ },
+ "required": [
+ "profile",
+ "message"
+ ],
+ "title": "BotRelayDeliverParams",
+ "type": "object"
+ },
+ "BotRelayDeliverResult": {
+ "additionalProperties": false,
+ "properties": {
+ "reply": {
+ "title": "Reply",
+ "type": "string"
+ }
+ },
+ "required": [
+ "reply"
+ ],
+ "title": "BotRelayDeliverResult",
+ "type": "object"
+ },
+ "BotRelayOutboxDrainParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "title": "BotRelayOutboxDrainParams",
+ "type": "object"
+ },
+ "BotRelayOutboxDrainResult": {
+ "additionalProperties": false,
+ "properties": {
+ "envelopes": {
+ "items": {
+ "$ref": "#/components/schemas/RelayEnvelope"
+ },
+ "title": "Envelopes",
+ "type": "array"
+ }
+ },
+ "required": [
+ "envelopes"
+ ],
+ "title": "BotRelayOutboxDrainResult",
+ "type": "object"
+ },
+ "BotRelayReplyParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "id": {
+ "title": "Id",
+ "type": "string"
+ },
+ "reply": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Reply"
+ },
+ "error": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Error"
+ },
+ "reason": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Reason"
+ }
+ },
+ "required": [
+ "id"
+ ],
+ "title": "BotRelayReplyParams",
+ "type": "object"
+ },
+ "BotRelayRosterSyncParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "agents": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/components/schemas/RelayAgentRow"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Agents"
+ }
+ },
+ "title": "BotRelayRosterSyncParams",
+ "type": "object"
+ },
+ "BotRelayRosterSyncResult": {
+ "additionalProperties": false,
+ "properties": {
+ "count": {
+ "title": "Count",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "count"
+ ],
+ "title": "BotRelayRosterSyncResult",
+ "type": "object"
+ },
+ "BrowserAction": {
+ "enum": [
+ "status",
+ "connect",
+ "disconnect"
+ ],
+ "title": "BrowserAction",
+ "type": "string"
+ },
+ "BrowserControllerCancelPayload": {
+ "additionalProperties": false,
+ "description": "``gateway/browser_control_broker.py::_cancel_frame``.",
+ "properties": {
+ "command_id": {
+ "title": "Command Id",
+ "type": "string"
+ },
+ "tool_call_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Tool Call Id"
+ }
+ },
+ "required": [
+ "command_id"
+ ],
+ "title": "BrowserControllerCancelPayload",
+ "type": "object"
+ },
+ "BrowserControllerCommandPayload": {
+ "additionalProperties": false,
+ "description": "``gateway/browser_control_broker.py`` FRAME_COMMAND params.",
+ "properties": {
+ "command_id": {
+ "title": "Command Id",
+ "type": "string"
+ },
+ "action": {
+ "title": "Action",
+ "type": "string"
+ },
+ "arguments": {
+ "additionalProperties": true,
+ "title": "Arguments",
+ "type": "object"
+ },
+ "controller_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Controller Id"
+ },
+ "browser_profile_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Browser Profile Id"
+ },
+ "tool_call_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Tool Call Id"
+ }
+ },
+ "required": [
+ "command_id",
+ "action",
+ "arguments"
+ ],
+ "title": "BrowserControllerCommandPayload",
+ "type": "object"
+ },
+ "BrowserControllerDetachResult": {
+ "additionalProperties": false,
+ "properties": {
+ "detached": {
+ "default": true,
+ "title": "Detached",
+ "type": "boolean"
+ }
+ },
+ "title": "BrowserControllerDetachResult",
+ "type": "object"
+ },
+ "BrowserControllerParams": {
+ "additionalProperties": false,
+ "description": "Every controller call names the session the controller is attached to.",
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "BrowserControllerParams",
+ "type": "object"
+ },
+ "BrowserControllerRegisterParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "controller_id": {
+ "title": "Controller Id",
+ "type": "string"
+ },
+ "browser_profile_id": {
+ "title": "Browser Profile Id",
+ "type": "string"
+ },
+ "capabilities": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Capabilities"
+ },
+ "protocol_version": {
+ "anyOf": [
+ {},
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Protocol Version"
+ },
+ "principal_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Principal Id"
+ }
+ },
+ "required": [
+ "session_id",
+ "controller_id",
+ "browser_profile_id"
+ ],
+ "title": "BrowserControllerRegisterParams",
+ "type": "object"
+ },
+ "BrowserControllerRegisterResult": {
+ "additionalProperties": false,
+ "properties": {
+ "scope": {
+ "$ref": "#/components/schemas/ControllerScope"
+ }
+ },
+ "required": [
+ "scope"
+ ],
+ "title": "BrowserControllerRegisterResult",
+ "type": "object"
+ },
+ "BrowserControllerResultParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "command_id": {
+ "title": "Command Id",
+ "type": "string"
+ },
+ "ok": {
+ "anyOf": [
+ {},
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Ok"
+ },
+ "result": {
+ "anyOf": [
+ {},
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Result"
+ },
+ "error": {
+ "anyOf": [
+ {},
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Error"
+ }
+ },
+ "required": [
+ "session_id",
+ "command_id"
+ ],
+ "title": "BrowserControllerResultParams",
+ "type": "object"
+ },
+ "BrowserControllerResultResult": {
+ "additionalProperties": false,
+ "properties": {
+ "accepted": {
+ "title": "Accepted",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "accepted"
+ ],
+ "title": "BrowserControllerResultResult",
+ "type": "object"
+ },
+ "BrowserManageParams": {
+ "additionalProperties": false,
+ "properties": {
+ "action": {
+ "$ref": "#/components/schemas/BrowserAction",
+ "default": "status"
+ },
+ "url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Url"
+ },
+ "session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Session Id"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "title": "BrowserManageParams",
+ "type": "object"
+ },
+ "BrowserManageResult": {
+ "additionalProperties": false,
+ "properties": {
+ "connected": {
+ "title": "Connected",
+ "type": "boolean"
+ },
+ "url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Url"
+ },
+ "messages": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Messages"
+ }
+ },
+ "required": [
+ "connected"
+ ],
+ "title": "BrowserManageResult",
+ "type": "object"
+ },
+ "BrowserProgressPayload": {
+ "additionalProperties": false,
+ "description": "``methods_browser`` announce(); ``level``: info | warn | error.",
+ "properties": {
+ "message": {
+ "title": "Message",
+ "type": "string"
+ },
+ "level": {
+ "title": "Level",
+ "type": "string"
+ }
+ },
+ "required": [
+ "message",
+ "level"
+ ],
+ "title": "BrowserProgressPayload",
+ "type": "object"
+ },
+ "CapabilityEntry": {
+ "additionalProperties": false,
+ "properties": {
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "enabled": {
+ "default": true,
+ "title": "Enabled",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "title": "CapabilityEntry",
+ "type": "object"
+ },
+ "ChangeSignalPayload": {
+ "additionalProperties": true,
+ "description": "``change_watcher._CHANGE_WATCHES`` payload fn \u2014 ``{}`` for every watch except pet.changed.",
+ "properties": {},
+ "title": "ChangeSignalPayload",
+ "type": "object"
+ },
+ "ClarifyLockParams": {
+ "additionalProperties": false,
+ "properties": {
+ "request_id": {
+ "title": "Request Id",
+ "type": "string"
+ },
+ "question_id": {
+ "title": "Question Id",
+ "type": "string"
+ },
+ "answer": {
+ "default": "",
+ "title": "Answer"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "required": [
+ "request_id",
+ "question_id"
+ ],
+ "title": "ClarifyLockParams",
+ "type": "object"
+ },
+ "ClarifyLockResult": {
+ "additionalProperties": false,
+ "description": "``remaining`` lists the qids still unanswered; the lock that empties it resolves the request.\n``expired``: the wait already ended (timeout / cancel) \u2014 not an error.",
+ "properties": {
+ "status": {
+ "$ref": "#/components/schemas/ClarifyLockStatus"
+ },
+ "remaining": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Remaining"
+ }
+ },
+ "required": [
+ "status"
+ ],
+ "title": "ClarifyLockResult",
+ "type": "object"
+ },
+ "ClarifyLockStatus": {
+ "enum": [
+ "ok",
+ "expired"
+ ],
+ "title": "ClarifyLockStatus",
+ "type": "string"
+ },
+ "ClarifyQuestion": {
+ "additionalProperties": false,
+ "properties": {
+ "qid": {
+ "title": "Qid",
+ "type": "string"
+ },
+ "question": {
+ "title": "Question",
+ "type": "string"
+ },
+ "choices": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Choices"
+ },
+ "multi_select": {
+ "default": false,
+ "title": "Multi Select",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "qid",
+ "question"
+ ],
+ "title": "ClarifyQuestion",
+ "type": "object"
+ },
+ "ClarifyRequestParams": {
+ "additionalProperties": false,
+ "description": "Single question: ``question`` / ``choices`` (/ ``multi_select``); batch: ``questions``.\n``answers`` rides only on a reconnect replay (locks the server already accepted).",
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "question": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Question"
+ },
+ "choices": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Choices"
+ },
+ "multi_select": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Multi Select"
+ },
+ "questions": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/components/schemas/ClarifyQuestion"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Questions"
+ },
+ "answers": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Answers"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "ClarifyRequestParams",
+ "type": "object"
+ },
+ "ClarifyResult": {
+ "additionalProperties": false,
+ "description": "Single: ``{answer}`` ('' = skip). Batch: ``{answers}`` for the whole set (early locks go through\nthe ``clarify.lock`` RPC); a response with neither is cancel-all.",
+ "properties": {
+ "answer": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Answer"
+ },
+ "answers": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Answers"
+ }
+ },
+ "title": "ClarifyResult",
+ "type": "object"
+ },
+ "CliExecParams": {
+ "additionalProperties": false,
+ "properties": {
+ "argv": {
+ "items": {
+ "type": "string"
+ },
+ "title": "Argv",
+ "type": "array"
+ },
+ "timeout": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Timeout"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "required": [
+ "argv"
+ ],
+ "title": "CliExecParams",
+ "type": "object"
+ },
+ "CliExecResult": {
+ "additionalProperties": false,
+ "properties": {
+ "blocked": {
+ "title": "Blocked",
+ "type": "boolean"
+ },
+ "code": {
+ "title": "Code",
+ "type": "integer"
+ },
+ "output": {
+ "title": "Output",
+ "type": "string"
+ },
+ "hint": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Hint"
+ }
+ },
+ "required": [
+ "blocked",
+ "code",
+ "output"
+ ],
+ "title": "CliExecResult",
+ "type": "object"
+ },
+ "ClipboardPasteParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "ClipboardPasteParams",
+ "type": "object"
+ },
+ "CommandCatalogMeta": {
+ "additionalProperties": false,
+ "properties": {
+ "argument_mode": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/ArgumentMode"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "desktop": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Desktop"
+ }
+ },
+ "title": "CommandCatalogMeta",
+ "type": "object"
+ },
+ "CommandCategory": {
+ "additionalProperties": false,
+ "properties": {
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "pairs": {
+ "items": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "title": "Pairs",
+ "type": "array"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "title": "CommandCategory",
+ "type": "object"
+ },
+ "CommandDispatchParams": {
+ "additionalProperties": false,
+ "properties": {
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "arg": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Arg"
+ },
+ "session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Session Id"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "title": "CommandDispatchParams",
+ "type": "object"
+ },
+ "CommandDispatchResult": {
+ "additionalProperties": false,
+ "description": "One structured directive: ``exec``/``plugin`` carry ``output``; ``alias`` a ``target``;\n``send``/``prefill``/``skill`` a ``message`` (UIs render ``display``, never ``message``).",
+ "properties": {
+ "type": {
+ "$ref": "#/components/schemas/DispatchType"
+ },
+ "output": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Output"
+ },
+ "target": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Target"
+ },
+ "message": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Message"
+ },
+ "notice": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Notice"
+ },
+ "display": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Display"
+ },
+ "name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Name"
+ },
+ "status": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Status"
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "title": "CommandDispatchResult",
+ "type": "object"
+ },
+ "CommandResolveParams": {
+ "additionalProperties": false,
+ "properties": {
+ "name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Name"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "title": "CommandResolveParams",
+ "type": "object"
+ },
+ "CommandResolveResult": {
+ "additionalProperties": false,
+ "properties": {
+ "canonical": {
+ "title": "Canonical",
+ "type": "string"
+ },
+ "description": {
+ "title": "Description",
+ "type": "string"
+ },
+ "category": {
+ "title": "Category",
+ "type": "string"
+ }
+ },
+ "required": [
+ "canonical",
+ "description",
+ "category"
+ ],
+ "title": "CommandResolveResult",
+ "type": "object"
+ },
+ "CommandsCatalogParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Session Id"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "title": "CommandsCatalogParams",
+ "type": "object"
+ },
+ "CommandsCatalogResult": {
+ "additionalProperties": false,
+ "properties": {
+ "pairs": {
+ "items": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "title": "Pairs",
+ "type": "array"
+ },
+ "sub": {
+ "additionalProperties": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "title": "Sub",
+ "type": "object"
+ },
+ "canon": {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Canon",
+ "type": "object"
+ },
+ "commands": {
+ "additionalProperties": {
+ "$ref": "#/components/schemas/CommandCatalogMeta"
+ },
+ "title": "Commands",
+ "type": "object"
+ },
+ "categories": {
+ "items": {
+ "$ref": "#/components/schemas/CommandCategory"
+ },
+ "title": "Categories",
+ "type": "array"
+ },
+ "skills": {
+ "additionalProperties": {
+ "$ref": "#/components/schemas/SkillCatalogEntry"
+ },
+ "title": "Skills",
+ "type": "object"
+ },
+ "skill_count": {
+ "default": 0,
+ "title": "Skill Count",
+ "type": "integer"
+ },
+ "warning": {
+ "default": "",
+ "title": "Warning",
+ "type": "string"
+ }
+ },
+ "title": "CommandsCatalogResult",
+ "type": "object"
+ },
+ "CompletePathParams": {
+ "additionalProperties": false,
+ "description": "``word`` is the token under the cursor (``@`` prefix = context reference); ``cwd`` /\n``session_id`` pick the directory the listing resolves against.",
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "word": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Word"
+ },
+ "cwd": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cwd"
+ },
+ "session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Session Id"
+ }
+ },
+ "title": "CompletePathParams",
+ "type": "object"
+ },
+ "CompleteSlashParams": {
+ "additionalProperties": false,
+ "properties": {
+ "text": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Text"
+ }
+ },
+ "title": "CompleteSlashParams",
+ "type": "object"
+ },
+ "CompleteSlashResult": {
+ "additionalProperties": false,
+ "description": "``replace_from`` is the column the accepted item replaces from.",
+ "properties": {
+ "items": {
+ "items": {
+ "$ref": "#/components/schemas/CompletionItem"
+ },
+ "title": "Items",
+ "type": "array"
+ },
+ "replace_from": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Replace From"
+ }
+ },
+ "title": "CompleteSlashResult",
+ "type": "object"
+ },
+ "CompletionItem": {
+ "additionalProperties": false,
+ "description": "One popover row; ``kind`` rides only on slash completions (command vs skill).",
+ "properties": {
+ "text": {
+ "title": "Text",
+ "type": "string"
+ },
+ "display": {
+ "default": "",
+ "title": "Display",
+ "type": "string"
+ },
+ "meta": {
+ "default": "",
+ "title": "Meta",
+ "type": "string"
+ },
+ "kind": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Kind"
+ }
+ },
+ "required": [
+ "text"
+ ],
+ "title": "CompletionItem",
+ "type": "object"
+ },
+ "CompletionItemsResult": {
+ "additionalProperties": false,
+ "properties": {
+ "items": {
+ "items": {
+ "$ref": "#/components/schemas/CompletionItem"
+ },
+ "title": "Items",
+ "type": "array"
+ }
+ },
+ "title": "CompletionItemsResult",
+ "type": "object"
+ },
+ "CompressionSummary": {
+ "additionalProperties": true,
+ "description": "``agent.manual_compression_feedback.summarize_manual_compression``.",
+ "properties": {
+ "noop": {
+ "default": false,
+ "title": "Noop",
+ "type": "boolean"
+ },
+ "aborted": {
+ "default": false,
+ "title": "Aborted",
+ "type": "boolean"
+ },
+ "refused_would_grow": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Refused Would Grow"
+ },
+ "fallback_used": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Fallback Used"
+ },
+ "headline": {
+ "default": "",
+ "title": "Headline",
+ "type": "string"
+ },
+ "token_line": {
+ "default": "",
+ "title": "Token Line",
+ "type": "string"
+ },
+ "note": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Note"
+ }
+ },
+ "title": "CompressionSummary",
+ "type": "object"
+ },
+ "ConfigGetParams": {
+ "additionalProperties": false,
+ "description": "``key`` selects one getter from ``_CONFIG_GETTERS``; ``cwd`` feeds the ``project`` getter,\n``session_id`` lets ``reasoning`` / ``fast`` answer with the session's live pin.",
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "key": {
+ "title": "Key",
+ "type": "string"
+ },
+ "cwd": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cwd"
+ },
+ "session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Session Id"
+ }
+ },
+ "required": [
+ "key"
+ ],
+ "title": "ConfigGetParams",
+ "type": "object"
+ },
+ "ConfigGetResult": {
+ "additionalProperties": false,
+ "description": "Union of every getter's payload: ``value`` for the simple words, ``config`` for ``full``,\n``mtime`` / ``mcp_rev`` for the poller, ``model`` / ``provider`` / ``providers`` for ``provider``,\n``home`` / ``display`` for ``profile``, ``cwd`` / ``branch`` for ``project``, ``prompt``.",
+ "properties": {
+ "value": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Value"
+ },
+ "display": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Display"
+ },
+ "tool_progress": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Tool Progress"
+ },
+ "model": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Model"
+ },
+ "provider": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Provider"
+ },
+ "providers": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/components/schemas/ConfigProviderRef"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Providers"
+ },
+ "home": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Home"
+ },
+ "cwd": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cwd"
+ },
+ "branch": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Branch"
+ },
+ "config": {
+ "anyOf": [
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Config"
+ },
+ "prompt": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Prompt"
+ },
+ "mtime": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Mtime"
+ },
+ "mcp_rev": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Mcp Rev"
+ }
+ },
+ "title": "ConfigGetResult",
+ "type": "object"
+ },
+ "ConfigProviderRef": {
+ "additionalProperties": true,
+ "description": "``hermes_cli/models.py::list_available_providers`` row.",
+ "properties": {
+ "id": {
+ "title": "Id",
+ "type": "string"
+ },
+ "label": {
+ "title": "Label",
+ "type": "string"
+ },
+ "aliases": {
+ "items": {
+ "type": "string"
+ },
+ "title": "Aliases",
+ "type": "array"
+ },
+ "authenticated": {
+ "default": false,
+ "title": "Authenticated",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "id",
+ "label"
+ ],
+ "title": "ConfigProviderRef",
+ "type": "object"
+ },
+ "ConfigSection": {
+ "additionalProperties": false,
+ "properties": {
+ "title": {
+ "title": "Title",
+ "type": "string"
+ },
+ "rows": {
+ "items": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "title": "Rows",
+ "type": "array"
+ }
+ },
+ "required": [
+ "title"
+ ],
+ "title": "ConfigSection",
+ "type": "object"
+ },
+ "ConfigSetParams": {
+ "additionalProperties": false,
+ "description": "``key`` picks the setter (``_CONFIG_SETTERS``, ``details_mode.<section>``, display toggles);\n``value`` is the raw word/string the setter normalises (falsy non-strings are reported back in\nthe error). ``scope`` applies to ``yolo`` / ``reasoning``; ``confirm_expensive_model`` to ``model``.",
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "key": {
+ "title": "Key",
+ "type": "string"
+ },
+ "value": {
+ "default": "",
+ "title": "Value"
+ },
+ "session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Session Id"
+ },
+ "scope": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Scope"
+ },
+ "confirm_expensive_model": {
+ "default": false,
+ "title": "Confirm Expensive Model",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "key"
+ ],
+ "title": "ConfigSetParams",
+ "type": "object"
+ },
+ "ConfigSetResult": {
+ "additionalProperties": false,
+ "description": "``{key, value}`` plus the setter's extras: model switches add ``warning`` /\n``confirm_required`` / ``confirm_message`` / ``scope`` / ``deferred``; ``focus`` adds\n``tool_progress``; ``cwd`` adds ``cwd`` / ``branch``; ``personality`` adds ``history_reset`` /\n``info``; ``yolo`` reports its ``scope``. ``value`` is a bool only for the display toggles.",
+ "properties": {
+ "key": {
+ "title": "Key",
+ "type": "string"
+ },
+ "value": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Value"
+ },
+ "warning": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Warning"
+ },
+ "confirm_required": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Confirm Required"
+ },
+ "confirm_message": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Confirm Message"
+ },
+ "scope": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Scope"
+ },
+ "deferred": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Deferred"
+ },
+ "tool_progress": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Tool Progress"
+ },
+ "cwd": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cwd"
+ },
+ "branch": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Branch"
+ },
+ "history_reset": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "History Reset"
+ },
+ "info": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/SessionLiveInfo"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ }
+ },
+ "required": [
+ "key"
+ ],
+ "title": "ConfigSetResult",
+ "type": "object"
+ },
+ "ConfigShowParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "title": "ConfigShowParams",
+ "type": "object"
+ },
+ "ConfigShowResult": {
+ "additionalProperties": true,
+ "properties": {
+ "sections": {
+ "items": {
+ "$ref": "#/components/schemas/ConfigSection"
+ },
+ "title": "Sections",
+ "type": "array"
+ }
+ },
+ "title": "ConfigShowResult",
+ "type": "object"
+ },
+ "ConnectionActor": {
+ "description": "``tools/connectors/contract.py::Actor``.",
+ "enum": [
+ "user",
+ "renderer_flow",
+ "backend_watcher",
+ "clock"
+ ],
+ "title": "ConnectionActor",
+ "type": "string"
+ },
+ "ConnectionAnswer": {
+ "additionalProperties": false,
+ "description": "The card's answer: per-target outcomes and an optional Continue\n(``settled_by: \"continue\"``). Settlement is derived from target states afterwards.",
+ "properties": {
+ "targets": {
+ "items": {
+ "$ref": "#/components/schemas/ConnectionAnswerTarget"
+ },
+ "title": "Targets",
+ "type": "array"
+ },
+ "settled_by": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/ConnectionSettleReason"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ }
+ },
+ "title": "ConnectionAnswer",
+ "type": "object"
+ },
+ "ConnectionAnswerTarget": {
+ "additionalProperties": true,
+ "description": "One row's answer from the card. ``status`` is what the card observed for that row\n(``tools/connectors/mcp.py::_OUTCOME_STATES`` maps it onto a target state); ``state`` is the\nolder spelling of the same field and one of the two is present.",
+ "properties": {
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "status": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Status"
+ },
+ "state": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "State"
+ },
+ "detail": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Detail"
+ },
+ "tools": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Tools"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "title": "ConnectionAnswerTarget",
+ "type": "object"
+ },
+ "ConnectionOperationParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "op_id": {
+ "title": "Op Id",
+ "type": "string"
+ }
+ },
+ "required": [
+ "session_id",
+ "op_id"
+ ],
+ "title": "ConnectionOperationParams",
+ "type": "object"
+ },
+ "ConnectionOperationStatus": {
+ "additionalProperties": false,
+ "description": "``methods_connectors._operation_view``: the operation's full snapshot.",
+ "properties": {
+ "op_id": {
+ "title": "Op Id",
+ "type": "string"
+ },
+ "deadline_at": {
+ "title": "Deadline At",
+ "type": "number"
+ },
+ "settled": {
+ "title": "Settled",
+ "type": "boolean"
+ },
+ "settled_at": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Settled At"
+ },
+ "settled_by": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/ConnectionSettleReason"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "targets": {
+ "items": {
+ "$ref": "#/components/schemas/ConnectionOperationTarget"
+ },
+ "title": "Targets",
+ "type": "array"
+ }
+ },
+ "required": [
+ "op_id",
+ "deadline_at",
+ "settled",
+ "targets"
+ ],
+ "title": "ConnectionOperationStatus",
+ "type": "object"
+ },
+ "ConnectionOperationTarget": {
+ "additionalProperties": false,
+ "description": "``Target.snapshot``: the link minted up front rides here, never in the model result. ``extra``\nkeys a leg records (``tools``, ``hint``) are typed here as they appear.",
+ "properties": {
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "kind": {
+ "$ref": "#/components/schemas/ConnectionTargetKind"
+ },
+ "action": {
+ "$ref": "#/components/schemas/ConnectionTargetAction"
+ },
+ "state": {
+ "$ref": "#/components/schemas/ConnectionTargetState"
+ },
+ "detail": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Detail"
+ },
+ "connect_url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Connect Url"
+ },
+ "attempt": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Attempt"
+ },
+ "tools": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Tools"
+ },
+ "hint": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Hint"
+ }
+ },
+ "required": [
+ "name",
+ "kind",
+ "action",
+ "state"
+ ],
+ "title": "ConnectionOperationTarget",
+ "type": "object"
+ },
+ "ConnectionRequestPayload": {
+ "additionalProperties": false,
+ "description": "``ConnectionOperation.request_payload``: opens the card; also the ``pending_connection`` resume\nsnapshot so a client that missed the event restores the card with the server's deadline.",
+ "properties": {
+ "op_id": {
+ "title": "Op Id",
+ "type": "string"
+ },
+ "deadline_at": {
+ "title": "Deadline At",
+ "type": "number"
+ },
+ "timeout_seconds": {
+ "title": "Timeout Seconds",
+ "type": "number"
+ },
+ "targets": {
+ "items": {
+ "$ref": "#/components/schemas/ConnectionOperationTarget"
+ },
+ "title": "Targets",
+ "type": "array"
+ },
+ "tool_call_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Tool Call Id"
+ }
+ },
+ "required": [
+ "op_id",
+ "deadline_at",
+ "timeout_seconds",
+ "targets"
+ ],
+ "title": "ConnectionRequestPayload",
+ "type": "object"
+ },
+ "ConnectionRespondParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "op_id": {
+ "title": "Op Id",
+ "type": "string"
+ },
+ "result": {
+ "$ref": "#/components/schemas/ConnectionAnswer"
+ }
+ },
+ "required": [
+ "session_id",
+ "op_id",
+ "result"
+ ],
+ "title": "ConnectionRespondParams",
+ "type": "object"
+ },
+ "ConnectionRespondResult": {
+ "additionalProperties": false,
+ "properties": {
+ "status": {
+ "title": "Status",
+ "type": "string"
+ },
+ "settled": {
+ "title": "Settled",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "status",
+ "settled"
+ ],
+ "title": "ConnectionRespondResult",
+ "type": "object"
+ },
+ "ConnectionSettleReason": {
+ "description": "``tools/connectors/contract.py::SettleReason``.",
+ "enum": [
+ "all_resolved",
+ "continue",
+ "deadline",
+ "interrupt",
+ "unavailable"
+ ],
+ "title": "ConnectionSettleReason",
+ "type": "string"
+ },
+ "ConnectionTargetAction": {
+ "enum": [
+ "authorize",
+ "connect",
+ "enable",
+ "install",
+ "reconnect"
+ ],
+ "title": "ConnectionTargetAction",
+ "type": "string"
+ },
+ "ConnectionTargetKind": {
+ "enum": [
+ "connector",
+ "mcp"
+ ],
+ "title": "ConnectionTargetKind",
+ "type": "string"
+ },
+ "ConnectionTargetState": {
+ "description": "``tools/connectors/contract.py::TargetState``.",
+ "enum": [
+ "pending",
+ "initiated",
+ "connected",
+ "skipped",
+ "failed",
+ "expired",
+ "unavailable",
+ "not_connected"
+ ],
+ "title": "ConnectionTargetState",
+ "type": "string"
+ },
+ "ConnectionUpdatePayload": {
+ "additionalProperties": false,
+ "description": "``methods_connectors._connection_update``: one target transition (``target``/``from``/``to``/\n``actor``) or the settlement (none of those), with the full snapshot.",
+ "properties": {
+ "op_id": {
+ "title": "Op Id",
+ "type": "string"
+ },
+ "deadline_at": {
+ "title": "Deadline At",
+ "type": "number"
+ },
+ "settled": {
+ "title": "Settled",
+ "type": "boolean"
+ },
+ "settled_at": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Settled At"
+ },
+ "settled_by": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/ConnectionSettleReason"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "targets": {
+ "items": {
+ "$ref": "#/components/schemas/ConnectionOperationTarget"
+ },
+ "title": "Targets",
+ "type": "array"
+ },
+ "target": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Target"
+ },
+ "from": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/ConnectionTargetState"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "to": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/ConnectionTargetState"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "actor": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/ConnectionActor"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "detail": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Detail"
+ }
+ },
+ "required": [
+ "op_id",
+ "deadline_at",
+ "settled",
+ "targets"
+ ],
+ "title": "ConnectionUpdatePayload",
+ "type": "object"
+ },
+ "ConnectorRow": {
+ "additionalProperties": true,
+ "description": "One ``manage_connections`` status entry after ``connector_ui_payload`` redaction; the\nconnector service owns the closed key set, so unknown metadata passes through.",
+ "properties": {
+ "connector": {
+ "default": "",
+ "title": "Connector",
+ "type": "string"
+ },
+ "connected": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Connected"
+ },
+ "enabled": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Enabled"
+ },
+ "connectionStatus": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Connectionstatus"
+ },
+ "name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Name"
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Description"
+ }
+ },
+ "title": "ConnectorRow",
+ "type": "object"
+ },
+ "ConnectorsConnectParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "connectors": {
+ "items": {
+ "type": "string"
+ },
+ "title": "Connectors",
+ "type": "array"
+ },
+ "reconnect": {
+ "default": false,
+ "title": "Reconnect",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "session_id",
+ "connectors"
+ ],
+ "title": "ConnectorsConnectParams",
+ "type": "object"
+ },
+ "ConnectorsConnectResult": {
+ "additionalProperties": false,
+ "description": "The operation the connect opened (or re-minted on): ``tools/connectors/managed.py``\n``_off_desktop_result`` / ``methods_connectors._reissue``. ``status``/``note`` ride along from\nthe tool result when the call ran through ``manage_connections``.",
+ "properties": {
+ "op_id": {
+ "title": "Op Id",
+ "type": "string"
+ },
+ "deadline_at": {
+ "title": "Deadline At",
+ "type": "number"
+ },
+ "settled": {
+ "title": "Settled",
+ "type": "boolean"
+ },
+ "settled_at": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Settled At"
+ },
+ "settled_by": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/ConnectionSettleReason"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "targets": {
+ "items": {
+ "$ref": "#/components/schemas/ConnectionOperationTarget"
+ },
+ "title": "Targets",
+ "type": "array"
+ },
+ "status": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Status"
+ },
+ "note": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Note"
+ }
+ },
+ "required": [
+ "op_id",
+ "deadline_at",
+ "settled",
+ "targets"
+ ],
+ "title": "ConnectorsConnectResult",
+ "type": "object"
+ },
+ "ConnectorsListParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "ConnectorsListParams",
+ "type": "object"
+ },
+ "ConnectorsListResult": {
+ "additionalProperties": false,
+ "properties": {
+ "available": {
+ "title": "Available",
+ "type": "boolean"
+ },
+ "connectors": {
+ "items": {
+ "$ref": "#/components/schemas/ConnectorRow"
+ },
+ "title": "Connectors",
+ "type": "array"
+ }
+ },
+ "required": [
+ "available",
+ "connectors"
+ ],
+ "title": "ConnectorsListResult",
+ "type": "object"
+ },
+ "ContextCategory": {
+ "additionalProperties": false,
+ "properties": {
+ "color": {
+ "title": "Color",
+ "type": "string"
+ },
+ "id": {
+ "title": "Id",
+ "type": "string"
+ },
+ "label": {
+ "title": "Label",
+ "type": "string"
+ },
+ "tokens": {
+ "title": "Tokens",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "color",
+ "id",
+ "label",
+ "tokens"
+ ],
+ "title": "ContextCategory",
+ "type": "object"
+ },
+ "ControllerScope": {
+ "additionalProperties": false,
+ "properties": {
+ "principal_id": {
+ "title": "Principal Id",
+ "type": "string"
+ },
+ "profile_id": {
+ "title": "Profile Id",
+ "type": "string"
+ },
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "controller_id": {
+ "title": "Controller Id",
+ "type": "string"
+ },
+ "browser_profile_id": {
+ "title": "Browser Profile Id",
+ "type": "string"
+ },
+ "transport_family": {
+ "title": "Transport Family",
+ "type": "string"
+ },
+ "capabilities": {
+ "items": {
+ "type": "string"
+ },
+ "title": "Capabilities",
+ "type": "array"
+ }
+ },
+ "required": [
+ "principal_id",
+ "profile_id",
+ "session_id",
+ "controller_id",
+ "browser_profile_id",
+ "transport_family",
+ "capabilities"
+ ],
+ "title": "ControllerScope",
+ "type": "object"
+ },
+ "CorrectionStatus": {
+ "enum": [
+ "queued",
+ "redirected",
+ "rejected"
+ ],
+ "title": "CorrectionStatus",
+ "type": "string"
+ },
+ "CronAction": {
+ "enum": [
+ "list",
+ "add",
+ "remove",
+ "pause",
+ "resume"
+ ],
+ "title": "CronAction",
+ "type": "string"
+ },
+ "CronJobRow": {
+ "additionalProperties": true,
+ "description": "``tools/cronjob_job_args.py::_format_job``.",
+ "properties": {
+ "job_id": {
+ "title": "Job Id",
+ "type": "string"
+ },
+ "name": {
+ "default": "",
+ "title": "Name",
+ "type": "string"
+ },
+ "skill": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Skill"
+ },
+ "skills": {
+ "items": {
+ "type": "string"
+ },
+ "title": "Skills",
+ "type": "array"
+ },
+ "prompt_preview": {
+ "default": "",
+ "title": "Prompt Preview",
+ "type": "string"
+ },
+ "model": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Model"
+ },
+ "provider": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Provider"
+ },
+ "base_url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Base Url"
+ },
+ "schedule": {
+ "default": "?",
+ "title": "Schedule",
+ "type": "string"
+ },
+ "repeat": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Repeat"
+ },
+ "deliver": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Deliver"
+ },
+ "next_run_at": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Next Run At"
+ },
+ "last_run_at": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Last Run At"
+ },
+ "last_status": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Last Status"
+ },
+ "last_delivery_error": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Last Delivery Error"
+ },
+ "last_delivery_unverified": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Last Delivery Unverified"
+ },
+ "last_fire_error": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Last Fire Error"
+ },
+ "last_error": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Last Error"
+ },
+ "enabled": {
+ "default": true,
+ "title": "Enabled",
+ "type": "boolean"
+ },
+ "state": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "State"
+ },
+ "paused_at": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Paused At"
+ },
+ "paused_reason": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Paused Reason"
+ },
+ "workdir": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Workdir"
+ },
+ "script": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Script"
+ },
+ "reasoning_effort": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Reasoning Effort"
+ },
+ "monitor_script": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Monitor Script"
+ },
+ "monitor_url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Monitor Url"
+ },
+ "monitor_state": {
+ "anyOf": [
+ {},
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Monitor State"
+ },
+ "no_agent": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "No Agent"
+ },
+ "enabled_toolsets": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Enabled Toolsets"
+ },
+ "continuity": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Continuity"
+ },
+ "context_from": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Context From"
+ },
+ "attach_to_session": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Attach To Session"
+ }
+ },
+ "required": [
+ "job_id"
+ ],
+ "title": "CronJobRow",
+ "type": "object"
+ },
+ "CronManageParams": {
+ "additionalProperties": false,
+ "properties": {
+ "action": {
+ "$ref": "#/components/schemas/CronAction",
+ "default": "list"
+ },
+ "name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Name"
+ },
+ "include_disabled": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Include Disabled"
+ },
+ "schedule": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Schedule"
+ },
+ "prompt": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Prompt"
+ },
+ "repeat": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Repeat"
+ },
+ "continuity": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Continuity"
+ },
+ "deliver": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Deliver"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "title": "CronManageParams",
+ "type": "object"
+ },
+ "CronManageResult": {
+ "additionalProperties": true,
+ "description": "Pass-through of ``tools/cronjob_tools.py::cronjob`` JSON: ``list`` \u2192 ``jobs``/``count``\n(+ ``scoped`` when profile-scoped); ``add`` \u2192 the created job's summary + ``job``; ``remove`` \u2192\n``removed_job``; ``pause``/``resume`` \u2192 ``job``. A tool-level failure lands in ``error``.",
+ "properties": {
+ "success": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Success"
+ },
+ "error": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Error"
+ },
+ "count": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Count"
+ },
+ "jobs": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/components/schemas/CronJobRow"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Jobs"
+ },
+ "scoped": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Scoped"
+ },
+ "gateway_running": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Gateway Running"
+ },
+ "warning": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Warning"
+ },
+ "job_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Job Id"
+ },
+ "name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Name"
+ },
+ "skill": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Skill"
+ },
+ "skills": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Skills"
+ },
+ "schedule": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Schedule"
+ },
+ "repeat": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Repeat"
+ },
+ "deliver": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Deliver"
+ },
+ "next_run_at": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Next Run At"
+ },
+ "job": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/CronJobRow"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "message": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Message"
+ },
+ "guidance": {
+ "anyOf": [
+ {},
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Guidance"
+ },
+ "removed_job": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/CronRemovedJob"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ }
+ },
+ "title": "CronManageResult",
+ "type": "object"
+ },
+ "CronRemovedJob": {
+ "additionalProperties": false,
+ "properties": {
+ "id": {
+ "title": "Id",
+ "type": "string"
+ },
+ "name": {
+ "default": "",
+ "title": "Name",
+ "type": "string"
+ },
+ "schedule": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Schedule"
+ }
+ },
+ "required": [
+ "id"
+ ],
+ "title": "CronRemovedJob",
+ "type": "object"
+ },
+ "CurrentSubscription": {
+ "additionalProperties": false,
+ "properties": {
+ "tier_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Tier Id"
+ },
+ "tier_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Tier Name"
+ },
+ "monthly_credits": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Monthly Credits"
+ },
+ "credits_remaining": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Credits Remaining"
+ },
+ "cycle_ends_at": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cycle Ends At"
+ },
+ "pending_downgrade_tier_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Pending Downgrade Tier Name"
+ },
+ "pending_downgrade_at": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Pending Downgrade At"
+ },
+ "pending_downgrade_display": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Pending Downgrade Display"
+ },
+ "cancel_at_period_end": {
+ "title": "Cancel At Period End",
+ "type": "boolean"
+ },
+ "cancellation_effective_at": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cancellation Effective At"
+ },
+ "cancellation_effective_display": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cancellation Effective Display"
+ }
+ },
+ "required": [
+ "cancel_at_period_end"
+ ],
+ "title": "CurrentSubscription",
+ "type": "object"
+ },
+ "DelegationPauseParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "paused": {
+ "default": true,
+ "title": "Paused",
+ "type": "boolean"
+ }
+ },
+ "title": "DelegationPauseParams",
+ "type": "object"
+ },
+ "DelegationPauseResult": {
+ "additionalProperties": false,
+ "properties": {
+ "paused": {
+ "title": "Paused",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "paused"
+ ],
+ "title": "DelegationPauseResult",
+ "type": "object"
+ },
+ "DelegationStatusResult": {
+ "additionalProperties": false,
+ "properties": {
+ "active": {
+ "items": {
+ "$ref": "#/components/schemas/ActiveSubagent"
+ },
+ "title": "Active",
+ "type": "array"
+ },
+ "paused": {
+ "title": "Paused",
+ "type": "boolean"
+ },
+ "max_spawn_depth": {
+ "title": "Max Spawn Depth",
+ "type": "integer"
+ },
+ "max_concurrent_children": {
+ "title": "Max Concurrent Children",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "active",
+ "paused",
+ "max_spawn_depth",
+ "max_concurrent_children"
+ ],
+ "title": "DelegationStatusResult",
+ "type": "object"
+ },
+ "DiagnosticsShareNousParams": {
+ "additionalProperties": false,
+ "properties": {
+ "error_context": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Error Context"
+ },
+ "extra_files": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Extra Files"
+ },
+ "log_lines": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Log Lines"
+ }
+ },
+ "title": "DiagnosticsShareNousParams",
+ "type": "object"
+ },
+ "DiagnosticsShareNousResult": {
+ "additionalProperties": false,
+ "description": "Structured envelope: ``ok=False`` + ``error`` renders inline instead of failing the RPC.",
+ "properties": {
+ "ok": {
+ "title": "Ok",
+ "type": "boolean"
+ },
+ "view_url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "View Url"
+ },
+ "upload_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Upload Id"
+ },
+ "expires_at": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Expires At"
+ },
+ "error": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Error"
+ }
+ },
+ "required": [
+ "ok"
+ ],
+ "title": "DiagnosticsShareNousResult",
+ "type": "object"
+ },
+ "DiscoveredRepo": {
+ "additionalProperties": false,
+ "description": "``methods_projects._discover_repos_payload`` row: a git root with session totals.",
+ "properties": {
+ "root": {
+ "title": "Root",
+ "type": "string"
+ },
+ "label": {
+ "default": "",
+ "title": "Label",
+ "type": "string"
+ },
+ "sessions": {
+ "default": 0,
+ "title": "Sessions",
+ "type": "integer"
+ },
+ "last_active": {
+ "default": 0.0,
+ "title": "Last Active",
+ "type": "number"
+ }
+ },
+ "required": [
+ "root"
+ ],
+ "title": "DiscoveredRepo",
+ "type": "object"
+ },
+ "DispatchType": {
+ "description": "``apps/shared/src/slash.ts::parseCommandDispatch`` branches on this.",
+ "enum": [
+ "exec",
+ "alias",
+ "plugin",
+ "send",
+ "skill",
+ "prefill"
+ ],
+ "title": "DispatchType",
+ "type": "string"
+ },
++ "DisplayInstallDonePayload": {
++ "additionalProperties": false,
++ "properties": {
++ "profile_key": {
++ "title": "Profile Key",
++ "type": "string"
++ },
++ "code": {
++ "title": "Code",
++ "type": "integer"
++ },
++ "status": {
++ "$ref": "#/components/schemas/DisplayStatus"
++ }
++ },
++ "required": [
++ "profile_key",
++ "code",
++ "status"
++ ],
++ "title": "DisplayInstallDonePayload",
++ "type": "object"
++ },
++ "DisplayInstallLogPayload": {
++ "additionalProperties": false,
++ "properties": {
++ "profile_key": {
++ "title": "Profile Key",
++ "type": "string"
++ },
++ "line": {
++ "title": "Line",
++ "type": "string"
++ }
++ },
++ "required": [
++ "profile_key",
++ "line"
++ ],
++ "title": "DisplayInstallLogPayload",
++ "type": "object"
++ },
++ "DisplayInstallResult": {
++ "additionalProperties": false,
++ "properties": {
++ "started": {
++ "title": "Started",
++ "type": "boolean"
++ },
++ "command": {
++ "anyOf": [
++ {
++ "type": "string"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "default": null,
++ "title": "Command"
++ },
++ "profile_key": {
++ "title": "Profile Key",
++ "type": "string"
++ }
++ },
++ "required": [
++ "started",
++ "profile_key"
++ ],
++ "title": "DisplayInstallResult",
++ "type": "object"
++ },
++ "DisplayInstallSudoParams": {
++ "additionalProperties": false,
++ "properties": {
++ "session_id": {
++ "title": "Session Id",
++ "type": "string"
++ },
++ "profile_key": {
++ "title": "Profile Key",
++ "type": "string"
++ }
++ },
++ "required": [
++ "session_id",
++ "profile_key"
++ ],
++ "title": "DisplayInstallSudoParams",
++ "type": "object"
++ },
++ "DisplayLease": {
++ "additionalProperties": false,
++ "description": "``tools/bot_desktop/lease.py::Lease`` as clients may see it: the holder's viewer id is a\ncapability and never leaves the gateway; ``viewer_hash`` lets the holder recognise itself.",
++ "properties": {
++ "holder": {
++ "$ref": "#/components/schemas/LeaseHolder"
++ },
++ "viewer_id": {
++ "default": null,
++ "title": "Viewer Id",
++ "type": "null"
++ },
++ "viewer_hash": {
++ "anyOf": [
++ {
++ "type": "string"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "default": null,
++ "title": "Viewer Hash"
++ },
++ "since": {
++ "title": "Since",
++ "type": "number"
++ },
++ "epoch": {
++ "title": "Epoch",
++ "type": "integer"
++ },
++ "reason": {
++ "default": "",
++ "title": "Reason",
++ "type": "string"
++ }
++ },
++ "required": [
++ "holder",
++ "since",
++ "epoch"
++ ],
++ "title": "DisplayLease",
++ "type": "object"
++ },
++ "DisplayLeaseAcquireParams": {
++ "additionalProperties": false,
++ "properties": {
++ "profile": {
++ "anyOf": [
++ {
++ "type": "string"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "default": null,
++ "title": "Profile"
++ },
++ "viewer_id": {
++ "title": "Viewer Id",
++ "type": "string"
++ },
++ "reason": {
++ "anyOf": [
++ {
++ "type": "string"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "default": null,
++ "title": "Reason"
++ }
++ },
++ "required": [
++ "viewer_id"
++ ],
++ "title": "DisplayLeaseAcquireParams",
++ "type": "object"
++ },
++ "DisplayLeasePayload": {
++ "additionalProperties": false,
++ "properties": {
++ "profile_key": {
++ "title": "Profile Key",
++ "type": "string"
++ },
++ "lease": {
++ "$ref": "#/components/schemas/DisplayLease"
++ }
++ },
++ "required": [
++ "profile_key",
++ "lease"
++ ],
++ "title": "DisplayLeasePayload",
++ "type": "object"
++ },
++ "DisplayLeaseReleaseParams": {
++ "additionalProperties": false,
++ "properties": {
++ "profile": {
++ "anyOf": [
++ {
++ "type": "string"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "default": null,
++ "title": "Profile"
++ },
++ "viewer_id": {
++ "anyOf": [
++ {
++ "type": "string"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "default": null,
++ "title": "Viewer Id"
++ },
++ "force": {
++ "anyOf": [
++ {
++ "type": "boolean"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "default": null,
++ "title": "Force"
++ }
++ },
++ "title": "DisplayLeaseReleaseParams",
++ "type": "object"
++ },
++ "DisplayLeaseResult": {
++ "additionalProperties": false,
++ "properties": {
++ "lease": {
++ "$ref": "#/components/schemas/DisplayLease"
++ }
++ },
++ "required": [
++ "lease"
++ ],
++ "title": "DisplayLeaseResult",
++ "type": "object"
++ },
++ "DisplayObserveParams": {
++ "additionalProperties": false,
++ "properties": {
++ "profile": {
++ "anyOf": [
++ {
++ "type": "string"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "default": null,
++ "title": "Profile"
++ },
++ "viewer_id": {
++ "anyOf": [
++ {
++ "type": "string"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "default": null,
++ "title": "Viewer Id"
++ }
++ },
++ "title": "DisplayObserveParams",
++ "type": "object"
++ },
++ "DisplayObserveResult": {
++ "additionalProperties": false,
++ "properties": {
++ "profile": {
++ "title": "Profile",
++ "type": "string"
++ },
++ "supported": {
++ "title": "Supported",
++ "type": "boolean"
++ },
++ "installed": {
++ "title": "Installed",
++ "type": "boolean"
++ },
++ "missing": {
++ "items": {
++ "type": "string"
++ },
++ "title": "Missing",
++ "type": "array"
++ },
++ "running": {
++ "title": "Running",
++ "type": "boolean"
++ },
++ "pid": {
++ "anyOf": [
++ {
++ "type": "integer"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "default": null,
++ "title": "Pid"
++ },
++ "display": {
++ "anyOf": [
++ {
++ "type": "string"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "default": null,
++ "title": "Display"
++ },
++ "socket": {
++ "anyOf": [
++ {
++ "type": "string"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "default": null,
++ "title": "Socket"
++ },
++ "geometry": {
++ "title": "Geometry",
++ "type": "string"
++ },
++ "install_command": {
++ "anyOf": [
++ {
++ "type": "string"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "default": null,
++ "title": "Install Command"
++ },
++ "browser": {
++ "anyOf": [
++ {
++ "type": "string"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "default": null,
++ "title": "Browser"
++ },
++ "lease": {
++ "$ref": "#/components/schemas/DisplayLease"
++ },
++ "profile_key": {
++ "title": "Profile Key",
++ "type": "string"
++ },
++ "ticket": {
++ "title": "Ticket",
++ "type": "string"
++ },
++ "path": {
++ "title": "Path",
++ "type": "string"
++ },
++ "viewer_id": {
++ "title": "Viewer Id",
++ "type": "string"
++ }
++ },
++ "required": [
++ "profile",
++ "supported",
++ "installed",
++ "missing",
++ "running",
++ "geometry",
++ "lease",
++ "profile_key",
++ "ticket",
++ "path",
++ "viewer_id"
++ ],
++ "title": "DisplayObserveResult",
++ "type": "object"
++ },
++ "DisplayStatus": {
++ "additionalProperties": false,
++ "description": "``tools/bot_desktop/runtime.py::DesktopStatus`` plus the lease and the profile it speaks for.",
++ "properties": {
++ "profile": {
++ "title": "Profile",
++ "type": "string"
++ },
++ "supported": {
++ "title": "Supported",
++ "type": "boolean"
++ },
++ "installed": {
++ "title": "Installed",
++ "type": "boolean"
++ },
++ "missing": {
++ "items": {
++ "type": "string"
++ },
++ "title": "Missing",
++ "type": "array"
++ },
++ "running": {
++ "title": "Running",
++ "type": "boolean"
++ },
++ "pid": {
++ "anyOf": [
++ {
++ "type": "integer"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "default": null,
++ "title": "Pid"
++ },
++ "display": {
++ "anyOf": [
++ {
++ "type": "string"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "default": null,
++ "title": "Display"
++ },
++ "socket": {
++ "anyOf": [
++ {
++ "type": "string"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "default": null,
++ "title": "Socket"
++ },
++ "geometry": {
++ "title": "Geometry",
++ "type": "string"
++ },
++ "install_command": {
++ "anyOf": [
++ {
++ "type": "string"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "default": null,
++ "title": "Install Command"
++ },
++ "browser": {
++ "anyOf": [
++ {
++ "type": "string"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "default": null,
++ "title": "Browser"
++ },
++ "lease": {
++ "$ref": "#/components/schemas/DisplayLease"
++ },
++ "profile_key": {
++ "title": "Profile Key",
++ "type": "string"
++ }
++ },
++ "required": [
++ "profile",
++ "supported",
++ "installed",
++ "missing",
++ "running",
++ "geometry",
++ "lease",
++ "profile_key"
++ ],
++ "title": "DisplayStatus",
++ "type": "object"
++ },
++ "DisplayStatusPayload": {
++ "additionalProperties": false,
++ "properties": {
++ "profile": {
++ "title": "Profile",
++ "type": "string"
++ },
++ "supported": {
++ "title": "Supported",
++ "type": "boolean"
++ },
++ "installed": {
++ "title": "Installed",
++ "type": "boolean"
++ },
++ "missing": {
++ "items": {
++ "type": "string"
++ },
++ "title": "Missing",
++ "type": "array"
++ },
++ "running": {
++ "title": "Running",
++ "type": "boolean"
++ },
++ "pid": {
++ "anyOf": [
++ {
++ "type": "integer"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "default": null,
++ "title": "Pid"
++ },
++ "display": {
++ "anyOf": [
++ {
++ "type": "string"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "default": null,
++ "title": "Display"
++ },
++ "socket": {
++ "anyOf": [
++ {
++ "type": "string"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "default": null,
++ "title": "Socket"
++ },
++ "geometry": {
++ "title": "Geometry",
++ "type": "string"
++ },
++ "install_command": {
++ "anyOf": [
++ {
++ "type": "string"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "default": null,
++ "title": "Install Command"
++ },
++ "browser": {
++ "anyOf": [
++ {
++ "type": "string"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "default": null,
++ "title": "Browser"
++ },
++ "lease": {
++ "$ref": "#/components/schemas/DisplayLease"
++ },
++ "profile_key": {
++ "title": "Profile Key",
++ "type": "string"
++ }
++ },
++ "required": [
++ "profile",
++ "supported",
++ "installed",
++ "missing",
++ "running",
++ "geometry",
++ "lease",
++ "profile_key"
++ ],
++ "title": "DisplayStatusPayload",
++ "type": "object"
++ },
++ "DisplayStopParams": {
++ "additionalProperties": false,
++ "properties": {
++ "profile": {
++ "anyOf": [
++ {
++ "type": "string"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "default": null,
++ "title": "Profile"
++ },
++ "force": {
++ "anyOf": [
++ {
++ "type": "boolean"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "default": null,
++ "title": "Force"
++ }
++ },
++ "title": "DisplayStopParams",
++ "type": "object"
++ },
++ "DisplayStopResult": {
++ "additionalProperties": false,
++ "properties": {
++ "profile": {
++ "title": "Profile",
++ "type": "string"
++ },
++ "supported": {
++ "title": "Supported",
++ "type": "boolean"
++ },
++ "installed": {
++ "title": "Installed",
++ "type": "boolean"
++ },
++ "missing": {
++ "items": {
++ "type": "string"
++ },
++ "title": "Missing",
++ "type": "array"
++ },
++ "running": {
++ "title": "Running",
++ "type": "boolean"
++ },
++ "pid": {
++ "anyOf": [
++ {
++ "type": "integer"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "default": null,
++ "title": "Pid"
++ },
++ "display": {
++ "anyOf": [
++ {
++ "type": "string"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "default": null,
++ "title": "Display"
++ },
++ "socket": {
++ "anyOf": [
++ {
++ "type": "string"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "default": null,
++ "title": "Socket"
++ },
++ "geometry": {
++ "title": "Geometry",
++ "type": "string"
++ },
++ "install_command": {
++ "anyOf": [
++ {
++ "type": "string"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "default": null,
++ "title": "Install Command"
++ },
++ "browser": {
++ "anyOf": [
++ {
++ "type": "string"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "default": null,
++ "title": "Browser"
++ },
++ "lease": {
++ "$ref": "#/components/schemas/DisplayLease"
++ },
++ "profile_key": {
++ "title": "Profile Key",
++ "type": "string"
++ },
++ "stopped": {
++ "title": "Stopped",
++ "type": "boolean"
++ }
++ },
++ "required": [
++ "profile",
++ "supported",
++ "installed",
++ "missing",
++ "running",
++ "geometry",
++ "lease",
++ "profile_key",
++ "stopped"
++ ],
++ "title": "DisplayStopResult",
++ "type": "object"
++ },
++ "DisplayThumbnailResult": {
++ "additionalProperties": false,
++ "description": "``data_url`` is null while the screen is stopped or while a human holds the lease\n(``suppressed``): the frame may show what they are typing.",
++ "properties": {
++ "data_url": {
++ "anyOf": [
++ {
++ "type": "string"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "default": null,
++ "title": "Data Url"
++ },
++ "suppressed": {
++ "anyOf": [
++ {
++ "type": "string"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "default": null,
++ "title": "Suppressed"
++ }
++ },
++ "title": "DisplayThumbnailResult",
++ "type": "object"
++ },
+ "EmptyRequestParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "EmptyRequestParams",
+ "type": "object"
+ },
+ "ErrorPayload": {
+ "additionalProperties": false,
+ "description": "Every ``_emit(\"error\", \u2026)`` site sets exactly ``message``.",
+ "properties": {
+ "message": {
+ "title": "Message",
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
+ "title": "ErrorPayload",
+ "type": "object"
+ },
+ "ErrorSurface": {
+ "additionalProperties": true,
+ "description": "``agent/error_surface.py::_surface`` \u2014 advisory {layer, code, retryable} (+ identity, + auth hint).",
+ "properties": {
+ "layer": {
+ "title": "Layer",
+ "type": "string"
+ },
+ "code": {
+ "title": "Code",
+ "type": "string"
+ },
+ "retryable": {
+ "title": "Retryable",
+ "type": "boolean"
+ },
+ "provider": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Provider"
+ },
+ "model": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Model"
+ }
+ },
+ "required": [
+ "layer",
+ "code",
+ "retryable"
+ ],
+ "title": "ErrorSurface",
+ "type": "object"
+ },
+ "FileAttachParams": {
+ "additionalProperties": false,
+ "description": "``path`` when the file is gateway-visible, else ``data_url`` carries the bytes; ``name`` labels\nan uploaded file.",
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "path": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Path"
+ },
+ "data_url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Data Url"
+ },
+ "name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Name"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "FileAttachParams",
+ "type": "object"
+ },
+ "FileAttachResult": {
+ "additionalProperties": false,
+ "properties": {
+ "attached": {
+ "title": "Attached",
+ "type": "boolean"
+ },
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "path": {
+ "title": "Path",
+ "type": "string"
+ },
+ "ref_path": {
+ "title": "Ref Path",
+ "type": "string"
+ },
+ "ref_text": {
+ "title": "Ref Text",
+ "type": "string"
+ },
+ "uploaded": {
+ "title": "Uploaded",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "attached",
+ "name",
+ "path",
+ "ref_path",
+ "ref_text",
+ "uploaded"
+ ],
+ "title": "FileAttachResult",
+ "type": "object"
+ },
+ "ForeignSessionRow": {
+ "additionalProperties": false,
+ "description": "``hermes_cli/foreign_sessions_browser.py::list_foreign_sessions`` \u2014 ``id`` is an opaque\nhandle, never a path.",
+ "properties": {
+ "id": {
+ "title": "Id",
+ "type": "string"
+ },
+ "source": {
+ "$ref": "#/components/schemas/ForeignSource"
+ },
+ "label": {
+ "title": "Label",
+ "type": "string"
+ },
+ "title": {
+ "default": "",
+ "title": "Title",
+ "type": "string"
+ },
+ "cwd": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cwd"
+ },
+ "mtime": {
+ "title": "Mtime",
+ "type": "number"
+ },
+ "turn_count": {
+ "default": 0,
+ "title": "Turn Count",
+ "type": "integer"
+ },
+ "excerpt": {
+ "default": "",
+ "title": "Excerpt",
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "source",
+ "label",
+ "mtime"
+ ],
+ "title": "ForeignSessionRow",
+ "type": "object"
+ },
+ "ForeignSource": {
+ "enum": [
+ "claude",
+ "codex"
+ ],
+ "title": "ForeignSource",
+ "type": "string"
+ },
+ "ForeignTurn": {
+ "additionalProperties": false,
+ "properties": {
+ "role": {
+ "title": "Role",
+ "type": "string"
+ },
+ "content": {
+ "title": "Content",
+ "type": "string"
+ }
+ },
+ "required": [
+ "role",
+ "content"
+ ],
+ "title": "ForeignTurn",
+ "type": "object"
+ },
+ "FreeTierAckNoticeResult": {
+ "additionalProperties": false,
+ "properties": {
+ "acked": {
+ "title": "Acked",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "acked"
+ ],
+ "title": "FreeTierAckNoticeResult",
+ "type": "object"
+ },
+ "FreeTierProvisionResult": {
+ "additionalProperties": false,
+ "properties": {
+ "has_guest": {
+ "title": "Has Guest",
+ "type": "boolean"
+ },
+ "enabled": {
+ "title": "Enabled",
+ "type": "boolean"
+ },
+ "error": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Error"
+ }
+ },
+ "required": [
+ "has_guest",
+ "enabled"
+ ],
+ "title": "FreeTierProvisionResult",
+ "type": "object"
+ },
+ "FreeTierStatusResult": {
+ "additionalProperties": false,
+ "description": "``available`` = an identity exists AND the tier is on; whether inference runs on it is\n``setup.runtime_check.free_tier``'s question.",
+ "properties": {
+ "has_guest": {
+ "title": "Has Guest",
+ "type": "boolean"
+ },
+ "enabled": {
+ "title": "Enabled",
+ "type": "boolean"
+ },
+ "available": {
+ "title": "Available",
+ "type": "boolean"
+ },
+ "notice_pending": {
+ "title": "Notice Pending",
+ "type": "boolean"
+ },
+ "model": {
+ "title": "Model",
+ "type": "string"
+ },
+ "label": {
+ "title": "Label",
+ "type": "string"
+ }
+ },
+ "required": [
+ "has_guest",
+ "enabled",
+ "available",
+ "notice_pending",
+ "model",
+ "label"
+ ],
+ "title": "FreeTierStatusResult",
+ "type": "object"
+ },
+ "GatewayCapabilitiesResult": {
+ "additionalProperties": false,
+ "properties": {
+ "per_session_exclusive_submit": {
+ "title": "Per Session Exclusive Submit",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "per_session_exclusive_submit"
+ ],
+ "title": "GatewayCapabilitiesResult",
+ "type": "object"
+ },
+ "GatewayReadyPayload": {
+ "additionalProperties": false,
+ "description": "``tui_gateway/entry.py`` (stdio) / ``tui_gateway/ws.py`` (WebSocket) first frame.",
+ "properties": {
+ "skin": {
+ "$ref": "#/components/schemas/SkinPayload"
+ },
+ "change_events": {
+ "title": "Change Events",
+ "type": "boolean"
+ },
+ "replay_epoch": {
+ "title": "Replay Epoch",
+ "type": "string"
+ },
+ "heartbeat": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Heartbeat"
+ }
+ },
+ "required": [
+ "skin",
+ "change_events",
+ "replay_epoch"
+ ],
+ "title": "GatewayReadyPayload",
+ "type": "object"
+ },
+ "GoalContractSnapshot": {
+ "additionalProperties": false,
+ "description": "``hermes_cli/goals.py::GoalContract.to_dict``.",
+ "properties": {
+ "outcome": {
+ "default": "",
+ "title": "Outcome",
+ "type": "string"
+ },
+ "verification": {
+ "default": "",
+ "title": "Verification",
+ "type": "string"
+ },
+ "constraints": {
+ "default": "",
+ "title": "Constraints",
+ "type": "string"
+ },
+ "boundaries": {
+ "default": "",
+ "title": "Boundaries",
+ "type": "string"
+ },
+ "stop_when": {
+ "default": "",
+ "title": "Stop When",
+ "type": "string"
+ }
+ },
+ "title": "GoalContractSnapshot",
+ "type": "object"
+ },
+ "GoalGateSnapshot": {
+ "additionalProperties": false,
+ "properties": {
+ "command": {
+ "title": "Command",
+ "type": "string"
+ },
+ "timeout_seconds": {
+ "title": "Timeout Seconds",
+ "type": "integer"
+ },
+ "max_retries": {
+ "title": "Max Retries",
+ "type": "integer"
+ },
+ "attempts": {
+ "title": "Attempts",
+ "type": "integer"
+ },
+ "last_exit_code": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Last Exit Code"
+ }
+ },
+ "required": [
+ "command",
+ "timeout_seconds",
+ "max_retries",
+ "attempts"
+ ],
+ "title": "GoalGateSnapshot",
+ "type": "object"
+ },
+ "GoalSnapshot": {
+ "additionalProperties": false,
+ "description": "``methods_session_control.py::_safe_goal_snapshot`` \u2014 the frontend-safe GoalState subset.",
+ "properties": {
+ "title": {
+ "title": "Title",
+ "type": "string"
+ },
+ "status": {
+ "title": "Status",
+ "type": "string"
+ },
+ "turns_used": {
+ "title": "Turns Used",
+ "type": "integer"
+ },
+ "max_turns": {
+ "title": "Max Turns",
+ "type": "integer"
+ },
+ "contract": {
+ "$ref": "#/components/schemas/GoalContractSnapshot"
+ },
+ "subgoals": {
+ "items": {
+ "type": "string"
+ },
+ "title": "Subgoals",
+ "type": "array"
+ },
+ "gates": {
+ "items": {
+ "$ref": "#/components/schemas/GoalGateSnapshot"
+ },
+ "title": "Gates",
+ "type": "array"
+ },
+ "created_at": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Created At"
+ },
+ "updated_at": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Updated At"
+ },
+ "paused_reason": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Paused Reason"
+ },
+ "last_verdict": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Last Verdict"
+ },
+ "last_reason": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Last Reason"
+ },
+ "wait_barrier": {
+ "anyOf": [
+ {
+ "discriminator": {
+ "mapping": {
+ "pid": "#/components/schemas/WaitBarrierTarget",
+ "session": "#/components/schemas/WaitBarrierTarget",
+ "until": "#/components/schemas/WaitBarrierUntil"
+ },
+ "propertyName": "type"
+ },
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/WaitBarrierUntil"
+ },
+ {
+ "$ref": "#/components/schemas/WaitBarrierTarget"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Wait Barrier"
+ }
+ },
+ "required": [
+ "title",
+ "status",
+ "turns_used",
+ "max_turns",
+ "contract",
+ "subgoals",
+ "gates"
+ ],
+ "title": "GoalSnapshot",
+ "type": "object"
+ },
+ "GroupsApproveParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "room_id": {
+ "title": "Room Id",
+ "type": "string"
+ },
+ "member_id": {
+ "title": "Member Id",
+ "type": "string"
+ },
+ "task_id": {
+ "title": "Task Id",
+ "type": "string"
+ },
+ "execution_generation": {
+ "title": "Execution Generation",
+ "type": "integer"
+ },
+ "choice": {
+ "$ref": "#/components/schemas/ApprovalChoice"
+ },
+ "request_id": {
+ "title": "Request Id",
+ "type": "string"
+ }
+ },
+ "required": [
+ "room_id",
+ "member_id",
+ "task_id",
+ "execution_generation",
+ "choice",
+ "request_id"
+ ],
+ "title": "GroupsApproveParams",
+ "type": "object"
+ },
+ "GroupsApproveResult": {
+ "additionalProperties": false,
+ "description": "``result`` is the local ``approval.respond`` answer or the peer's run-action receipt.",
+ "properties": {
+ "approved": {
+ "default": true,
+ "title": "Approved",
+ "type": "boolean"
+ },
+ "result": {
+ "additionalProperties": true,
+ "title": "Result",
+ "type": "object"
+ }
+ },
+ "required": [
+ "result"
+ ],
+ "title": "GroupsApproveResult",
+ "type": "object"
+ },
+ "GroupsCapabilitiesParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "title": "GroupsCapabilitiesParams",
+ "type": "object"
+ },
+ "GroupsCapabilitiesResult": {
+ "additionalProperties": false,
+ "properties": {
+ "protocol_version": {
+ "title": "Protocol Version",
+ "type": "integer"
+ },
+ "driver": {
+ "title": "Driver",
+ "type": "boolean"
+ },
+ "persistent_process": {
+ "title": "Persistent Process",
+ "type": "boolean"
+ },
+ "authority_gateway_id": {
+ "title": "Authority Gateway Id",
+ "type": "string"
+ },
+ "room_link": {
+ "$ref": "#/components/schemas/RoomLinkStatus"
+ },
+ "features": {
+ "items": {
+ "type": "string"
+ },
+ "title": "Features",
+ "type": "array"
+ },
+ "methods": {
+ "items": {
+ "type": "string"
+ },
+ "title": "Methods",
+ "type": "array"
+ },
+ "max_log_limit": {
+ "title": "Max Log Limit",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "protocol_version",
+ "driver",
+ "persistent_process",
+ "authority_gateway_id",
+ "room_link",
+ "features",
+ "methods",
+ "max_log_limit"
+ ],
+ "title": "GroupsCapabilitiesResult",
+ "type": "object"
+ },
+ "GroupsCreateParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "room_id": {
+ "title": "Room Id",
+ "type": "string"
+ },
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "members": {
+ "items": {
+ "$ref": "#/components/schemas/RoomMemberInput"
+ },
+ "title": "Members",
+ "type": "array"
+ },
+ "authority_gateway_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Authority Gateway Id"
+ }
+ },
+ "required": [
+ "room_id",
+ "name",
+ "members"
+ ],
+ "title": "GroupsCreateParams",
+ "type": "object"
+ },
+ "GroupsCreateResult": {
+ "additionalProperties": false,
+ "properties": {
+ "room": {
+ "$ref": "#/components/schemas/Room"
+ }
+ },
+ "required": [
+ "room"
+ ],
+ "title": "GroupsCreateResult",
+ "type": "object"
+ },
+ "GroupsDemoteParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "room_id": {
+ "title": "Room Id",
+ "type": "string"
+ },
+ "observed_gateway_id": {
+ "title": "Observed Gateway Id",
+ "type": "string"
+ },
+ "observed_epoch": {
+ "title": "Observed Epoch",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "room_id",
+ "observed_gateway_id",
+ "observed_epoch"
+ ],
+ "title": "GroupsDemoteParams",
+ "type": "object"
+ },
+ "GroupsDemoteResult": {
+ "additionalProperties": false,
+ "properties": {
+ "room_id": {
+ "title": "Room Id",
+ "type": "string"
+ },
+ "authority_gateway_id": {
+ "title": "Authority Gateway Id",
+ "type": "string"
+ },
+ "authority_epoch": {
+ "title": "Authority Epoch",
+ "type": "integer"
+ },
+ "idempotent": {
+ "title": "Idempotent",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "room_id",
+ "authority_gateway_id",
+ "authority_epoch",
+ "idempotent"
+ ],
+ "title": "GroupsDemoteResult",
+ "type": "object"
+ },
+ "GroupsDisbandParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "room_id": {
+ "title": "Room Id",
+ "type": "string"
+ },
+ "cancel_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cancel Id"
+ }
+ },
+ "required": [
+ "room_id"
+ ],
+ "title": "GroupsDisbandParams",
+ "type": "object"
+ },
+ "GroupsDisbandResult": {
+ "additionalProperties": false,
+ "properties": {
+ "tombstone": {
+ "$ref": "#/components/schemas/RoomTombstone"
+ }
+ },
+ "required": [
+ "tombstone"
+ ],
+ "title": "GroupsDisbandResult",
+ "type": "object"
+ },
+ "GroupsListParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "include_disbanded": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Include Disbanded"
+ },
+ "limit": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Limit"
+ },
+ "offset": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Offset"
+ }
+ },
+ "title": "GroupsListParams",
+ "type": "object"
+ },
+ "GroupsListResult": {
+ "additionalProperties": false,
+ "properties": {
+ "rooms": {
+ "items": {
+ "$ref": "#/components/schemas/Room"
+ },
+ "title": "Rooms",
+ "type": "array"
+ },
+ "next_offset": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Next Offset"
+ }
+ },
+ "required": [
+ "rooms"
+ ],
+ "title": "GroupsListResult",
+ "type": "object"
+ },
+ "GroupsLogParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "room_id": {
+ "title": "Room Id",
+ "type": "string"
+ },
+ "since_seq": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Since Seq"
+ },
+ "limit": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Limit"
+ },
+ "include_disbanded": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Include Disbanded"
+ }
+ },
+ "required": [
+ "room_id"
+ ],
+ "title": "GroupsLogParams",
+ "type": "object"
+ },
+ "GroupsLogResult": {
+ "additionalProperties": false,
+ "description": "``gateway/hosted_rooms.py::read_events`` page \u2014 also the ``page`` ``groups.replicate`` ingests.",
+ "properties": {
+ "events": {
+ "items": {
+ "$ref": "#/components/schemas/RoomEvent"
+ },
+ "title": "Events",
+ "type": "array"
+ },
+ "cursor": {
+ "title": "Cursor",
+ "type": "integer"
+ },
+ "latest_seq": {
+ "title": "Latest Seq",
+ "type": "integer"
+ },
+ "has_more": {
+ "title": "Has More",
+ "type": "boolean"
+ },
+ "authority": {
+ "$ref": "#/components/schemas/RoomAuthority"
+ }
+ },
+ "required": [
+ "events",
+ "cursor",
+ "latest_seq",
+ "has_more",
+ "authority"
+ ],
+ "title": "GroupsLogResult",
+ "type": "object"
+ },
+ "GroupsPeerInviteParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "room_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Room Id"
+ },
+ "home_install_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Home Install Id"
+ },
+ "authority_gateway_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Authority Gateway Id"
+ },
+ "authority_epoch": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Authority Epoch"
+ },
+ "member_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Member Id"
+ },
+ "grant_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Grant Id"
+ },
+ "ttl_seconds": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Ttl Seconds"
+ }
+ },
+ "title": "GroupsPeerInviteParams",
+ "type": "object"
+ },
+ "GroupsPeerInviteResult": {
+ "additionalProperties": false,
+ "properties": {
+ "grant": {
+ "title": "Grant",
+ "type": "string"
+ },
+ "target_profile": {
+ "title": "Target Profile",
+ "type": "string"
+ },
+ "catalog": {
+ "$ref": "#/components/schemas/RoomLinkCatalog"
+ },
+ "endpoint": {
+ "$ref": "#/components/schemas/RoomLinkEndpoint"
+ }
+ },
+ "required": [
+ "grant",
+ "target_profile",
+ "catalog",
+ "endpoint"
+ ],
+ "title": "GroupsPeerInviteResult",
+ "type": "object"
+ },
+ "GroupsPeerRegisterParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "room_id": {
+ "title": "Room Id",
+ "type": "string"
+ },
+ "member_id": {
+ "title": "Member Id",
+ "type": "string"
+ },
+ "target_url": {
+ "title": "Target Url",
+ "type": "string"
+ },
+ "target_profile": {
+ "title": "Target Profile",
+ "type": "string"
+ },
+ "grant": {
+ "title": "Grant",
+ "type": "string"
+ },
+ "catalog": {
+ "additionalProperties": true,
+ "title": "Catalog",
+ "type": "object"
+ },
+ "cancellation_scope_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cancellation Scope Id"
+ },
+ "trace_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Trace Id"
+ }
+ },
+ "required": [
+ "room_id",
+ "member_id",
+ "target_url",
+ "target_profile",
+ "grant",
+ "catalog"
+ ],
+ "title": "GroupsPeerRegisterParams",
+ "type": "object"
+ },
+ "GroupsPeerRegisterResult": {
+ "additionalProperties": false,
+ "properties": {
+ "registered": {
+ "default": true,
+ "title": "Registered",
+ "type": "boolean"
+ },
+ "mode": {
+ "title": "Mode",
+ "type": "string"
+ },
+ "transport_security": {
+ "title": "Transport Security",
+ "type": "string"
+ },
+ "target_install_id": {
+ "title": "Target Install Id",
+ "type": "string"
+ },
+ "target_profile": {
+ "title": "Target Profile",
+ "type": "string"
+ }
+ },
+ "required": [
+ "mode",
+ "transport_security",
+ "target_install_id",
+ "target_profile"
+ ],
+ "title": "GroupsPeerRegisterResult",
+ "type": "object"
+ },
+ "GroupsPeerRevokeParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "grant": {
+ "title": "Grant",
+ "type": "string"
+ }
+ },
+ "required": [
+ "grant"
+ ],
+ "title": "GroupsPeerRevokeParams",
+ "type": "object"
+ },
+ "GroupsPeerRevokeResult": {
+ "additionalProperties": false,
+ "properties": {
+ "revoked": {
+ "default": true,
+ "title": "Revoked",
+ "type": "boolean"
+ }
+ },
+ "title": "GroupsPeerRevokeResult",
+ "type": "object"
+ },
+ "GroupsPromoteParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "room_id": {
+ "title": "Room Id",
+ "type": "string"
+ },
+ "confirm": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Confirm"
+ },
+ "reason": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Reason"
+ }
+ },
+ "required": [
+ "room_id"
+ ],
+ "title": "GroupsPromoteParams",
+ "type": "object"
+ },
+ "GroupsPromoteResult": {
+ "additionalProperties": false,
+ "properties": {
+ "room_id": {
+ "title": "Room Id",
+ "type": "string"
+ },
+ "authority_gateway_id": {
+ "title": "Authority Gateway Id",
+ "type": "string"
+ },
+ "authority_epoch": {
+ "title": "Authority Epoch",
+ "type": "integer"
+ },
+ "previous_gateway_id": {
+ "title": "Previous Gateway Id",
+ "type": "string"
+ },
+ "previous_epoch": {
+ "title": "Previous Epoch",
+ "type": "integer"
+ },
+ "claim_seq": {
+ "title": "Claim Seq",
+ "type": "integer"
+ },
+ "latest_seq": {
+ "title": "Latest Seq",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "room_id",
+ "authority_gateway_id",
+ "authority_epoch",
+ "previous_gateway_id",
+ "previous_epoch",
+ "claim_seq",
+ "latest_seq"
+ ],
+ "title": "GroupsPromoteResult",
+ "type": "object"
+ },
+ "GroupsRenameParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "room_id": {
+ "title": "Room Id",
+ "type": "string"
+ },
+ "event_id": {
+ "title": "Event Id",
+ "type": "string"
+ },
+ "name": {
+ "title": "Name",
+ "type": "string"
+ }
+ },
+ "required": [
+ "room_id",
+ "event_id",
+ "name"
+ ],
+ "title": "GroupsRenameParams",
+ "type": "object"
+ },
+ "GroupsRenameResult": {
+ "additionalProperties": false,
+ "properties": {
+ "room": {
+ "$ref": "#/components/schemas/Room"
+ }
+ },
+ "required": [
+ "room"
+ ],
+ "title": "GroupsRenameResult",
+ "type": "object"
+ },
+ "GroupsReplicaStateParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "room_id": {
+ "title": "Room Id",
+ "type": "string"
+ }
+ },
+ "required": [
+ "room_id"
+ ],
+ "title": "GroupsReplicaStateParams",
+ "type": "object"
+ },
+ "GroupsReplicaStateResult": {
+ "additionalProperties": false,
+ "properties": {
+ "room_id": {
+ "title": "Room Id",
+ "type": "string"
+ },
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "members": {
+ "items": {
+ "$ref": "#/components/schemas/RoomMember"
+ },
+ "title": "Members",
+ "type": "array"
+ },
+ "authority": {
+ "$ref": "#/components/schemas/RoomAuthority"
+ },
+ "last_seq": {
+ "title": "Last Seq",
+ "type": "integer"
+ },
+ "latest_seq": {
+ "title": "Latest Seq",
+ "type": "integer"
+ },
+ "event_bytes": {
+ "title": "Event Bytes",
+ "type": "integer"
+ },
+ "created_at": {
+ "title": "Created At",
+ "type": "number"
+ },
+ "updated_at": {
+ "title": "Updated At",
+ "type": "number"
+ }
+ },
+ "required": [
+ "room_id",
+ "name",
+ "members",
+ "authority",
+ "last_seq",
+ "latest_seq",
+ "event_bytes",
+ "created_at",
+ "updated_at"
+ ],
+ "title": "GroupsReplicaStateResult",
+ "type": "object"
+ },
+ "GroupsReplicateParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "room_id": {
+ "title": "Room Id",
+ "type": "string"
+ },
+ "room_name": {
+ "title": "Room Name",
+ "type": "string"
+ },
+ "members": {
+ "items": {
+ "$ref": "#/components/schemas/RoomMemberInput"
+ },
+ "title": "Members",
+ "type": "array"
+ },
+ "page": {
+ "additionalProperties": true,
+ "title": "Page",
+ "type": "object"
+ }
+ },
+ "required": [
+ "room_id",
+ "room_name",
+ "members",
+ "page"
+ ],
+ "title": "GroupsReplicateParams",
+ "type": "object"
+ },
+ "GroupsReplicateResult": {
+ "additionalProperties": false,
+ "properties": {
+ "room_id": {
+ "title": "Room Id",
+ "type": "string"
+ },
+ "stored_seq": {
+ "title": "Stored Seq",
+ "type": "integer"
+ },
+ "ingested": {
+ "title": "Ingested",
+ "type": "integer"
+ },
+ "authority": {
+ "$ref": "#/components/schemas/RoomAuthority"
+ },
+ "caught_up": {
+ "title": "Caught Up",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "room_id",
+ "stored_seq",
+ "ingested",
+ "authority",
+ "caught_up"
+ ],
+ "title": "GroupsReplicateResult",
+ "type": "object"
+ },
+ "GroupsRetryParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "room_id": {
+ "title": "Room Id",
+ "type": "string"
+ },
+ "task_id": {
+ "title": "Task Id",
+ "type": "string"
+ }
+ },
+ "required": [
+ "room_id",
+ "task_id"
+ ],
+ "title": "GroupsRetryParams",
+ "type": "object"
+ },
+ "GroupsRetryResult": {
+ "additionalProperties": false,
+ "properties": {
+ "retried": {
+ "default": true,
+ "title": "Retried",
+ "type": "boolean"
+ },
+ "task": {
+ "$ref": "#/components/schemas/RoomTaskReceipt"
+ }
+ },
+ "required": [
+ "task"
+ ],
+ "title": "GroupsRetryResult",
+ "type": "object"
+ },
+ "GroupsSendParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "room_id": {
+ "title": "Room Id",
+ "type": "string"
+ },
+ "event_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Event Id"
+ },
+ "payload": {
+ "additionalProperties": true,
+ "title": "Payload",
+ "type": "object"
+ }
+ },
+ "required": [
+ "room_id",
+ "payload"
+ ],
+ "title": "GroupsSendParams",
+ "type": "object"
+ },
+ "GroupsSendResult": {
+ "additionalProperties": false,
+ "properties": {
+ "event": {
+ "$ref": "#/components/schemas/RoomEvent"
+ },
+ "client_event_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Client Event Id"
+ },
+ "accepted": {
+ "default": true,
+ "title": "Accepted",
+ "type": "boolean"
+ },
+ "driver_started": {
+ "default": true,
+ "title": "Driver Started",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "event"
+ ],
+ "title": "GroupsSendResult",
+ "type": "object"
+ },
+ "GroupsStateParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "room_id": {
+ "title": "Room Id",
+ "type": "string"
+ },
+ "include_disbanded": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Include Disbanded"
+ }
+ },
+ "required": [
+ "room_id"
+ ],
+ "title": "GroupsStateParams",
+ "type": "object"
+ },
+ "GroupsStateResult": {
+ "additionalProperties": false,
+ "properties": {
+ "room": {
+ "$ref": "#/components/schemas/Room"
+ },
+ "driver_status": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/RoomDriverStatus"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ }
+ },
+ "required": [
+ "room"
+ ],
+ "title": "GroupsStateResult",
+ "type": "object"
+ },
+ "GroupsStopParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "room_id": {
+ "title": "Room Id",
+ "type": "string"
+ },
+ "cancel_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cancel Id"
+ }
+ },
+ "required": [
+ "room_id"
+ ],
+ "title": "GroupsStopParams",
+ "type": "object"
+ },
+ "GroupsStopResult": {
+ "additionalProperties": false,
+ "properties": {
+ "cancelled": {
+ "title": "Cancelled",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "cancelled"
+ ],
+ "title": "GroupsStopResult",
+ "type": "object"
+ },
+ "HandoffFailParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "error": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Error"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "HandoffFailParams",
+ "type": "object"
+ },
+ "HandoffFailResult": {
+ "additionalProperties": false,
+ "description": "``failed`` false when the watcher already claimed the row; ``state`` is what it is now.",
+ "properties": {
+ "failed": {
+ "title": "Failed",
+ "type": "boolean"
+ },
+ "state": {
+ "title": "State",
+ "type": "string"
+ }
+ },
+ "required": [
+ "failed",
+ "state"
+ ],
+ "title": "HandoffFailResult",
+ "type": "object"
+ },
+ "HandoffRequestParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "platform": {
+ "title": "Platform",
+ "type": "string"
+ }
+ },
+ "required": [
+ "session_id",
+ "platform"
+ ],
+ "title": "HandoffRequestParams",
+ "type": "object"
+ },
+ "HandoffRequestResult": {
+ "additionalProperties": false,
+ "properties": {
+ "queued": {
+ "title": "Queued",
+ "type": "boolean"
+ },
+ "session_key": {
+ "title": "Session Key",
+ "type": "string"
+ },
+ "platform": {
+ "title": "Platform",
+ "type": "string"
+ },
+ "home_name": {
+ "title": "Home Name",
+ "type": "string"
+ }
+ },
+ "required": [
+ "queued",
+ "session_key",
+ "platform",
+ "home_name"
+ ],
+ "title": "HandoffRequestResult",
+ "type": "object"
+ },
+ "HandoffStateResult": {
+ "additionalProperties": false,
+ "description": "``state`` is pending | running | completed | failed, or '' when nothing was requested.",
+ "properties": {
+ "state": {
+ "title": "State",
+ "type": "string"
+ },
+ "platform": {
+ "title": "Platform",
+ "type": "string"
+ },
+ "error": {
+ "title": "Error",
+ "type": "string"
+ }
+ },
+ "required": [
+ "state",
+ "platform",
+ "error"
+ ],
+ "title": "HandoffStateResult",
+ "type": "object"
+ },
+ "HeartbeatSnapshot": {
+ "additionalProperties": false,
+ "properties": {
+ "prompt": {
+ "title": "Prompt",
+ "type": "string"
+ },
+ "status": {
+ "title": "Status",
+ "type": "string"
+ },
+ "interval_seconds": {
+ "title": "Interval Seconds",
+ "type": "integer"
+ },
+ "created_at": {
+ "title": "Created At",
+ "type": "number"
+ },
+ "last_fired_at": {
+ "title": "Last Fired At",
+ "type": "number"
+ },
+ "fire_count": {
+ "title": "Fire Count",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "prompt",
+ "status",
+ "interval_seconds",
+ "created_at",
+ "last_fired_at",
+ "fire_count"
+ ],
+ "title": "HeartbeatSnapshot",
+ "type": "object"
+ },
+ "ImageAttachBytesParams": {
+ "additionalProperties": false,
+ "description": "``content_base64`` (or the ``data`` alias) carries the bytes; ``filename`` / ``ext`` only hint\nthe extension \u2014 magic bytes decide.",
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "content_base64": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Content Base64"
+ },
+ "data": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Data"
+ },
+ "filename": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Filename"
+ },
+ "ext": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Ext"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "ImageAttachBytesParams",
+ "type": "object"
+ },
+ "ImageAttachParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "path": {
+ "title": "Path",
+ "type": "string"
+ }
+ },
+ "required": [
+ "session_id",
+ "path"
+ ],
+ "title": "ImageAttachParams",
+ "type": "object"
+ },
+ "ImageDetachParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "path": {
+ "title": "Path",
+ "type": "string"
+ }
+ },
+ "required": [
+ "session_id",
+ "path"
+ ],
+ "title": "ImageDetachParams",
+ "type": "object"
+ },
+ "ImageDetachResult": {
+ "additionalProperties": false,
+ "properties": {
+ "detached": {
+ "title": "Detached",
+ "type": "boolean"
+ },
+ "count": {
+ "title": "Count",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "detached",
+ "count"
+ ],
+ "title": "ImageDetachResult",
+ "type": "object"
+ },
+ "ImageGenerateParams": {
+ "additionalProperties": false,
+ "properties": {
+ "prompt": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Prompt"
+ },
+ "aspect_ratio": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Aspect Ratio"
+ },
+ "probe": {
+ "anyOf": [
+ {},
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Probe"
+ },
+ "max_bytes": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Max Bytes"
+ }
+ },
+ "title": "ImageGenerateParams",
+ "type": "object"
+ },
+ "ImageGenerateResult": {
+ "additionalProperties": false,
+ "description": "``probe`` answers ``{available}`` alone; ``image_data`` (data URL) is omitted when the\ndownload failed or exceeded ``max_bytes`` so callers fall back to ``image``.",
+ "properties": {
+ "available": {
+ "title": "Available",
+ "type": "boolean"
+ },
+ "success": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Success"
+ },
+ "image": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Image"
+ },
+ "image_data": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Image Data"
+ },
+ "error": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Error"
+ }
+ },
+ "required": [
+ "available"
+ ],
+ "title": "ImageGenerateResult",
+ "type": "object"
+ },
+ "InflightTurn": {
+ "additionalProperties": false,
+ "description": "``session_auto_continue._inflight_snapshot``: the live (or retained failed) turn a reconnecting\nclient rebuilds its bubbles from.",
+ "properties": {
+ "assistant": {
+ "default": "",
+ "title": "Assistant",
+ "type": "string"
+ },
+ "streaming": {
+ "default": false,
+ "title": "Streaming",
+ "type": "boolean"
+ },
+ "user": {
+ "default": "",
+ "title": "User",
+ "type": "string"
+ },
+ "corrections": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Corrections"
+ },
+ "correction_offsets": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Correction Offsets"
+ },
+ "error": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Error"
+ },
+ "status": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Status"
+ },
+ "recoverable": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Recoverable"
+ },
+ "error_surface": {
+ "anyOf": [
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Error Surface"
+ }
+ },
+ "title": "InflightTurn",
+ "type": "object"
+ },
+ "InputDetectDropParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "text": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Text"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "InputDetectDropParams",
+ "type": "object"
+ },
+ "InputDetectDropResult": {
+ "additionalProperties": false,
+ "description": "``matched: false`` alone when the text is not a drop; an image drop is queued immediately\n(``is_image`` + ``count``), a file drop only yields the ``text`` to insert.",
+ "properties": {
+ "name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Name"
+ },
+ "width": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Width"
+ },
+ "height": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Height"
+ },
+ "token_estimate": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Token Estimate"
+ },
+ "matched": {
+ "title": "Matched",
+ "type": "boolean"
+ },
+ "is_image": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Is Image"
+ },
+ "path": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Path"
+ },
+ "count": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Count"
+ },
+ "text": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Text"
+ }
+ },
+ "required": [
+ "matched"
+ ],
+ "title": "InputDetectDropResult",
+ "type": "object"
+ },
+ "InsightsGetParams": {
+ "additionalProperties": false,
+ "properties": {
+ "days": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Days"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "title": "InsightsGetParams",
+ "type": "object"
+ },
+ "InsightsGetResult": {
+ "additionalProperties": false,
+ "properties": {
+ "days": {
+ "title": "Days",
+ "type": "integer"
+ },
+ "sessions": {
+ "title": "Sessions",
+ "type": "integer"
+ },
+ "messages": {
+ "title": "Messages",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "days",
+ "sessions",
+ "messages"
+ ],
+ "title": "InsightsGetResult",
+ "type": "object"
+ },
+ "InterruptStatus": {
+ "enum": [
+ "interrupted",
+ "not_interrupted"
+ ],
+ "title": "InterruptStatus",
+ "type": "string"
+ },
+ "LayoutApplyPayload": {
+ "additionalProperties": true,
+ "description": "``tools/apply_layout_tool.py``.",
+ "properties": {
+ "preset": {
+ "title": "Preset",
+ "type": "string"
+ }
+ },
+ "required": [
+ "preset"
+ ],
+ "title": "LayoutApplyPayload",
+ "type": "object"
+ },
+ "LearningAxis": {
+ "additionalProperties": false,
+ "properties": {
+ "start": {
+ "title": "Start",
+ "type": "string"
+ },
+ "end": {
+ "title": "End",
+ "type": "string"
+ }
+ },
+ "required": [
+ "start",
+ "end"
+ ],
+ "title": "LearningAxis",
+ "type": "object"
+ },
+ "LearningBucketRow": {
+ "additionalProperties": false,
+ "properties": {
+ "index": {
+ "title": "Index",
+ "type": "integer"
+ },
+ "label": {
+ "title": "Label",
+ "type": "string"
+ },
+ "date": {
+ "title": "Date",
+ "type": "string"
+ },
+ "skills": {
+ "title": "Skills",
+ "type": "integer"
+ },
+ "memories": {
+ "title": "Memories",
+ "type": "integer"
+ },
+ "total": {
+ "title": "Total",
+ "type": "integer"
+ },
+ "category": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Category"
+ },
+ "color": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Color"
+ },
+ "nodes": {
+ "items": {
+ "$ref": "#/components/schemas/LearningNodeRow"
+ },
+ "title": "Nodes",
+ "type": "array"
+ }
+ },
+ "required": [
+ "index",
+ "label",
+ "date",
+ "skills",
+ "memories",
+ "total",
+ "nodes"
+ ],
+ "title": "LearningBucketRow",
+ "type": "object"
+ },
+ "LearningDetailResult": {
+ "additionalProperties": false,
+ "properties": {
+ "ok": {
+ "title": "Ok",
+ "type": "boolean"
+ },
+ "message": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Message"
+ },
+ "kind": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Kind"
+ },
+ "id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Id"
+ },
+ "label": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Label"
+ },
+ "content": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Content"
+ }
+ },
+ "required": [
+ "ok"
+ ],
+ "title": "LearningDetailResult",
+ "type": "object"
+ },
+ "LearningEditParams": {
+ "additionalProperties": false,
+ "properties": {
+ "id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Id"
+ },
+ "content": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Content"
+ }
+ },
+ "title": "LearningEditParams",
+ "type": "object"
+ },
+ "LearningFrame": {
+ "additionalProperties": false,
+ "description": "``agent.learning_graph_render.render_graph`` projection; ``grid`` rows are lists of\n``[text, styleKey, alpha?, hexOverride?]`` runs.",
+ "properties": {
+ "reveal": {
+ "title": "Reveal",
+ "type": "number"
+ },
+ "date": {
+ "title": "Date",
+ "type": "string"
+ },
+ "visible": {
+ "title": "Visible",
+ "type": "integer"
+ },
+ "grid": {
+ "items": {
+ "items": {},
+ "type": "array"
+ },
+ "title": "Grid",
+ "type": "array"
+ },
+ "labels": {
+ "items": {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ "title": "Labels",
+ "type": "array"
+ }
+ },
+ "required": [
+ "reveal",
+ "date",
+ "visible",
+ "grid"
+ ],
+ "title": "LearningFrame",
+ "type": "object"
+ },
+ "LearningFramesParams": {
+ "additionalProperties": false,
+ "properties": {
+ "cols": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cols"
+ },
+ "rows": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Rows"
+ },
+ "frames": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Frames"
+ }
+ },
+ "title": "LearningFramesParams",
+ "type": "object"
+ },
+ "LearningFramesResult": {
+ "additionalProperties": false,
+ "properties": {
+ "frames": {
+ "items": {
+ "$ref": "#/components/schemas/LearningFrame"
+ },
+ "title": "Frames",
+ "type": "array"
+ },
+ "legend": {
+ "items": {
+ "$ref": "#/components/schemas/LearningLegendItem"
+ },
+ "title": "Legend",
+ "type": "array"
+ },
+ "categories": {
+ "items": {
+ "$ref": "#/components/schemas/LearningLegendItem"
+ },
+ "title": "Categories",
+ "type": "array"
+ },
+ "buckets": {
+ "items": {
+ "$ref": "#/components/schemas/LearningBucketRow"
+ },
+ "title": "Buckets",
+ "type": "array"
+ },
+ "summary": {
+ "items": {
+ "type": "string"
+ },
+ "title": "Summary",
+ "type": "array"
+ },
+ "axis": {
+ "$ref": "#/components/schemas/LearningAxis"
+ },
+ "count": {
+ "title": "Count",
+ "type": "integer"
+ },
+ "cols": {
+ "title": "Cols",
+ "type": "integer"
+ },
+ "rows": {
+ "title": "Rows",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "frames",
+ "legend",
+ "categories",
+ "buckets",
+ "summary",
+ "axis",
+ "count",
+ "cols",
+ "rows"
+ ],
+ "title": "LearningFramesResult",
+ "type": "object"
+ },
+ "LearningLegendItem": {
+ "additionalProperties": false,
+ "properties": {
+ "glyph": {
+ "title": "Glyph",
+ "type": "string"
+ },
+ "label": {
+ "title": "Label",
+ "type": "string"
+ },
+ "style": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Style"
+ },
+ "color": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Color"
+ }
+ },
+ "required": [
+ "glyph",
+ "label"
+ ],
+ "title": "LearningLegendItem",
+ "type": "object"
+ },
+ "LearningMutationResult": {
+ "additionalProperties": false,
+ "description": "``agent.learning_mutations`` \u2014 ``ok: false`` carries the reason in ``message``.",
+ "properties": {
+ "ok": {
+ "title": "Ok",
+ "type": "boolean"
+ },
+ "message": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Message"
+ }
+ },
+ "required": [
+ "ok"
+ ],
+ "title": "LearningMutationResult",
+ "type": "object"
+ },
+ "LearningNodeParams": {
+ "additionalProperties": false,
+ "properties": {
+ "id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Id"
+ }
+ },
+ "title": "LearningNodeParams",
+ "type": "object"
+ },
+ "LearningNodeRow": {
+ "additionalProperties": false,
+ "properties": {
+ "id": {
+ "title": "Id",
+ "type": "string"
+ },
+ "glyph": {
+ "title": "Glyph",
+ "type": "string"
+ },
+ "label": {
+ "title": "Label",
+ "type": "string"
+ },
+ "fullLabel": {
+ "title": "Fulllabel",
+ "type": "string"
+ },
+ "meta": {
+ "title": "Meta",
+ "type": "string"
+ },
+ "body": {
+ "title": "Body",
+ "type": "string"
+ },
+ "style": {
+ "title": "Style",
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "glyph",
+ "label",
+ "fullLabel",
+ "meta",
+ "body",
+ "style"
+ ],
+ "title": "LearningNodeRow",
+ "type": "object"
+ },
++ "LeaseHolder": {
++ "enum": [
++ "agent",
++ "human"
++ ],
++ "title": "LeaseHolder",
++ "type": "string"
++ },
+ "LegacyPluginRow": {
+ "additionalProperties": false,
+ "properties": {
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "version": {
+ "title": "Version",
+ "type": "string"
+ },
+ "enabled": {
+ "title": "Enabled",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "name",
+ "version",
+ "enabled"
+ ],
+ "title": "LegacyPluginRow",
+ "type": "object"
+ },
+ "LiveSessionStatus": {
+ "enum": [
+ "idle",
+ "starting",
+ "waiting",
+ "working",
+ "streaming",
+ "resuming"
+ ],
+ "title": "LiveSessionStatus",
+ "type": "string"
+ },
+ "LlmOneshotParams": {
+ "additionalProperties": false,
+ "description": "Needs a ``template`` or ``instructions`` / ``input``; a live ``session_id`` lends its model.",
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "template": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Template"
+ },
+ "instructions": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Instructions"
+ },
+ "input": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Input"
+ },
+ "variables": {
+ "anyOf": [
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Variables"
+ },
+ "task": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Task"
+ },
+ "temperature": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Temperature"
+ },
+ "max_tokens": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Max Tokens"
+ },
+ "session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Session Id"
+ }
+ },
+ "title": "LlmOneshotParams",
+ "type": "object"
+ },
+ "LlmOneshotResult": {
+ "additionalProperties": false,
+ "properties": {
+ "text": {
+ "title": "Text",
+ "type": "string"
+ }
+ },
+ "required": [
+ "text"
+ ],
+ "title": "LlmOneshotResult",
+ "type": "object"
+ },
+ "LoopSnapshot": {
+ "additionalProperties": false,
+ "description": "``_safe_loop_snapshot`` \u2014 persisted LoopState fields, never its route.",
+ "properties": {
+ "prompt": {
+ "title": "Prompt",
+ "type": "string"
+ },
+ "status": {
+ "title": "Status",
+ "type": "string"
+ },
+ "mode": {
+ "title": "Mode",
+ "type": "string"
+ },
+ "interval_seconds": {
+ "title": "Interval Seconds",
+ "type": "number"
+ },
+ "current_delay": {
+ "title": "Current Delay",
+ "type": "number"
+ },
+ "times": {
+ "title": "Times",
+ "type": "integer"
+ },
+ "until": {
+ "title": "Until",
+ "type": "string"
+ },
+ "max_ticks": {
+ "title": "Max Ticks",
+ "type": "integer"
+ },
+ "ticks_fired": {
+ "title": "Ticks Fired",
+ "type": "integer"
+ },
+ "created_at": {
+ "title": "Created At",
+ "type": "number"
+ },
+ "last_fired_at": {
+ "title": "Last Fired At",
+ "type": "number"
+ },
+ "next_due_at": {
+ "title": "Next Due At",
+ "type": "number"
+ },
+ "awaiting_response": {
+ "title": "Awaiting Response",
+ "type": "boolean"
+ },
+ "deferred_by_goal": {
+ "title": "Deferred By Goal",
+ "type": "boolean"
+ },
+ "paused_reason": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Paused Reason"
+ },
+ "last_stop_reason": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Last Stop Reason"
+ }
+ },
+ "required": [
+ "prompt",
+ "status",
+ "mode",
+ "interval_seconds",
+ "current_delay",
+ "times",
+ "until",
+ "max_ticks",
+ "ticks_fired",
+ "created_at",
+ "last_fired_at",
+ "next_due_at",
+ "awaiting_response",
+ "deferred_by_goal"
+ ],
+ "title": "LoopSnapshot",
+ "type": "object"
+ },
+ "McpCatalogEntry": {
+ "additionalProperties": false,
+ "properties": {
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "description": {
+ "title": "Description",
+ "type": "string"
+ },
+ "installed": {
+ "title": "Installed",
+ "type": "boolean"
+ },
+ "enabled": {
+ "title": "Enabled",
+ "type": "boolean"
+ },
+ "requires": {
+ "items": {
+ "type": "string"
+ },
+ "title": "Requires",
+ "type": "array"
+ },
+ "transport": {
+ "title": "Transport",
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "description",
+ "installed",
+ "enabled",
+ "requires",
+ "transport"
+ ],
+ "title": "McpCatalogEntry",
+ "type": "object"
+ },
+ "McpCatalogResult": {
+ "additionalProperties": false,
+ "properties": {
+ "servers": {
+ "items": {
+ "$ref": "#/components/schemas/McpCatalogEntry"
+ },
+ "title": "Servers",
+ "type": "array"
+ }
+ },
+ "required": [
+ "servers"
+ ],
+ "title": "McpCatalogResult",
+ "type": "object"
+ },
+ "McpOauthCallbackParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "code": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Code"
+ },
+ "state": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "State"
+ },
+ "error": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Error"
+ }
+ },
+ "required": [
+ "name",
+ "session_id"
+ ],
+ "title": "McpOauthCallbackParams",
+ "type": "object"
+ },
+ "McpOauthCallbackResult": {
+ "additionalProperties": false,
+ "properties": {
+ "ok": {
+ "title": "Ok",
+ "type": "boolean"
+ },
+ "session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Session Id"
+ },
+ "error_message": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Error Message"
+ }
+ },
+ "required": [
+ "ok"
+ ],
+ "title": "McpOauthCallbackResult",
+ "type": "object"
+ },
+ "McpOauthCancelResult": {
+ "additionalProperties": false,
+ "properties": {
+ "ok": {
+ "title": "Ok",
+ "type": "boolean"
+ },
+ "status": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Status"
+ },
+ "error_message": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Error Message"
+ }
+ },
+ "required": [
+ "ok"
+ ],
+ "title": "McpOauthCancelResult",
+ "type": "object"
+ },
+ "McpOauthFlowParams": {
+ "additionalProperties": false,
+ "description": "``session_id`` is the OAuth flow id returned by ``oauth.start`` (not a gateway session).",
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "session_id"
+ ],
+ "title": "McpOauthFlowParams",
+ "type": "object"
+ },
+ "McpOauthPollResult": {
+ "additionalProperties": false,
+ "properties": {
+ "ok": {
+ "title": "Ok",
+ "type": "boolean"
+ },
+ "status": {
+ "$ref": "#/components/schemas/McpOauthPollStatus"
+ },
+ "session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Session Id"
+ },
+ "error_message": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Error Message"
+ },
+ "auth_url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Auth Url"
+ },
+ "tools": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/components/schemas/McpProbeTool"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Tools"
+ }
+ },
+ "required": [
+ "ok",
+ "status"
+ ],
+ "title": "McpOauthPollResult",
+ "type": "object"
+ },
+ "McpOauthPollStatus": {
+ "enum": [
+ "pending",
+ "approved",
+ "error"
+ ],
+ "title": "McpOauthPollStatus",
+ "type": "string"
+ },
+ "McpOauthStartParams": {
+ "additionalProperties": false,
+ "description": "With ``client_redirect_uri`` the CLIENT hosts the loopback and relays the code via\n``mcp.servers.oauth.callback``.",
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "client_redirect_uri": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Client Redirect Uri"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "title": "McpOauthStartParams",
+ "type": "object"
+ },
+ "McpOauthStartResult": {
+ "additionalProperties": false,
+ "properties": {
+ "ok": {
+ "title": "Ok",
+ "type": "boolean"
+ },
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "auth_url": {
+ "title": "Auth Url",
+ "type": "string"
+ },
+ "flow": {
+ "title": "Flow",
+ "type": "string"
+ }
+ },
+ "required": [
+ "ok",
+ "session_id",
+ "auth_url",
+ "flow"
+ ],
+ "title": "McpOauthStartResult",
+ "type": "object"
+ },
+ "McpProbeTool": {
+ "additionalProperties": false,
+ "properties": {
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "description": {
+ "title": "Description",
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "description"
+ ],
+ "title": "McpProbeTool",
+ "type": "object"
+ },
+ "McpRuntimeStatus": {
+ "enum": [
+ "connected",
+ "disabled",
+ "connecting",
+ "failed",
+ "configured"
+ ],
+ "title": "McpRuntimeStatus",
+ "type": "string"
+ },
+ "McpServerEntry": {
+ "additionalProperties": false,
+ "properties": {
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "enabled": {
+ "default": true,
+ "title": "Enabled",
+ "type": "boolean"
+ },
+ "transport": {
+ "default": "stdio",
+ "title": "Transport",
+ "type": "string"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "title": "McpServerEntry",
+ "type": "object"
+ },
+ "McpServerNameParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "name": {
+ "title": "Name",
+ "type": "string"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "title": "McpServerNameParams",
+ "type": "object"
+ },
+ "McpServerRuntimeRow": {
+ "additionalProperties": false,
+ "description": "Safe projection of ``tools.mcp_tool_discovery.get_mcp_status`` rows.",
+ "properties": {
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "transport": {
+ "title": "Transport",
+ "type": "string"
+ },
+ "tools": {
+ "title": "Tools",
+ "type": "integer"
+ },
+ "connected": {
+ "title": "Connected",
+ "type": "boolean"
+ },
+ "disabled": {
+ "title": "Disabled",
+ "type": "boolean"
+ },
+ "status": {
+ "$ref": "#/components/schemas/McpRuntimeStatus"
+ }
+ },
+ "required": [
+ "name",
+ "transport",
+ "tools",
+ "connected",
+ "disabled",
+ "status"
+ ],
+ "title": "McpServerRuntimeRow",
+ "type": "object"
+ },
+ "McpServerStatus": {
+ "additionalProperties": true,
+ "properties": {
+ "name": {
+ "default": "",
+ "title": "Name",
+ "type": "string"
+ },
+ "status": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Status"
+ },
+ "tool_count": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Tool Count"
+ },
+ "error": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Error"
+ }
+ },
+ "title": "McpServerStatus",
+ "type": "object"
+ },
+ "McpServerSummary": {
+ "additionalProperties": false,
+ "description": "``tui_gateway/mcp_rpc_helpers.summarize_server`` \u2014 a server's config without secret values.",
+ "properties": {
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "transport": {
+ "title": "Transport",
+ "type": "string"
+ },
+ "url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Url"
+ },
+ "command": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Command"
+ },
+ "args": {
+ "items": {
+ "type": "string"
+ },
+ "title": "Args",
+ "type": "array"
+ },
+ "env": {
+ "items": {
+ "type": "string"
+ },
+ "title": "Env",
+ "type": "array"
+ },
+ "auth": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Auth"
+ },
+ "oauth_tokens_present": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Oauth Tokens Present"
+ },
+ "enabled": {
+ "title": "Enabled",
+ "type": "boolean"
+ },
+ "tools": {
+ "anyOf": [
+ {},
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Tools"
+ }
+ },
+ "required": [
+ "name",
+ "transport",
+ "args",
+ "env",
+ "enabled"
+ ],
+ "title": "McpServerSummary",
+ "type": "object"
+ },
+ "McpServersAddParams": {
+ "additionalProperties": false,
+ "description": "``preset`` (catalog id) and/or ``config`` (url/command/args/env/headers/auth/tools); a\n``bearer_token`` is written to the profile's .env, only the header template persists.",
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "preset": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Preset"
+ },
+ "config": {
+ "anyOf": [
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Config"
+ },
+ "bearer_token": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Bearer Token"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "title": "McpServersAddParams",
+ "type": "object"
+ },
+ "McpServersAddResult": {
+ "additionalProperties": false,
+ "properties": {
+ "ok": {
+ "title": "Ok",
+ "type": "boolean"
+ },
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "server": {
+ "$ref": "#/components/schemas/McpServerSummary"
+ }
+ },
+ "required": [
+ "ok",
+ "name",
+ "server"
+ ],
+ "title": "McpServersAddResult",
+ "type": "object"
+ },
+ "McpServersListResult": {
+ "additionalProperties": false,
+ "properties": {
+ "servers": {
+ "items": {
+ "$ref": "#/components/schemas/McpServerSummary"
+ },
+ "title": "Servers",
+ "type": "array"
+ }
+ },
+ "required": [
+ "servers"
+ ],
+ "title": "McpServersListResult",
+ "type": "object"
+ },
+ "McpServersRemoveResult": {
+ "additionalProperties": false,
+ "properties": {
+ "ok": {
+ "title": "Ok",
+ "type": "boolean"
+ },
+ "removed": {
+ "title": "Removed",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "ok",
+ "removed"
+ ],
+ "title": "McpServersRemoveResult",
+ "type": "object"
+ },
+ "McpServersSetApiKeyParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "value": {
+ "title": "Value",
+ "type": "string"
+ },
+ "env_var": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Env Var"
+ }
+ },
+ "required": [
+ "name",
+ "value"
+ ],
+ "title": "McpServersSetApiKeyParams",
+ "type": "object"
+ },
+ "McpServersSetApiKeyResult": {
+ "additionalProperties": false,
+ "properties": {
+ "ok": {
+ "title": "Ok",
+ "type": "boolean"
+ },
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "env_var": {
+ "title": "Env Var",
+ "type": "string"
+ },
+ "server": {
+ "$ref": "#/components/schemas/McpServerSummary"
+ }
+ },
+ "required": [
+ "ok",
+ "name",
+ "env_var",
+ "server"
+ ],
+ "title": "McpServersSetApiKeyResult",
+ "type": "object"
+ },
+ "McpServersStatusResult": {
+ "additionalProperties": false,
+ "properties": {
+ "servers": {
+ "items": {
+ "$ref": "#/components/schemas/McpServerRuntimeRow"
+ },
+ "title": "Servers",
+ "type": "array"
+ },
+ "checked_at": {
+ "title": "Checked At",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "servers",
+ "checked_at"
+ ],
+ "title": "McpServersStatusResult",
+ "type": "object"
+ },
+ "McpServersTestResult": {
+ "additionalProperties": false,
+ "description": "``ok: false`` carries ``error``; ``prompts`` / ``resources`` are only counted on success.",
+ "properties": {
+ "ok": {
+ "title": "Ok",
+ "type": "boolean"
+ },
+ "tools": {
+ "items": {
+ "$ref": "#/components/schemas/McpProbeTool"
+ },
+ "title": "Tools",
+ "type": "array"
+ },
+ "error": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Error"
+ },
+ "prompts": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Prompts"
+ },
+ "resources": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Resources"
+ },
+ "oauth_needed": {
+ "title": "Oauth Needed",
+ "type": "boolean"
+ },
+ "oauth_tokens_present": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Oauth Tokens Present"
+ }
+ },
+ "required": [
+ "ok",
+ "tools",
+ "oauth_needed"
+ ],
+ "title": "McpServersTestResult",
+ "type": "object"
+ },
+ "MessageCompletePayload": {
+ "additionalProperties": false,
+ "description": "``prompt_turn._complete_turn_payload`` / ``session_auto_continue._emit_terminal_turn_error`` /\n``agent_callbacks._mirror_subagent_to_child`` (child watch mirror: ``text`` only) /\n``compute_host_bridge`` (``text`` + ``status``).",
+ "properties": {
+ "text": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {}
+ ],
+ "default": "",
+ "title": "Text"
+ },
+ "usage": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/Usage"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "status": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/TurnStatus"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "reasoning": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Reasoning"
+ },
+ "warning": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Warning"
+ },
+ "response_previewed": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Response Previewed"
+ },
+ "billing": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/BillingBlock"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "failure_reason": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Failure Reason"
+ },
+ "rendered": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Rendered"
+ },
+ "error": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Error"
+ },
+ "recoverable": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Recoverable"
+ },
+ "error_surface": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/ErrorSurface"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "partial": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Partial"
+ }
+ },
+ "title": "MessageCompletePayload",
+ "type": "object"
+ },
+ "MessageInterimPayload": {
+ "additionalProperties": false,
+ "description": "``prompt_turn._interim_assistant_cb`` / ``agent_callbacks`` interim_assistant_callback.",
+ "properties": {
+ "text": {
+ "title": "Text",
+ "type": "string"
+ },
+ "already_streamed": {
+ "title": "Already Streamed",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "text",
+ "already_streamed"
+ ],
+ "title": "MessageInterimPayload",
+ "type": "object"
+ },
+ "MessageReactParams": {
+ "additionalProperties": false,
+ "description": "``row_id`` is ``messages.id``; a not-yet-persisted live message names ``newest_role`` instead.\n``emoji`` null clears; the same emoji again retracts.",
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "row_id": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Row Id"
+ },
+ "newest_role": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Newest Role"
+ },
+ "emoji": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Emoji"
+ },
+ "author": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/ReactionAuthor"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "MessageReactParams",
+ "type": "object"
+ },
+ "MessageReactResult": {
+ "additionalProperties": false,
+ "properties": {
+ "row_id": {
+ "title": "Row Id",
+ "type": "integer"
+ },
+ "reactions": {
+ "items": {
+ "$ref": "#/components/schemas/MessageReaction"
+ },
+ "title": "Reactions",
+ "type": "array"
+ }
+ },
+ "required": [
+ "row_id",
+ "reactions"
+ ],
+ "title": "MessageReactResult",
+ "type": "object"
+ },
+ "MessageReaction": {
+ "additionalProperties": true,
+ "description": "One persisted reaction row (``hermes_state_messages.set_message_reaction``); ``seen`` is\nstamped once announced.",
+ "properties": {
+ "emoji": {
+ "title": "Emoji",
+ "type": "string"
+ },
+ "author": {
+ "title": "Author",
+ "type": "string"
+ },
+ "at": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "At"
+ },
+ "seen": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Seen"
+ }
+ },
+ "required": [
+ "emoji",
+ "author"
+ ],
+ "title": "MessageReaction",
+ "type": "object"
+ },
+ "MessageReactionPayload": {
+ "additionalProperties": false,
+ "description": "``tools/react_to_message_tool.py``.",
+ "properties": {
+ "row_id": {
+ "title": "Row Id",
+ "type": "integer"
+ },
+ "reactions": {
+ "items": {
+ "$ref": "#/components/schemas/MessageReaction"
+ },
+ "title": "Reactions",
+ "type": "array"
+ },
+ "role": {
+ "title": "Role",
+ "type": "string"
+ }
+ },
+ "required": [
+ "row_id",
+ "reactions",
+ "role"
+ ],
+ "title": "MessageReactionPayload",
+ "type": "object"
+ },
+ "MoaAggregatingPayload": {
+ "additionalProperties": false,
+ "properties": {
+ "aggregator": {
+ "title": "Aggregator",
+ "type": "string"
+ }
+ },
+ "required": [
+ "aggregator"
+ ],
+ "title": "MoaAggregatingPayload",
+ "type": "object"
+ },
+ "MoaPhasePayload": {
+ "additionalProperties": false,
+ "properties": {
+ "phase": {
+ "title": "Phase",
+ "type": "string"
+ },
+ "refs_done": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Refs Done"
+ },
+ "refs_total": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Refs Total"
+ },
+ "aggregator": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Aggregator"
+ }
+ },
+ "required": [
+ "phase"
+ ],
+ "title": "MoaPhasePayload",
+ "type": "object"
+ },
+ "MoaProgressPayload": {
+ "additionalProperties": false,
+ "properties": {
+ "label": {
+ "title": "Label",
+ "type": "string"
+ },
+ "refs_done": {
+ "title": "Refs Done",
+ "type": "integer"
+ },
+ "refs_total": {
+ "title": "Refs Total",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "label",
+ "refs_done",
+ "refs_total"
+ ],
+ "title": "MoaProgressPayload",
+ "type": "object"
+ },
+ "MoaReferencePayload": {
+ "additionalProperties": false,
+ "description": "``tool_progress._progress_moa_reference``.",
+ "properties": {
+ "label": {
+ "title": "Label",
+ "type": "string"
+ },
+ "text": {
+ "title": "Text",
+ "type": "string"
+ },
+ "index": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Index"
+ },
+ "count": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Count"
+ }
+ },
+ "required": [
+ "label",
+ "text"
+ ],
+ "title": "MoaReferencePayload",
+ "type": "object"
+ },
+ "ModelCapabilities": {
+ "additionalProperties": false,
+ "description": "``hermes_cli/inventory.py::_apply_capabilities``.",
+ "properties": {
+ "fast": {
+ "title": "Fast",
+ "type": "boolean"
+ },
+ "reasoning": {
+ "title": "Reasoning",
+ "type": "boolean"
+ },
+ "can_disable_reasoning": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Can Disable Reasoning"
+ }
+ },
+ "required": [
+ "fast",
+ "reasoning"
+ ],
+ "title": "ModelCapabilities",
+ "type": "object"
+ },
+ "ModelDisconnectParams": {
+ "additionalProperties": false,
+ "properties": {
+ "slug": {
+ "title": "Slug",
+ "type": "string"
+ },
+ "session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Session Id"
+ }
+ },
+ "required": [
+ "slug"
+ ],
+ "title": "ModelDisconnectParams",
+ "type": "object"
+ },
+ "ModelDisconnectResult": {
+ "additionalProperties": false,
+ "properties": {
+ "slug": {
+ "title": "Slug",
+ "type": "string"
+ },
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "disconnected": {
+ "title": "Disconnected",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "slug",
+ "name",
+ "disconnected"
+ ],
+ "title": "ModelDisconnectResult",
+ "type": "object"
+ },
+ "ModelOptionProvider": {
+ "additionalProperties": true,
+ "description": "One ``hermes_cli/inventory.py::build_models_payload`` provider row (the union of every field\nthe builder sets; ``pricing_pending`` / ``free_tier_pending`` mark the cached-only path).",
+ "properties": {
+ "slug": {
+ "title": "Slug",
+ "type": "string"
+ },
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "models": {
+ "items": {
+ "type": "string"
+ },
+ "title": "Models",
+ "type": "array"
+ },
+ "total_models": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Total Models"
+ },
+ "is_current": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Is Current"
+ },
+ "is_user_defined": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Is User Defined"
+ },
+ "source": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Source"
+ },
+ "aliases": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Aliases"
+ },
+ "api_url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Api Url"
+ },
+ "auth_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Auth Type"
+ },
+ "authenticated": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Authenticated"
+ },
+ "key_env": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Key Env"
+ },
+ "warning": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Warning"
+ },
+ "featured_models": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Featured Models"
+ },
+ "capabilities": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "$ref": "#/components/schemas/ModelCapabilities"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Capabilities"
+ },
+ "pricing": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "$ref": "#/components/schemas/ModelPricing"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Pricing"
+ },
+ "pricing_pending": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Pricing Pending"
+ },
+ "free_tier": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Free Tier"
+ },
+ "free_tier_pending": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Free Tier Pending"
+ },
+ "free_tier_row": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Free Tier Row"
+ },
+ "unavailable_models": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Unavailable Models"
+ }
+ },
+ "required": [
+ "slug",
+ "name"
+ ],
+ "title": "ModelOptionProvider",
+ "type": "object"
+ },
+ "ModelOptionsParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Session Id"
+ },
+ "explicit_only": {
+ "default": false,
+ "title": "Explicit Only",
+ "type": "boolean"
+ },
+ "include_unconfigured": {
+ "default": false,
+ "title": "Include Unconfigured",
+ "type": "boolean"
+ },
+ "refresh": {
+ "default": false,
+ "title": "Refresh",
+ "type": "boolean"
+ }
+ },
+ "title": "ModelOptionsParams",
+ "type": "object"
+ },
+ "ModelOptionsResult": {
+ "additionalProperties": false,
+ "properties": {
+ "providers": {
+ "items": {
+ "$ref": "#/components/schemas/ModelOptionProvider"
+ },
+ "title": "Providers",
+ "type": "array"
+ },
+ "model": {
+ "default": "",
+ "title": "Model",
+ "type": "string"
+ },
+ "provider": {
+ "default": "",
+ "title": "Provider",
+ "type": "string"
+ }
+ },
+ "required": [
+ "providers"
+ ],
+ "title": "ModelOptionsResult",
+ "type": "object"
+ },
+ "ModelPricing": {
+ "additionalProperties": false,
+ "description": "``hermes_cli/inventory.py::_apply_pricing`` \u2014 formatted $/Mtok strings (``\"\"`` unknown,\n``\"free\"``); the sale fields are Nous Portal-only.",
+ "properties": {
+ "input": {
+ "title": "Input",
+ "type": "string"
+ },
+ "output": {
+ "title": "Output",
+ "type": "string"
+ },
+ "cache": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cache"
+ },
+ "free": {
+ "title": "Free",
+ "type": "boolean"
+ },
+ "discount_percent": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Discount Percent"
+ },
+ "was_input": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Was Input"
+ },
+ "was_output": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Was Output"
+ }
+ },
+ "required": [
+ "input",
+ "output",
+ "free"
+ ],
+ "title": "ModelPricing",
+ "type": "object"
+ },
+ "ModelSaveKeyParams": {
+ "additionalProperties": false,
+ "properties": {
+ "slug": {
+ "title": "Slug",
+ "type": "string"
+ },
+ "api_key": {
+ "title": "Api Key",
+ "type": "string"
+ },
+ "session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Session Id"
+ }
+ },
+ "required": [
+ "slug",
+ "api_key"
+ ],
+ "title": "ModelSaveKeyParams",
+ "type": "object"
+ },
+ "ModelSaveKeyResult": {
+ "additionalProperties": false,
+ "properties": {
+ "provider": {
+ "$ref": "#/components/schemas/ModelOptionProvider"
+ }
+ },
+ "required": [
+ "provider"
+ ],
+ "title": "ModelSaveKeyResult",
+ "type": "object"
+ },
+ "NoticePayload": {
+ "additionalProperties": false,
+ "description": "``tui_gateway/model_switch.py`` capability-refresh notice.",
+ "properties": {
+ "message": {
+ "title": "Message",
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
+ "title": "NoticePayload",
+ "type": "object"
+ },
+ "NotificationClearPayload": {
+ "additionalProperties": false,
+ "properties": {
+ "key": {
+ "title": "Key",
+ "type": "string"
+ }
+ },
+ "required": [
+ "key"
+ ],
+ "title": "NotificationClearPayload",
+ "type": "object"
+ },
+ "NotificationShowPayload": {
+ "additionalProperties": false,
+ "description": "``agent/credits_tracker.py::AgentNotice`` via notice_callback, and ``server._await_agent_ready``'s\nslow-build notice. ``level``: info | warn | error | success; ``kind``: sticky | ttl | agent.",
+ "properties": {
+ "text": {
+ "title": "Text",
+ "type": "string"
+ },
+ "level": {
+ "title": "Level",
+ "type": "string"
+ },
+ "kind": {
+ "title": "Kind",
+ "type": "string"
+ },
+ "ttl_ms": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Ttl Ms"
+ },
+ "key": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Key"
+ },
+ "id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Id"
+ }
+ },
+ "required": [
+ "text",
+ "level",
+ "kind"
+ ],
+ "title": "NotificationShowPayload",
+ "type": "object"
+ },
+ "OkResult": {
+ "additionalProperties": false,
+ "properties": {
+ "ok": {
+ "default": true,
+ "title": "Ok",
+ "type": "boolean"
+ }
+ },
+ "title": "OkResult",
+ "type": "object"
+ },
+ "OnboardingAnswers": {
+ "additionalProperties": true,
+ "description": "``tui_gateway/onboarding_personalization.py`` \u2014 the facts agreed during onboarding.",
+ "properties": {
+ "name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Name"
+ },
+ "context": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Context"
+ },
+ "theme": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Theme"
+ },
+ "accent": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Accent"
+ },
+ "layout": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Layout"
+ },
+ "focus": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Focus"
+ },
+ "connectors": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Connectors"
+ }
+ },
+ "title": "OnboardingAnswers",
+ "type": "object"
+ },
+ "OpenRequestEntry": {
+ "additionalProperties": false,
+ "description": "One unanswered server\u2192client request (``server_requests.Request.snapshot``); the reconnecting\nclient re-delivers it to its request handlers.",
+ "properties": {
+ "id": {
+ "title": "Id",
+ "type": "string"
+ },
+ "method": {
+ "title": "Method",
+ "type": "string"
+ },
+ "params": {
+ "additionalProperties": true,
+ "title": "Params",
+ "type": "object"
+ }
+ },
+ "required": [
+ "id",
+ "method",
+ "params"
+ ],
+ "title": "OpenRequestEntry",
+ "type": "object"
+ },
+ "OptionalProjectResult": {
+ "additionalProperties": false,
+ "properties": {
+ "project": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/ProjectInfo"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ }
+ },
+ "title": "OptionalProjectResult",
+ "type": "object"
+ },
+ "PaneRevealPayload": {
+ "additionalProperties": true,
+ "description": "``tools/focus_pane_tool.py``.",
+ "properties": {
+ "pane": {
+ "title": "Pane",
+ "type": "string"
+ }
+ },
+ "required": [
+ "pane"
+ ],
+ "title": "PaneRevealPayload",
+ "type": "object"
+ },
+ "PasteCollapseParams": {
+ "additionalProperties": false,
+ "properties": {
+ "text": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Text"
+ }
+ },
+ "title": "PasteCollapseParams",
+ "type": "object"
+ },
+ "PasteCollapseResult": {
+ "additionalProperties": false,
+ "properties": {
+ "placeholder": {
+ "title": "Placeholder",
+ "type": "string"
+ },
+ "path": {
+ "title": "Path",
+ "type": "string"
+ },
+ "lines": {
+ "title": "Lines",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "placeholder",
+ "path",
+ "lines"
+ ],
+ "title": "PasteCollapseResult",
+ "type": "object"
+ },
+ "PaymentMethodKind": {
+ "enum": [
+ "card",
+ "link",
+ "unknown"
+ ],
+ "title": "PaymentMethodKind",
+ "type": "string"
+ },
+ "PdfAttachParams": {
+ "additionalProperties": false,
+ "description": "Host ``path`` or base64 ``content_base64`` / ``data``; ``first_page`` / ``last_page`` bound the\nrender (per-call page cap enforced server-side).",
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "path": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Path"
+ },
+ "content_base64": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Content Base64"
+ },
+ "data": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Data"
+ },
+ "filename": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Filename"
+ },
+ "first_page": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "First Page"
+ },
+ "last_page": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Last Page"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "PdfAttachParams",
+ "type": "object"
+ },
+ "PdfAttachResult": {
+ "additionalProperties": false,
+ "properties": {
+ "attached": {
+ "title": "Attached",
+ "type": "boolean"
+ },
+ "filename": {
+ "title": "Filename",
+ "type": "string"
+ },
+ "pages_attached": {
+ "title": "Pages Attached",
+ "type": "integer"
+ },
+ "pages": {
+ "items": {
+ "$ref": "#/components/schemas/PdfPage"
+ },
+ "title": "Pages",
+ "type": "array"
+ },
+ "count": {
+ "title": "Count",
+ "type": "integer"
+ },
+ "text": {
+ "title": "Text",
+ "type": "string"
+ }
+ },
+ "required": [
+ "attached",
+ "filename",
+ "pages_attached",
+ "pages",
+ "count",
+ "text"
+ ],
+ "title": "PdfAttachResult",
+ "type": "object"
+ },
+ "PdfPage": {
+ "additionalProperties": false,
+ "properties": {
+ "name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Name"
+ },
+ "width": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Width"
+ },
+ "height": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Height"
+ },
+ "token_estimate": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Token Estimate"
+ },
+ "path": {
+ "title": "Path",
+ "type": "string"
+ },
+ "page": {
+ "title": "Page",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "path",
+ "page"
+ ],
+ "title": "PdfPage",
+ "type": "object"
+ },
+ "PeerRouteStatus": {
+ "additionalProperties": false,
+ "properties": {
+ "room_id": {
+ "title": "Room Id",
+ "type": "string"
+ },
+ "member_id": {
+ "title": "Member Id",
+ "type": "string"
+ },
+ "status": {
+ "title": "Status",
+ "type": "string"
+ }
+ },
+ "required": [
+ "room_id",
+ "member_id",
+ "status"
+ ],
+ "title": "PeerRouteStatus",
+ "type": "object"
+ },
+ "PendingApproval": {
+ "additionalProperties": true,
+ "description": "One unresolved ``tools/approval.py`` gateway queue entry as ``server._approval_request_payload``\nrenders it (command redacted; ``choices`` precomputed). The key set is owned by the approval tool.",
+ "properties": {
+ "request_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Request Id"
+ },
+ "command": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Command"
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Description"
+ },
+ "pattern_key": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Pattern Key"
+ },
+ "pattern_keys": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Pattern Keys"
+ },
+ "allow_permanent": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Allow Permanent"
+ },
+ "allow_session": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Allow Session"
+ },
+ "smart_denied": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Smart Denied"
+ },
+ "choices": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Choices"
+ },
+ "tool_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Tool Name"
+ }
+ },
+ "title": "PendingApproval",
+ "type": "object"
+ },
+ "PetCancelParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "token": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Token"
+ }
+ },
+ "title": "PetCancelParams",
+ "type": "object"
+ },
+ "PetCancelResult": {
+ "additionalProperties": false,
+ "properties": {
+ "ok": {
+ "title": "Ok",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "ok"
+ ],
+ "title": "PetCancelResult",
+ "type": "object"
+ },
+ "PetCellsParams": {
+ "additionalProperties": false,
+ "description": "``graphics`` opts into the kitty payload when the TTY speaks it; ``cols`` overrides the width.",
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "state": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "State"
+ },
+ "cols": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cols"
+ },
+ "graphics": {
+ "default": false,
+ "title": "Graphics",
+ "type": "boolean"
+ }
+ },
+ "title": "PetCellsParams",
+ "type": "object"
+ },
+ "PetCellsResult": {
+ "additionalProperties": false,
+ "description": "Unicode: ``frames`` is frame \u2192 row \u2192 cell ``[tr,tg,tb,ta, br,bg,bb,ba]``; kitty (``graphics``\nset): ``frames`` are transmit escapes and ``placeholder`` the text grid.",
+ "properties": {
+ "enabled": {
+ "title": "Enabled",
+ "type": "boolean"
+ },
+ "slug": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Slug"
+ },
+ "displayName": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Displayname"
+ },
+ "state": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "State"
+ },
+ "cols": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cols"
+ },
+ "frameMs": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Framems"
+ },
+ "frames": {
+ "anyOf": [
+ {
+ "items": {
+ "items": {
+ "items": {
+ "items": {
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "type": "array"
+ },
+ "type": "array"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Frames"
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Scale"
+ },
+ "graphics": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Graphics"
+ },
+ "imageId": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Imageid"
+ },
+ "color": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Color"
+ },
+ "rows": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Rows"
+ },
+ "placeholder": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Placeholder"
+ }
+ },
+ "required": [
+ "enabled"
+ ],
+ "title": "PetCellsResult",
+ "type": "object"
+ },
+ "PetChangedPayload": {
+ "additionalProperties": true,
+ "description": "``change_watcher._pet_changed_payload`` \u2014 ``pet.info.meta``-shaped; ``{enabled: false}`` when off.",
+ "properties": {
+ "enabled": {
+ "title": "Enabled",
+ "type": "boolean"
+ },
+ "slug": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Slug"
+ },
+ "displayName": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Displayname"
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Scale"
+ },
+ "spritesheetRevision": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Spritesheetrevision"
+ }
+ },
+ "required": [
+ "enabled"
+ ],
+ "title": "PetChangedPayload",
+ "type": "object"
+ },
+ "PetDraft": {
+ "additionalProperties": false,
+ "properties": {
+ "index": {
+ "title": "Index",
+ "type": "integer"
+ },
+ "dataUri": {
+ "title": "Datauri",
+ "type": "string"
+ }
+ },
+ "required": [
+ "index",
+ "dataUri"
+ ],
+ "title": "PetDraft",
+ "type": "object"
+ },
+ "PetExportResult": {
+ "additionalProperties": false,
+ "properties": {
+ "ok": {
+ "title": "Ok",
+ "type": "boolean"
+ },
+ "filename": {
+ "title": "Filename",
+ "type": "string"
+ },
+ "zipBase64": {
+ "title": "Zipbase64",
+ "type": "string"
+ }
+ },
+ "required": [
+ "ok",
+ "filename",
+ "zipBase64"
+ ],
+ "title": "PetExportResult",
+ "type": "object"
+ },
+ "PetGalleryEntry": {
+ "additionalProperties": false,
+ "properties": {
+ "slug": {
+ "title": "Slug",
+ "type": "string"
+ },
+ "displayName": {
+ "title": "Displayname",
+ "type": "string"
+ },
+ "installed": {
+ "title": "Installed",
+ "type": "boolean"
+ },
+ "spritesheetUrl": {
+ "default": "",
+ "title": "Spritesheeturl",
+ "type": "string"
+ },
+ "curated": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Curated"
+ },
+ "generated": {
+ "default": false,
+ "title": "Generated",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "slug",
+ "displayName",
+ "installed"
+ ],
+ "title": "PetGalleryEntry",
+ "type": "object"
+ },
+ "PetGalleryParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "localOnly": {
+ "default": false,
+ "title": "Localonly",
+ "type": "boolean"
+ }
+ },
+ "title": "PetGalleryParams",
+ "type": "object"
+ },
+ "PetGalleryResult": {
+ "additionalProperties": false,
+ "properties": {
+ "enabled": {
+ "title": "Enabled",
+ "type": "boolean"
+ },
+ "active": {
+ "default": "",
+ "title": "Active",
+ "type": "string"
+ },
+ "pets": {
+ "items": {
+ "$ref": "#/components/schemas/PetGalleryEntry"
+ },
+ "title": "Pets",
+ "type": "array"
+ }
+ },
+ "required": [
+ "enabled"
+ ],
+ "title": "PetGalleryResult",
+ "type": "object"
+ },
+ "PetGenProvider": {
+ "additionalProperties": false,
+ "description": "``agent/pet/generate/imagegen.py::list_sprite_providers`` row.",
+ "properties": {
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "label": {
+ "title": "Label",
+ "type": "string"
+ },
+ "default": {
+ "type": "boolean",
+ "title": "Default"
+ }
+ },
+ "required": [
+ "name",
+ "label",
+ "default"
+ ],
+ "title": "PetGenProvider",
+ "type": "object"
+ },
+ "PetGenerateParams": {
+ "additionalProperties": false,
+ "description": "``prompt`` or a ``referenceImage`` data URL is required (the handler answers 4004 without one).",
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "prompt": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Prompt"
+ },
+ "referenceImage": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Referenceimage"
+ },
+ "count": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Count"
+ },
+ "style": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Style"
+ },
+ "provider": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Provider"
+ }
+ },
+ "title": "PetGenerateParams",
+ "type": "object"
+ },
+ "PetGenerateProgressPayload": {
+ "additionalProperties": true,
+ "description": "``methods_session`` pet.generate: token-only init frame, then one per draft.",
+ "properties": {
+ "token": {
+ "title": "Token",
+ "type": "string"
+ },
+ "count": {
+ "title": "Count",
+ "type": "integer"
+ },
+ "index": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Index"
+ },
+ "dataUri": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Datauri"
+ }
+ },
+ "required": [
+ "token",
+ "count"
+ ],
+ "title": "PetGenerateProgressPayload",
+ "type": "object"
+ },
+ "PetGenerateResult": {
+ "additionalProperties": false,
+ "properties": {
+ "ok": {
+ "title": "Ok",
+ "type": "boolean"
+ },
+ "token": {
+ "title": "Token",
+ "type": "string"
+ },
+ "drafts": {
+ "items": {
+ "$ref": "#/components/schemas/PetDraft"
+ },
+ "title": "Drafts",
+ "type": "array"
+ }
+ },
+ "required": [
+ "ok",
+ "token",
+ "drafts"
+ ],
+ "title": "PetGenerateResult",
+ "type": "object"
+ },
+ "PetGenerateStatusResult": {
+ "additionalProperties": false,
+ "properties": {
+ "available": {
+ "title": "Available",
+ "type": "boolean"
+ },
+ "providers": {
+ "items": {
+ "$ref": "#/components/schemas/PetGenProvider"
+ },
+ "title": "Providers",
+ "type": "array"
+ }
+ },
+ "required": [
+ "available",
+ "providers"
+ ],
+ "title": "PetGenerateStatusResult",
+ "type": "object"
+ },
+ "PetHatchParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "token": {
+ "title": "Token",
+ "type": "string"
+ },
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "cancelToken": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Canceltoken"
+ },
+ "index": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Index"
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Description"
+ },
+ "prompt": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Prompt"
+ },
+ "style": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Style"
+ },
+ "provider": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Provider"
+ }
+ },
+ "required": [
+ "token",
+ "name"
+ ],
+ "title": "PetHatchParams",
+ "type": "object"
+ },
+ "PetHatchProgressPayload": {
+ "additionalProperties": true,
+ "description": "``methods_session`` pet.hatch ``_on_progress``: ``{event, detail}`` or the parsed row form.",
+ "properties": {
+ "event": {
+ "title": "Event",
+ "type": "string"
+ },
+ "detail": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Detail"
+ },
+ "state": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "State"
+ },
+ "done": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Done"
+ },
+ "total": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Total"
+ }
+ },
+ "required": [
+ "event"
+ ],
+ "title": "PetHatchProgressPayload",
+ "type": "object"
+ },
+ "PetHatchResult": {
+ "additionalProperties": false,
+ "description": "The hatched pet is installed but NOT active (``pet.select`` adopts, ``pet.remove`` discards).",
+ "properties": {
+ "ok": {
+ "title": "Ok",
+ "type": "boolean"
+ },
+ "slug": {
+ "title": "Slug",
+ "type": "string"
+ },
+ "displayName": {
+ "title": "Displayname",
+ "type": "string"
+ },
+ "warnings": {
+ "items": {},
+ "title": "Warnings",
+ "type": "array"
+ },
+ "pet": {
+ "$ref": "#/components/schemas/PetSpritePayload"
+ }
+ },
+ "required": [
+ "ok",
+ "slug",
+ "displayName",
+ "pet"
+ ],
+ "title": "PetHatchResult",
+ "type": "object"
+ },
+ "PetInfoMetaResult": {
+ "additionalProperties": false,
+ "properties": {
+ "enabled": {
+ "title": "Enabled",
+ "type": "boolean"
+ },
+ "slug": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Slug"
+ },
+ "displayName": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Displayname"
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Scale"
+ },
+ "spritesheetRevision": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Spritesheetrevision"
+ }
+ },
+ "required": [
+ "enabled"
+ ],
+ "title": "PetInfoMetaResult",
+ "type": "object"
+ },
+ "PetInfoParams": {
+ "additionalProperties": false,
+ "description": "``knownRevision``: the spritesheet revision the caller already holds (send-once bytes).",
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "knownRevision": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Knownrevision"
+ }
+ },
+ "title": "PetInfoParams",
+ "type": "object"
+ },
+ "PetInfoResult": {
+ "additionalProperties": true,
+ "description": "``server._pet_sprite_payload`` behind ``enabled``; every sprite field is absent when the pet\ndisplay is off, ``spritesheetBase64`` is elided when ``spritesheetUnchanged``.",
+ "properties": {
+ "enabled": {
+ "title": "Enabled",
+ "type": "boolean"
+ },
+ "slug": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Slug"
+ },
+ "displayName": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Displayname"
+ },
+ "mime": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Mime"
+ },
+ "spritesheetBase64": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Spritesheetbase64"
+ },
+ "spritesheetRevision": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Spritesheetrevision"
+ },
+ "spritesheetUnchanged": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Spritesheetunchanged"
+ },
+ "frameW": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Framew"
+ },
+ "frameH": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Frameh"
+ },
+ "framesPerState": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Framesperstate"
+ },
+ "framesByState": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "type": "integer"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Framesbystate"
+ },
+ "framesByRow": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "type": "integer"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Framesbyrow"
+ },
+ "loopMs": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Loopms"
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Scale"
+ },
+ "stateRows": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Staterows"
+ }
+ },
+ "required": [
+ "enabled"
+ ],
+ "title": "PetInfoResult",
+ "type": "object"
+ },
+ "PetRenameParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "slug": {
+ "title": "Slug",
+ "type": "string"
+ },
+ "name": {
+ "title": "Name",
+ "type": "string"
+ }
+ },
+ "required": [
+ "slug",
+ "name"
+ ],
+ "title": "PetRenameParams",
+ "type": "object"
+ },
+ "PetScaleParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "scale": {
+ "default": null,
+ "title": "Scale"
+ }
+ },
+ "title": "PetScaleParams",
+ "type": "object"
+ },
+ "PetScaleResult": {
+ "additionalProperties": false,
+ "properties": {
+ "ok": {
+ "title": "Ok",
+ "type": "boolean"
+ },
+ "scale": {
+ "title": "Scale",
+ "type": "number"
+ }
+ },
+ "required": [
+ "ok",
+ "scale"
+ ],
+ "title": "PetScaleResult",
+ "type": "object"
+ },
+ "PetSlugParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "slug": {
+ "title": "Slug",
+ "type": "string"
+ }
+ },
+ "required": [
+ "slug"
+ ],
+ "title": "PetSlugParams",
+ "type": "object"
+ },
+ "PetSlugResult": {
+ "additionalProperties": false,
+ "properties": {
+ "ok": {
+ "title": "Ok",
+ "type": "boolean"
+ },
+ "slug": {
+ "title": "Slug",
+ "type": "string"
+ },
+ "displayName": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Displayname"
+ }
+ },
+ "required": [
+ "ok",
+ "slug"
+ ],
+ "title": "PetSlugResult",
+ "type": "object"
+ },
+ "PetSpritePayload": {
+ "additionalProperties": false,
+ "properties": {
+ "slug": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Slug"
+ },
+ "displayName": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Displayname"
+ },
+ "mime": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Mime"
+ },
+ "spritesheetBase64": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Spritesheetbase64"
+ },
+ "spritesheetRevision": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Spritesheetrevision"
+ },
+ "frameW": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Framew"
+ },
+ "frameH": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Frameh"
+ },
+ "framesPerState": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Framesperstate"
+ },
+ "framesByState": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "type": "integer"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Framesbystate"
+ },
+ "framesByRow": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "type": "integer"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Framesbyrow"
+ },
+ "loopMs": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Loopms"
+ },
+ "scale": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Scale"
+ },
+ "stateRows": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Staterows"
+ }
+ },
+ "title": "PetSpritePayload",
+ "type": "object"
+ },
+ "PetThumbParams": {
+ "additionalProperties": false,
+ "description": "``url``: spritesheet source for a not-yet-installed pet.",
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "slug": {
+ "title": "Slug",
+ "type": "string"
+ },
+ "url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Url"
+ }
+ },
+ "required": [
+ "slug"
+ ],
+ "title": "PetThumbParams",
+ "type": "object"
+ },
+ "PetThumbResult": {
+ "additionalProperties": false,
+ "properties": {
+ "ok": {
+ "title": "Ok",
+ "type": "boolean"
+ },
+ "slug": {
+ "title": "Slug",
+ "type": "string"
+ },
+ "dataUri": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Datauri"
+ }
+ },
+ "required": [
+ "ok",
+ "slug"
+ ],
+ "title": "PetThumbResult",
+ "type": "object"
+ },
+ "PingParams": {
+ "additionalProperties": false,
+ "properties": {},
+ "title": "PingParams",
+ "type": "object"
+ },
+ "PingResult": {
+ "additionalProperties": false,
+ "properties": {
+ "pong": {
+ "title": "Pong",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "pong"
+ ],
+ "title": "PingResult",
+ "type": "object"
+ },
+ "PluginsAction": {
+ "enum": [
+ "list",
+ "toggle",
+ "install",
+ "update"
+ ],
+ "title": "PluginsAction",
+ "type": "string"
+ },
+ "PluginsListParams": {
+ "additionalProperties": false,
+ "properties": {},
+ "title": "PluginsListParams",
+ "type": "object"
+ },
+ "PluginsListResult": {
+ "additionalProperties": false,
+ "properties": {
+ "plugins": {
+ "items": {
+ "$ref": "#/components/schemas/LegacyPluginRow"
+ },
+ "title": "Plugins",
+ "type": "array"
+ }
+ },
+ "required": [
+ "plugins"
+ ],
+ "title": "PluginsListResult",
+ "type": "object"
+ },
+ "PluginsManageParams": {
+ "additionalProperties": false,
+ "description": "``toggle``: ``key``/``name`` + ``enable``; ``install``: ``identifier``/``repo`` or ``catalog_name``\n(+ ``force``, ``enable``, ``ref``); ``update``: ``name``.",
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "action": {
+ "$ref": "#/components/schemas/PluginsAction",
+ "default": "list"
+ },
+ "key": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Key"
+ },
+ "name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Name"
+ },
+ "enable": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Enable"
+ },
+ "identifier": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Identifier"
+ },
+ "repo": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Repo"
+ },
+ "catalog_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Catalog Name"
+ },
+ "force": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Force"
+ },
+ "ref": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Ref"
+ }
+ },
+ "title": "PluginsManageParams",
+ "type": "object"
+ },
+ "PluginsManageResult": {
+ "additionalProperties": false,
+ "description": "``list`` \u2192 ``plugins`` + counts; ``toggle`` \u2192 ``ok``/``unchanged``/``name``/``plugin``;\n``install`` \u2192 ``hermes_cli.plugins_cmd.dashboard_install_plugin``'s ok payload; ``update`` \u2192\n``ok``/``unchanged``/``sha``.",
+ "properties": {
+ "plugins": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/components/schemas/AgentPluginRow"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Plugins"
+ },
+ "user_count": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "User Count"
+ },
+ "bundled_count": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Bundled Count"
+ },
+ "ok": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Ok"
+ },
+ "unchanged": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Unchanged"
+ },
+ "name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Name"
+ },
+ "plugin": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/AgentPluginRow"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "plugin_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Plugin Name"
+ },
+ "warnings": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Warnings"
+ },
+ "missing_env": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Missing Env"
+ },
+ "after_install_path": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "After Install Path"
+ },
+ "enabled": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Enabled"
+ },
+ "sha": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Sha"
+ }
+ },
+ "title": "PluginsManageResult",
+ "type": "object"
+ },
+ "PreviewActRequestParams": {
+ "additionalProperties": false,
+ "description": "``tools/drive_preview_tool.py`` and ``tools/annotate_preview_tool.py`` field sets.",
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "action": {
+ "title": "Action",
+ "type": "string"
+ },
+ "ref": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Ref"
+ },
+ "selector": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Selector"
+ },
+ "text": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Text"
+ },
+ "key": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Key"
+ },
+ "submit": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Submit"
+ },
+ "full": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Full"
+ },
+ "to": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "To"
+ },
+ "amount": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Amount"
+ },
+ "max": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Max"
+ }
+ },
+ "required": [
+ "session_id",
+ "action"
+ ],
+ "title": "PreviewActRequestParams",
+ "type": "object"
+ },
+ "PreviewClosePayload": {
+ "additionalProperties": false,
+ "description": "``tools/preview_tool.py`` / ``tools/close_preview_tool.py``; ``url`` '' closes every tab.",
+ "properties": {
+ "url": {
+ "default": "",
+ "title": "Url",
+ "type": "string"
+ }
+ },
+ "title": "PreviewClosePayload",
+ "type": "object"
+ },
+ "PreviewOpenPayload": {
+ "additionalProperties": false,
+ "description": "``tools/open_preview_tool.py``.",
+ "properties": {
+ "url": {
+ "title": "Url",
+ "type": "string"
+ },
+ "label": {
+ "default": "",
+ "title": "Label",
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ],
+ "title": "PreviewOpenPayload",
+ "type": "object"
+ },
+ "PreviewRestartParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "url": {
+ "title": "Url",
+ "type": "string"
+ },
+ "cwd": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cwd"
+ },
+ "context": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Context"
+ }
+ },
+ "required": [
+ "session_id",
+ "url"
+ ],
+ "title": "PreviewRestartParams",
+ "type": "object"
+ },
+ "PreviewRestartProgressPayload": {
+ "additionalProperties": false,
+ "description": "``methods_prompt`` restart body + ``agent_callbacks._preview_restart_callbacks``.",
+ "properties": {
+ "task_id": {
+ "title": "Task Id",
+ "type": "string"
+ },
+ "text": {
+ "title": "Text",
+ "type": "string"
+ },
+ "level": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Level"
+ }
+ },
+ "required": [
+ "task_id",
+ "text"
+ ],
+ "title": "PreviewRestartProgressPayload",
+ "type": "object"
+ },
+ "ProcessEntry": {
+ "additionalProperties": true,
+ "description": "``tools/process_registry.py::list_sessions`` row plus the gateway's ``output_tail``.",
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "command": {
+ "default": "",
+ "title": "Command",
+ "type": "string"
+ },
+ "cwd": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cwd"
+ },
+ "pid": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Pid"
+ },
+ "owner_task_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Owner Task Id"
+ },
+ "started_at": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Started At"
+ },
+ "uptime_seconds": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Uptime Seconds"
+ },
+ "status": {
+ "default": "running",
+ "title": "Status",
+ "type": "string"
+ },
+ "output_preview": {
+ "default": "",
+ "title": "Output Preview",
+ "type": "string"
+ },
+ "output_tail": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Output Tail"
+ },
+ "session_scoped": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Session Scoped"
+ },
+ "watch_patterns": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Watch Patterns"
+ },
+ "watch_hit": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Watch Hit"
+ },
+ "notify_on_complete": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Notify On Complete"
+ },
+ "exit_code": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Exit Code"
+ },
+ "detached": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Detached"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "ProcessEntry",
+ "type": "object"
+ },
+ "ProcessKillParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "process_id": {
+ "title": "Process Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "required": [
+ "session_id",
+ "process_id"
+ ],
+ "title": "ProcessKillParams",
+ "type": "object"
+ },
+ "ProcessKillResult": {
+ "additionalProperties": true,
+ "description": "``tools/process_registry.py::kill_process`` snapshot; ``error`` rides on the failure statuses.",
+ "properties": {
+ "status": {
+ "$ref": "#/components/schemas/ProcessKillStatus"
+ },
+ "session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Session Id"
+ },
+ "command": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Command"
+ },
+ "exit_code": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Exit Code"
+ },
+ "completion_reason": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Completion Reason"
+ },
+ "termination_source": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Termination Source"
+ },
+ "output": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Output"
+ },
+ "error": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Error"
+ }
+ },
+ "required": [
+ "status"
+ ],
+ "title": "ProcessKillResult",
+ "type": "object"
+ },
+ "ProcessKillStatus": {
+ "enum": [
+ "killed",
+ "already_exited",
+ "not_found",
+ "error"
+ ],
+ "title": "ProcessKillStatus",
+ "type": "string"
+ },
+ "ProcessListParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "ProcessListParams",
+ "type": "object"
+ },
+ "ProcessListResult": {
+ "additionalProperties": false,
+ "properties": {
+ "processes": {
+ "items": {
+ "$ref": "#/components/schemas/ProcessEntry"
+ },
+ "title": "Processes",
+ "type": "array"
+ }
+ },
+ "title": "ProcessListResult",
+ "type": "object"
+ },
+ "ProcessStopParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Session Id"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "title": "ProcessStopParams",
+ "type": "object"
+ },
+ "ProcessStopResult": {
+ "additionalProperties": false,
+ "properties": {
+ "killed": {
+ "title": "Killed",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "killed"
+ ],
+ "title": "ProcessStopResult",
+ "type": "object"
+ },
+ "ProfileCanonicalSession": {
+ "additionalProperties": false,
+ "description": "The profile's \"Bot Chat\" registry row; ``resolved_id`` is the live compression tip.",
+ "properties": {
+ "id": {
+ "title": "Id",
+ "type": "string"
+ },
+ "resolved_id": {
+ "title": "Resolved Id",
+ "type": "string"
+ },
+ "root_title": {
+ "default": "",
+ "title": "Root Title",
+ "type": "string"
+ },
+ "title": {
+ "default": "",
+ "title": "Title",
+ "type": "string"
+ },
+ "preview": {
+ "default": "",
+ "title": "Preview",
+ "type": "string"
+ },
+ "started_at": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "integer"
+ }
+ ],
+ "default": 0,
+ "title": "Started At"
+ },
+ "last_active": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "integer"
+ }
+ ],
+ "default": 0,
+ "title": "Last Active"
+ },
+ "message_count": {
+ "default": 0,
+ "title": "Message Count",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "id",
+ "resolved_id"
+ ],
+ "title": "ProfileCanonicalSession",
+ "type": "object"
+ },
+ "ProfileMirrored": {
+ "additionalProperties": false,
+ "description": "What was copied from the launch profile; ``auth`` is ``\"shared\"`` under ``share_auth``.",
+ "properties": {
+ "env": {
+ "default": false,
+ "title": "Env",
+ "type": "boolean"
+ },
+ "auth": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "const": "shared",
+ "type": "string"
+ }
+ ],
+ "default": false,
+ "title": "Auth"
+ },
+ "model_inherited": {
+ "default": false,
+ "title": "Model Inherited",
+ "type": "boolean"
+ },
+ "voice": {
+ "default": false,
+ "title": "Voice",
+ "type": "boolean"
+ }
+ },
+ "title": "ProfileMirrored",
+ "type": "object"
+ },
+ "ProfileModelPin": {
+ "additionalProperties": false,
+ "properties": {
+ "provider": {
+ "default": "",
+ "title": "Provider",
+ "type": "string"
+ },
+ "default": {
+ "type": "string",
+ "default": "",
+ "title": "Default"
+ }
+ },
+ "title": "ProfileModelPin",
+ "type": "object"
+ },
+ "ProfileNameParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Name"
+ }
+ },
+ "title": "ProfileNameParams",
+ "type": "object"
+ },
+ "ProfileParams": {
+ "additionalProperties": false,
+ "description": "Any method the desktop may route to a named profile (``requestGatewayForProfile`` adds ``profile``).",
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "title": "ProfileParams",
+ "type": "object"
+ },
+ "ProfileRow": {
+ "additionalProperties": false,
+ "description": "One roster row; the session fields are present only with ``include_sessions``.",
+ "properties": {
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "path": {
+ "title": "Path",
+ "type": "string"
+ },
+ "is_default": {
+ "default": false,
+ "title": "Is Default",
+ "type": "boolean"
+ },
+ "model": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Model"
+ },
+ "provider": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Provider"
+ },
+ "description": {
+ "default": "",
+ "title": "Description",
+ "type": "string"
+ },
+ "display_name": {
+ "default": "",
+ "title": "Display Name",
+ "type": "string"
+ },
+ "skill_count": {
+ "default": 0,
+ "title": "Skill Count",
+ "type": "integer"
+ },
+ "last_session": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/ProfileSessionPreview"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "worker_session": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/ProfileWorkerSession"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "canonical_session": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/ProfileCanonicalSession"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "ui_meta_revisions": {
+ "additionalProperties": {
+ "type": "integer"
+ },
+ "title": "Ui Meta Revisions",
+ "type": "object"
+ },
+ "ui_meta": {
+ "anyOf": [
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Ui Meta"
+ },
+ "has_avatar": {
+ "default": false,
+ "title": "Has Avatar",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "name",
+ "path"
+ ],
+ "title": "ProfileRow",
+ "type": "object"
+ },
+ "ProfileSessionPreview": {
+ "additionalProperties": false,
+ "description": "Newest human-facing session of a profile (``_latest_profile_session_rows``).",
+ "properties": {
+ "id": {
+ "title": "Id",
+ "type": "string"
+ },
+ "title": {
+ "default": "",
+ "title": "Title",
+ "type": "string"
+ },
+ "preview": {
+ "default": "",
+ "title": "Preview",
+ "type": "string"
+ },
+ "started_at": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "integer"
+ }
+ ],
+ "default": 0,
+ "title": "Started At"
+ },
+ "last_active": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "integer"
+ }
+ ],
+ "default": 0,
+ "title": "Last Active"
+ },
+ "message_count": {
+ "default": 0,
+ "title": "Message Count",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "id"
+ ],
+ "title": "ProfileSessionPreview",
+ "type": "object"
+ },
+ "ProfileWorkerSession": {
+ "additionalProperties": false,
+ "description": "Newest kanban/tool worker row, so rosters can show a profile as working.",
+ "properties": {
+ "id": {
+ "title": "Id",
+ "type": "string"
+ },
+ "source": {
+ "default": "",
+ "title": "Source",
+ "type": "string"
+ },
+ "title": {
+ "default": "",
+ "title": "Title",
+ "type": "string"
+ },
+ "last_active": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "integer"
+ }
+ ],
+ "default": 0,
+ "title": "Last Active"
+ }
+ },
+ "required": [
+ "id"
+ ],
+ "title": "ProfileWorkerSession",
+ "type": "object"
+ },
+ "ProfilesConfigureApplied": {
+ "additionalProperties": false,
+ "description": "Per-section outcome; only the sections the request carried are present.",
+ "properties": {
+ "ui_meta": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Ui Meta"
+ },
+ "ui_meta_revisions": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "type": "integer"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Ui Meta Revisions"
+ },
+ "ui_meta_conflicts": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "$ref": "#/components/schemas/UiMetaConflict"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Ui Meta Conflicts"
+ },
+ "soul": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Soul"
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Description"
+ },
+ "model": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Model"
+ },
+ "skills": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Skills"
+ },
+ "toolsets": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Toolsets"
+ },
+ "mcp_servers": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Mcp Servers"
+ }
+ },
+ "title": "ProfilesConfigureApplied",
+ "type": "object"
+ },
+ "ProfilesConfigureParams": {
+ "additionalProperties": false,
+ "description": "Sections are independent; ``ui_meta_expected_revisions`` is a per-key compare-and-swap.",
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Name"
+ },
+ "ui_meta": {
+ "anyOf": [
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Ui Meta"
+ },
+ "ui_meta_expected_revisions": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "type": "integer"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Ui Meta Expected Revisions"
+ },
+ "soul": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Soul"
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Description"
+ },
+ "model": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Model"
+ },
+ "provider": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Provider"
+ },
+ "confirm_expensive_model": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Confirm Expensive Model"
+ },
+ "disabled_skills": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Disabled Skills"
+ },
+ "enabled_toolsets": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Enabled Toolsets"
+ },
+ "enabled_mcp_servers": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Enabled Mcp Servers"
+ }
+ },
+ "title": "ProfilesConfigureParams",
+ "type": "object"
+ },
+ "ProfilesConfigureResult": {
+ "additionalProperties": false,
+ "description": "``confirm_required`` mirrors ``config.set``: a guarded model pick wrote nothing yet.",
+ "properties": {
+ "ok": {
+ "title": "Ok",
+ "type": "boolean"
+ },
+ "applied": {
+ "$ref": "#/components/schemas/ProfilesConfigureApplied"
+ },
+ "confirm_required": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Confirm Required"
+ },
+ "confirm_message": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Confirm Message"
+ }
+ },
+ "required": [
+ "ok",
+ "applied"
+ ],
+ "title": "ProfilesConfigureResult",
+ "type": "object"
+ },
+ "ProfilesCreateParams": {
+ "additionalProperties": false,
+ "description": "``clone_from`` omitted = fresh profile + bundled skills; ``mirror_credentials`` defaults on\nso a headless bot has a provider.",
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Description"
+ },
+ "clone_from": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Clone From"
+ },
+ "clone_all": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Clone All"
+ },
+ "clone_channels": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Clone Channels"
+ },
+ "no_skills": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "No Skills"
+ },
+ "no_alias": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "No Alias"
+ },
+ "soul": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Soul"
+ },
+ "model": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Model"
+ },
+ "provider": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Provider"
+ },
+ "share_auth": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Share Auth"
+ },
+ "mirror_credentials": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Mirror Credentials"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "title": "ProfilesCreateParams",
+ "type": "object"
+ },
+ "ProfilesCreateResult": {
+ "additionalProperties": false,
+ "properties": {
+ "ok": {
+ "default": true,
+ "title": "Ok",
+ "type": "boolean"
+ },
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "path": {
+ "title": "Path",
+ "type": "string"
+ },
+ "soul_written": {
+ "default": false,
+ "title": "Soul Written",
+ "type": "boolean"
+ },
+ "model_set": {
+ "default": false,
+ "title": "Model Set",
+ "type": "boolean"
+ },
+ "mirrored": {
+ "$ref": "#/components/schemas/ProfileMirrored"
+ }
+ },
+ "required": [
+ "name",
+ "path",
+ "mirrored"
+ ],
+ "title": "ProfilesCreateResult",
+ "type": "object"
+ },
+ "ProfilesDescribeResult": {
+ "additionalProperties": false,
+ "description": "Editor snapshot; ``toolsets_pinned`` says whether ``tools.enabled_toolsets`` is explicit.",
+ "properties": {
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "description": {
+ "default": "",
+ "title": "Description",
+ "type": "string"
+ },
+ "soul": {
+ "default": "",
+ "title": "Soul",
+ "type": "string"
+ },
+ "model": {
+ "$ref": "#/components/schemas/ProfileModelPin"
+ },
+ "skills": {
+ "items": {
+ "$ref": "#/components/schemas/CapabilityEntry"
+ },
+ "title": "Skills",
+ "type": "array"
+ },
+ "toolsets": {
+ "items": {
+ "$ref": "#/components/schemas/ToolsetEntry"
+ },
+ "title": "Toolsets",
+ "type": "array"
+ },
+ "toolsets_pinned": {
+ "default": false,
+ "title": "Toolsets Pinned",
+ "type": "boolean"
+ },
+ "mcp_servers": {
+ "items": {
+ "$ref": "#/components/schemas/McpServerEntry"
+ },
+ "title": "Mcp Servers",
+ "type": "array"
+ }
+ },
+ "required": [
+ "name",
+ "model"
+ ],
+ "title": "ProfilesDescribeResult",
+ "type": "object"
+ },
+ "ProfilesGetAssetParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Name"
+ },
+ "asset": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Asset"
+ }
+ },
+ "title": "ProfilesGetAssetParams",
+ "type": "object"
+ },
+ "ProfilesGetAssetResult": {
+ "additionalProperties": false,
+ "description": "Absent is ``found: false``, not an error.",
+ "properties": {
+ "found": {
+ "title": "Found",
+ "type": "boolean"
+ },
+ "mime": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Mime"
+ },
+ "size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Size"
+ },
+ "data": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Data"
+ }
+ },
+ "required": [
+ "found"
+ ],
+ "title": "ProfilesGetAssetResult",
+ "type": "object"
+ },
+ "ProfilesListParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "include_sessions": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Include Sessions"
+ }
+ },
+ "title": "ProfilesListParams",
+ "type": "object"
+ },
+ "ProfilesListResult": {
+ "additionalProperties": false,
+ "description": "``bot_mode_protocol`` tells clients this backend injects the teammate protocol itself.",
+ "properties": {
+ "profiles": {
+ "items": {
+ "$ref": "#/components/schemas/ProfileRow"
+ },
+ "title": "Profiles",
+ "type": "array"
+ },
+ "bot_mode_protocol": {
+ "default": true,
+ "title": "Bot Mode Protocol",
+ "type": "boolean"
+ }
+ },
+ "title": "ProfilesListResult",
+ "type": "object"
+ },
+ "ProfilesRememberOnboardingParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "answers": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/OnboardingAnswers"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ }
+ },
+ "title": "ProfilesRememberOnboardingParams",
+ "type": "object"
+ },
+ "ProfilesRememberOnboardingResult": {
+ "additionalProperties": false,
+ "properties": {
+ "saved": {
+ "default": true,
+ "title": "Saved",
+ "type": "boolean"
+ },
+ "profile": {
+ "default": "default",
+ "title": "Profile",
+ "type": "string"
+ },
+ "target": {
+ "default": "user",
+ "title": "Target",
+ "type": "string"
+ }
+ },
+ "title": "ProfilesRememberOnboardingResult",
+ "type": "object"
+ },
+ "ProfilesSetAssetParams": {
+ "additionalProperties": false,
+ "description": "``data`` is a data URL or bare base64 (PNG/JPEG/WebP, sniffed); ``clear`` deletes instead.",
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Name"
+ },
+ "asset": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Asset"
+ },
+ "data": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Data"
+ },
+ "clear": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Clear"
+ }
+ },
+ "title": "ProfilesSetAssetParams",
+ "type": "object"
+ },
+ "ProfilesSetAssetResult": {
+ "additionalProperties": false,
+ "properties": {
+ "ok": {
+ "default": true,
+ "title": "Ok",
+ "type": "boolean"
+ },
+ "asset": {
+ "title": "Asset",
+ "type": "string"
+ },
+ "size": {
+ "default": 0,
+ "title": "Size",
+ "type": "integer"
+ },
+ "removed": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Removed"
+ }
+ },
+ "required": [
+ "asset"
+ ],
+ "title": "ProfilesSetAssetResult",
+ "type": "object"
+ },
+ "ProjectFacts": {
+ "additionalProperties": false,
+ "description": "``agent/coding_context.py::project_facts_for`` \u2014 the system prompt's coding-context detection.",
+ "properties": {
+ "root": {
+ "title": "Root",
+ "type": "string"
+ },
+ "manifests": {
+ "items": {
+ "type": "string"
+ },
+ "title": "Manifests",
+ "type": "array"
+ },
+ "packageManagers": {
+ "items": {
+ "type": "string"
+ },
+ "title": "Packagemanagers",
+ "type": "array"
+ },
+ "verifyCommands": {
+ "items": {
+ "type": "string"
+ },
+ "title": "Verifycommands",
+ "type": "array"
+ },
+ "contextFiles": {
+ "items": {
+ "type": "string"
+ },
+ "title": "Contextfiles",
+ "type": "array"
+ }
+ },
+ "required": [
+ "root",
+ "manifests",
+ "packageManagers",
+ "verifyCommands",
+ "contextFiles"
+ ],
+ "title": "ProjectFacts",
+ "type": "object"
+ },
+ "ProjectFactsParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "cwd": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cwd"
+ }
+ },
+ "title": "ProjectFactsParams",
+ "type": "object"
+ },
+ "ProjectFactsResult": {
+ "additionalProperties": false,
+ "description": "``facts`` null outside a workspace (or when detection failed).",
+ "properties": {
+ "facts": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/ProjectFacts"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ }
+ },
+ "title": "ProjectFactsResult",
+ "type": "object"
+ },
+ "ProjectFolder": {
+ "additionalProperties": false,
+ "description": "``hermes_cli/projects_db.py::ProjectFolder.to_dict``.",
+ "properties": {
+ "path": {
+ "title": "Path",
+ "type": "string"
+ },
+ "label": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Label"
+ },
+ "is_primary": {
+ "default": false,
+ "title": "Is Primary",
+ "type": "boolean"
+ },
+ "added_at": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Added At"
+ }
+ },
+ "required": [
+ "path"
+ ],
+ "title": "ProjectFolder",
+ "type": "object"
+ },
+ "ProjectFolderParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "id": {
+ "title": "Id",
+ "type": "string"
+ },
+ "path": {
+ "title": "Path",
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "path"
+ ],
+ "title": "ProjectFolderParams",
+ "type": "object"
+ },
+ "ProjectIdParams": {
+ "additionalProperties": false,
+ "description": "Any method addressed at one stored project (``5062`` when the id resolves to nothing).",
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "id": {
+ "title": "Id",
+ "type": "string"
+ }
+ },
+ "required": [
+ "id"
+ ],
+ "title": "ProjectIdParams",
+ "type": "object"
+ },
+ "ProjectInfo": {
+ "additionalProperties": false,
+ "description": "``hermes_cli/projects_db.py::Project.to_dict`` \u2014 one stored project with its folders.",
+ "properties": {
+ "id": {
+ "title": "Id",
+ "type": "string"
+ },
+ "slug": {
+ "title": "Slug",
+ "type": "string"
+ },
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Description"
+ },
+ "icon": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Icon"
+ },
+ "color": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Color"
+ },
+ "board_slug": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Board Slug"
+ },
+ "primary_path": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Primary Path"
+ },
+ "archived": {
+ "default": false,
+ "title": "Archived",
+ "type": "boolean"
+ },
+ "created_at": {
+ "title": "Created At",
+ "type": "integer"
+ },
+ "folders": {
+ "items": {
+ "$ref": "#/components/schemas/ProjectFolder"
+ },
+ "title": "Folders",
+ "type": "array"
+ }
+ },
+ "required": [
+ "id",
+ "slug",
+ "name",
+ "created_at"
+ ],
+ "title": "ProjectInfo",
+ "type": "object"
+ },
+ "ProjectRef": {
+ "additionalProperties": false,
+ "description": "``tui_gateway/server.py::_project_info_for_cwd``.",
+ "properties": {
+ "id": {
+ "title": "Id",
+ "type": "string"
+ },
+ "slug": {
+ "title": "Slug",
+ "type": "string"
+ },
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "primary_path": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Primary Path"
+ }
+ },
+ "required": [
+ "id",
+ "slug",
+ "name"
+ ],
+ "title": "ProjectRef",
+ "type": "object"
+ },
+ "ProjectResult": {
+ "additionalProperties": false,
+ "properties": {
+ "project": {
+ "$ref": "#/components/schemas/ProjectInfo"
+ }
+ },
+ "required": [
+ "project"
+ ],
+ "title": "ProjectResult",
+ "type": "object"
+ },
+ "ProjectTreeLane": {
+ "additionalProperties": false,
+ "description": "One branch / worktree / kanban lane inside a repo; ``sessions`` is empty unless hydrated.",
+ "properties": {
+ "id": {
+ "title": "Id",
+ "type": "string"
+ },
+ "label": {
+ "title": "Label",
+ "type": "string"
+ },
+ "path": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Path"
+ },
+ "isMain": {
+ "default": false,
+ "title": "Ismain",
+ "type": "boolean"
+ },
+ "isKanban": {
+ "default": false,
+ "title": "Iskanban",
+ "type": "boolean"
+ },
+ "sessions": {
+ "items": {
+ "$ref": "#/components/schemas/ProjectTreeSession"
+ },
+ "title": "Sessions",
+ "type": "array"
+ }
+ },
+ "required": [
+ "id",
+ "label"
+ ],
+ "title": "ProjectTreeLane",
+ "type": "object"
+ },
+ "ProjectTreeNode": {
+ "additionalProperties": false,
+ "description": "``project_tree._project_node`` \u2014 explicit, auto (git root) or the synthetic Home bucket.",
+ "properties": {
+ "id": {
+ "title": "Id",
+ "type": "string"
+ },
+ "label": {
+ "title": "Label",
+ "type": "string"
+ },
+ "path": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Path"
+ },
+ "color": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Color"
+ },
+ "icon": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Icon"
+ },
+ "isAuto": {
+ "default": false,
+ "title": "Isauto",
+ "type": "boolean"
+ },
+ "isNoProject": {
+ "default": false,
+ "title": "Isnoproject",
+ "type": "boolean"
+ },
+ "sessionCount": {
+ "default": 0,
+ "title": "Sessioncount",
+ "type": "integer"
+ },
+ "lastActive": {
+ "default": 0.0,
+ "title": "Lastactive",
+ "type": "number"
+ },
+ "totalTokens": {
+ "default": 0,
+ "title": "Totaltokens",
+ "type": "integer"
+ },
+ "totalCostUsd": {
+ "default": 0.0,
+ "title": "Totalcostusd",
+ "type": "number"
+ },
+ "repos": {
+ "items": {
+ "$ref": "#/components/schemas/ProjectTreeRepo"
+ },
+ "title": "Repos",
+ "type": "array"
+ },
+ "previewSessions": {
+ "items": {
+ "$ref": "#/components/schemas/ProjectTreeSession"
+ },
+ "title": "Previewsessions",
+ "type": "array"
+ }
+ },
+ "required": [
+ "id",
+ "label"
+ ],
+ "title": "ProjectTreeNode",
+ "type": "object"
+ },
+ "ProjectTreeRepo": {
+ "additionalProperties": false,
+ "properties": {
+ "id": {
+ "title": "Id",
+ "type": "string"
+ },
+ "label": {
+ "title": "Label",
+ "type": "string"
+ },
+ "path": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Path"
+ },
+ "groups": {
+ "items": {
+ "$ref": "#/components/schemas/ProjectTreeLane"
+ },
+ "title": "Groups",
+ "type": "array"
+ },
+ "sessionCount": {
+ "default": 0,
+ "title": "Sessioncount",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "id",
+ "label"
+ ],
+ "title": "ProjectTreeRepo",
+ "type": "object"
+ },
+ "ProjectTreeSession": {
+ "additionalProperties": true,
+ "description": "``methods_projects._project_tree_row`` + ``project_tree.stamp_profile``: the minimal row the\nsidebar renders, stamped with the profile it belongs to.",
+ "properties": {
+ "id": {
+ "title": "Id",
+ "type": "string"
+ },
+ "title": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Title"
+ },
+ "preview": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Preview"
+ },
+ "source": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Source"
+ },
+ "model": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Model"
+ },
+ "started_at": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Started At"
+ },
+ "ended_at": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Ended At"
+ },
+ "last_active": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Last Active"
+ },
+ "message_count": {
+ "default": 0,
+ "title": "Message Count",
+ "type": "integer"
+ },
+ "tool_call_count": {
+ "default": 0,
+ "title": "Tool Call Count",
+ "type": "integer"
+ },
+ "input_tokens": {
+ "default": 0,
+ "title": "Input Tokens",
+ "type": "integer"
+ },
+ "output_tokens": {
+ "default": 0,
+ "title": "Output Tokens",
+ "type": "integer"
+ },
+ "is_active": {
+ "default": false,
+ "title": "Is Active",
+ "type": "boolean"
+ },
+ "cwd": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cwd"
+ },
+ "git_branch": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Git Branch"
+ },
+ "git_repo_root": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Git Repo Root"
+ },
+ "parent_session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Parent Session Id"
+ },
+ "pinned": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Pinned"
+ },
+ "unread": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Unread"
+ },
+ "archived": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Archived"
+ },
+ "actual_cost_usd": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Actual Cost Usd"
+ },
+ "estimated_cost_usd": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Estimated Cost Usd"
+ },
+ "handoff_platform": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Handoff Platform"
+ },
+ "handoff_state": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Handoff State"
+ },
+ "_lineage_root_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Lineage Root Id"
+ },
+ "_lineage_ids": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Lineage Ids"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "required": [
+ "id"
+ ],
+ "title": "ProjectTreeSession",
+ "type": "object"
+ },
+ "ProjectsAddFolderParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "id": {
+ "title": "Id",
+ "type": "string"
+ },
+ "path": {
+ "title": "Path",
+ "type": "string"
+ },
+ "label": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Label"
+ },
+ "is_primary": {
+ "default": false,
+ "title": "Is Primary",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "id",
+ "path"
+ ],
+ "title": "ProjectsAddFolderParams",
+ "type": "object"
+ },
+ "ProjectsArchiveParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "id": {
+ "title": "Id",
+ "type": "string"
+ },
+ "restore": {
+ "default": false,
+ "title": "Restore",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "id"
+ ],
+ "title": "ProjectsArchiveParams",
+ "type": "object"
+ },
+ "ProjectsCreateParams": {
+ "additionalProperties": false,
+ "description": "``use`` also activates the new project.",
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "folders": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Folders"
+ },
+ "slug": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Slug"
+ },
+ "primary_path": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Primary Path"
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Description"
+ },
+ "icon": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Icon"
+ },
+ "color": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Color"
+ },
+ "board_slug": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Board Slug"
+ },
+ "use": {
+ "default": false,
+ "title": "Use",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "title": "ProjectsCreateParams",
+ "type": "object"
+ },
+ "ProjectsDiscoverReposParams": {
+ "additionalProperties": false,
+ "description": "``scan`` asks the host to walk the policy roots itself (remote-gateway desktop).",
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "scan": {
+ "default": false,
+ "title": "Scan",
+ "type": "boolean"
+ }
+ },
+ "title": "ProjectsDiscoverReposParams",
+ "type": "object"
+ },
+ "ProjectsDiscoverReposResult": {
+ "additionalProperties": false,
+ "properties": {
+ "repos": {
+ "items": {
+ "$ref": "#/components/schemas/DiscoveredRepo"
+ },
+ "title": "Repos",
+ "type": "array"
+ },
+ "discovery_policy": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/RepoDiscoveryPolicy"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ }
+ },
+ "required": [
+ "repos"
+ ],
+ "title": "ProjectsDiscoverReposResult",
+ "type": "object"
+ },
+ "ProjectsForCwdParams": {
+ "additionalProperties": false,
+ "description": "Absent ``cwd`` resolves the gateway's default completion cwd.",
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "cwd": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cwd"
+ }
+ },
+ "title": "ProjectsForCwdParams",
+ "type": "object"
+ },
+ "ProjectsForCwdResult": {
+ "additionalProperties": false,
+ "properties": {
+ "project": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/ProjectInfo"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "cwd": {
+ "title": "Cwd",
+ "type": "string"
+ },
+ "branch": {
+ "default": "",
+ "title": "Branch",
+ "type": "string"
+ }
+ },
+ "required": [
+ "cwd"
+ ],
+ "title": "ProjectsForCwdResult",
+ "type": "object"
+ },
+ "ProjectsPayload": {
+ "additionalProperties": false,
+ "description": "``methods_projects._projects_payload``: every project (archived included) + the active id.",
+ "properties": {
+ "projects": {
+ "items": {
+ "$ref": "#/components/schemas/ProjectInfo"
+ },
+ "title": "Projects",
+ "type": "array"
+ },
+ "active_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Active Id"
+ }
+ },
+ "required": [
+ "projects"
+ ],
+ "title": "ProjectsPayload",
+ "type": "object"
+ },
+ "ProjectsProjectSessionsParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "project_id": {
+ "title": "Project Id",
+ "type": "string"
+ },
+ "session_limit": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Session Limit"
+ }
+ },
+ "required": [
+ "project_id"
+ ],
+ "title": "ProjectsProjectSessionsParams",
+ "type": "object"
+ },
+ "ProjectsProjectSessionsResult": {
+ "additionalProperties": false,
+ "properties": {
+ "project": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/ProjectTreeNode"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ }
+ },
+ "title": "ProjectsProjectSessionsResult",
+ "type": "object"
+ },
+ "ProjectsRecordReposParams": {
+ "additionalProperties": false,
+ "description": "Repos as ``{root, label}`` objects or bare root strings; entries without a root are skipped.",
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "repos": {
+ "anyOf": [
+ {
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/RecordRepoItem"
+ },
+ {
+ "type": "string"
+ }
+ ]
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Repos"
+ },
+ "discovery_policy": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/RepoDiscoveryPolicyParams"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ }
+ },
+ "title": "ProjectsRecordReposParams",
+ "type": "object"
+ },
+ "ProjectsRecordReposResult": {
+ "additionalProperties": false,
+ "properties": {
+ "repos": {
+ "items": {
+ "$ref": "#/components/schemas/DiscoveredRepo"
+ },
+ "title": "Repos",
+ "type": "array"
+ },
+ "discovery_policy": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/RepoDiscoveryPolicy"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "accepted": {
+ "title": "Accepted",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "repos",
+ "accepted"
+ ],
+ "title": "ProjectsRecordReposResult",
+ "type": "object"
+ },
+ "ProjectsSetActiveParams": {
+ "additionalProperties": false,
+ "description": "No ``id`` (or null) clears the active project.",
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Id"
+ }
+ },
+ "title": "ProjectsSetActiveParams",
+ "type": "object"
+ },
+ "ProjectsTreeParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "preview_limit": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Preview Limit"
+ },
+ "session_limit": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Session Limit"
+ }
+ },
+ "title": "ProjectsTreeParams",
+ "type": "object"
+ },
+ "ProjectsTreeResult": {
+ "additionalProperties": false,
+ "properties": {
+ "projects": {
+ "items": {
+ "$ref": "#/components/schemas/ProjectTreeNode"
+ },
+ "title": "Projects",
+ "type": "array"
+ },
+ "active_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Active Id"
+ },
+ "scoped_session_ids": {
+ "items": {
+ "type": "string"
+ },
+ "title": "Scoped Session Ids",
+ "type": "array"
+ }
+ },
+ "required": [
+ "projects"
+ ],
+ "title": "ProjectsTreeResult",
+ "type": "object"
+ },
+ "ProjectsUpdateParams": {
+ "additionalProperties": false,
+ "description": "Absent keys are left untouched; ``''`` clears ``color`` / ``icon``.",
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "id": {
+ "title": "Id",
+ "type": "string"
+ },
+ "name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Name"
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Description"
+ },
+ "icon": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Icon"
+ },
+ "color": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Color"
+ },
+ "board_slug": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Board Slug"
+ }
+ },
+ "required": [
+ "id"
+ ],
+ "title": "ProjectsUpdateParams",
+ "type": "object"
+ },
+ "PromptSubmitParams": {
+ "additionalProperties": false,
+ "description": "``text`` is normally a string; the relay / hosted paths may hand a structured (parts list)\npayload, and the busy path renders it. Truncation (rewind / edit / regenerate) needs explicit\nconsent: ``confirm_truncate`` plus one durable target (``truncate_before_row_id`` preferred,\n``truncate_before_message_id``, or the legacy ``truncate_before_user_ordinal``).",
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "text": {
+ "default": "",
+ "title": "Text"
+ },
+ "display_kind": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Display Kind"
+ },
+ "interrupted": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Interrupted"
+ },
+ "queued": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Queued"
+ },
+ "surface": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Surface"
+ },
+ "voice_context": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Voice Context"
+ },
+ "truncate_before_user_ordinal": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Truncate Before User Ordinal"
+ },
+ "truncate_before_row_id": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Truncate Before Row Id"
+ },
+ "truncate_before_message_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Truncate Before Message Id"
+ },
+ "confirm_truncate": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Confirm Truncate"
+ },
+ "confirm_empty_truncate": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Confirm Empty Truncate"
+ },
+ "rebind_survivor_row_ids": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Rebind Survivor Row Ids"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "PromptSubmitParams",
+ "type": "object"
+ },
+ "PromptSubmitResult": {
+ "additionalProperties": false,
+ "description": "``status`` is absent only on the typed-stop-phrase reply (``voice_stopped``). After a\ntruncation the survivor row ids let the client rebind its cached ``rowId``s (``None`` map\nentries: drop the cached id). ``turn_isolation`` marks a compute-host dispatch.",
+ "properties": {
+ "status": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/PromptSubmitStatus"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "voice_stopped": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Voice Stopped"
+ },
+ "survivor_user_row_ids": {
+ "anyOf": [
+ {
+ "items": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Survivor User Row Ids"
+ },
+ "survivor_row_id_map": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Survivor Row Id Map"
+ },
+ "turn_isolation": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Turn Isolation"
+ }
+ },
+ "title": "PromptSubmitResult",
+ "type": "object"
+ },
+ "PromptSubmitStatus": {
+ "enum": [
+ "streaming",
+ "queued",
+ "steered",
+ "redirected"
+ ],
+ "title": "PromptSubmitStatus",
+ "type": "string"
+ },
+ "QueuedPrompt": {
+ "additionalProperties": false,
+ "properties": {
+ "user": {
+ "title": "User",
+ "type": "string"
+ }
+ },
+ "required": [
+ "user"
+ ],
+ "title": "QueuedPrompt",
+ "type": "object"
+ },
+ "ReactionAuthor": {
+ "enum": [
+ "user",
+ "agent"
+ ],
+ "title": "ReactionAuthor",
+ "type": "string"
+ },
+ "ReactionPayload": {
+ "additionalProperties": false,
+ "description": "``agent_callbacks`` reaction_callback.",
+ "properties": {
+ "kind": {
+ "title": "Kind",
+ "type": "string"
+ }
+ },
+ "required": [
+ "kind"
+ ],
+ "title": "ReactionPayload",
+ "type": "object"
+ },
+ "ReadRangeRequestParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "start": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Start"
+ },
+ "count": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Count"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "ReadRangeRequestParams",
+ "type": "object"
+ },
+ "RecordRepoItem": {
+ "additionalProperties": false,
+ "properties": {
+ "root": {
+ "title": "Root",
+ "type": "string"
+ },
+ "label": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Label"
+ }
+ },
+ "required": [
+ "root"
+ ],
+ "title": "RecordRepoItem",
+ "type": "object"
+ },
+ "RelayAgentRow": {
+ "additionalProperties": true,
+ "description": "A roster row the Desktop pushes (``tools/bot_relay.py::_normalize_roster_row``); invalid\nrows are dropped server-side, so the shape stays open.",
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "handle": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Handle"
+ },
+ "connection_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Connection Id"
+ },
+ "connection_label": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Connection Label"
+ },
+ "title": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Title"
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Description"
+ },
+ "online": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Online"
+ }
+ },
+ "title": "RelayAgentRow",
+ "type": "object"
+ },
+ "RelayEnvelope": {
+ "additionalProperties": true,
+ "description": "``tools/bot_relay.py::enqueue_envelope``.",
+ "properties": {
+ "id": {
+ "title": "Id",
+ "type": "string"
+ },
+ "created_at": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "number"
+ }
+ ],
+ "title": "Created At"
+ },
+ "from_profile": {
+ "title": "From Profile",
+ "type": "string"
+ },
+ "from_handle": {
+ "title": "From Handle",
+ "type": "string"
+ },
+ "target_connection": {
+ "title": "Target Connection",
+ "type": "string"
+ },
+ "target_profile": {
+ "title": "Target Profile",
+ "type": "string"
+ },
+ "target_handle": {
+ "title": "Target Handle",
+ "type": "string"
+ },
+ "message": {
+ "title": "Message",
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "created_at",
+ "from_profile",
+ "from_handle",
+ "target_connection",
+ "target_profile",
+ "target_handle",
+ "message"
+ ],
+ "title": "RelayEnvelope",
+ "type": "object"
+ },
+ "ReloadEnvParams": {
+ "additionalProperties": false,
+ "properties": {},
+ "title": "ReloadEnvParams",
+ "type": "object"
+ },
+ "ReloadEnvResult": {
+ "additionalProperties": false,
+ "properties": {
+ "updated": {
+ "title": "Updated",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "updated"
+ ],
+ "title": "ReloadEnvResult",
+ "type": "object"
+ },
+ "ReloadMcpParams": {
+ "additionalProperties": false,
+ "description": "Without ``confirm`` the handler may answer ``confirm_required`` (per ``approvals.mcp_reload_confirm``);\n``always`` persists the opt-out; ``rev`` is the config revision the caller wants loaded (coalescing).",
+ "properties": {
+ "session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Session Id"
+ },
+ "confirm": {
+ "default": false,
+ "title": "Confirm",
+ "type": "boolean"
+ },
+ "always": {
+ "default": false,
+ "title": "Always",
+ "type": "boolean"
+ },
+ "rev": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Rev"
+ }
+ },
+ "title": "ReloadMcpParams",
+ "type": "object"
+ },
+ "ReloadMcpResult": {
+ "additionalProperties": false,
+ "properties": {
+ "status": {
+ "$ref": "#/components/schemas/ReloadMcpStatus"
+ },
+ "message": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Message"
+ },
+ "loaded_rev": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Loaded Rev"
+ },
+ "coalesced": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Coalesced"
+ },
+ "turn_isolation": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Turn Isolation"
+ },
+ "host_ack": {
+ "anyOf": [
+ {},
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Host Ack"
+ }
+ },
+ "required": [
+ "status"
+ ],
+ "title": "ReloadMcpResult",
+ "type": "object"
+ },
+ "ReloadMcpStatus": {
+ "enum": [
+ "confirm_required",
+ "reloaded"
+ ],
+ "title": "ReloadMcpStatus",
+ "type": "string"
+ },
+ "RepoDiscoveryPolicy": {
+ "additionalProperties": false,
+ "description": "``methods_projects._repo_discovery_policy`` \u2014 the effective ``desktop.repo_scan_*`` config.",
+ "properties": {
+ "enabled": {
+ "title": "Enabled",
+ "type": "boolean"
+ },
+ "roots": {
+ "items": {
+ "type": "string"
+ },
+ "title": "Roots",
+ "type": "array"
+ },
+ "exclude_paths": {
+ "items": {
+ "type": "string"
+ },
+ "title": "Exclude Paths",
+ "type": "array"
+ }
+ },
+ "required": [
+ "enabled",
+ "roots",
+ "exclude_paths"
+ ],
+ "title": "RepoDiscoveryPolicy",
+ "type": "object"
+ },
+ "RepoDiscoveryPolicyParams": {
+ "additionalProperties": false,
+ "description": "The policy the desktop scanned under (short or ``repo_scan_*`` long keys both accepted).",
+ "properties": {
+ "enabled": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Enabled"
+ },
+ "roots": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Roots"
+ },
+ "exclude_paths": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Exclude Paths"
+ },
+ "repo_scan_enabled": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Repo Scan Enabled"
+ },
+ "repo_scan_roots": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Repo Scan Roots"
+ },
+ "repo_scan_exclude_paths": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Repo Scan Exclude Paths"
+ }
+ },
+ "title": "RepoDiscoveryPolicyParams",
+ "type": "object"
+ },
+ "RequestAnswerParams": {
+ "additionalProperties": false,
+ "properties": {
+ "id": {
+ "title": "Id",
+ "type": "string"
+ },
+ "result": {
+ "additionalProperties": true,
+ "title": "Result",
+ "type": "object"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "required": [
+ "id",
+ "result"
+ ],
+ "title": "RequestAnswerParams",
+ "type": "object"
+ },
+ "RequestAnswerResult": {
+ "additionalProperties": false,
+ "properties": {
+ "status": {
+ "$ref": "#/components/schemas/ClarifyLockStatus"
+ }
+ },
+ "required": [
+ "status"
+ ],
+ "title": "RequestAnswerResult",
+ "type": "object"
+ },
+ "RequestCancelPayload": {
+ "additionalProperties": false,
+ "properties": {
+ "id": {
+ "title": "Id",
+ "type": "string"
+ },
+ "method": {
+ "title": "Method",
+ "type": "string"
+ },
+ "reason": {
+ "title": "Reason",
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "method",
+ "reason"
+ ],
+ "title": "RequestCancelPayload",
+ "type": "object"
+ },
+ "ResumePhaseStatus": {
+ "enum": [
+ "loading",
+ "complete",
+ "failed"
+ ],
+ "title": "ResumePhaseStatus",
+ "type": "string"
+ },
+ "ReviewSummaryPayload": {
+ "additionalProperties": false,
+ "description": "``server`` background_review_callback.",
+ "properties": {
+ "text": {
+ "title": "Text",
+ "type": "string"
+ }
+ },
+ "required": [
+ "text"
+ ],
+ "title": "ReviewSummaryPayload",
+ "type": "object"
+ },
+ "RollbackCheckpoint": {
+ "additionalProperties": false,
+ "properties": {
+ "hash": {
+ "default": "",
+ "title": "Hash",
+ "type": "string"
+ },
+ "timestamp": {
+ "default": "",
+ "title": "Timestamp",
+ "type": "string"
+ },
+ "message": {
+ "default": "",
+ "title": "Message",
+ "type": "string"
+ }
+ },
+ "title": "RollbackCheckpoint",
+ "type": "object"
+ },
+ "RollbackDiffParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "hash": {
+ "title": "Hash",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "required": [
+ "session_id",
+ "hash"
+ ],
+ "title": "RollbackDiffParams",
+ "type": "object"
+ },
+ "RollbackDiffResult": {
+ "additionalProperties": false,
+ "properties": {
+ "stat": {
+ "default": "",
+ "title": "Stat",
+ "type": "string"
+ },
+ "diff": {
+ "default": "",
+ "title": "Diff",
+ "type": "string"
+ },
+ "rendered": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Rendered"
+ }
+ },
+ "title": "RollbackDiffResult",
+ "type": "object"
+ },
+ "RollbackListParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "RollbackListParams",
+ "type": "object"
+ },
+ "RollbackListResult": {
+ "additionalProperties": false,
+ "properties": {
+ "enabled": {
+ "title": "Enabled",
+ "type": "boolean"
+ },
+ "checkpoints": {
+ "items": {
+ "$ref": "#/components/schemas/RollbackCheckpoint"
+ },
+ "title": "Checkpoints",
+ "type": "array"
+ }
+ },
+ "required": [
+ "enabled"
+ ],
+ "title": "RollbackListResult",
+ "type": "object"
+ },
+ "RollbackRestoreParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "hash": {
+ "title": "Hash",
+ "type": "string"
+ },
+ "file_path": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "File Path"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "required": [
+ "session_id",
+ "hash"
+ ],
+ "title": "RollbackRestoreParams",
+ "type": "object"
+ },
+ "RollbackRestoreResult": {
+ "additionalProperties": true,
+ "description": "``tools/checkpoint_manager.py::restore`` outcome; ``history_removed`` is added for a full\n(non-file) restore that also rewound the live transcript.",
+ "properties": {
+ "success": {
+ "title": "Success",
+ "type": "boolean"
+ },
+ "restored_to": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Restored To"
+ },
+ "reason": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Reason"
+ },
+ "directory": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Directory"
+ },
+ "file": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "File"
+ },
+ "restored_files": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Restored Files"
+ },
+ "skipped_user_edits": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Skipped User Edits"
+ },
+ "skipped_oversize": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Skipped Oversize"
+ },
+ "failed_deletes": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Failed Deletes"
+ },
+ "history_removed": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "History Removed"
+ },
+ "error": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Error"
+ },
+ "debug": {
+ "anyOf": [
+ {},
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Debug"
+ }
+ },
+ "required": [
+ "success"
+ ],
+ "title": "RollbackRestoreResult",
+ "type": "object"
+ },
+ "Room": {
+ "additionalProperties": false,
+ "description": "``gateway/hosted_rooms.py::_room_from_row`` plus the branch-only keys ``create`` (legacy\nadoption), ``state`` (``authority_claim``) and ``rename`` (``event``) add.",
+ "properties": {
+ "room_id": {
+ "title": "Room Id",
+ "type": "string"
+ },
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "members": {
+ "items": {
+ "$ref": "#/components/schemas/RoomMember"
+ },
+ "title": "Members",
+ "type": "array"
+ },
+ "authority_gateway_id": {
+ "title": "Authority Gateway Id",
+ "type": "string"
+ },
+ "authority_epoch": {
+ "title": "Authority Epoch",
+ "type": "integer"
+ },
+ "revision": {
+ "title": "Revision",
+ "type": "integer"
+ },
+ "created_at": {
+ "title": "Created At",
+ "type": "number"
+ },
+ "updated_at": {
+ "title": "Updated At",
+ "type": "number"
+ },
+ "idempotent": {
+ "default": false,
+ "title": "Idempotent",
+ "type": "boolean"
+ },
+ "disbanded_at": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Disbanded At"
+ },
+ "latest_seq": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Latest Seq"
+ },
+ "adopted": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Adopted"
+ },
+ "claim_event": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/RoomEvent"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "authority_claim": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/RoomEvent"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "event": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/RoomEvent"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ }
+ },
+ "required": [
+ "room_id",
+ "name",
+ "members",
+ "authority_gateway_id",
+ "authority_epoch",
+ "revision",
+ "created_at",
+ "updated_at"
+ ],
+ "title": "Room",
+ "type": "object"
+ },
+ "RoomActor": {
+ "additionalProperties": false,
+ "properties": {
+ "kind": {
+ "title": "Kind",
+ "type": "string"
+ },
+ "id": {
+ "title": "Id",
+ "type": "string"
+ }
+ },
+ "required": [
+ "kind",
+ "id"
+ ],
+ "title": "RoomActor",
+ "type": "object"
+ },
+ "RoomAuthority": {
+ "additionalProperties": false,
+ "properties": {
+ "gateway_id": {
+ "title": "Gateway Id",
+ "type": "string"
+ },
+ "epoch": {
+ "title": "Epoch",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "gateway_id",
+ "epoch"
+ ],
+ "title": "RoomAuthority",
+ "type": "object"
+ },
+ "RoomDriverStatus": {
+ "additionalProperties": false,
+ "description": "``HostedRoomService.status(room_id)``; ``pending_actions`` rows are ``{kind: retry, task_id}``\nor the driver's approval action (``kind: approval`` + run/session/approval context).",
+ "properties": {
+ "running": {
+ "title": "Running",
+ "type": "boolean"
+ },
+ "working": {
+ "title": "Working",
+ "type": "boolean"
+ },
+ "blocked": {
+ "title": "Blocked",
+ "type": "boolean"
+ },
+ "counts": {
+ "additionalProperties": {
+ "type": "integer"
+ },
+ "title": "Counts",
+ "type": "object"
+ },
+ "pending_actions": {
+ "items": {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ "title": "Pending Actions",
+ "type": "array"
+ },
+ "peer_routes": {
+ "items": {
+ "$ref": "#/components/schemas/PeerRouteStatus"
+ },
+ "title": "Peer Routes",
+ "type": "array"
+ }
+ },
+ "required": [
+ "running",
+ "working",
+ "blocked",
+ "counts",
+ "pending_actions",
+ "peer_routes"
+ ],
+ "title": "RoomDriverStatus",
+ "type": "object"
+ },
+ "RoomEvent": {
+ "additionalProperties": false,
+ "description": "``gateway/hosted_rooms.py::_event_from_row``.",
+ "properties": {
+ "room_id": {
+ "title": "Room Id",
+ "type": "string"
+ },
+ "seq": {
+ "title": "Seq",
+ "type": "integer"
+ },
+ "event_id": {
+ "title": "Event Id",
+ "type": "string"
+ },
+ "kind": {
+ "title": "Kind",
+ "type": "string"
+ },
+ "actor": {
+ "$ref": "#/components/schemas/RoomActor"
+ },
+ "authority_epoch": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Authority Epoch"
+ },
+ "payload": {
+ "additionalProperties": true,
+ "title": "Payload",
+ "type": "object"
+ },
+ "created_at": {
+ "title": "Created At",
+ "type": "number"
+ },
+ "idempotent": {
+ "default": false,
+ "title": "Idempotent",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "room_id",
+ "seq",
+ "event_id",
+ "kind",
+ "actor",
+ "payload",
+ "created_at"
+ ],
+ "title": "RoomEvent",
+ "type": "object"
+ },
+ "RoomExecutionPolicy": {
+ "additionalProperties": false,
+ "description": "``gateway/hosted_room_execution_policy.py::execution_policy_mapping``.",
+ "properties": {
+ "version": {
+ "title": "Version",
+ "type": "integer"
+ },
+ "target_profile": {
+ "title": "Target Profile",
+ "type": "string"
+ },
+ "enabled_toolsets": {
+ "items": {
+ "type": "string"
+ },
+ "title": "Enabled Toolsets",
+ "type": "array"
+ },
+ "approval_mode": {
+ "title": "Approval Mode",
+ "type": "string"
+ },
+ "max_iterations": {
+ "title": "Max Iterations",
+ "type": "integer"
+ },
+ "policy_digest": {
+ "title": "Policy Digest",
+ "type": "string"
+ }
+ },
+ "required": [
+ "version",
+ "target_profile",
+ "enabled_toolsets",
+ "approval_mode",
+ "max_iterations",
+ "policy_digest"
+ ],
+ "title": "RoomExecutionPolicy",
+ "type": "object"
+ },
+ "RoomLinkCatalog": {
+ "additionalProperties": false,
+ "description": "``gateway/hosted_room_peer.py::GatewayRoomCatalog.as_mapping``.",
+ "properties": {
+ "installation_id": {
+ "title": "Installation Id",
+ "type": "string"
+ },
+ "protocol_versions": {
+ "items": {
+ "type": "integer"
+ },
+ "title": "Protocol Versions",
+ "type": "array"
+ },
+ "link_modes": {
+ "items": {
+ "type": "string"
+ },
+ "title": "Link Modes",
+ "type": "array"
+ },
+ "persistent_process": {
+ "title": "Persistent Process",
+ "type": "boolean"
+ },
+ "text": {
+ "title": "Text",
+ "type": "boolean"
+ },
+ "attachments": {
+ "title": "Attachments",
+ "type": "boolean"
+ },
+ "execution_policy": {
+ "$ref": "#/components/schemas/RoomExecutionPolicy"
+ },
+ "catalog_digest": {
+ "title": "Catalog Digest",
+ "type": "string"
+ },
+ "endpoint": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/RoomLinkEndpoint"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ }
+ },
+ "required": [
+ "installation_id",
+ "protocol_versions",
+ "link_modes",
+ "persistent_process",
+ "text",
+ "attachments",
+ "execution_policy",
+ "catalog_digest"
+ ],
+ "title": "RoomLinkCatalog",
+ "type": "object"
+ },
+ "RoomLinkEndpoint": {
+ "additionalProperties": false,
+ "description": "``GatewayRoomCatalog.endpoint_mapping``: ``url``/``transport_security`` when available,\n``reason`` when not.",
+ "properties": {
+ "available": {
+ "title": "Available",
+ "type": "boolean"
+ },
+ "url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Url"
+ },
+ "transport_security": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Transport Security"
+ },
+ "reason": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Reason"
+ }
+ },
+ "required": [
+ "available"
+ ],
+ "title": "RoomLinkEndpoint",
+ "type": "object"
+ },
+ "RoomLinkStatus": {
+ "additionalProperties": false,
+ "description": "``enabled`` with ``profile``/``catalog``/``endpoint``, or disabled with a ``reason``.",
+ "properties": {
+ "enabled": {
+ "title": "Enabled",
+ "type": "boolean"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "catalog": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/RoomLinkCatalog"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "endpoint": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/RoomLinkEndpoint"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "reason": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Reason"
+ }
+ },
+ "required": [
+ "enabled"
+ ],
+ "title": "RoomLinkStatus",
+ "type": "object"
+ },
+ "RoomMember": {
+ "additionalProperties": true,
+ "description": "One roster row (``hosted_room_discussion.validate_roster``); legacy rooms may carry\npre-normalisation rows, so the set stays open.",
+ "properties": {
+ "member_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Member Id"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "handle": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Handle"
+ },
+ "display_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Display Name"
+ },
+ "target": {
+ "anyOf": [
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Target"
+ }
+ },
+ "title": "RoomMember",
+ "type": "object"
+ },
+ "RoomMemberInput": {
+ "additionalProperties": true,
+ "description": "A roster row as the client proposes it; ``validate_roster`` owns the exact rules.",
+ "properties": {
+ "member_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Member Id"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "handle": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Handle"
+ },
+ "display_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Display Name"
+ },
+ "target": {
+ "anyOf": [
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Target"
+ }
+ },
+ "title": "RoomMemberInput",
+ "type": "object"
+ },
+ "RoomTaskReceipt": {
+ "additionalProperties": false,
+ "properties": {
+ "room_id": {
+ "title": "Room Id",
+ "type": "string"
+ },
+ "task_id": {
+ "title": "Task Id",
+ "type": "string"
+ },
+ "thread_id": {
+ "title": "Thread Id",
+ "type": "string"
+ },
+ "turn_id": {
+ "title": "Turn Id",
+ "type": "string"
+ },
+ "status": {
+ "title": "Status",
+ "type": "string"
+ },
+ "execution_generation": {
+ "title": "Execution Generation",
+ "type": "integer"
+ },
+ "cancel_generation": {
+ "title": "Cancel Generation",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "room_id",
+ "task_id",
+ "thread_id",
+ "turn_id",
+ "status",
+ "execution_generation",
+ "cancel_generation"
+ ],
+ "title": "RoomTaskReceipt",
+ "type": "object"
+ },
+ "RoomTombstone": {
+ "additionalProperties": false,
+ "properties": {
+ "room_id": {
+ "title": "Room Id",
+ "type": "string"
+ },
+ "disbanded_at": {
+ "title": "Disbanded At",
+ "type": "number"
+ },
+ "idempotent": {
+ "title": "Idempotent",
+ "type": "boolean"
+ },
+ "history_expired": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "History Expired"
+ },
+ "event": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/RoomEvent"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ }
+ },
+ "required": [
+ "room_id",
+ "disbanded_at",
+ "idempotent"
+ ],
+ "title": "RoomTombstone",
+ "type": "object"
+ },
+ "SecretRequestParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "env_var": {
+ "title": "Env Var",
+ "type": "string"
+ },
+ "prompt": {
+ "title": "Prompt",
+ "type": "string"
+ },
+ "metadata": {
+ "anyOf": [
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Metadata"
+ }
+ },
+ "required": [
+ "session_id",
+ "env_var",
+ "prompt"
+ ],
+ "title": "SecretRequestParams",
+ "type": "object"
+ },
+ "SeedMessage": {
+ "additionalProperties": true,
+ "description": "One create-time transcript row (``session_history._coerce_seed_history``); ``text`` is the\nlegacy alias of ``content``; only ``display_kind: \"hidden\"`` is accepted from the wire. Clients\nforward stored rows verbatim (``_row_id``, ``timestamp``, \u2026) and the coercer drops what it does\nnot use, so the row stays open.",
+ "properties": {
+ "role": {
+ "title": "Role",
+ "type": "string"
+ },
+ "content": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Content"
+ },
+ "text": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Text"
+ },
+ "display_kind": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Display Kind"
+ }
+ },
+ "required": [
+ "role"
+ ],
+ "title": "SeedMessage",
+ "type": "object"
+ },
+ "SessionActivateParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "cols": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cols"
+ },
+ "omit_messages": {
+ "default": false,
+ "title": "Omit Messages",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "SessionActivateParams",
+ "type": "object"
+ },
+ "SessionActivateResult": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "message_count": {
+ "title": "Message Count",
+ "type": "integer"
+ },
+ "messages": {
+ "items": {
+ "$ref": "#/components/schemas/TranscriptMessage"
+ },
+ "title": "Messages",
+ "type": "array"
+ },
+ "info": {
+ "$ref": "#/components/schemas/SessionLiveInfo"
+ },
+ "stored_session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Stored Session Id"
+ },
+ "resumed": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Resumed"
+ },
+ "session_key": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Session Key"
+ },
+ "messages_omitted": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Messages Omitted"
+ },
+ "hydrating": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Hydrating"
+ },
+ "running": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Running"
+ },
+ "turn_started_at": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Turn Started At"
+ },
+ "started_at": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Started At"
+ },
+ "status": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Status"
+ },
+ "inflight": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/InflightTurn"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "queued": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/QueuedPrompt"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "pending_approval": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/PendingApproval"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "open_requests": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/components/schemas/OpenRequestEntry"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Open Requests"
+ },
+ "pending_connection": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/ConnectionRequestPayload"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "todo_state": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/TodoState"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "auto_continue": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/AutoContinue"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ }
+ },
+ "required": [
+ "session_id",
+ "message_count",
+ "messages",
+ "info"
+ ],
+ "title": "SessionActivateResult",
+ "type": "object"
+ },
+ "SessionActiveItem": {
+ "additionalProperties": false,
+ "description": "``server._session_live_item``.",
+ "properties": {
+ "current": {
+ "title": "Current",
+ "type": "boolean"
+ },
+ "id": {
+ "title": "Id",
+ "type": "string"
+ },
+ "last_active": {
+ "title": "Last Active",
+ "type": "number"
+ },
+ "message_count": {
+ "title": "Message Count",
+ "type": "integer"
+ },
+ "model": {
+ "title": "Model",
+ "type": "string"
+ },
+ "preview": {
+ "title": "Preview",
+ "type": "string"
+ },
+ "session_key": {
+ "title": "Session Key",
+ "type": "string"
+ },
+ "started_at": {
+ "title": "Started At",
+ "type": "number"
+ },
+ "status": {
+ "$ref": "#/components/schemas/LiveSessionStatus"
+ },
+ "title": {
+ "title": "Title",
+ "type": "string"
+ }
+ },
+ "required": [
+ "current",
+ "id",
+ "last_active",
+ "message_count",
+ "model",
+ "preview",
+ "session_key",
+ "started_at",
+ "status",
+ "title"
+ ],
+ "title": "SessionActiveItem",
+ "type": "object"
+ },
+ "SessionActiveListParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "current_session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Current Session Id"
+ }
+ },
+ "title": "SessionActiveListParams",
+ "type": "object"
+ },
+ "SessionActiveListResult": {
+ "additionalProperties": false,
+ "properties": {
+ "sessions": {
+ "items": {
+ "$ref": "#/components/schemas/SessionActiveItem"
+ },
+ "title": "Sessions",
+ "type": "array"
+ }
+ },
+ "required": [
+ "sessions"
+ ],
+ "title": "SessionActiveListResult",
+ "type": "object"
+ },
+ "SessionBranchParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Name"
+ },
+ "count": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Count"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "SessionBranchParams",
+ "type": "object"
+ },
+ "SessionBranchResult": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "stored_session_id": {
+ "title": "Stored Session Id",
+ "type": "string"
+ },
+ "title": {
+ "title": "Title",
+ "type": "string"
+ },
+ "parent": {
+ "title": "Parent",
+ "type": "string"
+ },
+ "message_count": {
+ "title": "Message Count",
+ "type": "integer"
+ },
+ "messages": {
+ "items": {
+ "$ref": "#/components/schemas/TranscriptMessage"
+ },
+ "title": "Messages",
+ "type": "array"
+ },
+ "info": {
+ "$ref": "#/components/schemas/SessionLiveInfo"
+ }
+ },
+ "required": [
+ "session_id",
+ "stored_session_id",
+ "title",
+ "parent",
+ "message_count",
+ "messages",
+ "info"
+ ],
+ "title": "SessionBranchResult",
+ "type": "object"
+ },
+ "SessionCloseParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "SessionCloseParams",
+ "type": "object"
+ },
+ "SessionCloseResult": {
+ "additionalProperties": false,
+ "properties": {
+ "closed": {
+ "title": "Closed",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "closed"
+ ],
+ "title": "SessionCloseResult",
+ "type": "object"
+ },
+ "SessionCompressParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "focus_topic": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Focus Topic"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "SessionCompressParams",
+ "type": "object"
+ },
+ "SessionCompressResult": {
+ "additionalProperties": true,
+ "description": "In-process: the before/after summary + replacement transcript. Compute host: its result passes\nthrough (hence open) with ``turn_isolation``; a lock held elsewhere answers ``compressed: false``.",
+ "properties": {
+ "status": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Status"
+ },
+ "removed": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Removed"
+ },
+ "before_messages": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Before Messages"
+ },
+ "after_messages": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "After Messages"
+ },
+ "before_tokens": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Before Tokens"
+ },
+ "after_tokens": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "After Tokens"
+ },
+ "summary": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/CompressionSummary"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "usage": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/Usage"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "info": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/SessionLiveInfo"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "messages": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/components/schemas/TranscriptMessage"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Messages"
+ },
+ "compressed": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Compressed"
+ },
+ "lock_held": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Lock Held"
+ },
+ "message": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Message"
+ },
+ "turn_isolation": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Turn Isolation"
+ },
+ "host_ack": {
+ "anyOf": [
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Host Ack"
+ }
+ },
+ "title": "SessionCompressResult",
+ "type": "object"
+ },
+ "SessionContextBreakdownParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "SessionContextBreakdownParams",
+ "type": "object"
+ },
+ "SessionContextBreakdownResult": {
+ "additionalProperties": false,
+ "description": "``agent.context_breakdown.compute_session_context_breakdown`` (empty categories before the agent builds).",
+ "properties": {
+ "categories": {
+ "items": {
+ "$ref": "#/components/schemas/ContextCategory"
+ },
+ "title": "Categories",
+ "type": "array"
+ },
+ "context_max": {
+ "title": "Context Max",
+ "type": "integer"
+ },
+ "context_percent": {
+ "title": "Context Percent",
+ "type": "integer"
+ },
+ "context_used": {
+ "title": "Context Used",
+ "type": "integer"
+ },
+ "estimated_total": {
+ "title": "Estimated Total",
+ "type": "integer"
+ },
+ "context_estimated": {
+ "title": "Context Estimated",
+ "type": "boolean"
+ },
+ "context_source": {
+ "title": "Context Source",
+ "type": "string"
+ },
+ "model": {
+ "title": "Model",
+ "type": "string"
+ }
+ },
+ "required": [
+ "categories",
+ "context_max",
+ "context_percent",
+ "context_used",
+ "estimated_total",
+ "context_estimated",
+ "context_source",
+ "model"
+ ],
+ "title": "SessionContextBreakdownResult",
+ "type": "object"
+ },
+ "SessionControlArgs": {
+ "additionalProperties": false,
+ "description": "``subgoal.add`` reads ``text``; ``subgoal.remove`` reads the 1-based ``index``.",
+ "properties": {
+ "text": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Text"
+ },
+ "index": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Index"
+ }
+ },
+ "title": "SessionControlArgs",
+ "type": "object"
+ },
+ "SessionControlDispatch": {
+ "additionalProperties": false,
+ "description": "``_dispatch_envelope`` \u2014 the command result's user-visible envelope, every key always present.",
+ "properties": {
+ "type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Type"
+ },
+ "output": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Output"
+ },
+ "notice": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Notice"
+ },
+ "message": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Message"
+ },
+ "display": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Display"
+ }
+ },
+ "required": [
+ "type",
+ "output",
+ "notice",
+ "message",
+ "display"
+ ],
+ "title": "SessionControlDispatch",
+ "type": "object"
+ },
+ "SessionControlParams": {
+ "additionalProperties": false,
+ "description": "``action`` is validated by the handler (unknown / gate actions answer ``4004``), so it stays a\nstring on the wire; ``SessionControlAction`` lists the accepted set.",
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "action": {
+ "title": "Action",
+ "type": "string"
+ },
+ "args": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/SessionControlArgs"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ }
+ },
+ "required": [
+ "session_id",
+ "action"
+ ],
+ "title": "SessionControlParams",
+ "type": "object"
+ },
+ "SessionControlReadParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "SessionControlReadParams",
+ "type": "object"
+ },
+ "SessionControlReadResult": {
+ "additionalProperties": false,
+ "properties": {
+ "control": {
+ "$ref": "#/components/schemas/SessionControlSnapshot"
+ }
+ },
+ "required": [
+ "control"
+ ],
+ "title": "SessionControlReadResult",
+ "type": "object"
+ },
+ "SessionControlResult": {
+ "additionalProperties": false,
+ "properties": {
+ "control": {
+ "$ref": "#/components/schemas/SessionControlSnapshot"
+ },
+ "dispatch": {
+ "$ref": "#/components/schemas/SessionControlDispatch"
+ }
+ },
+ "required": [
+ "control",
+ "dispatch"
+ ],
+ "title": "SessionControlResult",
+ "type": "object"
+ },
+ "SessionControlSnapshot": {
+ "additionalProperties": false,
+ "description": "``_snapshot_control`` \u2014 ``revision`` is a hash of the visible state (``\"\"`` when empty);\n``updated_at`` is the newest persisted timestamp (``0`` when none).",
+ "properties": {
+ "goal": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/GoalSnapshot"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "loop": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/LoopSnapshot"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "heartbeat": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/HeartbeatSnapshot"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "revision": {
+ "title": "Revision",
+ "type": "string"
+ },
+ "updated_at": {
+ "title": "Updated At",
+ "type": "number"
+ }
+ },
+ "required": [
+ "goal",
+ "loop",
+ "heartbeat",
+ "revision",
+ "updated_at"
+ ],
+ "title": "SessionControlSnapshot",
+ "type": "object"
+ },
+ "SessionControlUpdatePayload": {
+ "additionalProperties": false,
+ "properties": {
+ "control": {
+ "$ref": "#/components/schemas/SessionControlSnapshot"
+ }
+ },
+ "required": [
+ "control"
+ ],
+ "title": "SessionControlUpdatePayload",
+ "type": "object"
+ },
+ "SessionCorrectionParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "text": {
+ "title": "Text",
+ "type": "string"
+ }
+ },
+ "required": [
+ "session_id",
+ "text"
+ ],
+ "title": "SessionCorrectionParams",
+ "type": "object"
+ },
+ "SessionCorrectionResult": {
+ "additionalProperties": false,
+ "properties": {
+ "status": {
+ "$ref": "#/components/schemas/CorrectionStatus"
+ },
+ "text": {
+ "title": "Text",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "text"
+ ],
+ "title": "SessionCorrectionResult",
+ "type": "object"
+ },
+ "SessionCreateParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "cols": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cols"
+ },
+ "source": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Source"
+ },
+ "cwd": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cwd"
+ },
+ "messages": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/components/schemas/SeedMessage"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Messages"
+ },
+ "parent_session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Parent Session Id"
+ },
+ "title": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Title"
+ },
+ "model": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Model"
+ },
+ "provider": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Provider"
+ },
+ "reasoning_effort": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Reasoning Effort"
+ },
+ "fast": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Fast"
+ },
+ "close_on_disconnect": {
+ "default": false,
+ "title": "Close On Disconnect",
+ "type": "boolean"
+ },
+ "hidden": {
+ "default": false,
+ "title": "Hidden",
+ "type": "boolean"
+ },
+ "room_plumbing": {
+ "default": false,
+ "title": "Room Plumbing",
+ "type": "boolean"
+ },
+ "follow_profile_config": {
+ "default": false,
+ "title": "Follow Profile Config",
+ "type": "boolean"
+ }
+ },
+ "title": "SessionCreateParams",
+ "type": "object"
+ },
+ "SessionCreateResult": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "stored_session_id": {
+ "title": "Stored Session Id",
+ "type": "string"
+ },
+ "message_count": {
+ "title": "Message Count",
+ "type": "integer"
+ },
+ "messages": {
+ "items": {
+ "$ref": "#/components/schemas/TranscriptMessage"
+ },
+ "title": "Messages",
+ "type": "array"
+ },
+ "info": {
+ "$ref": "#/components/schemas/SessionLiveInfo"
+ }
+ },
+ "required": [
+ "session_id",
+ "stored_session_id",
+ "message_count",
+ "messages",
+ "info"
+ ],
+ "title": "SessionCreateResult",
+ "type": "object"
+ },
+ "SessionCwdSetParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "cwd": {
+ "title": "Cwd",
+ "type": "string"
+ }
+ },
+ "required": [
+ "session_id",
+ "cwd"
+ ],
+ "title": "SessionCwdSetParams",
+ "type": "object"
+ },
+ "SessionCwdSetResult": {
+ "additionalProperties": true,
+ "description": "The refreshed ``session.info`` view (full agent view, or the lazy shape).",
+ "properties": {
+ "model": {
+ "default": "",
+ "title": "Model",
+ "type": "string"
+ },
+ "provider": {
+ "default": "",
+ "title": "Provider",
+ "type": "string"
+ },
+ "reasoning_effort": {
+ "default": "",
+ "title": "Reasoning Effort",
+ "type": "string"
+ },
+ "service_tier": {
+ "default": "",
+ "title": "Service Tier",
+ "type": "string"
+ },
+ "fast": {
+ "default": false,
+ "title": "Fast",
+ "type": "boolean"
+ },
+ "yolo": {
+ "default": false,
+ "title": "Yolo",
+ "type": "boolean"
+ },
+ "approval_mode": {
+ "default": "manual",
+ "title": "Approval Mode",
+ "type": "string"
+ },
+ "tools": {
+ "additionalProperties": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "title": "Tools",
+ "type": "object"
+ },
+ "skills": {
+ "additionalProperties": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "title": "Skills",
+ "type": "object"
+ },
+ "cwd": {
+ "default": "",
+ "title": "Cwd",
+ "type": "string"
+ },
+ "branch": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Branch"
+ },
+ "project": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/ProjectRef"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "terminal_backend": {
+ "default": "",
+ "title": "Terminal Backend",
+ "type": "string"
+ },
+ "personality": {
+ "default": "",
+ "title": "Personality",
+ "type": "string"
+ },
+ "running": {
+ "default": false,
+ "title": "Running",
+ "type": "boolean"
+ },
+ "turn_started_at": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Turn Started At"
+ },
+ "title": {
+ "default": "",
+ "title": "Title",
+ "type": "string"
+ },
+ "stored_session_id": {
+ "default": "",
+ "title": "Stored Session Id",
+ "type": "string"
+ },
+ "desktop_contract": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Desktop Contract"
+ },
+ "version": {
+ "default": "",
+ "title": "Version",
+ "type": "string"
+ },
+ "release_date": {
+ "default": "",
+ "title": "Release Date",
+ "type": "string"
+ },
+ "update_behind": {
+ "anyOf": [
+ {},
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Update Behind"
+ },
+ "update_command": {
+ "default": "",
+ "title": "Update Command",
+ "type": "string"
+ },
+ "usage": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/Usage"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "profile_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile Name"
+ },
+ "mcp_servers": {
+ "items": {
+ "$ref": "#/components/schemas/McpServerStatus"
+ },
+ "title": "Mcp Servers",
+ "type": "array"
+ },
+ "system_prompt": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "System Prompt"
+ },
+ "credential_warning": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Credential Warning"
+ },
+ "lazy": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Lazy"
+ }
+ },
+ "title": "SessionCwdSetResult",
+ "type": "object"
+ },
+ "SessionDeleteParams": {
+ "additionalProperties": false,
+ "description": "``session_id`` is the STORED id.",
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "SessionDeleteParams",
+ "type": "object"
+ },
+ "SessionDeleteResult": {
+ "additionalProperties": false,
+ "properties": {
+ "deleted": {
+ "title": "Deleted",
+ "type": "string"
+ }
+ },
+ "required": [
+ "deleted"
+ ],
+ "title": "SessionDeleteResult",
+ "type": "object"
+ },
+ "SessionEventsSinceParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "last_seen": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Last Seen"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "SessionEventsSinceParams",
+ "type": "object"
+ },
+ "SessionEventsSinceResult": {
+ "additionalProperties": false,
+ "properties": {
+ "events": {
+ "items": {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ "title": "Events",
+ "type": "array"
+ },
+ "latest_seq": {
+ "title": "Latest Seq",
+ "type": "integer"
+ },
+ "truncated": {
+ "title": "Truncated",
+ "type": "boolean"
+ },
+ "count": {
+ "title": "Count",
+ "type": "integer"
+ },
+ "epoch": {
+ "title": "Epoch",
+ "type": "string"
+ },
+ "open_requests": {
+ "items": {
+ "$ref": "#/components/schemas/OpenRequestEntry"
+ },
+ "title": "Open Requests",
+ "type": "array"
+ }
+ },
+ "required": [
+ "events",
+ "latest_seq",
+ "truncated",
+ "count",
+ "epoch",
+ "open_requests"
+ ],
+ "title": "SessionEventsSinceResult",
+ "type": "object"
+ },
+ "SessionEventsStatsParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "title": "SessionEventsStatsParams",
+ "type": "object"
+ },
+ "SessionEventsStatsResult": {
+ "additionalProperties": false,
+ "description": "``event_replay.replay_stats``.",
+ "properties": {
+ "sessions": {
+ "title": "Sessions",
+ "type": "integer"
+ },
+ "events": {
+ "title": "Events",
+ "type": "integer"
+ },
+ "bytes": {
+ "title": "Bytes",
+ "type": "integer"
+ },
+ "max_per_session": {
+ "title": "Max Per Session",
+ "type": "integer"
+ },
+ "max_bytes_per_session": {
+ "title": "Max Bytes Per Session",
+ "type": "integer"
+ },
+ "max_bytes_process": {
+ "title": "Max Bytes Process",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "sessions",
+ "events",
+ "bytes",
+ "max_per_session",
+ "max_bytes_per_session",
+ "max_bytes_process"
+ ],
+ "title": "SessionEventsStatsResult",
+ "type": "object"
+ },
+ "SessionForeignIdParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Id"
+ }
+ },
+ "title": "SessionForeignIdParams",
+ "type": "object"
+ },
+ "SessionForeignImportResult": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "already_imported": {
+ "default": false,
+ "title": "Already Imported",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "SessionForeignImportResult",
+ "type": "object"
+ },
+ "SessionForeignListParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "source": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/ForeignSource"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "offset": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Offset"
+ },
+ "limit": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Limit"
+ }
+ },
+ "title": "SessionForeignListParams",
+ "type": "object"
+ },
+ "SessionForeignListResult": {
+ "additionalProperties": false,
+ "description": "``unreadable`` counts logs on this page that failed to parse.",
+ "properties": {
+ "sessions": {
+ "items": {
+ "$ref": "#/components/schemas/ForeignSessionRow"
+ },
+ "title": "Sessions",
+ "type": "array"
+ },
+ "next_offset": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Next Offset"
+ },
+ "host": {
+ "title": "Host",
+ "type": "string"
+ },
+ "unreadable": {
+ "default": 0,
+ "title": "Unreadable",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "host"
+ ],
+ "title": "SessionForeignListResult",
+ "type": "object"
+ },
+ "SessionForeignPreviewResult": {
+ "additionalProperties": false,
+ "description": "Bounded to the last 40 turns / 8000 chars each; ``already_imported`` is the local id.",
+ "properties": {
+ "messages": {
+ "items": {
+ "$ref": "#/components/schemas/ForeignTurn"
+ },
+ "title": "Messages",
+ "type": "array"
+ },
+ "total": {
+ "default": 0,
+ "title": "Total",
+ "type": "integer"
+ },
+ "truncated": {
+ "default": false,
+ "title": "Truncated",
+ "type": "boolean"
+ },
+ "already_imported": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Already Imported"
+ },
+ "cwd": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cwd"
+ }
+ },
+ "title": "SessionForeignPreviewResult",
+ "type": "object"
+ },
+ "SessionHistoryParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "SessionHistoryParams",
+ "type": "object"
+ },
+ "SessionHistoryResult": {
+ "additionalProperties": false,
+ "properties": {
+ "count": {
+ "title": "Count",
+ "type": "integer"
+ },
+ "messages": {
+ "items": {
+ "$ref": "#/components/schemas/TranscriptMessage"
+ },
+ "title": "Messages",
+ "type": "array"
+ }
+ },
+ "required": [
+ "count",
+ "messages"
+ ],
+ "title": "SessionHistoryResult",
+ "type": "object"
+ },
+ "SessionInterruptParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "expected_hosted_task_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Expected Hosted Task Id"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "SessionInterruptParams",
+ "type": "object"
+ },
+ "SessionInterruptResult": {
+ "additionalProperties": false,
+ "properties": {
+ "status": {
+ "$ref": "#/components/schemas/InterruptStatus"
+ },
+ "interrupted": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Interrupted"
+ },
+ "turn_isolation": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Turn Isolation"
+ }
+ },
+ "required": [
+ "status"
+ ],
+ "title": "SessionInterruptResult",
+ "type": "object"
+ },
+ "SessionListParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "title": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Title"
+ },
+ "limit": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Limit"
+ },
+ "include_hidden": {
+ "default": false,
+ "title": "Include Hidden",
+ "type": "boolean"
+ }
+ },
+ "title": "SessionListParams",
+ "type": "object"
+ },
+ "SessionListResult": {
+ "additionalProperties": false,
+ "properties": {
+ "sessions": {
+ "items": {
+ "$ref": "#/components/schemas/SessionListRow"
+ },
+ "title": "Sessions",
+ "type": "array"
+ }
+ },
+ "required": [
+ "sessions"
+ ],
+ "title": "SessionListResult",
+ "type": "object"
+ },
+ "SessionListRow": {
+ "additionalProperties": false,
+ "description": "``methods_session._session_row_summary``; ``resolved_id`` only on a title lookup that followed a\ncompression lineage to its tip.",
+ "properties": {
+ "id": {
+ "title": "Id",
+ "type": "string"
+ },
+ "resolved_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Resolved Id"
+ },
+ "title": {
+ "default": "",
+ "title": "Title",
+ "type": "string"
+ },
+ "preview": {
+ "default": "",
+ "title": "Preview",
+ "type": "string"
+ },
+ "started_at": {
+ "default": 0,
+ "title": "Started At",
+ "type": "number"
+ },
+ "message_count": {
+ "default": 0,
+ "title": "Message Count",
+ "type": "integer"
+ },
+ "source": {
+ "default": "",
+ "title": "Source",
+ "type": "string"
+ }
+ },
+ "required": [
+ "id"
+ ],
+ "title": "SessionListRow",
+ "type": "object"
+ },
+ "SessionLiveInfo": {
+ "additionalProperties": true,
+ "description": "``tui_gateway/server.py::_session_info`` \u2014 the ``session.info`` event and the ``info`` field of\n``session.create`` / ``session.resume`` / ``session.activate`` results.",
+ "properties": {
+ "model": {
+ "default": "",
+ "title": "Model",
+ "type": "string"
+ },
+ "provider": {
+ "default": "",
+ "title": "Provider",
+ "type": "string"
+ },
+ "reasoning_effort": {
+ "default": "",
+ "title": "Reasoning Effort",
+ "type": "string"
+ },
+ "service_tier": {
+ "default": "",
+ "title": "Service Tier",
+ "type": "string"
+ },
+ "fast": {
+ "default": false,
+ "title": "Fast",
+ "type": "boolean"
+ },
+ "yolo": {
+ "default": false,
+ "title": "Yolo",
+ "type": "boolean"
+ },
+ "approval_mode": {
+ "default": "manual",
+ "title": "Approval Mode",
+ "type": "string"
+ },
+ "tools": {
+ "additionalProperties": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "title": "Tools",
+ "type": "object"
+ },
+ "skills": {
+ "additionalProperties": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "title": "Skills",
+ "type": "object"
+ },
+ "cwd": {
+ "default": "",
+ "title": "Cwd",
+ "type": "string"
+ },
+ "branch": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Branch"
+ },
+ "project": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/ProjectRef"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "terminal_backend": {
+ "default": "",
+ "title": "Terminal Backend",
+ "type": "string"
+ },
+ "personality": {
+ "default": "",
+ "title": "Personality",
+ "type": "string"
+ },
+ "running": {
+ "default": false,
+ "title": "Running",
+ "type": "boolean"
+ },
+ "turn_started_at": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Turn Started At"
+ },
+ "title": {
+ "default": "",
+ "title": "Title",
+ "type": "string"
+ },
+ "stored_session_id": {
+ "default": "",
+ "title": "Stored Session Id",
+ "type": "string"
+ },
+ "desktop_contract": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Desktop Contract"
+ },
+ "version": {
+ "default": "",
+ "title": "Version",
+ "type": "string"
+ },
+ "release_date": {
+ "default": "",
+ "title": "Release Date",
+ "type": "string"
+ },
+ "update_behind": {
+ "anyOf": [
+ {},
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Update Behind"
+ },
+ "update_command": {
+ "default": "",
+ "title": "Update Command",
+ "type": "string"
+ },
+ "usage": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/Usage"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "profile_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile Name"
+ },
+ "mcp_servers": {
+ "items": {
+ "$ref": "#/components/schemas/McpServerStatus"
+ },
+ "title": "Mcp Servers",
+ "type": "array"
+ },
+ "system_prompt": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "System Prompt"
+ },
+ "credential_warning": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Credential Warning"
+ },
+ "lazy": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Lazy"
+ }
+ },
+ "title": "SessionLiveInfo",
+ "type": "object"
+ },
+ "SessionMostRecentParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "title": "SessionMostRecentParams",
+ "type": "object"
+ },
+ "SessionMostRecentResult": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Session Id"
+ },
+ "title": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Title"
+ },
+ "started_at": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Started At"
+ },
+ "source": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Source"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "SessionMostRecentResult",
+ "type": "object"
+ },
+ "SessionParams": {
+ "additionalProperties": false,
+ "description": "Any method addressed at one live session.",
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "SessionParams",
+ "type": "object"
+ },
+ "SessionReclaimedPayload": {
+ "additionalProperties": false,
+ "description": "``session_lifecycle._announce_session_reclaimed`` (broadcast).",
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "stored_session_id": {
+ "title": "Stored Session Id",
+ "type": "string"
+ },
+ "reason": {
+ "title": "Reason",
+ "type": "string"
+ }
+ },
+ "required": [
+ "session_id",
+ "stored_session_id",
+ "reason"
+ ],
+ "title": "SessionReclaimedPayload",
+ "type": "object"
+ },
+ "SessionResumeParams": {
+ "additionalProperties": false,
+ "description": "``session_id`` is the STORED id (or an exact title); the reply's ``session_id`` is the runtime id.",
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "cols": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cols"
+ },
+ "source": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Source"
+ },
+ "lazy": {
+ "default": false,
+ "title": "Lazy",
+ "type": "boolean"
+ },
+ "defer_history": {
+ "default": false,
+ "title": "Defer History",
+ "type": "boolean"
+ },
+ "omit_messages": {
+ "default": false,
+ "title": "Omit Messages",
+ "type": "boolean"
+ },
+ "eager_build": {
+ "default": false,
+ "title": "Eager Build",
+ "type": "boolean"
+ },
+ "close_on_disconnect": {
+ "default": false,
+ "title": "Close On Disconnect",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "SessionResumeParams",
+ "type": "object"
+ },
+ "SessionResumeProgressPayload": {
+ "additionalProperties": false,
+ "description": "``server._hydrate_resume_history``.",
+ "properties": {
+ "phase": {
+ "title": "Phase",
+ "type": "string"
+ },
+ "status": {
+ "$ref": "#/components/schemas/ResumePhaseStatus"
+ },
+ "message_count": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Message Count"
+ },
+ "message": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Message"
+ }
+ },
+ "required": [
+ "phase",
+ "status"
+ ],
+ "title": "SessionResumeProgressPayload",
+ "type": "object"
+ },
+ "SessionResumeResult": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "message_count": {
+ "title": "Message Count",
+ "type": "integer"
+ },
+ "messages": {
+ "items": {
+ "$ref": "#/components/schemas/TranscriptMessage"
+ },
+ "title": "Messages",
+ "type": "array"
+ },
+ "info": {
+ "$ref": "#/components/schemas/SessionLiveInfo"
+ },
+ "stored_session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Stored Session Id"
+ },
+ "resumed": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Resumed"
+ },
+ "session_key": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Session Key"
+ },
+ "messages_omitted": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Messages Omitted"
+ },
+ "hydrating": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Hydrating"
+ },
+ "running": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Running"
+ },
+ "turn_started_at": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Turn Started At"
+ },
+ "started_at": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Started At"
+ },
+ "status": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Status"
+ },
+ "inflight": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/InflightTurn"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "queued": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/QueuedPrompt"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "pending_approval": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/PendingApproval"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "open_requests": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/components/schemas/OpenRequestEntry"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Open Requests"
+ },
+ "pending_connection": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/ConnectionRequestPayload"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "todo_state": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/TodoState"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "auto_continue": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/AutoContinue"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ }
+ },
+ "required": [
+ "session_id",
+ "message_count",
+ "messages",
+ "info"
+ ],
+ "title": "SessionResumeResult",
+ "type": "object"
+ },
+ "SessionSaveParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "SessionSaveParams",
+ "type": "object"
+ },
+ "SessionSaveResult": {
+ "additionalProperties": true,
+ "description": "Under turn isolation the compute host's result passes through verbatim.",
+ "properties": {
+ "file": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "File"
+ }
+ },
+ "title": "SessionSaveResult",
+ "type": "object"
+ },
+ "SessionSetHiddenParams": {
+ "additionalProperties": false,
+ "description": "``session_id`` is a live runtime id first, else a stored id / key / title.",
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "hidden": {
+ "default": true,
+ "title": "Hidden",
+ "type": "boolean"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "SessionSetHiddenParams",
+ "type": "object"
+ },
+ "SessionSetHiddenResult": {
+ "additionalProperties": false,
+ "properties": {
+ "hidden": {
+ "title": "Hidden",
+ "type": "boolean"
+ },
+ "session_key": {
+ "title": "Session Key",
+ "type": "string"
+ }
+ },
+ "required": [
+ "hidden",
+ "session_key"
+ ],
+ "title": "SessionSetHiddenResult",
+ "type": "object"
+ },
+ "SessionStatusParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "SessionStatusParams",
+ "type": "object"
+ },
+ "SessionStatusResult": {
+ "additionalProperties": false,
+ "properties": {
+ "output": {
+ "title": "Output",
+ "type": "string"
+ }
+ },
+ "required": [
+ "output"
+ ],
+ "title": "SessionStatusResult",
+ "type": "object"
+ },
+ "SessionTitleParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "title": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Title"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "SessionTitleParams",
+ "type": "object"
+ },
+ "SessionTitlePayload": {
+ "additionalProperties": false,
+ "description": "``prompt_turn._invoke_agent`` ``_on_session_title`` hook.",
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "title": {
+ "title": "Title",
+ "type": "string"
+ }
+ },
+ "required": [
+ "session_id",
+ "title"
+ ],
+ "title": "SessionTitlePayload",
+ "type": "object"
+ },
+ "SessionTitleResult": {
+ "additionalProperties": false,
+ "properties": {
+ "title": {
+ "title": "Title",
+ "type": "string"
+ },
+ "session_key": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Session Key"
+ },
+ "pending": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Pending"
+ }
+ },
+ "required": [
+ "title"
+ ],
+ "title": "SessionTitleResult",
+ "type": "object"
+ },
+ "SessionUndoParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "SessionUndoParams",
+ "type": "object"
+ },
+ "SessionUndoResult": {
+ "additionalProperties": false,
+ "properties": {
+ "removed": {
+ "title": "Removed",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "removed"
+ ],
+ "title": "SessionUndoResult",
+ "type": "object"
+ },
+ "SessionUsageParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "SessionUsageParams",
+ "type": "object"
+ },
+ "SessionUsagePayload": {
+ "additionalProperties": false,
+ "description": "``server._start_usage_ticker``.",
+ "properties": {
+ "usage": {
+ "$ref": "#/components/schemas/Usage"
+ }
+ },
+ "required": [
+ "usage"
+ ],
+ "title": "SessionUsagePayload",
+ "type": "object"
+ },
+ "SessionUsageResult": {
+ "additionalProperties": true,
+ "properties": {
+ "model": {
+ "default": "",
+ "title": "Model",
+ "type": "string"
+ },
+ "input": {
+ "default": 0,
+ "title": "Input",
+ "type": "integer"
+ },
+ "output": {
+ "default": 0,
+ "title": "Output",
+ "type": "integer"
+ },
+ "reasoning": {
+ "default": 0,
+ "title": "Reasoning",
+ "type": "integer"
+ },
+ "prompt": {
+ "default": 0,
+ "title": "Prompt",
+ "type": "integer"
+ },
+ "completion": {
+ "default": 0,
+ "title": "Completion",
+ "type": "integer"
+ },
+ "total": {
+ "default": 0,
+ "title": "Total",
+ "type": "integer"
+ },
+ "calls": {
+ "default": 0,
+ "title": "Calls",
+ "type": "integer"
+ },
+ "compressions": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Compressions"
+ },
+ "context_used": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Context Used"
+ },
+ "context_max": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Context Max"
+ },
+ "context_percent": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Context Percent"
+ },
+ "context_source": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Context Source"
+ },
+ "context_estimated": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Context Estimated"
+ },
+ "cache_hit_pct": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cache Hit Pct"
+ },
+ "cache_read": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cache Read"
+ },
+ "cache_write": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cache Write"
+ },
+ "avg_latency_s": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Avg Latency S"
+ },
+ "avg_tps": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Avg Tps"
+ },
+ "active_subagents": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Active Subagents"
+ },
+ "dev_credits_spent_micros": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Dev Credits Spent Micros"
+ },
+ "cost_usd": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cost Usd"
+ },
+ "cost_status": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cost Status"
+ },
+ "credits_lines": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Credits Lines"
+ }
+ },
+ "title": "SessionUsageResult",
+ "type": "object"
+ },
+ "SessionWorkspaceMoveParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "session_key": {
+ "title": "Session Key",
+ "type": "string"
+ },
+ "cwd": {
+ "title": "Cwd",
+ "type": "string"
+ }
+ },
+ "required": [
+ "session_key",
+ "cwd"
+ ],
+ "title": "SessionWorkspaceMoveParams",
+ "type": "object"
+ },
+ "SessionWorkspaceMoveResult": {
+ "additionalProperties": false,
+ "properties": {
+ "cwd": {
+ "title": "Cwd",
+ "type": "string"
+ },
+ "branch": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Branch"
+ },
+ "git_repo_root": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Git Repo Root"
+ }
+ },
+ "required": [
+ "cwd"
+ ],
+ "title": "SessionWorkspaceMoveResult",
+ "type": "object"
+ },
+ "SetupReadyPayload": {
+ "additionalProperties": true,
+ "description": "``hermes_cli/free_tier_bootstrap.py::SetupRecord.as_payload``.",
+ "properties": {
+ "provider_configured": {
+ "title": "Provider Configured",
+ "type": "boolean"
+ },
+ "inference_provider": {
+ "title": "Inference Provider",
+ "type": "string"
+ },
+ "free_tier": {
+ "title": "Free Tier",
+ "type": "boolean"
+ },
+ "has_identity": {
+ "title": "Has Identity",
+ "type": "boolean"
+ },
+ "other_providers": {
+ "title": "Other Providers",
+ "type": "boolean"
+ },
+ "error": {
+ "default": "",
+ "title": "Error",
+ "type": "string"
+ },
+ "finished_at": {
+ "title": "Finished At",
+ "type": "number"
+ }
+ },
+ "required": [
+ "provider_configured",
+ "inference_provider",
+ "free_tier",
+ "has_identity",
+ "other_providers",
+ "finished_at"
+ ],
+ "title": "SetupReadyPayload",
+ "type": "object"
+ },
+ "SetupRuntimeCheckParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "provider": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Provider"
+ }
+ },
+ "title": "SetupRuntimeCheckParams",
+ "type": "object"
+ },
+ "SetupRuntimeCheckResult": {
+ "additionalProperties": false,
+ "description": "``ok=False`` + ``error`` when the resolved model can't be served; ``free_tier`` says the\nselected route is the welcome host.",
+ "properties": {
+ "ok": {
+ "title": "Ok",
+ "type": "boolean"
+ },
+ "provider": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Provider"
+ },
+ "model": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Model"
+ },
+ "source": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Source"
+ },
+ "error": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Error"
+ },
+ "free_tier": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Free Tier"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "required": [
+ "ok"
+ ],
+ "title": "SetupRuntimeCheckResult",
+ "type": "object"
+ },
+ "SetupStatusResult": {
+ "additionalProperties": false,
+ "description": "``provider_configured`` is the loose answer; the boot record's fields (``ready``,\n``free_tier``, ``other_providers``, ``inference_provider``) ride along on the launch profile.\nAn unknown ``profile`` answers ``ok=False`` + ``error``.",
+ "properties": {
+ "provider_configured": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Provider Configured"
+ },
+ "ready": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Ready"
+ },
+ "free_tier": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Free Tier"
+ },
+ "other_providers": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Other Providers"
+ },
+ "inference_provider": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Inference Provider"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "ok": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Ok"
+ },
+ "error": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Error"
+ }
+ },
+ "title": "SetupStatusResult",
+ "type": "object"
+ },
+ "ShellExecParams": {
+ "additionalProperties": false,
+ "properties": {
+ "command": {
+ "title": "Command",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "required": [
+ "command"
+ ],
+ "title": "ShellExecParams",
+ "type": "object"
+ },
+ "ShellExecResult": {
+ "additionalProperties": false,
+ "properties": {
+ "stdout": {
+ "title": "Stdout",
+ "type": "string"
+ },
+ "stderr": {
+ "title": "Stderr",
+ "type": "string"
+ },
+ "code": {
+ "title": "Code",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "stdout",
+ "stderr",
+ "code"
+ ],
+ "title": "ShellExecResult",
+ "type": "object"
+ },
+ "SideAgentCompletePayload": {
+ "additionalProperties": false,
+ "description": "``methods_prompt._spawn_side_agent``: ``{task_id, **extra, text}``; btw adds ``question``.",
+ "properties": {
+ "task_id": {
+ "title": "Task Id",
+ "type": "string"
+ },
+ "text": {
+ "title": "Text",
+ "type": "string"
+ },
+ "question": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Question"
+ }
+ },
+ "required": [
+ "task_id",
+ "text"
+ ],
+ "title": "SideAgentCompletePayload",
+ "type": "object"
+ },
+ "SideAgentParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "text": {
+ "title": "Text",
+ "type": "string"
+ }
+ },
+ "required": [
+ "session_id",
+ "text"
+ ],
+ "title": "SideAgentParams",
+ "type": "object"
+ },
+ "SkillBrowseItem": {
+ "additionalProperties": true,
+ "description": "``hermes_cli.skills_hub.browse_skills`` row.",
+ "properties": {
+ "name": {
+ "default": "",
+ "title": "Name",
+ "type": "string"
+ },
+ "description": {
+ "default": "",
+ "title": "Description",
+ "type": "string"
+ },
+ "source": {
+ "default": "",
+ "title": "Source",
+ "type": "string"
+ },
+ "trust": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Trust"
+ },
+ "identifier": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Identifier"
+ }
+ },
+ "title": "SkillBrowseItem",
+ "type": "object"
+ },
+ "SkillCatalogEntry": {
+ "additionalProperties": false,
+ "properties": {
+ "usage": {
+ "default": 0,
+ "title": "Usage",
+ "type": "integer"
+ },
+ "origin": {
+ "default": "local",
+ "title": "Origin",
+ "type": "string"
+ }
+ },
+ "title": "SkillCatalogEntry",
+ "type": "object"
+ },
+ "SkillCommandRef": {
+ "additionalProperties": false,
+ "properties": {
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "description": {
+ "default": "",
+ "title": "Description",
+ "type": "string"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "title": "SkillCommandRef",
+ "type": "object"
+ },
+ "SkillHubHit": {
+ "additionalProperties": false,
+ "properties": {
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "description": {
+ "title": "Description",
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "description"
+ ],
+ "title": "SkillHubHit",
+ "type": "object"
+ },
+ "SkillInspectInfo": {
+ "additionalProperties": true,
+ "description": "``hermes_cli.skills_hub.inspect_skill``; ``{}`` when the identifier resolves nowhere.",
+ "properties": {
+ "name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Name"
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Description"
+ },
+ "source": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Source"
+ },
+ "identifier": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Identifier"
+ },
+ "tags": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Tags"
+ },
+ "skill_md_preview": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Skill Md Preview"
+ }
+ },
+ "title": "SkillInspectInfo",
+ "type": "object"
+ },
+ "SkillsAction": {
+ "enum": [
+ "list",
+ "search",
+ "install",
+ "browse",
+ "inspect"
+ ],
+ "title": "SkillsAction",
+ "type": "string"
+ },
+ "SkillsManageParams": {
+ "additionalProperties": false,
+ "description": "``query`` is the search text / hub identifier / browse page (digits); ``page`` / ``page_size``\napply to ``browse``.",
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "action": {
+ "$ref": "#/components/schemas/SkillsAction",
+ "default": "list"
+ },
+ "query": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Query"
+ },
+ "page": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Page"
+ },
+ "page_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Page Size"
+ }
+ },
+ "title": "SkillsManageParams",
+ "type": "object"
+ },
+ "SkillsManageResult": {
+ "additionalProperties": false,
+ "description": "Shape follows the action: ``list`` \u2192 ``skills`` (category \u2192 names); ``search`` \u2192 ``results``;\n``install`` \u2192 ``installed`` + ``name``; ``browse`` \u2192 ``items`` + paging; ``inspect`` \u2192 ``info``.",
+ "properties": {
+ "skills": {
+ "anyOf": [
+ {
+ "additionalProperties": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Skills"
+ },
+ "results": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/components/schemas/SkillHubHit"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Results"
+ },
+ "installed": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Installed"
+ },
+ "name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Name"
+ },
+ "items": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/components/schemas/SkillBrowseItem"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Items"
+ },
+ "page": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Page"
+ },
+ "total_pages": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Total Pages"
+ },
+ "total": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Total"
+ },
+ "info": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/SkillInspectInfo"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ }
+ },
+ "title": "SkillsManageResult",
+ "type": "object"
+ },
+ "SkillsReloadDiff": {
+ "additionalProperties": true,
+ "description": "``agent.skill_commands.reload_skills``.",
+ "properties": {
+ "added": {
+ "items": {
+ "$ref": "#/components/schemas/SkillCommandRef"
+ },
+ "title": "Added",
+ "type": "array"
+ },
+ "removed": {
+ "items": {
+ "$ref": "#/components/schemas/SkillCommandRef"
+ },
+ "title": "Removed",
+ "type": "array"
+ },
+ "unchanged": {
+ "items": {
+ "type": "string"
+ },
+ "title": "Unchanged",
+ "type": "array"
+ },
+ "total": {
+ "default": 0,
+ "title": "Total",
+ "type": "integer"
+ },
+ "commands": {
+ "default": 0,
+ "title": "Commands",
+ "type": "integer"
+ }
+ },
+ "title": "SkillsReloadDiff",
+ "type": "object"
+ },
+ "SkillsReloadParams": {
+ "additionalProperties": false,
+ "properties": {},
+ "title": "SkillsReloadParams",
+ "type": "object"
+ },
+ "SkillsReloadResult": {
+ "additionalProperties": false,
+ "properties": {
+ "output": {
+ "title": "Output",
+ "type": "string"
+ },
+ "result": {
+ "$ref": "#/components/schemas/SkillsReloadDiff"
+ }
+ },
+ "required": [
+ "output",
+ "result"
+ ],
+ "title": "SkillsReloadResult",
+ "type": "object"
+ },
+ "SkinPayload": {
+ "additionalProperties": true,
+ "description": "``tui_gateway/change_watcher.py::resolve_skin`` \u2014 the resolved active skin (``HermesSkin``).\n``{}`` when the skin engine failed to load. Colour maps are token \u2192 colour string.",
+ "properties": {
+ "name": {
+ "default": "",
+ "title": "Name",
+ "type": "string"
+ },
+ "description": {
+ "default": "",
+ "title": "Description",
+ "type": "string"
+ },
+ "colors": {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Colors",
+ "type": "object"
+ },
+ "light_colors": {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Light Colors",
+ "type": "object"
+ },
+ "dark_colors": {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Dark Colors",
+ "type": "object"
+ },
+ "branding": {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Branding",
+ "type": "object"
+ },
+ "banner_logo": {
+ "default": "",
+ "title": "Banner Logo",
+ "type": "string"
+ },
+ "banner_hero": {
+ "default": "",
+ "title": "Banner Hero",
+ "type": "string"
+ },
+ "tool_prefix": {
+ "default": "",
+ "title": "Tool Prefix",
+ "type": "string"
+ },
+ "help_header": {
+ "default": "",
+ "title": "Help Header",
+ "type": "string"
+ }
+ },
+ "title": "SkinPayload",
+ "type": "object"
+ },
+ "SlashExecParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "command": {
+ "title": "Command",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "required": [
+ "session_id",
+ "command"
+ ],
+ "title": "SlashExecParams",
+ "type": "object"
+ },
+ "SlashExecResult": {
+ "additionalProperties": false,
+ "description": "Plain worker/plugin text in ``output`` (+ ``warning``), or \u2014 when the command was rerouted to\n``command.dispatch`` \u2014 that method's directive fields with ``type`` set.",
+ "properties": {
+ "output": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Output"
+ },
+ "warning": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Warning"
+ },
+ "type": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/DispatchType"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "target": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Target"
+ },
+ "message": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Message"
+ },
+ "notice": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Notice"
+ },
+ "display": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Display"
+ },
+ "name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Name"
+ },
+ "status": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Status"
+ }
+ },
+ "title": "SlashExecResult",
+ "type": "object"
+ },
+ "SpawnTreeEntry": {
+ "additionalProperties": true,
+ "description": "Index row (``server._append_spawn_tree_index``) or a legacy file scan.",
+ "properties": {
+ "path": {
+ "title": "Path",
+ "type": "string"
+ },
+ "session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Session Id"
+ },
+ "started_at": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Started At"
+ },
+ "finished_at": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Finished At"
+ },
+ "label": {
+ "default": "",
+ "title": "Label",
+ "type": "string"
+ },
+ "count": {
+ "default": 0,
+ "title": "Count",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "path"
+ ],
+ "title": "SpawnTreeEntry",
+ "type": "object"
+ },
+ "SpawnTreeListParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Session Id"
+ },
+ "cross_session": {
+ "default": false,
+ "title": "Cross Session",
+ "type": "boolean"
+ },
+ "limit": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Limit"
+ }
+ },
+ "title": "SpawnTreeListParams",
+ "type": "object"
+ },
+ "SpawnTreeListResult": {
+ "additionalProperties": false,
+ "properties": {
+ "entries": {
+ "items": {
+ "$ref": "#/components/schemas/SpawnTreeEntry"
+ },
+ "title": "Entries",
+ "type": "array"
+ }
+ },
+ "required": [
+ "entries"
+ ],
+ "title": "SpawnTreeListResult",
+ "type": "object"
+ },
+ "SpawnTreeLoadParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "path": {
+ "title": "Path",
+ "type": "string"
+ }
+ },
+ "required": [
+ "path"
+ ],
+ "title": "SpawnTreeLoadParams",
+ "type": "object"
+ },
+ "SpawnTreeLoadResult": {
+ "additionalProperties": true,
+ "description": "The snapshot file as written by ``spawn_tree.save`` (open: the file is the contract).",
+ "properties": {
+ "session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Session Id"
+ },
+ "started_at": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Started At"
+ },
+ "finished_at": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Finished At"
+ },
+ "label": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Label"
+ },
+ "subagents": {
+ "items": {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ "title": "Subagents",
+ "type": "array"
+ }
+ },
+ "title": "SpawnTreeLoadResult",
+ "type": "object"
+ },
+ "SpawnTreeSaveParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "subagents": {
+ "items": {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ "title": "Subagents",
+ "type": "array"
+ },
+ "session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Session Id"
+ },
+ "started_at": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Started At"
+ },
+ "finished_at": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Finished At"
+ },
+ "label": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Label"
+ }
+ },
+ "required": [
+ "subagents"
+ ],
+ "title": "SpawnTreeSaveParams",
+ "type": "object"
+ },
+ "SpawnTreeSaveResult": {
+ "additionalProperties": false,
+ "properties": {
+ "path": {
+ "title": "Path",
+ "type": "string"
+ },
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ }
+ },
+ "required": [
+ "path",
+ "session_id"
+ ],
+ "title": "SpawnTreeSaveResult",
+ "type": "object"
+ },
+ "StatusUpdatePayload": {
+ "additionalProperties": false,
+ "description": "``server._status_update`` and the direct emitters (goal / loop / heartbeat / process).",
+ "properties": {
+ "kind": {
+ "title": "Kind",
+ "type": "string"
+ },
+ "text": {
+ "title": "Text",
+ "type": "string"
+ }
+ },
+ "required": [
+ "kind",
+ "text"
+ ],
+ "title": "StatusUpdatePayload",
+ "type": "object"
+ },
+ "SteerStatus": {
+ "enum": [
+ "queued",
+ "rejected"
+ ],
+ "title": "SteerStatus",
+ "type": "string"
+ },
+ "StreamDeltaPayload": {
+ "additionalProperties": false,
+ "description": "``prompt_turn._invoke_agent._stream`` (message.delta: ``text`` + optional ``rendered``),\n``agent_callbacks._agent_cbs`` (reasoning.delta / thinking.delta), ``tool_progress._progress_reasoning``\n(reasoning.available). ``verbose`` rides only when the session's verbose reasoning mode is on.",
+ "properties": {
+ "text": {
+ "title": "Text",
+ "type": "string"
+ },
+ "rendered": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Rendered"
+ },
+ "verbose": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Verbose"
+ }
+ },
+ "required": [
+ "text"
+ ],
+ "title": "StreamDeltaPayload",
+ "type": "object"
+ },
+ "SubagentEventPayload": {
+ "additionalProperties": false,
+ "description": "``tool_progress._progress_subagent`` \u2014 every ``subagent.*`` frame; identity fields are optional\nbecause older emitters omit them and the TUI spawn tree falls back to flat rendering.",
+ "properties": {
+ "goal": {
+ "title": "Goal",
+ "type": "string"
+ },
+ "task_count": {
+ "title": "Task Count",
+ "type": "integer"
+ },
+ "task_index": {
+ "title": "Task Index",
+ "type": "integer"
+ },
+ "subagent_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Subagent Id"
+ },
+ "parent_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Parent Id"
+ },
+ "child_session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Child Session Id"
+ },
+ "delegation_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Delegation Id"
+ },
+ "depth": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Depth"
+ },
+ "model": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Model"
+ },
+ "tool_count": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Tool Count"
+ },
+ "toolsets": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Toolsets"
+ },
+ "input_tokens": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Input Tokens"
+ },
+ "output_tokens": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Output Tokens"
+ },
+ "reasoning_tokens": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Reasoning Tokens"
+ },
+ "api_calls": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Api Calls"
+ },
+ "files_read": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Files Read"
+ },
+ "files_written": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Files Written"
+ },
+ "output_tail": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/components/schemas/SubagentOutputTailEntry"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Output Tail"
+ },
+ "tool_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Tool Name"
+ },
+ "text": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Text"
+ },
+ "status": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/SubagentStatus"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "summary": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Summary"
+ },
+ "duration_seconds": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Duration Seconds"
+ },
+ "tool_preview": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Tool Preview"
+ }
+ },
+ "required": [
+ "goal",
+ "task_count",
+ "task_index"
+ ],
+ "title": "SubagentEventPayload",
+ "type": "object"
+ },
+ "SubagentIdParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "subagent_id": {
+ "title": "Subagent Id",
+ "type": "string"
+ }
+ },
+ "required": [
+ "session_id",
+ "subagent_id"
+ ],
+ "title": "SubagentIdParams",
+ "type": "object"
+ },
+ "SubagentInterruptResult": {
+ "additionalProperties": false,
+ "properties": {
+ "found": {
+ "title": "Found",
+ "type": "boolean"
+ },
+ "subagent_id": {
+ "title": "Subagent Id",
+ "type": "string"
+ }
+ },
+ "required": [
+ "found",
+ "subagent_id"
+ ],
+ "title": "SubagentInterruptResult",
+ "type": "object"
+ },
+ "SubagentListResult": {
+ "additionalProperties": false,
+ "description": "``delegations`` is reserved for async delegation records and is currently always empty.",
+ "properties": {
+ "subagents": {
+ "items": {
+ "$ref": "#/components/schemas/SubagentSnapshot"
+ },
+ "title": "Subagents",
+ "type": "array"
+ },
+ "delegations": {
+ "items": {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ "title": "Delegations",
+ "type": "array"
+ }
+ },
+ "title": "SubagentListResult",
+ "type": "object"
+ },
+ "SubagentOutputTailEntry": {
+ "additionalProperties": false,
+ "description": "``tools/delegate_tool_results.py::_extract_output_tail`` row.",
+ "properties": {
+ "tool": {
+ "title": "Tool",
+ "type": "string"
+ },
+ "preview": {
+ "title": "Preview",
+ "type": "string"
+ },
+ "is_error": {
+ "title": "Is Error",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "tool",
+ "preview",
+ "is_error"
+ ],
+ "title": "SubagentOutputTailEntry",
+ "type": "object"
+ },
+ "SubagentSnapshot": {
+ "additionalProperties": false,
+ "description": "``methods_subagents._SUBAGENT_SNAPSHOT_FIELDS`` projection of one live child record.",
+ "properties": {
+ "subagent_id": {
+ "title": "Subagent Id",
+ "type": "string"
+ },
+ "parent_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Parent Id"
+ },
+ "depth": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Depth"
+ },
+ "goal": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Goal"
+ },
+ "delegation_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Delegation Id"
+ },
+ "model": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Model"
+ },
+ "started_at": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Started At"
+ },
+ "status": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/SubagentStatus"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "tool_count": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Tool Count"
+ },
+ "last_tool": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Last Tool"
+ },
+ "accepting_steer": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Accepting Steer"
+ }
+ },
+ "required": [
+ "subagent_id"
+ ],
+ "title": "SubagentSnapshot",
+ "type": "object"
+ },
+ "SubagentStatus": {
+ "description": "Lifecycle of one delegated child (``tools/delegate_tool_child_run.py``); ``failed`` /\n``error`` / ``timeout`` / ``interrupted`` / ``completed`` are terminal.",
+ "enum": [
+ "queued",
+ "running",
+ "completed",
+ "failed",
+ "error",
+ "timeout",
+ "interrupted"
+ ],
+ "title": "SubagentStatus",
+ "type": "string"
+ },
+ "SubagentSteerParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "subagent_id": {
+ "title": "Subagent Id",
+ "type": "string"
+ },
+ "text": {
+ "title": "Text",
+ "type": "string"
+ }
+ },
+ "required": [
+ "session_id",
+ "subagent_id",
+ "text"
+ ],
+ "title": "SubagentSteerParams",
+ "type": "object"
+ },
+ "SubagentSteerResult": {
+ "additionalProperties": false,
+ "description": "``queued`` is not ``delivered``: a child past its final tool batch surfaces ``missed_steer``.",
+ "properties": {
+ "status": {
+ "$ref": "#/components/schemas/SteerStatus"
+ },
+ "subagent_id": {
+ "title": "Subagent Id",
+ "type": "string"
+ },
+ "text": {
+ "title": "Text",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "subagent_id",
+ "text"
+ ],
+ "title": "SubagentSteerResult",
+ "type": "object"
+ },
+ "SubagentTailResult": {
+ "additionalProperties": false,
+ "description": "``available`` is false while the child has no live transcript yet (or it was cleaned up).",
+ "properties": {
+ "subagent_id": {
+ "title": "Subagent Id",
+ "type": "string"
+ },
+ "available": {
+ "default": false,
+ "title": "Available",
+ "type": "boolean"
+ },
+ "text": {
+ "default": "",
+ "title": "Text",
+ "type": "string"
+ },
+ "truncated": {
+ "default": false,
+ "title": "Truncated",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "subagent_id"
+ ],
+ "title": "SubagentTailResult",
+ "type": "object"
+ },
+ "SubscriptionChangeEffect": {
+ "enum": [
+ "charge_now",
+ "scheduled",
+ "no_op",
+ "blocked"
+ ],
+ "title": "SubscriptionChangeEffect",
+ "type": "string"
+ },
+ "SubscriptionChangeParams": {
+ "additionalProperties": false,
+ "description": "Either a target tier (downgrade / same-price change) or ``cancel`` (period-end cancellation).",
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "subscription_type_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Subscription Type Id"
+ },
+ "cancel": {
+ "default": false,
+ "title": "Cancel",
+ "type": "boolean"
+ }
+ },
+ "title": "SubscriptionChangeParams",
+ "type": "object"
+ },
+ "SubscriptionContext": {
+ "enum": [
+ "personal",
+ "team"
+ ],
+ "title": "SubscriptionContext",
+ "type": "string"
+ },
+ "SubscriptionPreviewParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "subscription_type_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Subscription Type Id"
+ }
+ },
+ "title": "SubscriptionPreviewParams",
+ "type": "object"
+ },
+ "SubscriptionPreviewResult": {
+ "additionalProperties": false,
+ "description": "``_serialize_subscription_preview`` on success; ``effect`` drives the confirm copy.",
+ "properties": {
+ "ok": {
+ "title": "Ok",
+ "type": "boolean"
+ },
+ "error": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Error"
+ },
+ "message": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Message"
+ },
+ "portal_url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Portal Url"
+ },
+ "retry_after": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Retry After"
+ },
+ "payload": {
+ "anyOf": [
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Payload"
+ },
+ "actor": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Actor"
+ },
+ "code": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Code"
+ },
+ "recovery": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Recovery"
+ },
+ "effect": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/SubscriptionChangeEffect"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "reason": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Reason"
+ },
+ "current_tier_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Current Tier Id"
+ },
+ "current_tier_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Current Tier Name"
+ },
+ "target_tier_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Target Tier Id"
+ },
+ "target_tier_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Target Tier Name"
+ },
+ "monthly_credits_delta": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Monthly Credits Delta"
+ },
+ "amount_due_now_cents": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Amount Due Now Cents"
+ },
+ "effective_at": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Effective At"
+ }
+ },
+ "required": [
+ "ok"
+ ],
+ "title": "SubscriptionPreviewResult",
+ "type": "object"
+ },
+ "SubscriptionStateResult": {
+ "additionalProperties": false,
+ "description": "``_serialize_subscription_state``; the view's fallback emits only ``ok / logged_in / error``.",
+ "properties": {
+ "ok": {
+ "title": "Ok",
+ "type": "boolean"
+ },
+ "logged_in": {
+ "title": "Logged In",
+ "type": "boolean"
+ },
+ "is_admin": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Is Admin"
+ },
+ "can_change_plan": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Can Change Plan"
+ },
+ "org_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Org Name"
+ },
+ "org_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Org Id"
+ },
+ "role": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Role"
+ },
+ "context": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/SubscriptionContext"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "current": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/CurrentSubscription"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "tiers": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/components/schemas/SubscriptionTierOption"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Tiers"
+ },
+ "portal_url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Portal Url"
+ },
+ "error": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Error"
+ },
+ "usage": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/UsageModel"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ }
+ },
+ "required": [
+ "ok",
+ "logged_in"
+ ],
+ "title": "SubscriptionStateResult",
+ "type": "object"
+ },
+ "SubscriptionTierOption": {
+ "additionalProperties": false,
+ "properties": {
+ "tier_id": {
+ "title": "Tier Id",
+ "type": "string"
+ },
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "tier_order": {
+ "title": "Tier Order",
+ "type": "integer"
+ },
+ "dollars_per_month_display": {
+ "title": "Dollars Per Month Display",
+ "type": "string"
+ },
+ "monthly_credits": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Monthly Credits"
+ },
+ "is_current": {
+ "title": "Is Current",
+ "type": "boolean"
+ },
+ "is_enabled": {
+ "title": "Is Enabled",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "tier_id",
+ "name",
+ "tier_order",
+ "dollars_per_month_display",
+ "is_current",
+ "is_enabled"
+ ],
+ "title": "SubscriptionTierOption",
+ "type": "object"
+ },
+ "SubscriptionUpgradeParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "subscription_type_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Subscription Type Id"
+ },
+ "idempotency_key": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Idempotency Key"
+ }
+ },
+ "title": "SubscriptionUpgradeParams",
+ "type": "object"
+ },
+ "SubscriptionUpgradeResult": {
+ "additionalProperties": false,
+ "description": "The money route: ``status`` separates a completed upgrade from an SCA / decline that must\nfinish in the portal at ``recovery_url``; ``idempotency_key`` is echoed (also on error) so a\nretry reuses it.",
+ "properties": {
+ "ok": {
+ "title": "Ok",
+ "type": "boolean"
+ },
+ "error": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Error"
+ },
+ "message": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Message"
+ },
+ "portal_url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Portal Url"
+ },
+ "retry_after": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Retry After"
+ },
+ "payload": {
+ "anyOf": [
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Payload"
+ },
+ "actor": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Actor"
+ },
+ "code": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Code"
+ },
+ "recovery": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Recovery"
+ },
+ "status": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Status"
+ },
+ "target_tier_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Target Tier Name"
+ },
+ "recovery_url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Recovery Url"
+ },
+ "reason": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Reason"
+ },
+ "idempotency_key": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Idempotency Key"
+ }
+ },
+ "required": [
+ "ok"
+ ],
+ "title": "SubscriptionUpgradeResult",
+ "type": "object"
+ },
+ "SystemBatteryParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "title": "SystemBatteryParams",
+ "type": "object"
+ },
+ "SystemBatteryResult": {
+ "additionalProperties": false,
+ "properties": {
+ "available": {
+ "title": "Available",
+ "type": "boolean"
+ },
+ "percent": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Percent"
+ },
+ "plugged": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Plugged"
+ },
+ "category": {
+ "$ref": "#/components/schemas/BatteryCategory",
+ "default": "dim"
+ }
+ },
+ "required": [
+ "available"
+ ],
+ "title": "SystemBatteryResult",
+ "type": "object"
+ },
+ "TaskIdResult": {
+ "additionalProperties": false,
+ "description": "The side agent runs detached; its answer lands on the parent session as an event carrying\nthis ``task_id``.",
+ "properties": {
+ "task_id": {
+ "title": "Task Id",
+ "type": "string"
+ }
+ },
+ "required": [
+ "task_id"
+ ],
+ "title": "TaskIdResult",
+ "type": "object"
+ },
+ "TerminalClosePayload": {
+ "additionalProperties": false,
+ "properties": {
+ "process_id": {
+ "title": "Process Id",
+ "type": "string"
+ }
+ },
+ "required": [
+ "process_id"
+ ],
+ "title": "TerminalClosePayload",
+ "type": "object"
+ },
+ "TerminalOutputPayload": {
+ "additionalProperties": false,
+ "description": "``session_notifications`` process_registry.on_output.",
+ "properties": {
+ "process_id": {
+ "title": "Process Id",
+ "type": "string"
+ },
+ "chunk": {
+ "title": "Chunk",
+ "type": "string"
+ }
+ },
+ "required": [
+ "process_id",
+ "chunk"
+ ],
+ "title": "TerminalOutputPayload",
+ "type": "object"
+ },
+ "TerminalResizeParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "cols": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cols"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "TerminalResizeParams",
+ "type": "object"
+ },
+ "TerminalResizeResult": {
+ "additionalProperties": false,
+ "properties": {
+ "cols": {
+ "title": "Cols",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "cols"
+ ],
+ "title": "TerminalResizeResult",
+ "type": "object"
+ },
+ "TipShowPayload": {
+ "additionalProperties": false,
+ "description": "``tools/tip_tool.py``.",
+ "properties": {
+ "selector": {
+ "title": "Selector",
+ "type": "string"
+ },
+ "text": {
+ "title": "Text",
+ "type": "string"
+ },
+ "title": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Title"
+ },
+ "side": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Side"
+ }
+ },
+ "required": [
+ "selector",
+ "text"
+ ],
+ "title": "TipShowPayload",
+ "type": "object"
+ },
+ "TodoState": {
+ "additionalProperties": false,
+ "description": "``tool_progress._normalize_todo_state``: the authoritative todo snapshot.",
+ "properties": {
+ "todos": {
+ "items": {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ "title": "Todos",
+ "type": "array"
+ },
+ "revision": {
+ "title": "Revision",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "todos",
+ "revision"
+ ],
+ "title": "TodoState",
+ "type": "object"
+ },
+ "TodoUpdatedPayload": {
+ "additionalProperties": false,
+ "description": "``tool_progress._normalize_todo_state`` \u2014 full task snapshot.",
+ "properties": {
+ "todos": {
+ "items": {},
+ "title": "Todos",
+ "type": "array"
+ },
+ "revision": {
+ "title": "Revision",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "todos",
+ "revision"
+ ],
+ "title": "TodoUpdatedPayload",
+ "type": "object"
+ },
+ "ToolCompletePayload": {
+ "additionalProperties": false,
+ "description": "``tool_progress._on_tool_complete``; ``todos``/``revision`` merged in for the todo tools.",
+ "properties": {
+ "tool_id": {
+ "title": "Tool Id",
+ "type": "string"
+ },
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "args": {
+ "anyOf": [
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Args"
+ },
+ "duration_s": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Duration S"
+ },
+ "result": {
+ "default": null,
+ "title": "Result"
+ },
+ "summary": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Summary"
+ },
+ "result_text": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Result Text"
+ },
+ "inline_diff": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Inline Diff"
+ },
+ "todos": {
+ "anyOf": [
+ {
+ "items": {},
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Todos"
+ },
+ "revision": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Revision"
+ }
+ },
+ "required": [
+ "tool_id",
+ "name"
+ ],
+ "title": "ToolCompletePayload",
+ "type": "object"
+ },
+ "ToolGeneratingPayload": {
+ "additionalProperties": false,
+ "description": "``agent_callbacks`` tool_gen_callback.",
+ "properties": {
+ "name": {
+ "title": "Name",
+ "type": "string"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "title": "ToolGeneratingPayload",
+ "type": "object"
+ },
+ "ToolOutputRiskPayload": {
+ "additionalProperties": false,
+ "description": "``tool_progress._progress_output_risk``.",
+ "properties": {
+ "tool_id": {
+ "title": "Tool Id",
+ "type": "string"
+ },
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "risk": {
+ "title": "Risk",
+ "type": "string"
+ },
+ "findings": {
+ "items": {
+ "type": "string"
+ },
+ "title": "Findings",
+ "type": "array"
+ },
+ "redacted": {
+ "title": "Redacted",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "tool_id",
+ "name",
+ "risk",
+ "findings",
+ "redacted"
+ ],
+ "title": "ToolOutputRiskPayload",
+ "type": "object"
+ },
+ "ToolShowRow": {
+ "additionalProperties": false,
+ "properties": {
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "description": {
+ "title": "Description",
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "description"
+ ],
+ "title": "ToolShowRow",
+ "type": "object"
+ },
+ "ToolShowSection": {
+ "additionalProperties": false,
+ "properties": {
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "tools": {
+ "items": {
+ "$ref": "#/components/schemas/ToolShowRow"
+ },
+ "title": "Tools",
+ "type": "array"
+ }
+ },
+ "required": [
+ "name",
+ "tools"
+ ],
+ "title": "ToolShowSection",
+ "type": "object"
+ },
+ "ToolStartPayload": {
+ "additionalProperties": false,
+ "description": "``tool_progress._on_tool_start`` (+ ``agent_callbacks._mirror_subagent_to_child`` rows with\n``preview`` and empty ``args``). ``todos``/``revision`` are NOT set by the emitter; kept optional\nbecause tool.start rows may pass through connector redaction unchanged.",
+ "properties": {
+ "tool_id": {
+ "title": "Tool Id",
+ "type": "string"
+ },
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "context": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Context"
+ },
+ "args": {
+ "anyOf": [
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Args"
+ },
+ "args_text": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Args Text"
+ },
+ "preview": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Preview"
+ }
+ },
+ "required": [
+ "tool_id",
+ "name"
+ ],
+ "title": "ToolStartPayload",
+ "type": "object"
+ },
+ "ToolsAction": {
+ "enum": [
+ "enable",
+ "disable"
+ ],
+ "title": "ToolsAction",
+ "type": "string"
+ },
+ "ToolsConfigureParams": {
+ "additionalProperties": false,
+ "description": "``names`` are toolset keys or ``server:tool`` MCP targets; with ``session_id`` the live session's\nprofile is authoritative and its agent is rebuilt.",
+ "properties": {
+ "action": {
+ "$ref": "#/components/schemas/ToolsAction"
+ },
+ "names": {
+ "items": {
+ "type": "string"
+ },
+ "title": "Names",
+ "type": "array"
+ },
+ "session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Session Id"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "required": [
+ "action",
+ "names"
+ ],
+ "title": "ToolsConfigureParams",
+ "type": "object"
+ },
+ "ToolsConfigureResult": {
+ "additionalProperties": false,
+ "properties": {
+ "changed": {
+ "items": {
+ "type": "string"
+ },
+ "title": "Changed",
+ "type": "array"
+ },
+ "enabled_toolsets": {
+ "items": {
+ "type": "string"
+ },
+ "title": "Enabled Toolsets",
+ "type": "array"
+ },
+ "info": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/SessionLiveInfo"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "missing_servers": {
+ "items": {
+ "type": "string"
+ },
+ "title": "Missing Servers",
+ "type": "array"
+ },
+ "reset": {
+ "title": "Reset",
+ "type": "boolean"
+ },
+ "unknown": {
+ "items": {
+ "type": "string"
+ },
+ "title": "Unknown",
+ "type": "array"
+ }
+ },
+ "required": [
+ "changed",
+ "enabled_toolsets",
+ "missing_servers",
+ "reset",
+ "unknown"
+ ],
+ "title": "ToolsConfigureResult",
+ "type": "object"
+ },
+ "ToolsShowResult": {
+ "additionalProperties": false,
+ "properties": {
+ "sections": {
+ "items": {
+ "$ref": "#/components/schemas/ToolShowSection"
+ },
+ "title": "Sections",
+ "type": "array"
+ },
+ "total": {
+ "title": "Total",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "sections",
+ "total"
+ ],
+ "title": "ToolsShowResult",
+ "type": "object"
+ },
+ "ToolsetEntry": {
+ "additionalProperties": false,
+ "properties": {
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "enabled": {
+ "default": true,
+ "title": "Enabled",
+ "type": "boolean"
+ },
+ "label": {
+ "default": "",
+ "title": "Label",
+ "type": "string"
+ },
+ "description": {
+ "default": "",
+ "title": "Description",
+ "type": "string"
+ },
+ "tool_count": {
+ "default": 0,
+ "title": "Tool Count",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "title": "ToolsetEntry",
+ "type": "object"
+ },
+ "ToolsetRow": {
+ "additionalProperties": false,
+ "description": "One row of ``methods_tools._toolset_rows``; ``tools`` only when the caller asked for them\n(``tools.list``).",
+ "properties": {
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "description": {
+ "title": "Description",
+ "type": "string"
+ },
+ "tool_count": {
+ "title": "Tool Count",
+ "type": "integer"
+ },
+ "enabled": {
+ "title": "Enabled",
+ "type": "boolean"
+ },
+ "tools": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Tools"
+ }
+ },
+ "required": [
+ "name",
+ "description",
+ "tool_count",
+ "enabled"
+ ],
+ "title": "ToolsetRow",
+ "type": "object"
+ },
+ "ToolsetsListResult": {
+ "additionalProperties": false,
+ "properties": {
+ "toolsets": {
+ "items": {
+ "$ref": "#/components/schemas/ToolsetRow"
+ },
+ "title": "Toolsets",
+ "type": "array"
+ }
+ },
+ "required": [
+ "toolsets"
+ ],
+ "title": "ToolsetsListResult",
+ "type": "object"
+ },
+ "TourRequestParams": {
+ "additionalProperties": false,
+ "description": "``tools/tour_tool.py`` field set.",
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "action": {
+ "title": "Action",
+ "type": "string"
+ },
+ "surface": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Surface"
+ },
+ "selector": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Selector"
+ },
+ "title": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Title"
+ },
+ "text": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Text"
+ },
+ "side": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Side"
+ },
+ "steps": {
+ "anyOf": [
+ {
+ "items": {
+ "$ref": "#/components/schemas/TourStep"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Steps"
+ },
+ "step_index": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Step Index"
+ }
+ },
+ "required": [
+ "session_id",
+ "action"
+ ],
+ "title": "TourRequestParams",
+ "type": "object"
+ },
+ "TourStep": {
+ "additionalProperties": true,
+ "properties": {
+ "selector": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Selector"
+ },
+ "title": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Title"
+ },
+ "text": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Text"
+ },
+ "side": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Side"
+ }
+ },
+ "title": "TourStep",
+ "type": "object"
+ },
+ "TranscriptMessage": {
+ "additionalProperties": true,
+ "description": "One transcript row as the gateway PROJECTS it for renderers (``session_history._project_history``):\n``text`` (never ``content``), display-only ``timestamp`` / ``display_kind`` / ``display_metadata``, the\ndurable ``row_id`` rewind targets, and for tool rows ``name`` + ``context`` preview + full ``args``.\nAssistant detail sidecars (``reasoning``, \u2026) ride as extra keys.",
+ "properties": {
+ "role": {
+ "title": "Role",
+ "type": "string"
+ },
+ "text": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Text"
+ },
+ "timestamp": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Timestamp"
+ },
+ "row_id": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Row Id"
+ },
+ "display_kind": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Display Kind"
+ },
+ "display_metadata": {
+ "anyOf": [
+ {},
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Display Metadata"
+ },
+ "name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Name"
+ },
+ "context": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Context"
+ },
+ "args": {
+ "anyOf": [
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Args"
+ },
+ "reasoning": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Reasoning"
+ }
+ },
+ "required": [
+ "role"
+ ],
+ "title": "TranscriptMessage",
+ "type": "object"
+ },
+ "TurnStatus": {
+ "description": "``prompt_turn._result_status``.",
+ "enum": [
+ "complete",
+ "error",
+ "interrupted"
+ ],
+ "title": "TurnStatus",
+ "type": "string"
+ },
+ "UiMetaConflict": {
+ "additionalProperties": false,
+ "properties": {
+ "expected": {
+ "default": null,
+ "title": "Expected"
+ },
+ "actual": {
+ "default": 0,
+ "title": "Actual",
+ "type": "integer"
+ }
+ },
+ "title": "UiMetaConflict",
+ "type": "object"
+ },
+ "Usage": {
+ "additionalProperties": true,
+ "description": "``tui_gateway/server.py::_get_usage`` + ``agent/context_breakdown.py::context_usage_fields``.",
+ "properties": {
+ "model": {
+ "default": "",
+ "title": "Model",
+ "type": "string"
+ },
+ "input": {
+ "default": 0,
+ "title": "Input",
+ "type": "integer"
+ },
+ "output": {
+ "default": 0,
+ "title": "Output",
+ "type": "integer"
+ },
+ "reasoning": {
+ "default": 0,
+ "title": "Reasoning",
+ "type": "integer"
+ },
+ "prompt": {
+ "default": 0,
+ "title": "Prompt",
+ "type": "integer"
+ },
+ "completion": {
+ "default": 0,
+ "title": "Completion",
+ "type": "integer"
+ },
+ "total": {
+ "default": 0,
+ "title": "Total",
+ "type": "integer"
+ },
+ "calls": {
+ "default": 0,
+ "title": "Calls",
+ "type": "integer"
+ },
+ "compressions": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Compressions"
+ },
+ "context_used": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Context Used"
+ },
+ "context_max": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Context Max"
+ },
+ "context_percent": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Context Percent"
+ },
+ "context_source": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Context Source"
+ },
+ "context_estimated": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Context Estimated"
+ },
+ "cache_hit_pct": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cache Hit Pct"
+ },
+ "cache_read": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cache Read"
+ },
+ "cache_write": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cache Write"
+ },
+ "avg_latency_s": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Avg Latency S"
+ },
+ "avg_tps": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Avg Tps"
+ },
+ "active_subagents": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Active Subagents"
+ },
+ "dev_credits_spent_micros": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Dev Credits Spent Micros"
+ },
+ "cost_usd": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cost Usd"
+ },
+ "cost_status": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cost Status"
+ }
+ },
+ "title": "Usage",
+ "type": "object"
+ },
+ "UsageBar": {
+ "additionalProperties": false,
+ "description": "``_serialize_usage_bar``: one bar, magnitudes pre-formatted; ``pct_used`` only for ``plan``.",
+ "properties": {
+ "kind": {
+ "$ref": "#/components/schemas/UsageBarKind"
+ },
+ "remaining_display": {
+ "title": "Remaining Display",
+ "type": "string"
+ },
+ "total_display": {
+ "title": "Total Display",
+ "type": "string"
+ },
+ "spent_display": {
+ "title": "Spent Display",
+ "type": "string"
+ },
+ "pct_used": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Pct Used"
+ },
+ "fill_fraction": {
+ "title": "Fill Fraction",
+ "type": "number"
+ }
+ },
+ "required": [
+ "kind",
+ "remaining_display",
+ "total_display",
+ "spent_display",
+ "fill_fraction"
+ ],
+ "title": "UsageBar",
+ "type": "object"
+ },
+ "UsageBarKind": {
+ "enum": [
+ "plan",
+ "topup"
+ ],
+ "title": "UsageBarKind",
+ "type": "string"
+ },
+ "UsageModel": {
+ "additionalProperties": false,
+ "description": "``_serialize_usage_model`` \u2014 also embedded as ``usage`` in the billing / subscription states,\nwhere the fail-open form is a bare ``{available: false}`` (no ``ok``).",
+ "properties": {
+ "ok": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Ok"
+ },
+ "available": {
+ "title": "Available",
+ "type": "boolean"
+ },
+ "status": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Status"
+ },
+ "plan_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Plan Name"
+ },
+ "renews_at": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Renews At"
+ },
+ "renews_display": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Renews Display"
+ },
+ "subscription_remaining_display": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Subscription Remaining Display"
+ },
+ "topup_remaining_display": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Topup Remaining Display"
+ },
+ "total_spendable_display": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Total Spendable Display"
+ },
+ "has_topup": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Has Topup"
+ },
+ "plan_bar": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/UsageBar"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "topup_bar": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/UsageBar"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ }
+ },
+ "required": [
+ "available"
+ ],
+ "title": "UsageModel",
+ "type": "object"
+ },
+ "ValueResult": {
+ "additionalProperties": false,
+ "description": "The answer to any one-string prompt (sudo, secret, vault prompts, desktop bridges):\n``''`` means skipped / declined.",
+ "properties": {
+ "value": {
+ "title": "Value",
+ "type": "string"
+ }
+ },
+ "required": [
+ "value"
+ ],
+ "title": "ValueResult",
+ "type": "object"
+ },
+ "VaultAddParams": {
+ "additionalProperties": false,
+ "description": "``secret`` goes straight into the encrypted store; the result carries only the new id.",
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "kind": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/VaultKind"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "label": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Label"
+ },
+ "origin": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Origin"
+ },
+ "secret": {
+ "anyOf": [
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Secret"
+ }
+ },
+ "title": "VaultAddParams",
+ "type": "object"
+ },
+ "VaultAddResult": {
+ "additionalProperties": false,
+ "properties": {
+ "id": {
+ "title": "Id",
+ "type": "string"
+ }
+ },
+ "required": [
+ "id"
+ ],
+ "title": "VaultAddResult",
+ "type": "object"
+ },
+ "VaultCodeRequestParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "site": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Site"
+ },
+ "hint": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Hint"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "VaultCodeRequestParams",
+ "type": "object"
+ },
+ "VaultItem": {
+ "additionalProperties": false,
+ "description": "Metadata-only view (``VaultItemMeta.to_dict`` + ``backend``); never a secret.",
+ "properties": {
+ "id": {
+ "title": "Id",
+ "type": "string"
+ },
+ "kind": {
+ "title": "Kind",
+ "type": "string"
+ },
+ "label": {
+ "title": "Label",
+ "type": "string"
+ },
+ "origin": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Origin"
+ },
+ "created_at": {
+ "default": "",
+ "title": "Created At",
+ "type": "string"
+ },
+ "identifier": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Identifier"
+ },
+ "identifier_type": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Identifier Type"
+ },
+ "has_otp": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Has Otp"
+ },
+ "backend": {
+ "title": "Backend",
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "kind",
+ "label",
+ "backend"
+ ],
+ "title": "VaultItem",
+ "type": "object"
+ },
+ "VaultKind": {
+ "enum": [
+ "login",
+ "payment",
+ "address"
+ ],
+ "title": "VaultKind",
+ "type": "string"
+ },
+ "VaultListResult": {
+ "additionalProperties": false,
+ "properties": {
+ "items": {
+ "items": {
+ "$ref": "#/components/schemas/VaultItem"
+ },
+ "title": "Items",
+ "type": "array"
+ }
+ },
+ "title": "VaultListResult",
+ "type": "object"
+ },
+ "VaultLockParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Name"
+ }
+ },
+ "title": "VaultLockParams",
+ "type": "object"
+ },
+ "VaultLockResult": {
+ "additionalProperties": false,
+ "properties": {
+ "locked": {
+ "default": true,
+ "title": "Locked",
+ "type": "boolean"
+ }
+ },
+ "title": "VaultLockResult",
+ "type": "object"
+ },
+ "VaultRemoveParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Id"
+ }
+ },
+ "title": "VaultRemoveParams",
+ "type": "object"
+ },
+ "VaultRemoveResult": {
+ "additionalProperties": false,
+ "properties": {
+ "removed": {
+ "title": "Removed",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "removed"
+ ],
+ "title": "VaultRemoveResult",
+ "type": "object"
+ },
+ "VaultSaveLoginRequestParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "origin": {
+ "title": "Origin",
+ "type": "string"
+ },
+ "site": {
+ "title": "Site",
+ "type": "string"
+ }
+ },
+ "required": [
+ "session_id",
+ "origin",
+ "site"
+ ],
+ "title": "VaultSaveLoginRequestParams",
+ "type": "object"
+ },
+ "VaultSource": {
+ "additionalProperties": false,
+ "properties": {
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "display_name": {
+ "title": "Display Name",
+ "type": "string"
+ },
+ "enabled": {
+ "title": "Enabled",
+ "type": "boolean"
+ },
+ "needs_unlock": {
+ "title": "Needs Unlock",
+ "type": "boolean"
+ },
+ "unlocked": {
+ "title": "Unlocked",
+ "type": "boolean"
+ },
+ "installed": {
+ "title": "Installed",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "name",
+ "display_name",
+ "enabled",
+ "needs_unlock",
+ "unlocked",
+ "installed"
+ ],
+ "title": "VaultSource",
+ "type": "object"
+ },
+ "VaultSourceSetParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Name"
+ },
+ "enabled": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Enabled"
+ }
+ },
+ "title": "VaultSourceSetParams",
+ "type": "object"
+ },
+ "VaultSourceSetResult": {
+ "additionalProperties": false,
+ "properties": {
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "enabled": {
+ "title": "Enabled",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "name",
+ "enabled"
+ ],
+ "title": "VaultSourceSetResult",
+ "type": "object"
+ },
+ "VaultSourcesResult": {
+ "additionalProperties": false,
+ "properties": {
+ "sources": {
+ "items": {
+ "$ref": "#/components/schemas/VaultSource"
+ },
+ "title": "Sources",
+ "type": "array"
+ }
+ },
+ "title": "VaultSourcesResult",
+ "type": "object"
+ },
+ "VaultUnlockParams": {
+ "additionalProperties": false,
+ "description": "The master password is consumed by the manager CLI and never stored or logged.",
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Name"
+ },
+ "password": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Password"
+ }
+ },
+ "title": "VaultUnlockParams",
+ "type": "object"
+ },
+ "VaultUnlockRequestParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "backend": {
+ "title": "Backend",
+ "type": "string"
+ },
+ "display_name": {
+ "title": "Display Name",
+ "type": "string"
+ }
+ },
+ "required": [
+ "session_id",
+ "backend",
+ "display_name"
+ ],
+ "title": "VaultUnlockRequestParams",
+ "type": "object"
+ },
+ "VaultUnlockResult": {
+ "additionalProperties": false,
+ "properties": {
+ "name": {
+ "title": "Name",
+ "type": "string"
+ },
+ "unlocked": {
+ "default": true,
+ "title": "Unlocked",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "title": "VaultUnlockResult",
+ "type": "object"
+ },
+ "VerificationEvidenceRow": {
+ "additionalProperties": true,
+ "description": "One ``verification_events`` row (``agent/verification_evidence.py``).",
+ "properties": {
+ "id": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Id"
+ },
+ "created_at": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Created At"
+ },
+ "session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Session Id"
+ },
+ "cwd": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cwd"
+ },
+ "root": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Root"
+ },
+ "command": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Command"
+ },
+ "canonical_command": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Canonical Command"
+ },
+ "kind": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Kind"
+ },
+ "scope": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Scope"
+ },
+ "status": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Status"
+ },
+ "exit_code": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Exit Code"
+ },
+ "output_summary": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Output Summary"
+ }
+ },
+ "title": "VerificationEvidenceRow",
+ "type": "object"
+ },
+ "VerificationStatusInfo": {
+ "additionalProperties": false,
+ "description": "``verification_status()``: ``disabled`` / ``not_applicable`` / ``unverified`` / ``stale`` or the\nlatest event's own status; ``root`` and friends only once a workspace was identified.",
+ "properties": {
+ "status": {
+ "title": "Status",
+ "type": "string"
+ },
+ "evidence": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/VerificationEvidenceRow"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "root": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Root"
+ },
+ "session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Session Id"
+ },
+ "changed_paths": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Changed Paths"
+ }
+ },
+ "required": [
+ "status"
+ ],
+ "title": "VerificationStatusInfo",
+ "type": "object"
+ },
+ "VerificationStatusParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Session Id"
+ },
+ "session_key": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Session Key"
+ },
+ "cwd": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cwd"
+ }
+ },
+ "title": "VerificationStatusParams",
+ "type": "object"
+ },
+ "VerificationStatusResult": {
+ "additionalProperties": false,
+ "properties": {
+ "verification": {
+ "$ref": "#/components/schemas/VerificationStatusInfo"
+ }
+ },
+ "required": [
+ "verification"
+ ],
+ "title": "VerificationStatusResult",
+ "type": "object"
+ },
+ "VoiceRecordAction": {
+ "enum": [
+ "start",
+ "stop"
+ ],
+ "title": "VoiceRecordAction",
+ "type": "string"
+ },
+ "VoiceRecordParams": {
+ "additionalProperties": false,
+ "properties": {
+ "action": {
+ "$ref": "#/components/schemas/VoiceRecordAction",
+ "default": "start"
+ },
+ "session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Session Id"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "title": "VoiceRecordParams",
+ "type": "object"
+ },
+ "VoiceRecordResult": {
+ "additionalProperties": false,
+ "properties": {
+ "status": {
+ "$ref": "#/components/schemas/VoiceRecordStatus"
+ },
+ "reason": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Reason"
+ }
+ },
+ "required": [
+ "status"
+ ],
+ "title": "VoiceRecordResult",
+ "type": "object"
+ },
+ "VoiceRecordStatus": {
+ "enum": [
+ "recording",
+ "stopped",
+ "busy"
+ ],
+ "title": "VoiceRecordStatus",
+ "type": "string"
+ },
+ "VoiceStatusPayload": {
+ "additionalProperties": false,
+ "description": "``methods_voice._vr_on_status``; states come from the recorder (idle / listening / transcribing \u2026).",
+ "properties": {
+ "state": {
+ "title": "State",
+ "type": "string"
+ }
+ },
+ "required": [
+ "state"
+ ],
+ "title": "VoiceStatusPayload",
+ "type": "object"
+ },
+ "VoiceToggleAction": {
+ "enum": [
+ "status",
+ "on",
+ "off",
+ "tts"
+ ],
+ "title": "VoiceToggleAction",
+ "type": "string"
+ },
+ "VoiceToggleParams": {
+ "additionalProperties": false,
+ "properties": {
+ "action": {
+ "$ref": "#/components/schemas/VoiceToggleAction",
+ "default": "status"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "title": "VoiceToggleParams",
+ "type": "object"
+ },
+ "VoiceToggleResult": {
+ "additionalProperties": false,
+ "description": "``methods_voice.py::_voice_status_payload`` (+ the requirements probe on ``status``, the spoken\nstop hint on ``on``).",
+ "properties": {
+ "enabled": {
+ "title": "Enabled",
+ "type": "boolean"
+ },
+ "record_key": {
+ "title": "Record Key",
+ "type": "string"
+ },
+ "tts": {
+ "title": "Tts",
+ "type": "boolean"
+ },
+ "stop_hint": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Stop Hint"
+ },
+ "available": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Available"
+ },
+ "audio_available": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Audio Available"
+ },
+ "stt_available": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Stt Available"
+ },
+ "details": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Details"
+ }
+ },
+ "required": [
+ "enabled",
+ "record_key",
+ "tts"
+ ],
+ "title": "VoiceToggleResult",
+ "type": "object"
+ },
+ "VoiceTranscriptPayload": {
+ "additionalProperties": false,
+ "description": "``methods_voice._vr_transcript`` / ``_deliver_fd_transcript`` / typed stop phrase in methods_prompt.",
+ "properties": {
+ "text": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Text"
+ },
+ "stop_phrase": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Stop Phrase"
+ },
+ "typed": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Typed"
+ },
+ "no_speech_limit": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "No Speech Limit"
+ }
+ },
+ "title": "VoiceTranscriptPayload",
+ "type": "object"
+ },
+ "VoiceTtsParams": {
+ "additionalProperties": false,
+ "properties": {
+ "text": {
+ "title": "Text",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "required": [
+ "text"
+ ],
+ "title": "VoiceTtsParams",
+ "type": "object"
+ },
+ "VoiceTtsResult": {
+ "additionalProperties": false,
+ "properties": {
+ "status": {
+ "title": "Status",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status"
+ ],
+ "title": "VoiceTtsResult",
+ "type": "object"
+ },
+ "WaitBarrierTarget": {
+ "additionalProperties": false,
+ "properties": {
+ "type": {
+ "enum": [
+ "session",
+ "pid"
+ ],
+ "title": "Type",
+ "type": "string"
+ },
+ "target": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "integer"
+ }
+ ],
+ "title": "Target"
+ },
+ "reason": {
+ "default": "",
+ "title": "Reason",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "target"
+ ],
+ "title": "WaitBarrierTarget",
+ "type": "object"
+ },
+ "WaitBarrierUntil": {
+ "additionalProperties": false,
+ "properties": {
+ "type": {
+ "const": "until",
+ "title": "Type",
+ "type": "string"
+ },
+ "until_at": {
+ "title": "Until At",
+ "type": "number"
+ },
+ "reason": {
+ "default": "",
+ "title": "Reason",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "until_at"
+ ],
+ "title": "WaitBarrierUntil",
+ "type": "object"
+ },
+ "WakeControlParams": {
+ "additionalProperties": false,
+ "properties": {
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "title": "WakeControlParams",
+ "type": "object"
+ },
+ "WakeDetectedPayload": {
+ "additionalProperties": false,
+ "description": "``methods_voice`` wake detector ``_on_detect``.",
+ "properties": {
+ "phrase": {
+ "title": "Phrase",
+ "type": "string"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ },
+ "start_new_session": {
+ "title": "Start New Session",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "phrase",
+ "start_new_session"
+ ],
+ "title": "WakeDetectedPayload",
+ "type": "object"
+ },
+ "WakeFeedParams": {
+ "additionalProperties": false,
+ "description": "``pcm`` (or the ``pcm_b64`` alias): base64 int16 mono little-endian, 16 kHz only.",
+ "properties": {
+ "pcm": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Pcm"
+ },
+ "pcm_b64": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Pcm B64"
+ },
+ "sample_rate": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Sample Rate"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "title": "WakeFeedParams",
+ "type": "object"
+ },
+ "WakeFeedResult": {
+ "additionalProperties": false,
+ "properties": {
+ "reason": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Reason"
+ },
+ "fed": {
+ "title": "Fed",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "fed"
+ ],
+ "title": "WakeFeedResult",
+ "type": "object"
+ },
+ "WakeInputDevice": {
+ "additionalProperties": true,
+ "description": "``tools/wake_word.py::_describe_input_device`` \u2014 PortAudio diagnostics for the configured mic.",
+ "properties": {
+ "selector": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Selector"
+ },
+ "name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Name"
+ },
+ "error": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Error"
+ },
+ "max_input_channels": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Max Input Channels"
+ },
+ "default_samplerate": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Default Samplerate"
+ },
+ "hostapi_index": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Hostapi Index"
+ },
+ "hostapi": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Hostapi"
+ }
+ },
+ "title": "WakeInputDevice",
+ "type": "object"
+ },
+ "WakePauseResult": {
+ "additionalProperties": false,
+ "properties": {
+ "reason": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Reason"
+ },
+ "paused": {
+ "title": "Paused",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "paused"
+ ],
+ "title": "WakePauseResult",
+ "type": "object"
+ },
+ "WakeResumeResult": {
+ "additionalProperties": false,
+ "properties": {
+ "reason": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Reason"
+ },
+ "resumed": {
+ "title": "Resumed",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "resumed"
+ ],
+ "title": "WakeResumeResult",
+ "type": "object"
+ },
+ "WakeStartParams": {
+ "additionalProperties": false,
+ "description": "``surface`` names the caller (\"tui\" | \"gui\"); ``persist`` is the explicit gesture that also\nflips ``wake_word.enabled`` on; ``client_capture`` asks for PCM streamed via wake.feed.",
+ "properties": {
+ "surface": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Surface"
+ },
+ "persist": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Persist"
+ },
+ "client_capture": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Client Capture"
+ },
+ "session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Session Id"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "title": "WakeStartParams",
+ "type": "object"
+ },
+ "WakeStartResult": {
+ "additionalProperties": false,
+ "description": "``started: false`` carries ``reason`` (unavailable / disabled / disabled_for_surface / owned);\n``sample_rate`` / ``frame_length`` describe the PCM frames the armed detector expects.",
+ "properties": {
+ "started": {
+ "title": "Started",
+ "type": "boolean"
+ },
+ "reason": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Reason"
+ },
+ "hint": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Hint"
+ },
+ "phrase": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Phrase"
+ },
+ "provider": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Provider"
+ },
+ "owner_surface": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Owner Surface"
+ },
+ "enabled_persisted": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Enabled Persisted"
+ },
+ "capture": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Capture"
+ },
+ "sample_rate": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Sample Rate"
+ },
+ "frame_length": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Frame Length"
+ }
+ },
+ "required": [
+ "started"
+ ],
+ "title": "WakeStartResult",
+ "type": "object"
+ },
+ "WakeStatusParams": {
+ "additionalProperties": false,
+ "properties": {
+ "surface": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Surface"
+ },
+ "client_capture": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Client Capture"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "title": "WakeStatusParams",
+ "type": "object"
+ },
+ "WakeStatusResult": {
+ "additionalProperties": false,
+ "description": "``enabled`` is config truth; ``listening`` is this caller's armed detector; ``audio_silent``\nmeans armed but deaf (see ``hint``).",
+ "properties": {
+ "listening": {
+ "title": "Listening",
+ "type": "boolean"
+ },
+ "owned_by_caller": {
+ "title": "Owned By Caller",
+ "type": "boolean"
+ },
+ "owner_surface": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Owner Surface"
+ },
+ "phrase": {
+ "title": "Phrase",
+ "type": "string"
+ },
+ "provider": {
+ "title": "Provider",
+ "type": "string"
+ },
+ "configured_surface": {
+ "title": "Configured Surface",
+ "type": "string"
+ },
+ "input_device": {
+ "$ref": "#/components/schemas/WakeInputDevice"
+ },
+ "available": {
+ "title": "Available",
+ "type": "boolean"
+ },
+ "hint": {
+ "title": "Hint",
+ "type": "string"
+ },
+ "enabled": {
+ "title": "Enabled",
+ "type": "boolean"
+ },
+ "audio_silent": {
+ "title": "Audio Silent",
+ "type": "boolean"
+ },
+ "capture": {
+ "title": "Capture",
+ "type": "string"
+ },
+ "local_input_available": {
+ "title": "Local Input Available",
+ "type": "boolean"
+ },
+ "sample_rate": {
+ "title": "Sample Rate",
+ "type": "integer"
+ },
+ "frame_length": {
+ "title": "Frame Length",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "listening",
+ "owned_by_caller",
+ "phrase",
+ "provider",
+ "configured_surface",
+ "input_device",
+ "available",
+ "hint",
+ "enabled",
+ "audio_silent",
+ "capture",
+ "local_input_available",
+ "sample_rate",
+ "frame_length"
+ ],
+ "title": "WakeStatusResult",
+ "type": "object"
+ },
+ "WakeStopParams": {
+ "additionalProperties": false,
+ "properties": {
+ "persist": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Persist"
+ },
+ "profile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Profile"
+ }
+ },
+ "title": "WakeStopParams",
+ "type": "object"
+ },
+ "WakeStopResult": {
+ "additionalProperties": false,
+ "properties": {
+ "reason": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Reason"
+ },
+ "stopped": {
+ "title": "Stopped",
+ "type": "boolean"
+ },
+ "disabled_persisted": {
+ "title": "Disabled Persisted",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "stopped",
+ "disabled_persisted"
+ ],
+ "title": "WakeStopResult",
+ "type": "object"
+ },
+ "_SessionScoped": {
+ "additionalProperties": false,
+ "description": "Handlers that look a live session up with ``_sessions.get(params.get(\"session_id\"))``: an\nabsent / unknown id falls back to the launch profile's config, so it is never required.",
+ "properties": {
+ "session_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Session Id"
+ }
+ },
+ "title": "_SessionScoped",
+ "type": "object"
+ }
+ }
+ },
+ "x-server-requests": [
+ {
+ "name": "approval",
+ "summary": "A dangerous command awaits the user's decision.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ApprovalRequestParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ApprovalResult"
+ }
+ }
+ },
+ {
+ "name": "clarify",
+ "summary": "The clarify tool: ask the user one question or a batch.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ClarifyRequestParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ClarifyResult"
+ }
+ }
+ },
++ {
++ "name": "display.install.sudo",
++ "summary": "Masked sudo password for the Bot Screen package install; app-level (empty session).",
++ "params": [
++ {
++ "name": "params",
++ "schema": {
++ "$ref": "#/components/schemas/DisplayInstallSudoParams"
++ }
++ }
++ ],
++ "result": {
++ "name": "result",
++ "schema": {
++ "$ref": "#/components/schemas/ValueResult"
++ }
++ }
++ },
+ {
+ "name": "preview.act",
+ "summary": "Click / type / scroll / annotate inside the in-app browser preview.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/PreviewActRequestParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ValueResult"
+ }
+ }
+ },
+ {
+ "name": "preview.read",
+ "summary": "Read the in-app browser preview's text (JSON text answer).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ReadRangeRequestParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ValueResult"
+ }
+ }
+ },
+ {
+ "name": "secret",
+ "summary": "Masked value for a named env var (skills / setup flows).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/SecretRequestParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ValueResult"
+ }
+ }
+ },
+ {
+ "name": "sudo",
+ "summary": "Masked sudo password for the terminal tool.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/EmptyRequestParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ValueResult"
+ }
+ }
+ },
+ {
+ "name": "terminal.read",
+ "summary": "Read the visible in-app terminal buffer (JSON text answer).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ReadRangeRequestParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ValueResult"
+ }
+ }
+ },
+ {
+ "name": "tour",
+ "summary": "Drive a guided tour highlight in the desktop renderer.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/TourRequestParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ValueResult"
+ }
+ }
+ },
+ {
+ "name": "vault.code",
+ "summary": "A one-time / 2FA code the user reads from their device.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/VaultCodeRequestParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ValueResult"
+ }
+ }
+ },
+ {
+ "name": "vault.save_login",
+ "summary": "Save a login for a site the agent is about to fill; the answer is JSON {identifier, password}.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/VaultSaveLoginRequestParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ValueResult"
+ }
+ }
+ },
+ {
+ "name": "vault.unlock_prompt",
+ "summary": "Master password to unlock an external password manager for this session.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/VaultUnlockRequestParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ValueResult"
+ }
+ }
+ },
+ {
+ "name": "window.read",
+ "summary": "Enumerate the native window below the app (JSON text answer).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/EmptyRequestParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ValueResult"
+ }
+ }
+ }
+ ],
+ "x-notifications": [
+ {
+ "name": "agent.terminal.output",
+ "summary": "Output chunk from an agent-owned background process.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/TerminalOutputPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "background.complete",
+ "summary": "A /background side agent finished.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/SideAgentCompletePayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "billing.step_up.verification",
+ "summary": "Device-flow URL + code for the billing scope step-up; the client opens the browser.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/BillingStepUpVerificationPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "bot_relay.outbox.pending",
+ "summary": "A bot-relay outbox envelope is queued; drain it.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/ChangeSignalPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "browser.controller.cancel",
+ "summary": "Withdraw a pending controller command.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/BrowserControllerCancelPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "browser.controller.command",
+ "summary": "Dispatch one browser action to the attached controller.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/BrowserControllerCommandPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "browser.progress",
+ "summary": "Browser (CDP) connect / install progress line.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/BrowserProgressPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "btw.complete",
+ "summary": "A /btw side question was answered.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/SideAgentCompletePayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "connection.request",
+ "summary": "A connection operation opened on this session; the desktop renders its card.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/ConnectionRequestPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "connection.update",
+ "summary": "One transition or the settlement of an open connection operation.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/ConnectionUpdatePayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "cron.changed",
+ "summary": "cron/jobs.json moved; refetch the cron list.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/ChangeSignalPayload"
+ }
+ }
+ ]
+ },
++ {
++ "name": "display.install.done",
++ "summary": "The install ended (0 ok, -1 cancelled, -2 no sudo: the command to run by hand was streamed).",
++ "params": [
++ {
++ "name": "payload",
++ "schema": {
++ "$ref": "#/components/schemas/DisplayInstallDonePayload"
++ }
++ }
++ ]
++ },
++ {
++ "name": "display.install.log",
++ "summary": "One line of package-manager output.",
++ "params": [
++ {
++ "name": "payload",
++ "schema": {
++ "$ref": "#/components/schemas/DisplayInstallLogPayload"
++ }
++ }
++ ]
++ },
++ {
++ "name": "display.lease",
++ "summary": "The takeover lease changed hands; every client repaints.",
++ "params": [
++ {
++ "name": "payload",
++ "schema": {
++ "$ref": "#/components/schemas/DisplayLeasePayload"
++ }
++ }
++ ]
++ },
++ {
++ "name": "display.status",
++ "summary": "This profile's screen started or stopped (also for transitions made outside hermes serve).",
++ "params": [
++ {
++ "name": "payload",
++ "schema": {
++ "$ref": "#/components/schemas/DisplayStatusPayload"
++ }
++ }
++ ]
++ },
+ {
+ "name": "error",
+ "summary": "A session-level failure outside a turn (agent init, model switch, compression, resume).",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/ErrorPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "gateway.ready",
+ "summary": "First frame of a connection: the resolved skin, the change-event capability and the replay epoch.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/GatewayReadyPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "layout.apply",
+ "summary": "Apply a named desktop layout preset.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/LayoutApplyPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "message.complete",
+ "summary": "The turn ended: final text, usage and outcome.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/MessageCompletePayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "message.delta",
+ "summary": "One streamed chunk of the assistant reply.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/StreamDeltaPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "message.interim",
+ "summary": "Interim assistant commentary (text beside tool calls) sealed as its own segment.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/MessageInterimPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "message.reaction",
+ "summary": "The agent reacted to a message; paint it live.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/MessageReactionPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "message.start",
+ "summary": "A turn began streaming; no payload.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "type": "object",
+ "additionalProperties": false
+ }
+ }
+ ]
+ },
+ {
+ "name": "moa.aggregating",
+ "summary": "The MoA aggregator started.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/MoaAggregatingPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "moa.phase",
+ "summary": "MoA phase transition (currently only ``aggregator``).",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/MoaPhasePayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "moa.progress",
+ "summary": "MoA reference fan-out progress (n/total).",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/MoaProgressPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "moa.reference",
+ "summary": "One MoA reference model's output.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/MoaReferencePayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "notice",
+ "summary": "Informational one-liner for the session (capabilities refreshed).",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/NoticePayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "notification.clear",
+ "summary": "Withdraw the notice with this key.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/NotificationClearPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "notification.show",
+ "summary": "Show / replace a keyed out-of-band notice (toast or status bar).",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/NotificationShowPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "pairing.changed",
+ "summary": "Pairing state moved; refetch pairing.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/ChangeSignalPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "pane.reveal",
+ "summary": "Focus / reveal a named desktop pane.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/PaneRevealPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "pet.changed",
+ "summary": "The active pet / its spritesheet changed (watcher).",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/PetChangedPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "pet.generate.progress",
+ "summary": "Pet base-draft generation progress.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/PetGenerateProgressPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "pet.hatch.progress",
+ "summary": "Pet hatch (row drawing) progress.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/PetHatchProgressPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "platforms.changed",
+ "summary": "gateway_state.json moved; refetch platform status.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/ChangeSignalPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "preview.close",
+ "summary": "Close the preview pane or one tab.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/PreviewClosePayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "preview.open",
+ "summary": "Open a URL / file in the desktop preview pane.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/PreviewOpenPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "preview.restart.complete",
+ "summary": "The hidden preview-restart agent finished.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/SideAgentCompletePayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "preview.restart.progress",
+ "summary": "Progress line from the preview-restart agent.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/PreviewRestartProgressPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "reaction",
+ "summary": "Affection reaction detected in the user's message (hearts etc.).",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/ReactionPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "reasoning.available",
+ "summary": "A completed reasoning block (non-streaming providers).",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/StreamDeltaPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "reasoning.delta",
+ "summary": "One streamed chunk of the model's reasoning.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/StreamDeltaPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "request.cancel",
+ "summary": "The backend withdrew an open server\u2192client request; clear the matching card only.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/RequestCancelPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "review.summary",
+ "summary": "Background review of the last turn finished.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/ReviewSummaryPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "session.control.update",
+ "summary": "Persisted goal / loop / heartbeat state changed.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/SessionControlUpdatePayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "session.info",
+ "summary": "Live session settings snapshot (``server._session_info``); also the ``info`` of create/resume/activate.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/SessionLiveInfo"
+ }
+ }
+ ]
+ },
+ {
+ "name": "session.reclaimed",
+ "summary": "The backend reclaimed a live session out from under its clients.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/SessionReclaimedPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "session.resume_progress",
+ "summary": "Deferred resume hydration progress.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/SessionResumeProgressPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "session.title",
+ "summary": "Auto-titling renamed the session (``session_id`` is the stored key).",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/SessionTitlePayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "session.usage",
+ "summary": "Mid-turn usage tick; message.complete carries the authoritative final usage.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/SessionUsagePayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "sessions.changed",
+ "summary": "state.db moved; refetch the session list.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/ChangeSignalPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "setup.ready",
+ "summary": "The free-tier bootstrap finished (broadcast); the desktop's setup gate reads the record.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/SetupReadyPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "skin.changed",
+ "summary": "The active skin moved (name switch or live colour edit); repaint from this palette.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/SkinPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "status.update",
+ "summary": "Transient status line (kind: status, lifecycle, compacting, goal, loop, heartbeat, process, \u2026).",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/StatusUpdatePayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "subagent.complete",
+ "summary": "A child finished (status + observability rollup).",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/SubagentEventPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "subagent.progress",
+ "summary": "Batched tool-name progress from a child.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/SubagentEventPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "subagent.spawn_requested",
+ "summary": "delegate_task accepted a child goal (before the child starts).",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/SubagentEventPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "subagent.start",
+ "summary": "A delegated child started running.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/SubagentEventPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "subagent.thinking",
+ "summary": "A child's reasoning chunk.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/SubagentEventPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "subagent.tool",
+ "summary": "A child called a tool.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/SubagentEventPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "terminal.close",
+ "summary": "An agent-owned background process closed.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/TerminalClosePayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "thinking.delta",
+ "summary": "Legacy thinking-text chunk (thinking_callback).",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/StreamDeltaPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "tip.show",
+ "summary": "Point at a desktop element with a one-line tip bubble.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/TipShowPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "todo.updated",
+ "summary": "Full todo snapshot after a todo tool ran.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/TodoUpdatedPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "tool.complete",
+ "summary": "A tool call finished: parsed result, summary, optional diff / todo snapshot.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/ToolCompletePayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "tool.generating",
+ "summary": "The model is emitting a tool call's arguments.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/ToolGeneratingPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "tool.output_risk",
+ "summary": "Tool output was classified as risky (prompt-injection / secret findings).",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/ToolOutputRiskPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "tool.start",
+ "summary": "A tool call began (stable id + full args).",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/ToolStartPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "voice.interrupted",
+ "summary": "Barge-in: the spoken interjection interrupted the turn; no payload.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "type": "object",
+ "additionalProperties": false
+ }
+ }
+ ]
+ },
+ {
+ "name": "voice.status",
+ "summary": "Voice recorder state changed.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/VoiceStatusPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "voice.transcript",
+ "summary": "A voice capture produced text (or a stop phrase / silence limit).",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/VoiceTranscriptPayload"
+ }
+ }
+ ]
+ },
+ {
+ "name": "wake.detected",
+ "summary": "A wake phrase fired.",
+ "params": [
+ {
+ "name": "payload",
+ "schema": {
+ "$ref": "#/components/schemas/WakeDetectedPayload"
+ }
+ }
+ ]
+ }
+ ]
+ }
diff --cc hermes_cli/profiles.py
index 33699a0698d,d3ad434d594..bb73570dfec
--- a/hermes_cli/profiles.py
+++ b/hermes_cli/profiles.py
@@@ -1690,11 -1736,32 +1769,33 @@@ def rename_profile(old_name: str, new_n
if _check_gateway_running(old_dir):
_cleanup_gateway_service(old_canon, old_dir)
_stop_gateway_process(old_dir)
+ _stop_bot_desktop(old_dir)
- # 2. Rename directory
- old_dir.rename(new_dir)
+ # 1b. Unroute the old name from a live multiplexer BEFORE the rename (same protocol as
+ # delete_profile). A multiplexed secondary has no gateway.pid of its own, so the check above
+ # reports it stopped while the default gateway still holds its adapters, cron ticker, logging
+ # and SQLite handles; those re-``mkdir`` the old home the moment it moves (no tombstone →
+ # ``mkdir_under_hermes_home`` does not refuse it) and the periodic reconcile re-adopts the
+ # resurrected dir as a ghost served profile (#109267).
+ live_mux = _live_default_multiplexer()
+ if live_mux:
+ mark_named_profile_deleted(old_dir)
+ _notify_multiplexer(old_canon)
+
+ # 2. Rename directory. If the move fails (cross-device EXDEV, permissions, a racing writer),
+ # undo the unroute so the profile is never stranded tombstoned-but-present.
+ try:
+ old_dir.rename(new_dir)
+ except Exception:
+ if live_mux:
+ clear_named_profile_deleted(old_dir)
+ _notify_multiplexer(old_canon)
+ raise
print(f"✓ Renamed {old_dir.name} → {new_dir.name}")
+ # The tombstone lives at profiles/.deleted/<old_name>; old_dir is gone so nothing can
+ # resurrect it, and a future profile reusing the old name must not read as deleted.
+ if live_mux:
+ clear_named_profile_deleted(old_dir)
# 3. Update profile-scoped Honcho host blocks, preserving aiPeer identity
_migrate_honcho_profile_host(old_canon, new_canon, new_dir)
diff --cc tests/tui_gateway/test_display_methods.py
index 824cd85a6bf,00000000000..2d87fdb3eab
mode 100644,000000..100644
--- a/tests/tui_gateway/test_display_methods.py
+++ b/tests/tui_gateway/test_display_methods.py
@@@ -1,239 -1,0 +1,242 @@@
+"""display.install runs its worker inside the caller's profile scope; display.observe mints the viewer identity."""
+
+from __future__ import annotations
+
+import hashlib
+import json
+import threading
+
+import pytest
+
+from hermes_cli.dashboard_auth import ws_tickets
+
+
+def test_install_worker_keeps_the_requested_profile_scope(tmp_path, monkeypatch):
+ from hermes_constants import get_hermes_home
+ from tools.bot_desktop import install, runtime
+ import tui_gateway.server as server
+
+ named = tmp_path / "profiles" / "named"
+ named.mkdir(parents=True)
+ monkeypatch.setattr(server, "_profile_home", lambda name: str(named) if name == "named" else None)
+ monkeypatch.setattr(runtime, "is_supported_host", lambda: True)
+ monkeypatch.setattr(runtime, "install_command", lambda: "sudo apt-get install -y x")
+ seen = {}
+ done = threading.Event()
+
+ def fake_install(*, ask_password, on_line, timeout_seconds=900.0, claimed=False):
+ seen["home"] = str(get_hermes_home())
+ done.set()
+ return 0
+
+ monkeypatch.setattr(install, "install_packages", fake_install)
+ monkeypatch.setattr(server, "_broadcast_global_event", lambda *a, **k: None)
+ resp = server.handle_request({"jsonrpc": "2.0", "id": 1, "method": "display.install", "params": {"profile": "named"}})
+ assert resp["result"]["started"], resp
+ assert done.wait(5)
+ assert seen["home"] == str(named)
+
+
+def _fresh_lease():
+ from tools.bot_desktop import lease
+ lease._reset_for_tests()
+ yield lease
+ lease._reset_for_tests()
+
+
+def _call(server, method, params):
+ return server.handle_request({"jsonrpc": "2.0", "id": 7, "method": method, "params": params})
+
+
+def test_thumbnail_is_suppressed_while_a_human_holds_the_lease(monkeypatch, _fresh_lease):
+ """The Desktop polls thumbnails on a timer; while a human drives the screen that grab would ship
+ whatever they are typing to every connected client, so it must not touch the framebuffer at all."""
+ import tui_gateway.server as server
+ from tools.bot_desktop import thumbnail
+
+ grabs = []
+ monkeypatch.setattr(thumbnail, "thumbnail_data_url", lambda: grabs.append(1) or "data:image/jpeg;base64,SECRET")
+ _fresh_lease.acquire("viewer-1")
+ result = _call(server, "display.thumbnail", {})["result"]
+ assert result["data_url"] is None and result["suppressed"] == "human_has_control"
+ assert grabs == [], "the framebuffer was grabbed while a human held the lease"
+ _fresh_lease.release("viewer-1")
+ assert _call(server, "display.thumbnail", {})["result"]["data_url"].endswith("SECRET")
+
+
+def test_release_without_viewer_id_cannot_yank_another_viewers_lease(monkeypatch, tmp_path, _fresh_lease):
+ """lease.release(None) skips the holder check, so a client that lost its viewer id (or a bare RPC)
+ must be refused unless it forces; the holder's own (minted) viewer id and force keep working."""
+ import tui_gateway.server as server
+ from tools.bot_desktop import runtime
+
+ monkeypatch.setattr(runtime, "rfb_socket_path", lambda: tmp_path / "rfb.sock")
+ mine = _call(server, "display.observe", {})["result"]["viewer_id"]
+ _fresh_lease.acquire(mine)
+ refused = _call(server, "display.lease.release", {})
+ assert refused["error"]["data"]["code"] == "viewer_mismatch"
+ assert _fresh_lease.get().holder == _fresh_lease.HUMAN
+ assert _call(server, "display.lease.release", {"viewer_id": mine})["result"]["lease"]["holder"] == _fresh_lease.AGENT
+ _fresh_lease.acquire("viewer-2")
+ assert _call(server, "display.lease.release", {"force": True})["result"]["lease"]["holder"] == _fresh_lease.AGENT
+
+def _rpc(server, method, params):
+ return server.handle_request({"jsonrpc": "2.0", "id": 7, "method": method, "params": params})
+
+
+def test_observe_mints_the_viewer_id_and_status_never_discloses_the_holder(monkeypatch, tmp_path):
+ """A client cannot choose its viewer id (it would impersonate the holder and co-drive or release
+ their lease), and no snapshot or broadcast carries the raw holder id — only a hash the holder
+ itself can match."""
+ from tools.bot_desktop import lease, runtime
+ import tui_gateway.server as server
+
+ monkeypatch.setattr(runtime, "rfb_socket_path", lambda: tmp_path / "rfb.sock")
+ lease._reset_for_tests()
+ broadcasts = []
+ monkeypatch.setattr(server, "_broadcast_global_event", lambda ev, payload=None: broadcasts.append((ev, payload)))
+ try:
+ observed = _rpc(server, "display.observe", {"viewer_id": "victim"})["result"]
+ assert observed["viewer_id"] != "victim"
+ assert observed["viewer_id"] and len(observed["viewer_id"]) >= 16
+ assert ws_tickets.consume_ticket(observed["ticket"])["viewer_id"] == observed["viewer_id"]
+ holder = observed["viewer_id"]
+
+ # Only the connection that minted an id may reuse it (a reconnecting pane keeps its lease).
+ class _Peer:
+ def write(self, obj):
+ return True
+ mine, other = _Peer(), _Peer()
+ with_mine = server.dispatch({"jsonrpc": "2.0", "id": 8, "method": "display.observe", "params": {}}, mine)["result"]
+ again = server.dispatch({"jsonrpc": "2.0", "id": 9, "method": "display.observe",
+ "params": {"viewer_id": with_mine["viewer_id"]}}, mine)["result"]
+ assert again["viewer_id"] == with_mine["viewer_id"]
+ stolen = server.dispatch({"jsonrpc": "2.0", "id": 10, "method": "display.observe",
+ "params": {"viewer_id": with_mine["viewer_id"]}}, other)["result"]
+ assert stolen["viewer_id"] != with_mine["viewer_id"]
+
+ _rpc(server, "display.status", {}) # installs the broadcast listener
+ lease.acquire(holder)
+ status = _rpc(server, "display.status", {})["result"]
+ assert status["lease"]["holder"] == lease.HUMAN
+ assert holder not in json.dumps(status)
+ assert status["lease"]["viewer_hash"] == hashlib.sha256(holder.encode()).hexdigest()[:12]
+ lease_events = [p for ev, p in broadcasts if ev == "display.lease"]
+ assert lease_events and all(holder not in json.dumps(p) for p in lease_events)
+ finally:
+ lease._reset_for_tests()
+
+
+def test_stop_cannot_kill_the_screen_under_a_human_without_force(monkeypatch, _fresh_lease):
+ """display.stop released the lease unconditionally before stopping Xvnc: any authenticated caller
+ could yank a human mid-login and kill the screen under them. Same rule as display.lease.release."""
+ import tui_gateway.server as server
+ from tools.bot_desktop import runtime
+
+ stops = []
+ monkeypatch.setattr(runtime, "stop", lambda: stops.append(1) or True)
+ _fresh_lease.acquire("viewer-1")
+ refused = _call(server, "display.stop", {})
+ assert refused["error"]["data"]["code"] == "viewer_mismatch"
+ assert _fresh_lease.get().holder == _fresh_lease.HUMAN and stops == []
+ forced = _call(server, "display.stop", {"force": True})["result"]
+ assert forced["stopped"] is True and stops == [1]
+ assert _fresh_lease.get().holder == _fresh_lease.AGENT
+
+ # The refusal must be decided in the SAME transition as the release: a takeover that lands after a
+ # separate "is a human holding?" read but before the release would be acknowledged, then revoked.
+ # Simulate it by making the release transition itself see a human (a write raced in under the lock).
+ real_transition = _fresh_lease._transition
+
+ def transition_after_takeover(profile_key, mutate):
+ def mutate_seeing_human(lease_now):
+ lease_now.holder, lease_now.viewer_id = _fresh_lease.HUMAN, "late-viewer"
+ return mutate(lease_now)
+ return real_transition(profile_key, mutate_seeing_human)
+
+ monkeypatch.setattr(_fresh_lease, "_transition", transition_after_takeover)
+ stops.clear()
+ for method, params in (("display.stop", {}), ("display.lease.release", {})):
+ res = _call(server, method, params)
+ assert "error" in res and res["error"]["data"]["code"] == "viewer_mismatch", (method, res)
+ assert stops == []
+
+
+def test_lease_acquire_and_release_only_honour_an_id_this_connection_minted(monkeypatch, tmp_path, _fresh_lease):
+ """The minted identity is worthless if acquire takes any string: a caller could acquire under a
+ made-up id (evicting the human) or release with a guessed one. Both must insist on an id that
+ display.observe minted for THIS connection."""
+ import tui_gateway.server as server
+ from tools.bot_desktop import runtime
+
+ monkeypatch.setattr(runtime, "rfb_socket_path", lambda: tmp_path / "rfb.sock")
+
+ class _Peer:
+ def write(self, obj):
+ return True
+
+ def rpc(peer, method, params):
+ return server.dispatch({"jsonrpc": "2.0", "id": 3, "method": method, "params": params}, peer)
+
+ mine, other = _Peer(), _Peer()
+ minted = rpc(mine, "display.observe", {})["result"]["viewer_id"]
+ forged = rpc(other, "display.lease.acquire", {"viewer_id": "made-up"})
+ assert forged["error"]["data"]["code"] == "viewer_mismatch"
+ assert _fresh_lease.get().holder == _fresh_lease.AGENT
+ ok = rpc(mine, "display.lease.acquire", {"viewer_id": minted})["result"]
+ assert ok["lease"]["holder"] == _fresh_lease.HUMAN
+ # another connection presenting the holder's id (read off the wire) cannot release it either
+ stolen = rpc(other, "display.lease.release", {"viewer_id": minted})
+ assert stolen["error"]["data"]["code"] == "viewer_mismatch"
+ assert _fresh_lease.get().holder == _fresh_lease.HUMAN
+ assert rpc(mine, "display.lease.release", {"viewer_id": minted})["result"]["lease"]["holder"] == _fresh_lease.AGENT
+
+
+def test_install_sudo_card_ignores_a_client_supplied_session_id(monkeypatch):
+ """The sudo card is app-level: it goes to the connection that clicked Install (copy_context
- pins the transport). Honouring params.session_id let a caller route the masked password card
- into ANOTHER window's chat."""
++ pins the transport) with an EMPTY session. Honouring params.session_id let a caller route the
++ masked password card into ANOTHER window's chat; the wire contract now refuses the key outright
++ (4000), and the request the handler sends carries no session either way."""
+ import tui_gateway.server as server
+ from tools.bot_desktop import install, runtime
+
+ monkeypatch.setattr(runtime, "is_supported_host", lambda: True)
+ monkeypatch.setattr(runtime, "install_command", lambda: "sudo apt-get install -y x")
+ monkeypatch.setattr(server, "_broadcast_global_event", lambda *a, **k: None)
+ asked = threading.Event()
+ blocks = []
+
- def fake_block(event, sid, payload, timeout=300, batch_qids=None):
++ def fake_block(event, sid, payload, timeout=300):
+ blocks.append((event, sid))
+ asked.set()
+ return ""
+
+ def fake_install(*, ask_password, on_line, timeout_seconds=900.0, claimed=False):
+ ask_password()
+ return -1
+
- monkeypatch.setattr(server, "_block", fake_block)
++ monkeypatch.setattr(server, "_ask", fake_block)
+ monkeypatch.setattr(install, "install_packages", fake_install)
- resp = _call(server, "display.install", {"session_id": "victim-session"})
++ refused = _call(server, "display.install", {"session_id": "victim-session"})
++ assert refused["error"]["code"] == 4000 and "session_id" in refused["error"]["message"], refused
++ resp = _call(server, "display.install", {})
+ assert resp["result"]["started"], resp
+ assert asked.wait(5)
- assert blocks and all(sid != "victim-session" for _ev, sid in blocks), blocks
++ assert blocks == [("display.install.sudo", "")], blocks
+
+
+def test_thumbnail_grabbed_across_a_takeover_is_suppressed(monkeypatch, _fresh_lease):
+ """The human_holds() check happens before the grab; a takeover that lands while the framebuffer
+ is being read means the returned frame may already show the human's session. The lease epoch
+ must match before and after the grab or the frame is dropped."""
+ import tui_gateway.server as server
+ from tools.bot_desktop import thumbnail
+
+ def grab_while_human_takes_over():
+ _fresh_lease.acquire("viewer-1")
+ return "data:image/jpeg;base64,SECRET"
+
+ monkeypatch.setattr(thumbnail, "thumbnail_data_url", grab_while_human_takes_over)
+ result = _call(server, "display.thumbnail", {})["result"]
+ assert result["data_url"] is None and result["suppressed"] == "human_has_control", result
diff --cc tools/computer_use/tool.py
index c93ad23530f,f21239d3c36..b2ee1514e55
--- a/tools/computer_use/tool.py
+++ b/tools/computer_use/tool.py
@@@ -277,28 -310,7 +326,28 @@@ def handle_computer_use(args: Dict[str
with _backend_lock:
call_lock = _backend_call_locks.setdefault(session_id, threading.RLock())
with call_lock:
- return _dispatch(backend, action, args, session_id=session_id or None)
+ # Re-check under the dispatch lock: approval, backend start-up and lock waits above can take
+ # seconds, and a human may have taken over meanwhile. A result produced after such a flip is
+ # discarded too — it may picture what they typed.
+ try:
+ _bd_lease.assert_agent_may_act()
+ except _bd_lease.HumanHasControl as e:
+ return _refused(e)
+
+ def _fence() -> None:
+ # Any lease transition since admission voids the frame — including a full take-over /
+ # hand-back cycle that already finished: it still belongs to the human's turn. Capture
+ # paths call this BEFORE the frame is persisted, spilled or sent to auxiliary vision.
+ if _bd_lease.get().epoch != admitted.epoch:
+ raise _bd_lease.HumanHasControl(
+ "A human took over this desktop while the action ran; its result was discarded. "
+ "Tell the user what you need and re-capture once they hand back.")
+ _fence() # input actions never receive fence=; refuse before the device op starts
- result = _dispatch(backend, action, args, fence=_fence)
++ result = _dispatch(backend, action, args, fence=_fence, session_id=session_id or None)
+ _fence()
+ return result
+ except _bd_lease.HumanHasControl as e:
+ return _refused(e)
except Exception as e:
logger.exception("computer_use %s failed", action)
return json.dumps({"error": f"{action} failed: {e}"})
@@@ -360,13 -372,13 +409,13 @@@ def _do_scroll(backend, action, args, *
return backend.scroll(direction=args.get("direction", "down"), amount=int(args.get("amount", 3)),
element=args.get("element"), **_scroll_xy(args), modifiers=args.get("modifiers"), **delivery)
- def _do_capture(backend, action, args, fence=lambda: None, **_):
-def _do_capture(backend, action, args, session_id=None, **_):
++def _do_capture(backend, action, args, fence=lambda: None, session_id=None, **_):
if (mode := str(args.get("mode", "som"))) not in {"som", "vision", "ax"}:
return json.dumps({"error": f"bad mode {mode!r}; use som|vision|ax"})
# pid/window_id forwarded only when given so older backends keep their defaults.
- return _capture_response(backend.capture(mode=mode, app=args.get("app"),
- **{k: args[k] for k in ("pid", "window_id") if args.get(k) is not None}),
- session_id=session_id)
+ cap = backend.capture(mode=mode, app=args.get("app"), **{k: args[k] for k in ("pid", "window_id") if args.get(k) is not None})
+ fence()
- return _capture_response(cap)
++ return _capture_response(cap, session_id=session_id)
def _do_listing(backend, action, args, key, **_):
return json.dumps({key: (items := getattr(backend, action)()), "count": len(items)})
@@@ -416,9 -428,7 +465,11 @@@ _ACTION_SUGGESTIONS =
"input_text": "type", "screenshot": "capture", "get_window_state": "capture", "left_click": "click", "mouse_click": "click",
}
- def _dispatch(backend: ComputerUseBackend, action: str, args: Dict[str, Any], fence: Callable[[], None] = lambda: None) -> Any:
-def _dispatch(backend: ComputerUseBackend, action: str, args: Dict[str, Any], session_id: Optional[str] = None) -> Any:
++def _dispatch(backend: ComputerUseBackend, action: str, args: Dict[str, Any], fence: Callable[[], None] = lambda: None,
++ session_id: Optional[str] = None) -> Any:
+ """``fence`` raises when the screen lease moved since admission; capture paths call it as soon as the
- frame is in hand, before anything derived from it leaves the process."""
++ frame is in hand, before anything derived from it leaves the process (including the screenshot dedup
++ cache keyed by ``session_id``)."""
spec = _ACTIONS.get(action)
if spec is None:
return json.dumps({"error": f"unknown action {action!r}" + (f" — did you mean {hint!r}? See the action enum in the tool schema."
@@@ -431,11 -441,12 +482,13 @@@
f"{action} would go to the current target {mismatch!r}, not {requested_app.strip()!r} "
"— input actions always hit the sticky target from the last capture/focus_app. "
f"Call capture(app={requested_app.strip()!r}) or focus_app first, then retry.")})
- # delivery_mode / bring_to_front thread through every input action (background → foreground ladder);
- # read-only actions get the lease fence instead (delivery kwargs would leak into backend input calls).
+ # delivery_mode / bring_to_front thread through every input action (background → foreground ladder); input
- # handlers forward their kwargs to the backend verbatim, so the dedup session key rides only on read handlers.
- res = spec.handler(backend, action, args, delivery_mode=args.get("delivery_mode"),
- bring_to_front=bool(args.get("bring_to_front")), **({} if spec.input else {"session_id": session_id}))
- return res if isinstance(res, (str, dict)) else _maybe_follow_capture(backend, res, bool(args.get("capture_after")),
++ # handlers forward their kwargs to the backend verbatim, so the lease fence and the dedup session key ride
++ # only on read handlers (delivery kwargs would leak into backend input calls, and vice versa).
+ res = spec.handler(backend, action, args, **(dict(delivery_mode=args.get("delivery_mode"), bring_to_front=bool(args.get("bring_to_front")))
- if spec.input else dict(fence=fence)))
- return res if isinstance(res, (str, dict)) else _maybe_follow_capture(backend, res, bool(args.get("capture_after")), fence)
++ if spec.input else dict(fence=fence, session_id=session_id)))
++ return res if isinstance(res, (str, dict)) else _maybe_follow_capture(backend, res, bool(args.get("capture_after")), fence,
+ session_id=session_id)
# ── Response shaping ────────────────────────────────────────────────────────
def _classify_action_result(res: ActionResult) -> Dict[str, Any]:
@@@ -614,7 -638,7 +680,7 @@@ def _capture_response(cap: CaptureResul
return _text_capture_payload(v, "\n".join(lines), extra)
def _maybe_follow_capture(backend: ComputerUseBackend, res: ActionResult, do_capture: bool,
- fence: Callable[[], None] = lambda: None) -> Any:
- session_id: Optional[str] = None) -> Any:
++ fence: Callable[[], None] = lambda: None, session_id: Optional[str] = None) -> Any:
# No follow-up capture after a failed action: a normal-looking screenshot would suggest success.
if not do_capture or not res.ok:
return _text_response(res)
@@@ -627,8 -651,7 +693,8 @@@
except Exception as e:
logger.warning("follow-up capture failed: %s", e)
return _text_response(res)
- fence()
- resp, payload = _capture_response(cap), _action_payload(res)
++ fence() # a frame taken after a takeover never reaches the dedup cache nor the model
+ resp, payload = _capture_response(cap, session_id=session_id), _action_payload(res)
if isinstance(resp, dict) and resp.get("_multimodal"):
# Keep the evidence/verdict contract visible alongside the image — it governs whether input may repeat.
resp["content"][0]["text"] = resp["text_summary"] = json.dumps(payload) + "\n\n" + resp["text_summary"]
diff --cc tui_gateway/contracts/__init__.py
index 00000000000,e3eb9a969c2..cfd3c95f3d9
mode 000000,100644..100644
--- a/tui_gateway/contracts/__init__.py
+++ b/tui_gateway/contracts/__init__.py
@@@ -1,0 -1,23 +1,24 @@@
+ """Wire contracts (see ``base.py``). Importing this package fills the registry tables; every topic
+ module is listed here so the generator and the runtime see the same catalog."""
+
+ from . import ( # noqa: F401
+ billing_delegation_pets,
+ common,
+ config_free_tier_control,
+ connectors_operation,
++ display,
+ events,
+ groups_bot_relay,
+ liveness,
+ profiles_vault_complete_foreign_subagents,
+ projects_pets,
+ prompt_voice,
+ server_requests,
+ sessions,
+ tools_commands,
+ tools_mcp_plugins,
+ )
+ from .base import JsonValue, Params, Payload, Result, WireEnum
+ from .registry import EVENTS, METHODS, SERVER_REQUESTS
+
+ __all__ = ["EVENTS", "METHODS", "SERVER_REQUESTS", "JsonValue", "Params", "Payload", "Result", "WireEnum"]
diff --cc tui_gateway/contracts/display.py
index 00000000000,00000000000..f00c6aea919
new file mode 100644
--- /dev/null
+++ b/tui_gateway/contracts/display.py
@@@ -1,0 -1,0 +1,180 @@@
++"""Bot Screen (``methods_display.py`` / ``methods_display_watch.py``): a profile's headless Xfce
++desktop, its takeover lease, the noVNC ticket and the on-host package install.
++
++Every method rides ``profile`` (the desktop routes through ``requestGatewayForProfile``) and answers
++for THAT profile's screen. The lease is the whole control model: ``holder`` is ``agent`` or
++``human``; ``epoch`` moves on every real transition, so a client (or the agent's fence) can tell an
++in-flight result was produced under a lease that has since changed.
++"""
++
++from __future__ import annotations
++
++from .base import Params, Payload, Result, WireEnum
++from .common import ProfileParams
++from .registry import event, method, server_request
++from .server_requests import ServerRequestParams, ValueResult
++
++# ── shapes ────────────────────────────────────────────────────────────────────────────────────
++
++
++class LeaseHolder(WireEnum):
++ agent = "agent"
++ human = "human"
++
++
++class DisplayLease(Result):
++ """``tools/bot_desktop/lease.py::Lease`` as clients may see it: the holder's viewer id is a
++ capability and never leaves the gateway; ``viewer_hash`` lets the holder recognise itself."""
++
++ holder: LeaseHolder
++ viewer_id: None = None
++ viewer_hash: str | None = None
++ since: float
++ epoch: int
++ reason: str = ""
++
++
++class DisplayStatus(Result):
++ """``tools/bot_desktop/runtime.py::DesktopStatus`` plus the lease and the profile it speaks for."""
++
++ profile: str
++ supported: bool
++ installed: bool
++ missing: list[str]
++ running: bool
++ pid: int | None = None
++ display: str | None = None
++ socket: str | None = None
++ geometry: str
++ install_command: str | None = None
++ browser: str | None = None
++ lease: DisplayLease
++ profile_key: str
++
++
++# ── methods ───────────────────────────────────────────────────────────────────────────────────
++
++
++method("display.status", params=ProfileParams, result=DisplayStatus,
++ doc="Runtime + lease snapshot for this profile's screen.")
++
++
++class DisplayThumbnailResult(Result):
++ """``data_url`` is null while the screen is stopped or while a human holds the lease
++ (``suppressed``): the frame may show what they are typing."""
++
++ data_url: str | None = None
++ suppressed: str | None = None
++
++
++method("display.thumbnail", params=ProfileParams, result=DisplayThumbnailResult,
++ doc="One JPEG grab of the bot's screen; read-only, never changes the lease.")
++
++method("display.start", params=ProfileParams, result=DisplayStatus,
++ doc="Start this profile's Xvnc + Xfce (idempotent); blocks until the display is published.")
++
++
++class DisplayStopParams(ProfileParams):
++ force: bool | None = None # stop even while a human holds control
++
++
++class DisplayStopResult(DisplayStatus):
++ stopped: bool
++
++
++method("display.stop", params=DisplayStopParams, result=DisplayStopResult,
++ doc="Stop the screen. Refused (5300, code viewer_mismatch) while a human holds unless force.")
++
++
++class DisplayObserveParams(ProfileParams):
++ viewer_id: str | None = None # an id THIS connection minted earlier keeps its identity across a reconnect
++
++
++class DisplayObserveResult(DisplayStatus):
++ ticket: str
++ path: str
++ viewer_id: str
++
++
++method("display.observe", params=DisplayObserveParams, result=DisplayObserveResult,
++ doc="Mint a single-use ticket for /api/display/ws and the server-minted viewer id for this connection.")
++
++
++class DisplayInstallResult(Result):
++ started: bool
++ command: str | None = None
++ profile_key: str
++
++
++method("display.install", params=ProfileParams, result=DisplayInstallResult,
++ doc="Run the distro package install on the gateway host; progress streams as display.install.log/.done.")
++
++
++class DisplayLeaseAcquireParams(ProfileParams):
++ viewer_id: str
++ reason: str | None = None
++
++
++class DisplayLeaseResult(Result):
++ lease: DisplayLease
++
++
++method("display.lease.acquire", params=DisplayLeaseAcquireParams, result=DisplayLeaseResult,
++ doc="Take over: the human named by a viewer id this connection minted controls the screen.")
++
++
++class DisplayLeaseReleaseParams(ProfileParams):
++ viewer_id: str | None = None
++ force: bool | None = None
++
++
++method("display.lease.release", params=DisplayLeaseReleaseParams, result=DisplayLeaseResult,
++ doc="Hand back. Without a viewer id the release is refused while a human holds unless force.")
++
++
++# ── server → client ───────────────────────────────────────────────────────────────────────────
++
++
++class DisplayInstallSudoParams(ServerRequestParams):
++ profile_key: str
++
++
++server_request("display.install.sudo", params=DisplayInstallSudoParams, result=ValueResult,
++ doc="Masked sudo password for the Bot Screen package install; app-level (empty session).")
++
++
++# ── events ────────────────────────────────────────────────────────────────────────────────────
++
++
++class DisplayStatusPayload(DisplayStatus, Payload):
++ pass
++
++
++event("display.status", DisplayStatusPayload,
++ doc="This profile's screen started or stopped (also for transitions made outside hermes serve).")
++
++
++class DisplayLeasePayload(Payload):
++ profile_key: str
++ lease: DisplayLease
++
++
++event("display.lease", DisplayLeasePayload, doc="The takeover lease changed hands; every client repaints.")
++
++
++class DisplayInstallLogPayload(Payload):
++ profile_key: str
++ line: str
++
++
++event("display.install.log", DisplayInstallLogPayload, doc="One line of package-manager output.")
++
++
++class DisplayInstallDonePayload(Payload):
++ profile_key: str
++ code: int
++ status: DisplayStatus
++
++
++event("display.install.done", DisplayInstallDonePayload,
++ doc="The install ended (0 ok, -1 cancelled, -2 no sudo: the command to run by hand was streamed).")
diff --cc tui_gateway/methods_display.py
index 406336a4bce,00000000000..fc4d83cc8e5
mode 100644,000000..100644
--- a/tui_gateway/methods_display.py
+++ b/tui_gateway/methods_display.py
@@@ -1,258 -1,0 +1,258 @@@
+"""Bot Desktop JSON-RPC handlers: the Desktop app's door to a profile's headless screen.
+
+``display.status`` reports runtime + lease; ``display.start`` / ``display.stop`` manage the Xvnc/Xfce
+process; ``display.observe`` mints a single-use ticket the renderer redeems on ``/api/display/ws``
+(``hermes_cli.web_routers.display``) to stream raw RFB; ``display.lease.acquire`` / ``release`` are
+Take over / Hand back. ``display.install`` runs the distro package install on the gateway host: sudo
- privilege is asked for through the masked ``display.install.sudo.request`` card (same ``_block`` bridge as
- the terminal tool's sudo prompt), stdout streams as ``display.install.log`` and the run ends with
++privilege is asked for through the masked ``display.install.sudo`` server→client request (same ``_ask``
++bridge as the terminal tool's sudo prompt), stdout streams as ``display.install.log`` and the run ends with
+``display.install.done`` carrying a fresh status snapshot. Every handler is profile-scoped so a multiplexed gateway answers for the bot
+the pane is looking at. Lease transitions fan out as the global ``display.lease`` event so every
+connected client repaints (badge on the bot row, red border on the viewer, agent handoff prompt).
+
+Bodies are rebound onto server.py's globals (method_ctx.bind_module) and reference them bare.
+"""
+
+import logging
+import threading
+import weakref
+
+from .method_ctx import HandlerRegistry, bind_module
+
+logger = logging.getLogger(__name__)
+_registry = HandlerRegistry()
+method = _registry.method
+_profile_scoped = _registry.profile_scoped
+
+_DISPLAY_ERR = 5300
+_lease_listener_installed = threading.Event()
+
+
+def _lease_view(lease) -> dict:
+ """The lease as clients may see it: the holder's viewer id is a capability (whoever presents it
+ co-drives or releases the lease), so it is replaced by a short hash the holder can match against
+ its own id to know it is the one in control."""
+ import hashlib
+ d = lease.as_dict()
+ vid = d.pop("viewer_id")
+ d["viewer_id"] = None
+ d["viewer_hash"] = hashlib.sha256(vid.encode()).hexdigest()[:12] if vid else None
+ return d
+
+
+def _display_snapshot() -> dict:
+ from hermes_constants import hermes_home_key
+ from tools.bot_desktop import lease as _bd_lease, runtime as _bd_runtime
+ st = _bd_runtime.status()
+ return {**st.as_dict(), "lease": _lease_view(_bd_lease.get()), "profile_key": hermes_home_key()}
+
+
+def _install_lease_listener() -> None:
+ """Once per process: broadcast every lease change to all connected clients."""
+ if _lease_listener_installed.is_set():
+ return
+ from tools.bot_desktop import lease as _bd_lease
+
+ def _on_change(profile_key: str, lease) -> None:
+ _broadcast_global_event("display.lease", {"profile_key": profile_key, "lease": _lease_view(lease)})
+ _bd_lease.on_change(_on_change)
+ _lease_listener_installed.set() # only once the subscription exists, or a failed import would silence every client
+
+
+@method("display.status")
+@_profile_scoped
+def _(rid, params: dict) -> dict:
+ _install_lease_listener()
+ try:
+ return _ok(rid, _display_snapshot())
+ except Exception as e:
+ return _err(rid, _DISPLAY_ERR, str(e))
+
+
+@method("display.thumbnail")
+@_profile_scoped
+def _(rid, params: dict) -> dict:
+ """One JPEG grab of the bot's screen (``data_url``: null while stopped). Read-only: no lease change.
+ Suppressed while a human holds the lease — the frame may show what they are typing — and when
+ the lease moved DURING the grab: a takeover racing the framebuffer read means the frame may
+ already be the human's session, so it is dropped rather than shipped to every client."""
+ try:
+ from tools.bot_desktop import lease as _bd_lease
+ before = _bd_lease.get()
+ if before.holder == _bd_lease.HUMAN:
+ return _ok(rid, {"data_url": None, "suppressed": "human_has_control"})
+ from tools.bot_desktop.thumbnail import thumbnail_data_url
+ data_url = thumbnail_data_url()
+ if _bd_lease.get().epoch != before.epoch:
+ return _ok(rid, {"data_url": None, "suppressed": "human_has_control"})
+ return _ok(rid, {"data_url": data_url})
+ except Exception as e:
+ return _err(rid, _DISPLAY_ERR, str(e))
+
+
+@method("display.start")
+@_profile_scoped
+def _(rid, params: dict) -> dict:
+ _install_lease_listener()
+ from tools.bot_desktop import runtime as _bd_runtime
+ try:
+ _bd_runtime.start()
+ return _ok(rid, _display_snapshot())
+ except Exception as e:
+ return _err(rid, _DISPLAY_ERR, str(e))
+
+
+@method("display.stop")
+@_profile_scoped
+def _(rid, params: dict) -> dict:
+ """Stopping kills the screen under whoever is on it, so it obeys the same rule as a bare
+ display.lease.release: refused while a human holds unless the caller says ``force``."""
+ from tools.bot_desktop import lease as _bd_lease, runtime as _bd_runtime
+ force = bool(params.get("force"))
+ # Refusal and release are ONE lease transition: a takeover landing between a separate human_holds()
+ # check and the release would be acknowledged to the human and then silently revoked here.
+ if _bd_lease.release(unless_human=not force).holder == _bd_lease.HUMAN:
+ return _err(rid, _DISPLAY_ERR, "a human holds this screen; pass force: true to stop it anyway",
+ data={"code": "viewer_mismatch"})
+ try:
+ stopped = _bd_runtime.stop()
+ return _ok(rid, {**_display_snapshot(), "stopped": stopped})
+ except Exception as e:
+ return _err(rid, _DISPLAY_ERR, str(e))
+
+
+# viewer ids minted per connection (keyed by the transport that asked), so a reconnecting pane can
+# keep its identity — and its lease — while nobody can claim an id minted for another connection.
+_minted_viewer_ids: "weakref.WeakKeyDictionary[object, set[str]]" = weakref.WeakKeyDictionary()
+# Transports that cannot be weakly referenced (stdio, slotted, or none bound at all) are one
+# connection per process — the TUI's own pipe — so their minted ids share one process-wide set.
+_unweakable_minted_ids: set[str] = set()
+
+
+def _minted_for_this_connection() -> set[str]:
+ try:
+ return _minted_viewer_ids.setdefault(current_transport(), set())
+ except TypeError:
+ return _unweakable_minted_ids
+
+
+def _mint_viewer_id(requested: str) -> str:
+ """Server-minted viewer identity. ``requested`` is honoured only when THIS connection minted it
+ earlier; anything else (including a holder id read off display.status) gets a fresh id."""
+ import secrets
+ mine = _minted_for_this_connection()
+ if requested in mine:
+ return requested
+ viewer_id = secrets.token_urlsafe(16)
+ mine.add(viewer_id)
+ return viewer_id
+
+
+def _foreign_viewer_id(rid, viewer_id: str):
+ """The error for a viewer id this connection never minted, or None. acquire/release take the id
+ as a capability, so one a caller invented or read off the wire must be refused — otherwise the
+ minting only shapes the honest path and a made-up id still evicts or releases the human."""
+ if viewer_id in _minted_for_this_connection():
+ return None
+ return _err(rid, _DISPLAY_ERR, "viewer_id was not minted for this connection; call display.observe first",
+ data={"code": "viewer_mismatch"})
+
+
+@method("display.observe")
+@_profile_scoped
+def _(rid, params: dict) -> dict:
+ """Mint a single-use, 30 s ticket for ``/api/display/ws``. The ticket carries the profile home so
+ the bridge dials THIS profile's RFB socket, and a server-minted viewer id (returned to the caller,
+ who passes it to ``display.lease.acquire`` / ``release``) so the lease can name the holder."""
+ from hermes_constants import get_hermes_home
+ from hermes_cli.dashboard_auth.ws_tickets import mint_ticket
+ from tools.bot_desktop import runtime as _bd_runtime
+ try:
+ if _bd_runtime.rfb_socket_path() is None:
+ return _err(rid, _DISPLAY_ERR, "this profile's Bot Desktop is not running; call display.start first")
+ viewer_id = _mint_viewer_id(str(params.get("viewer_id") or "").strip())
+ ticket = mint_ticket(user_id=f"display:{viewer_id}", provider="bot-desktop",
+ extra={"hermes_home": str(get_hermes_home()), "viewer_id": viewer_id})
+ return _ok(rid, {"ticket": ticket, "path": "/api/display/ws", "viewer_id": viewer_id,
+ **_display_snapshot()})
+ except Exception as e:
+ return _err(rid, _DISPLAY_ERR, str(e))
+
+
+@method("display.install")
+@_profile_scoped
+def _(rid, params: dict) -> dict:
+ """Start the package install in the background; the renderer follows ``display.install.log`` /
+ ``display.install.done``. Refused while one is already running for this profile."""
+ from hermes_constants import hermes_home_key
+ from tools.bot_desktop import install as _bd_install, runtime as _bd_runtime
+ if not _bd_runtime.is_supported_host():
+ return _err(rid, _DISPLAY_ERR, "Bot Desktop runs on Linux gateway hosts only")
+ if _bd_runtime.install_command() is None:
+ return _err(rid, _DISPLAY_ERR, "no supported package manager (apt-get, dnf, pacman) on this host")
+ profile_key = hermes_home_key()
+
+ def _ask_password() -> str:
+ # App-level card, no session: it reaches the connection that clicked Install through the
+ # transport copy_context() carries below. A client-supplied session_id could route the
+ # masked password card into another window's chat, so none is accepted.
- return _block("display.install.sudo.request", "", {"profile_key": profile_key}, timeout=300)
++ return _ask("display.install.sudo", "", {"profile_key": profile_key}, timeout=300)
+
+ def _line(text: str) -> None:
+ _broadcast_global_event("display.install.log", {"profile_key": profile_key, "line": text})
+
+ # The worker thread inherits NO context: the caller's transport (so the sudo card reaches the
+ # CLIENT that clicked Install) and the profile scope `_profile_scoped` installed (so status, lock
+ # and events all speak for the requested profile) are carried across with copy_context().
+ import contextvars
+ ctx = contextvars.copy_context()
+
+ def _run() -> None:
+ try:
+ code = _bd_install.install_packages(ask_password=_ask_password, on_line=_line, claimed=True)
+ except Exception as e:
+ _line(f"install failed: {e}")
+ code = 1
+ _broadcast_global_event("display.install.done", {"profile_key": profile_key, "code": code,
+ "status": _display_snapshot()})
+
+ try:
+ _bd_install.claim() # atomic: two fast clicks cannot both start a package manager
+ except _bd_install.InstallBusy as e:
+ return _err(rid, _DISPLAY_ERR, str(e))
+ threading.Thread(target=ctx.run, args=(_run,), name=f"bot-desktop-install:{profile_key}", daemon=True).start()
+ return _ok(rid, {"started": True, "command": _bd_runtime.install_command(), "profile_key": profile_key})
+
+
+@method("display.lease.acquire")
+@_profile_scoped
+def _(rid, params: dict) -> dict:
+ from tools.bot_desktop import lease as _bd_lease
+ viewer_id = str(params.get("viewer_id") or "").strip()
+ if not viewer_id:
+ return _err(rid, _DISPLAY_ERR, "viewer_id required")
+ if (refused := _foreign_viewer_id(rid, viewer_id)) is not None:
+ return refused
+ lease = _bd_lease.acquire(viewer_id, reason=str(params.get("reason") or ""))
+ return _ok(rid, {"lease": _lease_view(lease)})
+
+
+@method("display.lease.release")
+@_profile_scoped
+def _(rid, params: dict) -> dict:
+ from tools.bot_desktop import lease as _bd_lease
+ viewer_id = str(params.get("viewer_id") or "").strip() or None
+ # lease.release(None) skips the holder check; a client that lost its viewer id must not be able to
+ # yank control from whoever holds it unless it says so explicitly (force).
+ if viewer_id is not None and not params.get("force") and (refused := _foreign_viewer_id(rid, viewer_id)) is not None:
+ return refused
+ # Same atomicity as display.stop: the "is a human holding?" decision happens inside the transition.
+ lease = _bd_lease.release(viewer_id, unless_human=viewer_id is None and not params.get("force"))
+ if viewer_id is None and lease.holder == _bd_lease.HUMAN:
+ return _err(rid, _DISPLAY_ERR, "viewer_id required to release another viewer's lease (or pass force: true)",
+ data={"code": "viewer_mismatch"})
+ return _ok(rid, {"lease": _lease_view(lease)})
+
+
+def register(server) -> None:
+ bind_module(globals(), server, skip=("_",))