{ "openapi": "3.1.0", "info": { "title": "agent-toolkit serve API", "version": "1.51.0", "description": "Generated from docs/compatibility/cli-contract.yaml \u2014 do not hand-edit." }, "paths": { "/api/v1/help": { "get": { "operationId": "help", "summary": "Print consumer-first help text", "tags": [ "meta" ], "x-scope": "read:*", "x-confirm-required": false, "responses": { "200": { "description": "ok" }, "403": { "description": "scope denied" }, "428": { "description": "confirm required" } } } }, "/api/v1/version": { "get": { "operationId": "version", "summary": "Print agent-toolkit version string", "tags": [ "meta" ], "x-scope": "read:*", "x-confirm-required": false, "responses": { "200": { "description": "ok" }, "403": { "description": "scope denied" }, "428": { "description": "confirm required" } } } }, "/api/v1/install": { "post": { "operationId": "install", "summary": "Install profiles for detected or selected AI tools", "tags": [ "consumer" ], "x-scope": "write:fs", "x-confirm-required": true, "responses": { "200": { "description": "ok" }, "403": { "description": "scope denied" }, "428": { "description": "confirm required" } } } }, "/api/v1/update": { "post": { "operationId": "update", "summary": "Refresh installed profiles from latest toolkit data", "tags": [ "consumer" ], "x-scope": "write:fs", "x-confirm-required": false, "responses": { "200": { "description": "ok" }, "403": { "description": "scope denied" }, "428": { "description": "confirm required" } } } }, "/api/v1/uninstall": { "post": { "operationId": "uninstall", "summary": "Remove toolkit-owned files using install receipts", "tags": [ "consumer" ], "x-scope": "write:fs", "x-confirm-required": true, "responses": { "200": { "description": "ok" }, "403": { "description": "scope denied" }, "428": { "description": "confirm required" } } } }, "/api/v1/doctor": { "get": { "operationId": "doctor", "summary": "Check toolkit data and tool availability", "tags": [ "consumer" ], "x-scope": "read:*", "x-confirm-required": false, "responses": { "200": { "description": "ok" }, "403": { "description": "scope denied" }, "428": { "description": "confirm required" } } } }, "/api/v1/diff": { "get": { "operationId": "diff", "summary": "Show changes vs installed plugin bundles", "tags": [ "consumer" ], "x-scope": "read:*", "x-confirm-required": false, "responses": { "200": { "description": "ok" }, "403": { "description": "scope denied" }, "428": { "description": "confirm required" } } } }, "/api/v1/skills/{sub}": { "post": { "operationId": "skills", "summary": "Sync, list, and validate skills", "tags": [ "consumer" ], "x-scope": "write:catalog", "x-confirm-required": true, "parameters": [ { "name": "sub", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "list", "sync", "validate", "help" ] } } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "description": "Typed options for the subcommand. The {sub} path segment is authoritative: a body `subcommand` key is ignored. Empty body = defaults.", "properties": { "domain": { "type": "string" }, "tools": { "type": "array", "items": { "type": "string" } } } } } } }, "responses": { "200": { "description": "ok" }, "400": { "description": "invalid request body or field" }, "403": { "description": "scope denied or path outside allowed roots" }, "404": { "description": "unknown subcommand or path not found" }, "428": { "description": "confirm required" } } } }, "/api/v1/mcp/{sub}": { "post": { "operationId": "mcp", "summary": "MCP provider setup, health, doctor, uninstall", "tags": [ "consumer" ], "x-scope": "write:mcp", "x-confirm-required": true, "parameters": [ { "name": "sub", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "list", "setup", "health", "doctor", "uninstall", "help" ] } } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "description": "Typed options for the subcommand. The {sub} path segment is authoritative: a body `subcommand` key is ignored. Empty body = defaults.", "properties": { "provider": { "type": "string" }, "offline": { "type": "boolean" } } } } } }, "responses": { "200": { "description": "ok" }, "400": { "description": "invalid request body or field" }, "403": { "description": "scope denied or path outside allowed roots" }, "404": { "description": "unknown subcommand or path not found" }, "428": { "description": "confirm required" } } } }, "/api/v1/plugin/{sub}": { "post": { "operationId": "plugin", "summary": "Plugin bundle sync and check", "tags": [ "consumer" ], "x-scope": "write:plugins", "x-confirm-required": true, "parameters": [ { "name": "sub", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "sync", "check", "help" ] } } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "description": "Typed options for the subcommand. The {sub} path segment is authoritative: a body `subcommand` key is ignored. Empty body = defaults.", "properties": {} } } } }, "responses": { "200": { "description": "ok" }, "400": { "description": "invalid request body or field" }, "403": { "description": "scope denied or path outside allowed roots" }, "404": { "description": "unknown subcommand or path not found" }, "428": { "description": "confirm required" } } } }, "/api/v1/loops/{sub}": { "post": { "operationId": "loop", "summary": "Loop engineering (init, run, status, audit, cost, schedule, sync, list, templates)", "tags": [ "advanced" ], "x-scope": "write:loops", "x-confirm-required": false, "parameters": [ { "name": "sub", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "init", "status", "audit", "cost", "schedule", "sync", "list", "ls", "templates", "help" ] } } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "description": "Typed options for the subcommand. The {sub} path segment is authoritative: a body `subcommand` key is ignored. Empty body = defaults.", "properties": { "workspace": { "type": "string" }, "name": { "type": "string" }, "custom_name": { "type": "string" }, "force": { "type": "boolean" }, "runner": { "type": "string" }, "model": { "type": "string" }, "pack": { "type": "string" }, "no_llm": { "type": "boolean" }, "dry_run": { "type": "boolean" }, "cron": { "type": "string" }, "platform": { "type": "string", "enum": [ "local", "github-actions" ] }, "list_mode": { "type": "boolean" }, "remove_mode": { "type": "boolean" }, "status_mode": { "type": "boolean" } } } } } }, "responses": { "200": { "description": "ok" }, "400": { "description": "invalid request body or field" }, "403": { "description": "scope denied or path outside allowed roots" }, "404": { "description": "unknown subcommand or path not found" }, "428": { "description": "confirm required" } } } }, "/api/v1/workspace/{sub}": { "post": { "operationId": "workspace", "summary": "Workspace lifecycle (init, context, sync, use-persona, handoff, history, personas, load, profiles, validate, budget)", "tags": [ "advanced" ], "x-scope": "write:workspace", "x-confirm-required": true, "parameters": [ { "name": "sub", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "init", "context", "sync", "use-persona", "handoff", "history", "personas", "load", "profiles", "validate", "budget", "help" ] } } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "description": "Typed options for the subcommand. The {sub} path segment is authoritative: a body `subcommand` key is ignored. Empty body = defaults.", "properties": { "workspace": { "type": "string" }, "dir": { "type": "string" }, "name": { "type": "string" }, "explain": { "type": "boolean" }, "arg": { "type": "string" }, "profile": { "type": "string" }, "pack": { "type": "string" } } } } } }, "responses": { "200": { "description": "ok" }, "400": { "description": "invalid request body or field" }, "403": { "description": "scope denied or path outside allowed roots" }, "404": { "description": "unknown subcommand or path not found" }, "428": { "description": "confirm required" } } } }, "/api/v1/memory/{sub}": { "post": { "operationId": "memory", "summary": "Knowledge base (add, search, inject, review, todo)", "tags": [ "advanced" ], "x-scope": "write:memory", "x-confirm-required": false, "parameters": [ { "name": "sub", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "add", "search", "inject", "review", "todo", "help" ] } } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "description": "Typed options for the subcommand. The {sub} path segment is authoritative: a body `subcommand` key is ignored. Empty body = defaults.", "properties": { "workspace": { "type": "string" }, "entry_type": { "type": "string", "enum": [ "learning", "process", "todo" ] }, "title": { "type": "string" }, "content": { "type": "string" }, "query": { "type": "string" }, "stale_after": { "type": "integer" }, "fix": { "type": "boolean" }, "show_done": { "type": "boolean" } } } } } }, "responses": { "200": { "description": "ok" }, "400": { "description": "invalid request body or field" }, "403": { "description": "scope denied or path outside allowed roots" }, "404": { "description": "unknown subcommand or path not found" }, "428": { "description": "confirm required" } } } }, "/api/v1/project/{sub}": { "post": { "operationId": "project", "summary": "Project index and scaffolding (init, clone, list, add, remove, scan)", "tags": [ "advanced" ], "x-scope": "write:projects", "x-confirm-required": true, "parameters": [ { "name": "sub", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "init", "clone", "list", "add", "remove", "scan", "help" ] } } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "description": "Typed options for the subcommand. The {sub} path segment is authoritative: a body `subcommand` key is ignored. Empty body = defaults.", "properties": { "workspace": { "type": "string" }, "arg": { "type": "string" }, "ssh": { "type": "boolean" } } } } } }, "responses": { "200": { "description": "ok" }, "400": { "description": "invalid request body or field" }, "403": { "description": "scope denied or path outside allowed roots" }, "404": { "description": "unknown subcommand or path not found" }, "428": { "description": "confirm required" } } } }, "/api/v1/dc/{sub}": { "post": { "operationId": "devcompanion", "summary": "Background job queue + LLM policy status", "tags": [ "advanced" ], "x-scope": "write:dc", "x-confirm-required": true, "parameters": [ { "name": "sub", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "queue", "run-once", "status", "done", "sync-todos", "llm-status", "help" ] } } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "description": "Typed options for the subcommand. The {sub} path segment is authoritative: a body `subcommand` key is ignored. Empty body = defaults.", "properties": { "workspace": { "type": "string" }, "arg": { "type": "string" }, "template": { "type": "string" }, "request": { "type": "string" }, "job_id": { "type": "string" }, "no_llm": { "type": "boolean" } } } } } }, "responses": { "200": { "description": "ok" }, "400": { "description": "invalid request body or field" }, "403": { "description": "scope denied or path outside allowed roots" }, "404": { "description": "unknown subcommand or path not found" }, "428": { "description": "confirm required" } } } }, "/api/v1/build": { "post": { "operationId": "build", "summary": "Compile canonical capabilities into target artifacts", "tags": [ "advanced" ], "x-scope": "write:plugins", "x-confirm-required": true, "responses": { "200": { "description": "ok" }, "403": { "description": "scope denied" }, "428": { "description": "confirm required" } } } }, "/api/v1/inventory": { "get": { "operationId": "inventory", "summary": "List skills, agents, and products", "tags": [ "advanced" ], "x-scope": "read:*", "x-confirm-required": false, "responses": { "200": { "description": "ok" }, "403": { "description": "scope denied" }, "428": { "description": "confirm required" } } } }, "/api/v1/matrix": { "get": { "operationId": "matrix", "summary": "Platform capability matrix", "tags": [ "advanced" ], "x-scope": "read:*", "x-confirm-required": false, "responses": { "200": { "description": "ok" }, "403": { "description": "scope denied" }, "428": { "description": "confirm required" } } } }, "/api/v1/swarms/{sub}": { "post": { "operationId": "swarm", "summary": "Swarm v1 history inspection and recovery; new starts are disabled", "tags": [ "advanced" ], "x-scope": "write:swarm", "x-confirm-required": true, "parameters": [ { "name": "sub", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "recipes", "recipe", "backends", "doctor", "runners", "models", "start", "init", "plan", "activate", "deactivate", "promote", "list", "status", "approve", "reject", "cancel", "pause", "resume", "stop", "cleanup", "graph", "handoff", "task", "watch", "report", "artifacts", "handoffs", "logs", "approvals", "prune", "help" ] } } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "description": "Typed options for the subcommand. The {sub} path segment is authoritative: a body `subcommand` key is ignored. Empty body = defaults.", "properties": { "workspace": { "type": "string" }, "project_id": { "type": "string" }, "expected_project_path": { "type": "string" }, "run_id": { "type": "string" }, "gate_id": { "type": "string" }, "recipe": { "type": "string" }, "backend": { "type": "string" }, "runner": { "type": "string" }, "model_profile": { "type": "string" }, "task": { "type": "string" }, "reason": { "type": "string" }, "dry_run": { "type": "boolean" }, "force": { "type": "boolean" }, "current": { "type": "boolean" }, "issue_ref": { "type": "string" }, "base_ref": { "type": "string" }, "handoff_sub": { "type": "string" }, "htype": { "type": "string" }, "from_role": { "type": "string" }, "to_role": { "type": "string" }, "priority": { "type": "integer" }, "artifact": { "type": "string" }, "commit": { "type": "string" }, "branch": { "type": "string" }, "blocking": { "type": "boolean" }, "act": { "type": "string" }, "max_hops": { "type": "integer" }, "role": { "type": "string" }, "handoff_id": { "type": "string" }, "to_recipe": { "type": "string" }, "older_than": { "type": "string" }, "person_bindings": { "type": "object", "additionalProperties": { "type": "string" } }, "role_runners": { "type": "object", "additionalProperties": { "type": "string" } }, "role_models": { "type": "object", "additionalProperties": { "type": "string" } }, "launch_sessions": { "type": "boolean" } } } } } }, "responses": { "200": { "description": "ok" }, "400": { "description": "invalid request body or field" }, "403": { "description": "scope denied or path outside allowed roots" }, "404": { "description": "unknown subcommand or path not found" }, "428": { "description": "confirm required" } } } }, "/api/v1/insights": { "get": { "operationId": "insights", "summary": "AI tool usage insights \u2014 opencode, cursor, claude, windsurf, copilot, codex, all", "tags": [ "advanced" ], "x-scope": "read:*", "x-confirm-required": false, "responses": { "200": { "description": "ok" }, "403": { "description": "scope denied" }, "428": { "description": "confirm required" } } } }, "/api/v1/projects": { "get": { "operationId": "list_projects", "summary": "List registered workspace projects with link health as typed rows", "x-scope": "read:*", "x-confirm-required": false, "parameters": [ { "name": "workspace", "in": "query", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectListResponse" } } } } } } }, "/api/v1/projects/{id}/issues": { "get": { "operationId": "list_project_issues", "summary": "List open GitHub issues for a registered project via the authenticated gh CLI", "x-scope": "read:*", "x-confirm-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "workspace", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectIssuesResponse" } } } }, "400": { "description": "invalid project id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "project not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/projects/{id}/git/status": { "get": { "operationId": "project_git_status", "summary": "Read staged, unstaged and untracked changes for a registered project repository", "x-scope": "read:*", "x-confirm-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "workspace", "in": "query", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectGitStatusResponse" } } } }, "400": { "description": "invalid project id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "project not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/projects/{id}/git/diff": { "get": { "operationId": "project_git_diff", "summary": "Read the unified diff for one file in a registered project repository", "x-scope": "read:*", "x-confirm-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "workspace", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "path", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "staged", "in": "query", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectGitDiffResponse" } } } }, "400": { "description": "invalid project id or path", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "project not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/projects/{id}/git/log": { "get": { "operationId": "project_git_log", "summary": "List recent commits of a registered project repository", "x-scope": "read:*", "x-confirm-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "workspace", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectGitLogResponse" } } } }, "400": { "description": "invalid project id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "project not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/projects/{id}/git/show": { "get": { "operationId": "project_git_show", "summary": "Read the diff of one commit in a registered project repository, capped at 200,000 bytes; check `truncated`", "x-scope": "read:*", "x-confirm-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "workspace", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "hash", "in": "query", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectGitShowResponse" } } } }, "400": { "description": "invalid project id or commit hash", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "project not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/projects/{id}/git/stage": { "post": { "operationId": "project_git_stage", "summary": "Stage selected files in a registered project repository", "x-scope": "write:*", "x-confirm-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectGitStatusResponse" } } } }, "400": { "description": "invalid project id or path", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "project not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/projects/{id}/git/unstage": { "post": { "operationId": "project_git_unstage", "summary": "Unstage selected files in a registered project repository without touching working-tree contents", "x-scope": "write:*", "x-confirm-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectGitStatusResponse" } } } }, "400": { "description": "invalid project id or path", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "project not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/projects/{id}/git/stage-hunk": { "post": { "operationId": "project_git_stage_hunk", "summary": "Stage or unstage exactly one hunk of a file in a registered project repository", "x-scope": "write:*", "x-confirm-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectGitStatusResponse" } } } }, "400": { "description": "invalid project id or path", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "project not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/projects/{id}/git/commit": { "post": { "operationId": "project_git_commit", "summary": "Commit the staged index of a registered project repository with an explicit message", "x-scope": "write:*", "x-confirm-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectGitStatusResponse" } } } }, "400": { "description": "invalid project id or empty commit message", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "project not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/workspace/packs/list": { "get": { "operationId": "workspace_packs_list", "summary": "List local workspace context packs with validation and active selection", "x-scope": "read:*", "x-confirm-required": false, "parameters": [ { "name": "workspace", "in": "query", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkspacePacksResponse" } } } }, "403": { "description": "workspace is outside allowed roots or uses a symlinked pack directory", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/workspace/packs/effective-context": { "get": { "operationId": "workspace_packs_effective_context", "summary": "Show the ordered effective-context fragments a future session in this workspace would draw from", "x-scope": "read:*", "x-confirm-required": false, "parameters": [ { "name": "workspace", "in": "query", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EffectiveContextResponse" } } } }, "403": { "description": "workspace is outside allowed roots or uses a symlinked pack directory", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "workspace is not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/workspace/packs/activate": { "post": { "operationId": "workspace_packs_activate", "summary": "Select a validated workspace context pack for future sessions or clear it", "x-scope": "write:*", "x-confirm-required": false, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkspacePackActivateRequest" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkspacePackActivateResponse" } } } }, "400": { "description": "request body or selected pack is invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "403": { "description": "workspace is outside allowed roots or the active marker is a symlink", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "workspace or pack is not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/workspace/packs/save": { "post": { "operationId": "workspace_packs_save", "summary": "Create or update an inert workspace context pack with revision checks", "x-scope": "write:*", "x-confirm-required": false, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkspacePackSaveRequest" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkspacePackSaveResponse" } } } }, "400": { "description": "request body or pack fields are invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "403": { "description": "workspace is outside allowed roots or uses a symlinked path", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "workspace or pack is not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/mcp/providers": { "get": { "operationId": "mcp_providers", "summary": "List MCP providers and secret-free local configuration state", "x-scope": "read:*", "x-confirm-required": false, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/McpProvidersResponse" } } } } } } }, "/api/v1/install/preview": { "get": { "operationId": "install_preview", "summary": "Preview profile installation targets and conflicts without writing files", "x-scope": "read:*", "x-confirm-required": false, "parameters": [ { "name": "tools", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "skills", "in": "query", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InstallPreviewResponse" } } } } } } }, "/api/v1/install/reviewed": { "post": { "operationId": "install_reviewed", "summary": "Install Toolkit capabilities only for explicitly reviewed targets", "x-scope": "write:*", "x-confirm-required": false, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InstallReviewedRequest" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InstallPreviewResponse" } } } }, "422": { "description": "target selection is empty or unsupported", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/install/copilot-project/preview": { "get": { "operationId": "copilot_project_install_preview", "summary": "Review install or receipt-backed removal of Copilot instructions for a linked project", "x-scope": "read:*", "x-confirm-required": false, "parameters": [ { "name": "workspace", "in": "query", "required": true, "schema": { "type": "workspace" } }, { "name": "project", "in": "query", "required": true, "schema": { "type": "project" } }, { "name": "action", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "install", "remove" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CopilotProjectInstallResponse" } } } }, "400": { "description": "workspace or project is missing", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "422": { "description": "action is not install or remove", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/install/copilot-project/reviewed": { "post": { "operationId": "copilot_project_install_reviewed", "summary": "Apply reviewed Copilot instruction install or receipt-backed removal for a linked project", "x-scope": "write:*", "x-confirm-required": false, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CopilotProjectInstallRequest" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CopilotProjectInstallResponse" } } } }, "400": { "description": "request body is invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "422": { "description": "required field is missing or action is unsupported", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "409": { "description": "project changed since review; no mutation is applied", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/install/receipts": { "get": { "operationId": "install_receipts", "summary": "List secret-free receipts proving Toolkit capability installations", "x-scope": "read:*", "x-confirm-required": false, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InstallReceiptsResponse" } } } } } } }, "/api/v1/uninstall/preview": { "get": { "operationId": "uninstall_preview", "summary": "Preview Toolkit-owned file removal and preserve modified files without writing", "x-scope": "read:*", "x-confirm-required": false, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InstallPreviewResponse" } } } } } } }, "/api/v1/uninstall/reviewed": { "post": { "operationId": "uninstall_reviewed", "summary": "Remove files only if the receipt-backed plan still matches its reviewed token", "x-scope": "write:*", "x-confirm-required": false, "parameters": [ { "name": "review_token", "in": "query", "required": true, "schema": { "type": "review_token" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InstallPreviewResponse" } } } }, "400": { "description": "review_token is required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "409": { "description": "removal plan changed since review", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/swarms/recipes": { "get": { "operationId": "list_swarm_recipes", "summary": "List canonical swarm recipes and available session adapters", "x-scope": "read:*", "x-confirm-required": false, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SwarmRecipesResponse" } } } } } } }, "/api/v1/health": { "get": { "operationId": "health", "summary": "Server-native endpoint (health)", "x-scope": "read:*", "x-confirm-required": false, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VersionResponse" } } } } } } }, "/api/v1/openapi.json": { "get": { "operationId": "get_openapi", "summary": "Server-native endpoint (get_openapi)", "x-scope": "read:*", "x-confirm-required": false, "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/api/v1/selfcheck": { "get": { "operationId": "selfcheck", "summary": "Server-native endpoint (selfcheck)", "x-scope": "read:*", "x-confirm-required": false, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SelfcheckResponse" } } } } } } }, "/api/v1/jobs": { "post": { "operationId": "create_job", "summary": "Server-native endpoint (create_job)", "x-scope": "write:*", "x-confirm-required": false, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Job" } } } }, "400": { "description": "invalid JSON body or workspace path", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "403": { "description": "workspace outside allowed roots", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "workspace not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "422": { "description": "cmd is required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "429": { "description": "max concurrent jobs reached", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } }, "get": { "operationId": "list_jobs", "summary": "List jobs keyed by id", "x-scope": "read:*", "x-confirm-required": false, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Job" } } } } } } } }, "/api/v1/people": { "get": { "operationId": "list_people", "summary": "List validated durable People in a workspace", "x-scope": "read:*", "x-confirm-required": false, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object" } } } } } }, "post": { "operationId": "create_person", "summary": "Create a reviewed durable Person", "x-scope": "write:*", "x-confirm-required": false, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object" } } } } } } }, "/api/v1/sessions": { "get": { "operationId": "list_person_sessions", "summary": "List durable Person session lifecycle records", "x-scope": "read:*", "x-confirm-required": false, "parameters": [ { "name": "workspace", "in": "query", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersonSessionsResponse" } } } } } }, "post": { "operationId": "create_person_session", "summary": "Validate a Person launch and create a session record", "x-scope": "write:*", "x-confirm-required": false, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersonSessionCreateRequest" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersonSessionResponse" } } } }, "400": { "description": "Person, project, provider or model cannot be launched", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "workspace or Person not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/sessions/{id}/status": { "post": { "operationId": "update_person_session_status", "summary": "Record a PTY lifecycle transition reported by Desktop", "x-scope": "write:*", "x-confirm-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersonSessionStatusRequest" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersonSessionResponse" } } } }, "400": { "description": "invalid session status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "session not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "409": { "description": "invalid lifecycle transition", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/sessions/{id}/provider-session": { "post": { "operationId": "attach_person_session_provider_id", "summary": "Record the provider conversation id captured after PTY spawn", "x-scope": "write:*", "x-confirm-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersonSessionProviderRequest" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersonSessionResponse" } } } }, "400": { "description": "invalid provider session id or session already ended", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "session not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "409": { "description": "a different provider session id is already recorded", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/people/bindings": { "get": { "operationId": "list_people_bindings", "summary": "List validated workspace default People for swarm roles", "x-scope": "read:*", "x-confirm-required": false, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersonBindingsResponse" } } } }, "404": { "description": "workspace not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } }, "put": { "operationId": "update_people_bindings", "summary": "Save reviewed default People for selected recipe roles", "x-scope": "write:*", "x-confirm-required": false, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersonBindingsRequest" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersonBindingsResponse" } } } }, "400": { "description": "invalid recipe role or Person id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "403": { "description": "workspace outside allowed roots or symlink storage", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "workspace or Person not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/people/{id}": { "get": { "operationId": "get_person", "summary": "Server-native endpoint (get_person)", "x-scope": "read:*", "x-confirm-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object" } } } } } }, "put": { "operationId": "update_person", "summary": "Server-native endpoint (update_person)", "x-scope": "write:*", "x-confirm-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object" } } } } } } }, "/api/v1/people/{id}/archive": { "post": { "operationId": "archive_person", "summary": "Server-native endpoint (archive_person)", "x-scope": "write:*", "x-confirm-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object" } } } } } } }, "/api/v1/jobs/{id}": { "get": { "operationId": "get_job", "summary": "Get one job", "x-scope": "read:*", "x-confirm-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Job" } } } }, "400": { "description": "invalid job id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "job not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } }, "delete": { "operationId": "delete_job", "summary": "Server-native endpoint (delete_job)", "x-scope": "write:*", "x-confirm-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageResponse" } } } }, "400": { "description": "invalid job id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "job not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "409": { "description": "job is running (use ?force=true)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/jobs/{id}/log": { "get": { "operationId": "get_job_log", "summary": "Server-native endpoint (get_job_log)", "x-scope": "read:*", "x-confirm-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/api/v1/jobs/{id}/events": { "get": { "operationId": "stream_job_events", "summary": "Server-native endpoint (stream_job_events)", "x-scope": "read:*", "x-confirm-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "text/event-stream": { "schema": { "type": "string" } } } } } } }, "/api/v1/jobs/{id}/cancel": { "post": { "operationId": "cancel_job", "summary": "Server-native endpoint (cancel_job)", "x-scope": "write:*", "x-confirm-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Job" } } } }, "400": { "description": "invalid job id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "job not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "409": { "description": "job already terminal", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/jobs/{id}/retry": { "post": { "operationId": "retry_job", "summary": "Re-run a failed or canceled job as a new job", "x-scope": "write:*", "x-confirm-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Job" } } } }, "400": { "description": "invalid job id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "403": { "description": "workspace outside allowed roots", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "job or workspace not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "409": { "description": "job is not failed or canceled", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "429": { "description": "max concurrent jobs reached", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/events": { "get": { "operationId": "stream_events", "summary": "Global server event stream (SSE)", "x-scope": "read:*", "x-confirm-required": false, "responses": { "200": { "description": "OK", "content": { "text/event-stream": { "schema": { "type": "string", "x-event-schema": { "$ref": "#/components/schemas/ApiEvent" } } } } }, "400": { "description": "invalid since or Last-Event-ID", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "503": { "description": "too many event subscribers", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/agents": { "get": { "operationId": "list_agents", "summary": "Persona catalog from agents/*/AGENT.md", "x-scope": "read:*", "x-confirm-required": false, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentsResponse" } } } } } } }, "/api/v1/skills/catalog": { "get": { "operationId": "list_library_skills", "summary": "Typed skill catalog with dependencies, provenance and target support", "x-scope": "read:*", "x-confirm-required": false, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LibrarySkillsResponse" } } } } } } }, "/api/v1/tools": { "get": { "operationId": "list_tools", "summary": "Coding-agent CLI discovery (detected/configured/enabled/verified)", "x-scope": "read:*", "x-confirm-required": false, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolsResponse" } } } } } } }, "/api/v1/providers": { "get": { "operationId": "list_providers", "summary": "Swarm runner CLIs", "x-scope": "read:*", "x-confirm-required": false, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProvidersResponse" } } } } } } }, "/api/v1/models": { "get": { "operationId": "list_models", "summary": "Swarm model profile slots", "x-scope": "read:*", "x-confirm-required": false, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModelsResponse" } } } } } } }, "/api/v1/models/live": { "get": { "operationId": "list_live_models", "summary": "Live model catalogue probed from the runner CLI (60s cache, static fallback)", "x-scope": "read:*", "x-confirm-required": false, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LiveModelsResponse" } } } } } } }, "/api/v1/memory": { "get": { "operationId": "list_memory", "summary": "Memory files (learnings, processes, todos). Empty when no workspace.", "x-scope": "read:*", "x-confirm-required": false, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryListResponse" } } } }, "400": { "description": "invalid workspace", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "403": { "description": "workspace outside allowed roots", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/memory/hits": { "get": { "operationId": "search_memory", "summary": "Case-insensitive memory search", "x-scope": "read:*", "x-confirm-required": false, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemorySearchResponse" } } } }, "400": { "description": "query is required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "403": { "description": "workspace outside allowed roots", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "workspace not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/memory/file": { "get": { "operationId": "read_memory", "summary": "Read one memory markdown file", "x-scope": "read:*", "x-confirm-required": false, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryReadResponse" } } } }, "400": { "description": "invalid path", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "403": { "description": "path outside knowledge/", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "memory file not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } }, "post": { "operationId": "add_memory", "summary": "Add a learning, process, or todo entry", "x-scope": "write:*", "x-confirm-required": false, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryWriteResponse" } } } }, "400": { "description": "invalid body or entry_type", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "403": { "description": "workspace outside allowed roots", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "workspace not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } }, "put": { "operationId": "edit_memory", "summary": "Replace a memory markdown file", "x-scope": "write:*", "x-confirm-required": false, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryWriteResponse" } } } }, "400": { "description": "invalid path or content", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "403": { "description": "path outside knowledge/", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "memory file not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/memory/file/archive": { "post": { "operationId": "archive_memory", "summary": "Move a memory file under knowledge/archive/", "x-scope": "write:*", "x-confirm-required": false, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryWriteResponse" } } } }, "400": { "description": "invalid path", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "403": { "description": "path outside knowledge/", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "memory file not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "409": { "description": "already archived", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/doctor/fix": { "post": { "operationId": "doctor_fix", "summary": "Server-native endpoint (doctor_fix)", "x-scope": "write:*", "x-confirm-required": false, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageResponse" } } } } } } }, "/api/v1/loops/{name}/status": { "get": { "operationId": "loop_status_by_name", "summary": "Server-native endpoint (loop_status_by_name)", "x-scope": "read:*", "x-confirm-required": false, "parameters": [ { "name": "name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoopStatusResponse" } } } }, "400": { "description": "invalid loop name", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "loop not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/loops/{name}/cadence": { "post": { "operationId": "update_loop_cadence", "summary": "Update a loop cadence in its definition and return the refreshed status", "x-scope": "write:*", "x-confirm-required": false, "parameters": [ { "name": "name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoopStatusResponse" } } } }, "400": { "description": "invalid cadence", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "loop not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/loops/{name}/audit": { "get": { "operationId": "loop_audit_by_name", "summary": "Server-native endpoint (loop_audit_by_name)", "x-scope": "read:*", "x-confirm-required": false, "parameters": [ { "name": "name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoopAuditResponse" } } } }, "400": { "description": "invalid loop name", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "loop not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/loops/{name}/history": { "get": { "operationId": "loop_history_by_name", "summary": "Server-native endpoint (loop_history_by_name)", "x-scope": "read:*", "x-confirm-required": false, "parameters": [ { "name": "name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoopHistoryResponse" } } } }, "400": { "description": "invalid loop name", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "loop not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/loops/{name}/cost": { "get": { "operationId": "loop_cost_by_name", "summary": "Server-native endpoint (loop_cost_by_name)", "x-scope": "read:*", "x-confirm-required": false, "parameters": [ { "name": "name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoopCostResponse" } } } }, "400": { "description": "invalid loop name", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "loop not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/loops/{name}/run": { "post": { "operationId": "run_loop_by_name", "summary": "Server-native endpoint (run_loop_by_name)", "x-scope": "write:*", "x-confirm-required": false, "parameters": [ { "name": "name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK" } } } }, "/api/v1/loops/{name}/schedule": { "post": { "operationId": "schedule_loop_by_name", "summary": "Server-native endpoint (schedule_loop_by_name)", "x-scope": "write:*", "x-confirm-required": false, "parameters": [ { "name": "name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK" } } } }, "/api/v1/swarms": { "get": { "operationId": "list_swarms", "summary": "Server-native endpoint (list_swarms)", "x-scope": "read:*", "x-confirm-required": false, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SwarmListResponse" } } } } } } }, "/api/v1/swarms/runs/{id}": { "get": { "operationId": "get_swarm_run", "summary": "Server-native endpoint (get_swarm_run)", "x-scope": "read:*", "x-confirm-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SwarmRunResponse" } } } }, "400": { "description": "invalid run_id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "run not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/swarms/runs/{id}/handoffs": { "get": { "operationId": "list_swarm_handoffs", "summary": "Server-native endpoint (list_swarm_handoffs)", "x-scope": "read:*", "x-confirm-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SwarmHandoffsResponse" } } } }, "400": { "description": "invalid run_id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "run not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/swarms/runs/{id}/tasks": { "get": { "operationId": "list_swarm_tasks", "summary": "Server-native endpoint (list_swarm_tasks)", "x-scope": "read:*", "x-confirm-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SwarmTasksResponse" } } } }, "400": { "description": "invalid run_id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "run not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/swarms/runs/{id}/approvals": { "get": { "operationId": "list_swarm_approvals", "summary": "Server-native endpoint (list_swarm_approvals)", "x-scope": "read:*", "x-confirm-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SwarmApprovalsResponse" } } } }, "400": { "description": "invalid run_id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "run not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/swarms/runs/{id}/artifacts": { "get": { "operationId": "list_swarm_artifacts", "summary": "Server-native endpoint (list_swarm_artifacts)", "x-scope": "read:*", "x-confirm-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SwarmArtifactsResponse" } } } }, "400": { "description": "invalid run_id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "run not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/swarms/runs/{id}/approve": { "post": { "operationId": "approve_swarm_run", "summary": "Server-native endpoint (approve_swarm_run)", "x-scope": "write:*", "x-confirm-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SwarmActionResponse" } } } }, "400": { "description": "invalid gate_id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "run or gate not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/swarms/runs/{id}/reject": { "post": { "operationId": "reject_swarm_run", "summary": "Server-native endpoint (reject_swarm_run)", "x-scope": "write:*", "x-confirm-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SwarmActionResponse" } } } }, "400": { "description": "reason required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "run or gate not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/swarms/runs/{id}/stop": { "post": { "operationId": "stop_swarm_run", "summary": "Server-native endpoint (stop_swarm_run)", "x-scope": "write:*", "x-confirm-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SwarmActionResponse" } } } }, "400": { "description": "invalid run_id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "run not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/swarms/runs/{id}/resolve-handoff": { "post": { "operationId": "resolve_swarm_handoff", "summary": "Server-native endpoint (resolve_swarm_handoff)", "x-scope": "write:*", "x-confirm-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SwarmActionResponse" } } } }, "400": { "description": "invalid handoff_id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "run or handoff not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/swarms/runs/{id}/pr-status": { "get": { "operationId": "swarm_pr_status", "summary": "Live GitHub state and check summary of the run draft PR via gh", "x-scope": "read:*", "x-confirm-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SwarmPrStatusResponse" } } } } } } }, "/api/v1/swarms/runs/{id}/pr-ready": { "post": { "operationId": "mark_swarm_pr_ready", "summary": "Mark the run draft PR ready for review via gh", "x-scope": "write:*", "x-confirm-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SwarmPrReadyResponse" } } } }, "404": { "description": "run or pull request not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/swarms/runs/{id}/draft-pr": { "post": { "operationId": "create_swarm_draft_pr", "summary": "Push the run integrator branch and open (or find) its draft PR via gh", "x-scope": "write:*", "x-confirm-required": false, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SwarmDraftPrResponse" } } } }, "404": { "description": "run or integrator branch not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/loops": { "get": { "operationId": "list_loops", "summary": "Server-native endpoint (list_loops)", "x-scope": "read:*", "x-confirm-required": false, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoopListResponse" } } } } } } }, "/api/v1/files": { "get": { "operationId": "list_files", "summary": "List workspace files or a registered project's files", "x-scope": "read:*", "x-confirm-required": false, "parameters": [ { "name": "path", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "depth", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "workspace", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "project", "in": "query", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkspaceFileListResponse" } } } }, "400": { "description": "invalid project", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "403": { "description": "path outside workspace", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "workspace, registered project, or path not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/files/hits": { "get": { "operationId": "search_files", "summary": "Search workspace files or a registered project's files", "x-scope": "read:*", "x-confirm-required": false, "parameters": [ { "name": "q", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "workspace", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "project", "in": "query", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkspaceFileSearchResponse" } } } }, "400": { "description": "invalid project", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "registered project not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/api/v1/files/content": { "get": { "operationId": "read_file", "summary": "Read one workspace or registered project file", "x-scope": "read:*", "x-confirm-required": false, "parameters": [ { "name": "path", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "workspace", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "project", "in": "query", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkspaceFileReadResponse" } } } }, "400": { "description": "invalid project", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "403": { "description": "path outside workspace", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "registered project or file not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } }, "put": { "operationId": "write_file", "summary": "Server-native endpoint (write_file)", "x-scope": "write:*", "x-confirm-required": false, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkspaceFileWriteResponse" } } } }, "400": { "description": "invalid path or binary content", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "403": { "description": "path outside workspace", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "workspace not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } } }, "components": { "schemas": { "ApiError": { "type": "object", "description": "Error body for every non-2xx JSON response.", "properties": { "ok": { "type": "boolean" }, "error": { "type": "string" } }, "required": [ "ok", "error" ] }, "MessageResponse": { "type": "object", "description": "Generic success acknowledgement.", "properties": { "ok": { "type": "boolean" }, "message": { "type": "string" } }, "required": [ "ok", "message" ] }, "InstallPreviewResponse": { "type": "object", "description": "Read-only preview of installation or removal targets and conflicts.", "properties": { "ok": { "type": "boolean" }, "message": { "type": "string" }, "data": { "type": "object", "additionalProperties": { "type": "string" } } }, "required": [ "ok", "message", "data" ] }, "InstallReviewedRequest": { "type": "object", "properties": { "tools": { "type": "array", "items": { "type": "string" } }, "skills": { "type": "array", "items": { "type": "string" } } }, "required": [ "tools", "skills" ] }, "CopilotProjectInstallRequest": { "type": "object", "properties": { "workspace": { "type": "string" }, "project": { "type": "string" }, "action": { "type": "string", "enum": [ "install", "remove" ] }, "review_token": { "type": "string" } }, "required": [ "workspace", "project", "action", "review_token" ] }, "CopilotProjectFile": { "type": "object", "properties": { "path": { "type": "string" }, "kind": { "type": "string", "enum": [ "instructions", "skill", "agent" ] }, "state": { "type": "string" } }, "required": [ "path", "kind", "state" ] }, "CopilotProjectInstallResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "message": { "type": "string" }, "project": { "type": "string" }, "path": { "type": "string" }, "content": { "type": "string" }, "status": { "type": "string" }, "review_token": { "type": "string" }, "files_written": { "type": "integer" }, "files_removed": { "type": "integer" }, "files": { "type": "array", "items": { "$ref": "#/components/schemas/CopilotProjectFile" } } }, "required": [ "ok", "message", "project", "path", "content", "status", "review_token", "files_written", "files_removed", "files" ] }, "InstallReceiptSummary": { "type": "object", "properties": { "product": { "type": "string" }, "target": { "type": "string" }, "scope": { "type": "string" }, "version": { "type": "string" }, "installed_at": { "type": "string" }, "artifact_count": { "type": "integer" }, "created_count": { "type": "integer" }, "merged_count": { "type": "integer" }, "receipt_path": { "type": "string" }, "artifacts": { "type": "array", "items": { "$ref": "#/components/schemas/InstallArtifactSummary" } } }, "required": [ "product", "target", "scope", "version", "installed_at", "artifact_count", "created_count", "merged_count", "receipt_path", "artifacts" ] }, "InstallArtifactSummary": { "type": "object", "properties": { "path": { "type": "string" }, "ownership": { "type": "string" }, "status": { "type": "string", "enum": [ "unchanged", "modified", "missing", "replaced", "unavailable" ] } }, "required": [ "path", "ownership", "status" ] }, "InstallReceiptsResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "receipts": { "type": "array", "items": { "$ref": "#/components/schemas/InstallReceiptSummary" } } }, "required": [ "ok", "receipts" ] }, "McpProviderInfo": { "type": "object", "description": "Secret-free MCP provider catalogue and local setup state.", "properties": { "id": { "type": "string" }, "display_name": { "type": "string" }, "package": { "type": "string" }, "required_env": { "type": "array", "items": { "type": "string" } }, "missing_env": { "type": "array", "items": { "type": "string" } }, "configured": { "type": "boolean" }, "enabled": { "type": "boolean" }, "template_available": { "type": "boolean" }, "template_sha": { "type": "string" }, "template_is_pinned": { "type": "boolean" }, "template_matches_pin": { "type": "boolean" } }, "required": [ "id", "display_name", "package", "required_env", "missing_env", "configured", "enabled", "template_available", "template_sha", "template_is_pinned", "template_matches_pin" ] }, "McpProvidersResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "message": { "type": "string" }, "config_path": { "type": "string" }, "providers": { "type": "array", "items": { "$ref": "#/components/schemas/McpProviderInfo" } } }, "required": [ "ok", "message", "config_path", "providers" ] }, "VersionResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "version": { "type": "string" }, "commit": { "type": "string" }, "uptime_s": { "type": "integer" } }, "required": [ "ok", "version", "commit", "uptime_s" ] }, "SelfcheckCheck": { "type": "object", "properties": { "name": { "type": "string" }, "status": { "type": "string", "enum": [ "ok", "warn", "err" ] }, "detail": { "type": "string" } }, "required": [ "name", "status", "detail" ] }, "SelfcheckResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "version": { "type": "string" }, "commit": { "type": "string" }, "checks": { "type": "array", "items": { "$ref": "#/components/schemas/SelfcheckCheck" } } }, "required": [ "ok", "version", "commit", "checks" ] }, "Job": { "type": "object", "description": "A supervised `agent-toolkit` subprocess run.", "properties": { "id": { "type": "string" }, "cmd": { "type": "string" }, "args": { "type": "array", "items": { "type": "string" } }, "status": { "type": "string", "enum": [ "queued", "running", "completed", "failed", "canceled", "rejected" ] }, "started_at": { "type": "string" }, "ended_at": { "type": "string" }, "exit_code": { "type": "integer" }, "workspace": { "type": "string" }, "retry_of": { "type": "string" } }, "required": [ "id", "cmd", "args", "status", "started_at", "ended_at", "exit_code", "workspace", "retry_of" ] }, "ApiEvent": { "type": "object", "description": "One entry of the global event stream (GET /api/v1/events). `seq` is monotonic per server process, `boot` identifies that process, and the SSE `id` is `-`. `subject` is the job id, loop name, swarm run id or memory entry type the event is about; `exit_code` is only meaningful for job.* and loop.* events.", "properties": { "seq": { "type": "integer" }, "boot": { "type": "string" }, "type": { "type": "string", "enum": [ "backend.ready", "backend.resync", "job.created", "job.updated", "job.deleted", "loop.started", "loop.finished", "swarm.changed", "memory.changed", "install.started", "install.finished" ] }, "at": { "type": "string" }, "subject": { "type": "string" }, "status": { "type": "string" }, "exit_code": { "type": "integer" }, "ref": { "type": "string" }, "message": { "type": "string" } }, "required": [ "seq", "boot", "type", "at", "subject", "status", "exit_code", "ref", "message" ] }, "AgentInfo": { "type": "object", "description": "One persona from agents//AGENT.md.", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "kind": { "type": "string" }, "description": { "type": "string" }, "source_file": { "type": "string" }, "delegates": { "type": "array", "items": { "type": "string" } }, "compatibility": { "type": "array", "items": { "$ref": "#/components/schemas/LibraryCompatibility" } } }, "required": [ "id", "name", "kind", "description", "source_file", "delegates", "compatibility" ] }, "AgentsResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "agents": { "type": "array", "items": { "$ref": "#/components/schemas/AgentInfo" } } }, "required": [ "ok", "agents" ] }, "LibraryCompatibility": { "type": "object", "description": "Target-registry support for the portable Agent Skills format.", "properties": { "target": { "type": "string" }, "display_name": { "type": "string" }, "status": { "type": "string", "enum": [ "supported", "partial", "unsupported", "unknown" ] } }, "required": [ "target", "display_name", "status" ] }, "LibrarySkill": { "type": "object", "description": "Catalog metadata for one reusable skill. This does not claim that the skill is installed or available on the current machine.", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "domain": { "type": "string" }, "description": { "type": "string" }, "origin": { "type": "string" }, "source_file": { "type": "string" }, "requires": { "type": "array", "items": { "type": "string" } }, "prerequisites": { "type": "array", "items": { "type": "string" } }, "mcp_required": { "type": "array", "items": { "type": "string" } }, "compatibility": { "type": "array", "items": { "$ref": "#/components/schemas/LibraryCompatibility" } } }, "required": [ "id", "name", "domain", "description", "origin", "source_file", "requires", "prerequisites", "mcp_required", "compatibility" ] }, "LibrarySkillsResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "count": { "type": "integer" }, "message": { "type": "string" }, "skills": { "type": "array", "items": { "$ref": "#/components/schemas/LibrarySkill" } } }, "required": [ "ok", "count", "message", "skills" ] }, "ToolInfo": { "type": "object", "description": "Coding-agent CLI discovery. detected = binary on PATH; configured = a known settings sentinel exists; enabled is `unknown` until serve owns an enablement store; verified = `--version` exited 0. install_hint is empty unless a real first-party install argv exists.", "properties": { "id": { "type": "string" }, "tool_name": { "type": "string" }, "detected": { "type": "boolean" }, "configured": { "type": "boolean" }, "enabled": { "type": "string", "enum": [ "unknown", "true", "false" ] }, "verified": { "type": "boolean" }, "resolved_path": { "type": "string" }, "config_paths": { "type": "array", "items": { "type": "string" } }, "version": { "type": "string" }, "reason": { "type": "string" }, "install_hint": { "type": "string" } }, "required": [ "id", "tool_name", "detected", "configured", "enabled", "verified", "resolved_path", "config_paths", "version", "reason", "install_hint" ] }, "ToolsResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "tools": { "type": "array", "items": { "$ref": "#/components/schemas/ToolInfo" } } }, "required": [ "ok", "tools" ] }, "ProviderInfo": { "type": "object", "description": "A swarm runner CLI. `auto` is a resolver and is omitted.", "properties": { "id": { "type": "string" }, "bin": { "type": "string" }, "available": { "type": "boolean" }, "capability": { "type": "string" }, "version": { "type": "string" } }, "required": [ "id", "bin", "available", "capability", "version" ] }, "ProvidersResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "providers": { "type": "array", "items": { "$ref": "#/components/schemas/ProviderInfo" } } }, "required": [ "ok", "providers" ] }, "ModelInfo": { "type": "object", "description": "One (profile, runner) slot from swarm_model_profiles.", "properties": { "profile": { "type": "string" }, "runner": { "type": "string" }, "model": { "type": "string" } }, "required": [ "profile", "runner", "model" ] }, "ModelsResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "models": { "type": "array", "items": { "$ref": "#/components/schemas/ModelInfo" } } }, "required": [ "ok", "models" ] }, "LiveModelInfo": { "type": "object", "description": "One model from a runner's live CLI catalogue (or static fallback).", "properties": { "runner": { "type": "string" }, "model": { "type": "string" }, "name": { "type": "string" } }, "required": [ "runner", "model", "name" ] }, "LiveModelsResponse": { "type": "object", "description": "source is live, static or unavailable; detail explains any fallback.", "properties": { "ok": { "type": "boolean" }, "runner": { "type": "string" }, "source": { "type": "string" }, "models": { "type": "array", "items": { "$ref": "#/components/schemas/LiveModelInfo" } }, "detail": { "type": "string" } }, "required": [ "ok", "runner", "source", "models", "detail" ] }, "PersonRoleBinding": { "type": "object", "properties": { "role": { "type": "string" }, "person_id": { "type": "string" }, "preferred_people": { "type": "array", "items": { "type": "string" } } }, "required": [ "role", "person_id", "preferred_people" ] }, "PersonBindingsResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "roles": { "type": "array", "items": { "$ref": "#/components/schemas/PersonRoleBinding" } } }, "required": [ "ok", "roles" ] }, "PersonBindingsRequest": { "type": "object", "properties": { "workspace": { "type": "string" }, "recipe": { "type": "string" }, "roles": { "type": "object", "additionalProperties": { "type": "string" } } }, "required": [ "workspace", "recipe", "roles" ] }, "PersonSession": { "type": "object", "description": "Durable lifecycle evidence for a real session bound to a Person (Desktop PTY, or a swarm role that really launched with source=swarm).", "properties": { "id": { "type": "string" }, "person_id": { "type": "string" }, "person": { "type": "string" }, "role": { "type": "string" }, "project_id": { "type": "string" }, "cwd": { "type": "string" }, "provider": { "type": "string" }, "model": { "type": "string" }, "status": { "type": "string", "enum": [ "launching", "running", "completed", "failed", "stopped", "timed_out", "interrupted" ] }, "started_at": { "type": "string" }, "ended_at": { "type": "string" }, "exit_code": { "type": "integer" }, "provider_session_id": { "type": "string" }, "source": { "type": "string", "enum": [ "", "swarm" ] }, "swarm_run_id": { "type": "string" }, "swarm_role": { "type": "string" } }, "required": [ "id", "person_id", "person", "role", "project_id", "cwd", "provider", "model", "status", "started_at", "ended_at", "exit_code", "provider_session_id", "source", "swarm_run_id", "swarm_role" ] }, "PersonSessionsResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "sessions": { "type": "array", "items": { "$ref": "#/components/schemas/PersonSession" } } }, "required": [ "ok", "sessions" ] }, "PersonSessionResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "session": { "$ref": "#/components/schemas/PersonSession" } }, "required": [ "ok", "session" ] }, "PersonSessionCreateRequest": { "type": "object", "properties": { "workspace": { "type": "string" }, "person_id": { "type": "string" }, "project_id": { "type": "string" }, "provider": { "type": "string" }, "model": { "type": "string" }, "provider_session_id": { "type": "string" } }, "required": [ "workspace", "person_id", "project_id", "provider", "model", "provider_session_id" ] }, "PersonSessionProviderRequest": { "type": "object", "properties": { "workspace": { "type": "string" }, "provider_session_id": { "type": "string" } }, "required": [ "workspace", "provider_session_id" ] }, "PersonSessionStatusRequest": { "type": "object", "properties": { "workspace": { "type": "string" }, "status": { "type": "string", "enum": [ "running", "completed", "failed", "stopped", "timed_out", "interrupted" ] }, "exit_code": { "type": "integer" } }, "required": [ "workspace", "status", "exit_code" ] }, "MemoryProvenance": { "type": "object", "description": "Honest origin for a knowledge file. author is the last git committer on read when `.git` exists; agent is empty unless a real source records it. timestamp is the first YYYY-MM-DD in the file, else mtime.", "properties": { "file": { "type": "string" }, "author": { "type": "string" }, "timestamp": { "type": "string" }, "project": { "type": "string" }, "agent": { "type": "string" } }, "required": [ "file", "author", "timestamp", "project", "agent" ] }, "MemoryEntry": { "type": "object", "description": "One memory file (learnings, processes, or todos). body is set on read and empty on list. Other knowledge/*.md files are not memory.", "properties": { "id": { "type": "string" }, "kind": { "type": "string" }, "title": { "type": "string" }, "snippet": { "type": "string" }, "body": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "provenance": { "$ref": "#/components/schemas/MemoryProvenance" } }, "required": [ "id", "kind", "title", "snippet", "body", "tags", "provenance" ] }, "MemoryHit": { "type": "object", "description": "One line match from GET /api/v1/memory/hits.", "properties": { "path": { "type": "string" }, "line": { "type": "integer" }, "snippet": { "type": "string" }, "kind": { "type": "string" } }, "required": [ "path", "line", "snippet", "kind" ] }, "MemoryListResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "entries": { "type": "array", "items": { "$ref": "#/components/schemas/MemoryEntry" } } }, "required": [ "ok", "entries" ] }, "MemorySearchResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "query": { "type": "string" }, "hits": { "type": "array", "items": { "$ref": "#/components/schemas/MemoryHit" } } }, "required": [ "ok", "query", "hits" ] }, "MemoryReadResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "entry": { "$ref": "#/components/schemas/MemoryEntry" } }, "required": [ "ok", "entry" ] }, "MemoryWriteResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "message": { "type": "string" }, "path": { "type": "string" } }, "required": [ "ok", "message", "path" ] }, "SwarmRunInfo": { "type": "object", "properties": { "run_id": { "type": "string" }, "recipe": { "type": "string" }, "backend": { "type": "string" }, "run_state": { "type": "string" }, "created_at": { "type": "string" }, "task": { "type": "string" }, "issue_ref": { "type": "string" }, "pr_url": { "type": "string" }, "project_id": { "type": "string" }, "person_bindings": { "type": "object", "additionalProperties": { "type": "string" } }, "role_runners": { "type": "object", "additionalProperties": { "type": "string" } }, "role_models": { "type": "object", "additionalProperties": { "type": "string" } } }, "required": [ "run_id", "recipe", "backend", "run_state", "created_at", "task", "issue_ref", "pr_url" ] }, "SwarmListResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "runs": { "type": "array", "items": { "$ref": "#/components/schemas/SwarmRunInfo" } } }, "required": [ "ok", "runs" ] }, "SwarmBudgetView": { "type": "object", "properties": { "max_total_tokens": { "type": "integer" }, "total_tokens": { "type": "integer" }, "max_cost_usd": { "type": "number" }, "total_cost": { "type": "number" }, "max_wall_seconds": { "type": "integer" }, "cost_status": { "type": "string", "enum": [ "accounted", "unavailable" ] } }, "required": [ "max_total_tokens", "total_tokens", "max_cost_usd", "total_cost", "max_wall_seconds", "cost_status" ] }, "SwarmGate": { "type": "object", "properties": { "id": { "type": "string" }, "description": { "type": "string" }, "required": { "type": "boolean" }, "approved": { "type": "boolean" }, "rejected": { "type": "boolean" }, "reason": { "type": "string" } }, "required": [ "id", "description", "required", "approved", "rejected", "reason" ] }, "SwarmHandoffView": { "type": "object", "properties": { "id": { "type": "string" }, "htype": { "type": "string" }, "from_role": { "type": "string" }, "to_role": { "type": "string" }, "priority": { "type": "integer" }, "artifact": { "type": "string" }, "commit": { "type": "string" }, "branch": { "type": "string" }, "blocking": { "type": "boolean" }, "act": { "type": "string" }, "hops": { "type": "integer" }, "max_hops": { "type": "integer" }, "state": { "type": "string" }, "created_at": { "type": "string" } }, "required": [ "id", "htype", "from_role", "to_role", "priority", "artifact", "commit", "branch", "blocking", "act", "hops", "max_hops", "state", "created_at" ] }, "SwarmTaskView": { "type": "object", "properties": { "id": { "type": "string" }, "status": { "type": "string" }, "priority": { "type": "integer" }, "owner": { "type": "string" }, "from_role": { "type": "string" }, "dependencies": { "type": "string" }, "blocked_reason": { "type": "string" }, "created_at": { "type": "string" } }, "required": [ "id", "status", "priority", "owner", "from_role", "dependencies", "blocked_reason", "created_at" ] }, "SwarmArtifactView": { "type": "object", "properties": { "name": { "type": "string" }, "path": { "type": "string" }, "size": { "type": "integer" } }, "required": [ "name", "path", "size" ] }, "SwarmRunResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "run": { "$ref": "#/components/schemas/SwarmRunInfo" }, "runner": { "type": "string" }, "model": { "type": "string" }, "budget": { "$ref": "#/components/schemas/SwarmBudgetView" }, "approvals": { "type": "array", "items": { "$ref": "#/components/schemas/SwarmGate" } }, "handoffs": { "type": "array", "items": { "$ref": "#/components/schemas/SwarmHandoffView" } }, "tasks": { "type": "array", "items": { "$ref": "#/components/schemas/SwarmTaskView" } }, "artifacts": { "type": "array", "items": { "$ref": "#/components/schemas/SwarmArtifactView" } }, "trace_tail": { "type": "array", "items": { "type": "string" } } }, "required": [ "ok", "run", "runner", "model", "budget", "approvals", "handoffs", "tasks", "artifacts", "trace_tail" ] }, "SwarmRecipeRoleView": { "type": "object", "properties": { "name": { "type": "string" }, "persona": { "type": "string" }, "policy": { "type": "string" }, "model_profile": { "type": "string" }, "receive_mode": { "type": "string" }, "consumes": { "type": "array", "items": { "type": "string" } }, "produces": { "type": "array", "items": { "type": "string" } }, "skills": { "type": "array", "items": { "type": "string" } } }, "required": [ "name", "persona", "policy", "model_profile", "receive_mode", "consumes", "produces", "skills" ] }, "SwarmRecipeBudgetView": { "type": "object", "properties": { "max_total_tokens": { "type": "integer" }, "max_cost_usd": { "type": "number" }, "max_wall_seconds": { "type": "integer" }, "max_concurrency": { "type": "integer" } }, "required": [ "max_total_tokens", "max_cost_usd", "max_wall_seconds", "max_concurrency" ] }, "SwarmRecipeView": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "roles": { "type": "array", "items": { "$ref": "#/components/schemas/SwarmRecipeRoleView" } }, "budget": { "$ref": "#/components/schemas/SwarmRecipeBudgetView" }, "workspace_strategy": { "type": "string" }, "keep_on_failure": { "type": "boolean" }, "max_concurrency": { "type": "integer" }, "max_wall_seconds": { "type": "integer" }, "require_plan_approval": { "type": "boolean" }, "require_final_approval": { "type": "boolean" }, "allow_direct_base_merge": { "type": "boolean" }, "allow_push": { "type": "boolean" } }, "required": [ "name", "description", "roles", "budget", "workspace_strategy", "keep_on_failure", "max_concurrency", "max_wall_seconds", "require_plan_approval", "require_final_approval", "allow_direct_base_merge", "allow_push" ] }, "SwarmBackendView": { "type": "object", "properties": { "name": { "type": "string" }, "available": { "type": "boolean" }, "detail": { "type": "string" } }, "required": [ "name", "available", "detail" ] }, "SwarmRecipesResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "recipes": { "type": "array", "items": { "$ref": "#/components/schemas/SwarmRecipeView" } }, "backends": { "type": "array", "items": { "$ref": "#/components/schemas/SwarmBackendView" } } }, "required": [ "ok", "recipes", "backends" ] }, "SwarmHandoffsResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "run_id": { "type": "string" }, "handoffs": { "type": "array", "items": { "$ref": "#/components/schemas/SwarmHandoffView" } } }, "required": [ "ok", "run_id", "handoffs" ] }, "SwarmTasksResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "run_id": { "type": "string" }, "tasks": { "type": "array", "items": { "$ref": "#/components/schemas/SwarmTaskView" } } }, "required": [ "ok", "run_id", "tasks" ] }, "SwarmApprovalsResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "run_id": { "type": "string" }, "approvals": { "type": "array", "items": { "$ref": "#/components/schemas/SwarmGate" } } }, "required": [ "ok", "run_id", "approvals" ] }, "SwarmArtifactsResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "run_id": { "type": "string" }, "artifacts": { "type": "array", "items": { "$ref": "#/components/schemas/SwarmArtifactView" } } }, "required": [ "ok", "run_id", "artifacts" ] }, "SwarmResolveHandoffRequest": { "type": "object", "properties": { "workspace": { "type": "string" }, "handoff_id": { "type": "string" } }, "required": [ "workspace", "handoff_id" ] }, "SwarmActionResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "message": { "type": "string" }, "run_id": { "type": "string" }, "status": { "type": "string" } }, "required": [ "ok", "message", "run_id", "status" ] }, "SwarmDraftPrRequest": { "type": "object", "properties": { "workspace": { "type": "string" } }, "required": [ "workspace" ] }, "LoopCadenceRequest": { "type": "object", "properties": { "cadence": { "type": "string" } }, "required": [ "cadence" ] }, "SwarmDraftPrResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "run_id": { "type": "string" }, "branch": { "type": "string" }, "pr_url": { "type": "string" }, "created": { "type": "boolean" }, "detail": { "type": "string" } }, "required": [ "ok", "run_id", "branch", "pr_url", "created", "detail" ] }, "SwarmPrStatusResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "run_id": { "type": "string" }, "pr_url": { "type": "string" }, "state": { "type": "string" }, "is_draft": { "type": "boolean" }, "checks_pass": { "type": "integer" }, "checks_fail": { "type": "integer" }, "checks_pending": { "type": "integer" }, "mergeable": { "type": "string" }, "review_decision": { "type": "string" }, "changed_files": { "type": "integer" }, "additions": { "type": "integer" }, "deletions": { "type": "integer" }, "detail": { "type": "string" } }, "required": [ "ok", "run_id", "pr_url", "state", "is_draft", "checks_pass", "checks_fail", "checks_pending", "mergeable", "review_decision", "changed_files", "additions", "deletions", "detail" ] }, "SwarmPrReadyResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "run_id": { "type": "string" }, "pr_url": { "type": "string" }, "detail": { "type": "string" } }, "required": [ "ok", "run_id", "pr_url", "detail" ] }, "LoopInfo": { "type": "object", "properties": { "name": { "type": "string" }, "tier": { "type": "string" }, "cadence": { "type": "string" }, "goal": { "type": "string" }, "runs": { "type": "integer" }, "last": { "type": "string" }, "status": { "type": "string" } }, "required": [ "name", "tier", "cadence", "goal", "runs", "last", "status" ] }, "LoopListResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "loops": { "type": "array", "items": { "$ref": "#/components/schemas/LoopInfo" } } }, "required": [ "ok", "loops" ] }, "LoopBudgetView": { "type": "object", "properties": { "max_tokens": { "type": "integer" }, "max_runs_per_day": { "type": "integer" }, "max_wall_seconds": { "type": "integer" }, "cost_status": { "type": "string", "enum": [ "unavailable", "accounted" ] } }, "required": [ "max_tokens", "max_runs_per_day", "max_wall_seconds", "cost_status" ] }, "LoopStatusResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "info": { "$ref": "#/components/schemas/LoopInfo" }, "budget": { "$ref": "#/components/schemas/LoopBudgetView" } }, "required": [ "ok", "info", "budget" ] }, "LoopAuditResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "name": { "type": "string" }, "completed": { "type": "integer" }, "failed": { "type": "integer" }, "tokens": { "type": "integer" }, "rate": { "type": "string" } }, "required": [ "ok", "name", "completed", "failed", "tokens", "rate" ] }, "LoopHistoryEntry": { "type": "object", "properties": { "id": { "type": "string" }, "status": { "type": "string" }, "tokens": { "type": "integer" } }, "required": [ "id", "status", "tokens" ] }, "LoopHistoryResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "name": { "type": "string" }, "last_id": { "type": "string" }, "last": { "type": "string" }, "status": { "type": "string" }, "runs": { "type": "array", "items": { "$ref": "#/components/schemas/LoopHistoryEntry" } } }, "required": [ "ok", "name", "last_id", "last", "status", "runs" ] }, "LoopCostResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "name": { "type": "string" }, "cost_status": { "type": "string", "enum": [ "unavailable", "accounted" ] }, "detail": { "type": "string" } }, "required": [ "ok", "name", "cost_status", "detail" ] }, "WorkspaceFileNode": { "type": "object", "properties": { "name": { "type": "string" }, "path": { "type": "string" }, "kind": { "type": "string", "enum": [ "file", "dir" ] }, "size": { "type": "integer" }, "depth": { "type": "integer" }, "masked": { "type": "boolean" } }, "required": [ "name", "path", "kind", "size", "depth", "masked" ] }, "WorkspaceFileListResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "root": { "type": "string" }, "nodes": { "type": "array", "items": { "$ref": "#/components/schemas/WorkspaceFileNode" } } }, "required": [ "ok", "root", "nodes" ] }, "WorkspaceFileReadResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "path": { "type": "string" }, "name": { "type": "string" }, "content": { "type": "string" }, "size": { "type": "integer" }, "binary": { "type": "boolean" }, "truncated": { "type": "boolean" }, "masked": { "type": "boolean" } }, "required": [ "ok", "path", "name", "content", "size", "binary", "truncated", "masked" ] }, "WorkspaceFileHit": { "type": "object", "properties": { "path": { "type": "string" }, "line": { "type": "integer" }, "snippet": { "type": "string" } }, "required": [ "path", "line", "snippet" ] }, "WorkspaceFileSearchResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "query": { "type": "string" }, "hits": { "type": "array", "items": { "$ref": "#/components/schemas/WorkspaceFileHit" } } }, "required": [ "ok", "query", "hits" ] }, "WorkspaceFileWriteResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "message": { "type": "string" }, "path": { "type": "string" } }, "required": [ "ok", "message", "path" ] }, "ProjectListEntry": { "type": "object", "description": "A workspace-registered project link and whether its target currently exists.", "properties": { "name": { "type": "string" }, "target": { "type": "string" }, "status": { "type": "string", "enum": [ "ok", "broken" ] } }, "required": [ "name", "target", "status" ] }, "GithubIssueView": { "type": "object", "properties": { "number": { "type": "integer" }, "title": { "type": "string" }, "url": { "type": "string" }, "state": { "type": "string" }, "labels": { "type": "array", "items": { "type": "string" } }, "author": { "type": "string" } }, "required": [ "number", "title", "url", "state", "labels", "author" ] }, "ProjectIssuesResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "repo": { "type": "string" }, "issues": { "type": "array", "items": { "$ref": "#/components/schemas/GithubIssueView" } }, "detail": { "type": "string" } }, "required": [ "ok", "repo", "issues", "detail" ] }, "GitFileChange": { "type": "object", "properties": { "path": { "type": "string" }, "code": { "type": "string" } }, "required": [ "path", "code" ] }, "ProjectGitStatusResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "project": { "type": "string" }, "branch": { "type": "string" }, "staged": { "type": "array", "items": { "$ref": "#/components/schemas/GitFileChange" } }, "unstaged": { "type": "array", "items": { "$ref": "#/components/schemas/GitFileChange" } }, "untracked": { "type": "array", "items": { "$ref": "#/components/schemas/GitFileChange" } }, "detail": { "type": "string" } }, "required": [ "ok", "project", "branch", "staged", "unstaged", "untracked", "detail" ] }, "ProjectGitDiffResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "project": { "type": "string" }, "path": { "type": "string" }, "staged": { "type": "boolean" }, "diff": { "type": "string" }, "truncated": { "type": "boolean" }, "detail": { "type": "string" } }, "required": [ "ok", "project", "path", "staged", "diff", "truncated", "detail" ] }, "GitCommitInfo": { "type": "object", "properties": { "hash": { "type": "string" }, "short": { "type": "string" }, "subject": { "type": "string" }, "author": { "type": "string" }, "date": { "type": "string" } }, "required": [ "hash", "short", "subject", "author", "date" ] }, "ProjectGitLogResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "project": { "type": "string" }, "commits": { "type": "array", "items": { "$ref": "#/components/schemas/GitCommitInfo" } }, "detail": { "type": "string" } }, "required": [ "ok", "project", "commits", "detail" ] }, "ProjectGitShowResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "project": { "type": "string" }, "hash": { "type": "string" }, "diff": { "type": "string" }, "truncated": { "type": "boolean" }, "detail": { "type": "string" } }, "required": [ "ok", "project", "hash", "diff", "truncated", "detail" ] }, "ProjectGitPathsRequest": { "type": "object", "properties": { "workspace": { "type": "string" }, "paths": { "type": "array", "items": { "type": "string" } } }, "required": [ "workspace", "paths" ] }, "ProjectGitHunkRequest": { "type": "object", "properties": { "workspace": { "type": "string" }, "path": { "type": "string" }, "staged": { "type": "boolean" }, "hunk": { "type": "integer" } }, "required": [ "workspace", "path", "staged", "hunk" ] }, "ProjectGitCommitRequest": { "type": "object", "properties": { "workspace": { "type": "string" }, "message": { "type": "string" } }, "required": [ "workspace", "message" ] }, "ProjectListResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "projects": { "type": "array", "items": { "$ref": "#/components/schemas/ProjectListEntry" } } }, "required": [ "ok", "projects" ] }, "WorkspacePackSummary": { "type": "object", "description": "A workspace context pack; this is not a reusable Library capability.", "properties": { "path": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "projects": { "type": "array", "items": { "type": "string" } }, "notes": { "type": "string" }, "revision": { "type": "string" }, "validation_errors": { "type": "array", "items": { "type": "string" } }, "active": { "type": "boolean" }, "extra_fields": { "type": "array", "items": { "type": "string" } } }, "required": [ "path", "name", "description", "projects", "notes", "revision", "validation_errors", "active", "extra_fields" ] }, "WorkspacePacksResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "workspace": { "type": "string" }, "active_pack": { "type": "string" }, "marker_issue": { "type": "string" }, "packs": { "type": "array", "items": { "$ref": "#/components/schemas/WorkspacePackSummary" } } }, "required": [ "ok", "workspace", "active_pack", "marker_issue", "packs" ] }, "WorkspacePackActivateRequest": { "type": "object", "properties": { "workspace": { "type": "string" }, "pack_path": { "type": "string" } }, "required": [ "workspace", "pack_path" ] }, "WorkspacePackActivateResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "workspace": { "type": "string" }, "active_pack": { "type": "string" }, "message": { "type": "string" } }, "required": [ "ok", "workspace", "active_pack", "message" ] }, "WorkspacePackSaveRequest": { "type": "object", "properties": { "workspace": { "type": "string" }, "pack_path": { "type": "string" }, "revision": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "projects": { "type": "array", "items": { "type": "string" } }, "notes": { "type": "string" } }, "required": [ "workspace", "pack_path", "revision", "name", "description", "projects", "notes" ] }, "WorkspacePackSaveResponse": { "type": "object", "properties": { "ok": { "type": "boolean" }, "pack": { "$ref": "#/components/schemas/WorkspacePackSummary" }, "message": { "type": "string" } }, "required": [ "ok", "pack", "message" ] }, "ContextFragment": { "type": "object", "description": "One ordered fragment of the effective context a future session would draw from, with provenance and a provider-agnostic size estimate.", "properties": { "id": { "type": "string" }, "kind": { "type": "string" }, "source": { "type": "string" }, "sha256": { "type": "string" }, "bytes": { "type": "integer" }, "est_tokens": { "type": "integer" }, "mode": { "type": "string" }, "detail": { "type": "string" } }, "required": [ "id", "kind", "source", "sha256", "bytes", "est_tokens", "mode", "detail" ] }, "EffectiveContextResponse": { "type": "object", "description": "The assembled effective-context fragment list for a workspace. Selection applies to future sessions only; this is prompt-shaping data, not a security boundary.", "properties": { "ok": { "type": "boolean" }, "workspace": { "type": "string" }, "active_pack": { "type": "string" }, "fragments": { "type": "array", "items": { "$ref": "#/components/schemas/ContextFragment" } }, "total_est_tokens": { "type": "integer" }, "notes": { "type": "array", "items": { "type": "string" } } }, "required": [ "ok", "workspace", "active_pack", "fragments", "total_est_tokens", "notes" ] } } } }